|
@@ -18,7 +18,7 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<orderDetails ref="order" :waybillData="waybillData"></orderDetails>
|
|
<orderDetails ref="order" :waybillData="waybillData"></orderDetails>
|
|
- <el-dialog title="派单" :visible.sync="sendDialogVisible" width="800px" :close-on-click-modal="false"
|
|
|
|
|
|
+ <el-dialog title="分配订单" :visible.sync="sendDialogVisible" width="800px" :close-on-click-modal="false"
|
|
@close="closeDialog">
|
|
@close="closeDialog">
|
|
<forms ref="sendRules" :formNewList="sendRuleList" :ruleForm="sendRuleForm" :formIceTracing="true"
|
|
<forms ref="sendRules" :formNewList="sendRuleList" :ruleForm="sendRuleForm" :formIceTracing="true"
|
|
:iceTracing="true" :iceBank="true" labelWidth="80px" @handleScroll="handleScroll" @remoteMethod="remoteMethod"
|
|
:iceTracing="true" :iceBank="true" labelWidth="80px" @handleScroll="handleScroll" @remoteMethod="remoteMethod"
|
|
@@ -35,7 +35,9 @@
|
|
|
|
|
|
<script>
|
|
<script>
|
|
import {
|
|
import {
|
|
- getWaybill
|
|
|
|
|
|
+ getWaybill,
|
|
|
|
+ waybillDelivery,
|
|
|
|
+ putUpdateStatus
|
|
} from '@/api/waybill'
|
|
} from '@/api/waybill'
|
|
import {
|
|
import {
|
|
getCoolerBox,
|
|
getCoolerBox,
|
|
@@ -50,12 +52,12 @@
|
|
import {
|
|
import {
|
|
employee,
|
|
employee,
|
|
sendList
|
|
sendList
|
|
- } from "./uncertain.js";
|
|
|
|
|
|
+ } from "./delivered.js";
|
|
import {
|
|
import {
|
|
getUser
|
|
getUser
|
|
} from '@/api/user'
|
|
} from '@/api/user'
|
|
import {
|
|
import {
|
|
- WaybillStatus
|
|
|
|
|
|
+ allocationState
|
|
} from '@/assets/js/blockSort'
|
|
} from '@/assets/js/blockSort'
|
|
export default {
|
|
export default {
|
|
name: 'OrderManagement',
|
|
name: 'OrderManagement',
|
|
@@ -71,7 +73,7 @@
|
|
return {
|
|
return {
|
|
operateList: [{
|
|
operateList: [{
|
|
type: 'sends',
|
|
type: 'sends',
|
|
- title: '批量派单',
|
|
|
|
|
|
+ title: '批量分配',
|
|
colour: 'success'
|
|
colour: 'success'
|
|
}],
|
|
}],
|
|
formList: [{
|
|
formList: [{
|
|
@@ -104,7 +106,7 @@
|
|
label: '分配状态',
|
|
label: '分配状态',
|
|
field: 'status',
|
|
field: 'status',
|
|
placeholder: '请选择分配状态',
|
|
placeholder: '请选择分配状态',
|
|
- options: WaybillStatus(),
|
|
|
|
|
|
+ options: allocationState(),
|
|
}],
|
|
}],
|
|
searchRuleForm: {
|
|
searchRuleForm: {
|
|
orderNo: '',
|
|
orderNo: '',
|
|
@@ -144,8 +146,12 @@
|
|
sendDialogVisible: false,
|
|
sendDialogVisible: false,
|
|
sendRuleList: sendList(),
|
|
sendRuleList: sendList(),
|
|
sendRuleForm: {
|
|
sendRuleForm: {
|
|
- code: [],
|
|
|
|
|
|
+ fileList: [],
|
|
|
|
+ deliveryId: null,
|
|
coolerBoxId: null,
|
|
coolerBoxId: null,
|
|
|
|
+ code: [],
|
|
|
|
+ tamperProofLabelImg: '',
|
|
|
|
+ tamperProofLabel: '',
|
|
},
|
|
},
|
|
sendConfirmLoading: false,
|
|
sendConfirmLoading: false,
|
|
page: 1,
|
|
page: 1,
|
|
@@ -153,6 +159,7 @@
|
|
limitNo: true,
|
|
limitNo: true,
|
|
sendOrdersId: 2,
|
|
sendOrdersId: 2,
|
|
waybillIdList: [],
|
|
waybillIdList: [],
|
|
|
|
+ orderId: null,
|
|
waybillData: {},
|
|
waybillData: {},
|
|
srcList: [],
|
|
srcList: [],
|
|
fileList: [{
|
|
fileList: [{
|
|
@@ -188,6 +195,7 @@
|
|
// 获取运单列表
|
|
// 获取运单列表
|
|
getList() {
|
|
getList() {
|
|
var params = {
|
|
var params = {
|
|
|
|
+ status: 3,
|
|
page: this.Pagination.PageIndex,
|
|
page: this.Pagination.PageIndex,
|
|
pageSize: this.Pagination.PageSize,
|
|
pageSize: this.Pagination.PageSize,
|
|
...this.searchValue
|
|
...this.searchValue
|
|
@@ -210,6 +218,50 @@
|
|
// console.log(type, 87)
|
|
// console.log(type, 87)
|
|
this.operationType = type
|
|
this.operationType = type
|
|
if (type == 'sends') {
|
|
if (type == 'sends') {
|
|
|
|
+ const arrID = this.$refs.refWaybill.waybillIds
|
|
|
|
+ let arrList = []
|
|
|
|
+ arrID.forEach(item => {
|
|
|
|
+ arrList.push(item.id)
|
|
|
|
+ })
|
|
|
|
+ this.waybillIdList = arrList
|
|
|
|
+ if (arrList.length != 0) {
|
|
|
|
+ this.sendDialogVisible = true
|
|
|
|
+ var arr = await this.getUserList()
|
|
|
|
+ this.sendRuleList.forEach(item => {
|
|
|
|
+ if (item.field == 'reCheckId') {
|
|
|
|
+ item.options = arr
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.sendRuleList.forEach(item => {
|
|
|
|
+ if (item.field == 'deliveryId') {
|
|
|
|
+ item.options = arr
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ this.getIncubator(2)
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '请先选择需要批量操作的订单',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ async buttonData(row, type) {
|
|
|
|
+ this.operationType = type
|
|
|
|
+ this.orderId = row.id
|
|
|
|
+ if (type == 'logs') {
|
|
|
|
+ this.$refs.order.staffDialogVisible = true
|
|
|
|
+ this.waybillData = row
|
|
|
|
+ this.waybillData.coolerBoxName = row.coolerBox.name
|
|
|
|
+ this.waybillData.courierName = row.delivery.nickName
|
|
|
|
+ this.waybillData.courierPhone = row.delivery.phone
|
|
|
|
+ this.waybillData.reCheckName = row.reCheck.nickName
|
|
|
|
+ this.waybillData.reCheckPhone = row.reCheck.phone
|
|
|
|
+ } else if (type == 'send') {
|
|
|
|
+ const urls = this.fileList.map(obj => obj.url)
|
|
|
|
+ this.srcList = urls
|
|
|
|
+ this.$refs.picture.prescriptionVisible = true
|
|
|
|
+ } else if (type == 'sign') {
|
|
this.sendDialogVisible = true
|
|
this.sendDialogVisible = true
|
|
var arr = await this.getUserList()
|
|
var arr = await this.getUserList()
|
|
this.sendRuleList.forEach(item => {
|
|
this.sendRuleList.forEach(item => {
|
|
@@ -223,17 +275,27 @@
|
|
}
|
|
}
|
|
})
|
|
})
|
|
this.getIncubator(2)
|
|
this.getIncubator(2)
|
|
- }
|
|
|
|
- },
|
|
|
|
- buttonData(row, type) {
|
|
|
|
- this.operationType = type
|
|
|
|
- if (type == 'logs') {
|
|
|
|
- this.$refs.order.staffDialogVisible = true
|
|
|
|
- this.waybillData = row
|
|
|
|
- } else if (type == 'send') {
|
|
|
|
- const urls = this.fileList.map(obj => obj.url)
|
|
|
|
- this.srcList = urls
|
|
|
|
- this.$refs.picture.prescriptionVisible = true
|
|
|
|
|
|
+ } else if (type == 'delOrder') {
|
|
|
|
+ this.$confirm('此操作将永久删除该订单, 是否继续?', '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ let arrOrderId = []
|
|
|
|
+ arrOrderId.push(row.id)
|
|
|
|
+ putUpdateStatus({
|
|
|
|
+ id: arrOrderId,
|
|
|
|
+ status: 8,
|
|
|
|
+ }).then(res => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: '操作成功',
|
|
|
|
+ type: 'success'
|
|
|
|
+ });
|
|
|
|
+ this.getList()
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }).catch(() => {})
|
|
}
|
|
}
|
|
},
|
|
},
|
|
// 触底事件
|
|
// 触底事件
|
|
@@ -272,22 +334,30 @@
|
|
this.limitNo = true
|
|
this.limitNo = true
|
|
this.staffName = ''
|
|
this.staffName = ''
|
|
},
|
|
},
|
|
- // 运单派单
|
|
|
|
|
|
+ // 运单分配
|
|
sendHandleAdd() {
|
|
sendHandleAdd() {
|
|
let flag = this.$refs['sendRules'].validateForm();
|
|
let flag = this.$refs['sendRules'].validateForm();
|
|
if (flag) {
|
|
if (flag) {
|
|
this.sendConfirmLoading = true
|
|
this.sendConfirmLoading = true
|
|
let arrID = []
|
|
let arrID = []
|
|
- if (this.operationType == 'send') {
|
|
|
|
|
|
+ if (this.operationType == 'sign') {
|
|
arrID.push(this.orderId)
|
|
arrID.push(this.orderId)
|
|
} else if (this.operationType == 'sends') {
|
|
} else if (this.operationType == 'sends') {
|
|
arrID = this.waybillIdList
|
|
arrID = this.waybillIdList
|
|
}
|
|
}
|
|
const param = {
|
|
const param = {
|
|
waybillIds: arrID,
|
|
waybillIds: arrID,
|
|
|
|
+ deliveryId: Number(this.sendRuleForm.deliveryId),
|
|
coolerBoxId: Number(this.sendRuleForm.coolerBoxId),
|
|
coolerBoxId: Number(this.sendRuleForm.coolerBoxId),
|
|
iceRaftCode: this.sendRuleForm.code,
|
|
iceRaftCode: this.sendRuleForm.code,
|
|
|
|
+ tamperProofLabel: this.sendRuleForm.tamperProofLabel,
|
|
|
|
+ tamperProofLabelImg: this.sendRuleForm.tamperProofLabelImg,
|
|
|
|
+ }
|
|
|
|
+ if (this.sendRuleForm.fileList) {
|
|
|
|
+ var fileImage = this.picture(this.sendRuleForm.fileList)
|
|
|
|
+ param.tamperProofLabelImg = fileImage
|
|
}
|
|
}
|
|
|
|
+ console.log(param, 25)
|
|
waybillDelivery(param).then(res => {
|
|
waybillDelivery(param).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -315,6 +385,15 @@
|
|
this.$message.error('表单信息不完整,请继续填写完整');
|
|
this.$message.error('表单信息不完整,请继续填写完整');
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ picture(arr) {
|
|
|
|
+ var imgList = JSON.parse(JSON.stringify(arr))
|
|
|
|
+ var imgArr = []
|
|
|
|
+ imgList.forEach((item, index) => {
|
|
|
|
+ imgArr.push(item.url)
|
|
|
|
+ })
|
|
|
|
+ var imgString = imgArr.join()
|
|
|
|
+ return imgString
|
|
|
|
+ },
|
|
// 获取保温箱列表
|
|
// 获取保温箱列表
|
|
getIncubator(type) {
|
|
getIncubator(type) {
|
|
let arrList = []
|
|
let arrList = []
|