diff --git a/src/i18n/lang/cn.ts b/src/i18n/lang/cn.ts index 827a218..a4692fa 100644 --- a/src/i18n/lang/cn.ts +++ b/src/i18n/lang/cn.ts @@ -211,11 +211,13 @@ export default { CommissionedCumulativeData:'累计数据', CommissionedLocation:'库位', CommissionedThisNumber:'本次数量', + CommissionedNumber:'入库数量', CommissionedEntrantDetails:'入库明细', // 委外-出库 CommissionGoOut:'委外出库', CommissionedGoOutDetails:'出库明细', + CommissionedGoOutNumber:'出库数量', //移库 Warehouse_QueryCriteria: "查询条件", Warehouse_TransferOrderNo: "移库单号", diff --git a/src/pages/raw/commission/entrant/index.vue b/src/pages/raw/commission/entrant/index.vue index 1131968..b7b8d4d 100644 --- a/src/pages/raw/commission/entrant/index.vue +++ b/src/pages/raw/commission/entrant/index.vue @@ -85,32 +85,21 @@ - - {{ $t("message.po_MaterielNo") }} - {{ $t("message.po_MaterielDes") }} - {{ $t("message.operation") }} - - - {{ item.productCode }} - {{ item.productDescZh }} - -
- {{ $t("message.product_Delete") }} -
-
-
-
- + + {{ $t("message.po_MaterielNo") }} + {{ $t("message.po_MaterielDes") }} + {{ $t("message.operation") }} + + + {{ item.productCode }} + {{ item.productDescZh }} + +
+ {{ $t("message.product_Delete") }} +
+
+
+
diff --git a/src/pages/raw/commission/goOut/config.ts b/src/pages/raw/commission/goOut/config.ts index 1d45ca0..bf291c6 100644 --- a/src/pages/raw/commission/goOut/config.ts +++ b/src/pages/raw/commission/goOut/config.ts @@ -1,20 +1,29 @@ +/* + * @Author: zhou lei + * @Date: 2021-11-11 11:09:57 + * @LastEditTime: 2021-11-22 10:06:58 + * @LastEditors: zhou lei + * @Description: + * @FilePath: /wms_haiwai_app/src/pages/raw/commission/goOut/config.ts + * 联系方式:910592680@qq.com 18669792120 科海达信息技术有限公司 + */ /** * 看单明细表格列 */ import vm from '@/main'; export const headers = [ { - label: vm.$t('message.product_barCode'), - key: 'barcode', + label: vm.$t('message.CommissionedLocation'), + key: 'locationCode', width: 300, }, { - label: vm.$t('message.product_FGCode'), - key: 'materialCode', + label: vm.$t('message.CommissionedGoOutNumber'), + key: 'scanAmount', width: 300, }, { - label: vm.$t('message.product_FGDes'), + label: vm.$t('message.operation'), key: 'materialDesc', width: 300, }, diff --git a/src/pages/raw/commission/goOut/index.vue b/src/pages/raw/commission/goOut/index.vue index cd8e043..dd0d8a8 100644 --- a/src/pages/raw/commission/goOut/index.vue +++ b/src/pages/raw/commission/goOut/index.vue @@ -13,7 +13,7 @@ @@ -91,22 +91,27 @@ - {{$t('message.product_add')}} + {{$t('message.product_add')}} - + + + {{ $t("message.CommissionedLocation") }} + {{ $t("message.CommissionedGoOutNumber") }} + {{ $t("message.operation") }} + + + {{ item.locationCode }} + {{ item.scanAmount }} + +
+ {{ $t("message.product_Delete") }} +
+
+
+
@@ -120,7 +125,7 @@ - {{ $t('message.product_Upload') }} + {{ $t('message.product_Upload') }} {{ $t('message.po_Return') }} @@ -151,6 +156,7 @@ export default class stoOutboundDom extends BasePage { */ @Ref('table') readonly $table: any; + LocationList: any = []; /** * 页面Module */ @@ -232,6 +238,14 @@ export default class stoOutboundDom extends BasePage { uni.navigateBack({ delta: 1 }); this.$table.onEmpty(); } + +// 单号查询 + async queryOrder(poNo:string){ + const {orderInInfo} = await model.queryOrder(poNo) + Object.assign(this.form,{ + ...orderInInfo + }) + } materialConfirm(v: any) { console.log('v[0].value', v[0]); // this.form.productCode = v[0].value; @@ -271,63 +285,76 @@ export default class stoOutboundDom extends BasePage { } }); } + + confirm() { + // if (this.wlCode == "" || this.number == "") { + // uni.showToast({ + // icon: "none", + // title: "请输入正确的库位和数量", + // }); + // return; + // } + console.log('123') + this.LocationList.push(this.form) + } + + deleteItem(index: any) { + this.LocationList.splice(index, 1); + } + + /** - * 条码回车 + * 提交 */ onSubmit() { this.$form.validate(async (valid: boolean) => { - if (this.form.productCode.slice(0, 9) != this.form.barCode.slice(0, 9)) { - uni.showToast({ icon: 'none', title: this.$t('message.product_Tip5') as string }); - return; - } - if (parseInt(this.form.orderAmount) <= parseInt(this.form.scanAmount)) { - uni.showToast({ icon: 'none', title: this.$t('message.product_Tip6') as string }); - return; - } - let list = [ - { - order3: this.form.orderNo, - productCode: this.form.productCode, - productDescZh: this.form.productDescZh, - barCode: this.form.barCode, - dockCode: this.form.dockCode, - dockName: this.form.dockName, - orderType: 3, - type: 0, - keepBy: session.loginName as string, - loginName: session.loginName as string, - }, - ]; + // if (this.form.productCode.slice(0, 9) != this.form.barCode.slice(0, 9)) { + // uni.showToast({ icon: 'none', title: this.$t('message.product_Tip5') as string }); + // return; + // } + // if (parseInt(this.form.orderAmount) <= parseInt(this.form.scanAmount)) { + // uni.showToast({ icon: 'none', title: this.$t('message.product_Tip6') as string }); + // return; + // } + const list = this.LocationList.map( (item:any) =>({ + wlCode:item.locationCode, + nowAmount:item.scanAmount, + })) + if (valid) { - const res = await this.model.tluSubmit(list); + const res = await this.model.materialComplete({ + poNo:this.form.poNo, + materialCode:this.form.materialCode, + list + }); console.log('fanhui ', res); // if (res.barcode) { // // this.materialList.push(res); // this.form.scanAmount = res.scanAmount; // } - if (this.materialList.length == 0) { - await this.materialList.push(res); - this.form.scanAmount += 1; - this.$table.onCheckAllTap(); - } else { - let flag = 0; - for (let i = 0; i < this.materialList.length; i++) { - console.log('11111', this.materialList[i]); - if (this.form.barCode == this.materialList[i].barcode) { - flag = 1; - break; - } - } - if (flag == 0) { - await this.$table.onCheckAllTap(); - await this.materialList.push(res); - this.form.scanAmount += 1; - this.$table.onCheckAllTap(); - } else { - uni.showToast({ icon: 'none', title: this.$t('message.product_Tip7') as string }); - } - } + // if (this.materialList.length == 0) { + // await this.materialList.push(res); + // this.form.scanAmount += 1; + // this.$table.onCheckAllTap(); + // } else { + // let flag = 0; + // for (let i = 0; i < this.materialList.length; i++) { + // console.log('11111', this.materialList[i]); + // if (this.form.barCode == this.materialList[i].barcode) { + // flag = 1; + // break; + // } + // } + // if (flag == 0) { + // await this.$table.onCheckAllTap(); + // await this.materialList.push(res); + // this.form.scanAmount += 1; + // this.$table.onCheckAllTap(); + // } else { + // uni.showToast({ icon: 'none', title: this.$t('message.product_Tip7') as string }); + // } + // } } }); const item = { diff --git a/src/pages/raw/commission/goOut/model.ts b/src/pages/raw/commission/goOut/model.ts index de35a11..ab135bd 100644 --- a/src/pages/raw/commission/goOut/model.ts +++ b/src/pages/raw/commission/goOut/model.ts @@ -70,6 +70,19 @@ export class ReturningModule extends VuexModule { return { locationCodeList }; } + /** + * 提交 + */ + @Action + async materialComplete(form:any) { + const res = await http.post(url.material.commission.goOut.materialComplete, { + factoryCode: session.factoryCode, + loginName: session.loginName, + ...form + }); + console.log(res,'>>>>>res') + } + /** * 扫条码 */