Commit 5c5670a5 authored by dcy's avatar dcy

特需修改

parent 7f094b50
......@@ -103,12 +103,12 @@ export function feeApplicationListByOrderId(query){
})
}
// 创建特殊
// 批量更新特需
export function specialNeedCreate(data){
return request({
url:'ecw/order-special-need/create',
method:'post',
data:data,
url:'ecw/order-special-need/updateBatch',
method:'put',
data,
})
}
// 创建特殊
......
......@@ -6,7 +6,7 @@
<el-form label-width="180px" label-position="left">
<el-form-item label="特殊要求">
<el-checkbox-group v-model="advanceType">
<el-checkbox v-for="(item) in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)" :disabled="advanceTypeList.includes(item.value)" :label="item.value" >{{item.label}}</el-checkbox>
<el-checkbox v-for="(item) in getDictDatas(DICT_TYPE.ORDER_SPECIAL_NEEDS)" :label="item.value" >{{item.label}}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="特殊要求备注"><el-input type="textarea" style="width: 300px;" v-model="todoDetail"></el-input></el-form-item>
......@@ -33,7 +33,7 @@
<script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {specialNeedCreate} from "@/api/ecw/order";
import {specialNeedCreate,getSpecialListByOrderId} from "@/api/ecw/order";
export default {
name: "specialNeeds",
props:{
......@@ -41,12 +41,9 @@ export default {
type:[String,Number],
},
show:Boolean,
advanceTypes:String,
},
computed:{
advanceTypeList(){
return !!this.advanceTypes ? this.advanceTypes.split(',') : []
}
},
data(){
return{
......@@ -62,7 +59,6 @@ export default {
submit(){
this.specialNeedsList.forEach(i => {
i.todoDetail = this.todoDetail
})
let p = this.specialNeedsList.filter(i => this.advanceType.indexOf(i.advanceType) > -1)
specialNeedCreate(p).then(r=>{
......@@ -86,6 +82,20 @@ export default {
payType:''
})
})
//特需回显
getSpecialListByOrderId(this.orderId).then(r => {
r.data.forEach(i => {
this.advanceType.push(i.advanceType)
let index = this.specialNeedsList.findIndex(item => i.advanceType == item.advanceType)
this.specialNeedsList.splice(index,1, { advanceType:i.advanceType,
orderId:this.orderId,
id:i.id,
transFee:i.transFee,//预计金额
transCurrency:i.transCurrency,//运输费币种
payType:i.payType})
})
})
}else {
this.specialNeedsList = []
this.advanceType = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment