diff --git a/.vscode/settings.json b/.vscode/settings.json index 95d7ab2..e1e441f 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -15,7 +15,7 @@ "editor.defaultFormatter": "esbenp.prettier-vscode" }, "[vue]": { - "editor.defaultFormatter": "esbenp.prettier-vscode" + "editor.defaultFormatter": "johnsoncodehk.volar" }, "[json]": { "editor.defaultFormatter": "esbenp.prettier-vscode" diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index fc44e8d..b48d908 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -24,6 +24,7 @@ export default { request_Tip11: 'HTTP版本不受支持', sweep: '是否退扫', success: '操作成功', + recommended: '推荐库位', error: '操作失败', operation: '操作', //版本更新 @@ -35,6 +36,7 @@ export default { //服务器设置 ServerSetting: '服务器设置', PleaseInputIPAddress: '请输入IP地址', + open: '开启', PleaseInputPortNumber: '请输入端口号', Save: '保存', TryAgain: '地址无效或服务不可用,请重试', @@ -391,6 +393,8 @@ export default { product_Tip1: '库位不能为空', product_Tip2: '请至少选择一条数据', product_Tip3: '请选择库位', + Enable: '库位记忆已开启', + Closerepository: '库位记忆已关闭', product_Tip7: '同一条码不可重复录入!', product_Tip8: '扫码成功', product_Tip9: '该条码未入库', diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index 10381d0..0ec9990 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -254,8 +254,12 @@ export default { InventoryMateriel: 'MAT name', InventoryTotalNumber: 'Total', create: 'create', + open: 'open', materialName: 'materialName', + Enable: 'The memory function is enabled', + Closerepository: 'The memory function is disabled', quantityNum: 'The loading quantity', + recommended: 'RecommendedLoc', materialCode: 'Please enter the material number', receive: 'receiveLoc', Production: 'Production orders', diff --git a/src/pages/login/login/index.vue b/src/pages/login/login/index.vue index 9b116da..66b1488 100644 --- a/src/pages/login/login/index.vue +++ b/src/pages/login/login/index.vue @@ -150,7 +150,7 @@ export default class LoginPage extends BasePage { console.log('image', this.image); console.log('Version////', this.Version); } - Version = '1.0.16'; + Version = '1.0.19'; compareVersion(version1: any, version2: any) { //如果version1 大 会返回1 &&& 如果version2 大 会返回 -1 const newVersion1 = `${version1}`.split('.').length < 3 ? `${version1}`.concat('.0') : `${version1}`; diff --git a/src/pages/product/inbound/finishProductOffline/index.vue b/src/pages/product/inbound/finishProductOffline/index.vue index 14441b4..8af268c 100644 --- a/src/pages/product/inbound/finishProductOffline/index.vue +++ b/src/pages/product/inbound/finishProductOffline/index.vue @@ -13,22 +13,14 @@ + + + {{ $t('message.product_add') }} - - - - - - - - - - - @@ -96,6 +88,7 @@ export default class finishProductOfflineDom extends BasePage { * 月台类型选择 */ returningTypeSelect = false; + open = false; /** * 页面Module */ @@ -141,7 +134,20 @@ export default class finishProductOfflineDom extends BasePage { bookTypeChange(e: any) { this.form.aimWl = e.pickerName; } - + change(status: any) { + console.log(status); + if (this.open) { + uni.showToast({ + title: this.$t('message.Enable') as string, + image: '/static/icons/icon-51.png', + }); + } else { + uni.showToast({ + title: this.$t('message.Closerepository') as string, + image: '/static/icons/icon-52.png', + }); + } + } // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕 async onReady() { this.$form.setRules(this.rules); @@ -269,18 +275,50 @@ export default class finishProductOfflineDom extends BasePage { } } async getBarcode() { - if (this.form.barCode.length < 20) { - this.customToast(this.$t('message.barCodeLength') as string); - return; - } - if (this.form.barCode.length > 20) { - this.customToast(this.$t('message.standard') as string); - return; - } - await this.model.queryOrderInInfo(this.form); - if (this.model.searchCode == '1') { - await this.model.queryTypeList(this.model.materielList[0].productCode); - this.form.aimWl = model.firstLocation; + if (this.open == false) { + if (this.form.barCode.length < 20) { + this.customToast(this.$t('message.barCodeLength') as string); + return; + } + if (this.form.barCode.length > 20) { + this.customToast(this.$t('message.standard') as string); + return; + } + await this.model.queryOrderInInfo(this.form); + if (this.model.searchCode == '1') { + await this.model.queryTypeList(this.model.materielList[0].productCode); + this.form.aimWl = model.firstLocation; + } + } else { + if (this.form.barCode.length < 20) { + this.customToast(this.$t('message.barCodeLength') as string); + return; + } + if (this.form.barCode.length > 20) { + this.customToast(this.$t('message.standard') as string); + return; + } + await this.model.queryOrderInInfo(this.form); + if (this.model.searchCode == '1') { + if (this.materielList.length == 0) { + this.materielList.push(this.model.materielList[0]); + this.materielList[this.materielList.length - 1].locCode = this.form.aimWl.label; + } else { + let flag = 0; + for (let i = 0; i < this.materielList.length; i++) { + if (this.form.barCode == this.materielList[i].barcode) { + flag = 1; + break; + } + } + if (flag == 0) { + this.materielList.push(this.model.materielList[0]); + this.materielList[this.materielList.length - 1].locCode = this.form.aimWl.label; + } else { + this.customToast(this.$t('message.product_Tip7') as string); + } + } + } } } } @@ -306,13 +344,16 @@ export default class finishProductOfflineDom extends BasePage { font-size: 34rpx; font-weight: 500; text-align: center; + .title { flex: 3; } + .left, .right { flex: 1; } + .icon { display: flex; justify-content: center; diff --git a/src/pages/raw/handover/feeding/config.ts b/src/pages/raw/handover/feeding/config.ts index b49feec..967e1b1 100644 --- a/src/pages/raw/handover/feeding/config.ts +++ b/src/pages/raw/handover/feeding/config.ts @@ -90,18 +90,40 @@ export const PropoHeader = [ { label: vm.$t('message.po_MaterielNo'), key: 'materialCode', - width: 177, + width: 300, }, { label: vm.$t('message.po_MaterielDes'), - key: 'sendSpot', + key: 'materialDesc', + width: 450, }, { label: vm.$t('message.Pi_unit'), - key: 'wlCode', + key: 'unit', + width: 300, }, { label: vm.$t('message.Production'), - key: 'qty', + key: 'prdOrder', + width: 300, + }, +]; +export const CreteListHeader = [ + { + label: vm.$t('message.po_MaterielNo'), + key: 'materialCode', + width: 200, + }, + { + label: vm.$t('message.receiveAStation'), + key: 'sendSpot', + }, + { + label: vm.$t('message.Production'), + key: 'prdOrder', + }, + { + label: vm.$t('message.quantityNum'), + key: 'amount', }, ]; diff --git a/src/pages/raw/handover/feeding/create.vue b/src/pages/raw/handover/feeding/create.vue index b385eb7..082f398 100644 --- a/src/pages/raw/handover/feeding/create.vue +++ b/src/pages/raw/handover/feeding/create.vue @@ -11,38 +11,38 @@ - {{ $t('message.Warehouse_Tip6') }} + {{ $t('message.Warehouse_Tip6') }} {{ $t('message.Production') }}: - {{ some.materialDesc }} + {{ some.prdOrder }} {{ $t('message.Pi_materielNo') }}: - {{ some.materialDesc }} + {{ some.materialCode }} {{ $t('message.materialName') }}: - {{ some.totalFillAmount }} + {{ some.materialDesc }} {{ $t('message.Pi_unit') }}: - {{ some.amount }} + {{ some.unit }} {{ $t('message.receiveAStation') }}: - {{ some.amount }} + {{ some.sendSpot }} @@ -56,25 +56,31 @@ - + - {{ $t('message.po_MaterielNo') }} - + {{ $t('message.Production') }} + - + + + + {{ $t('message.po_MaterielNo') }} + + + {{ $t('message.Query') }} - - - + + + - {{ $t('message.workArea_Confirm') }} + {{ $t('message.workArea_Confirm') }}
@@ -96,298 +102,142 @@ @@ -398,23 +248,28 @@ export default class RawReceiptDetail extends BasePage { background-size: 100% 600rpx; padding: 118rpx 30rpx 162rpx; min-height: 100%; + .uni-scroll-view-content { overflow-x: auto; + .single { width: 100%; - height: 100px; + height: 80px; display: flex; - padding-top: 50px; + padding-top: 30px; + .single-left { - width: 80%; + width: 100%; height: 60px; display: flex; + view { width: 110rpx; height: 100%; line-height: 100rpx; } } + .single-right { button { margin-top: 15rpx; @@ -423,7 +278,35 @@ export default class RawReceiptDetail extends BasePage { } } } + + .singles { + width: 100%; + height: 50px; + // height: 100px; + display: flex; + + .single-lefts { + width: 80%; + height: 60px; + display: flex; + + view { + width: 110rpx; + height: 100%; + line-height: 100rpx; + } + } + + .single-rights { + button { + margin-top: 15rpx; + width: 150rpx; + height: 70rpx; + } + } + } } + .header { position: fixed; top: 36rpx; @@ -437,13 +320,16 @@ export default class RawReceiptDetail extends BasePage { font-size: 34rpx; font-weight: 500; text-align: center; + .title { flex: 3; } + .left, .right { flex: 1; } + .icon { display: flex; justify-content: center; @@ -452,41 +338,50 @@ export default class RawReceiptDetail extends BasePage { height: 88rpx; } } + .content { width: 100%; background: white; border-radius: 15rpx; padding: 10rpx; + .material { width: 100%; height: 100rpx; display: flex; + .material-left { width: 100%; height: 100%; display: flex; + view { width: 145rpx; line-height: 100rpx; } + .search { padding-left: 12px; } } } + .material { width: 100%; height: 100rpx; display: flex; + .material-right { width: 100%; height: 100%; display: flex; + .material-right-title { width: 145rpx; height: 100%; line-height: 100rpx; } + .material-right-code { width: 80%; height: 100%; @@ -497,18 +392,22 @@ export default class RawReceiptDetail extends BasePage { } } } + .number { height: 100rpx; display: flex; + .number-left { width: 50%; height: 100%; display: flex; + .number-left-title { width: 120rpx; height: 100%; line-height: 100rpx; } + .input { width: 200rpx; height: 70rpx; @@ -516,16 +415,19 @@ export default class RawReceiptDetail extends BasePage { margin-left: 15rpx; } } + .number-right { width: 50%; height: 100%; display: flex; + .number-right-title { width: 120rpx; height: 100%; line-height: 100rpx; text-align: center; } + .input { width: 200rpx; height: 70rpx; @@ -534,32 +436,39 @@ export default class RawReceiptDetail extends BasePage { } } } + .library { width: 100%; height: 100rpx; + .library-left { width: 100%; height: 100%; - display: flex; + // display: flex; + view { width: 120rpx; line-height: 100rpx; } - .search { - padding-left: 19px; - text-align: left; + + .material-right-code { + width: 200px; + padding-left: 20px; } } + .library-right { width: 50%; height: 100%; display: flex; + .library-right-title { width: 120rpx; height: 100%; line-height: 100rpx; // text-align: center; } + .input { width: 200rpx; height: 70rpx; @@ -567,10 +476,12 @@ export default class RawReceiptDetail extends BasePage { margin-left: 15rpx; } } + .add { width: 100%; height: 100rpx; position: relative; + button { position: absolute; top: 10rpx; @@ -579,6 +490,7 @@ export default class RawReceiptDetail extends BasePage { } } } + .bottom-bar { z-index: 21; position: fixed; diff --git a/src/pages/raw/handover/feeding/model.ts b/src/pages/raw/handover/feeding/model.ts index 0d77d06..896b8b7 100644 --- a/src/pages/raw/handover/feeding/model.ts +++ b/src/pages/raw/handover/feeding/model.ts @@ -18,11 +18,13 @@ export class FeedingModule extends VuexModule { blDetailList: any[] = []; detailedList: any; LocList: any = []; + submitListCode: any = ''; /** * 库位列表 */ locationList = []; + MaterialList: any = []; /** * 补料明细列表是否有选择项 @@ -177,6 +179,23 @@ export class FeedingModule extends VuexModule { return { locationList }; } + @MutationAction + async queryMaterialList(params: any) { + const res: any = await http.post(url.auth.query.queryAppendDetail, { + factoryCode: session.factoryCode, + loginName: session.loginName, + prdOrder: params.prdOrder, + materialCode: params.materialCode, + }); + const MaterialList = res.list; + return { MaterialList }; + } + @MutationAction + async submitList(params: any) { + const res: any = await http.post(url.auth.query.createAppendList, params); + const submitListCode = res.code; + return { submitListCode }; + } @Action({ commit: 'updateCheckedOrderInInfoListKw' }) async queryByFactoryCodeAndWorkAreaCode(content: any) { const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content); diff --git a/src/pages/raw/handover/virtual/summary.vue b/src/pages/raw/handover/virtual/summary.vue index 3129dc9..dfeeb7a 100644 --- a/src/pages/raw/handover/virtual/summary.vue +++ b/src/pages/raw/handover/virtual/summary.vue @@ -8,24 +8,10 @@ - + - - - - - - - - - - @@ -55,6 +41,18 @@ + + + + + {{ $t('message.dn_Number') }} + + + + {{ $t('message.product_Confirm') }} + + + @@ -87,6 +85,9 @@ export default class VirtualSummary extends BasePage { * 表头 */ headers = summaryHeaders; + show = false; + nextNum: any = ''; + itemIndex = 0; /** * 处理完成 @@ -136,8 +137,8 @@ export default class VirtualSummary extends BasePage { // 必须要在onReady生命周期,因为onLoad生命周期组件可能尚未创建完毕 onReady() { - this.$amountForm.setRules(this.amountFormRules); - this.$submitForm.setRules(this.submitFormRules); + // this.$amountForm.setRules(this.amountFormRules); + // this.$submitForm.setRules(this.submitFormRules); this.isBusinessFinished = false; } /** @@ -150,76 +151,43 @@ export default class VirtualSummary extends BasePage { this.submitForm.receiver = this.submitForm.receiverName; this.submitForm.receiverName = userName; } + Modify(e: any) { + this.itemIndex = e.contentIndex; + this.show = !this.show; + this.nextNum = ''; + } + ModifyConfirm() { + if (this.nextNum == '') { + uni.showToast({ + title: this.$t('message.Summary_PleaseInputNumber') as any, + image: '/static/icons/icon-52.png', + }); + return; + } + let num: any = parseFloat(this.model.proOrderResultList[this.itemIndex].amount) - parseFloat(this.model.proOrderResultList[this.itemIndex].totalMoAmount); + if (parseFloat(this.nextNum) > num) { + uni.showToast({ + title: this.$t('message.Commission_tips4') as any, + image: '/static/icons/icon-52.png', + }); + return; + } + this.model.proOrderResultList[this.itemIndex].hvAmount = this.nextNum; + this.show = !this.show; + } //选中其中某一行数据 ClickHandover(e: any) { console.log(e); - let item = e.data[e.data.length - 1].lineData; - let num: any = parseFloat(item.amount) - parseFloat(item.totalMoAmount); - if (num > item.virtualAmount) { - this.amountForm.amount = item.virtualAmount; + if (e.data.length != this.model.proOrderResultList.length) { + let index = e.data[e.data.length - 1].index; + let num: any = parseFloat(this.model.proOrderResultList[index].amount) - parseFloat(this.model.proOrderResultList[index].totalMoAmount); + this.model.proOrderResultList[index].hvAmount = num; } else { - this.amountForm.amount = num; - } - } - onOk() { - this.$amountForm.validate(async (valid) => { - if (!valid) return; - // 检查 - const firstRecord = model.proOrderResultList[0]; - if (firstRecord === undefined) { - this.customToast(this.$t('message.LBWK') as string); - return; - } - console.log('firstRecord', firstRecord); - ///此接口的作用?????? - await model.checkAmount({ - sapFactoryCode: model.sapFactoryCode, - loginName: session.loginName as string, - materialCode: firstRecord.materialCode, - unit: firstRecord.unit, - mrpCode: firstRecord.mrpCode, - factoryCode: session.factoryCode as string, - sendSpot: firstRecord.sendSpot, - amount: this.amountForm.amount, + this.model.proOrderResultList.forEach((item: any) => { + let num: any = parseFloat(item.amount) - parseFloat(item.totalMoAmount); + item.hvAmount = num; }); - // 改数 - const firstSelection = this.model.proOrderResultList.filter((_: any) => _.checked); - console.log('.......????', firstSelection.length); - if (firstSelection === undefined) { - this.customToast(this.$t('message.Pi_tip7') as string); - } else { - if (firstSelection.length > 1) { - this.customToast(this.$t('message.Pi_tip19') as string); - return; - } else { - const inputAmount = parseFloat(this.amountForm.amount); //本次交接数量 - //const totalHvAmount = firstSelection[0].totalHvAmount; - const demand = firstSelection[0].amount; //需求数量 - const totalMoAmount = firstSelection[0].totalMoAmount; //累计拣配数量 - console.log('2222', 2222222222222222222); - if (inputAmount + totalMoAmount > demand) { - this.customToast(this.$t('message.Pi_tip14') as string); - return; - } - console.log(1); - if (inputAmount <= 0) { - this.customToast(this.$t('message.Pi_tip2') as string); - } else { - this.model.proOrderResultList.forEach((item: any) => { - if (item.checked) { - item.hvAmount = this.amountForm.amount; - } - }); - uni.showToast({ - //icon: 'success', - title: this.$t('message.success') as string, - duration: 2000, - image: '/static/icons/icon-51.png', - }); - } - } - } - }); + } } onSubmit() { this.$submitForm.validate(async (valid) => { @@ -330,13 +298,16 @@ export default class VirtualSummary extends BasePage { font-size: 34rpx; font-weight: 500; text-align: center; + .title { flex: 3; } + .left, .right { flex: 1; } + .icon { display: flex; justify-content: center; @@ -363,6 +334,34 @@ export default class VirtualSummary extends BasePage { right: 0; z-index: 1000; + .singles { + width: 100%; + height: 50px; + // height: 100px; + display: flex; + padding-top: 35px; + + .single-lefts { + width: 80%; + height: 60px; + display: flex; + + view { + width: 110rpx; + height: 100%; + line-height: 100rpx; + } + } + + .single-rights { + button { + margin-top: 15rpx; + width: 150rpx; + height: 70rpx; + } + } + } + .container { background: #ffffff; box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2); diff --git a/src/utils/url.ts b/src/utils/url.ts index 3da0f09..2b9aba8 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -25,6 +25,8 @@ export const url = { query: { location: '/wmspda/auth/query/location', location1: '/wmspda/material/orderin/receiveloc', + queryAppendDetail: '/wmspda/bl/queryAppendDetail', + createAppendList: '/wmspda/bl/createAppendList', }, systime: '/wmspda/auth/systime', userInfo: '/wmspda/auth/userinfo',