Commit 21fc7d2c authored by 刘文虎's avatar 刘文虎

增加盘点入口检测盘点开关状态

parent f242b1ca
...@@ -42,14 +42,19 @@ let inventoryApiFun = function(vm) { ...@@ -42,14 +42,19 @@ let inventoryApiFun = function(vm) {
*/ */
let applyReInventoryByInventoryModules = async (params = {}) => await vm.$u.get(parts + vm.vuex_token + let applyReInventoryByInventoryModules = async (params = {}) => await vm.$u.get(parts + vm.vuex_token +
'/take/stock/take/submit/' + params); '/take/stock/take/submit/' + params);
/**
* 提查询是否开启盘点
*/
let getInventoryStartByInventoryModules = async (params = {}) => await vm.$u.get(parts + vm.vuex_token +
'/take/stock/sign/start');
const inventoryApi = { const inventoryApi = {
inventoryListByInventoryModules, inventoryListByInventoryModules,
inventoryDetailByInventoryModules, inventoryDetailByInventoryModules,
addInventoryByInventoryModules, addInventoryByInventoryModules,
deleteInventoryByInventoryModules, deleteInventoryByInventoryModules,
confirmInventoryByInventoryModules, confirmInventoryByInventoryModules,
applyReInventoryByInventoryModules applyReInventoryByInventoryModules,
getInventoryStartByInventoryModules
} }
return inventoryApi return inventoryApi
} }
......
...@@ -275,13 +275,32 @@ export default { ...@@ -275,13 +275,32 @@ export default {
}); });
return; return;
} }
if (path === 'warehouse/inventory') {
this.handleClickInventory(path);
} else {
this.$u.route({ this.$u.route({
url: 'pages/mine/' + path url: 'pages/mine/' + path
}); });
}
} else { } else {
this.$u.route({ url: 'pages/login/index' }); this.$u.route({ url: 'pages/login/index' });
} }
}, },
async handleClickInventory(path) {
let res = await this.$u.api.getInventoryStartByInventoryModules();
let { code, data, message } = res;
if (code === 200 && data === 'Y') {
this.$u.route({
url: 'pages/mine/' + path
});
} else {
this.$refs.uToast.show({
title: '盘点尚未开始',
type: 'warning',
duration: 1500
});
}
},
handleClickSetting() { handleClickSetting() {
this.$u.route({ url: 'pages/mine/setting/index' }); this.$u.route({ url: 'pages/mine/setting/index' });
}, },
......
...@@ -720,7 +720,7 @@ export default { ...@@ -720,7 +720,7 @@ export default {
}); });
} else { } else {
let msg = ''; let msg = '';
if (data && data instanceof string) { if (data && data instanceof String) {
msg = data; msg = data;
} else { } else {
msg = message; msg = message;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment