diff --git a/src/store/modules/user.js b/src/store/modules/user.js index 597d748..4aabb85 100644 --- a/src/store/modules/user.js +++ b/src/store/modules/user.js @@ -10,6 +10,8 @@ export default { multiLanguage: '', authControl: '', userType: '', + autoSerialNumber:'', + siteCode:'', }, mutations: { updateId (state, id) { @@ -35,6 +37,12 @@ export default { }, updateAuthControl (state,authControl){ state.authControl = authControl + }, + updateAutoSerialNumber (state,autoSerialNumber){ + state.autoSerialNumber = autoSerialNumber + }, + updateSiteCode (state,siteCode){ + state.siteCode = siteCode } } } diff --git a/src/views/main.vue b/src/views/main.vue index 2958978..39857aa 100644 --- a/src/views/main.vue +++ b/src/views/main.vue @@ -104,6 +104,22 @@ this.$store.commit('user/updateUserDisplay', val) } }, + autoSerialNumber:{ + get() { + return this.$store.state.user.autoSerialNumber + }, + set(val) { + this.$store.commit('user/updateAutoSerialNumber', val) + } + }, + siteCode:{ + get() { + return this.$store.state.user.siteCode + }, + set(val) { + this.$store.commit('user/updateSiteCode', val) + } + }, }, created() { this.getUserInfo() @@ -126,7 +142,6 @@ method: 'get', params: this.$http.adornParams() }).then(({data}) => { - console.log(data.user.userTypeDesc) if (data && data.code === 0) { this.loading = false this.userId = data.user.userId @@ -136,6 +151,8 @@ this.site = data.user.site this.userDisplay = data.user.userDisplay this.userType = data.user.userTypeDesc + this.autoSerialNumber = data.user.autoSerialNumber + this.siteCode = data.user.siteCode } }) }, diff --git a/src/views/modules/factory/tblbasedata.vue b/src/views/modules/factory/tblbasedata.vue index d240a33..32e5acf 100644 --- a/src/views/modules/factory/tblbasedata.vue +++ b/src/views/modules/factory/tblbasedata.vue @@ -27,6 +27,8 @@ let site = { active: '', buNo: '', defaultCountry:'', + autoSerialNumber: '', + siteCode: '', } export default { name: 'TblBaseData', @@ -49,11 +51,13 @@ export default { siteForm:{ ...site, active: 'Y', + autoSerialNumber: 'N', }, saveFormRules:{ siteName: [{ required: true, message: 'Please input Site Name', trigger: ['blur','change'] }], active: [{ required: true, message: 'Please select Active', trigger: ['blur','change'] }], defaultCountry: [{ required: true, message: 'Please select Default Country', trigger: ['blur','change'] }], + siteCode: [{ required: true, message: 'Please input Site Code', trigger: ['blur','change'] }], }, saveVisible: false, tableLoading: false, @@ -331,6 +335,7 @@ export default { closeSaveForm(){ this.siteForm = { ...site, + autoSerialNumber: 'N', active: 'Y' } this.$refs.siteForm.resetFields(); @@ -447,6 +452,11 @@ export default { }) } }, + watch:{ + 'siteForm.siteCode'(newVal, oldVal){ + this.siteForm.siteCode = newVal.toUpperCase() + } + }, created () { if (this.$store.state.user.userType === 'Site Admin'){ this.site.siteId = this.$store.state.user.site @@ -454,6 +464,7 @@ export default { this.getSiteList(); this.getTableUserColumn("998001Table",1) // this.getTableDefaultListGroupLanguage("998001Table") + console.log(this.$store.state.user.autoSerialNumber) } } @@ -515,24 +526,37 @@ export default { - + - + + + + Auto SN Generation + + - + + + + + + + + + - + @@ -542,11 +566,6 @@ export default { - - - - - @@ -559,7 +578,7 @@ export default { - + Active diff --git a/src/views/modules/label/logisticLabelRecord.vue b/src/views/modules/label/logisticLabelRecord.vue index 8db0a93..6613252 100644 --- a/src/views/modules/label/logisticLabelRecord.vue +++ b/src/views/modules/label/logisticLabelRecord.vue @@ -224,6 +224,7 @@ export default { handleQuery () { let params = { ...this.logisticLabelRecord, + site:this.$store.state.user.site, no: this.no, size: this.size } @@ -269,7 +270,7 @@ export default { let row = { ...this.selectionDataList[i], qty:this.selectionDataList[i].unitQtyPerPallet, - qrCode: `(00)${this.selectionDataList[i].partNo? this.selectionDataList[i].partNo : ''}(01)${this.selectionDataList[i].unitQtyPerPallet? this.selectionDataList[i].unitQtyPerPallet : ''}(02)${this.selectionDataList[i].umName? this.selectionDataList[i].umName : ''}(03)${this.selectionDataList[i].manufacturerDate ? this.selectionDataList[i].manufacturerDate : ''}(04)(05)(06)(07)(08)(09)(10)${this.selectionDataList[i].poNo? this.selectionDataList[i].poNo : ''}`, + qrCode: `(00)${this.selectionDataList[i].partNo? this.selectionDataList[i].partNo : ''}(01)${this.selectionDataList[i].unitQtyPerPallet? this.selectionDataList[i].unitQtyPerPallet : ''}(02)${this.selectionDataList[i].umName? this.selectionDataList[i].umName : ''}(03)(04)(05)(06)(07)(08)(09)(10)${this.selectionDataList[i].poNo? this.selectionDataList[i].poNo : ''}`, } let qrCodeList = this.$refs.qrCode.init([row.qrCode]) row.qrCode = qrCodeList[0] diff --git a/src/views/modules/label/printer.vue b/src/views/modules/label/printer.vue index 0c88214..d417518 100644 --- a/src/views/modules/label/printer.vue +++ b/src/views/modules/label/printer.vue @@ -1066,6 +1066,7 @@ export default { }) } }) + this.printLoading = false; }, savePrintLogisticLabel() { let params = { @@ -1078,7 +1079,7 @@ export default { let labelList = this.labelFormatList.filter((item)=> item.labelType === 'Logistic Label') for (let i = 0; i < this.currentPartLogistic.countOfPallets; i++) { let row = { - qrCode: `(00)${this.currentPartLogistic.partNo? this.currentPartLogistic.partNo : ''}(01)${this.currentPartLogistic.unitQtyPerPallet? this.currentPartLogistic.unitQtyPerPallet : ''}(02)${this.currentPartLogistic.umName? this.currentPartLogistic.umName : ''}(03)${data.row.manufacturerDate? data.row.manufacturerDate : ''}(04)(05)(06)(07)(08)(09)(10)${this.currentPartLogistic.poNo? this.currentPartLogistic.poNo : ''}`, + qrCode: `(00)${this.currentPartLogistic.partNo? this.currentPartLogistic.partNo : ''}(01)${this.currentPartLogistic.unitQtyPerPallet? this.currentPartLogistic.unitQtyPerPallet : ''}(02)${this.currentPartLogistic.umName? this.currentPartLogistic.umName : ''}(03)(04)(05)(06)(07)(08)(09)(10)${this.currentPartLogistic.poNo? this.currentPartLogistic.poNo : ''}`, partNo:this.currentPartLogistic.partNo, partDesc:this.currentPartLogistic.partDesc, poNo:this.currentPartLogistic.poNo,