Commit c50f083be946a7b97d413fcc915e97ef2e4448d9

Authored by yuanshuhui
1 parent 12a33989

commit

.env.production
... ... @@ -2,4 +2,4 @@
2 2 ENV = 'production'
3 3  
4 4 # 华恒WMS仓库管理系统/生产环境
5   -VUE_APP_BASE_API = '/prod-api'
  5 +VUE_APP_BASE_API = http://172.16.29.47:8888/nwms
... ...
src/api/login.js
... ... @@ -38,6 +38,17 @@ export function logout() {
38 38 })
39 39 }
40 40  
  41 +// 仓库切换
  42 +export function switchWarehouse(warehouseCode) {
  43 + return request({
  44 + url: '/auth/switchWarehouse',
  45 + method: 'post',
  46 + params: {
  47 + warehouseCode
  48 + }
  49 + })
  50 +}
  51 +
41 52 // 通过用户名获取可以用的仓库列表
42 53 export function getWareHouse(username) {
43 54 return request({
... ...
src/components/RightToolbar/index.vue
... ... @@ -35,7 +35,7 @@
35 35 icon="el-icon-s-tools"
36 36 ></el-button>
37 37  
38   - <el-checkbox-group v-model="selectData">
  38 + <el-checkbox-group v-model="selectData" @change="handleCheckedChange">
39 39 <el-checkbox
40 40 v-for="item in col_data"
41 41 :key="item.title"
... ... @@ -43,8 +43,10 @@
43 43 :checked="item.istrue"
44 44 style="padding: 4px"
45 45 :disabled="item.disabled"
  46 +
46 47 />
47 48 </el-checkbox-group>
  49 + <el-button type="primary" size="mini" class="fr">提交</el-button>
48 50 </el-popover>
49 51 </el-tooltip>
50 52 </el-row>
... ... @@ -71,7 +73,7 @@
71 73 icon="el-icon-s-tools"
72 74 ></el-button>
73 75  
74   - <el-checkbox-group v-model="selectData">
  76 + <el-checkbox-group v-model="selectData" @change="handleCheckedChange">
75 77 <el-checkbox
76 78 v-for="item in col_data"
77 79 :key="item.title"
... ... @@ -79,9 +81,11 @@
79 81 :checked="item.istrue"
80 82 style="padding: 4px"
81 83 :disabled="item.disabled"
  84 +
82 85 />
83 86  
84 87 </el-checkbox-group>
  88 + <el-button type="primary" size="mini" class="fr">提交</el-button>
85 89 </el-popover>
86 90 </el-tooltip>
87 91 </el-row>
... ... @@ -113,6 +117,10 @@ export default {
113 117 this.$emit("selectData", newVal);
114 118 },
115 119 },
  120 + created() {
  121 +// const selectData = ["用户名称", "用户昵称", "部门", "手机号码", "状态"]
  122 +// this.$emit("selectData", selectData);
  123 + },
116 124 methods: {
117 125 //搜索
118 126 toggleSearch() {
... ... @@ -122,6 +130,12 @@ export default {
122 130 refresh() {
123 131 this.$emit("queryTable");
124 132 },
  133 + //checkbox-group 绑定值变化事件
  134 + handleCheckedChange(value) {
  135 + // this.selectData= value;
  136 + // console.log(this.selectData)
  137 + // console.log(value)
  138 + },
125 139 },
126 140 };
127 141 </script>
... ...
src/lang/en.js
... ... @@ -70,8 +70,9 @@ export default {
70 70 库存查看: 'Inventory View',
71 71 库存物料汇总: 'Stock Material Summary',
72 72 库存交易: 'Inventory Transaction',
73   - 在线质检: 'Online Quality Inspection',
74   - 盘点: 'Adjustment Sheet',
  73 + 在库质检: 'Quality Inspection In Warehouse',
  74 + 盘点: 'Check',
  75 + 调整单: 'Adjustment Sheet',
75 76 任务: 'Task',
76 77 上架任务: 'List Task',
77 78 拣货任务: 'Picking Task',
... ...
src/lang/es.js
... ... @@ -70,8 +70,9 @@ export default {
70 70 库存查看: 'Vista de inventario',
71 71 库存物料汇总: 'Resumen de material en stock',
72 72 库存交易: 'Transacción de inventario',
73   - 在线质检: 'Inspección de calidad en línea',
74   - 盘点: 'Hoja de ajuste',
  73 + 在库质检: 'Inspección de calidad en almacén',
  74 + 盘点: 'Inventario',
  75 + 调整单: 'Hoja de ajuste',
75 76 任务: 'Tarea',
76 77 上架任务: 'Lista de tareas',
77 78 拣货任务: 'Tarea de picking',
... ...
src/lang/ja.js
... ... @@ -70,8 +70,9 @@ export default {
70 70 库存查看: 'インベントリビュー',
71 71 库存物料汇总: '在庫資料概要',
72 72 库存交易: '在庫取引',
73   - 在线质检: 'オンライン品質検査',
74   - 盘点: '調整シート',
  73 + 在库质检: '倉庫での品質検査',
  74 + 盘点: '在庫',
  75 + 调整单: '調整シート',
75 76 任务: '仕事',
76 77 上架任务: 'タスクの一覧表示',
77 78 拣货任务: 'ピッキングタスク',
... ...
src/lang/zh.js
... ... @@ -70,8 +70,9 @@ export default {
70 70 库存查看: '库存查看',
71 71 库存物料汇总: '库存物料汇总',
72 72 库存交易: '库存交易',
73   - 在线质检: '在线质检',
74   - 盘点: '调整单',
  73 + 在库质检: '在库质检',
  74 + 盘点: '盘点',
  75 + 调整单: '调整单',
75 76 任务: '任务',
76 77 上架任务: '上架任务',
77 78 拣货任务: '拣货任务',
... ...
src/layout/components/Navbar.vue
... ... @@ -27,7 +27,7 @@
27 27 placeholder="仓库"
28 28 size="mini"
29 29 style="width: 120px; vertical-align: text-bottom"
30   - @change="select"
  30 + @change="handleSelect"
31 31 >
32 32 <el-option
33 33 v-for="item in warehouseOptions"
... ... @@ -106,6 +106,7 @@ export default {
106 106 },
107 107 created() {
108 108 getWarehouseByUserCode(this.$store.getters.name).then((response) => {
  109 + console.log(response)
109 110 this.warehouseOptions = response.data;
110 111 });
111 112 },
... ... @@ -124,8 +125,12 @@ export default {
124 125 });
125 126 });
126 127 },
127   - select(value) {
  128 + handleSelect(value) {
  129 + console.log(value)
128 130 this.$store.commit("user/SET_WAREHOUSECODE", value);
  131 + this.$store.dispatch("user/SwitchWarehouse", value).then((response) => {
  132 + console.log(response)
  133 + })
129 134 },
130 135 },
131 136 };
... ...
src/main.js
... ... @@ -104,6 +104,7 @@ Vue.prototype.msgInfo = function (msg) {
104 104  
105 105 //全局变量挂载
106 106 Vue.prototype.$colData
  107 +Vue.prototype.exportLoading
107 108  
108 109  
109 110 // 全局组件挂载
... ...
src/store/modules/user.js
... ... @@ -2,7 +2,8 @@ import {
2 2 login,
3 3 logout,
4 4 getInfo,
5   - refreshToken
  5 + refreshToken,
  6 + switchWarehouse
6 7 } from '@/api/login'
7 8 import {
8 9 getToken,
... ... @@ -145,7 +146,27 @@ const user = {
145 146 removeToken()
146 147 resolve()
147 148 })
148   - }
  149 + },
  150 +
  151 + // 仓库切换
  152 + SwitchWarehouse({
  153 + commit
  154 + },warehouseCode) {
  155 + return new Promise((resolve, reject) => {
  156 + switchWarehouse(warehouseCode).then(res => {
  157 + let data = res.data
  158 + setToken(data.access_token)
  159 + commit('SET_TOKEN', data.access_token)
  160 + setExpiresIn(data.expires_in)
  161 + commit('SET_EXPIRES_IN', data.expires_in)
  162 + commit('SET_USERID', data.userId)
  163 + commit('SET_WAREHOUSECODE', data.warehouseCode)
  164 + resolve()
  165 + }).catch(error => {
  166 + reject(error)
  167 + })
  168 + })
  169 + },
149 170 }
150 171 }
151 172  
... ...
src/utils/request.js
... ... @@ -112,11 +112,14 @@ export function download(url, params, filename) {
112 112 elink.click()
113 113 URL.revokeObjectURL(elink.href)
114 114 document.body.removeChild(elink)
  115 + this.exportLoading = false;
115 116 } else {
116 117 navigator.msSaveBlob(blob, filename)
  118 + this.exportLoading = false;
117 119 }
118 120 }).catch((r) => {
119 121 console.error(r)
  122 + this.exportLoading = false;
120 123 })
121 124 }
122 125  
... ...
src/views/inventory/inventoryHeader/index.vue
1 1 <template>
2 2 <div class="app-container">
3   - <el-tabs v-model="activeName" type="card">
  3 + <el-tabs v-model="activeName" type="card" @tab-click="tabClick">
4 4 <el-tab-pane label="主表" name="first">
5 5 <el-form
6 6 :model="queryHeaderParams"
... ... @@ -1283,6 +1283,9 @@ export default {
1283 1283 });
1284 1284 }
1285 1285 },
  1286 + tabClick(e) {
  1287 + console.log(e)
  1288 + }
1286 1289 },
1287 1290 };
1288 1291 </script>
... ...
src/views/system/operlog/index.vue
... ... @@ -109,6 +109,7 @@
109 109 size="mini"
110 110 @click="handleExport"
111 111 v-hasPermi="['system:operlog:export']"
  112 + :loading="exportLoading"
112 113 >导出</el-button
113 114 >
114 115 </el-col>
... ... @@ -327,6 +328,8 @@ export default {
327 328 return {
328 329 // 遮罩层
329 330 loading: true,
  331 + // 导出加载状态
  332 + exportLoading: false,
330 333 // 显示搜索条件
331 334 showSearch: true,
332 335 // 总条数
... ... @@ -434,6 +437,7 @@ export default {
434 437  
435 438 /** 导出按钮操作 */
436 439 handleExport() {
  440 + this.exportLoading = true;
437 441 this.download(
438 442 "system/operlog/export",
439 443 {
... ...
src/views/system/user/index.vue
... ... @@ -146,6 +146,7 @@
146 146 size="mini"
147 147 @click="handleExport"
148 148 v-hasPermi="['system:user:export']"
  149 + :loading="exportLoading"
149 150 >导出</el-button
150 151 >
151 152 </el-col>
... ... @@ -519,6 +520,8 @@ export default {
519 520 return {
520 521 // 遮罩层
521 522 loading: true,
  523 + // 导出加载状态
  524 + exportLoading: false,
522 525 // 选中数组
523 526 ids: [],
524 527 // 非单个禁用
... ... @@ -632,12 +635,12 @@ export default {
632 635 // istrue属性存放列的状态
633 636 colData: [
634 637 { title: "用户编号", istrue: false },
635   - { title: "登录名称", istrue: true },
636 638 { title: "用户名称", istrue: true },
  639 + { title: "用户昵称", istrue: true },
637 640 { title: "部门", istrue: true },
638 641 { title: "邮箱", istrue: false },
639   - { title: "手机", istrue: true },
640   - { title: "启用", istrue: true },
  642 + { title: "手机号码", istrue: true },
  643 + { title: "状态", istrue: true },
641 644 { title: "创建时间", istrue: true },
642 645 { title: "创建人", istrue: false },
643 646 { title: "修改时间", istrue: true },
... ... @@ -848,6 +851,7 @@ export default {
848 851 },
849 852 /** 导出按钮操作 */
850 853 handleExport() {
  854 + this.exportLoading = true;
851 855 this.download(
852 856 "system/user/export",
853 857 {
... ...