diff --git a/src/router/views/index.js b/src/router/views/index.js
index e73b9db3..f9e935f1 100644
--- a/src/router/views/index.js
+++ b/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,
diff --git a/src/views/distribution/reservation/reservationFrom.vue b/src/views/distribution/reservation/reservationFrom.vue
index 7ec116b7..b49fdd57 100644
--- a/src/views/distribution/reservation/reservationFrom.vue
+++ b/src/views/distribution/reservation/reservationFrom.vue
@@ -32,13 +32,14 @@
-
+
{{item.dictValue}}
+ :value="item.dictKey">{{item.dictValue}}
+
-
+
@@ -55,8 +56,9 @@
{{item.dictValue}}
+ :label="item.dictKey"
+ :value="item.dictKey">{{item.dictValue}}
+
@@ -76,9 +78,10 @@
-
+
{{item.dictValue}}
+ :value="item.dictKey">{{item.dictValue}}
+
@@ -89,7 +92,7 @@
-
+
@@ -97,8 +100,9 @@
- {{item.dictValue}}
+ {{item.dictValue}}
+
@@ -137,15 +141,17 @@
-
+
-
+
- 查看包件
+ 查看包件
增值服务
@@ -182,7 +188,7 @@
- 移除
+ 移除
@@ -330,7 +336,8 @@
:height="height"
style="width: 100%"
:border="option.border">
-
+
@@ -370,7 +377,7 @@
v-for="(item,index) in addvalueServeTypeData"
:key="item.dictKey"
:label="item.dictKey"
- >{{item.dictValue}
+ >{{item.dictValue}}
件数:
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>",row);
+ this.loading = true;
+ 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);
- this.orderData.forEach(item=>{
+ onSubmitPackage() {
+ console.log('>>>>>>>>>>>>', this.selectionList);
+ this.orderData.forEach(item => {
item.reservationNum = 0;
- this.selectionList.forEach(list=>{
- if (item.id === list.stockArticleId){
+ this.selectionList.forEach(list => {
+ if (item.id === list.stockArticleId) {
item.reservationNum += list.quantity;
}
- })
- })
- this.isaddvalue=false;
+ });
+ item.packageList = this.selectionList;
+ });
+ console.log("+++++++++++++++",this.orderData);
+ this.isaddvalue = false;
},
onSubmit() {
- //新增预约单
- let orderIds = [];
- let inventoryIds = [];
- let inventoryList = [];
- let stockArticleList = [];
- let operation = true;
- this.orderData.forEach(item => {
- if (item.reservationNum === '0'){
- this.$message({
- type: 'warning',
- message: '请选择' + item.orderSelfNumbering + '包件数量!'
- });
- operation = false;
- }
- orderIds.push(item.id);
- item.reservationNum = item.reservationNum;
- stockArticleList.push(item);
- });
- this.inventoryData.forEach(item => {
- if (item.reservationNum==="0" || item.reservationNum > item.quantityStock) {
- this.$message({
- type: 'warning',
- message: '请输入' + item.orderSelfNumbering + '正确数量!'
- });
- operation = false;
- }
- item.reservationNum = item.reservationNum;
- inventoryIds.push(item.id);
- inventoryList.push(item);
- });
- orderIds.join(',');
- inventoryIds.join(',');
- this.form.stockArticleIds = orderIds.toString();
- this.form.inventoryIds = inventoryIds.toString();
- this.form.inventoryList = inventoryList;
- this.form.stockArticleList = stockArticleList;
- this.deliveryWayData.forEach(item => {
- if (this.form.deliveryWay === item.dictValue) {
- this.form.deliveryWay = item.dictKey;
- }
- });
- this.deliveryTypeData.forEach(item => {
- if (this.form.deliveryType === item.dictValue) {
- this.form.deliveryType = item.dictKey;
- }
- });
- this.periodOfTimeData.forEach(item => {
- if (this.form.periodOfTime === item.dictValue) {
- 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: '操作成功!'
- });
- });
- }
+ //新增预约单
+ let orderIds = [];
+ let inventoryIds = [];
+ let inventoryList = [];
+ let stockArticleList = [];
+ let operation = true;
+ this.orderData.forEach(item => {
+ if (item.reservationNum === '0') {
+ this.$message({
+ type: 'warning',
+ message: '请选择' + item.orderSelfNumbering + '包件数量!'
+ });
+ operation = false;
+ }
+ orderIds.push(item.id);
+ item.reservationNum = item.reservationNum;
+ stockArticleList.push(item);
+ });
+ this.inventoryData.forEach(item => {
+ if (item.reservationNum === '0' || item.reservationNum > item.quantityStock) {
+ this.$message({
+ type: 'warning',
+ message: '请输入' + item.orderSelfNumbering + '正确数量!'
+ });
+ operation = false;
+ }
+ item.reservationNum = item.reservationNum;
+ inventoryIds.push(item.id);
+ inventoryList.push(item);
+ });
+ orderIds.join(',');
+ inventoryIds.join(',');
+ this.form.stockArticleIds = orderIds.toString();
+ this.form.inventoryIds = inventoryIds.toString();
+ this.form.inventoryList = inventoryList;
+ this.form.stockArticleList = stockArticleList;
+ this.deliveryWayData.forEach(item => {
+ if (this.form.deliveryWay === item.dictValue) {
+ this.form.deliveryWay = item.dictKey;
}
+ });
+ this.deliveryTypeData.forEach(item => {
+ if (this.form.deliveryType === item.dictValue) {
+ this.form.deliveryType = item.dictKey;
+ }
+ });
+ this.periodOfTimeData.forEach(item => {
+ if (this.form.periodOfTime === item.dictValue) {
+ this.form.periodOfTime = item.dictKey;
+ }
+ });
+ 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('确认关闭?')
@@ -769,21 +783,21 @@
});
},
removeStockArticle(row) {
- this.orderData.forEach((item,index)=>{
- if (item.id === row.id){
- this.orderData.splice(index,1);
+ this.orderData.forEach((item, index) => {
+ if (item.id === row.id) {
+ this.orderData.splice(index, 1);
}
console.log(item);
- })
+ });
console.log('>>>>>>>>>>>>>>>row', row);
},
removeStockList(row) {
- this.inventoryData.forEach((item,index)=>{
- if (item.id === row.id){
- this.inventoryData.splice(index,1);
+ this.inventoryData.forEach((item, index) => {
+ if (item.id === row.id) {
+ this.inventoryData.splice(index, 1);
}
console.log(item);
- })
+ });
console.log('>>>>>>>>>>>>>>>row', row);
},
handleView(row) {
@@ -864,42 +878,42 @@
});
return;
}
- if (this.orderData.length>=1) {
+ if (this.orderData.length >= 1) {
let flag = false;
this.selectionList.some(i => {
//过滤选择数据中不是同一用户的数据
- let b = this.orderData.filter(a=>{
- return i.customerName !== a.customerName && i.customerTelephone !== a.customerTelephone && i.customerAddress !== a.customerAddress
- }).length>=1;
- console.log(">>>>>>>>>>>>>>>",b);
+ let b = this.orderData.filter(a => {
+ return i.customerName !== a.customerName && i.customerTelephone !== a.customerTelephone && i.customerAddress !== a.customerAddress;
+ }).length >= 1;
+ console.log('>>>>>>>>>>>>>>>', b);
//控制选择记录是否插入订单列表中
let a = this.orderData.filter((ele) => ele.id == i.id).length >= 1;
- if (!b){
- if (!a){
+ if (!b) {
+ if (!a) {
this.orderData.push(i);
- }else {
+ } else {
flag = true;
}
}
});
- if (flag){
- this.$message({
- type: 'warning',
- message: '请选择同一顾客订单!'
- });
+ if (flag) {
+ this.$message({
+ type: 'warning',
+ message: '请选择同一顾客订单!'
+ });
}
} else {
this.orderData = this.selectionList;
- let a = 0 ;
- this.orderData.forEach(item=>{
- if (item.collectFee){
- a += parseInt(item.collectFee);
- }
- })
+ let a = 0;
+ this.orderData.forEach(item => {
+ 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;
@@ -953,20 +967,20 @@
this.form.deliveryType = reservation.deliveryType;
this.form.periodOfTime = reservation.periodOfTime;
this.form.periodOfTime = reservation.periodOfTime;
- if (reservation.serveType){
+ if (reservation.serveType) {
//过滤字符串中的','
- this.serveType = Array.from(reservation.serveType).filter(s=>{
- return s !==','
- })
+ this.serveType = Array.from(reservation.serveType).filter(s => {
+ return s !== ',';
+ });
}
this.form = reservation;
});
}
getInventoryList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const inventoryList = res.data.data;
- inventoryList.records.forEach(item=>{
- item.reservationNum = "0";
- })
+ inventoryList.records.forEach(item => {
+ item.reservationNum = '0';
+ });
this.page.total = inventoryList.total;
this.inventoryInfo = inventoryList.records;
this.loading = false;
@@ -975,9 +989,9 @@
this.query.genre = 1;
getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
const data = res.data.data;
- data.records.forEach(item=>{
- item.reservationNum = "0";
- })
+ data.records.forEach(item => {
+ item.reservationNum = item.handQuantity;
+ });
this.page.total = data.total;
this.stockArticleInfo = data.records;
this.loading = false;
diff --git a/src/views/distribution/turndelivery/deliveryInfo.vue b/src/views/distribution/turndelivery/deliveryInfo.vue
index 7a17193f..dd50a423 100644
--- a/src/views/distribution/turndelivery/deliveryInfo.vue
+++ b/src/views/distribution/turndelivery/deliveryInfo.vue
@@ -355,7 +355,7 @@
-
+
上移
@@ -756,7 +756,7 @@
const params = this.form;
let stockup = {};
let tripartite = {};
- let allocationInfo=[];
+ let allocationInfo = [];
//备货区数据构建
if (params.loader) {
this.loaderData.forEach(a => {
@@ -786,7 +786,7 @@
}
stockup.loadAndUnload = this.loadAndUnload.join(',');
//判断是否是三方配送
- if (params.tripartiteSource){
+ if (params.tripartiteSource) {
//三方配送数据构建
if (params.driverName) {
tripartite.driverName = params.driverName;
@@ -808,7 +808,7 @@
}
});
}
- }else {
+ } else {
//自主配送数据构建
if (this.driverList.length !== this.vehticleList.length) {
this.$message({
@@ -820,16 +820,17 @@
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;
}
}
- let data ={};
+ let data = {};
data.stockup = stockup;
data.masterDriverName = this.form.masterDriverName;
data.masterVehicleNub = this.form.masterVehicleNub;
@@ -837,9 +838,11 @@
data.tripartite = tripartite;
data.reservationIds = this.ids;
console.log(data);
- deliveryTask(data).then((res)=>{
- console.log(res);
- })
+ deliveryTask(data).then((res) => {
+ this.$router.push({
+ path: '/distribution/deliverylist/distributionDeliveryList'
+ });
+ });
},
onLoad() {
this.loading = false;
diff --git a/vite.config.js b/vite.config.js
index b93c008b..d19e7956 100644
--- a/vite.config.js
+++ b/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/, ''),