|
|
|
@ -110,21 +110,21 @@
|
|
|
|
|
<div style="margin: 2%;background-color: #ffffff;padding: 20px;box-sizing: border-box;"> |
|
|
|
|
<el-form ref="form" :model="stockUpForm" label-width="100px" style="margin: 3px"> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="备货人员:" prop="forklift"> |
|
|
|
|
<el-select filterable v-model="stockUpForm.forklift" placeholder="请选择备货人员"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in this.forkliftData" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
:disabled="isDisable" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
<!-- {{this.forkliftData}}--> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<!-- <el-col :span="6">--> |
|
|
|
|
<!-- <el-form-item label="备货人员:" prop="forklift">--> |
|
|
|
|
<!-- <el-select filterable v-model="stockUpForm.forklift" placeholder="请选择备货人员">--> |
|
|
|
|
<!-- <el-option--> |
|
|
|
|
<!-- v-for="item in this.forkliftData"--> |
|
|
|
|
<!-- :key="item.dictKey"--> |
|
|
|
|
<!-- :label="item.dictValue"--> |
|
|
|
|
<!-- :value="item.dictKey"--> |
|
|
|
|
<!-- :disabled="isDisable"--> |
|
|
|
|
<!-- >--> |
|
|
|
|
<!-- </el-option>--> |
|
|
|
|
<!-- <!– {{this.forkliftData}}–>--> |
|
|
|
|
<!-- </el-select>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<!-- </el-col>--> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="装车班组:" prop="loader"> |
|
|
|
|
<el-select filterable v-model="stockUpForm.loader" placeholder="请选择装卸班组"> |
|
|
|
@ -167,58 +167,6 @@
|
|
|
|
|
<!-- </el-checkbox-group>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<!-- </el-col>--> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="配送类型:" prop="goodsAreaId"> |
|
|
|
|
<el-radio-group v-model="stockUpForm.deliveryType"> |
|
|
|
|
<el-radio :label="'2'" :value="'2'">市配 </el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="备货区域:" prop="goodsAreaId"> |
|
|
|
|
<el-select filterable v-model="stockUpForm.goodsAreaId" placeholder="请选择备货区域"> |
|
|
|
|
<el-option |
|
|
|
|
v-for="item in goodsAreaData" |
|
|
|
|
:key="item.dictKey" |
|
|
|
|
:label="item.dictValue" |
|
|
|
|
:value="item.dictKey" |
|
|
|
|
:disabled="isDisable" |
|
|
|
|
> |
|
|
|
|
</el-option> |
|
|
|
|
</el-select> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="备货时间:" prop="goodsShelfId"> |
|
|
|
|
<el-date-picker v-model="stockUpForm.stockupDate" |
|
|
|
|
type="datetime" |
|
|
|
|
placeholder="请选择备货时间" |
|
|
|
|
:disabled="isDisable" |
|
|
|
|
format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="出库时间:" prop="outboundDate" label-width="100px"> |
|
|
|
|
<!-- <el-date-picker v-model="form.taskTime"--> |
|
|
|
|
<!-- type="datetime"--> |
|
|
|
|
<!-- placeholder="请选择配车时间"--> |
|
|
|
|
<!-- value-format="YYYY-MM-DD HH:mm:ss"--> |
|
|
|
|
<!-- >--> |
|
|
|
|
<!-- </el-date-picker>--> |
|
|
|
|
<el-date-picker v-model="stockUpForm.outboundDate" |
|
|
|
|
type="datetime" |
|
|
|
|
placeholder="请选择配车时间" |
|
|
|
|
format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
value-format="YYYY-MM-DD HH:mm:ss" |
|
|
|
|
> |
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="配送时间:" prop="taskTime" label-width="100px"> |
|
|
|
|
<!-- <el-date-picker v-model="form.taskTime"--> |
|
|
|
@ -236,15 +184,68 @@
|
|
|
|
|
</el-date-picker> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<el-col :span="6"> |
|
|
|
|
<el-form-item label="配送类型:" prop="goodsAreaId"> |
|
|
|
|
<el-radio-group v-model="stockUpForm.deliveryType"> |
|
|
|
|
<el-radio :label="'2'" :value="'2'">市配 </el-radio> |
|
|
|
|
</el-radio-group> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
</el-row> |
|
|
|
|
<el-row> |
|
|
|
|
<!-- <el-col :span="6">--> |
|
|
|
|
<!-- <el-form-item label="备货区域:" prop="goodsAreaId">--> |
|
|
|
|
<!-- <el-select filterable v-model="stockUpForm.goodsAreaId" placeholder="请选择备货区域">--> |
|
|
|
|
<!-- <el-option--> |
|
|
|
|
<!-- v-for="item in goodsAreaData"--> |
|
|
|
|
<!-- :key="item.dictKey"--> |
|
|
|
|
<!-- :label="item.dictValue"--> |
|
|
|
|
<!-- :value="item.dictKey"--> |
|
|
|
|
<!-- :disabled="isDisable"--> |
|
|
|
|
<!-- >--> |
|
|
|
|
<!-- </el-option>--> |
|
|
|
|
<!-- </el-select>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<!-- </el-col>--> |
|
|
|
|
<!-- <el-col :span="6">--> |
|
|
|
|
<!-- <el-form-item label="备货时间:" prop="goodsShelfId">--> |
|
|
|
|
<!-- <el-date-picker v-model="stockUpForm.stockupDate"--> |
|
|
|
|
<!-- type="datetime"--> |
|
|
|
|
<!-- placeholder="请选择备货时间"--> |
|
|
|
|
<!-- :disabled="isDisable"--> |
|
|
|
|
<!-- format="YYYY-MM-DD HH:mm:ss"--> |
|
|
|
|
<!-- value-format="YYYY-MM-DD HH:mm:ss"--> |
|
|
|
|
<!-- >--> |
|
|
|
|
<!-- </el-date-picker>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<!-- </el-col>--> |
|
|
|
|
<!-- <el-col :span="6">--> |
|
|
|
|
<!-- <el-form-item label="出库时间:" prop="outboundDate" label-width="100px">--> |
|
|
|
|
<!-- <!– <el-date-picker v-model="form.taskTime"–>--> |
|
|
|
|
<!-- <!– type="datetime"–>--> |
|
|
|
|
<!-- <!– placeholder="请选择配车时间"–>--> |
|
|
|
|
<!-- <!– value-format="YYYY-MM-DD HH:mm:ss"–>--> |
|
|
|
|
<!-- <!– >–>--> |
|
|
|
|
<!-- <!– </el-date-picker>–>--> |
|
|
|
|
<!-- <el-date-picker v-model="stockUpForm.outboundDate"--> |
|
|
|
|
<!-- type="datetime"--> |
|
|
|
|
<!-- placeholder="请选择配车时间"--> |
|
|
|
|
<!-- format="YYYY-MM-DD HH:mm:ss"--> |
|
|
|
|
<!-- value-format="YYYY-MM-DD HH:mm:ss"--> |
|
|
|
|
<!-- >--> |
|
|
|
|
<!-- </el-date-picker>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<!-- </el-col>--> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-row> |
|
|
|
|
|
|
|
|
|
<el-row> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="其他费用:" prop="collectFee" label-width="100px"> |
|
|
|
|
<el-input v-model="stockUpForm.otherFee" placeholder="请输入其他费用"/> |
|
|
|
|
</el-form-item> |
|
|
|
|
</el-col> |
|
|
|
|
<!-- <el-col :span="12">--> |
|
|
|
|
<!-- <el-form-item label="其他费用:" prop="collectFee" label-width="100px">--> |
|
|
|
|
<!-- <el-input v-model="stockUpForm.otherFee" placeholder="请输入其他费用"/>--> |
|
|
|
|
<!-- </el-form-item>--> |
|
|
|
|
<!-- </el-col>--> |
|
|
|
|
<el-col :span="12"> |
|
|
|
|
<el-form-item label="备注:" prop="remarks"> |
|
|
|
|
<el-input type="textarea" :rows="1" placeholder="请输入内容" v-model="stockUpForm.remarks"> |
|
|
|
@ -968,19 +969,17 @@
|
|
|
|
|
data.masterDriverName = this.driverForm.masterDriverName; |
|
|
|
|
data.masterVehicleNub = this.driverForm.masterVehicleNub; |
|
|
|
|
} |
|
|
|
|
if (this.waixieForm.tripartiteSource) { |
|
|
|
|
tripartite = this.waixieForm; |
|
|
|
|
data.tripartite = tripartite; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log("---------->tripartite",tripartite); |
|
|
|
|
|
|
|
|
|
if (this.stockUpForm) { |
|
|
|
|
let params = this.stockUpForm; |
|
|
|
|
if (params.tripartiteSource) { |
|
|
|
|
let params = this.waixieForm; |
|
|
|
|
//三方配送数据构建 |
|
|
|
|
if (params.driverName) { |
|
|
|
|
tripartite.driverName = params.driverName; |
|
|
|
|
} |
|
|
|
|
if (params.deiverPhone) { |
|
|
|
|
tripartite.deiverPhone = params.deiverPhone; |
|
|
|
|
if (params.driverPhone) { |
|
|
|
|
tripartite.driverPhone = params.driverPhone; |
|
|
|
|
} |
|
|
|
|
if (params.vehicleNum) { |
|
|
|
|
tripartite.vehicleNum = params.vehicleNum; |
|
|
|
@ -990,65 +989,82 @@
|
|
|
|
|
} |
|
|
|
|
if (params.tripartiteSource) { |
|
|
|
|
this.tripartiteSourceData.forEach(item => { |
|
|
|
|
if (params.tripartiteSource === item.dictValue) { |
|
|
|
|
if (this.waixieForm.tripartiteSource == item.dictKey) { |
|
|
|
|
tripartite.distributionCompanyId = item.dictKey; |
|
|
|
|
tripartite.distributionCompany = item.dictValue; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
data.tripartite = tripartite; |
|
|
|
|
} |
|
|
|
|
data.tripartite = tripartite; |
|
|
|
|
} else { |
|
|
|
|
// if (params.tripartiteSource) { |
|
|
|
|
// this.tripartiteSourceData.forEach(item => { |
|
|
|
|
// if (params.tripartiteSource === item.dictKey) { |
|
|
|
|
// tripartite.distributionCompanyId = item.dictKey; |
|
|
|
|
// tripartite.distributionCompany = item.dictValue; |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// console.log(":-----------> data.tripartite", data.tripartite); |
|
|
|
|
// 自主配送 |
|
|
|
|
if (params.loader) { |
|
|
|
|
console.log("------------->this.stockUpForm.loader",this.stockUpForm.loader); |
|
|
|
|
if (this.stockUpForm.loader) { |
|
|
|
|
this.loaderData.forEach(a => { |
|
|
|
|
if (params.loader === a.dictKey) { |
|
|
|
|
if (this.stockUpForm.loader === a.dictKey) { |
|
|
|
|
stockup.loaderName = a.dictValue; |
|
|
|
|
stockup.loaderId = a.dictKey; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (params.unloader) { |
|
|
|
|
if (params.taskTime) { |
|
|
|
|
stockup.taskTime = params.taskTime; |
|
|
|
|
} |
|
|
|
|
if (this.stockUpForm.unloader) { |
|
|
|
|
this.loaderData.forEach(a => { |
|
|
|
|
if (params.loader === a.dictKey) { |
|
|
|
|
if (this.stockUpForm.loader === a.dictKey) { |
|
|
|
|
stockup.unloaderName = a.dictValue; |
|
|
|
|
stockup.unloaderId = a.dictKey; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (params.forklift) { |
|
|
|
|
this.forkliftData.forEach(b => { |
|
|
|
|
if (params.forklift === b.dictKey) { |
|
|
|
|
stockup.forkliftName = b.dictValue; |
|
|
|
|
stockup.forkliftId = b.dictKey; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (params.goodsAreaId) { |
|
|
|
|
this.goodsAreaData.forEach(c => { |
|
|
|
|
if (params.goodsAreaId === c.dictKey) { |
|
|
|
|
stockup.goodsAreaId = c.dictKey; |
|
|
|
|
stockup.goodsAreaName = c.dictValue; |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
if (params.stockupDate) { |
|
|
|
|
stockup.stockupDate = params.stockupDate; |
|
|
|
|
} |
|
|
|
|
if (params.remarks) { |
|
|
|
|
data.remarks = params.remarks; |
|
|
|
|
console.log("------------->stockup",stockup); |
|
|
|
|
|
|
|
|
|
// if (params.forklift) { |
|
|
|
|
// this.forkliftData.forEach(b => { |
|
|
|
|
// if (params.forklift === b.dictKey) { |
|
|
|
|
// stockup.forkliftName = b.dictValue; |
|
|
|
|
// stockup.forkliftId = b.dictKey; |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// if (params.goodsAreaId) { |
|
|
|
|
// this.goodsAreaData.forEach(c => { |
|
|
|
|
// if (params.goodsAreaId === c.dictKey) { |
|
|
|
|
// stockup.goodsAreaId = c.dictKey; |
|
|
|
|
// stockup.goodsAreaName = c.dictValue; |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// if (params.stockupDate) { |
|
|
|
|
// stockup.stockupDate = params.stockupDate; |
|
|
|
|
// } |
|
|
|
|
if (this.stockUpForm.remarks) { |
|
|
|
|
data.remarks = this.stockUpForm.remarks; |
|
|
|
|
} |
|
|
|
|
// if (this.loadAndUnload.length > 0) { |
|
|
|
|
// stockup.loadAndUnload = this.loadAndUnload.join(','); |
|
|
|
|
// } |
|
|
|
|
if (params.outboundDate) { |
|
|
|
|
stockup.outboundDate = params.outboundDate.toString(); |
|
|
|
|
// if (params.outboundDate) { |
|
|
|
|
// stockup.outboundDate = params.outboundDate.toString(); |
|
|
|
|
// } |
|
|
|
|
if (stockup){ |
|
|
|
|
data.stockup = stockup; |
|
|
|
|
} |
|
|
|
|
data.stockup = stockup; |
|
|
|
|
} |
|
|
|
|
if (this.stockUpForm.taskTime) { |
|
|
|
|
data.taskTime = this.stockUpForm.taskTime.toString(); |
|
|
|
|
} |
|
|
|
|
if (this.stockUpForm.taskTime){ |
|
|
|
|
data.taskTime = this.stockUpForm.taskTime; |
|
|
|
|
} |
|
|
|
|
// if (this.stockUpForm.taskTime) { |
|
|
|
|
// data.taskTime = this.stockUpForm.taskTime.toString(); |
|
|
|
|
// } |
|
|
|
|
} |
|
|
|
|
console.log('this.data------------>', this.data); |
|
|
|
|
if (!this.deliveryListId) { |
|
|
|
@ -1060,6 +1076,7 @@
|
|
|
|
|
}); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
console.log('>>>>>>>>>>>>', data); |
|
|
|
|
deliveryTask(data).then((res) => { |
|
|
|
|
this.$router.push({ |
|
|
|
@ -1071,11 +1088,37 @@
|
|
|
|
|
let updateDate = {}; |
|
|
|
|
updateDate.reservationInfos = this.reservationData; |
|
|
|
|
updateDate.id = this.deliveryListId; |
|
|
|
|
updateDate.stockupInfo = stockup; |
|
|
|
|
updateDate.remarks = data.remarks; |
|
|
|
|
console.log("-------->stockup",stockup); |
|
|
|
|
if (stockup.unloaderId){ |
|
|
|
|
updateDate.unloadingTeamId = stockup.unloaderId; |
|
|
|
|
updateDate.unloadingTeamName = stockup.unloaderName; |
|
|
|
|
} |
|
|
|
|
if (stockup.loaderId){ |
|
|
|
|
updateDate.loadingTeamId = stockup.loaderId; |
|
|
|
|
updateDate.loadingTeamName = stockup.loaderName; |
|
|
|
|
} |
|
|
|
|
if (stockup.taskTime){ |
|
|
|
|
updateDate.taskTime = stockup.taskTime; |
|
|
|
|
} |
|
|
|
|
// updateDate.stockupInfo = stockup; |
|
|
|
|
console.log("------------>this.tripartite",tripartite); |
|
|
|
|
|
|
|
|
|
if (tripartite){ |
|
|
|
|
updateDate.tripartite= tripartite; |
|
|
|
|
} |
|
|
|
|
// if (tripartite){ |
|
|
|
|
// updateDate.tripartite.distributionCompanyId = tripartite.distributionCompanyId; |
|
|
|
|
// updateDate.tripartite.distributionCompany = tripartite.distributionCompany; |
|
|
|
|
// } |
|
|
|
|
console.log("---------------->data",data.remarks); |
|
|
|
|
updateDate.remarks = this.stockUpForm.remarks; |
|
|
|
|
updateDate.taskTime = this.stockUpForm.taskTime; |
|
|
|
|
updateDate.otherFee = this.stockUpForm.otherFee; |
|
|
|
|
console.log("------------>this.waixieForm",this.waixieForm); |
|
|
|
|
console.log('->>>>>>>', this.waixieForm.tripartiteSource); |
|
|
|
|
if (this.waixieForm.tripartiteSource) { |
|
|
|
|
updateDate.tripartite = data.tripartite; |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
updateDate.allocationInfo = data.allocationInfo; |
|
|
|
|
updateDate.masterDriverName = data.masterDriverName; |
|
|
|
@ -1233,6 +1276,8 @@
|
|
|
|
|
this.driverForm.driverPhone = ''; |
|
|
|
|
this.driverForm.vehicleNum = ''; |
|
|
|
|
this.driverForm.deliveryFee = ''; |
|
|
|
|
this.waixieForm = {}; |
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
|
// this.loadAndUnload = []; |
|
|
|
|
this.serveType = []; |
|
|
|
@ -1244,7 +1289,7 @@
|
|
|
|
|
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'); |
|
|
|
|
this.stockUpForm.taskTime = dayjs().format('YYYY-MM-DD'); |
|
|
|
|
this.stockUpForm.outboundDate = dayjs().format('YYYY-MM-DD HH:mm:ss'); |
|
|
|
|
}, |
|
|
|
|
ddd() { |
|
|
|
@ -1303,13 +1348,14 @@
|
|
|
|
|
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.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.loadingTeamId; |
|
|
|
|
this.stockUpForm.unloader = deliveryData.unloadingTeamId; |
|
|
|
|
this.stockUpForm.taskTime = deliveryData.taskTime; |
|
|
|
|
this.stockUpForm.stockupDate = deliveryData.stockupInfo.stockupDate; |
|
|
|
|
// this.stockUpForm.stockupDate = deliveryData.stockupInfo.stockupDate; |
|
|
|
|
this.stockUpForm.remarks = deliveryData.remarks; |
|
|
|
|
// if (deliveryData.stockupInfo.teamResponsibility) { |
|
|
|
|
// this.loadAndUnload = deliveryData.stockupInfo.teamResponsibility.split(','); |
|
|
|
|