Browse Source

商配订单编辑按钮功能

dev-warehouse
kilo 2 years ago
parent
commit
ee582b870f
  1. 17
      src/api/distribution/distributionDeliveryList.js
  2. 19
      src/router/views/index.js
  3. 15
      src/views/distribution/deliverylist/distributionDeliveryList.vue
  4. 1
      src/views/distribution/deliverylist/distributionDeliveryListedt.vue
  5. 1
      src/views/distribution/reservation/reservationFrom.vue
  6. 64
      src/views/distribution/turndelivery/deliveryDiscuss.vue
  7. 48
      src/views/distribution/turndelivery/deliveryInfo.vue

17
src/api/distribution/distributionDeliveryList.js

@ -122,3 +122,20 @@ export const update = (row) => {
})
}
/**
* 查询配送任务信息
* @param id
* @returns {AxiosPromise}
*/
export const getDeliveryList = (id) => {
return request({
url: '/api/logpm-distribution/deliveryList/getDeliveryList',
method: 'get',
params: {
id,
}
})
}

19
src/router/views/index.js

@ -548,6 +548,25 @@ export default [
},
],
},
{
path: '/distribution/turndelivery/deliveryDiscuss',
component: Layout,
redirect: '/distribution/turndelivery/deliveryDiscuss',
children: [
{
path: '/distribution/turndelivery/deliveryDiscuss',
name: '配送查看',
meta: {
i18n: 'dict',
},
props: route => ({
name: route.query.name,
id: route.query.id
}),
component: () => import('@/views/turndelivery/deliverylist/deliveryDiscuss.vue'),
},
],
},
{
path: '/basicdata/brand/basicdataTripartiteMall',
component: Layout,

15
src/views/distribution/deliverylist/distributionDeliveryList.vue

@ -51,6 +51,7 @@
>
<template #default="slotProps">
<el-button size="small" @click="editsolt(slotProps.scope)"> </el-button>
<el-button size="small" @click="handleEdit(slotProps.scope)"> </el-button>
<el-button size="small" @click="costadd(slotProps.scope)"> </el-button>
</template>
</tablecmt>
@ -104,7 +105,6 @@
v-model="dialogVisible"
title="增值服务"
width="30%"
:model="addvalue"
:before-close="handleClose">
<el-form-item label="增值服务" prop="freightMark">
<el-checkbox-group v-model="form.addvalueType" @change="handleCheckedCitiesChange">
@ -710,11 +710,14 @@ export default {
this.form = {}
this.box = true
},
handleEdit (row) {
this.title = '编辑'
this.box = true
getDetail(row.id).then(res => {
this.form = res.data.data;
handleEdit (scope) {
const { row} = scope;
this.$router.push({
path: '/distribution/turndelivery/deliveryDiscuss',
query: {
id: row.id,
name: row.trainNumber +'-编辑配送'
}
});
},
handleView (row) {

1
src/views/distribution/deliverylist/distributionDeliveryListedt.vue

@ -96,6 +96,7 @@
<el-table-column prop="menu" label="操作" :width="220" align="center">
<template #="{row}">
<el-button type="primary" text icon="el-icon-view" @click="handleView(row)"> </el-button>
<el-button size="small" @click="handleEdit(slotProps.scope)"> </el-button>
<el-button type="primary" text icon="el-icon-view" @click="handleOne(row)" v-if="deliverydata.deliveryNumber > deliverydata.deliveryNumber"> </el-button>
<el-button type="primary" text icon="el-icon-view" @click="handleSign(row)" v-if="row.signingStatus=='未签收' "> </el-button>
</template>

1
src/views/distribution/reservation/reservationFrom.vue

@ -1030,7 +1030,6 @@
this.form.deliveryPhone = phone;
this.form.deliveryType = typeService;
this.form.deliveryAddress = address;
this.orderData = data;
});
}

64
src/views/distribution/turndelivery/deliveryDiscuss.vue

@ -691,6 +691,7 @@
import { getDriverList } from '@/api/basicdata/basicdataDriverArtery';
import { selectStockArticleList } from '@/api/distribution/distributionStockArticle';
import { getInventoryList } from '@/api/distribution/distributionStockList';
import { getDeliveryList } from '@/api/distribution/distributionDeliveryList';
export default {
data() {
@ -786,11 +787,22 @@
serveType:[],
//
tripartiteSourceData:[],
deliveryListId:'',
};
},
created() {
this.$watch(
() => this.$route.params,
() => {
this.fetchData();
},
//
// data observed
{ immediate: true }
);
this.getDictionary();
this.getFork();
this.getTeam();
@ -892,6 +904,13 @@
console.log(res.data.data);
});
},
fetchData() {
this.error = this.post = null;
this.loading = true;
if (this.$route.query.id) {
this.deliveryListId = this.$route.query.id;
}
},
viewDriverInfo() {
console.log(this.driverInfo.length);
console.log(this.vehticleInfo.length);
@ -1273,7 +1292,52 @@
// this.$refs.table.clearSelection();
},
onLoad(page, params = {}) {
console.log("》》》》》》》》》》》》》》》",this.deliveryListId);
if (this.deliveryListId){
getDeliveryList(this.deliveryListId).then(res=>{
let data = res.data.data;
Object.assign(this.form,data.reservationInfo)
Object.assign(this.form,data.stockupInfo)
this.form.deliveryType = '2';
this.serveType = data.reservationInfo.serveType.split(",");
if (data.stockupInfo){
this.loadAndUnload = data.stockupInfo.teamResponsibility.split(",");
}
this.form.loader = data.stockupInfo.loaderName;
this.form.forklift = data.stockupInfo.forkliftName;
this.form.remarks = data.stockupInfo.remarks;
if (data.kind === "1"){
//
let self = data.deliverySelfVO;
let vehicle = this.vehicleData;
console.log("___________________vahicle",vahicle);
vehicle.forEach(item=>{
console.log("___________________",item);
self.forEach(s=>{
})
})
}else {
this.aaa = false;
this.bbb = true;
//
}
this.vehicleData.forEach(item=>{
})
console.log(">>>>>>>>this.form",this.form);
console.log(res.data.data);
this.orderData = data.stockArticleList;
})
}
this.loading = false;
}
}

48
src/views/distribution/turndelivery/deliveryInfo.vue

@ -476,6 +476,7 @@
{ immediate: true }
);
this.getDictionary();
this.getFork();
this.getTeam();
@ -756,6 +757,8 @@
const params = this.form;
let stockup = {};
let tripartite = {};
let data = {};
let allocationInfo = [];
//
if (params.loader) {
@ -765,26 +768,41 @@
stockup.loaderId = a.dictKey;
}
});
data.stockup = stockup;
}
if (params.forklift){
this.forkliftData.forEach(b => {
if (params.forklift === b.dictKey) {
stockup.forkliftName = b.dictValue;
stockup.forkliftId = b.dictKey;
}
});
data.stockup = stockup;
}
if (params.goodsAreaId){
this.goodsAreaData.forEach(c => {
if (params.goodsAreaId === c.dictKey) {
stockup.goodsAreaId = c.dictKey;
stockup.goodsAreaName = c.dictValue;
}
});
data.stockup = stockup;
}
this.forkliftData.forEach(b => {
if (params.forklift === b.dictKey) {
stockup.forkliftName = b.dictValue;
stockup.forkliftId = b.dictKey;
}
});
this.goodsAreaData.forEach(c => {
if (params.goodsAreaId === c.dictKey) {
stockup.goodsAreaId = c.dictKey;
stockup.goodsAreaName = c.dictValue;
}
});
if (params.stockupDate) {
stockup.stockupDate = params.stockupDate;
data.stockup = stockup;
}
if (params.remarks) {
stockup.remarks = params.remarks;
data.stockup = stockup;
}
if (this.loadAndUnload.length>0){
stockup.loadAndUnload = this.loadAndUnload.join(',');
data.stockup = stockup;
}
stockup.loadAndUnload = this.loadAndUnload.join(',');
//
if (params.tripartiteSource) {
//
@ -831,8 +849,8 @@
allocationInfo = info;
}
}
let data = {};
data.stockup = stockup;
// data.stockup = stockup;
data.masterDriverName = this.form.masterDriverName;
data.masterVehicleNub = this.form.masterVehicleNub;
data.allocationInfo = allocationInfo;

Loading…
Cancel
Save