Commit 5c5670a5 authored by dcy's avatar dcy

特需修改

parent 7f094b50
...@@ -103,12 +103,12 @@ export function feeApplicationListByOrderId(query){ ...@@ -103,12 +103,12 @@ export function feeApplicationListByOrderId(query){
}) })
} }
// 创建特殊 // 批量更新特需
export function specialNeedCreate(data){ export function specialNeedCreate(data){
return request({ return request({
url:'ecw/order-special-need/create', url:'ecw/order-special-need/updateBatch',
method:'post', method:'put',
data:data, data,
}) })
} }
// 创建特殊 // 创建特殊
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<el-form label-width="180px" label-position="left"> <el-form label-width="180px" label-position="left">
<el-form-item label="特殊要求"> <el-form-item label="特殊要求">
<el-checkbox-group v-model="advanceType"> <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-checkbox-group>
</el-form-item> </el-form-item>
<el-form-item label="特殊要求备注"><el-input type="textarea" style="width: 300px;" v-model="todoDetail"></el-input></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 @@ ...@@ -33,7 +33,7 @@
<script> <script>
import { getDictDatas, DICT_TYPE } from '@/utils/dict'; import { getDictDatas, DICT_TYPE } from '@/utils/dict';
import {specialNeedCreate} from "@/api/ecw/order"; import {specialNeedCreate,getSpecialListByOrderId} from "@/api/ecw/order";
export default { export default {
name: "specialNeeds", name: "specialNeeds",
props:{ props:{
...@@ -41,12 +41,9 @@ export default { ...@@ -41,12 +41,9 @@ export default {
type:[String,Number], type:[String,Number],
}, },
show:Boolean, show:Boolean,
advanceTypes:String,
}, },
computed:{ computed:{
advanceTypeList(){
return !!this.advanceTypes ? this.advanceTypes.split(',') : []
}
}, },
data(){ data(){
return{ return{
...@@ -62,7 +59,6 @@ export default { ...@@ -62,7 +59,6 @@ export default {
submit(){ submit(){
this.specialNeedsList.forEach(i => { this.specialNeedsList.forEach(i => {
i.todoDetail = this.todoDetail i.todoDetail = this.todoDetail
}) })
let p = this.specialNeedsList.filter(i => this.advanceType.indexOf(i.advanceType) > -1) let p = this.specialNeedsList.filter(i => this.advanceType.indexOf(i.advanceType) > -1)
specialNeedCreate(p).then(r=>{ specialNeedCreate(p).then(r=>{
...@@ -86,6 +82,20 @@ export default { ...@@ -86,6 +82,20 @@ export default {
payType:'' 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 { }else {
this.specialNeedsList = [] this.specialNeedsList = []
this.advanceType = [] 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