|
|
@ -1,12 +1,6 @@ |
|
|
|
<template> |
|
|
|
<template> |
|
|
|
<el-drawer |
|
|
|
<el-drawer direction="ltr" size="40%" :visible="controlWindows.bill" @opened="openDrawer" :before-close="closeWindow" |
|
|
|
direction="ltr" |
|
|
|
:show-close=false> |
|
|
|
size="40%" |
|
|
|
|
|
|
|
:visible="controlWindows.bill" |
|
|
|
|
|
|
|
@opened="openDrawer" |
|
|
|
|
|
|
|
:before-close="closeWindow" |
|
|
|
|
|
|
|
:show-close = false |
|
|
|
|
|
|
|
> |
|
|
|
|
|
|
|
<div class="create" v-if="controlWindows.bill"> |
|
|
|
<div class="create" v-if="controlWindows.bill"> |
|
|
|
<el-form label-width="100px"> |
|
|
|
<el-form label-width="100px"> |
|
|
|
<div class="billTop"> |
|
|
|
<div class="billTop"> |
|
|
@ -15,36 +9,37 @@ |
|
|
|
<el-form-item label="订单信息"> |
|
|
|
<el-form-item label="订单信息"> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="提货单数量:"> |
|
|
|
<el-form-item label="提货单数量:"> |
|
|
|
<span>{{billData.orderInfo.deliveryAccount}}</span> |
|
|
|
<span>{{ billData.orderInfo.deliveryAccount }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-form-item label="订单状态"> |
|
|
|
<el-form-item label="订单状态"> |
|
|
|
<el-tag effect='dark' :type="orderTagType(billData.orderInfo.orderStatus).orderType">{{orderTagType(billData.orderInfo.orderStatus).orderLabel}}</el-tag> |
|
|
|
<el-tag effect='dark' :type="orderTagType(billData.orderInfo.orderStatus).orderType">{{ |
|
|
|
|
|
|
|
orderTagType(billData.orderInfo.orderStatus).orderLabel }}</el-tag> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div class="billTop-top-left"> |
|
|
|
<div class="billTop-top-left"> |
|
|
|
<el-form-item label="预订数量:"> |
|
|
|
<el-form-item label="预订数量:"> |
|
|
|
<span>{{billData.orderInfo.preQuantity}}</span> |
|
|
|
<span>{{ billData.orderInfo.preQuantity }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="订单金额:"> |
|
|
|
<el-form-item label="订单金额:"> |
|
|
|
<span>{{billData.orderInfo.preAmount}}</span> |
|
|
|
<span>{{ billData.orderInfo.preAmount }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="billTop-top-left"> |
|
|
|
<div class="billTop-top-left"> |
|
|
|
<el-form-item label="已提数量:"> |
|
|
|
<el-form-item label="已提数量:"> |
|
|
|
<span>{{billData.orderInfo.alreadyQuantity}}</span> |
|
|
|
<span>{{ billData.orderInfo.alreadyQuantity }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="已提金额:"> |
|
|
|
<el-form-item label="已提金额:"> |
|
|
|
<span>{{billData.orderInfo.alreadyAmount}}</span> |
|
|
|
<span>{{ billData.orderInfo.alreadyAmount }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="billTop-top-left"> |
|
|
|
<div class="billTop-top-left"> |
|
|
|
<el-form-item label="剩余数量:"> |
|
|
|
<el-form-item label="剩余数量:"> |
|
|
|
<span>{{billData.orderInfo.surplusQuantity}}</span> |
|
|
|
<span>{{ billData.orderInfo.surplusQuantity }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="剩余金额:"> |
|
|
|
<el-form-item label="剩余金额:"> |
|
|
|
<span>{{billData.orderInfo.surplusAmount}}</span> |
|
|
|
<span>{{ billData.orderInfo.surplusAmount }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -55,12 +50,13 @@ |
|
|
|
<el-button type="primary" @click="billAdd()">创建提货单</el-button> |
|
|
|
<el-button type="primary" @click="billAdd()">创建提货单</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="" style="height: 58vh;overflow: auto;"> |
|
|
|
<div class="" style="height: 58vh;overflow: auto;"> |
|
|
|
<div class="billBottom-body" v-for="(item,index) in billData.list" :key="index"> |
|
|
|
<div class="billBottom-body" v-for="(item, index) in billData.list" :key="index"> |
|
|
|
<div class="billBottom-body-top"> |
|
|
|
<div class="billBottom-body-top"> |
|
|
|
<el-form-item label="提货单"> |
|
|
|
<el-form-item label="提货单"> |
|
|
|
<span>{{item.id}}</span> |
|
|
|
<span>{{ item.id }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-tag :type="orderTagType(item.deliveryStatus).type">{{orderTagType(item.deliveryStatus).label}}</el-tag> |
|
|
|
<el-tag :type="orderTagType(item.deliveryStatus).type">{{ orderTagType(item.deliveryStatus).label |
|
|
|
|
|
|
|
}}</el-tag> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="billBottom-body-middle"> |
|
|
|
<div class="billBottom-body-middle"> |
|
|
|
<div class="billBottom-body-middle-info"> |
|
|
|
<div class="billBottom-body-middle-info"> |
|
|
@ -68,7 +64,7 @@ |
|
|
|
<span>{{ item.preDeliveryQuantity }}</span> |
|
|
|
<span>{{ item.preDeliveryQuantity }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="提货人"> |
|
|
|
<el-form-item label="提货人"> |
|
|
|
<span>{{item.driverName}}</span> |
|
|
|
<span>{{ item.driverName }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="车牌号"> |
|
|
|
<el-form-item label="车牌号"> |
|
|
|
<span>{{ item.plateNumber }}</span> |
|
|
|
<span>{{ item.plateNumber }}</span> |
|
|
@ -83,7 +79,8 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div v-show="item.deliveryStatus=='SUBMITED'" style="text-align: right;color: #409EFF;" @click="billAdd(item,index)">修改信息</div> |
|
|
|
<div v-show="item.deliveryStatus == 'SUBMITED'" style="text-align: right;color: #409EFF;" |
|
|
|
|
|
|
|
@click="billAdd(item, index)">修改信息</div> |
|
|
|
<div class="billBottom-body-bottom"> |
|
|
|
<div class="billBottom-body-bottom"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-form-item label="创建时间"> |
|
|
|
<el-form-item label="创建时间"> |
|
|
@ -94,11 +91,16 @@ |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<el-button v-show="item.deliveryStatus=='SUBMITED'&&billData.orderInfo.orderStatus=='DELIVERING'&&billData.orderInfo.payStatus!=='REFUNDED'" type="danger" @click="billDelete(item,index)">删除提货单</el-button> |
|
|
|
<el-button |
|
|
|
<el-button :effect="orderTagType(item.deliveryStatus).effect" :disabled="item.deliveryStatus!=='SUBMITED'" @click="billAddSave(2,item)" :type="orderTagType(item.deliveryStatus).type1">{{orderTagType(item.deliveryStatus).info}}</el-button> |
|
|
|
v-show="item.deliveryStatus == 'SUBMITED' && billData.orderInfo.orderStatus == 'DELIVERING' && billData.orderInfo.payStatus !== 'REFUNDED'" |
|
|
|
|
|
|
|
type="danger" @click="billDelete(item, index)">删除提货单</el-button> |
|
|
|
|
|
|
|
<el-button :effect="orderTagType(item.deliveryStatus).effect" |
|
|
|
|
|
|
|
:disabled="item.deliveryStatus !== 'SUBMITED'" @click="billAddSave(2, item)" |
|
|
|
|
|
|
|
:type="orderTagType(item.deliveryStatus).type1">{{ orderTagType(item.deliveryStatus).info |
|
|
|
|
|
|
|
}}</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-form> |
|
|
|
</el-form> |
|
|
@ -107,10 +109,11 @@ |
|
|
|
<el-button @click="controlWindows.bill = false">取消 </el-button> |
|
|
|
<el-button @click="controlWindows.bill = false">取消 </el-button> |
|
|
|
<!-- <el-button @click="submit">订单确认</el-button> --> |
|
|
|
<!-- <el-button @click="submit">订单确认</el-button> --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="提货单信息" width="400px" :visible.sync="dialogBillAdd"> |
|
|
|
<el-dialog :close-on-click-modal="false" :append-to-body="true" title="提货单信息" width="400px" |
|
|
|
|
|
|
|
:visible.sync="dialogBillAdd"> |
|
|
|
<el-form v-if="dialogBillAdd" :model="billAddData" ref="form" :rules="rules"> |
|
|
|
<el-form v-if="dialogBillAdd" :model="billAddData" ref="form" :rules="rules"> |
|
|
|
<el-form-item label="预约提货量" prop="preDeliveryQuantity"> |
|
|
|
<el-form-item label="预约提货量" prop="preDeliveryQuantity"> |
|
|
|
<el-input v-model="billAddData.preDeliveryQuantity"></el-input>元/吨 |
|
|
|
<el-input v-model="billAddData.preDeliveryQuantity"></el-input>吨 |
|
|
|
</el-form-item> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="提货人" prop="driverName"> |
|
|
|
<el-form-item label="提货人" prop="driverName"> |
|
|
|
<el-input v-model="billAddData.driverName"></el-input> |
|
|
|
<el-input v-model="billAddData.driverName"></el-input> |
|
|
@ -129,12 +132,8 @@ |
|
|
|
<!-- <el-button v-show="billTitle" type="primary" @click="billAddSave(2)">修改并锁定</el-button> --> |
|
|
|
<!-- <el-button v-show="billTitle" type="primary" @click="billAddSave(2)">修改并锁定</el-button> --> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</el-dialog> |
|
|
|
<el-dialog |
|
|
|
<el-dialog destroy-on-close title="提示" :close-on-click-modal="false" :append-to-body="true" |
|
|
|
destroy-on-close |
|
|
|
:visible.sync="dialogDelivery" width="30%"> |
|
|
|
title="提示" |
|
|
|
|
|
|
|
:close-on-click-modal="false" :append-to-body="true" |
|
|
|
|
|
|
|
:visible.sync="dialogDelivery" |
|
|
|
|
|
|
|
width="30%"> |
|
|
|
|
|
|
|
<el-form v-if="dialogDelivery"> |
|
|
|
<el-form v-if="dialogDelivery"> |
|
|
|
<el-form-item label="实际提货量" prop="plateNumber"> |
|
|
|
<el-form-item label="实际提货量" prop="plateNumber"> |
|
|
|
<el-input v-model="deliveryQuantity"></el-input> |
|
|
|
<el-input v-model="deliveryQuantity"></el-input> |
|
|
@ -158,9 +157,9 @@ export default { |
|
|
|
components: { |
|
|
|
components: { |
|
|
|
autocomplete, |
|
|
|
autocomplete, |
|
|
|
}, |
|
|
|
}, |
|
|
|
filters:{ |
|
|
|
filters: { |
|
|
|
orderTagType(val){ |
|
|
|
orderTagType(val) { |
|
|
|
switch(val){ |
|
|
|
switch (val) { |
|
|
|
case 'SUBMITED': return '订单提交' |
|
|
|
case 'SUBMITED': return '订单提交' |
|
|
|
case 'ORDER_LOCKED': return '订单锁定' |
|
|
|
case 'ORDER_LOCKED': return '订单锁定' |
|
|
|
case 'ORDER_SUCCESS': return '下单成功' |
|
|
|
case 'ORDER_SUCCESS': return '下单成功' |
|
|
@ -168,29 +167,29 @@ export default { |
|
|
|
case 'COMPLETE': return '提货单完成' |
|
|
|
case 'COMPLETE': return '提货单完成' |
|
|
|
case 'CANCELED': return '订单取消' |
|
|
|
case 'CANCELED': return '订单取消' |
|
|
|
} |
|
|
|
} |
|
|
|
return {label:val?val:'暂无数据',type:'info'} |
|
|
|
return { label: val ? val : '暂无数据', type: 'info' } |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
}, |
|
|
|
props: { |
|
|
|
props: { |
|
|
|
controlWindows: Object, |
|
|
|
controlWindows: Object, |
|
|
|
billData:Array |
|
|
|
billData: Array |
|
|
|
// refineryTypeEnum: Array, |
|
|
|
// refineryTypeEnum: Array, |
|
|
|
}, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
data() { |
|
|
|
return { |
|
|
|
return { |
|
|
|
billTitle:'', |
|
|
|
billTitle: '', |
|
|
|
quantity:'', |
|
|
|
quantity: '', |
|
|
|
deliveryQuantity:'', |
|
|
|
deliveryQuantity: '', |
|
|
|
dialogDelivery:false, |
|
|
|
dialogDelivery: false, |
|
|
|
customList:[], |
|
|
|
customList: [], |
|
|
|
form: { |
|
|
|
form: { |
|
|
|
actAmount:0 |
|
|
|
actAmount: 0 |
|
|
|
}, |
|
|
|
}, |
|
|
|
billAddData:{}, |
|
|
|
billAddData: {}, |
|
|
|
dialogBillAdd:false, |
|
|
|
dialogBillAdd: false, |
|
|
|
productNameList:[], |
|
|
|
productNameList: [], |
|
|
|
refineryList: [], |
|
|
|
refineryList: [], |
|
|
|
productRowData:{}, |
|
|
|
productRowData: {}, |
|
|
|
configAutocomplete: { |
|
|
|
configAutocomplete: { |
|
|
|
serveTarget: refineryInfoServe.findByEntity, |
|
|
|
serveTarget: refineryInfoServe.findByEntity, |
|
|
|
autocompleteKey: "refineryName", |
|
|
|
autocompleteKey: "refineryName", |
|
|
@ -217,110 +216,121 @@ export default { |
|
|
|
}, |
|
|
|
}, |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
created(){ |
|
|
|
created() { |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
billdelivery(){ |
|
|
|
billdelivery() { |
|
|
|
this.billAddData.deliveryStatus = 'COMPLETE' |
|
|
|
this.billAddData.deliveryStatus = 'COMPLETE' |
|
|
|
this.billAddData.accDeliveryQuantity = this.deliveryQuantity |
|
|
|
this.billAddData.accDeliveryQuantity = this.deliveryQuantity |
|
|
|
order.update(this.billAddData).then(res=>{ |
|
|
|
order.update(this.billAddData).then(res => { |
|
|
|
if(res.code == 20000){ |
|
|
|
if (res.code == 20000) { |
|
|
|
this.billListMeth() |
|
|
|
this.billListMeth() |
|
|
|
// this.$set(this.billData.list,this.billData.index,this.billAddData) |
|
|
|
// this.$set(this.billData.list,this.billData.index,this.billAddData) |
|
|
|
this.$message.success(res.msg) |
|
|
|
this.$message.success(res.msg) |
|
|
|
this.dialogDelivery = false |
|
|
|
this.dialogDelivery = false |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}); |
|
|
|
|
|
|
|
this.$emit('billOfLading', this.billData, 2) |
|
|
|
}, |
|
|
|
}, |
|
|
|
billSubmit(e,index){ |
|
|
|
billSubmit(e, index) { |
|
|
|
if(e.deliveryStatus=='PLATENUM_SUCCESS'){ |
|
|
|
if (e.deliveryStatus == 'PLATENUM_SUCCESS') { |
|
|
|
this.billAddData = JSON.parse(JSON.stringify(e)) |
|
|
|
this.billAddData = JSON.parse(JSON.stringify(e)) |
|
|
|
this.billData.index = index |
|
|
|
this.billData.index = index |
|
|
|
this.dialogDelivery = true |
|
|
|
this.dialogDelivery = true |
|
|
|
}else if(e.deliveryStatus=='PLATENUM_LOCKED'){ |
|
|
|
} else if (e.deliveryStatus == 'PLATENUM_LOCKED') { |
|
|
|
this.billAddData = JSON.parse(JSON.stringify(e)) |
|
|
|
this.billAddData = JSON.parse(JSON.stringify(e)) |
|
|
|
this.billAddData.deliveryStatus = 'PLATENUM_SUCCESS' |
|
|
|
this.billAddData.deliveryStatus = 'PLATENUM_SUCCESS' |
|
|
|
this.$confirm('是否确认?', '提示', { type: 'info' }).then(() => { |
|
|
|
this.$confirm('是否确认?', '提示', { type: 'info' }).then(() => { |
|
|
|
console.log(this.billData.list,index,this.billAddData,'aaaaaaaaaaa') |
|
|
|
console.log(this.billData.list, index, this.billAddData, 'aaaaaaaaaaa') |
|
|
|
order.update(this.billAddData).then(res=>{ |
|
|
|
order.update(this.billAddData).then(res => { |
|
|
|
if(res.code == 20000){ |
|
|
|
if (res.code == 20000) { |
|
|
|
this.billListMeth() |
|
|
|
this.billListMeth() |
|
|
|
// this.$set(this.billData.list,index,this.billAddData) |
|
|
|
// this.$set(this.billData.list,index,this.billAddData) |
|
|
|
this.$message.success(res.msg) |
|
|
|
this.$message.success(res.msg) |
|
|
|
this.dialogBillAdd = false |
|
|
|
this.dialogBillAdd = false; |
|
|
|
|
|
|
|
this.$emit('billOfLading', this.billData, 2) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
orderTagType(val){ |
|
|
|
orderTagType(val) { |
|
|
|
switch(val){ |
|
|
|
switch (val) { |
|
|
|
case 'SUBMITED': return {orderLabel:'订单提交',label:'等待信息',info:'锁定提货信息',type:'warning',type1:'',orderType:'warning',} |
|
|
|
case 'SUBMITED': return { orderLabel: '订单提交', label: '等待信息', info: '锁定提货信息', type: 'warning', type1: '', orderType: 'warning', } |
|
|
|
case 'PLATENUM_LOCKED': return {orderLabel:'下单中',label:'信息锁定',info:'信息待确认',type:'info',type1:'info',orderType:'warning'} |
|
|
|
case 'PLATENUM_LOCKED': return { orderLabel: '下单中', label: '信息锁定', info: '信息待确认', type: 'info', type1: 'info', orderType: 'warning' } |
|
|
|
case 'PLATENUM_SUCCESS': return {orderLabel:'下单成功',label:'提货中',info:'提货中',type:'',type1:'info',orderType:''} |
|
|
|
case 'PLATENUM_SUCCESS': return { orderLabel: '下单成功', label: '提货中', info: '提货中', type: '', type1: 'info', orderType: '' } |
|
|
|
case 'DELIVERING': return {orderLabel:'提货中',label:'提货中', type: '',orderType:'info'} |
|
|
|
case 'DELIVERING': return { orderLabel: '提货中', label: '提货中', type: '', orderType: 'info' } |
|
|
|
case 'COMPLETE': return {orderLabel:'订单完成',label:'提货完成',info:'提货完成',type:'success',type1:'info',orderType:'success'} |
|
|
|
case 'COMPLETE': return { orderLabel: '订单完成', label: '提货完成', info: '提货完成', type: 'success', type1: 'info', orderType: 'success' } |
|
|
|
case 'CANCELED': return {orderLabel:'订单取消',label:'订单取消',info:'订单取消',type:'info',type1:'dark',orderType:'info'} |
|
|
|
case 'CANCELED': return { orderLabel: '订单取消', label: '订单取消', info: '订单取消', type: 'info', type1: 'dark', orderType: 'info' } |
|
|
|
|
|
|
|
default: return { orderLabel: '暂无数据', label: '暂无数据', info: '暂无数据', type: 'info', type1: 'dark', orderType: 'info' } |
|
|
|
} |
|
|
|
} |
|
|
|
return {label:val?val:'暂无数据',info:val?val:'暂无数据',type:'info'} |
|
|
|
return { label: val ? val : '暂无数据', info: val ? val : '暂无数据', type: 'info' } |
|
|
|
}, |
|
|
|
}, |
|
|
|
//创建修改提货单弹窗 |
|
|
|
//创建修改提货单弹窗 |
|
|
|
billAdd(e,index){ |
|
|
|
billAdd(e, index) { |
|
|
|
this.billTitle = e?true:false |
|
|
|
this.billTitle = e ? true : false |
|
|
|
this.billAddData = e?JSON.parse(JSON.stringify(e)):{} |
|
|
|
this.billAddData = e ? JSON.parse(JSON.stringify(e)) : {} |
|
|
|
this.billData.index = index |
|
|
|
this.billData.index = index |
|
|
|
this.dialogBillAdd = true |
|
|
|
this.dialogBillAdd = true |
|
|
|
}, |
|
|
|
}, |
|
|
|
//创建修改提货单 |
|
|
|
//创建修改提货单 |
|
|
|
billAddSave(e,item){ |
|
|
|
billAddSave(e, item) { |
|
|
|
if(!e){ |
|
|
|
if (!e) { |
|
|
|
this.$refs["form"].validate((valid) => { |
|
|
|
this.$refs["form"].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
if (valid) { |
|
|
|
this.billAddData.orderId=this.controlWindows.addInfo.id |
|
|
|
this.billAddData.orderId = this.controlWindows.addInfo.id |
|
|
|
this.billAddData.productMeasurement=this.controlWindows.addInfo.productMeasurement |
|
|
|
this.billAddData.productMeasurement = this.controlWindows.addInfo.productMeasurement |
|
|
|
order.billSave(this.billAddData).then(res=>{ |
|
|
|
order.billSave(this.billAddData).then(res => { |
|
|
|
if(res.code == 20000){ |
|
|
|
if (res.code == 20000) { |
|
|
|
this.billAddData.deliveryStatus = 'SUBMITED' |
|
|
|
this.billAddData.deliveryStatus = 'SUBMITED' |
|
|
|
this.billData.list.push(this.billAddData) |
|
|
|
this.billData.list.push(this.billAddData) |
|
|
|
this.billListMeth() |
|
|
|
this.billListMeth() |
|
|
|
this.$message.success(res.msg) |
|
|
|
this.$message.success(res.msg) |
|
|
|
this.dialogBillAdd = false |
|
|
|
this.dialogBillAdd = false; |
|
|
|
} |
|
|
|
} |
|
|
|
})}}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
|
|
|
|
this.$confirm('确定锁定提货单?', '提示', { type: 'error' }).then(() => { |
|
|
|
|
|
|
|
this.billAddData = item?JSON.parse(JSON.stringify(item)):{} |
|
|
|
|
|
|
|
this.billAddData.deliveryStatus = e==2?'PLATENUM_LOCKED':'' |
|
|
|
|
|
|
|
order.update(this.billAddData).then(res=>{ |
|
|
|
|
|
|
|
if(res.code == 20000){ |
|
|
|
|
|
|
|
this.billListMeth() |
|
|
|
|
|
|
|
this.$message.success(res.msg) |
|
|
|
|
|
|
|
this.dialogBillAdd = false |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
this.$confirm(`确定${e==1?'修改':'锁定'}提货单?`, '提示', { type: 'error' }).then(() => { |
|
|
|
|
|
|
|
// this.billAddData = item ? JSON.parse(JSON.stringify(item)) : {}; |
|
|
|
|
|
|
|
this.billAddData.deliveryStatus = e == 2 ? 'PLATENUM_LOCKED' : ''; |
|
|
|
|
|
|
|
console.log(this.billAddData,'this.billAddData') |
|
|
|
|
|
|
|
order.update(this.billAddData).then(res => { |
|
|
|
|
|
|
|
if (res.code == 20000) { |
|
|
|
|
|
|
|
this.billListMeth() |
|
|
|
|
|
|
|
this.$message.success(res.msg) |
|
|
|
|
|
|
|
this.dialogBillAdd = false; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
}) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
this.$emit('billOfLading', this.billData.orderInfo, 2) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//更新提货单数据 |
|
|
|
//更新提货单数据 |
|
|
|
billListMeth(){ |
|
|
|
billListMeth() { |
|
|
|
setTimeout(()=>{ |
|
|
|
setTimeout(() => { |
|
|
|
order.findDeliveryByOrderId(this.controlWindows.addInfo.id).then((res) => { |
|
|
|
order.findDeliveryByOrderId(this.controlWindows.addInfo.id).then((res) => { |
|
|
|
this.billData.list = res.data |
|
|
|
this.billData.list = res.data |
|
|
|
this.$forceUpdate() |
|
|
|
this.$forceUpdate() |
|
|
|
}); |
|
|
|
}); |
|
|
|
},200) |
|
|
|
}, 200) |
|
|
|
}, |
|
|
|
}, |
|
|
|
//删除提货单 |
|
|
|
//删除提货单 |
|
|
|
billDelete(e,index){ |
|
|
|
billDelete(e, index) { |
|
|
|
this.$confirm('确定删除提货单?', '提示', { type: 'error' }).then(() => { |
|
|
|
this.$confirm('确定删除提货单?', '提示', { type: 'error' }).then(() => { |
|
|
|
order.deleteBill({id:e.id}).then(res=>{ |
|
|
|
order.deleteBill({ id: e.id }).then(res => { |
|
|
|
if(res.code == 20000){ |
|
|
|
if (res.code == 20000) { |
|
|
|
this.$message.success(res.msg) |
|
|
|
this.$message.success(res.msg) |
|
|
|
this.dialogBillAdd = false; |
|
|
|
this.dialogBillAdd = false; |
|
|
|
this.billListMeth() |
|
|
|
this.billListMeth(); |
|
|
|
|
|
|
|
this.$emit('billOfLading', this.billData, 2) |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.$set(this.billData.list,index,'') |
|
|
|
this.$set(this.billData.list, index, '') |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
openDrawer() { |
|
|
|
openDrawer() { |
|
|
@ -339,18 +349,18 @@ export default { |
|
|
|
this.quantity += element.accDeliveryQuantity |
|
|
|
this.quantity += element.accDeliveryQuantity |
|
|
|
}); |
|
|
|
}); |
|
|
|
this.$confirm('确定下单?', '提示', { type: 'success' }).then(() => { |
|
|
|
this.$confirm('确定下单?', '提示', { type: 'success' }).then(() => { |
|
|
|
let data={ |
|
|
|
let data = { |
|
|
|
id:this.controlWindows.addInfo.id, |
|
|
|
id: this.controlWindows.addInfo.id, |
|
|
|
actQuantity:this.quantity, |
|
|
|
actQuantity: this.quantity, |
|
|
|
customerId:this.controlWindows.addInfo.customerId |
|
|
|
customerId: this.controlWindows.addInfo.customerId |
|
|
|
} |
|
|
|
} |
|
|
|
order.orderSuccess(data).then((res) => { |
|
|
|
order.orderSuccess(data).then((res) => { |
|
|
|
if (res.code === 20000) { |
|
|
|
if (res.code === 20000) { |
|
|
|
this.$message.success(res.msg); |
|
|
|
this.$message.success(res.msg); |
|
|
|
this.closeWindow(); |
|
|
|
this.closeWindow(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}) |
|
|
|
}) |
|
|
|
}, |
|
|
|
}, |
|
|
|
judgeInterface(form) { |
|
|
|
judgeInterface(form) { |
|
|
|
// let { id } = this.controlWindows.addInfo; |
|
|
|
// let { id } = this.controlWindows.addInfo; |
|
|
@ -371,6 +381,7 @@ export default { |
|
|
|
<style lang="scss" scoped> |
|
|
|
<style lang="scss" scoped> |
|
|
|
.create { |
|
|
|
.create { |
|
|
|
padding: 40px; |
|
|
|
padding: 40px; |
|
|
|
|
|
|
|
|
|
|
|
.el-input, |
|
|
|
.el-input, |
|
|
|
.el-select, |
|
|
|
.el-select, |
|
|
|
.el-textarea, |
|
|
|
.el-textarea, |
|
|
@ -378,6 +389,7 @@ export default { |
|
|
|
width: 300px; |
|
|
|
width: 300px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
.buttons { |
|
|
|
.buttons { |
|
|
|
background: #fff; |
|
|
|
background: #fff; |
|
|
|
position: absolute; |
|
|
|
position: absolute; |
|
|
@ -389,61 +401,78 @@ export default { |
|
|
|
line-height: 80px; |
|
|
|
line-height: 80px; |
|
|
|
text-align: right; |
|
|
|
text-align: right; |
|
|
|
border-top: 1px solid #f2f3f5; |
|
|
|
border-top: 1px solid #f2f3f5; |
|
|
|
|
|
|
|
|
|
|
|
.el-button { |
|
|
|
.el-button { |
|
|
|
text-align: right; |
|
|
|
text-align: right; |
|
|
|
font-size: 14px; |
|
|
|
font-size: 14px; |
|
|
|
border-radius: 5px; |
|
|
|
border-radius: 5px; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
.billTop{ |
|
|
|
|
|
|
|
|
|
|
|
.billTop { |
|
|
|
background: #f0f0f0; |
|
|
|
background: #f0f0f0; |
|
|
|
padding: 15px 35px; |
|
|
|
padding: 15px 35px; |
|
|
|
border-radius: 5px; |
|
|
|
border-radius: 5px; |
|
|
|
} |
|
|
|
} |
|
|
|
.billTop-top,.billBottom-title,.billBottom-body-top,.billBottom-body-bottom{ |
|
|
|
|
|
|
|
display: flex; |
|
|
|
.billTop-top, |
|
|
|
justify-content: space-between; |
|
|
|
.billBottom-title, |
|
|
|
|
|
|
|
.billBottom-body-top, |
|
|
|
|
|
|
|
.billBottom-body-bottom { |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
justify-content: space-between; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.billTop-top-left { |
|
|
|
|
|
|
|
display: flex; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
::v-deep .el-form-item { |
|
|
|
|
|
|
|
margin-bottom: 0 |
|
|
|
} |
|
|
|
} |
|
|
|
.billTop-top-left{ |
|
|
|
} |
|
|
|
display: flex; |
|
|
|
|
|
|
|
::v-deep .el-form-item{ |
|
|
|
.billBottom { |
|
|
|
margin-bottom:0 |
|
|
|
.billBottom-title { |
|
|
|
} |
|
|
|
align-items: center; |
|
|
|
|
|
|
|
margin: 20px 0; |
|
|
|
} |
|
|
|
} |
|
|
|
.billBottom{ |
|
|
|
} |
|
|
|
.billBottom-title{ |
|
|
|
|
|
|
|
align-items: center; |
|
|
|
.billBottom-body-middle { |
|
|
|
margin: 20px 0; |
|
|
|
::v-deep .el-form-item { |
|
|
|
} |
|
|
|
margin-bottom: 0 |
|
|
|
} |
|
|
|
} |
|
|
|
.billBottom-body-middle { |
|
|
|
|
|
|
|
::v-deep .el-form-item{ |
|
|
|
.billBottom-body-middle-info { |
|
|
|
margin-bottom:0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
.billBottom-body-middle-info{ |
|
|
|
|
|
|
|
display: flex; |
|
|
|
display: flex; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.billBottom-body { |
|
|
|
|
|
|
|
padding: 20px; |
|
|
|
|
|
|
|
box-shadow: 0 1px 4px rgba(0, 21, 41, .50); |
|
|
|
|
|
|
|
margin: 25px 0px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.billBottom-body-bottom { |
|
|
|
|
|
|
|
::v-deep .el-form-item { |
|
|
|
|
|
|
|
margin-bottom: 0 |
|
|
|
} |
|
|
|
} |
|
|
|
.billBottom-body{ |
|
|
|
|
|
|
|
padding: 20px; |
|
|
|
align-items: center; |
|
|
|
box-shadow: 0 1px 4px rgba(0,21,41,.50); |
|
|
|
margin-top: 20px; |
|
|
|
margin: 25px 0px; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
.billBottom-body-bottom{ |
|
|
|
::v-deep .el-drawer__header { |
|
|
|
::v-deep .el-form-item{ |
|
|
|
|
|
|
|
margin-bottom:0 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
align-items: center; |
|
|
|
|
|
|
|
margin-top: 20px; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
::v-deep .el-drawer__header{ |
|
|
|
|
|
|
|
display: none; |
|
|
|
display: none; |
|
|
|
} |
|
|
|
} |
|
|
|
::v-deep .billBottom .el-form-item__label{ |
|
|
|
|
|
|
|
|
|
|
|
::v-deep .billBottom .el-form-item__label { |
|
|
|
line-height: 20px; |
|
|
|
line-height: 20px; |
|
|
|
color: #999; |
|
|
|
color: #999; |
|
|
|
} |
|
|
|
} |
|
|
|
::v-deep .billBottom .el-form-item__content{ |
|
|
|
|
|
|
|
|
|
|
|
::v-deep .billBottom .el-form-item__content { |
|
|
|
line-height: 20px; |
|
|
|
line-height: 20px; |
|
|
|
} |
|
|
|
} |
|
|
|
</style> |
|
|
|
</style> |
|
|
|