|
|
|
@ -1,12 +1,6 @@ |
|
|
|
|
<template> |
|
|
|
|
<el-drawer |
|
|
|
|
direction="ltr" |
|
|
|
|
size="40%" |
|
|
|
|
:visible="controlWindows.bill" |
|
|
|
|
@opened="openDrawer" |
|
|
|
|
:before-close="closeWindow" |
|
|
|
|
:show-close = false |
|
|
|
|
> |
|
|
|
|
<el-drawer direction="ltr" size="40%" :visible="controlWindows.bill" @opened="openDrawer" :before-close="closeWindow" |
|
|
|
|
:show-close=false> |
|
|
|
|
<div class="create" v-if="controlWindows.bill"> |
|
|
|
|
<el-form label-width="100px"> |
|
|
|
|
<div class="billTop"> |
|
|
|
@ -19,7 +13,8 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</div> |
|
|
|
|
<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> |
|
|
|
|
</div> |
|
|
|
|
<div> |
|
|
|
@ -60,7 +55,8 @@ |
|
|
|
|
<el-form-item label="提货单"> |
|
|
|
|
<span>{{ item.id }}</span> |
|
|
|
|
</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 class="billBottom-body-middle"> |
|
|
|
|
<div class="billBottom-body-middle-info"> |
|
|
|
@ -83,7 +79,8 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</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> |
|
|
|
|
<el-form-item label="创建时间"> |
|
|
|
@ -94,8 +91,13 @@ |
|
|
|
|
</el-form-item> |
|
|
|
|
</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 :effect="orderTagType(item.deliveryStatus).effect" :disabled="item.deliveryStatus!=='SUBMITED'" @click="billAddSave(2,item)" :type="orderTagType(item.deliveryStatus).type1">{{orderTagType(item.deliveryStatus).info}}</el-button> |
|
|
|
|
<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> |
|
|
|
@ -107,10 +109,11 @@ |
|
|
|
|
<el-button @click="controlWindows.bill = false">取消 </el-button> |
|
|
|
|
<!-- <el-button @click="submit">订单确认</el-button> --> |
|
|
|
|
</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-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 label="提货人" prop="driverName"> |
|
|
|
|
<el-input v-model="billAddData.driverName"></el-input> |
|
|
|
@ -129,12 +132,8 @@ |
|
|
|
|
<!-- <el-button v-show="billTitle" type="primary" @click="billAddSave(2)">修改并锁定</el-button> --> |
|
|
|
|
</div> |
|
|
|
|
</el-dialog> |
|
|
|
|
<el-dialog |
|
|
|
|
destroy-on-close |
|
|
|
|
title="提示" |
|
|
|
|
:close-on-click-modal="false" :append-to-body="true" |
|
|
|
|
:visible.sync="dialogDelivery" |
|
|
|
|
width="30%"> |
|
|
|
|
<el-dialog destroy-on-close title="提示" :close-on-click-modal="false" :append-to-body="true" |
|
|
|
|
:visible.sync="dialogDelivery" width="30%"> |
|
|
|
|
<el-form v-if="dialogDelivery"> |
|
|
|
|
<el-form-item label="实际提货量" prop="plateNumber"> |
|
|
|
|
<el-input v-model="deliveryQuantity"></el-input> |
|
|
|
@ -230,7 +229,8 @@ export default { |
|
|
|
|
this.$message.success(res.msg) |
|
|
|
|
this.dialogDelivery = false |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
this.$emit('billOfLading', this.billData, 2) |
|
|
|
|
}, |
|
|
|
|
billSubmit(e, index) { |
|
|
|
|
if (e.deliveryStatus == 'PLATENUM_SUCCESS') { |
|
|
|
@ -247,7 +247,9 @@ export default { |
|
|
|
|
this.billListMeth() |
|
|
|
|
// this.$set(this.billData.list,index,this.billAddData) |
|
|
|
|
this.$message.success(res.msg) |
|
|
|
|
this.dialogBillAdd = false |
|
|
|
|
this.dialogBillAdd = false; |
|
|
|
|
this.$emit('billOfLading', this.billData, 2) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
@ -261,6 +263,7 @@ export default { |
|
|
|
|
case 'DELIVERING': return { orderLabel: '提货中', label: '提货中', type: '', orderType: 'info' } |
|
|
|
|
case 'COMPLETE': return { orderLabel: '订单完成', label: '提货完成', info: '提货完成', type: 'success', type1: 'info', orderType: 'success' } |
|
|
|
|
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' } |
|
|
|
|
}, |
|
|
|
@ -284,22 +287,27 @@ export default { |
|
|
|
|
this.billData.list.push(this.billAddData) |
|
|
|
|
this.billListMeth() |
|
|
|
|
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':'' |
|
|
|
|
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.dialogBillAdd = false; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}) |
|
|
|
|
} |
|
|
|
|
this.$emit('billOfLading', this.billData.orderInfo, 2) |
|
|
|
|
}, |
|
|
|
|
//更新提货单数据 |
|
|
|
|
billListMeth() { |
|
|
|
@ -317,7 +325,9 @@ export default { |
|
|
|
|
if (res.code == 20000) { |
|
|
|
|
this.$message.success(res.msg) |
|
|
|
|
this.dialogBillAdd = false; |
|
|
|
|
this.billListMeth() |
|
|
|
|
this.billListMeth(); |
|
|
|
|
this.$emit('billOfLading', this.billData, 2) |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
this.$set(this.billData.list, index, '') |
|
|
|
@ -371,6 +381,7 @@ export default { |
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.create { |
|
|
|
|
padding: 40px; |
|
|
|
|
|
|
|
|
|
.el-input, |
|
|
|
|
.el-select, |
|
|
|
|
.el-textarea, |
|
|
|
@ -378,6 +389,7 @@ export default { |
|
|
|
|
width: 300px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.buttons { |
|
|
|
|
background: #fff; |
|
|
|
|
position: absolute; |
|
|
|
@ -389,60 +401,77 @@ export default { |
|
|
|
|
line-height: 80px; |
|
|
|
|
text-align: right; |
|
|
|
|
border-top: 1px solid #f2f3f5; |
|
|
|
|
|
|
|
|
|
.el-button { |
|
|
|
|
text-align: right; |
|
|
|
|
font-size: 14px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.billTop { |
|
|
|
|
background: #f0f0f0; |
|
|
|
|
padding: 15px 35px; |
|
|
|
|
border-radius: 5px; |
|
|
|
|
} |
|
|
|
|
.billTop-top,.billBottom-title,.billBottom-body-top,.billBottom-body-bottom{ |
|
|
|
|
|
|
|
|
|
.billTop-top, |
|
|
|
|
.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 |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.billBottom { |
|
|
|
|
.billBottom-title { |
|
|
|
|
align-items: center; |
|
|
|
|
margin: 20px 0; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.billBottom-body-middle { |
|
|
|
|
::v-deep .el-form-item { |
|
|
|
|
margin-bottom: 0 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.billBottom-body-middle-info { |
|
|
|
|
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 |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
align-items: center; |
|
|
|
|
margin-top: 20px; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
::v-deep .el-drawer__header { |
|
|
|
|
display: none; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
::v-deep .billBottom .el-form-item__label { |
|
|
|
|
line-height: 20px; |
|
|
|
|
color: #999; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
::v-deep .billBottom .el-form-item__content { |
|
|
|
|
line-height: 20px; |
|
|
|
|
} |
|
|
|
|