feat(NVL): 仓库管理

1.从iep-ui挪到nlv-ui仓库

refs: #41258
This commit is contained in:
彭枝刚 2024-10-24 10:12:09 +08:00
parent e79fa059ae
commit eb64a0d97e
9 changed files with 107 additions and 35 deletions

View File

@ -1,4 +1,4 @@
# nlv-ui
# iep-ui
#### 介绍
所有模块的前端

View File

@ -1,7 +1,6 @@
module.exports = {
presets: [[
'@vue/app',
{ useBuiltIns: "entry" }
]],
presets: [
'@vue/app'
],
plugins: ["@babel/plugin-proposal-optional-chaining", "@babel/plugin-transform-modules-commonjs"]
}

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="WEB_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$" />
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

View File

@ -1,5 +1,5 @@
{
"name": "nlv-ui",
"name": "iep-ui",
"version": "4.5.0",
"private": true,
"scripts": {
@ -18,6 +18,10 @@
"@riophae/vue-treeselect": "0.4.0",
"@tinymce/tinymce-vue": "^3.2.0",
"@types/webpack-env": "^1.18.4",
"@vue-office/docx": "^1.6.2",
"@vue-office/excel": "^1.7.11",
"@vue-office/pdf": "^2.0.2",
"@vue/composition-api": "^1.7.2",
"@xkeshi/image-compressor": "^0.5.3",
"avue-plugin-ueditor": "^0.1.4",
"axios": "^0.18.0",
@ -60,6 +64,7 @@
"vue-cnname-avatar": "^1.0.6",
"vue-codemirror": "^4.0.6",
"vue-cron": "^1.0.9",
"vue-demi": "^0.14.10",
"vue-echarts": "^4.1.0",
"vue-i18n": "^8.28.2",
"vue-json-editor": "^1.2.3",

View File

@ -1,6 +1,8 @@
import request from '@/router/axios'
import { wms, iep } from '@/api/prefix'
//! 工單物料管理 iep-app for add.vue
// add.vue 用 用料批 or 工單 做 search
export function getShopOrderMaterialList(obj) {
return request({
@ -62,6 +64,8 @@ export function getInstorageNo(query) {
})
}
//! 工單退料單管理 iep-wms for index.vue
// 退料單保存
export function save(obj) {
return request({

View File

@ -15,7 +15,6 @@ export const iepMsa = 'iep-msa'
export const iepRpt = 'iep-rpt'
export const iepDcc = 'iep-dcc'
export const nlvWms = 'nlv-wms'
export const nlvPrint = 'nlv-print'
export function iep(url) {
return SLASH + iepApp + url
@ -78,9 +77,6 @@ export function rpt(url) {
export function dcc(url) {
return SLASH + iepDcc + url
}
export function nlv_print(url) {
return SLASH + nlvPrint + url
}
export default {
iep,
@ -97,7 +93,5 @@ export default {
int,
msa,
rpt,
dcc,
nlv_print,
nlv_wms
dcc
}

View File

@ -478,13 +478,12 @@ export default {
},
},
methods: {
// 隐藏行
rowClassName: function ({ row }) {
// if (row.value == '7' || row.value == '8') {
// return 'showRow'
// } else {
// return
// }
if (row.value == '7' || row.value == '8') {
return 'showRow'
} else {
return
}
},
openHour() {
this.timeVisible = true
@ -549,12 +548,12 @@ export default {
this.freqData.forEach((f, index) => {
this.$set(this.freqData[index], 'item', key[this.freqData[index].value])
this.$set(this.freqData[index], 'val', '')
// if (index <= 6) {
if (index <= 6) {
this.$set(this.freqData[index], 'seq', index + 1 + '')
// }
// if (index >= 8) {
// this.$set(this.freqData[index], 'seq', index - 1 + '')
// }
}
if (index >= 8) {
this.$set(this.freqData[index], 'seq', index - 1 + '')
}
})
}
},

View File

@ -27,6 +27,13 @@
@click.stop="showStorageLocationDialog"></i>
</el-input>
</template>
<template slot-scope="scope" slot="deptCodeForm">
<el-select v-model="form.deptCode" :placeholder="$t('mes.selectMsg')" style="width: 100%" clearable>
<el-option v-for="item in selfDeptList" :key="item.value" :label="item.label" :value="item.value"> </el-option>
</el-select>
</template>
<template slot="menuLeft" slot-scope="{size}">
<el-button type="primary" icon="el-icon-printer" :size="size" @click="printCode()"
:disabled="!print_permissions">打印
@ -52,6 +59,7 @@
import {fetchList as fetchStoragebinTypeList} from '@/api/mes/wms-nalinv/storagebin-type';
import {isBlank} from "@/util/string";
import {getStore} from '@/util/store';
import { listUser, deptTreeSelect } from '@/api/workflow/system/user'
export default {
name: 'storagebin',
@ -72,6 +80,7 @@
selectList: [],
searchForm: {},
tableData: [],
selfDeptList: [],
page: {
total: 0, // 总页数
currentPage: 1, // 当前页数
@ -159,6 +168,22 @@
"span": 12,
"min": 0
},
{
"type": "select",
"label": "部门组",
"prop": "deptCode",
"span": 12,
hide: true,
showColumn: false,
},
{
"type": 'input',
"label": "部门组",
"prop": "deptName",
"span": 12,
display: false,
showColumn: true
},
{
"type": "switch",
"label": "默认货格",
@ -220,6 +245,39 @@
this.print_permissions = this.permissions['wms_storage_bin_print'];
},
mounted() {
let me = this;
me.selfDeptList = [];
// 加载当前用户的所在部门的子组
showLoading();
deptTreeSelect().then(respData => {
hideLoading();
const currentList = respData.data.data;
if(currentList.length>0){
for (let i = 0; i < currentList.length; i++) {
let childrenList = currentList[i].children;
if(childrenList.length>0){
for (let j = 0; j < childrenList.length; j++) {
let setChild = childrenList[j];
if(setChild.children.length>0){
for (let k = 0; k < setChild.children.length; k++) {
let lastChildren = setChild.children[k];
me.selfDeptList.push({
key: lastChildren.id,
label: lastChildren.name,
value: lastChildren.deptCode
})
}
}
}
}
}
}
}).catch(error => {
hideLoading();
});
},
beforeRouteEnter(to, from, next) {
next(vm => {
try {
@ -353,6 +411,17 @@
// 更新
handleUpdate: function (row, index, done, loading) {
if(!isBlank(row.deptCode)){
let exist = this.selfDeptList.find(ite=> ite.value === row.deptCode);
if(exist != undefined){
row['deptId'] = exist.key;
row['deptName'] = exist.label;
}
}else{
row['deptId'] = null;
row['deptName'] = '';
row['deptCode'] = '';
}
putObj(row).then(data => {
this.$message.success('修改成功');
done();
@ -363,6 +432,17 @@
},
// 保存
handleSave: function (row, done, loading) {
if(!isBlank(row.deptCode)){
let exist = this.selfDeptList.find(ite=> ite.value === row.deptCode);
if(exist != undefined){
row['deptId'] = exist.key;
row['deptName'] = exist.label;
}
}else{
row['deptId'] = null;
row['deptName'] = '';
row['deptCode'] = '';
}
addObj(row).then(data => {
this.$message.success('添加成功');
done();

View File

@ -14,8 +14,8 @@ server {
root /opt/dist;
# 若新增后端路由前缀注意在此处添加(|新增)
location ~* ^/(code|auth|admin|monitor|actuator|gen|job|tx|act|mp|pay|jimu|aj|rpt|iep-app|iep-pms|iep-tms|iep-tap|iep-qms|iep-alm) {
proxy_pass http://127.0.0.1:9999;
location ~* ^/(code|auth|admin|monitor|actuator|gen|job|tx|act|mp|pay|jimu|aj|rpt|iep-app|iep-pms|iep-tms|iep-tap|iep-qms|iep-alm|tqm-lims|iep-oem|iep-tds|iep-wms|iep-flow|iep-dcc|iMES-jxls|nlv-wms) {
proxy_pass http://mom-gateway:9999;
proxy_connect_timeout 15s;
proxy_send_timeout 15s;
proxy_read_timeout 15s;