|
@@ -15,28 +15,18 @@
|
|
|
</pagination>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="80%" :close-on-click-modal="false"
|
|
|
+ <el-dialog :title="staffTitle" :visible.sync="staffDialogVisible" width="800px" :close-on-click-modal="false"
|
|
|
@close="closePopup">
|
|
|
- <div class="card_waybill">
|
|
|
- <div class="waybill_item" style="margin-right: 10px;">
|
|
|
- <waybillForm ref="sender" title="寄件人" :conserveFlag="conserveFlag" thinTitle="寄件人簿" :ruleForm="senderForm"
|
|
|
- @addressBook="getAddressBook('sender')" @conserveSelect="conserveSelect">
|
|
|
- </waybillForm>
|
|
|
- </div>
|
|
|
- <div class="waybill_item" style="margin-left: 10px;">
|
|
|
- <waybillForm ref="deliverer" title="配送人" :ruleForm="delivererForm" :deliverer="true"
|
|
|
- @addressBook="getDelivererBook('deliverer')"></waybillForm>
|
|
|
- </div>
|
|
|
- <div class="waybill_item" style="margin-left: 10px;">
|
|
|
- <waybillForm ref="recipients" title="收件人" :conserveFlag="conserveFlag" thinTitle="收件人簿"
|
|
|
- :ruleForm="recipientsForm" @addressBook="getAddressBook('recipients')" @conserveSelect="conserveSelectil">
|
|
|
- </waybillForm>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div style="margin-top: 20px;">
|
|
|
- <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="80px">
|
|
|
- </forms>
|
|
|
+ <forms ref="userRules" :formNewList="personnelList" :ruleForm="personnelForm" labelWidth="80px"
|
|
|
+ @remoteMethod="remoteSearch">
|
|
|
+ </forms>
|
|
|
+ <div class="waybill_item">
|
|
|
+ <waybillForm ref="recipients" title="收件人" :conserveFlag="conserveFlag" thinTitle="收件人簿"
|
|
|
+ :ruleForm="recipientsForm" @addressBook="getAddressBook('recipients')" @conserveSelect="conserveSelectil">
|
|
|
+ </waybillForm>
|
|
|
</div>
|
|
|
+ <forms ref="childRules" :formNewList="formRuleList" :ruleForm="ruleForm" labelWidth="80px">
|
|
|
+ </forms>
|
|
|
<el-dialog width="60%" title="地址簿" :visible.sync="innerVisible" append-to-body>
|
|
|
<div class="space_between_in" style="margin-bottom: 15px;">
|
|
|
<div style="display: flex;align-items: center;width: 100%;">
|
|
@@ -137,15 +127,14 @@
|
|
|
addressBook,
|
|
|
sendList,
|
|
|
signList,
|
|
|
- addressDeliverer
|
|
|
+ consignmentList
|
|
|
} from "./waybill.js";
|
|
|
import {
|
|
|
WaybillStatus
|
|
|
} from '@/assets/js/blockSort'
|
|
|
import {
|
|
|
- regionData,
|
|
|
- CodeToText
|
|
|
- } from 'element-china-area-data'
|
|
|
+ number
|
|
|
+ } from 'echarts'
|
|
|
export default {
|
|
|
name: 'WaybillManagement',
|
|
|
components: {
|
|
@@ -193,6 +182,7 @@
|
|
|
status: null,
|
|
|
time: [],
|
|
|
},
|
|
|
+ searchValue: {},
|
|
|
Pagination: {
|
|
|
PageIndex: 1,
|
|
|
PageSize: 10,
|
|
@@ -225,6 +215,12 @@
|
|
|
name: '',
|
|
|
phone: '',
|
|
|
},
|
|
|
+ personnelList: consignmentList(),
|
|
|
+ personnelForm: {
|
|
|
+ reCheckId: null,
|
|
|
+ deliveryId: null,
|
|
|
+ },
|
|
|
+ delivererName: '',
|
|
|
ruleForm: {
|
|
|
tamperProofLabel: '',
|
|
|
tamperProofLabelImg: '',
|
|
@@ -250,7 +246,6 @@
|
|
|
staffName: '',
|
|
|
limitNo: true,
|
|
|
sendOrdersId: 2,
|
|
|
- searchValue: {},
|
|
|
signDialogVisible: false,
|
|
|
signRuleList: signList(),
|
|
|
signRuleForm: {
|
|
@@ -273,6 +268,8 @@
|
|
|
mounted() {
|
|
|
const dataList = formRules();
|
|
|
this.formRuleList = dataList;
|
|
|
+ this.getReviewerList()
|
|
|
+ this.getDelivererList()
|
|
|
this.getList()
|
|
|
},
|
|
|
methods: {
|
|
@@ -297,6 +294,9 @@
|
|
|
getWaybill(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.tableData = res.data.list
|
|
|
+ this.tableData.forEach(item => {
|
|
|
+ item.visible = false
|
|
|
+ })
|
|
|
this.Total = res.data.count
|
|
|
}
|
|
|
})
|
|
@@ -328,24 +328,82 @@
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ // 复核人
|
|
|
+ getReviewerList() {
|
|
|
+ var params = {
|
|
|
+ page: 1,
|
|
|
+ pageSize: 999,
|
|
|
+ name: this.delivererName,
|
|
|
+ }
|
|
|
+ getUser(params).then(res => {
|
|
|
+ if (res.code == 200) {
|
|
|
+ let arr = res.data.list
|
|
|
+ let arrList = []
|
|
|
+ arr.forEach(item1 => {
|
|
|
+ var arrData = {
|
|
|
+ label: null,
|
|
|
+ value: null,
|
|
|
+ }
|
|
|
+ arrData.label = item1.nickName
|
|
|
+ arrData.value = item1.id
|
|
|
+ arrList.push(arrData)
|
|
|
+ })
|
|
|
+ this.personnelList.forEach(item => {
|
|
|
+ if (item.field == 'reCheckId') {
|
|
|
+ item.options = item.options.concat(arrList)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ remoteSearch(value, type) {
|
|
|
+ this.delivererName = value
|
|
|
+ if (type == 'deliveryId') {
|
|
|
+ this.personnelList.forEach(item => {
|
|
|
+ if (item.field == 'deliveryId') {
|
|
|
+ item.options = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.getDelivererList()
|
|
|
+ } else if (type == 'reCheckId') {
|
|
|
+ this.personnelList.forEach(item => {
|
|
|
+ if (item.field == 'reCheckId') {
|
|
|
+ item.options = []
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.getReviewerList()
|
|
|
+ }
|
|
|
+ },
|
|
|
// 获取配送人
|
|
|
getDelivererBook(type) {
|
|
|
- this.innerVisible = true
|
|
|
this.bookType = type
|
|
|
- this.bookTableList = addressDeliverer()
|
|
|
this.getDelivererList()
|
|
|
},
|
|
|
getDelivererList() {
|
|
|
var params = {
|
|
|
- page: this.bookPagination.PageIndex,
|
|
|
- pageSize: this.bookPagination.PageSize,
|
|
|
+ page: 1,
|
|
|
+ pageSize: 999,
|
|
|
type: 3,
|
|
|
- name: this.bookInput,
|
|
|
+ name: this.delivererName,
|
|
|
}
|
|
|
getUser(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
- this.bookTableData = res.data.list
|
|
|
- this.bookTotal = res.data.count
|
|
|
+ let arr = res.data.list
|
|
|
+ let arrList = []
|
|
|
+ arr.forEach(item1 => {
|
|
|
+ var arrData = {
|
|
|
+ label: null,
|
|
|
+ value: null,
|
|
|
+ }
|
|
|
+ arrData.label = item1.nickName
|
|
|
+ arrData.value = item1.id
|
|
|
+ arrList.push(arrData)
|
|
|
+ })
|
|
|
+ this.personnelList.forEach(item => {
|
|
|
+ if (item.field == 'deliveryId') {
|
|
|
+ item.options = item.options.concat(arrList)
|
|
|
+ }
|
|
|
+ })
|
|
|
}
|
|
|
})
|
|
|
},
|
|
@@ -366,22 +424,23 @@
|
|
|
},
|
|
|
// 弹窗表单添加
|
|
|
async handleAdd() {
|
|
|
- let senderFlag = this.$refs['sender'].validateForm();
|
|
|
+ let senderFlag = this.$refs['userRules'].validateForm();
|
|
|
let recipientsFlag = this.$refs['recipients'].validateForm();
|
|
|
- let flag = this.$refs['deliverer'].validateForm();
|
|
|
- if (senderFlag && recipientsFlag && flag) {
|
|
|
+ if (senderFlag && recipientsFlag) {
|
|
|
this.confirmLoading = true
|
|
|
var params = {
|
|
|
- senderAddressName: this.senderForm.name,
|
|
|
- senderAddressPhone: this.senderForm.phone,
|
|
|
- senderAddressDetails: this.senderForm.address,
|
|
|
+ // senderAddressName: this.senderForm.name,
|
|
|
+ // senderAddressPhone: this.senderForm.phone,
|
|
|
+ // senderAddressDetails: this.senderForm.address,
|
|
|
consigneeAddressName: this.recipientsForm.name,
|
|
|
consigneeAddressPhone: this.recipientsForm.phone,
|
|
|
consigneeAddressDetails: this.recipientsForm.address,
|
|
|
- deliveryName: this.delivererForm.name,
|
|
|
- deliveryPhone: this.delivererForm.phone,
|
|
|
- saveSenderAddress: this.saveSenderAddress,
|
|
|
+ // deliveryName: this.delivererForm.name,
|
|
|
+ // deliveryPhone: this.delivererForm.phone,
|
|
|
+ // saveSenderAddress: this.saveSenderAddress,
|
|
|
saveConsigneeAddress: this.saveConsigneeAddress,
|
|
|
+ deliveryId: Number(this.personnelForm.deliveryId),
|
|
|
+ reCheckId: Number(this.personnelForm.reCheckId),
|
|
|
...this.ruleForm
|
|
|
}
|
|
|
if (this.ruleForm.fileList) {
|
|
@@ -389,6 +448,7 @@
|
|
|
params.tamperProofLabelImg = fileImage
|
|
|
}
|
|
|
if (this.operationType == 'add') {
|
|
|
+ delete params.fileList
|
|
|
await addWaybill(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
|
this.$message({
|
|
@@ -403,6 +463,7 @@
|
|
|
this.confirmLoading = false
|
|
|
})
|
|
|
} else if (this.operationType == 'edit') {
|
|
|
+ delete params.fileList
|
|
|
params.id = this.orderId
|
|
|
await putWaybill(params).then(res => {
|
|
|
if (res.code == 200) {
|
|
@@ -526,15 +587,17 @@
|
|
|
this.staffDialogVisible = true
|
|
|
setTimeout(() => {
|
|
|
this.$nextTick(() => {
|
|
|
- this.senderForm.name = row.senderAddressName
|
|
|
- this.senderForm.phone = row.senderAddressPhone
|
|
|
- this.senderForm.address = row.senderAddressDetails
|
|
|
+ // this.senderForm.name = row.senderAddressName
|
|
|
+ // this.senderForm.phone = row.senderAddressPhone
|
|
|
+ // this.senderForm.address = row.senderAddressDetails
|
|
|
this.recipientsForm.name = row.consigneeAddressName
|
|
|
this.recipientsForm.phone = row.consigneeAddressPhone
|
|
|
this.recipientsForm.address = row.consigneeAddressDetails
|
|
|
- this.delivererForm.name = row.deliveryName
|
|
|
- this.delivererForm.phone = row.deliveryPhone
|
|
|
+ // this.delivererForm.name = row.deliveryName
|
|
|
+ // this.delivererForm.phone = row.deliveryPhone
|
|
|
this.ruleForm.tamperProofLabel = row.tamperProofLabel
|
|
|
+ this.personnelForm.reCheckId = String(row.reCheckId)
|
|
|
+ this.personnelForm.deliveryId = String(row.deliveryId)
|
|
|
if (row.tamperProofLabelImg) {
|
|
|
var arr = row.tamperProofLabelImg.split(',')
|
|
|
var arr3 = []
|
|
@@ -719,7 +782,7 @@
|
|
|
this.staffTitle = '添加运单'
|
|
|
this.staffDialogVisible = true
|
|
|
this.$nextTick(() => {
|
|
|
- this.$refs.sender.radio = '1'
|
|
|
+ // this.$refs.sender.radio = '1'
|
|
|
this.$refs.recipients.radio = '1'
|
|
|
})
|
|
|
} else if (type == 'sends') {
|
|
@@ -874,18 +937,31 @@
|
|
|
// 关闭清空表单
|
|
|
closePopup() {
|
|
|
this.ruleForm.fileList = []
|
|
|
- this.$refs.sender.resetForm()
|
|
|
+ // this.$refs.sender.resetForm()
|
|
|
this.$refs.recipients.resetForm()
|
|
|
- this.$refs.deliverer.resetForm()
|
|
|
+ // this.$refs.deliverer.resetForm()
|
|
|
this.$refs.childRules.resetCheck()
|
|
|
+ this.$refs.userRules.resetCheck()
|
|
|
+ this.personnelList.forEach(item => {
|
|
|
+ item.options = []
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
+ ::v-deep .el-dialog {
|
|
|
+ margin: 0 auto !important;
|
|
|
+ margin-top: 7vh !important;
|
|
|
+ }
|
|
|
+
|
|
|
+ .waybill_home ::v-deep .el-dialog__header {
|
|
|
+ border-bottom: 1px solid #E4E7ED;
|
|
|
+ }
|
|
|
+
|
|
|
.waybill_home ::v-deep .el-dialog__body {
|
|
|
- padding: 0px 20px 30px 20px;
|
|
|
+ padding: 10px 20px 30px 20px;
|
|
|
}
|
|
|
|
|
|
.waybil_form ::v-deep .el-cascader {
|
|
@@ -894,11 +970,12 @@
|
|
|
|
|
|
.card_waybill {
|
|
|
display: flex;
|
|
|
+ flex-direction: column;
|
|
|
border-bottom: 1px solid #E4E7ED;
|
|
|
}
|
|
|
|
|
|
.waybill_item {
|
|
|
- width: 50%;
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
|
|
|
.card_book_list {
|