Browse Source

预约维护包件信息

dev-warehouse
kilo 2 years ago
parent
commit
0aaecfddc0
  1. 12
      src/router/views/index.js
  2. 118
      src/views/distribution/reservation/reservationFrom.vue
  3. 13
      src/views/distribution/turndelivery/deliveryInfo.vue
  4. 2
      vite.config.js

12
src/router/views/index.js

@ -423,6 +423,18 @@ export default [
},
],
},
{
path: '/distribution/deliverylist/distributionDeliveryList',
component: Layout,
redirect: '/distribution/deliverylist/distributionDeliveryList',
children: [
{
path: '/distribution/deliverylist/distributionDeliveryList',
id:'id',
component: () => import('@/views/distribution/deliverylist/distributionDeliveryList.vue'),
},
],
},
{
path: '/distribution/turndelivery/deliveryInfo',
component: Layout,

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

@ -36,7 +36,8 @@
<el-radio
:label="item.dictKey"
:value="item.dictKey">{{item.dictValue}}&emsp;</el-radio>
:value="item.dictKey">{{item.dictValue}}&emsp;
</el-radio>
</el-radio-group>
<!-- :label="item.dictValue"-->
</el-form-item>
@ -56,7 +57,8 @@
<el-radio-group v-model="form.deliveryType" v-for="item in this.deliveryTypeData">
<el-radio
:label="item.dictKey"
:value="item.dictKey">{{item.dictValue}}&emsp;</el-radio>
:value="item.dictKey">{{item.dictValue}}&emsp;
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
@ -78,7 +80,8 @@
<el-form-item label="配送方式:" prop="serveType" label-width="100px">
<el-radio-group v-model="form.deliveryWay" v-for="item in this.deliveryWayData">
<el-radio :label="item.dictKey"
:value="item.dictKey">{{item.dictValue}}&emsp;</el-radio>
:value="item.dictKey">{{item.dictValue}}&emsp;
</el-radio>
</el-radio-group>
</el-form-item>
</el-col>
@ -98,7 +101,8 @@
<!-- <el-input v-model="form.serveType" clearable placeholder="请选择服务类型"/>-->
<el-checkbox-group v-model="serveType" v-for="item in this.addvalueServeTypeData">
<el-checkbox :label="item.dictKey"
:value="item.dictKey">{{item.dictValue}}&emsp;</el-checkbox>
:value="item.dictKey">{{item.dictValue}}&emsp;
</el-checkbox>
</el-checkbox-group>
</el-form-item>
</el-col>
@ -137,15 +141,17 @@
</el-table-column>
</template>
<el-table-column label="预约数量" type="index" width="100px">
<el-table-column label="包件数量" type="index" width="100px">
<template #="{row}">
<el-input v-model="row.reservationNum" type="number" :disabled="true" placeholder="请输入内容"></el-input>
<el-input v-model="row.reservationNum" type="number" :disabled="true"
placeholder="请输入内容"></el-input>
</template>
</el-table-column>
<!-- 操作栏模块 -->
<el-table-column prop="menu" label="操作" :width="220" align="center">
<template #="{row}">
<el-button type="primary" link icon="el-icon-view" @click="viewStockArticlePackage(row)">查看包件
<el-button type="primary" link icon="el-icon-view"
@click="viewStockArticlePackage(row)">查看包件
</el-button>
<el-button type="primary" link icon="el-icon-delete" @click="addvalueServe(row)">增值服务
</el-button>
@ -330,7 +336,8 @@
:height="height"
style="width: 100%"
:border="option.border">
<el-table-column type="selection" v-if="option.selection" width="55" align="center"></el-table-column>
<el-table-column type="selection" v-if="option.selection" width="55"
align="center"></el-table-column>
<el-table-column type="expand" v-if="option.expand" align="center"></el-table-column>
<el-table-column v-if="option.index" label="序号" type="index" width="60" align="center">
</el-table-column>
@ -370,7 +377,7 @@
v-for="(item,index) in addvalueServeTypeData"
:key="item.dictKey"
:label="item.dictKey"
>{{item.dictValue}
>{{item.dictValue}}
<span v-if="index===0||index===6||index===2||index===4">&nbsp;件数:
<el-input type="number" v-model="item.f"
:disabled="this.form?.freightMark?.indexOf(item.dictKey) == -1"
@ -431,7 +438,7 @@
import { getDetailDelivery, addDelivery } from '@/api/distribution/distributionDelivery';
import { addIncrement } from '@/api/distribution/distributionStockArticle';
import { getInventoryList } from '@/api/distribution/distributionStockList';
import { getListOwn } from "@/api/distribution/distributionParcelList";
import { getListOwn } from '@/api/distribution/distributionParcelList';
// import option from "@/option/distribution/distributionDelivery";
import option from '@/option/distribution/distributionStockArticle';
@ -511,6 +518,7 @@
stockListShow: false,
isaddvalue: false,
packageData: [],
packageList: []
};
},
created() {
@ -590,9 +598,11 @@
this.onLoad(this.page);
},
handleAddOrder() {
this.selectionList = [];
this.orderShow = true;
},
handleAddInventory() {
this.selectionList = [];
this.stockListShow = true;
},
handleCheckedCitiesChange(value) {
@ -666,25 +676,27 @@
},
viewStockArticlePackage(row) {
this.loading = true;
console.log(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",row);
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', row);
this.isaddvalue = true;
getListOwn("1","10",{stockArticleId : row.id}).then(res=>{
const packages = res.data.data
console.log(">>>>>>>",packages);
getListOwn('1', '10', { stockArticleId: row.id }).then(res => {
const packages = res.data.data;
console.log('>>>>>>>', packages);
this.packageData = packages.records;
this.loading = false;
})
});
},
onSubmitPackage() {
console.log(">>>>>>>>>>>>",this.selectionList);
console.log('>>>>>>>>>>>>', this.selectionList);
this.orderData.forEach(item => {
item.reservationNum = 0;
this.selectionList.forEach(list => {
if (item.id === list.stockArticleId) {
item.reservationNum += list.quantity;
}
})
})
});
item.packageList = this.selectionList;
});
console.log("+++++++++++++++",this.orderData);
this.isaddvalue = false;
},
onSubmit() {
@ -707,7 +719,7 @@
stockArticleList.push(item);
});
this.inventoryData.forEach(item => {
if (item.reservationNum==="0" || item.reservationNum > item.quantityStock) {
if (item.reservationNum === '0' || item.reservationNum > item.quantityStock) {
this.$message({
type: 'warning',
message: '请输入' + item.orderSelfNumbering + '正确数量!'
@ -739,26 +751,28 @@
this.form.periodOfTime = item.dictKey;
}
});
this.form.serveType = this.serveType.join(",")
if (operation){
if (this.reservationId){
update(this.form).then(()=>{
this.$router.go(-1);
this.$message({
type: 'success',
message: '操作成功!'
});
})
}else {
add(this.form).then(() => {
this.$router.go(-1);
this.$message({
type: 'success',
message: '操作成功!'
});
});
}
}
this.form.serveType = this.serveType.join(',');
// this.form.packageList = this.packageList;
console.log(">>>>>>>>",this.form);
// if (operation){
// if (this.reservationId){
// update(this.form).then(()=>{
// this.$router.go(-1);
// this.$message({
// type: 'success',
// message: '!'
// });
// })
// }else {
// add(this.form).then(() => {
// this.$router.go(-1);
// this.$message({
// type: 'success',
// message: '!'
// });
// });
// }
// }
},
handleClose(done) {
this.$confirm('确认关闭?')
@ -774,7 +788,7 @@
this.orderData.splice(index, 1);
}
console.log(item);
})
});
console.log('>>>>>>>>>>>>>>>row', row);
},
removeStockList(row) {
@ -783,7 +797,7 @@
this.inventoryData.splice(index, 1);
}
console.log(item);
})
});
console.log('>>>>>>>>>>>>>>>row', row);
},
handleView(row) {
@ -869,9 +883,9 @@
this.selectionList.some(i => {
//
let b = this.orderData.filter(a => {
return i.customerName !== a.customerName && i.customerTelephone !== a.customerTelephone && i.customerAddress !== a.customerAddress
return i.customerName !== a.customerName && i.customerTelephone !== a.customerTelephone && i.customerAddress !== a.customerAddress;
}).length >= 1;
console.log(">>>>>>>>>>>>>>>",b);
console.log('>>>>>>>>>>>>>>>', b);
//
let a = this.orderData.filter((ele) => ele.id == i.id).length >= 1;
@ -896,10 +910,10 @@
if (item.collectFee) {
a += parseInt(item.collectFee);
}
})
});
this.form.collectFee = a;
console.log("@@@@@@@@@@@@@@@@@@",a);
console.log('@@@@@@@@@@@@@@@@@@', a);
}
this.orderShow = false;
@ -926,7 +940,7 @@
let phone = '';
let address = '';
let typeService = '';
console.log(">>>>>>>>>>>>>",data);
console.log('>>>>>>>>>>>>>', data);
for (let i = 0; i < data.length; i++) {
if (i === 0) {
name = data[0].customerName;
@ -956,8 +970,8 @@
if (reservation.serveType) {
//','
this.serveType = Array.from(reservation.serveType).filter(s => {
return s !==','
})
return s !== ',';
});
}
this.form = reservation;
});
@ -965,8 +979,8 @@
getInventoryList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const inventoryList = res.data.data;
inventoryList.records.forEach(item => {
item.reservationNum = "0";
})
item.reservationNum = '0';
});
this.page.total = inventoryList.total;
this.inventoryInfo = inventoryList.records;
this.loading = false;
@ -976,8 +990,8 @@
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
data.records.forEach(item => {
item.reservationNum = "0";
})
item.reservationNum = item.handQuantity;
});
this.page.total = data.total;
this.stockArticleInfo = data.records;
this.loading = false;

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

@ -820,11 +820,12 @@
let info = [];
for (let i = 0; i < this.driverInfo.length; i++) {
let obj = {};
obj.driver = this.driverInfo[i].name
obj.driverId = this.driverInfo[i].id
obj.driver = this.driverInfo[i].name;
obj.driverId = this.driverInfo[i].id;
obj.vehicle = this.vehticleInfo[i].vehicleNub;
obj.vehicleId = this.vehticleInfo[i].id;
info.push(obj); this.driverInfo[i].name;
info.push(obj);
this.driverInfo[i].name;
}
allocationInfo = info;
}
@ -838,8 +839,10 @@
data.reservationIds = this.ids;
console.log(data);
deliveryTask(data).then((res) => {
console.log(res);
})
this.$router.push({
path: '/distribution/deliverylist/distributionDeliveryList'
});
});
},
onLoad() {
this.loading = false;

2
vite.config.js

@ -12,7 +12,7 @@ export default ({ mode, command }) => {
port: 2888,
proxy: {
'/api': {
target: 'http://192.168.2.11:8889',
target: 'http://192.168.2.29:13000',
//target: 'http://test3.javablade.com',
changeOrigin: true,
rewrite: path => path.replace(/^\/api/, ''),

Loading…
Cancel
Save