diff --git a/src/api/distribution/distributionStockArticle.js b/src/api/distribution/distributionStockArticle.js
index b574b596..374eb33d 100644
--- a/src/api/distribution/distributionStockArticle.js
+++ b/src/api/distribution/distributionStockArticle.js
@@ -200,7 +200,7 @@ export const selectStockArticleInfoList = (current, size, params) => {
})
}
-export const selectDiscussStockArticleInfoList = (current, size, params) => {
+export const selectDiscussStockArticleInfoList = (current, size, params,deliveryListId) => {
return request({
url: '/api/logpm-distribution/deliveryList/selectDiscussStockArticleInfoList',
method: 'get',
@@ -208,11 +208,12 @@ export const selectDiscussStockArticleInfoList = (current, size, params) => {
...params,
current,
size,
+ deliveryListId
}
})
}
-export const selectUpdateAvailableStockArticle = (current, size, id,params) => {
+export const selectUpdateAvailableStockArticle = (current, size,params) => {
return request({
url: '/api/logpm-distribution/reservation/selectUpdateAvailableStockArticle',
method: 'get',
@@ -220,7 +221,6 @@ export const selectUpdateAvailableStockArticle = (current, size, id,params) => {
...params,
current,
size,
- id,
}
})
}
diff --git a/src/api/work/work.js b/src/api/work/work.js
index 360e396c..b5a971bc 100644
--- a/src/api/work/work.js
+++ b/src/api/work/work.js
@@ -77,3 +77,19 @@ export const completeTask = data => {
data,
});
};
+
+export const getMyWarehouseList = data => {
+ return request({
+ url: '/api/logpm-basicdata/warehouse/getMyWarehouseList',
+ method: 'get',
+ data,
+ });
+};
+
+export const preserveCurrentWarehouse = data => {
+ return request({
+ url: '/api/logpm-basicdata/warehouse/preserveCurrentWarehouse',
+ method: 'post',
+ data,
+ });
+};
\ No newline at end of file
diff --git a/src/page/index/top/index.vue b/src/page/index/top/index.vue
index 3f2773c3..c5e61c32 100644
--- a/src/page/index/top/index.vue
+++ b/src/page/index/top/index.vue
@@ -43,6 +43,11 @@
{{ $t('navbar.dashboard') }}
+
+
+ 切换仓库
+
+
{{ $t('navbar.userinfo') }}
@@ -56,6 +61,22 @@
+
+
+
-
+
diff --git a/src/views/basicdata/warehouse/warehouse/basicdataWarehouse.vue b/src/views/basicdata/warehouse/warehouse/basicdataWarehouse.vue
index e56e1bfc..7b4e6046 100644
--- a/src/views/basicdata/warehouse/warehouse/basicdataWarehouse.vue
+++ b/src/views/basicdata/warehouse/warehouse/basicdataWarehouse.vue
@@ -20,7 +20,6 @@
@refresh-change="refreshChange"
@on-load="onLoad"
>
-
= stop_level
})
}));
-
}
if (level == 0) {
axios.get(`/api/blade-system/dept/lazy-tree?parentId=0`).then(res => {
@@ -847,10 +845,12 @@
})
row.administrativeAreas = str.join(",");
}
- if (this.form.departmentName){
- this.form.department = this.department;
+ console.log("-------------->this.form.departmentName",this.form.departmentName);
+ console.log("-------------->this.department",this.department);
+ if (row.departmentName){
+ row.department = this.department;
}
- console.log(row);
+ console.log("-------------->row",row);
add(row).then(() => {
this.onLoad(this.page);
this.$message({
@@ -906,8 +906,8 @@
})
row.administrativeAreas = str.join(",");
}
- if (this.form.departmentName){
- this.form.department = this.department;
+ if (row.departmentName){
+ row.department = this.department;
}
update(row).then(() => {
this.onLoad(this.page);
diff --git a/src/views/distribution/turndelivery/deliveryDiscuss.vue b/src/views/distribution/turndelivery/deliveryDiscuss.vue
index 6ad8aeb1..3bca59d9 100644
--- a/src/views/distribution/turndelivery/deliveryDiscuss.vue
+++ b/src/views/distribution/turndelivery/deliveryDiscuss.vue
@@ -609,7 +609,10 @@
import { stockUpInfo } from '@/api/basicdata/basicdataGoodsArea';
import { getVehicleList } from '@/api/basicdata/basicdataVehicle';
import { getDriverList } from '@/api/basicdata/basicdataDriverArtery';
- import { selectStockArticleInfoList,selectDiscussStockArticleInfoList } from '@/api/distribution/distributionStockArticle';
+ import {
+ selectStockArticleInfoList,
+ selectDiscussStockArticleInfoList
+ } from '@/api/distribution/distributionStockArticle';
import { getInventoryList } from '@/api/distribution/distributionStockList';
import { getDeliveryList, updateDeliveryList } from '@/api/distribution/distributionDeliveryList';
import { mapGetters } from 'vuex';
@@ -736,13 +739,13 @@
'$route.query.id': {
handler(newVal, oldVal) {
console.log(newVal, oldVal);
- if (!!this.$route.query.id){
+ if (!!this.$route.query.id) {
this.fetchData();
this.onLoad(this.page);
}
- this.driverForm={};
- this.vehicleIds=[];
- this.deliveryDriver=[];
+ this.driverForm = {};
+ this.vehicleIds = [];
+ this.deliveryDriver = [];
},
deep: true,
immediate: true
@@ -903,18 +906,18 @@
},
sizeOrderChange(pageSize) {
this.page.pageSize = pageSize;
- if (this.deliveryListId){
+ if (this.deliveryListId) {
//这里的编辑需要进行特殊处理
- this.selectDiscussStockArticle(this.page);
- }else {
+ this.onLoadEditOrder(this.page, this.deliveryListId);
+ } else {
this.onLoadOrder(this.page);
}
},
currentOrderChange(currentPage) {
this.page.currentPage = currentPage;
- if (this.deliveryListId){
- this.selectDiscussStockArticle(this.page);
- }else {
+ if (this.deliveryListId) {
+ this.onLoadEditOrder(this.page, this.deliveryListId);
+ } else {
this.onLoadOrder(this.page);
}
},
@@ -1054,28 +1057,27 @@
console.log('>>>>>>>>orderData', this.orderData);
const data = this.stockArticleList;
let info = [];
- if (this.orderData) {
- let a = this.orderData;
- data.forEach(item => {
- a.forEach(order => {
- if (item.id === order.id) {
- console.log('order----------------->', order);
- item = order;
- }
- });
- info.push(item);
- });
- }
- this.orderData = info;
-
- // this.orderData.forEach(item => {
- // item.reservationNum = 0;
- // this.stockArticleList.forEach((list, index) => {
- // if (item.id === list.id) {
- // list = item;
- // }
+ // if (this.orderData) {
+ // let a = this.orderData;
+ // data.forEach(item => {
+ // a.forEach(order => {
+ // if (item.id === order.id) {
+ // console.log('order----------------->', order);
+ // item = order;
+ // }
+ // });
+ // info.push(item);
// });
- // });
+ // }
+ data.map(item=>{
+ console.log(item);
+ this.orderData.forEach(order=>{
+ if (item.id !== order.id){
+ this.orderData.push(item);
+ }
+ })
+ })
+ // this.orderData = info;
console.log('+++++++++++++++', this.orderData);
this.orderShow = false;
},
@@ -1490,65 +1492,11 @@
this.query.typeService = 1;
this.query.genre = '1';
const page = this.page;
- let params = {};
- if (this.deliveryListId) {
- //这里应该是一个单独的请求,请求会返回这个预约下的所有订单信息和能够进行操作的订单
- this.query.deliveryId = this.deliveryListId;
- this.selectDiscussStockArticle(page);
- // selectDiscussStockArticleInfoList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- // console.log("----------------------------->",res.data.data);
- // const data = res.data.data;
- // // this.page.total = data.total;
- // this.stockArticleInfo = data.records;
- // this.stockArticleInfo.forEach((item, index) => {
- // if (this.orderData) {
- // this.orderData.forEach(a => {
- // if (item.id === a.id) {
- // this.$nextTick(() => {
- // this.$refs.stockArticleTable.toggleRowSelection(this.stockArticleInfo[index], true);
- // });
- // console.log("item---------------->",item);
- // this.checkOrder(item,index)
- // }
- // });
- // }
- // });
- // this.page.total = data.total;
- // });
- this.query = {};
- } else {
- //初始化新增订单数据
- this.onLoadOrder(page);
- // selectStockArticleInfoList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- // console.log(res.data.data);
- // const data = res.data.data;
- // this.page.total = data.total;
- // this.stockArticleInfo = data.records;
- // this.stockArticleInfo.forEach((item, index) => {
- // this.checkOrder(item,index)
- // });
- // this.page.total = data.total;
- // });
- this.query = {};
- }
+ this.query = {};
+ //初始化新增订单数据
+ this.onLoadOrder(page);
+ this.query = {};
this.loading = false;
- // this.selectionClear();
- // if (this.deliveryListId) {
- // //编辑
- // console.log("---->", this.stockArticleInfo);
- // this.stockArticleInfo.forEach((item, index) => {
- // console.log("aaa", item, index);
- // this.orderData.forEach(o => {
- // console.log("bbb", o);
- // if (item.id === o.id) {
- // this.$nextTick(() => {
- // this.$refs.stockArticleTable.toggleRowSelection(this.stockArticleInfo[index], true);
- // })
- // }
- // })
- // })
- // }
- //新增
this.orderShow = true;
},
searchReset() {
@@ -1558,31 +1506,31 @@
};
this.searchChange();
},
- selectDiscussStockArticle(arg,params={}){
- this.query.typeService = 1;
- this.query.genre = '1';
- const page = arg;
- selectDiscussStockArticleInfoList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- console.log("----------------------------->",res.data.data);
- const data = res.data.data;
- // this.page.total = data.total;
- this.stockArticleInfo = data.records;
- this.stockArticleInfo.forEach((item, index) => {
- if (this.orderData) {
- this.orderData.forEach(a => {
- if (item.id === a.id) {
- this.$nextTick(() => {
- this.$refs.stockArticleTable.toggleRowSelection(this.stockArticleInfo[index], true);
- });
- console.log("item---------------->",item);
- this.checkOrder(item,index)
- }
- });
- }
- });
- this.page.total = data.total;
- });
- },
+ // selectDiscussStockArticle(arg,params={}){
+ // this.query.typeService = 1;
+ // this.query.genre = '1';
+ // const page = arg;
+ // selectDiscussStockArticleInfoList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
+ // console.log("----------------------------->",res.data.data);
+ // const data = res.data.data;
+ // // this.page.total = data.total;
+ // this.stockArticleInfo = data.records;
+ // this.stockArticleInfo.forEach((item, index) => {
+ // if (this.orderData) {
+ // this.orderData.forEach(a => {
+ // if (item.id === a.id) {
+ // this.$nextTick(() => {
+ // this.$refs.stockArticleTable.toggleRowSelection(this.stockArticleInfo[index], true);
+ // });
+ // console.log("item---------------->",item);
+ // this.checkOrder(item,index)
+ // }
+ // });
+ // }
+ // });
+ // this.page.total = data.total;
+ // });
+ // },
searchChange() {
let params = {};
this.query.typeService = 1;
@@ -1648,14 +1596,15 @@
this.selectionList = [];
this.query = {};
},
- selectDiscussStockArticle(arg,params={}){
+ onLoadEditOrder(arg, deliveryListId, params = {}) {
this.query.typeService = 1;
this.query.genre = '1';
const page = arg;
- selectDiscussStockArticleInfoList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
- console.log("----------------------------->",res.data.data);
+ const id = deliveryListId;
+ selectDiscussStockArticleInfoList(page.currentPage, page.pageSize, Object.assign(params, this.query), id).then(res => {
+ console.log('----------------------------->', res.data.data);
const data = res.data.data;
- // this.page.total = data.total;
+ this.page.total = data.total;
this.stockArticleInfo = data.records;
this.stockArticleInfo.forEach((item, index) => {
if (this.orderData) {
@@ -1664,19 +1613,19 @@
this.$nextTick(() => {
this.$refs.stockArticleTable.toggleRowSelection(this.stockArticleInfo[index], true);
});
- console.log("item---------------->",item);
- this.checkOrder(item,index)
+ console.log('item---------------->', item);
+ this.checkOrder(item, index);
}
});
}
});
- this.page.total = data.total;
+ // this.page.total = data.total;
});
},
- onLoadOrder(arg,params={}){
+ onLoadOrder(arg, params = {}) {
this.query.typeService = 1;
this.query.genre = '1';
- const page =arg;
+ const page = arg;
selectStockArticleInfoList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then(res => {
console.log(res.data.data);
const data = res.data.data;
@@ -1684,7 +1633,7 @@
this.stockArticleInfo = data.records;
this.stockArticleInfo.forEach((item, index) => {
//检查订单是否冻结
- this.checkOrder(item,index)
+ this.checkOrder(item, index);
});
this.page.total = data.total;
});