From b10c8adea7d33b6db3417618f438c51bc0437558 Mon Sep 17 00:00:00 2001
From: hou <1601990943@qq.com>
Date: Fri, 26 Nov 2021 13:24:01 +0800
Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=20=E8=A1=A5=E6=96=99=20?=
=?UTF-8?q?=E9=80=80=E6=96=99=20=E5=A7=94=E5=A4=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/pages.json | 8 +
src/pages/raw/commission/entrant/index.vue | 762 ++++++++++----------
src/pages/raw/commission/entrant/model.ts | 62 +-
src/pages/raw/commission/goOut/index.vue | 731 ++++++++++---------
src/pages/raw/commission/goOut/model.ts | 66 +-
src/pages/raw/handover/feeding/Location.vue | 109 ++-
src/pages/raw/handover/feeding/config.ts | 26 +-
src/pages/raw/handover/feeding/detail.vue | 220 +++---
src/pages/raw/handover/feeding/index.vue | 98 ++-
src/utils/url.ts | 4 +
10 files changed, 1178 insertions(+), 908 deletions(-)
diff --git a/src/pages.json b/src/pages.json
index aaa626c..6d389fb 100644
--- a/src/pages.json
+++ b/src/pages.json
@@ -416,6 +416,14 @@
"navigationStyle": "custom", // 隐藏系统导航栏
"navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
}
+ },
+ {
+ "path": "pages/raw/handover/feeding/Location",
+ "style": {
+ "navigationBarTitleText": "补料明细",
+ "navigationStyle": "custom", // 隐藏系统导航栏
+ "navigationBarTextStyle": "white" // 状态栏字体为白色,只能为 white-白色,black-黑色 二选一
+ }
},
{
"path": "pages/raw/handover/returning/index",
diff --git a/src/pages/raw/commission/entrant/index.vue b/src/pages/raw/commission/entrant/index.vue
index 1131968..845b920 100644
--- a/src/pages/raw/commission/entrant/index.vue
+++ b/src/pages/raw/commission/entrant/index.vue
@@ -1,394 +1,297 @@
-
-
+
-
- {{
- $t('message.CommissionedEntrantDetails')
- }}
-
+ 收货明细
- {{ $t('message.product_Upload') }}
+ 提交
- {{ $t('message.po_Return') }}
+ 返回
-
-
-
-
-
diff --git a/src/pages/raw/commission/entrant/model.ts b/src/pages/raw/commission/entrant/model.ts
index f8d0098..3386098 100644
--- a/src/pages/raw/commission/entrant/model.ts
+++ b/src/pages/raw/commission/entrant/model.ts
@@ -1,8 +1,14 @@
-import { Action, getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
-import store from '@/store';
-import http from '@/utils/request';
-import { url } from '@/utils/url';
-import { session } from '@/store/modules/session';
+import {
+ Action,
+ getModule,
+ Module,
+ MutationAction,
+ VuexModule,
+} from "vuex-module-decorators";
+import store from "@/store";
+import http from "@/utils/request";
+import { url } from "@/utils/url";
+import { session } from "@/store/modules/session";
// import vm from '@/main';
class OrderInInfo {
@@ -17,7 +23,7 @@ class OrderInInfo {
namespaced: true,
dynamic: true,
store,
- name: 'product.outbound.stoOutbound',
+ name: "product.outbound.stoOutbound",
})
export class ReturningModule extends VuexModule {
/**
@@ -36,7 +42,7 @@ export class ReturningModule extends VuexModule {
*/
orderInInfo: OrderInInfo = new OrderInInfo();
//记账按钮的code码
- code = '';
+ code = "";
/**
* 查询月台列表
*/
@@ -75,7 +81,7 @@ export class ReturningModule extends VuexModule {
value: item.stoItem,
...item,
}));
- console.log('materielList', materielList);
+ console.log("materielList", materielList);
if (result.data.records[0]) {
result.data.records[0].stoAmount = stoAmount;
}
@@ -93,12 +99,15 @@ export class ReturningModule extends VuexModule {
loginName: session.loginName,
};
let oneMaterielDetail: any = {};
- const { data }: any = await http.post(url.outbound.stoOutbound.checkScan, obj);
- console.log('shneme a ', data.records);
+ const { data }: any = await http.post(
+ url.outbound.stoOutbound.checkScan,
+ obj
+ );
+ console.log("shneme a ", data.records);
oneMaterielDetail = data.records[0];
data.records[0].materialCode = list[0].productCode;
data.records[0].materialDesc = list[0].productDescZh;
- console.log('aaaaa', oneMaterielDetail);
+ console.log("aaaaa", oneMaterielDetail);
return oneMaterielDetail;
}
/**
@@ -107,8 +116,11 @@ export class ReturningModule extends VuexModule {
*/
@MutationAction
async confirm(list: any[]) {
- const { code, data } = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
- console.log('res数据', data, code);
+ const { code, data } = await http.post(
+ url.outbound.stoOutbound.Bookkeeping,
+ list
+ );
+ console.log("res数据", data, code);
// if (code == '1') {
// uni.showToast({ icon: 'success', title: msg });
// } else {
@@ -117,6 +129,30 @@ export class ReturningModule extends VuexModule {
const materielList: any = [];
return { code, materielList };
}
+ @Action({ commit: "updateCheckedOrderInInfoListKw" })
+ async queryByFactoryCodeAndWorkAreaCode(content: any) {
+ let res = await http.post(
+ "/wmspda/fg/queryByFactoryCodeAndWorkAreaCode",
+ content
+ );
+ return res;
+ }
+
+ @Action
+ async queryOutsourcing(poNo: any) {
+ let res = await http.post(url.outbound.stoOutbound.queryOrder, {
+ poNo,
+ loginName: session.loginName,
+ factoryCode: session.factoryCode,
+ });
+ return res;
+ }
+
+ @Action
+ async submitOutsourcing(upload: any) {
+ let res = await http.post(url.outbound.stoOutbound.submit, upload);
+ return res;
+ }
}
export default getModule(ReturningModule);
diff --git a/src/pages/raw/commission/goOut/index.vue b/src/pages/raw/commission/goOut/index.vue
index 47de24e..943f6ad 100644
--- a/src/pages/raw/commission/goOut/index.vue
+++ b/src/pages/raw/commission/goOut/index.vue
@@ -1,365 +1,297 @@
-
-
+
-
- {{
- $t('message.CommissionedGoOutDetails')
- }}
-
+ 收货明细
- {{ $t('message.product_Upload') }}
+ 提交
- {{ $t('message.po_Return') }}
+ 返回
-
-
-
-
-
diff --git a/src/pages/raw/commission/goOut/model.ts b/src/pages/raw/commission/goOut/model.ts
index f8d0098..8d95752 100644
--- a/src/pages/raw/commission/goOut/model.ts
+++ b/src/pages/raw/commission/goOut/model.ts
@@ -1,8 +1,14 @@
-import { Action, getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
-import store from '@/store';
-import http from '@/utils/request';
-import { url } from '@/utils/url';
-import { session } from '@/store/modules/session';
+import {
+ Action,
+ getModule,
+ Module,
+ MutationAction,
+ VuexModule,
+} from "vuex-module-decorators";
+import store from "@/store";
+import http from "@/utils/request";
+import { url } from "@/utils/url";
+import { session } from "@/store/modules/session";
// import vm from '@/main';
class OrderInInfo {
@@ -17,7 +23,7 @@ class OrderInInfo {
namespaced: true,
dynamic: true,
store,
- name: 'product.outbound.stoOutbound',
+ name: "product.outbound.stoOutbound",
})
export class ReturningModule extends VuexModule {
/**
@@ -36,7 +42,7 @@ export class ReturningModule extends VuexModule {
*/
orderInInfo: OrderInInfo = new OrderInInfo();
//记账按钮的code码
- code = '';
+ code = "";
/**
* 查询月台列表
*/
@@ -75,7 +81,7 @@ export class ReturningModule extends VuexModule {
value: item.stoItem,
...item,
}));
- console.log('materielList', materielList);
+ console.log("materielList", materielList);
if (result.data.records[0]) {
result.data.records[0].stoAmount = stoAmount;
}
@@ -93,12 +99,15 @@ export class ReturningModule extends VuexModule {
loginName: session.loginName,
};
let oneMaterielDetail: any = {};
- const { data }: any = await http.post(url.outbound.stoOutbound.checkScan, obj);
- console.log('shneme a ', data.records);
+ const { data }: any = await http.post(
+ url.outbound.stoOutbound.checkScan,
+ obj
+ );
+ console.log("shneme a ", data.records);
oneMaterielDetail = data.records[0];
data.records[0].materialCode = list[0].productCode;
data.records[0].materialDesc = list[0].productDescZh;
- console.log('aaaaa', oneMaterielDetail);
+ console.log("aaaaa", oneMaterielDetail);
return oneMaterielDetail;
}
/**
@@ -107,8 +116,11 @@ export class ReturningModule extends VuexModule {
*/
@MutationAction
async confirm(list: any[]) {
- const { code, data } = await http.post(url.outbound.stoOutbound.Bookkeeping, list);
- console.log('res数据', data, code);
+ const { code, data } = await http.post(
+ url.outbound.stoOutbound.Bookkeeping,
+ list
+ );
+ console.log("res数据", data, code);
// if (code == '1') {
// uni.showToast({ icon: 'success', title: msg });
// } else {
@@ -117,6 +129,34 @@ export class ReturningModule extends VuexModule {
const materielList: any = [];
return { code, materielList };
}
+
+ @Action({ commit: "updateCheckedOrderInInfoListKw" })
+ async queryByFactoryCodeAndWorkAreaCode(content: any) {
+ let res = await http.post(
+ "/wmspda/fg/queryByFactoryCodeAndWorkAreaCode",
+ content
+ );
+ return res;
+ }
+
+ @Action
+ async queryOutsourcing(poNo: any) {
+ let res = await http.post(url.outbound.stoOutbound.outsourcingQueryOrder, {
+ poNo,
+ loginName: session.loginName,
+ factoryCode: session.factoryCode,
+ });
+ return res;
+ }
+
+ @Action
+ async submitOutsourcing(upload: any) {
+ let res = await http.post(
+ url.outbound.stoOutbound.materialComplete,
+ upload
+ );
+ return res;
+ }
}
export default getModule(ReturningModule);
diff --git a/src/pages/raw/handover/feeding/Location.vue b/src/pages/raw/handover/feeding/Location.vue
index e1b6c4b..a230b1e 100644
--- a/src/pages/raw/handover/feeding/Location.vue
+++ b/src/pages/raw/handover/feeding/Location.vue
@@ -2,9 +2,10 @@
@@ -28,7 +29,7 @@
已拣数量:
- {{ some.totalMoAmount }}
+ {{ some.totalFillAmount }}
@@ -78,11 +79,42 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
拣配明细补料明细
@@ -105,6 +137,7 @@ import { session } from "@/store/modules/session";
import { VForm, VFormRules } from "vue/types/form";
import jPicker from "@/components/J-Picker/jPicker.vue";
import { headers } from "./config";
+import { auth } from "@/store/modules/auth";
@Component({
components: {
jPicker,
@@ -116,6 +149,7 @@ export default class RawReceiptDetail extends BasePage {
*/
@Ref("form") readonly $form!: VForm;
@Ref("submitForm") readonly $submitForm!: VForm;
+ @Ref("form2") readonly $form2!: VForm;
submitForm = {
receiver: "",
receiverName: "",
@@ -128,6 +162,7 @@ export default class RawReceiptDetail extends BasePage {
type = "text";
wlCode: any = "";
border = true;
+ operatorName = "";
//添加库位和数量的列表
LocationList: any = [];
//库位
@@ -142,18 +177,14 @@ export default class RawReceiptDetail extends BasePage {
// locationCode: null,
amount: null,
};
- index() {
- this.toPage(this.page.raw.ingoods.dnReturnGoods.index);
- }
+ form2 = {
+ operatorPass: "", // 接收人
+ };
/**
* 表单校验
*/
rules: VFormRules = {
- // locationCode: [{ required: true, message: '请选择库存地点!' }],
- amount: [
- { required: true, message: this.$t("message.Pi_tip1") as string },
- // { type: 'integer', min: 1, transform: Number, message: this.$t('message.Pi_tip2') as string },
- ],
+ amount: [{ required: true, message: this.$t("message.Pi_tip1") as string }],
};
/**
@@ -166,12 +197,22 @@ export default class RawReceiptDetail extends BasePage {
*/
headers = headers;
LocationChoice(e: any) {
- console.log("e>>>>>>>>>>>>>>>>>>>>>>>>", e);
this.wlCode = e.pickerName;
}
+ async onOperatorConfirm(loginName: string) {
+ try {
+ const { userName } = await auth.getUserInfo({ loginName });
+ this.form2.operatorPass = loginName;
+ this.operatorName = userName;
+ } catch {
+ this.form2.operatorPass = "";
+ this.operatorName = "";
+ }
+ }
handleRow({ data }: any) {
this.someIndex = data[0].index;
this.some = data[0].lineData;
+ this.model.blDetailList[this.someIndex].wlList = [];
}
Add() {
if (this.qty == "" || this.wlCode == "") {
@@ -188,9 +229,7 @@ export default class RawReceiptDetail extends BasePage {
});
return;
}
- if (
- parseFloat(this.qty) > model.blDetailList[this.someIndex].receiptAmount
- ) {
+ if (parseFloat(this.qty) > model.blDetailList[this.someIndex].amount) {
uni.showToast({
icon: "none",
title: "不能大于需求数量,请重新输入" as any,
@@ -201,8 +240,7 @@ export default class RawReceiptDetail extends BasePage {
this.LocationList.forEach((item: any) => {
num += parseFloat(item.qty);
});
- console.log(num);
- if (num > this.model.blDetailList[this.someIndex].receiptAmount) {
+ if (num > this.model.blDetailList[this.someIndex].amount) {
uni.showToast({
icon: "none",
title: "不能大于需求数量,请重新输入" as any,
@@ -239,21 +277,15 @@ export default class RawReceiptDetail extends BasePage {
let TEM = JSON.parse(objString);
TEM.wlList = null;
TEM.wlCode = this.wlCode.label;
- TEM.hvAmount = this.qty;
- this.model.blDetailList[this.someIndex].wlQTyList.push(TEM);
- this.model.blDetailList[this.someIndex].receiptAmount += parseFloat(
- this.qty
- );
- console.log(
- "this.model.blDetailList",
- this.model.blDetailList[this.someIndex]
- );
+ TEM.qty = this.qty;
+ this.model.blDetailList[this.someIndex].wlList.push(TEM);
this.qty = "";
+ this.business();
}
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
- this.model.blDetailList[this.someIndex].wlQTyList.splice(index, 1);
+ this.model.blDetailList[this.someIndex].wlList.splice(index, 1);
this.business();
}
business() {
@@ -261,14 +293,9 @@ export default class RawReceiptDetail extends BasePage {
this.LocationList.forEach((item: any) => {
num += parseFloat(item.qty);
});
- this.model.blDetailList[this.someIndex].receiptAmount = num;
- console.log(
- "this.model.blDetailList",
- this.model.blDetailList[this.someIndex]
- );
+ this.model.blDetailList[this.someIndex].fillAmount = num;
}
async onShow() {
- //页面初始化 获取可选库位
let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
@@ -292,15 +319,17 @@ export default class RawReceiptDetail extends BasePage {
item.receiptAmount = 0;
item.wlQTyList = [];
});
- console.log("this.model.blDetailList", this.model.blDetailList);
}
appoint() {}
-
- /**
- * 提交
- */
async onSubmit() {
- // await this.model.submitOrderInEnter();
+ let dataList = this.model.blDetailList;
+ const params = {
+ dataList,
+ ...this.form2,
+ };
+ await this.model.saveBlDetailUpload(params).then(() => {
+ this.toPage(this.page.raw.handover.feeding.Location);
+ });
}
}
diff --git a/src/pages/raw/handover/feeding/config.ts b/src/pages/raw/handover/feeding/config.ts
index 670dfd5..0a1031a 100644
--- a/src/pages/raw/handover/feeding/config.ts
+++ b/src/pages/raw/handover/feeding/config.ts
@@ -1,33 +1,33 @@
/**
* 补料明细表格列
*/
-import vm from '@/main';
+import vm from "@/main";
export const headers = [
{
- label: vm.$t('message.po_MaterielNo'),
- key: 'materialCode',
+ label: vm.$t("message.po_MaterielNo"),
+ key: "materialCode",
width: 220,
},
{
- label: vm.$t('message.po_MaterielDes'),
- key: 'materialDesc',
+ label: vm.$t("message.po_MaterielDes"),
+ key: "materialDesc",
width: 350,
},
{
- label: vm.$t('message.po_ActualQuantity'),
- key: 'fillAmount',
+ label: vm.$t("message.po_ActualQuantity"),
+ key: "fillAmount",
},
{
- label: vm.$t('message.Summary_Number'),
- key: 'amount',
+ label: vm.$t("message.Summary_Number"),
+ key: "amount",
},
{
- label: vm.$t('message.Feeding_ReplenishedQuantity'),
- key: 'totalFillAmount',
+ label: vm.$t("message.Feeding_ReplenishedQuantity"),
+ key: "totalFillAmount",
},
{
- label: vm.$t('message.po_Location'),
- key: 'locationCode',
+ label: vm.$t("message.po_Location"),
+ key: "locationCode",
},
// {
// label: '工位',
diff --git a/src/pages/raw/handover/feeding/detail.vue b/src/pages/raw/handover/feeding/detail.vue
index 25223b4..7c3be35 100644
--- a/src/pages/raw/handover/feeding/detail.vue
+++ b/src/pages/raw/handover/feeding/detail.vue
@@ -1,10 +1,15 @@
-