Browse Source

【nev-pc】位置码类型更改

ag_report_nev
安虹睿 12 months ago
parent
commit
0b62175737
  1. 8
      fe/PC/src/filters/status.js
  2. 41
      fe/PC/src/views/basicData/ItemsManage/PositionCode.vue

8
fe/PC/src/filters/status.js

@ -2405,14 +2405,18 @@ export function positionCodeType(index, prop) {
let type = {
1: {
value: 1,
label: "原料"
label: "注塑区"
},
2: {
value: 2,
label: "半成品"
label: "喷涂区"
},
3: {
value: 3,
label: "装配区"
},
4: {
value: 4,
label: "Kitting区"
}
}

41
fe/PC/src/views/basicData/ItemsManage/PositionCode.vue

@ -171,7 +171,7 @@ export default {
{ type: "input", disabled:true, label: "物品描述", prop: "partDesc",colSpan: 12 },
{ type: "input", disabled:true, label: "单位", prop: "basicUom",colSpan: 12 },
{ type: "filterSelect", label: "叫料库位代码", prop: "locationCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",this.isFilterLocation(this.CreateFormData.codeType))},
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.CreateFormData) },
colSpan: 12
},
@ -191,7 +191,7 @@ export default {
{ type: "input", disabled:true, label: "物品描述", prop: "partDesc",colSpan: 12 },
{ type: "input", disabled:true, label: "单位", prop: "basicUom",colSpan: 12 },
{ type: "filterSelect", label: "叫料库位代码", prop: "locationCode", optionsLabel: "name", optionsValue: "code",
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location",this.isFilterLocation(this.editFormData.codeType))},
focus: (type,val) => { return this.getFilterList(type, val, "basedata/location")},
searchButton: (val) => { this.showSerarchPage(val, 'basedata/location', 'Location', '库位选择', this.editFormData) },
colSpan: 12
},
@ -264,31 +264,19 @@ export default {
}
}
},
//
isFilterLocation (type) {
let filter = []
if(type == "W"){
filter = [
{
logic: "And",
column: 'type',
action: "==",
value: "2"
}
]
}
return filter
},
initCodeType(val){
if(this.formReveal){
switch (val) {
case 1:
this.CreateFormData.codeType = 'W'
this.CreateFormData.codeType = 'S'
break;
case 2:
this.CreateFormData.codeType = 'B'
this.CreateFormData.codeType = 'P'
break;
case 3:
this.CreateFormData.codeType = 'Z'
break;
case 4:
this.CreateFormData.codeType = 'K'
break;
default:
@ -298,13 +286,16 @@ export default {
}else{
switch (val) {
case 1:
this.editFormData.codeType = 'W'
this.editFormData.codeType = 'S'
break;
case 2:
this.editFormData.codeType = 'B'
this.editFormData.codeType = 'P'
break;
case 3:
this.editFormData.codeType = 'K'
this.editFormData.codeType = 'Z'
break;
case 4:
this.CreateFormData.codeType = 'K'
break;
default:
this.editFormData.codeType = ''
@ -340,12 +331,8 @@ export default {
// this.$listAssign(this.editFormData, this.propsData)
this.displayDialog.editDialog = true
// todo:-code
this.initCodeType(this.editFormData.type)
console.log([1,2,3].indexOf(this.editFormData.type))
// this.editFormData.type = (this.editFormData.type == 'W' || this.editFormData.type == 'B' || this.editFormData.type == 'K') ? this.editFormData.type : (this.editFormData.code && this.editFormData.code.length > 0 ? this.editFormData.code.slice(0,1) : null)
// this.editFormData.type = (this.editFormData.type == 'W' || this.editFormData.type == 'B' || this.editFormData.type == 'K') ? this.editFormData.type : null
this.editFormData.codeSuffix = [1,2,3].indexOf(this.editFormData.type) >= 0 ? (this.editFormData.code && this.editFormData.code.length > 0 ? this.editFormData.code.slice(1) : null) : this.editFormData.code
this.editFormData.codeSuffix = [1,2,3,4].indexOf(this.editFormData.type) >= 0 ? (this.editFormData.code && this.editFormData.code.length > 0 ? this.editFormData.code.slice(1) : null) : this.editFormData.code
}else{
this.drawerbutton(val)
}

Loading…
Cancel
Save