|
|
|
@ -177,7 +177,8 @@
|
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="备货时间:" prop="goodsShelfId"> |
|
|
|
|
<el-date-picker v-model="stockUpForm.stockupDate" type="datetime" placeholder="请选择备货时间" :disabled="isDisable"> |
|
|
|
|
<el-date-picker v-model="stockUpForm.stockupDate" type="datetime" placeholder="请选择备货时间" |
|
|
|
|
:disabled="isDisable"> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
@ -243,6 +244,13 @@
|
|
|
|
|
:key="index"> |
|
|
|
|
</el-table-column> |
|
|
|
|
</template> |
|
|
|
|
<el-table-column prop="menu" label="操作" :width="220" align="center" v-if="isoperation"> |
|
|
|
|
<template #="{row}"> |
|
|
|
|
<el-button type="primary" link icon="el-icon-edit" @click="removeStockArticle(row)">移除 |
|
|
|
|
</el-button> |
|
|
|
|
|
|
|
|
|
</template> |
|
|
|
|
</el-table-column> |
|
|
|
|
<!-- 操作栏模块 --> |
|
|
|
|
</el-table> |
|
|
|
|
</el-row> |
|
|
|
@ -457,6 +465,7 @@
|
|
|
|
|
}, |
|
|
|
|
isInitialized: false, |
|
|
|
|
isUpdate: false, |
|
|
|
|
isoperation: false |
|
|
|
|
}; |
|
|
|
|
}, |
|
|
|
|
watch: { |
|
|
|
@ -546,9 +555,9 @@
|
|
|
|
|
//查询班组 |
|
|
|
|
async getTeam() { |
|
|
|
|
let params = this.deptId; |
|
|
|
|
console.log("%%%%%%%%%",params); |
|
|
|
|
console.log('%%%%%%%%%', params); |
|
|
|
|
getListTeamInfo(params).then(res => { |
|
|
|
|
console.log("aaaaaaaaa",res.data.data); |
|
|
|
|
console.log('aaaaaaaaa', res.data.data); |
|
|
|
|
let fo = []; |
|
|
|
|
res.data.data.forEach(i => { |
|
|
|
|
let a = { |
|
|
|
@ -563,9 +572,9 @@
|
|
|
|
|
//备货区 |
|
|
|
|
async getStorageArea() { |
|
|
|
|
let params = this.deptId; |
|
|
|
|
console.log("^^^^^^^^^^^^^",params); |
|
|
|
|
console.log('^^^^^^^^^^^^^', params); |
|
|
|
|
stockUpInfo(params).then(res => { |
|
|
|
|
console.log("=========================》",res); |
|
|
|
|
console.log('=========================》', res); |
|
|
|
|
let fo = []; |
|
|
|
|
res.data.data.forEach(i => { |
|
|
|
|
let v = { |
|
|
|
@ -582,20 +591,20 @@
|
|
|
|
|
return new Promise((rv, rev) => { |
|
|
|
|
getDriverList(1, 10, '').then(res => { |
|
|
|
|
this.driverData = res.data.data.records; |
|
|
|
|
console.log("===============>",res.data.data); |
|
|
|
|
rv(res.data.data.records) |
|
|
|
|
console.log('===============>', res.data.data); |
|
|
|
|
rv(res.data.data.records); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
selectionChange(list) { |
|
|
|
|
//只要这个触发就认定为该包件进行了重新勾选,不论数据是否发生变化 |
|
|
|
|
this.selectionList = list; |
|
|
|
|
console.log(" this.selectionList = list", this.selectionList); |
|
|
|
|
console.log(' this.selectionList = list', this.selectionList); |
|
|
|
|
this.orderData.forEach(item => { |
|
|
|
|
if (item.id === this.obj.id) { |
|
|
|
|
item.isUpdate = true; |
|
|
|
|
} |
|
|
|
|
}) |
|
|
|
|
}); |
|
|
|
|
//这里就为当前选择的订单进行包件信息的添加 |
|
|
|
|
// this.obj. |
|
|
|
|
}, |
|
|
|
@ -609,15 +618,15 @@
|
|
|
|
|
return new Promise((rv, rev) => { |
|
|
|
|
getVehicleList(1, 10, '').then(res => { |
|
|
|
|
this.vehicleData = res.data.data.records; |
|
|
|
|
console.log("^^^^^^^^^^^^^^^^",res.data.data); |
|
|
|
|
rv(res.data.data.records) |
|
|
|
|
console.log('^^^^^^^^^^^^^^^^', res.data.data); |
|
|
|
|
rv(res.data.data.records); |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
}) |
|
|
|
|
}, |
|
|
|
|
fetchData() { |
|
|
|
|
this.error = this.post = null; |
|
|
|
|
this.loading = true; |
|
|
|
|
console.log("this.$route.query",this.$route.query); |
|
|
|
|
console.log('this.$route.query', this.$route.query); |
|
|
|
|
if (this.$route.query.id) { |
|
|
|
|
this.reservationIds = this.$route.query.id; |
|
|
|
|
} |
|
|
|
@ -626,6 +635,17 @@
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
removeStockArticle(row){ |
|
|
|
|
if (this.data.length===1){ |
|
|
|
|
this.$message({ |
|
|
|
|
message: '无法进行预约任务取消!!!', |
|
|
|
|
type: 'warning' |
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log("row------------->",row); |
|
|
|
|
}, |
|
|
|
|
viewDriverInfo() { |
|
|
|
|
console.log(this.driverInfo.length); |
|
|
|
|
console.log(this.vehticleInfo.length); |
|
|
|
@ -751,15 +771,22 @@
|
|
|
|
|
data.taskTime = this.form.taskTime; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
console.log('this.data------------>', this.data); |
|
|
|
|
if (!this.deliveryListId) { |
|
|
|
|
data.reservationIds = this.reservationIds; |
|
|
|
|
console.log("this.data------------>",this.data); |
|
|
|
|
console.log(">>>>>>>>>>>>",data); |
|
|
|
|
console.log('>>>>>>>>>>>>', data); |
|
|
|
|
deliveryTask(data).then((res) => { |
|
|
|
|
this.$router.push({ |
|
|
|
|
path: '/distribution/deliverylist/distributionDeliveryListmar', |
|
|
|
|
name: '配送市配列表' |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
} else { |
|
|
|
|
data.reservationInfos =this.data ; |
|
|
|
|
console.log('>>>>>>>>>>>>', data); |
|
|
|
|
|
|
|
|
|
console.log('-------------》', '修改提交'); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
changeVehicle(params) { |
|
|
|
|
console.log(params); |
|
|
|
@ -814,7 +841,7 @@
|
|
|
|
|
} else { |
|
|
|
|
this.$message({ |
|
|
|
|
message: '已经是第一条,上移失败', |
|
|
|
|
type: 'warning', |
|
|
|
|
type: 'warning' |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
console.log(this.vehticleInfo); |
|
|
|
@ -889,8 +916,8 @@
|
|
|
|
|
} |
|
|
|
|
this.aaa = true; |
|
|
|
|
this.bbb = false; |
|
|
|
|
this.stockUpForm.deliveryType="2"; |
|
|
|
|
this.stockUpForm.deliveryWay="2"; |
|
|
|
|
this.stockUpForm.deliveryType = '2'; |
|
|
|
|
this.stockUpForm.deliveryWay = '2'; |
|
|
|
|
this.stockUpForm.stockupDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
|
this.form.taskTime = dayjs().format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
|
this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
@ -909,8 +936,8 @@
|
|
|
|
|
} |
|
|
|
|
this.aaa = false; |
|
|
|
|
this.bbb = true; |
|
|
|
|
this.stockUpForm.deliveryType="2"; |
|
|
|
|
this.stockUpForm.deliveryWay="2"; |
|
|
|
|
this.stockUpForm.deliveryType = '2'; |
|
|
|
|
this.stockUpForm.deliveryWay = '2'; |
|
|
|
|
this.form.taskTime = dayjs().format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
|
this.stockUpForm.stockupDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
|
this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
@ -921,20 +948,20 @@
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
onLoad(page, params = {}) { |
|
|
|
|
|
|
|
|
|
//初始化页面数据 |
|
|
|
|
this.stockUpForm.deliveryType="2"; |
|
|
|
|
this.stockUpForm.deliveryWay="2"; |
|
|
|
|
this.stockUpForm.deliveryType = '2'; |
|
|
|
|
this.stockUpForm.deliveryWay = '2'; |
|
|
|
|
this.stockUpForm.stockupDate = new Date(); |
|
|
|
|
this.form.taskTime = new Date(); |
|
|
|
|
this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
|
this.stockUpForm.otherFee = 0; |
|
|
|
|
this.loadAndUnload = ["1","2"] ; |
|
|
|
|
this.loadAndUnload = ['1', '2']; |
|
|
|
|
if (this.reservationIds) { |
|
|
|
|
console.log("》》》》》》》》》》》》》》》",this.reservationIds); |
|
|
|
|
this.isoperation = false; |
|
|
|
|
console.log('》》》》》》》》》》》》》》》', this.reservationIds); |
|
|
|
|
let ids = this.reservationIds; |
|
|
|
|
getReservationAddr(ids).then(res => { |
|
|
|
|
console.log("------------->",res); |
|
|
|
|
console.log('------------->', res); |
|
|
|
|
const reservationData = res.data.data; |
|
|
|
|
this.page.total = reservationData.total; |
|
|
|
|
this.data = reservationData.records; |
|
|
|
@ -943,16 +970,68 @@
|
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (this.deliveryListId) { |
|
|
|
|
console.log("<<<<<<<<<<",this.deliveryListId); |
|
|
|
|
this.isoperation = true; |
|
|
|
|
console.log('<<<<<<<<<<', this.deliveryListId); |
|
|
|
|
|
|
|
|
|
//市配计划编辑回显 |
|
|
|
|
getMarketDeliveryList(this.deliveryListId).then(res=>{ |
|
|
|
|
console.log(res.data.data); |
|
|
|
|
}) |
|
|
|
|
getMarketDeliveryList(this.deliveryListId).then(async res => { |
|
|
|
|
console.log('--------------->', res.data.data); |
|
|
|
|
const deliveryData = res.data.data; |
|
|
|
|
this.stockUpForm.outboundDate = deliveryData.stockupInfo.outboundDate; |
|
|
|
|
this.stockUpForm.taskTime = deliveryData.stockupInfo.taskTime; |
|
|
|
|
this.stockUpForm.goodsAreaId = deliveryData.stockupInfo.goodsAreaId; |
|
|
|
|
this.stockUpForm.forklift = deliveryData.stockupInfo.forkliftId; |
|
|
|
|
this.stockUpForm.loader = deliveryData.stockupInfo.loaderId; |
|
|
|
|
this.stockUpForm.taskTime = deliveryData.taskTime; |
|
|
|
|
console.log('reservationInfo--------------->', res.data.data.reservationInfo); |
|
|
|
|
this.data = res.data.data.reservationInfos; |
|
|
|
|
if (deliveryData.kind === '1') { |
|
|
|
|
//自主配送 |
|
|
|
|
let self = deliveryData.deliverySelfVO; |
|
|
|
|
let vehicle = await this.getvehicleData(); |
|
|
|
|
console.log('___________________-->', vehicle); |
|
|
|
|
let driver = await this.getMasterDriverData(); |
|
|
|
|
let a = []; |
|
|
|
|
let b = []; |
|
|
|
|
let vehicleInfo = []; |
|
|
|
|
vehicle.forEach(item => { |
|
|
|
|
self.forEach(s => { |
|
|
|
|
if (item.id === s.vehicleId) { |
|
|
|
|
a.push(s.vehicleId); |
|
|
|
|
vehicleInfo.push(item); |
|
|
|
|
} |
|
|
|
|
if (s.isMaster === 2) { |
|
|
|
|
this.driverForm.masterVehicleNub = s.vehicleNub; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
this.vehticleList = a; |
|
|
|
|
this.vehicleIds = a; |
|
|
|
|
console.log(' this.vehicleIds', this.vehicleIds); |
|
|
|
|
this.vehticleInfo = vehicleInfo; |
|
|
|
|
let driverInfo = []; |
|
|
|
|
driver.forEach(item => { |
|
|
|
|
self.forEach(s => { |
|
|
|
|
if (item.id === s.driverId) { |
|
|
|
|
b.push(s.driverId); |
|
|
|
|
driverInfo.push(item); |
|
|
|
|
} |
|
|
|
|
if (s.isMaster === 2) { |
|
|
|
|
this.driverForm.masterDriverName = s.driverName; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
this.deliveryDriver = b; |
|
|
|
|
this.driverList = b; |
|
|
|
|
this.driverInfo = driverInfo; |
|
|
|
|
} else { |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
this.loading = false; |
|
|
|
|
}, |
|
|
|
|
}, |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
@ -973,14 +1052,17 @@
|
|
|
|
|
border-bottom: 4px solid #ffffff; |
|
|
|
|
// background-color: #ffffff; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.check { |
|
|
|
|
color: #D3832A; |
|
|
|
|
border-bottom: 4px solid #D3832A; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.minaxbox { |
|
|
|
|
display: flex; |
|
|
|
|
flex-direction: column; |
|
|
|
|
|
|
|
|
|
.tophed { |
|
|
|
|
display: flex; |
|
|
|
|
flex-wrap: wrap; |
|
|
|
|