Browse Source

司机自动带出车次号,日期

master
马远东 1 year ago
parent
commit
252759f151
  1. 109
      src/views/aftersales/aftersalesWorkOrderAdd.vue

109
src/views/aftersales/aftersalesWorkOrderAdd.vue

@ -135,26 +135,6 @@
<el-input v-model="Indexform.orderCode" placeholder="请输入订单自编号" clearable />
</el-form-item> -->
<el-form-item
label="车次号"
v-if="
groundlineSet ||
groundlineType == 1 ||
groundlineType == 3 ||
groundlineType == 4 ||
groundlineType == 8 ||
groundlineType == 5 ||
groundlineType == 7 ||
groundlineType == 8
"
>
<el-input
v-model="Indexform.trainNumber"
placeholder="请输入车次号(干线卸车环节)"
clearable
@change="DeliveryTrainnumber"
/>
</el-form-item>
<!-- 必填 -->
<el-form-item
@ -175,6 +155,7 @@
default-first-option
:reserve-keyword="false"
placeholder="请输入配送司机"
@change="changeDeliveryDriver"
>
<el-option
v-for="item in DeliveryDriver"
@ -186,6 +167,28 @@
</el-form-item>
<!-- 必填 -->
<el-form-item
label="车次号"
v-if="
groundlineSet ||
groundlineType == 1 ||
groundlineType == 3 ||
groundlineType == 4 ||
groundlineType == 8 ||
groundlineType == 5 ||
groundlineType == 7 ||
groundlineType == 8
"
>
<el-input
v-model="Indexform.trainNumber"
placeholder="请输入车次号(干线卸车环节)"
clearable
/>
<!-- @change="DeliveryTrainnumber" -->
</el-form-item>
<el-form-item
label="配送时间"
v-if="
@ -684,7 +687,7 @@ const ResponsiblePartychange = (val, index) => {
});
};
const onLoad = () => {
DeliveryTrainnumber();//
DeliveryTrainnumber(); //
console.log($route.query.id, '页面初始化');
routerState.value = $route.query.routerState;
updateDictionary(IndexException.value, 'pc_work_order'); //
@ -722,26 +725,25 @@ const DiscoveringNodesChange = val => {
};
//
function DeliveryTrainnumber () {
let data = {
trainNumber: Indexform.value.trainNumber,
};
$_shippingInformation(data).then(res => {
// DeliveryDriver;
// Indexform.deliveryDriver;
console.log(res, '查询返回值');
DeliveryDriver.value = res.data.data.records;//
//
if(res.data.data.records.length ==1){
Indexform.value.deliveryTime = res.data.data.records[0].taskTime; //
Indexform.value.deliveryDriver = res.data.data.records[0].id; //
}
});
};
function DeliveryTrainnumber() {
let data = {
trainNumber: Indexform.value.trainNumber,
};
data.current = 1; //
data.size = 999; //
$_shippingInformation(data).then(res => {
// DeliveryDriver;
// Indexform.deliveryDriver;
console.log(res, '查询返回值');
DeliveryDriver.value = res.data.data.records; //
//
if (res.data.data.records.length == 1) {
Indexform.value.deliveryTime = res.data.data.records[0].taskTime; //
Indexform.value.deliveryDriver = res.data.data.records[0].id; //
}
});
}
//
const handleRemove = (uploadFile, uploadFiles) => {
@ -802,7 +804,6 @@ const CompanyProportionInput = () => {
const ConfirmForm = () => {
//
console.log(Indexform.value.businessMame, '提货责任方');
let DataSubmit = {
personResponsibleDTO: [],
@ -831,13 +832,15 @@ const ConfirmForm = () => {
}
console.log(DataSubmit['decreaseImageEntityList'], '处理好的图片');
//
//
if (Indexform.value.deliveryDriver) {
console.log(DeliveryDriver.value,'当前全部司机');
console.log(Indexform.value.deliveryDriver,'选择的司机信息');
Indexform.value.deliveryDriver = DeliveryDriver.value.find( item => item.id == Indexform.value.deliveryDriver).driverName;
console.log(DeliveryDriver.value, '当前全部司机');
console.log(Indexform.value.deliveryDriver, '选择的司机信息');
Indexform.value.deliveryDriver = DeliveryDriver.value.find(
item => item.id == Indexform.value.deliveryDriver
).driverName;
}
console.log(Indexform.value.deliveryDriver,'筛选出来的司机');
console.log(Indexform.value.deliveryDriver, '筛选出来的司机');
let processorEntityList = [];
@ -1005,7 +1008,13 @@ const ConfirmForm = () => {
}
});
};
//
const changeDeliveryDriver=(val)=>{
console.log(val);
console.log(DeliveryDriver.value,'司机信息');
Indexform.value.trainNumber= DeliveryDriver.value.find(res=>res.id==val).trainNumber;//
Indexform.value.deliveryTime= DeliveryDriver.value.find(res=>res.id==val).taskTime;//
}
//
const ShortageTtems = val => {
ShortageList.value = []; //
@ -1102,8 +1111,8 @@ const Statistics = () => {
//
const ChangePackageInfo = (val, index) => {
if(!val){
return
if (!val) {
return;
//
}
PackageInfo.value[index].orderCode = ''; //

Loading…
Cancel
Save