feat(materialEdit): 对接素材上传视频的剧本和驳回字段
This commit is contained in:
parent
072b8c24c2
commit
7946d4995d
|
@ -100,6 +100,17 @@ export default {
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
// 编辑订单素材(流程)
|
||||||
|
EditOrderMaterial(data){
|
||||||
|
return new Promise((resolve, reject) => {
|
||||||
|
request.put('/mall/orderMaterial',data)
|
||||||
|
.then((res) =>{
|
||||||
|
resolve(res);
|
||||||
|
}).catch(err =>{
|
||||||
|
reject(err);
|
||||||
|
})
|
||||||
|
})
|
||||||
|
},
|
||||||
// 修改素材(批量)
|
// 修改素材(批量)
|
||||||
mallMaterialUpdateBatch(data){
|
mallMaterialUpdateBatch(data){
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
|
@ -9,15 +9,6 @@
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="form-item" v-if="commitState === 'back'">
|
|
||||||
<text class="form-label">修改意见</text>
|
|
||||||
<template>
|
|
||||||
<view class="comment-box">
|
|
||||||
{{ comment }}
|
|
||||||
</view>
|
|
||||||
</template>
|
|
||||||
</view>
|
|
||||||
|
|
||||||
<view class="form-item">
|
<view class="form-item">
|
||||||
<text class="form-label">剧本 <text class="form-hint">视频的剧本</text> </text>
|
<text class="form-label">剧本 <text class="form-hint">视频的剧本</text> </text>
|
||||||
<!-- 文本输入 -->
|
<!-- 文本输入 -->
|
||||||
|
@ -101,7 +92,6 @@
|
||||||
orderItemId: "",
|
orderItemId: "",
|
||||||
// 素材提交状态
|
// 素材提交状态
|
||||||
commitState:'add',
|
commitState:'add',
|
||||||
comment:'',
|
|
||||||
materialfrom:{
|
materialfrom:{
|
||||||
id: undefined,
|
id: undefined,
|
||||||
dictId: undefined,
|
dictId: undefined,
|
||||||
|
@ -169,17 +159,26 @@
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async getProductDetail(){
|
async getProductDetail(){
|
||||||
|
// let res = await this.$api.orderApi.getMallclientOrderProductList({ orderId: this.orderId, productId: this.productId })
|
||||||
let res = await this.$api.orderApi.getOrderMaterialList({ orderItemId: this.orderItemId })
|
let res = await this.$api.orderApi.getOrderMaterialList({ orderItemId: this.orderItemId })
|
||||||
|
console.log("res",res)
|
||||||
|
// this.materialfrom.productSn = res.rows[0].productSn;
|
||||||
|
// this.commitState = res.rows[0].commitState;
|
||||||
|
// if (this.commitState === 0) {
|
||||||
|
// this.getMaterialDictList();
|
||||||
|
// } else {
|
||||||
|
// this.getMaterialList();
|
||||||
|
// }
|
||||||
if(res.rows.length!=0){
|
if(res.rows.length!=0){
|
||||||
this.materialfrom.flowId = res.rows[0].id;
|
this.materialfrom.flowId = res.rows[0].id;
|
||||||
this.commitState = res.rows[0].status;
|
this.commitState = res.rows[0].status;
|
||||||
this.comment = res.rows[0].comment || '';
|
|
||||||
this.scriptContent = res.rows[0].script || '';
|
|
||||||
this.materialTemplateList = res.rows[0].materialItems || [];
|
this.materialTemplateList = res.rows[0].materialItems || [];
|
||||||
res.rows[0].materialItems.forEach(async (item,index)=>{
|
res.rows[0].materialItems.forEach(async (item,index)=>{
|
||||||
if(item.attrType !== 0 && item.attrValue !== ''){
|
if(item.attrType !== 0 && item.attrValue !== ''){
|
||||||
let {fileUrl,fileName} = await this.getFileDetail(item.attrValue);
|
let {fileUrl,fileName} = await this.getFileDetail(item.attrValue);
|
||||||
console.log("fileUrl,fileName",fileUrl,fileName)
|
console.log("fileUrl,fileName",fileUrl,fileName)
|
||||||
|
// this.materialTemplateList[index].fileUrl = fileUrl;
|
||||||
|
// this.materialTemplateList[index].fileName = fileName;
|
||||||
this.$nextTick(()=>{
|
this.$nextTick(()=>{
|
||||||
this.$set(this.materialTemplateList[index],'fileUrl',fileUrl)
|
this.$set(this.materialTemplateList[index],'fileUrl',fileUrl)
|
||||||
this.$set(this.materialTemplateList[index],'fileName',fileName)
|
this.$set(this.materialTemplateList[index],'fileName',fileName)
|
||||||
|
@ -441,21 +440,13 @@
|
||||||
orderId: this.orderId,
|
orderId: this.orderId,
|
||||||
productId: this.productId,
|
productId: this.productId,
|
||||||
orderItemId: this.orderItemId,
|
orderItemId: this.orderItemId,
|
||||||
materialItems: this.materialTemplateList,
|
materialItems: this.materialTemplateList
|
||||||
script: this.scriptContent
|
|
||||||
});
|
});
|
||||||
this.buttonLoading = false;
|
this.buttonLoading = false;
|
||||||
this.materialfrom.flowId = res.data.id;
|
this.materialfrom.flowId = res.data.id;
|
||||||
this.getProductDetail();
|
this.getProductDetail();
|
||||||
}else{
|
}else{
|
||||||
res = await this.$api.orderApi.EditOrderMaterial({
|
res = await this.$api.orderApi.mallMaterialUpdateBatch(this.materialTemplateList);
|
||||||
orderId: this.orderId,
|
|
||||||
productId: this.productId,
|
|
||||||
orderItemId: this.orderItemId,
|
|
||||||
materialItems: this.materialTemplateList,
|
|
||||||
script: this.scriptContent,
|
|
||||||
id: this.materialfrom.flowId
|
|
||||||
});
|
|
||||||
this.buttonLoading = false;
|
this.buttonLoading = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -523,15 +514,6 @@
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.comment-box{
|
|
||||||
background-color: rgb(254,242,242);
|
|
||||||
border: 1px solid rgb(254,226,226);
|
|
||||||
border-radius: 0.5rem;
|
|
||||||
padding: 1rem;
|
|
||||||
width: 100%;
|
|
||||||
color: red;
|
|
||||||
font-size: 36rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.form-item {
|
.form-item {
|
||||||
margin-bottom: 20rpx;
|
margin-bottom: 20rpx;
|
||||||
|
@ -545,9 +527,9 @@
|
||||||
margin-bottom: 10rpx;
|
margin-bottom: 10rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
.form-hint{
|
.form-hint{
|
||||||
font-size: 20rpx;
|
font-size: 22rpx;
|
||||||
color: #999;
|
color: #666;
|
||||||
margin-left: 6rpx;
|
margin-left: 10rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue