From 1e7bdd4ad9d02de063d91a75a93ac674d47e7247 Mon Sep 17 00:00:00 2001 From: hou <1601990943@qq.com> Date: Mon, 11 Apr 2022 18:28:07 +0800 Subject: [PATCH] =?UTF-8?q?cosmoim-852=20fix=20=E5=A7=94=E5=A4=96=E5=85=A5?= =?UTF-8?q?=E5=BA=93=E9=80=BB=E8=BE=91=E9=87=8D=E6=9E=84=20=20=E5=85=B6?= =?UTF-8?q?=E4=BB=96=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 3 + src/i18n/lang/cn.ts | 6 + src/i18n/lang/en.ts | 6 + src/pages.json | 8 + src/pages/raw/commission/entrant/config.ts | 30 +- src/pages/raw/commission/entrant/detail.vue | 2 +- src/pages/raw/commission/entrant/index.vue | 546 ++++++++++------ .../raw/commission/entrant/model.location.ts | 107 +++ src/pages/raw/commission/entrant/model.ts | 60 +- src/pages/raw/handover/feeding/config.ts | 23 +- src/pages/raw/handover/feeding/create.vue | 609 ++++++++++++++++++ src/pages/raw/handover/picking/index.vue | 3 - src/utils/url.ts | 3 + 13 files changed, 1199 insertions(+), 207 deletions(-) create mode 100644 src/pages/raw/commission/entrant/model.location.ts create mode 100644 src/pages/raw/handover/feeding/create.vue diff --git a/src/App.vue b/src/App.vue index e53887c..4a473bc 100644 --- a/src/App.vue +++ b/src/App.vue @@ -77,4 +77,7 @@ page { background: #ecefefb3; color: rgb(158, 157, 157); } +.u-mode-center-box { + padding: 5px; +} diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index 7505ab6..fc44e8d 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -116,6 +116,7 @@ export default { SweptQuantity: '已扫数量', dn_PleaseScan: '请扫描DN单号', barcode_PleaseScan: '请扫描条码', + create: '补料创建', dn_CarNumber: '车牌号', dn_Time: '预约时间', Closed: '闭单', @@ -145,10 +146,12 @@ export default { Query: '查询', time: '请先选择时间', scrapForm: '请先扫描报废单', + materialName: '物料名称', finishedProduct: '请先选择成品编码', Pi_InputMrp: '请输入MRP', Pi_InputFactory: '请输入工厂代码', shortage: '短缺数量', + Production: '生产订单', Pi_OrderNoNotSelected: '未选中订单号', Pi_NoDataFound: '未查询到数据', differences: '差异数量', @@ -224,6 +227,8 @@ export default { Feeding_ReplenishmentDetails: '补料明细', Feeding_Tip1: '请输入补料数量', Feeding_Tip2: '本次补料数量为大于0的整数!', + receive: '接收库位', + quantityNum: '补料数量', Feeding_Tip3: '请输入口令/密码!', Feeding_Tip4: '请输入接收人!', Feeding_ReplenishedQuantity: '已补数量', @@ -399,6 +404,7 @@ export default { product_unit5: '箱', product_unit6: '其他', product_unit7: '请输入物料条码', + materialCode: '请输入物料号', code: '盘点单号', //成品空调/洗衣机下线 //半成品门体上线 diff --git a/src/i18n/lang/en.ts b/src/i18n/lang/en.ts index a54fae6..10381d0 100644 --- a/src/i18n/lang/en.ts +++ b/src/i18n/lang/en.ts @@ -253,6 +253,12 @@ export default { InventoryMaterielNo: 'MAT code', InventoryMateriel: 'MAT name', InventoryTotalNumber: 'Total', + create: 'create', + materialName: 'materialName', + quantityNum: 'The loading quantity', + materialCode: 'Please enter the material number', + receive: 'receiveLoc', + Production: 'Production orders', InventoryPleaseScan: 'Please scan No.', InventoryFinish: 'Finish', collecting: 'Please enter the collecting doc No', diff --git a/src/pages.json b/src/pages.json index f7251ae..77c3fcc 100644 --- a/src/pages.json +++ b/src/pages.json @@ -498,6 +498,14 @@ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 } }, + { + "path": "pages/raw/handover/feeding/create", + "style": { + "navigationBarTitleText": "补料创建", + "navigationStyle": "custom", // 隐藏系统导航栏 + "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一 + } + }, { "path": "pages/raw/ingoods/dnReturnGoods/Location", "style": { diff --git a/src/pages/raw/commission/entrant/config.ts b/src/pages/raw/commission/entrant/config.ts index 7db4e27..d101737 100644 --- a/src/pages/raw/commission/entrant/config.ts +++ b/src/pages/raw/commission/entrant/config.ts @@ -28,13 +28,13 @@ export const headers = [ width: 300, }, { - label: vm.$t('message.CommissionedReceiptQuantity'), - key: 'amount', + label: vm.$t('message.CommissionedNumber'), + key: 'receiptAmount', width: 200, }, { label: vm.$t('message.CommissionedLocation'), - key: 'wlCode', + key: 'sendSpot', width: 200, }, ]; @@ -55,3 +55,27 @@ export const detailHeader = [ width: 186, }, ]; +export const DNheader = [ + { + label: vm.$t('message.Line'), + key: 'poLine', + }, + { + label: vm.$t('message.po_OddNumbers'), + key: 'poNo', + width: 350, + }, + { + label: vm.$t('message.Pi_materielNo'), + key: 'materialCode', + width: 350, + }, + { + label: vm.$t('message.CommissionedLocation'), + key: 'wlCode', + }, + { + label: vm.$t('message.product_Number'), + key: 'receiptAmount', + }, +]; diff --git a/src/pages/raw/commission/entrant/detail.vue b/src/pages/raw/commission/entrant/detail.vue index 38d7cb9..0f97457 100644 --- a/src/pages/raw/commission/entrant/detail.vue +++ b/src/pages/raw/commission/entrant/detail.vue @@ -17,7 +17,7 @@ - + diff --git a/src/pages/raw/commission/entrant/index.vue b/src/pages/raw/commission/entrant/index.vue index ae43da6..92461d4 100644 --- a/src/pages/raw/commission/entrant/index.vue +++ b/src/pages/raw/commission/entrant/index.vue @@ -12,68 +12,73 @@ - {{ $t('message.CommissionedSingleNumber') }} - + {{ $t('message.dn_OddNumbers') }} + {{ $t('message.Query') }} + + + + {{ $t('message.Purchase') }} + + + - {{ $t('message.CommissionedMaterielNo') }} + {{ $t('message.Materiel') }} - - + {{ $t('message.CommissionedMaterielDesc') }} {{ every.materialDesc }} + - {{ $t('message.CommissionedDemandData') }} - + {{ $t('message.DemandQuantity') }} + {{ $t('message.Cumulative') }} - + + {{ $t('message.CommissionedLocation') }} - + {{ $t('message.CommissionedThisNumber') }} - + {{ $t('message.product_add') }} - - + - - {{ $t('message.CommissionedDetails') }} + + {{ $t('message.CommissionedEntrantDetails') }} - - {{ $t('message.closure') }} - - + {{ $t('message.product_Upload') }} - + {{ $t('message.po_Return') }} @@ -86,7 +91,9 @@ import { BasePage } from '@/components/base/page'; import jPicker from '@/components/J-Picker/jPicker.vue'; import { session } from '@/store/modules/session'; import model from './model'; -import { detailHeader } from './config'; +import LocationDetail from './model.location'; +import { DNheader } from './config'; +import { url } from '@/utils/url'; @Component({ components: { jPicker, @@ -94,29 +101,42 @@ import { detailHeader } from './config'; }) export default class dnReceiptDom extends BasePage { model = model; - detailHeader = detailHeader; form: any = { documentNo: '', }; - material: any = {}; + // 原始物料列表(这里不准确,要修改) + material: any = []; + poList: any = []; materialList: any = []; - materialIndex: any = null; - list: any = []; - every: any = ''; + // 当前被选择中原材料 + every: any = {}; + everyIndex: any = ''; value = ''; + headers = DNheader; type = 'text'; + //要提交的数据 + DNReceivingList: any = []; border = true; - nowAmount: any = ''; + //本次数量 + receiptAmount: any = ''; //库位 - Location: any = []; - //所选择的库位 - wlCode: any = ''; - //页面初始化 - async onLoad() { - await this.QueryLoc(); + Location: LocationDetail[] = []; + //添加的库位和数量的列表 + LocationList: any = []; + //所选择的库位对象 + wl: any = { + value: null, + }; + //所选择的采购单号 + poNo: any = null; + // 需求数量 + requestAmount: number = null; + // 页面初始化 + async onShow() { + await this.queryLoction(); } - async QueryLoc() { - //页面初始化 获取可选库位 + async queryLoction() { + this.Location = []; let sendSpot = JSON.parse(uni.getStorageSync('sendSpot') as any); let content = { loginName: session.loginName, @@ -124,168 +144,284 @@ export default class dnReceiptDom extends BasePage { factoryCode: session.factoryCode, workArea: session.workareaCode, }; - await this.model.queryByFactoryCodeAndWorkAreaCode(content); - this.model.LoctionList.forEach((item: any) => { + let res: any = await this.model.queryList(content); + res.forEach((item: LocationDetail) => { let pickerName: any = {}; pickerName.label = item.locationCode; pickerName.value = item.locationCode + '(' + item.sendSpot + ')'; pickerName.sendSpot = item.sendSpot; this.Location.push(pickerName); }); - this.wlCode = this.Location[0]; + this.wl = this.Location[0]; } - //输入单号 查询数据 - async query() { - if (this.form.documentNo == '') { - this.customToast(this.$t('message.Commission_tips1') as any); - return; - } - let res = await this.model.queryOutsourcing(this.form.documentNo); - this.material = res.data; - this.materialList = []; - this.material.forEach((item: any) => { - let pickerName: any = {}; - pickerName.label = item.materialCode; - pickerName.value = item.materialCode; - this.materialList.push(pickerName); - }); - this.every = this.material[0]; - this.materialIndex = 0; - } - //关闭订单号 - async close() { - if (this.form.documentNo == '') { - this.customToast(this.$t('message.Commission_tips1') as any); - return; - } - await this.model.documentNoClose(this.form.documentNo); - if (this.model.closeCode == '1') { - uni.showToast({ - duration: 2000, - title: this.$t('message.Warehouse_Tip9') as string, - image: '/static/icons/icon-51.png', - }); - this.empty(); - this.form.documentNo = ''; - } - } - //选择物料后触发的回调事件 本次数量:receiptAmount 需求数量:requestAmount - async materialChoice(e: any) { - this.material.forEach((item: any, index: any) => { - if (item.materialCode == e.pickerName.value) { - this.every = item; - this.materialIndex = index; - return; - } - }); - this.wlCode = {}; - this.Location = []; - this.model.LoctionList.forEach((item: any) => { - if (item.sendSpot == this.every.sendSpot) { + // 页面需要清空仓库,因此需要复用该方法 + async initLocation(condition): Promise { + console.log('condition>>>>>>>>>>>>>>>>>>.', condition); + //页面初始化 获取可选库位 + let list: Array = []; + let means: any = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__') as any); + let sendSpot = JSON.parse(uni.getStorageSync('sendSpot') as any); + let content = { + loginName: means.session.user.loginName, + sendSpot: sendSpot, + factoryCode: means.session.user.factoryCode, + workArea: session.workareaCode, + }; + let res: any = await this.model.queryList(content); + console.log('>>>>>>>>>>>>>>', res); + res.forEach((item: LocationDetail) => { + if (item.sendSpot === condition.sendSpot) { let pickerName: any = {}; pickerName.label = item.locationCode; pickerName.value = item.locationCode + '(' + item.sendSpot + ')'; pickerName.sendSpot = item.sendSpot; - this.Location.push(pickerName); + list.push(pickerName); } }); - if (this.Location.length != 0) { - this.wlCode = this.Location[0]; - } else { - await this.QueryLoc(); + return list; + } + //输入单号 查询数据 + async query() { + this.empty(); + if (!this.form.documentNo) { + this.customToast(this.$t('message.Commission_tips1') as any); + return; } + await this.model.subcDnInfo(this.form.documentNo); + if (model.code == '1') { + if (this.model.orderInInfoList.length == 0) { + this.empty(); + return; + } + uni.showToast({ + //icon: 'success', + title: this.$t('message.successful') as any, + duration: 2000, + image: '/static/icons/icon-51.png', + }); + let list: any = uni.getStorageSync('list'); + uni.removeStorageSync('list'); + this.material = JSON.parse(list); + this.DNReceivingList = JSON.parse(list); + this.DNReceivingList.forEach((item: any) => { + item.wllist = []; + }); + this.poList = [...this.DNReceivingList]; //结构 + let arr = this.removeDuplicates(this.poList, 'poNo'); + // 组装下拉结构 + arr.forEach((item: any) => { + item.label = item.poNo; + item.value = item.poNo; + }); + this.poList = arr; + // 自动化流程改造测试 + this.poListChoice({ + pickerName: this.poList.find(() => true), + }); + } + } + // 去除重复 方法 + // 传入数组 list 及要去重的属性 valueKey + // 返回去重后的数组对象 + removeDuplicates(list, valueKey: string) { + let temp = {}; + let arr = []; + arr = list.reduce(function (item, next) { + temp[next[valueKey]] ? '' : (temp[next[valueKey]] = true && item.push(next)); + return item; + }, []); + return arr; + } + // ADD方法后的库存数量检测 + totalLocation(list: []) { + const receiptAmount = list.reduce((total: number, nextItem: any): any => { + return total + +nextItem.receiptAmount; + }, 0); + return receiptAmount; + } + //选择采购单后触发的回调事件 + poListChoice(e: any) { + this.receiptAmount = ''; + this.poNo = e.pickerName.value; + // 过滤重复物料 + // this.materialList = JSON.parse(JSON.stringify(this.removeDuplicates(this.material, 'materialCode'))); + this.materialList = JSON.parse(JSON.stringify(this.material)); + console.log('this.materialList??>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', this.materialList); + // 返回物料中poNo为选中的项; + this.materialList = this.materialList.filter((item: any) => { + if (item.poNo == e.pickerName.value) { + item.label = item.materialCode; + item.value = item.materialCode; + return true; + } + }); + console.log('this.materialList', this.materialList); + // 自动化流程改造测试 + this.materialChoice({ + pickerName: this.materialList.find(() => true), + }); + } + //选择物料后触发的回调事件 本次数量:receiptAmount 需求数量:requestAmount + async materialChoice(e: any) { + this.receiptAmount = ''; + // 待放入新增中的公共对象 + this.every = { ...e.pickerName }; + //清空库位列表 避免库位重复添加 + console.log('this.every', this.every); + this.Location = []; + // 查询时初始化仓库 + this.Location = await this.initLocation(this.every); + if (this.Location.length == 0) { + await this.queryLoction(); + } + // 自动化流程改造测试 + this.LocationChoice({ + pickerName: this.Location.find(() => true), + }); + this.DNReceivingList.forEach((item: any, index: any) => { + if (item.poNo == this.every.poNo && item.materialCode == this.every.materialCode && item.poLine == this.every.poLine) { + this.everyIndex = index; + } + }); + this.every = this.DNReceivingList[this.everyIndex]; + this.receiptAmount = parseFloat(this.every.requestAmount); + console.log('this.every', this.every); } //选择库位后触发的回调事件 LocationChoice(e: any) { - this.wlCode = e.pickerName; + this.wl = e.pickerName; } //点击添加 Add() { - if (this.nowAmount == '' || this.wlCode == '') { + const count = parseFloat(this.every.requestAmount); + if (this.receiptAmount == '' || !this.wl.value) { this.customToast(this.$t('message.Commission_tips2') as any); return; } - if (parseFloat(this.nowAmount) <= 0) { + if (parseFloat(this.receiptAmount) <= 0) { this.customToast(this.$t('message.Commission_tips3') as any); return; } - if (parseFloat(this.nowAmount) > this.every.poAmount) { + if (parseFloat(this.receiptAmount) > count || parseFloat(this.receiptAmount) + parseFloat(this.every.receiptAmount) > count) { this.customToast(this.$t('message.Commission_tips4') as any); return; } - let num: number = parseFloat(this.nowAmount) + parseFloat(this.every.receiptAmount); - if (num > parseFloat(this.every.poAmount)) { - this.customToast(this.$t('message.Commission_tips4') as any); - return; + let isTrue = true; + if (isTrue == true) { + this.LocationList.push({ + ...this.every, + receiptAmount: this.receiptAmount, + wlCode: this.wl.label, + }); + this.DNReceivingList[this.everyIndex].wllist.push(this.LocationList[this.LocationList.length - 1]); + let num: any = 0; + this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => { + num += parseFloat(item.receiptAmount); + item.wllist = null; + }); + this.DNReceivingList[this.everyIndex].receiptAmount = num; + this.receiptAmount = ''; + this.every = this.DNReceivingList[this.everyIndex]; } - let arr = { - poNo: this.form.documentNo, - materialCode: this.every.materialCode, - loginName: this.session.loginName, - factoryCode: this.session.factoryCode, - wlCode: this.wlCode.label, - nowAmount: this.nowAmount, - }; - this.list.push(arr); - this.material[this.materialIndex].receiptAmount += parseFloat(this.list[this.list.length - 1].nowAmount); - this.nowAmount = ''; } deleteItem(e: any) { uni.showModal({ - content: this.$t('message.product_Delete') as any, - cancelText: this.$t('message.Cancel') as any, - confirmText: this.$t('message.workArea_Confirm') as any, + content: this.$t('message.product_Delete') as string, + cancelText: this.$t('message.Cancel') as string, + confirmText: this.$t('message.workArea_Confirm') as string, success: (res) => { if (res.confirm) { - this.list.splice(e.contentIndex, 1); - let i: any; - this.material.forEach((item: any, index: any) => { - if (item.materialCode == e.lineData.materialCode) { - i = index; + this.LocationList.splice(e.contentIndex, 1); + let externalIndex = 0; + this.DNReceivingList.forEach((item: any, index: any) => { + if (item.poNo == e.lineData.poNo && item.materialCode == e.lineData.materialCode && item.poLine == e.lineData.poLine) { + externalIndex = index; } }); - this.material[i].receiptAmount -= parseFloat(e.lineData.nowAmount); + let inside = 0; + this.DNReceivingList[externalIndex].wllist.forEach((item: any, index: any) => { + if (item.receiptAmount == e.lineData.receiptAmount && item.wlCode == e.lineData.wlCode) { + inside = index; + } + }); + this.DNReceivingList[externalIndex].wllist.splice(inside, 1); + let num = 0; + this.DNReceivingList[externalIndex].wllist.forEach((item: any) => { + num += parseFloat(item.receiptAmount); + }); + this.DNReceivingList[externalIndex].receiptAmount = num; } else if (res.cancel) { return; } }, }); } - empty() { - this.list = []; - this.wlCode = ''; - this.nowAmount = ''; - this.every = ''; - this.materialList = []; - this.material = {}; + // 重置页面数据 + async resetForm() { + // this.form.documentNo = ''; + // 清空 add table + this.LocationList = []; + // 仓库 this.Location = []; + this.poNo = ''; + this.poList = []; + // 清空 当前选择的库位对象 + this.wl = { + value: null, + }; + // 清空 物料对象 + this.every = {}; + // 清空 原始物料列表 + // this.material = []; + // 清空 去重后的物料列表 + this.materialList = []; + // 清空 当前累计数量 + this.receiptAmount = null; + this.DNReceivingList = []; + await this.query(); + } + empty() { + this.LocationList = []; + this.Location = []; + this.poNo = ''; + this.poList = []; + this.wl = { + value: null, + }; + this.every = {}; + this.materialList = []; + this.receiptAmount = null; + this.DNReceivingList = []; } async onSubmit() { - if (this.form.documentNo == '') { - this.customToast(this.$t('message.Commission_tips1') as any); - return; - } - if (this.list == null || this.list.length == 0) { + if (this.LocationList.length === 0) { this.customToast(this.$t('message.Commission_tips5') as any); - return; + return null; } - let res: any = await this.model.submitOutsourcing(this.list); - if (res.code == '2') { - uni.showToast({ - duration: 2000, - title: this.$t('message.failed') as string, - image: '/static/icons/icon-52.png', + await this.model.submitOrderInEnter(this.DNReceivingList); + if (this.model.SubmitCode == '1') { + const ServeUrl = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__')); + uni.request({ + url: ServeUrl.server.address + url.material.DNorderin.subcDnInfo, + method: 'POST', + data: { + dnNo: this.form.documentNo, + factoryCode: session.factoryCode, + loginName: session.loginName, + }, + success: (res: any) => { + console.log(res.data); + if (res.data.code != '0' && res.data.list != null) { + // this.empty(); + this.resetForm(); + } else if (res.data.code == '0' && res.data.list == null) { + this.empty(); + this.form.documentNo = ''; + } + }, }); - this.empty(); - await this.QueryLoc(); - await this.query(); - } else { - this.empty(); - await this.QueryLoc(); - await this.query(); } } - //跳转明细页面 async bill() { if (this.form.documentNo == '') { this.customToast(this.$t('message._tips6') as any); @@ -294,9 +430,9 @@ export default class dnReceiptDom extends BasePage { let person = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__') as any); let content = { loginName: person.session.user.loginName, - poNo: this.form.documentNo, + dnNo: this.form.documentNo, }; - await this.model.querydetaildlist(content); + await this.model.queryBill(content); this.toPage(this.page.raw.commission.entrant.detail); } } @@ -349,7 +485,7 @@ export default class dnReceiptDom extends BasePage { height: 100%; display: flex; view { - width: 130rpx; + width: 110rpx; height: 100%; line-height: 100rpx; } @@ -362,6 +498,32 @@ export default class dnReceiptDom extends BasePage { } } } + .Purchase-title { + width: 100%; + .Purchase { + width: 60%; + height: 100%; + display: flex; + view { + width: 140rpx; + line-height: 100rpx; + } + } + } + // .material { + // width: 100%; + // height: 100rpx; + // display: flex; + // .material-left { + // width: 100%; + // height: 100%; + // display: flex; + // view { + // width: 100rpx; + // line-height: 100rpx; + // } + // } + // } .material { width: 100%; height: 100rpx; @@ -373,16 +535,9 @@ export default class dnReceiptDom extends BasePage { view { width: 140rpx; line-height: 100rpx; - } - .search { - padding-left: 12px; + text-align: left; } } - } - .material { - width: 100%; - height: 100rpx; - display: flex; .material-right { width: 100%; height: 100%; @@ -398,7 +553,6 @@ export default class dnReceiptDom extends BasePage { line-height: 100rpx; text-align: left; padding-left: 10px; - // line-height: 100rpx; } } } @@ -406,7 +560,7 @@ export default class dnReceiptDom extends BasePage { height: 100rpx; display: flex; .number-left { - width: 50%; + width: 45%; height: 100%; display: flex; .number-left-title { @@ -422,58 +576,56 @@ export default class dnReceiptDom extends BasePage { } } .number-right { - width: 50%; + width: 55%; height: 100%; display: flex; .number-right-title { - width: 120rpx; + width: 140rpx; height: 100%; + //text-align: center; line-height: 100rpx; - text-align: center; - } - .input { - width: 100rpx; - height: 70rpx; - margin-top: 15rpx; - margin-left: 30rpx; - } - } - } - .library { - width: 100%; - height: 100rpx; - display: flex; - .library-left { - width: 50%; - height: 100%; - display: flex; - view { - width: 70rpx; - line-height: 100rpx; - } - .search { - padding-left: 1px; - text-align: center; - } - } - .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; margin-top: 15rpx; - margin-left: 30rpx; + margin-left: 15rpx; } } } + // .library { + // width: 100%; + // height: 100rpx; + // display: flex; + // .library-left { + // width: 50%; + // height: 100%; + // display: flex; + // view { + // width: 100rpx; + // line-height: 100rpx; + // } + // .search { + // padding-left: 20px; + // } + // } + // .library-right { + // width: 50%; + // height: 100%; + // display: flex; + // .library-right-title { + // width: 120rpx; + // height: 100%; + // padding-left: 4px; + // line-height: 100rpx; + // } + // .input { + // width: 200rpx; + // height: 70rpx; + // margin-top: 15rpx; + // } + // } + // } .add { width: 100%; height: 100rpx; diff --git a/src/pages/raw/commission/entrant/model.location.ts b/src/pages/raw/commission/entrant/model.location.ts new file mode 100644 index 0000000..3567051 --- /dev/null +++ b/src/pages/raw/commission/entrant/model.location.ts @@ -0,0 +1,107 @@ +/* + * @Author: zhou lei + * @Date: 2021-12-24 12:02:31 + * @LastEditTime: 2021-12-24 14:33:54 + * @LastEditors: zhou lei + * @Description: + * @FilePath: /wms_haiwai_app/src/pages/raw/ingoods/dnReceipt/model.location.ts + * 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司 + */ +/** + * 库位类型 + * @export + * @interface LocationDetail + */ +export default interface LocationDetail { + factoryCode?: string; + cosmoType?: null; + sapFactoryCode?: null; + user?: null; + loginName?: null; + sign?: null; + page?: number; + rows?: number; + schema?: null; + lastModifiedBy?: null; + gmtCreate?: null; + createdBy?: null; + createdByName?: null; + warehouseCode?: string; + warehouseName?: null; + warehouseType?: string; + workareaCode?: null; + createdDate?: null; + createdDateStr?: null; + createdDateMax?: null; + createdDateMaxStr?: null; + createdDateMin?: null; + createdDateMinStr?: null; + lastUpdBy?: null; + lastUpdByName?: null; + lastUpdDate?: null; + lastUpdDateStr?: null; + lastUpdDateMax?: null; + lastUpdDateMin?: null; + activeFlag?: string; + userDefined1?: null; + userDefined2?: null; + userDefined3?: null; + userDefined4?: null; + userDefined5?: null; + userDefined6?: null; + userDefined7?: null; + userDefined8?: null; + userDefined9?: null; + userDefined10?: null; + remark?: null; + createBy?: null; + gmtCreateMin?: null; + gmtCreateStr?: null; + gmtCreateMax?: null; + gmtModified?: null; + gmtModifiedStr?: null; + gmtModifiedMax?: null; + gmtModifiedMin?: null; + locationId?: null; + locationCode?: string; + shelfOrder?: null; + sendSpot?: string; + sendSpotDesc1?: string; + checkOrder?: null; + pickOrder?: null; + locationUse?: null; + pickFlag?: null; + isOpenKnFlag?: null; + locationType?: null; + locationAttr?: null; + turnDemand?: null; + stockEnv?: null; + regionCode?: string; + areaCode?: string; + checkCode?: null; + workArea?: string; + port1?: null; + port2?: null; + port3?: null; + volumeLimit?: null; + weightLimit?: null; + boxLimit?: null; + qtyLimit?: null; + palletLimit?: null; + length?: null; + width?: null; + height?: null; + xcoordinate?: null; + ycoordinate?: null; + zcoordinate?: null; + xpixels?: null; + ypixels?: null; + zpixels?: null; + locRow?: null; + layerNum?: null; + locColumn?: null; + bord?: null; + productMix?: null; + batchMix?: null; + ignoreId?: null; +} diff --git a/src/pages/raw/commission/entrant/model.ts b/src/pages/raw/commission/entrant/model.ts index b8358fd..0530a1d 100644 --- a/src/pages/raw/commission/entrant/model.ts +++ b/src/pages/raw/commission/entrant/model.ts @@ -3,14 +3,18 @@ import store from '@/store'; import http from '@/utils/request'; import { url } from '@/utils/url'; import { session } from '@/store/modules/session'; +import LocationDetail from './model.location'; // import vm from '@/main'; class OrderInInfo { stoAmount?: 0; stoNo?: string; //STO采购单号 + dnNo?: string; orderAmount?: string; //单据总数 Allocated?: string; //已分配 Unallocated?: string; //未分配 + userDefined10: string; + SubmitCode?: string; } @Module({ @@ -25,6 +29,7 @@ export class ReturningModule extends VuexModule { */ returningTypeList: any[] = []; detailedList: any; + SubmitCode: any = ''; /** * 物料列表 @@ -32,7 +37,9 @@ export class ReturningModule extends VuexModule { materielList: any[] = []; locationCodeList: any[] = []; LoctionList: any[] = []; + dnNo = ''; closeCode: any = ''; + DNdetailedList: any; //条码扫描的返回的结果 oneMaterielDetail: any = {}; @@ -40,6 +47,8 @@ export class ReturningModule extends VuexModule { * 订单号查询结果 */ orderInInfo: OrderInInfo = new OrderInInfo(); + orderInInfoList: OrderInInfo[] = []; + orderInInfoListEx: OrderInInfo[] = []; //记账按钮的code码 code = ''; /** @@ -151,6 +160,43 @@ export class ReturningModule extends VuexModule { return { orderInInfo, materielList }; } + @MutationAction + async subcDnInfo(dnNo: string) { + const { list, code }: any = await http.post(url.material.DNorderin.subcDnInfo, { + dnNo, + factoryCode: session.factoryCode, + loginName: session.loginName, + }); + const orderInInfo = list[0] || {}; + const orderInInfoList = list.filter((_: OrderInInfo) => _.userDefined10 === '1'); + const orderInInfoListEx = list.filter((_: OrderInInfo) => _.userDefined10 === '0'); + // orderInInfoList.forEach((item: any) => { + // item.receiptAmount = item.requestAmount; + // }); + uni.setStorageSync('list', JSON.stringify(list) as any); + uni.setStorageSync('sendSpot', JSON.stringify(list[0].sendSpot) as any); + return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx, code }; + } + @MutationAction + async submitOrderInEnter(list: any) { + // const list = (this.state as any).orderInInfoList.map((item: any) => { + // // item.orderStatus = item.checked ? "2" : "1"; + // return item; + // }); + const result: any = await http.post(url.material.DNorderin.subcDnEnter, { + dnNo: this.dnNo, + factoryCode: session.factoryCode, + loginName: session.loginName, + list, + }); + uni.showToast({ + icon: 'none', + title: result.msg, + }); + const SubmitCode = result.code; + const orderInInfoList = result.list.sort((a: any, b: any) => Number(a.accountingStatus) - Number(b.accountingStatus)); + return { orderInInfoList, SubmitCode }; + } /** * 扫条码 */ @@ -191,6 +237,11 @@ export class ReturningModule extends VuexModule { const LoctionList = res; return { LoctionList }; } + @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + async queryList(content: any) { + const res = await http.post('wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content); + return res; + } @MutationAction async documentNoClose(poNo: any) { const res: any = await http.post('/wmspda/material/outsourcing/into/close', { @@ -203,7 +254,7 @@ export class ReturningModule extends VuexModule { } @Action async queryOutsourcing(poNo: any) { - const res = await http.post(url.outbound.stoOutbound.queryOrder, { + const res = await http.post(url.outbound.stoOutbound.subcDnInfo, { poNo, loginName: session.loginName, factoryCode: session.factoryCode, @@ -224,6 +275,13 @@ export class ReturningModule extends VuexModule { this.detailedList = res.data; return res; } + @Action({ commit: 'updateCheckedOrderInInfoListKw' }) + async queryBill(content: any) { + const res: any = await http.post('/wmspda/material/getDnRecSn', content); + console.log('明细》》》》》》》》》', res.list); + this.DNdetailedList = res.list; + return res; + } } export default getModule(ReturningModule); diff --git a/src/pages/raw/handover/feeding/config.ts b/src/pages/raw/handover/feeding/config.ts index 0daa152..b49feec 100644 --- a/src/pages/raw/handover/feeding/config.ts +++ b/src/pages/raw/handover/feeding/config.ts @@ -78,11 +78,30 @@ export const detailHeader = [ key: 'sendSpot', }, { - label: vm.$t('message.CommissionedLocation'), + label: vm.$t('message.Production'), key: 'wlCode', }, { - label: vm.$t('message.dn_Number'), + label: vm.$t('message.quantityNum'), + key: 'qty', + }, +]; +export const PropoHeader = [ + { + label: vm.$t('message.po_MaterielNo'), + key: 'materialCode', + width: 177, + }, + { + label: vm.$t('message.po_MaterielDes'), + key: 'sendSpot', + }, + { + label: vm.$t('message.Pi_unit'), + key: 'wlCode', + }, + { + label: vm.$t('message.Production'), key: 'qty', }, ]; diff --git a/src/pages/raw/handover/feeding/create.vue b/src/pages/raw/handover/feeding/create.vue new file mode 100644 index 0000000..b385eb7 --- /dev/null +++ b/src/pages/raw/handover/feeding/create.vue @@ -0,0 +1,609 @@ + + + + + diff --git a/src/pages/raw/handover/picking/index.vue b/src/pages/raw/handover/picking/index.vue index 4650dd2..ea725bb 100644 --- a/src/pages/raw/handover/picking/index.vue +++ b/src/pages/raw/handover/picking/index.vue @@ -307,8 +307,5 @@ export default class pickingDom extends BasePage { box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2); padding: 20rpx; } - - .button-bar { - } } diff --git a/src/utils/url.ts b/src/utils/url.ts index f9f225b..3da0f09 100644 --- a/src/utils/url.ts +++ b/src/utils/url.ts @@ -61,10 +61,12 @@ export const url = { }, DNorderin: { info: '/wmspda/material/orderin/dnInfo', + subcDnInfo: '/wmspda/material/orderin/subcDnInfo', ImportInfo: '/wmspda/material/orderin/overseasDnInfo', dnReturnInfo: '/wmspda/material/orderin/dnReturnInfo', queryOrder: '/wmspda/material/poReturn/queryOrder', //dn退货 单号查询 enter: '/wmspda/material/orderin/enter', + subcDnEnter: '/wmspda/material/orderin/subcDnEnter', ImportEnter: '/wmspda/material/orderin/overseasDnEnter', out: '/wmspda/material/orderin/out', }, @@ -131,6 +133,7 @@ export const url = { del: '/wmspda/fg/scanBarcodeDN/del', getMaterialByCode: '/wmspda/fg/getMaterialByCode', queryOrder: '/wmspda/material/outsourcing/into/queryOrder', + subcDnInfo: '/wmspda/material/orderin/subcDnInfo', submit: '/wmspda/material/outsourcing/into/materialComplete', materialComplete: '/wmspda/material/outsourcing/materialComplete', outsourcingQueryOrder: '/wmspda/material/outsourcing/queryOrder',