收货 拣配页面优化;交接问题修复

master
hou 5 years ago
commit 618ef8bc39

@ -1,3 +0,0 @@
# 复制本文件并重命名为.env.development.local
# 本地开发版本
VUE_APP_BASE_URL=http://localhost:8181

@ -5,7 +5,7 @@
{{ listData[nSel][showKey] || listData[nSel] }}
</view>
<view style="color: #7d7d7d" v-else>
{{ $t("message.po_PleaseInput") }}
{{ $t("message.workArea_Selelct") }}
</view>
</view>

@ -51,7 +51,7 @@ export default {
rawMenu_InTheLibrary: "库内",
rawMenu_ReturnGoods: "退货",
rawMenu_SignOut: "退出",
//po收货
po_ReceivingGoods: "PO收货",
po_ReturnGoods: "DN退货",
@ -187,7 +187,7 @@ export default {
Scrap: "成品报废",
CollectionAndBorrowing: "成品领用借用",
Inventory: "成品盘点",
raw_Inventory:'原材料盘点',
raw_Inventory: "原材料盘点",
RowWarehouse: "原材料库内",
SemiProductZC: "半成品转储",
@ -195,27 +195,40 @@ export default {
RowRelocation: "原材料移库",
RowCollectionAndBorrowing: "原材料领用借用",
<<<<<<< Updated upstream
// 原材料盘点
InventoryOrderNo:'单号',
InventoryMaterielNo:'物料号',
InventoryMateriel:'物料名',
InventoryTotalNumber:'盘点总数',
InventoryPleaseScan: "请扫描单号",
<<<<<<< HEAD
=======
InventoryFinish: "完成",
>>>>>>> 908d8a2f172057491172510bf10bf949d527de9f
=======
// 原材料盘点
InventoryOrderNo: "单号",
InventoryMaterielNo: "物料号",
InventoryMateriel: "物料名",
InventoryTotalNumber: "盘点总数",
InventoryPleaseScan: "请扫描单号",
>>>>>>> Stashed changes
// 委外-入库
CommissionEntrant:'委外入库',
CommissionedSingleNumber:'单号',
CommissionedMaterielNo:'物料号',
CommissionedMaterielDesc:'物料描述',
CommissionedDemandData:'需求数据',
CommissionedCumulativeData:'累计数据',
CommissionedLocation:'库位',
CommissionedThisNumber:'本次数量',
CommissionedEntrantDetails:'入库明细',
// 委外-入库
CommissionEntrant: "委外入库",
CommissionedSingleNumber: "单号",
CommissionedMaterielNo: "物料号",
CommissionedMaterielDesc: "物料描述",
CommissionedDemandData: "需求数据",
CommissionedCumulativeData: "累计数据",
CommissionedLocation: "库位",
CommissionedThisNumber: "本次数量",
CommissionedEntrantDetails: "入库明细",
// 委外-出库
CommissionGoOut:'委外出库',
CommissionedGoOutDetails:'出库明细',
// 委外-出库
CommissionGoOut: "委外出库",
CommissionedGoOutDetails: "出库明细",
//移库
Warehouse_QueryCriteria: "查询条件",
Warehouse_TransferOrderNo: "移库单号",

@ -205,6 +205,10 @@ export default {
InventoryMateriel:'MAT name',
InventoryTotalNumber:'Total',
InventoryPleaseScan: "Please scan No.",
<<<<<<< HEAD
=======
InventoryFinish: "Finish",
>>>>>>> 908d8a2f172057491172510bf10bf949d527de9f
// 委外-入库
CommissionEntrant:'委外入库',

@ -242,6 +242,7 @@
}
},
{
<<<<<<< HEAD
"path": "pages/raw/ingoods/poReceipt/poReceiving",
"style": {
"navigationBarTitleText": "PO单收货",
@ -250,6 +251,8 @@
}
},
{
=======
>>>>>>> 908d8a2f172057491172510bf10bf949d527de9f
"path": "pages/raw/ingoods/poReceipt/idetailed",
"style": {
"navigationBarTitleText": "PO退货",
@ -274,6 +277,7 @@
}
},
{
<<<<<<< HEAD
"path": "pages/raw/ingoods/dnReceipt/ImportDN",
"style": {
"navigationBarTitleText": "海外DN收货",
@ -290,6 +294,8 @@
}
},
{
=======
>>>>>>> 908d8a2f172057491172510bf10bf949d527de9f
"path": "pages/raw/ingoods/dnReceipt/idetailed",
"style": {
"navigationBarTitleText": "DN单收货",
@ -346,6 +352,7 @@
}
},
{
<<<<<<< HEAD
"path": "pages/raw/handover/picking/ByOrder",
"style": {
"navigationBarTitleText": "拣配查询",
@ -362,6 +369,8 @@
}
},
{
=======
>>>>>>> 908d8a2f172057491172510bf10bf949d527de9f
"path": "pages/raw/handover/picking/idetailed",
"style": {
"navigationBarTitleText": "DN退货",

@ -0,0 +1,483 @@
<template>
<view class="page-picking-order">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="index" />
</view>
<view class="title">{{ $t("message.Pi_ByOrderPicking") }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
<wyb-table
class="table"
ref="table"
width="100%"
enable-check="single"
show-left-and-right-border
:headers="headers"
:contents="model.orderList"
:show-vert-border="false"
@onCheck="handleRow"
></wyb-table>
</view>
<!-- 列表展示数据 -->
<view class="Exhibition">
<view class="Exhibition-left">
<view class="Exhibition-left-title">工位:</view>
<view class="Exhibition-left-data">{{ some.sendSpot }}</view>
</view>
<view class="Exhibition-right">
<view class="Exhibition-right-title">已拣数量:</view>
<view class="Exhibition-right-data">{{ some.totalMoAmount }}</view>
</view>
</view>
<!-- 添加库位 -->
<view class="library">
<view class="library-left">
<view>库位:</view>
<jPicker
sureColor="#ff0000"
style="width: 230rpx"
@bindpicker="LocationChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="Location"
/>
</view>
<view class="library-right">
<view class="library-right-title">本次数量</view>
<u-input v-model="qty" :type="type" :border="border" class="input" />
</view>
</view>
<!-- 添加 -->
<view class="add">
<u-button type="primary" @click="Add"></u-button>
</view>
<!-- 表格 -->
<u-table class="library-table">
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.product_Location") }}</u-th>
<u-th class="u-th">{{ $t("message.product_Number") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.qty }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }}
</div>
</u-td>
</u-tr>
</u-table>
<view class="bottom-bar">
<div class="extra">
<u-form ref="form" :model="form" :error-type="['toast']">
<u-row class="bottom-info"> </u-row>
</u-form>
</div>
<div class="container">
<u-row>
<u-col :span="4">
<u-button type="primary" class="appoint" @click="appoint"
>拣配明细</u-button
>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onSubmit"> </u-button>
</u-col>
<u-col :span="4">
<u-button type="error" @click="onUpload"> </u-button>
</u-col>
</u-row>
</div>
</view>
</view>
</template>
<script lang="ts">
import { Component, Ref } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import model from "./model";
import { orderHeaders } from "./config";
import { session } from "@/store/modules/session";
import { VForm, VFormRules } from "vue/types/form";
import jPicker from "@/components/J-Picker/jPicker.vue";
import { pick } from "lodash/fp";
@Component({
components: {
jPicker,
},
})
export default class RawReceiptDetail extends BasePage {
/**
* 表单引用
*/
@Ref("form") readonly $form!: VForm;
@Ref("submitForm") readonly $submitForm!: VForm;
submitForm = {
receiver: "",
receiverName: "",
password: "",
};
/**
* 页面Module
*/
model = model;
type = "text";
wlCode: any = "";
border = true;
//
LocationList: any = [];
//
Location: any = [];
someIndex: number = 0;
some: any = {};
qty: any = "";
/**
* 表单数据
*/
form: any = {
// locationCode: null,
amount: null,
};
index() {
this.toPage(this.page.raw.handover.picking.result);
}
/**
* 表单校验
*/
rules: VFormRules<any> = {
// 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 },
],
};
/**
* 库存地点选择
*/
locationCodeSelect = false;
/**
* 表头
*/
headers = orderHeaders;
LocationChoice(e: any) {
console.log("e>>>>>>>>>>>>>>>>>>>>>>>>", e);
this.wlCode = e.pickerName;
}
handleRow({ data }: any) {
this.someIndex = data[0].index;
this.some = data[0].lineData;
this.model.orderList[this.someIndex].wlList = [];
this.model.orderList[this.someIndex].currentAmount = 0;
}
Add() {
if (this.qty == "" || this.wlCode == "") {
uni.showToast({
icon: "none",
title: "请输入正确的库位和数量" as any,
});
return;
}
if (parseFloat(this.qty) <= 0) {
uni.showToast({
icon: "none",
title: "请输入大于0的数量" as any,
});
return;
}
if (parseFloat(this.qty) > model.orderList[this.someIndex].amount) {
uni.showToast({
icon: "none",
title: "不能大于需求数量,请重新输入" as any,
});
return;
}
let num = parseFloat(this.qty);
this.LocationList.forEach((item: any) => {
num += parseFloat(item.qty);
});
console.log(num);
if (num > this.model.orderList[this.someIndex].amount) {
uni.showToast({
icon: "none",
title: "不能大于需求数量,请重新输入" as any,
});
return;
}
let isTrue: boolean = true;
if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => {
if (this.wlCode.sendSpot != item.Code) {
uni.showToast({
icon: "none",
title: "请选择正确的库位" as any,
});
return (isTrue = false);
}
});
}
if (this.some == {}) {
uni.showToast({
icon: "none",
title: "请先选择一个物料" as any,
});
return;
}
if ((isTrue = true)) {
let arr = {
wlCode: this.wlCode.label,
qty: this.qty,
Code: this.wlCode.sendSpot,
};
this.LocationList.push(arr);
let objString = JSON.stringify(this.some);
let TEM = JSON.parse(objString);
TEM.wlList = null;
TEM.wlCode = this.wlCode.label;
TEM.hvAmount = this.qty;
this.model.orderList[this.someIndex].wlList.push(TEM);
this.model.orderList[this.someIndex].hvAmount += parseFloat(this.qty);
console.log("this.model.orderList", this.model.orderList[this.someIndex]);
this.qty = "";
}
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
this.model.orderList[this.someIndex].wlList.splice(index, 1);
this.business();
}
business() {
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.qty);
});
this.model.orderList[this.someIndex].currentAmount = num;
console.log("this.model.orderList", this.model.orderList[this.someIndex]);
}
async onShow() {
//
let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let user: any = session.user;
let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: sendSpot,
factoryCode: means.session.user.factoryCode,
workArea: user.list[0].workareaCode,
};
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
res.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")";
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
this.model.orderList.forEach((item: any) => {
item.hvAmount = 0;
});
}
appoint() {}
/**
* 提交
*/
async onSubmit() {
await model.uploadOrderList({
operatorPass: this.submitForm.receiver,
factoryCode: session.factoryCode,
loginName: session.loginName,
orderOutIdAmountList: model.orderList.map((item) => ({
...pick(
[
"materialCode",
"amount",
"totalHvAmount",
"sapFactoryCode",
"sendSpot",
"materialDesc",
"mrpCode",
"unit",
"prdOrder",
"proType",
"wkposCode",
"hvAmount",
"orderOutId",
"wlList",
],
item
),
pickNum: item.totalMoAmount,
factoryCode: session.factoryCode,
})),
});
}
}
</script>
<style lang="scss" scoped>
.page-picking-order {
background: #f2f2f2
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 30rpx;
min-height: 100%;
padding-top: 118rpx;
padding-bottom: 222rpx;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
display: flex;
height: 88rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.table-wrapper {
background-color: #fff;
height: 500rpx;
overflow-x: auto;
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
}
.Exhibition {
width: 100%;
height: 100rpx;
margin-top: 20rpx;
display: flex;
.Exhibition-left {
width: 50%;
height: 100%;
display: flex;
.Exhibition-left-title {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
.Exhibition-left-data {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
}
.Exhibition-right {
width: 50%;
height: 100%;
display: flex;
.Exhibition-right-title {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
.Exhibition-right-data {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
}
}
.library {
width: 100%;
height: 100rpx;
display: flex;
.library-left {
width: 50%;
height: 100%;
display: flex;
view {
width: 230rpx;
line-height: 100rpx;
text-align: center;
}
}
.library-right {
width: 50%;
height: 100%;
display: flex;
.library-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.input {
width: 200rpx;
height: 70rpx;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
}
.add {
width: 100%;
height: 100rpx;
position: relative;
button {
position: absolute;
top: 10rpx;
right: 20rpx;
}
}
.bottom-bar {
z-index: 21;
position: fixed;
bottom: 0;
left: 0;
right: 0;
.container {
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.extra {
background-color: #fff;
margin: 5px;
border-radius: 5px;
padding: 0 10px;
}
.bottom-info {
.u-form-item {
padding: 0;
}
}
}
}
</style>

@ -26,13 +26,13 @@
<u-col :span="12">
<u-form-item
prop="amount"
:label="this.$t('message.Summary_Number')"
:label="$t('message.Summary_Number')"
label-width="120rpx"
>
<u-input
type="number"
v-model="amountForm.amount"
:placeholder="this.$t('message.po_PleaseInput')"
:placeholder="$t('message.po_PleaseInput')"
/>
</u-form-item>
</u-col>
@ -43,25 +43,25 @@
<u-col :span="6">
<u-form-item
prop="receiverName"
:label="this.$t('message.Summary_Receiver')"
:label="$t('message.Summary_Receiver')"
label-width="120rpx"
>
<u-input
v-model="submitForm.receiverName"
@confirm="onReceiverConfirm"
:placeholder="this.$t('message.po_PleaseInput')"
:placeholder="$t('message.po_PleaseInput')"
/>
</u-form-item>
</u-col>
<u-col :span="6">
<u-form-item
prop="password"
:label="this.$t('message.Summary_Password')"
:label="$t('message.Summary_Password')"
>
<u-input
type="password"
v-model="submitForm.password"
:placeholder="this.$t('message.po_PleaseInput')"
:placeholder="$t('message.po_PleaseInput')"
/>
</u-form-item>
</u-col>
@ -262,37 +262,38 @@ export default class AggregatingOrder extends BasePage {
title: this.$t("message.Pi_tip4") as string,
});
} else {
// await auth.checkPassword({
// rfPwd: this.submitForm.password,
// factoryCode: session.factoryCode as string,
// loginName: this.submitForm.receiver,
// });
// let submit = false;
// let selectsta = true;
// model.orderList.forEach((item, index) => {
// if (!item.checked) {
// model.setOrderListItemHvAmount({ index, hvAmount: 0 });
// } else if (item.hvAmount == null || item.hvAmount == 0) {
// submit = true;
// }
// if (item.checked) {
// selectsta = false;
// }
// });
// if (selectsta) {
// uni.showToast({
// icon: 'none',
// title: this.$t('message.Pi_tip4') as string,
// });
// return;
// }
// if (submit) {
// uni.showToast({
// icon: 'none',
// title: this.$t('message.Summary_PleaseInputNumber') as string,
// });
// return;
// }
await auth.checkPassword({
rfPwd: this.submitForm.password,
factoryCode: session.factoryCode as string,
// loginName: this.submitForm.receiver,
loginName: this.submitForm.receiverName,
});
let submit = false;
let selectsta = true;
model.orderList.forEach((item, index) => {
if (!item.checked) {
model.setOrderListItemHvAmount({ index, hvAmount: 0 });
} else if (item.hvAmount == null || item.hvAmount == 0) {
submit = true;
}
if (item.checked) {
selectsta = false;
}
});
if (selectsta) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip4") as string,
});
return;
}
if (submit) {
uni.showToast({
icon: "none",
title: this.$t("message.Summary_PleaseInputNumber") as string,
});
return;
}
let List: any = [];
let isTrue = true;
this.model.orderList.forEach((item: any) => {
@ -308,7 +309,10 @@ export default class AggregatingOrder extends BasePage {
return;
}
List.forEach((item: any) => {
if (item.hvAmount != item.amount) {
if (
parseFloat(item.totalMoAmount) - parseFloat(item.totalHvAmount) !=
parseFloat(this.amountForm.amount)
) {
isTrue = false;
return;
}
@ -350,20 +354,19 @@ export default class AggregatingOrder extends BasePage {
this.submitForm.receiver = "";
this.submitForm.receiverName = "";
this.submitForm.password = "";
// this.toPage(this.page.raw.handover.aggregating.index);
setTimeout(() => {
uni.navigateBack({ delta: 2 });
}, 2000);
// setTimeout(() => {
// uni.navigateBack({ delta: 2 });
// }, 2000);
// uni.navigateBack({ delta: 2 });
// uni.showModal({
// title: this.$t('message.Pi_tip') as string,
// content: this.$t('message.Warehouse_Tip9') as string,
// confirmText: this.$t('message.workArea_Confirm') as string,
// showCancel: false,
// success: () => {
// this.toPage(this.page.raw.handover.aggregating.index);
// },
// });
uni.showModal({
title: this.$t("message.Pi_tip") as string,
content: this.$t("message.Warehouse_Tip9") as string,
confirmText: this.$t("message.workArea_Confirm") as string,
showCancel: false,
success: () => {
this.toPage(this.page.raw.handover.aggregating.index);
},
});
}
}
});

@ -264,37 +264,38 @@ export default class AggregatingSummary extends BasePage {
title: this.$t("message.Pi_tip4") as string,
});
} else {
// await auth.checkPassword({
// rfPwd: this.submitForm.password,
// factoryCode: session.factoryCode as string,
// loginName: this.submitForm.receiver,
// });
// let submit = false;
// let selectsta = true;
// model.aggregateList.forEach((item) => {
// if (!item.checked) {
// return;
// } else if (item.hvAmount == null || item.hvAmount == 0) {
// submit = true;
// }
// if (item.checked) {
// selectsta = false;
// }
// });
// if (selectsta) {
// uni.showToast({
// icon: "none",
// title: this.$t("message.Pi_tip4") as string,
// });
// return;
// }
// if (submit) {
// uni.showToast({
// icon: "none",
// title: this.$t("message.Summary_PleaseInputNumber") as string,
// });
// return;
// }
await auth.checkPassword({
rfPwd: this.submitForm.password,
factoryCode: session.factoryCode as string,
// loginName: this.submitForm.receiver,
loginName: this.submitForm.receiverName,
});
let submit = false;
let selectsta = true;
model.aggregateList.forEach((item) => {
if (!item.checked) {
return;
} else if (item.hvAmount == null || item.hvAmount == 0) {
submit = true;
}
if (item.checked) {
selectsta = false;
}
});
if (selectsta) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip4") as string,
});
return;
}
if (submit) {
uni.showToast({
icon: "none",
title: this.$t("message.Summary_PleaseInputNumber") as string,
});
return;
}
let List: any = [];
let isTrue = true;
this.model.aggregateList.forEach((item: any) => {
@ -310,7 +311,10 @@ export default class AggregatingSummary extends BasePage {
return;
}
List.forEach((item: any) => {
if (item.hvAmount != item.amount) {
if (
parseFloat(item.totalMoAmount) - parseFloat(item.totalHvAmount) !=
parseFloat(this.amountForm.amount)
) {
isTrue = false;
return;
}
@ -356,20 +360,20 @@ export default class AggregatingSummary extends BasePage {
this.submitForm.password = "";
this.isBusinessFinished = true;
// uni.navigateBack({ delta: 2 });
setTimeout(() => {
uni.navigateBack({ delta: 2 });
}, 2000);
// uni.showModal({
// title: this.$t('message.Pi_tip') as string,
// content: this.$t('message.Warehouse_Tip9') as string,
// confirmText: this.$t('message.workArea_Confirm') as string,
// showCancel: false,
// success: () => {
// this.toPage(this.page.raw.handover.aggregating.index);
// },
// });
// setTimeout(() => {
// uni.navigateBack({ delta: 2 });
// }, 2000);
uni.showModal({
title: this.$t("message.Pi_tip") as string,
content: this.$t("message.Warehouse_Tip9") as string,
confirmText: this.$t("message.workArea_Confirm") as string,
showCancel: false,
success: () => {
this.toPage(this.page.raw.handover.aggregating.index);
},
});
// uni.navigateBack({ delta: 1 });
model.clearProOrderResultList();
// model.clearProOrderResultList();
}
}
});

@ -0,0 +1,465 @@
<template>
<view class="page-picking-order">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="index" />
</view>
<view class="title">{{ $t("message.Pi_ByOrderPicking") }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
<wyb-table
class="table"
ref="table"
width="100%"
enable-check="single"
show-left-and-right-border
:headers="headers"
:contents="model.blDetailList"
:show-vert-border="false"
@onCheck="handleRow"
></wyb-table>
</view>
<!-- 列表展示数据 -->
<view class="Exhibition">
<view class="Exhibition-left">
<view class="Exhibition-left-title">工位:</view>
<view class="Exhibition-left-data">{{ some.sendSpot }}</view>
</view>
<view class="Exhibition-right">
<view class="Exhibition-right-title">已拣数量:</view>
<view class="Exhibition-right-data">{{ some.totalMoAmount }}</view>
</view>
</view>
<!-- 添加库位 -->
<view class="library">
<view class="library-left">
<view>库位:</view>
<jPicker
sureColor="#ff0000"
style="width: 230rpx"
@bindpicker="LocationChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="Location"
/>
</view>
<view class="library-right">
<view class="library-right-title">本次数量</view>
<u-input v-model="qty" :type="type" :border="border" class="input" />
</view>
</view>
<!-- 添加 -->
<view class="add">
<u-button type="primary" @click="Add"></u-button>
</view>
<!-- 表格 -->
<u-table class="library-table">
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.product_Location") }}</u-th>
<u-th class="u-th">{{ $t("message.product_Number") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.qty }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }}
</div>
</u-td>
</u-tr>
</u-table>
<view class="bottom-bar">
<div class="extra">
<u-form ref="form" :model="form" :error-type="['toast']">
<u-row class="bottom-info"> </u-row>
</u-form>
</div>
<div class="container">
<u-row>
<u-col :span="4">
<u-button type="primary" class="appoint" @click="appoint"
>拣配明细</u-button
>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onSubmit"> </u-button>
</u-col>
<u-col :span="4">
<u-button type="error" @click="onUpload"> </u-button>
</u-col>
</u-row>
</div>
</view>
</view>
</template>
<script lang="ts">
import { Component, Ref } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import model from "./model";
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";
@Component({
components: {
jPicker,
},
})
export default class RawReceiptDetail extends BasePage {
/**
* 表单引用
*/
@Ref("form") readonly $form!: VForm;
@Ref("submitForm") readonly $submitForm!: VForm;
submitForm = {
receiver: "",
receiverName: "",
password: "",
};
/**
* 页面Module
*/
model = model;
type = "text";
wlCode: any = "";
border = true;
//
LocationList: any = [];
//
Location: any = [];
someIndex: number = 0;
some: any = {};
qty: any = "";
/**
* 表单数据
*/
form: any = {
// locationCode: null,
amount: null,
};
index() {
this.toPage(this.page.raw.ingoods.dnReturnGoods.index);
}
/**
* 表单校验
*/
rules: VFormRules<any> = {
// 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 },
],
};
/**
* 库存地点选择
*/
locationCodeSelect = false;
/**
* 表头
*/
headers = headers;
LocationChoice(e: any) {
console.log("e>>>>>>>>>>>>>>>>>>>>>>>>", e);
this.wlCode = e.pickerName;
}
handleRow({ data }: any) {
this.someIndex = data[0].index;
this.some = data[0].lineData;
}
Add() {
if (this.qty == "" || this.wlCode == "") {
uni.showToast({
icon: "none",
title: "请输入正确的库位和数量" as any,
});
return;
}
if (parseFloat(this.qty) <= 0) {
uni.showToast({
icon: "none",
title: "请输入大于0的数量" as any,
});
return;
}
if (
parseFloat(this.qty) > model.blDetailList[this.someIndex].receiptAmount
) {
uni.showToast({
icon: "none",
title: "不能大于需求数量,请重新输入" as any,
});
return;
}
let num = parseFloat(this.qty);
this.LocationList.forEach((item: any) => {
num += parseFloat(item.qty);
});
console.log(num);
if (num > this.model.blDetailList[this.someIndex].receiptAmount) {
uni.showToast({
icon: "none",
title: "不能大于需求数量,请重新输入" as any,
});
return;
}
let isTrue: boolean = true;
if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => {
if (this.wlCode.sendSpot != item.Code) {
uni.showToast({
icon: "none",
title: "请选择正确的库位" as any,
});
return (isTrue = false);
}
});
}
if (this.some == {}) {
uni.showToast({
icon: "none",
title: "请先选择一个物料" as any,
});
return;
}
if ((isTrue = true)) {
let arr = {
wlCode: this.wlCode.label,
qty: this.qty,
Code: this.wlCode.sendSpot,
};
this.LocationList.push(arr);
let objString = JSON.stringify(this.some);
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]
);
this.qty = "";
}
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
this.model.blDetailList[this.someIndex].wlQTyList.splice(index, 1);
this.business();
}
business() {
let num: number = 0;
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]
);
}
async onShow() {
//
let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let user: any = session.user;
let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: sendSpot,
factoryCode: means.session.user.factoryCode,
workArea: user.list[0].workareaCode,
};
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
res.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")";
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
this.model.blDetailList.forEach((item: any) => {
item.receiptAmount = 0;
item.wlQTyList = [];
});
console.log("this.model.blDetailList", this.model.blDetailList);
}
appoint() {}
/**
* 提交
*/
async onSubmit() {
// await this.model.submitOrderInEnter();
}
}
</script>
<style lang="scss" scoped>
.page-picking-order {
background: #f2f2f2
linear-gradient(0deg, #311818 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 30rpx;
min-height: 100%;
padding-top: 118rpx;
padding-bottom: 222rpx;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
display: flex;
height: 88rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.table-wrapper {
background-color: #fff;
height: 500rpx;
overflow-x: auto;
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
}
.Exhibition {
width: 100%;
height: 100rpx;
margin-top: 20rpx;
display: flex;
.Exhibition-left {
width: 50%;
height: 100%;
display: flex;
.Exhibition-left-title {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
.Exhibition-left-data {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
}
.Exhibition-right {
width: 50%;
height: 100%;
display: flex;
.Exhibition-right-title {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
.Exhibition-right-data {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
}
}
.library {
width: 100%;
height: 100rpx;
display: flex;
.library-left {
width: 50%;
height: 100%;
display: flex;
view {
width: 230rpx;
line-height: 100rpx;
text-align: center;
}
}
.library-right {
width: 50%;
height: 100%;
display: flex;
.library-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.input {
width: 200rpx;
height: 70rpx;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
}
.add {
width: 100%;
height: 100rpx;
position: relative;
button {
position: absolute;
top: 10rpx;
right: 20rpx;
}
}
.bottom-bar {
z-index: 21;
position: fixed;
bottom: 0;
left: 0;
right: 0;
.container {
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.extra {
background-color: #fff;
margin: 5px;
border-radius: 5px;
padding: 0 10px;
}
.bottom-info {
.u-form-item {
padding: 0;
}
}
}
}
</style>

@ -0,0 +1,491 @@
<template>
<view class="page-picking-order">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="index" />
</view>
<view class="title">{{ $t("message.Pi_ByOrderPicking") }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
<wyb-table
class="table"
ref="table"
width="100%"
enable-check="single"
show-left-and-right-border
:headers="headers"
:contents="model.proOrderResultList"
:show-vert-border="false"
@onCheck="handleRow"
></wyb-table>
</view>
<!-- 列表展示数据 -->
<view class="Exhibition">
<view class="Exhibition-left">
<view class="Exhibition-left-title">工位:</view>
<view class="Exhibition-left-data">{{ some.sendSpot }}</view>
</view>
<view class="Exhibition-right">
<view class="Exhibition-right-title">已拣数量:</view>
<view class="Exhibition-right-data">{{ some.totalMoAmount }}</view>
</view>
</view>
<!-- 添加库位 -->
<view class="library">
<view class="library-left">
<view>库位:</view>
<jPicker
sureColor="#ff0000"
style="width: 230rpx"
@bindpicker="LocationChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="Location"
/>
</view>
<view class="library-right">
<view class="library-right-title">本次数量</view>
<u-input
v-model="qty"
:type="type"
:border="border"
placeholder="请输入数量"
class="input"
/>
</view>
</view>
<!-- 添加 -->
<view class="add">
<u-button type="primary" @click="Add"></u-button>
</view>
<!-- 表格 -->
<u-table class="library-table">
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.product_Location") }}</u-th>
<u-th class="u-th">{{ $t("message.product_Number") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.qty }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }}
</div>
</u-td>
</u-tr>
</u-table>
<view class="bottom-bar">
<div class="extra">
<u-form ref="form" :model="form" :error-type="['toast']">
<u-row class="bottom-info"> </u-row>
</u-form>
</div>
<div class="container">
<u-row>
<u-col :span="4">
<u-button type="primary" class="appoint" @click="appoint"
>拣配明细</u-button
>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onSubmit"> </u-button>
</u-col>
<u-col :span="4">
<u-button type="error" @click="onUpload"> </u-button>
</u-col>
</u-row>
</div>
</view>
</view>
</template>
<script lang="ts">
import { Component, Ref } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import model from "./model";
import { orderHeaders } from "./config";
import { session } from "@/store/modules/session";
import { VForm, VFormRules } from "vue/types/form";
import jPicker from "@/components/J-Picker/jPicker.vue";
import { pick } from "lodash/fp";
@Component({
components: {
jPicker,
},
})
export default class RawReceiptDetail extends BasePage {
/**
* 表单引用
*/
@Ref("form") readonly $form!: VForm;
@Ref("submitForm") readonly $submitForm!: VForm;
submitForm = {
receiver: "",
receiverName: "",
password: "",
};
/**
* 页面Module
*/
model = model;
type = "text";
wlCode: any = "";
border = true;
//
LocationList: any = [];
//
Location: any = [];
someIndex: number = 0;
some: any = {};
qty: any = "";
again: any;
/**
* 表单数据
*/
form: any = {
// locationCode: null,
amount: null,
};
index() {
this.toPage(this.page.raw.handover.picking.result);
}
/**
* 表单校验
*/
rules: VFormRules<any> = {
// 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 },
],
};
/**
* 库存地点选择
*/
locationCodeSelect = false;
/**
* 表头
*/
headers = orderHeaders;
LocationChoice(e: any) {
console.log("e>>>>>>>>>>>>>>>>>>>>>>>>", e);
this.wlCode = e.pickerName;
}
handleRow({ data }: any) {
this.someIndex = data[0].index;
this.some = data[0].lineData;
this.model.proOrderResultList[this.someIndex].wlList = [];
this.model.proOrderResultList[this.someIndex].currentAmount = 0;
this.LocationList = [];
this.qty = "";
}
Add() {
if (this.qty == "" || this.wlCode == "") {
uni.showToast({
icon: "none",
title: "请输入正确的库位和数量" as any,
});
return;
}
if (parseFloat(this.qty) <= 0) {
uni.showToast({
icon: "none",
title: "请输入大于0的数量" as any,
});
return;
}
if (this.some == {}) {
uni.showToast({
icon: "none",
title: "请先选择一个物料" as any,
});
return;
}
let isTrue: boolean = true;
if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => {
if (this.wlCode.sendSpot != item.Code) {
uni.showToast({
icon: "none",
title: "请选择正确的库位" as any,
});
return (isTrue = false);
}
});
}
if (isTrue == true) {
if (
parseFloat(this.qty) + parseFloat(this.some.totalMoAmount) >
parseFloat(this.some.amount)
) {
uni.showModal({
title: "Tip",
content: this.$t("message.Pi_tip11") as string,
confirmText: this.$t("message.workArea_Confirm") as string,
cancelText: this.$t("message.Cancel") as string,
showCancel: true,
success: (res) => {
if (res.confirm) {
let arr = {
wlCode: this.wlCode.label,
qty: this.qty,
Code: this.wlCode.sendSpot,
};
this.LocationList.push(arr);
let objString = JSON.stringify(this.some);
let TEM = JSON.parse(objString);
TEM.wlList = null;
TEM.wlCode = this.wlCode.label;
TEM.qty = this.qty;
this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
this.model.proOrderResultList[
this.someIndex
].currentAmount += parseFloat(this.qty);
this.qty = "";
}
},
});
} else {
let arr = {
wlCode: this.wlCode.label,
qty: this.qty,
Code: this.wlCode.sendSpot,
};
this.LocationList.push(arr);
let objString = JSON.stringify(this.some);
let TEM = JSON.parse(objString);
TEM.wlList = null;
TEM.wlCode = this.wlCode.label;
TEM.qty = this.qty;
this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
this.model.proOrderResultList[
this.someIndex
].currentAmount += parseFloat(this.qty);
this.qty = "";
}
}
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
this.model.proOrderResultList[this.someIndex].wlList.splice(index, 1);
this.business();
}
business() {
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.qty);
});
this.model.proOrderResultList[this.someIndex].currentAmount = num;
}
async onShow() {
//
let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let user: any = session.user;
let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: sendSpot,
factoryCode: means.session.user.factoryCode,
workArea: user.list[0].workareaCode,
};
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
res.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")";
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
// this.model.proOrderResultList.forEach((item: any) => {
// item.hvAmount = 0;
// });
this.again = JSON.parse(sessionStorage.getItem("params") as any);
sessionStorage.removeItem("params");
}
appoint() {}
/**
* 提交
*/
async onSubmit() {
const dataList: any = [];
this.model.proOrderResultList.forEach((item: any) => {
if (item.checked == true) {
dataList.push(item);
}
});
await this.model.saveProOrderResultUpload(dataList).then(() => {
this.model.queryProOrderResult(this.again).then(() => {
this.toPage(this.page.raw.handover.picking.result);
});
});
}
}
</script>
<style lang="scss" scoped>
.page-picking-order {
background: #f2f2f2
linear-gradient(0deg, #eee7e7 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 30rpx;
min-height: 100%;
padding-top: 118rpx;
padding-bottom: 222rpx;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
display: flex;
height: 88rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.table-wrapper {
background-color: #fff;
height: 500rpx;
overflow-x: auto;
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
}
.Exhibition {
width: 100%;
height: 100rpx;
margin-top: 20rpx;
display: flex;
.Exhibition-left {
width: 50%;
height: 100%;
display: flex;
.Exhibition-left-title {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
.Exhibition-left-data {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
}
.Exhibition-right {
width: 50%;
height: 100%;
display: flex;
.Exhibition-right-title {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
.Exhibition-right-data {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
}
}
.library {
width: 100%;
height: 100rpx;
display: flex;
.library-left {
width: 50%;
height: 100%;
display: flex;
view {
width: 230rpx;
line-height: 100rpx;
text-align: center;
}
}
.library-right {
width: 50%;
height: 100%;
display: flex;
.library-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.input {
width: 200rpx;
height: 70rpx;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
}
.add {
width: 100%;
height: 100rpx;
position: relative;
button {
position: absolute;
top: 10rpx;
right: 20rpx;
}
}
.bottom-bar {
z-index: 21;
position: fixed;
bottom: 0;
left: 0;
right: 0;
.container {
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.extra {
background-color: #fff;
margin: 5px;
border-radius: 5px;
padding: 0 10px;
}
.bottom-info {
.u-form-item {
padding: 0;
}
}
}
}
</style>

@ -0,0 +1,515 @@
<template>
<view class="page-picking-order">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="index" />
</view>
<view class="title">{{ $t("message.Pi_SummaryPicking") }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
<wyb-table
class="table"
ref="table"
width="100%"
enable-check="single"
show-left-and-right-border
:headers="headers"
:contents="model.aggregateList"
:show-vert-border="false"
@onCheck="handleRow"
></wyb-table>
</view>
<!-- 列表展示数据 -->
<view class="Exhibition">
<view class="Exhibition-left">
<view class="Exhibition-left-title">{{
$t("message.Pi_Station")
}}</view>
<view class="Exhibition-left-data">{{ some.sendSpot }}</view>
</view>
<view class="Exhibition-right">
<view class="Exhibition-right-title">{{
$t("message.Pi_PickedQuantity")
}}</view>
<view class="Exhibition-right-data">{{ some.totalMoAmount }}</view>
</view>
</view>
<!-- 添加库位 -->
<view class="library">
<view class="library-left">
<view>{{ $t("message.product_Location") }}</view>
<jPicker
sureColor="#ff0000"
style="width: 230rpx"
@bindpicker="LocationChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="Location"
/>
</view>
<view class="library-right">
<view class="library-right-title">{{
$t("message.Pi_CurrentPickingQuantity")
}}</view>
<u-input
v-model="qty"
:type="type"
:border="border"
placeholder="请输入数量"
class="input"
/>
</view>
</view>
<!-- 添加 -->
<view class="add">
<u-button type="primary" @click="Add">{{
$t("message.product_add")
}}</u-button>
</view>
<!-- 表格 -->
<u-table class="library-table">
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.product_Location") }}</u-th>
<u-th class="u-th">{{ $t("message.product_Number") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.qty }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }}
</div>
</u-td>
</u-tr>
</u-table>
<view class="bottom-bar">
<div class="extra">
<u-form ref="form" :model="form" :error-type="['toast']">
<u-row class="bottom-info"> </u-row>
</u-form>
</div>
<div class="container">
<u-row>
<u-col :span="4">
<u-button type="primary" class="appoint" @click="appoint">{{
$t("message.detailed")
}}</u-button>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onSubmit">
{{ $t("message.po_Submit") }}
</u-button>
</u-col>
<u-col :span="4">
<u-button type="error" @click="index">
{{ $t("message.po_Return") }}
</u-button>
</u-col>
</u-row>
</div>
</view>
</view>
</template>
<script lang="ts">
import { Component, Ref } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import model from "./model";
import { summaryHeaders } from "./config";
import { session } from "@/store/modules/session";
import { VForm, VFormRules } from "vue/types/form";
import jPicker from "@/components/J-Picker/jPicker.vue";
import { pick } from "lodash/fp";
@Component({
components: {
jPicker,
},
})
export default class RawReceiptDetail extends BasePage {
/**
* 表单引用
*/
@Ref("form") readonly $form!: VForm;
@Ref("submitForm") readonly $submitForm!: VForm;
submitForm = {
receiver: "",
receiverName: "",
password: "",
};
/**
* 页面Module
*/
model = model;
type = "text";
wlCode: any = "";
border = true;
//
LocationList: any = [];
//
Location: any = [];
someIndex: number = 0;
some: any = {};
qty: any = "";
again: any;
/**
* 表单数据
*/
form: any = {
// locationCode: null,
amount: null,
};
index() {
this.toPage(this.page.raw.handover.picking.result);
}
/**
* 表单校验
*/
rules: VFormRules<any> = {
// 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 },
],
};
/**
* 库存地点选择
*/
locationCodeSelect = false;
/**
* 表头
*/
headers = summaryHeaders;
//
LocationChoice(e: any) {
console.log("e>>>>>>>>>>>>>>>>>>>>>>>>", e);
this.wlCode = e.pickerName;
}
//
handleRow({ data }: any) {
this.someIndex = data[0].index;
this.some = data[0].lineData;
this.model.aggregateList[this.someIndex].wlList = [];
this.model.aggregateList[this.someIndex].currentAmount = 0;
this.LocationList = [];
this.qty = "";
}
//
Add() {
if (this.qty == "" || this.wlCode == "") {
uni.showToast({
icon: "none",
title: "请输入正确的库位和数量" as any,
});
return;
}
if (parseFloat(this.qty) <= 0) {
uni.showToast({
icon: "none",
title: "请输入大于0的数量" as any,
});
return;
}
if (this.some == {}) {
uni.showToast({
icon: "none",
title: "请先选择一个物料" as any,
});
return;
}
let isTrue: boolean = true;
if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => {
if (this.wlCode.sendSpot != item.Code) {
uni.showToast({
icon: "none",
title: "请选择正确的库位" as any,
});
return (isTrue = false);
}
});
}
if (isTrue == true) {
if (
parseFloat(this.qty) + parseFloat(this.some.totalMoAmount) >
parseFloat(this.some.amount)
) {
uni.showModal({
title: "Tip",
content: this.$t("message.Pi_tip11") as string,
confirmText: this.$t("message.workArea_Confirm") as string,
cancelText: this.$t("message.Cancel") as string,
showCancel: true,
success: (res) => {
if (res.confirm) {
let arr = {
wlCode: this.wlCode.label,
qty: this.qty,
Code: this.wlCode.sendSpot,
};
this.LocationList.push(arr);
let objString = JSON.stringify(this.some);
let TEM = JSON.parse(objString);
TEM.wlList = null;
TEM.wlCode = this.wlCode.label;
TEM.qty = this.qty;
this.model.aggregateList[this.someIndex].wlList.push(TEM);
this.model.aggregateList[
this.someIndex
].currentAmount += parseFloat(this.qty);
this.qty = "";
}
},
});
} else {
let arr = {
wlCode: this.wlCode.label,
qty: this.qty,
Code: this.wlCode.sendSpot,
};
this.LocationList.push(arr);
let objString = JSON.stringify(this.some);
let TEM = JSON.parse(objString);
TEM.wlList = null;
TEM.wlCode = this.wlCode.label;
TEM.qty = this.qty;
this.model.aggregateList[this.someIndex].wlList.push(TEM);
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(
this.qty
);
this.qty = "";
}
}
}
//
deleteItem(index: any) {
this.LocationList.splice(index, 1);
this.model.aggregateList[this.someIndex].wlList.splice(index, 1);
this.business();
}
//
business() {
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.qty);
});
this.model.aggregateList[this.someIndex].currentAmount = num;
}
//
async onShow() {
let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let user: any = session.user;
let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: sendSpot,
factoryCode: means.session.user.factoryCode,
workArea: user.list[0].workareaCode,
};
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
res.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")";
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
// this.model.aggregateList.forEach((item: any) => {
// item.hvAmount = 0;
// });
this.again = JSON.parse(sessionStorage.getItem("params") as any);
sessionStorage.removeItem("params");
}
appoint() {}
//
async onSubmit() {
const includeOrderOutIdList = this.model.proOrderResultList.map(
(_: any) => _.orderOutId
);
const dataList: any = [];
this.model.aggregateList.forEach((item: any) => {
if (item.checked == true) {
dataList.push(item);
}
});
const params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
dataList,
includeOrderOutIdList,
};
await this.model.saveAggregateUpload(params).then(() => {
this.model.queryProOrderResult(this.again).then(() => {
this.toPage(this.page.raw.handover.picking.result);
});
});
}
}
</script>
<style lang="scss" scoped>
.page-picking-order {
background: #f2f2f2
linear-gradient(0deg, #eee7e7 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 30rpx;
min-height: 100%;
padding-top: 118rpx;
padding-bottom: 222rpx;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
display: flex;
height: 88rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.table-wrapper {
background-color: #fff;
height: 500rpx;
overflow-x: auto;
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
}
.Exhibition {
width: 100%;
height: 100rpx;
margin-top: 20rpx;
display: flex;
.Exhibition-left {
width: 50%;
height: 100%;
display: flex;
.Exhibition-left-title {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
.Exhibition-left-data {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
}
.Exhibition-right {
width: 50%;
height: 100%;
display: flex;
.Exhibition-right-title {
width: 50%;
height: 100%;
text-align: left;
line-height: 100rpx;
}
.Exhibition-right-data {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
}
}
.library {
width: 100%;
height: 100rpx;
display: flex;
.library-left {
width: 50%;
height: 100%;
display: flex;
view {
width: 230rpx;
line-height: 100rpx;
text-align: center;
}
}
.library-right {
width: 50%;
height: 100%;
display: flex;
.library-right-title {
width: 120rpx;
height: 100%;
// line-height: 100rpx;
margin-top: 20rpx;
}
.input {
width: 200rpx;
height: 70rpx;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
}
.add {
width: 100%;
height: 100rpx;
position: relative;
button {
position: absolute;
top: 10rpx;
right: 20rpx;
}
}
.bottom-bar {
z-index: 21;
position: fixed;
bottom: 0;
left: 0;
right: 0;
.container {
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.extra {
background-color: #fff;
margin: 5px;
border-radius: 5px;
padding: 0 10px;
}
.bottom-info {
.u-form-item {
padding: 0;
}
}
}
}
</style>

@ -28,12 +28,22 @@
:label="this.$t('message.Pi_OrderNo')"
prop="prdOrder"
>
<u-search
<!-- <u-search
:placeholder="this.$t('message.po_PleaseInput')"
v-model="form.prdOrder"
@search="model.queryOrderInInfo"
:show-action="false"
></u-search>
></u-search> -->
<jPicker
sureColor="#ff0000"
style="width: 230rpx"
@bindpicker="LocationChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="prdOrder"
/>
</u-form-item>
<u-form-item
:required="true"
@ -58,6 +68,7 @@
<u-form-item :label="this.$t('message.po_Location')" style="width: 50%">
<u-input
v-model="form.wkposCode"
@blur="cnoso"
:placeholder="this.$t('message.po_PleaseInput')"
/>
</u-form-item>
@ -185,6 +196,7 @@ export default class returningDom extends BasePage {
materialCode: null, // code
wlName: "", // name
};
prdOrder: any = [];
wlCode: any = "";
Location: any = [];
/**
@ -223,6 +235,9 @@ export default class returningDom extends BasePage {
// this.model.queryReturningTypeList();
this.form.sapFactoryCode = await this.model.queryDefaultFactoryCode();
}
cnoso() {
console.log(1);
}
back() {
// this.form.sendSpot = '';
// this.form.wkposCode = '';

@ -4,7 +4,7 @@
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t('message.rawMenu_virtual_Handover_QR') }}</view>
<view class="title">{{ $t("message.rawMenu_virtual_Handover_QR") }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
@ -59,7 +59,10 @@
</u-form-item>
</u-col>
<u-col :span="6">
<u-form-item prop="password" :label="this.$t('message.Summary_Password')">
<u-form-item
prop="password"
:label="this.$t('message.Summary_Password')"
>
<u-input
type="password"
v-model="submitForm.password"
@ -73,10 +76,14 @@
<view class="container">
<u-row>
<u-col :span="6">
<u-button type="primary" @click="onOk"> {{ $t('message.dn_Confirm') }} </u-button>
<u-button type="primary" @click="onOk">
{{ $t("message.dn_Confirm") }}
</u-button>
</u-col>
<u-col :span="6">
<u-button type="success" @click="onSubmit"> {{ $t('message.po_Submit') }} </u-button>
<u-button type="success" @click="onSubmit">
{{ $t("message.po_Submit") }}
</u-button>
</u-col>
</u-row>
</view>
@ -85,24 +92,24 @@
</template>
<script lang="ts">
import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { summaryHeaders } from './config';
import { VForm, VFormRules } from 'vue/types/form';
import { auth } from '@/store/modules/auth';
import { pick } from 'lodash/fp';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
import { Component, Ref } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import model from "./model";
import { summaryHeaders } from "./config";
import { VForm, VFormRules } from "vue/types/form";
import { auth } from "@/store/modules/auth";
import { pick } from "lodash/fp";
import http from "@/utils/request";
import { url } from "@/utils/url";
import { session } from "@/store/modules/session";
@Component
export default class VirtualSummary extends BasePage {
/**
* 表单引用
*/
@Ref('amountForm') readonly $amountForm!: VForm;
@Ref('submitForm') readonly $submitForm!: VForm;
@Ref("amountForm") readonly $amountForm!: VForm;
@Ref("submitForm") readonly $submitForm!: VForm;
/**
* 页面Module
@ -124,28 +131,39 @@ export default class VirtualSummary extends BasePage {
*/
amountForm = {
// oriSendSpot: '',
amount: '',
amount: "",
};
/**
* 上传表单
*/
submitForm = {
receiver: '',
receiverName: '',
password: '',
receiver: "",
receiverName: "",
password: "",
};
amountFormRules: VFormRules<any> = {
amount: [{ required: true, message: this.$t('message.Summary_PleaseInputNumber') as string }],
amount: [
{
required: true,
message: this.$t("message.Summary_PleaseInputNumber") as string,
},
],
};
submitFormRules: VFormRules<any> = {
receiver: [
{ required: true, message: this.$t('message.Summary_PleaseInputReceiver') as string },
{
required: true,
message: this.$t("message.Summary_PleaseInputReceiver") as string,
},
],
password: [
{ required: true, message: this.$t('message.Summary_PleaseInputPassword') as string },
{
required: true,
message: this.$t("message.Summary_PleaseInputPassword") as string,
},
],
};
@ -190,10 +208,13 @@ export default class VirtualSummary extends BasePage {
//
const firstRecord = model.summaryList[0];
if (firstRecord === undefined) {
uni.showToast({ icon: 'none', title: this.$t('message.LBWK') as string });
uni.showToast({
icon: "none",
title: this.$t("message.LBWK") as string,
});
return;
}
console.log('firstRecord', firstRecord);
console.log("firstRecord", firstRecord);
await model.checkAmount({
sapFactoryCode: model.sapFactoryCode,
loginName: session.loginName as string,
@ -207,25 +228,45 @@ export default class VirtualSummary extends BasePage {
//
const firstSelection = this.model.summaryList.find((_: any) => _.checked);
if (firstSelection === undefined) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_tip7') as string });
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip7") as string,
});
} else {
const inputAmount = parseFloat(this.amountForm.amount);
const totalHvAmount = firstSelection.totalHvAmount;
const totalMoAmount = firstSelection.totalMoAmount;
if (inputAmount + totalHvAmount - totalMoAmount > 0.000001) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_tip8') as string });
} else if (inputAmount <= 0 || inputAmount.toString().split('.')[1].length > 3) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_tip2') as string });
} else {
model.updateSummaryItem({
index: this.model.summaryList.findIndex((_: any) => _.checked),
newItem: {
...firstSelection,
// oriSendSpot: this.amountForm.oriSendSpot,
hvAmount: inputAmount,
},
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip8") as string,
});
} else if (
inputAmount <= 0
// inputAmount.toString().split(".")[1].length > 3
) {
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip2") as string,
});
} else {
// model.updateSummaryItem({
// index: this.model.summaryList.findIndex((_: any) => _.checked),
// newItem: {
// ...firstSelection,
// // oriSendSpot: this.amountForm.oriSendSpot,
// hvAmount: inputAmount,
// },
// });
this.model.summaryList.forEach((item: any) => {
if (item.checked) {
item.hvAmount = this.amountForm.amount;
}
});
uni.showToast({
icon: "none",
title: this.$t("message.success") as string,
});
uni.showToast({ icon: 'none', title: this.$t('message.success') as string });
}
}
});
@ -239,9 +280,12 @@ export default class VirtualSummary extends BasePage {
if (valid) {
let qtyStase = false;
let selectsta = true;
console.log('qqq', model.summaryList);
console.log("qqq", model.summaryList);
if (model.summaryList.length === 0) {
uni.showToast({ icon: 'none', title: this.$t('message.Pi_tip4') as string });
uni.showToast({
icon: "none",
title: this.$t("message.Pi_tip4") as string,
});
return;
} else {
model.summaryList.map((item) => {
@ -257,19 +301,26 @@ export default class VirtualSummary extends BasePage {
}
if (selectsta) {
uni.showToast({
icon: 'none',
title: this.$t('message.Pi_tip4') as string,
icon: "none",
title: this.$t("message.Pi_tip4") as string,
});
return;
}
if (qtyStase) {
uni.showToast({
icon: 'none',
title: this.$t('message.Summary_PleaseInputNumber') as string,
icon: "none",
title: this.$t("message.Summary_PleaseInputNumber") as string,
});
return;
}
console.log('111');
let res = await auth.checkPassword({
rfPwd: this.submitForm.password,
factoryCode: session.factoryCode as string,
loginName: this.submitForm.receiverName,
});
if (res.code != 1) {
return;
}
await model.uploadSummaryList({
operatorPass: this.submitForm.receiver,
factoryCode: session.factoryCode as string,
@ -278,16 +329,16 @@ export default class VirtualSummary extends BasePage {
dataList: model.summaryList.map((item) => ({
...pick(
[
'materialCode',
'materialDesc',
'unit',
'wkposCode',
'prdMaterialDesc',
'sendSpot',
"materialCode",
"materialDesc",
"unit",
"wkposCode",
"prdMaterialDesc",
"sendSpot",
// 'oriSendSpot',
'mrpCode',
"mrpCode",
],
item,
item
),
amount: String(item.amount),
hvAmount: String(item.hvAmount),
@ -295,13 +346,14 @@ export default class VirtualSummary extends BasePage {
totalHvAmount: String(item.totalHvAmount),
factoryCode: model.sapFactoryCode,
})),
includeOrderOutIdList: model.proOrderResultList.map((item: any) => item.orderOutId),
includeOrderOutIdList: model.proOrderResultList.map(
(item: any) => item.orderOutId
),
});
this.submitForm.receiverName = '';
this.submitForm.receiver = '';
this.submitForm.password = '';
this.submitForm.receiverName = "";
this.submitForm.receiver = "";
this.submitForm.password = "";
this.isBusinessFinished = true;
// uni.navigateBack({ delta: 2 });
model.clearProOrderResultList();
setTimeout(() => {
uni.navigateBack({ delta: 2 });
@ -322,8 +374,8 @@ export default class VirtualSummary extends BasePage {
});
} catch (e) {
uni.showToast({
icon: 'none',
title: (this.$t('message.Summary_Tip') as string) + e.message,
icon: "none",
title: (this.$t("message.Summary_Tip") as string) + e.message,
});
}
}
@ -332,7 +384,8 @@ export default class VirtualSummary extends BasePage {
<style lang="scss" scoped>
.page-aggregating-order {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background: #f2f2f2
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 30rpx;
min-height: 100%;

@ -0,0 +1,530 @@
<template>
<view class="page-raw-receipt">
<!-- 头部 -->
<view
class="header"
:style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }"
>
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t("message.dn_ReceivingGoods") }}</view>
<view class="right"></view>
</view>
<view class="content">
<!-- 单号 -->
<view class="single">
<view class="single-left">
<view>{{ $t("message.dn_OddNumbers") }}</view>
<u-search
:placeholder="$t('message.dn_PleaseScan')"
v-model="form.documentNo"
@search="model.queryOrderInInfo"
:show-action="false"
></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="query"></u-button>
</view>
</view>
<!-- 采购单号 -->
<view class="material">
<view class="material-left">
<view>采购单</view>
<jPicker
sureColor="#ff0000"
style="width: 260rpx"
@bindpicker="poListChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="poList"
/>
</view>
</view>
<!-- 物料 -->
<view class="material">
<view class="material-left">
<view>物料号</view>
<jPicker
sureColor="#ff0000"
style="width: 260rpx"
@bindpicker="materialChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="materialList"
/>
</view>
<view class="material-right">
<view class="material-right-title">物料描述</view>
<view class="material-right-code">{{ every.materialDesc }}</view>
</view>
</view>
<!-- 需求数量 -->
<view class="number">
<view class="number-left">
<view class="number-left-title">需求数量</view>
<u-input
v-model="every.requestAmount"
placeholder=" "
:type="type"
:border="border"
class="input"
disabled
/>
</view>
<view class="number-right">
<view class="number-right-title">累计数量</view>
<u-input
v-model="Cumulative"
:type="type"
:border="border"
class="input"
disabled
/>
</view>
</view>
<!-- 库位 -->
<view class="library">
<view class="library-left">
<view>库位</view>
<jPicker
sureColor="#ff0000"
style="width: 230rpx"
@bindpicker="LocationChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="Location"
/>
</view>
<view class="library-right">
<view class="library-right-title">本次数量</view>
<u-input
v-model="receiptAmount"
:type="type"
:border="border"
class="input"
/>
</view>
</view>
<!-- 添加 -->
<view class="add">
<u-button type="primary" @click="Add"></u-button>
</view>
<!-- 表格 -->
<u-table class="library-table">
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.product_Location") }}</u-th>
<u-th class="u-th">{{ $t("message.product_Number") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.receiptAmount }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }}
</div>
</u-td>
</u-tr>
</u-table>
</view>
<!-- 底部按钮 -->
<view class="bottom-bar">
<u-row class="button-bar">
<u-col :span="4">
<u-button type="primary" @click="bill"></u-button>
</u-col>
<u-col :span="4">
<u-button type="primary" @click="onSubmit"></u-button>
</u-col>
<u-col :span="4">
<u-button type="error" @click="back"></u-button>
</u-col>
</u-row>
</view>
</view>
</template>
<script lang="ts">
import { Component, Ref } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import jPicker from "@/components/J-Picker/jPicker.vue";
import { session } from "@/store/modules/session";
import { VForm, VFormRules } from "vue/types/form";
import model from "./model";
@Component({
components: {
jPicker,
},
})
export default class dnReceiptDom extends BasePage {
model = model;
form: any = {
documentNo: "",
};
material: any = {};
poList: any = [];
materialList: any = [];
every: any = "";
value = "";
type = "text";
border = true;
//
Cumulative: any = 0;
//
sendSpotList: any = [];
//
receiptAmount: any = "";
//
Location: any = [];
//
LocationList: any = [];
//
wlCode: any = "";
//
upload: any = [];
//
async onShow() {
//
let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let user: any = session.user;
let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: sendSpot,
factoryCode: means.session.user.factoryCode,
workArea: user.list[0].workareaCode,
};
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
res.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")";
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
}
//
async query() {
if (this.form.documentNo == "") {
uni.showToast({
icon: "none",
title: "请输入单号",
});
return;
}
await this.model.ImportQueryOrderInfo(this.form.documentNo);
let list: any = localStorage.getItem("list");
localStorage.removeItem("list");
this.material = JSON.parse(list);
this.material.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.poNo;
pickerName.value = item.poNo;
this.poList.push(pickerName);
});
}
//
poListChoice(e: any) {
this.material.forEach((item: any) => {
if (item.poNo == e.pickerName.value) {
let pickerName: any = {};
pickerName.label = item.materialCode;
pickerName.value = item.materialCode;
this.materialList.push(pickerName);
}
});
}
// receiptAmount requestAmount
materialChoice(e: any) {
this.material.forEach((item: any) => {
if (item.materialCode == e.pickerName.value) {
this.every = item;
return;
}
});
}
//
LocationChoice(e: any) {
console.log("e>>>>>>>>>>>>>>>>>>>>>>>>", e);
this.wlCode = e.pickerName;
}
//
Add() {
if (this.receiptAmount == "" || this.wlCode == "") {
uni.showToast({
icon: "none",
title: "请输入正确的库位和数量" as any,
});
return;
}
if (parseFloat(this.receiptAmount) <= 0) {
uni.showToast({
icon: "none",
title: "请输入大于0的数量" as any,
});
return;
}
if (parseFloat(this.receiptAmount) > this.every.requestAmount) {
uni.showToast({
icon: "none",
title: "不能大于需求数量,请重新输入" as any,
});
return;
}
let isTrue: boolean = true;
if (this.sendSpotList.length != 0) {
this.sendSpotList.forEach((item: any) => {
if (this.wlCode.sendSpot != item) {
isTrue = false;
}
});
}
if (isTrue != true) {
uni.showToast({
icon: "none",
title: "请选择相同库位" as any,
});
return;
}
let objString = JSON.stringify(this.every);
let TEM = JSON.parse(objString);
TEM.wllist = null;
TEM.receiptAmount = this.receiptAmount;
TEM.wlCode = this.wlCode.label;
this.sendSpotList.push(this.wlCode.sendSpot);
console.log("this.sendSpotList", this.sendSpotList);
console.log("TEM", TEM);
this.LocationList.push(TEM);
this.every.wllist = this.LocationList;
console.log("表格数据", this.LocationList);
console.log("要上传的数据", this.every);
this.receiptAmount = "";
isTrue = true;
this.business();
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
this.every.wllist.splice(index, 1);
console.log("表格数据", this.LocationList);
console.log("要上传的数据", this.every);
this.business();
}
async onSubmit() {
if (this.every.wllist == null || this.every.wllist.length == 0) {
uni.showToast({
icon: "none",
title: "请确保所选物料已分配库位" as any,
});
}
this.upload.push(this.every);
await this.model.submitImportOrder(this.upload);
this.LocationList = [];
this.wlCode = "";
this.receiptAmount = "";
this.Cumulative = 0;
this.every = "";
this.materialList = [];
}
bill() {
this.redirectTo(this.page.raw.ingoods.dnReceipt.bill);
}
//
business() {
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.receiptAmount);
});
this.Cumulative = num;
this.every.receiptAmount = num;
console.log("this.every", this.every);
}
}
</script>
<style lang="scss" scoped>
.page-raw-receipt {
background: #f2f2f2
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 88rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.content {
width: 100%;
background: white;
border-radius: 15rpx;
padding: 10rpx;
.single {
width: 100%;
height: 100rpx;
display: flex;
.single-left {
width: 80%;
height: 100%;
display: flex;
view {
width: 110rpx;
height: 100%;
line-height: 100rpx;
}
}
.single-right {
button {
margin-top: 15rpx;
width: 150rpx;
height: 70rpx;
}
}
}
.material {
width: 100%;
height: 100rpx;
display: flex;
.material-left {
width: 50%;
height: 100%;
display: flex;
view {
width: 100rpx;
line-height: 100rpx;
}
}
.material-right {
width: 50%;
height: 100%;
display: flex;
.material-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.material-right-code {
width: 190rpx;
height: 100%;
// line-height: 100rpx;
}
}
}
.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;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
.number-right {
width: 50%;
height: 100%;
display: flex;
.number-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.input {
width: 200rpx;
height: 70rpx;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
}
.library {
width: 100%;
height: 100rpx;
display: flex;
.library-left {
width: 50%;
height: 100%;
display: flex;
view {
width: 100rpx;
line-height: 100rpx;
}
}
.library-right {
width: 50%;
height: 100%;
display: flex;
.library-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.input {
width: 200rpx;
height: 70rpx;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
}
.add {
width: 100%;
height: 100rpx;
position: relative;
button {
position: absolute;
top: 10rpx;
right: 20rpx;
}
}
}
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
}
</style>

@ -0,0 +1,98 @@
<template>
<view class="page-raw-receipt">
<view
class="header"
:style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }"
>
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">收货明细</view>
<view class="right"></view>
</view>
<view class="content">
<!-- 表格 -->
<u-table class="library-table">
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.product_Location") }}</u-th>
<u-th class="u-th">{{ $t("message.product_Number") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.value.value }}</u-td>
<u-td class="u-td">{{ item.num }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }}
</div>
</u-td>
</u-tr>
</u-table>
</view>
</view>
</template>
<script lang="ts">
import { Component, Ref } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import { VForm, VFormRules } from "vue/types/form";
import model from "./model";
@Component
export default class dnReceiptDom extends BasePage {
model = model;
form: any = {
documentNo: "",
};
list: any = [];
wlCode = "";
value = "";
type = "text";
border = true;
LocationList = [
{
value: {
value: "",
},
num: 0,
},
];
bookTypeChange(e: any) {}
deleteItem(index: any) {}
}
</script>
<style lang="scss" scoped>
.page-raw-receipt {
background: #f2f2f2
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 88rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
}
</style>

@ -0,0 +1,530 @@
<template>
<view class="page-raw-receipt">
<!-- 头部 -->
<view
class="header"
:style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }"
>
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t("message.dn_ReceivingGoods") }}</view>
<view class="right"></view>
</view>
<view class="content">
<!-- 单号 -->
<view class="single">
<view class="single-left">
<view>{{ $t("message.dn_OddNumbers") }}</view>
<u-search
:placeholder="$t('message.dn_PleaseScan')"
v-model="form.documentNo"
@search="model.queryOrderInInfo"
:show-action="false"
></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="query"></u-button>
</view>
</view>
<!-- 采购单号 -->
<view class="material">
<view class="material-left">
<view>采购单</view>
<jPicker
sureColor="#ff0000"
style="width: 260rpx"
@bindpicker="poListChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="poList"
/>
</view>
</view>
<!-- 物料 -->
<view class="material">
<view class="material-left">
<view>物料号</view>
<jPicker
sureColor="#ff0000"
style="width: 260rpx"
@bindpicker="materialChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="materialList"
/>
</view>
<view class="material-right">
<view class="material-right-title">物料描述</view>
<view class="material-right-code">{{ every.materialDesc }}</view>
</view>
</view>
<!-- 需求数量 -->
<view class="number">
<view class="number-left">
<view class="number-left-title">需求数量</view>
<u-input
v-model="every.requestAmount"
placeholder=" "
:type="type"
:border="border"
class="input"
disabled
/>
</view>
<view class="number-right">
<view class="number-right-title">累计数量</view>
<u-input
v-model="Cumulative"
:type="type"
:border="border"
class="input"
disabled
/>
</view>
</view>
<!-- 库位 -->
<view class="library">
<view class="library-left">
<view>库位</view>
<jPicker
sureColor="#ff0000"
style="width: 230rpx"
@bindpicker="LocationChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="Location"
/>
</view>
<view class="library-right">
<view class="library-right-title">本次数量</view>
<u-input
v-model="receiptAmount"
:type="type"
:border="border"
class="input"
/>
</view>
</view>
<!-- 添加 -->
<view class="add">
<u-button type="primary" @click="Add"></u-button>
</view>
<!-- 表格 -->
<u-table class="library-table">
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.product_Location") }}</u-th>
<u-th class="u-th">{{ $t("message.product_Number") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.receiptAmount }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }}
</div>
</u-td>
</u-tr>
</u-table>
</view>
<!-- 底部按钮 -->
<view class="bottom-bar">
<u-row class="button-bar">
<u-col :span="4">
<u-button type="primary" @click="bill"></u-button>
</u-col>
<u-col :span="4">
<u-button type="primary" @click="onSubmit"></u-button>
</u-col>
<u-col :span="4">
<u-button type="error" @click="back"></u-button>
</u-col>
</u-row>
</view>
</view>
</template>
<script lang="ts">
import { Component, Ref } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import jPicker from "@/components/J-Picker/jPicker.vue";
import { session } from "@/store/modules/session";
import { VForm, VFormRules } from "vue/types/form";
import model from "./model";
@Component({
components: {
jPicker,
},
})
export default class dnReceiptDom extends BasePage {
model = model;
form: any = {
documentNo: "",
};
material: any = {};
poList: any = [];
materialList: any = [];
every: any = "";
value = "";
type = "text";
border = true;
//
Cumulative: any = 0;
//
sendSpotList: any = [];
//
receiptAmount: any = "";
//
Location: any = [];
//
LocationList: any = [];
//
wlCode: any = "";
//
upload: any = [];
//
async onShow() {
//
let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let user: any = session.user;
let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: sendSpot,
factoryCode: means.session.user.factoryCode,
workArea: user.list[0].workareaCode,
};
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
res.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")";
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
}
//
async query() {
if (this.form.documentNo == "") {
uni.showToast({
icon: "none",
title: "请输入单号",
});
return;
}
await this.model.queryOrderInInfo(this.form.documentNo);
let list: any = localStorage.getItem("list");
localStorage.removeItem("list");
this.material = JSON.parse(list);
this.material.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.poNo;
pickerName.value = item.poNo;
this.poList.push(pickerName);
});
}
//
poListChoice(e: any) {
this.material.forEach((item: any) => {
if (item.poNo == e.pickerName.value) {
let pickerName: any = {};
pickerName.label = item.materialCode;
pickerName.value = item.materialCode;
this.materialList.push(pickerName);
}
});
}
// receiptAmount requestAmount
materialChoice(e: any) {
this.material.forEach((item: any) => {
if (item.materialCode == e.pickerName.value) {
this.every = item;
return;
}
});
}
//
LocationChoice(e: any) {
console.log("e>>>>>>>>>>>>>>>>>>>>>>>>", e);
this.wlCode = e.pickerName;
}
//
Add() {
if (this.receiptAmount == "" || this.wlCode == "") {
uni.showToast({
icon: "none",
title: "请输入正确的库位和数量" as any,
});
return;
}
if (parseFloat(this.receiptAmount) <= 0) {
uni.showToast({
icon: "none",
title: "请输入大于0的数量" as any,
});
return;
}
if (parseFloat(this.receiptAmount) > this.every.requestAmount) {
uni.showToast({
icon: "none",
title: "不能大于需求数量,请重新输入" as any,
});
return;
}
let isTrue: boolean = true;
if (this.sendSpotList.length != 0) {
this.sendSpotList.forEach((item: any) => {
if (this.wlCode.sendSpot != item) {
isTrue = false;
}
});
}
if (isTrue != true) {
uni.showToast({
icon: "none",
title: "请选择相同库位" as any,
});
return;
}
let objString = JSON.stringify(this.every);
let TEM = JSON.parse(objString);
TEM.wllist = null;
TEM.receiptAmount = this.receiptAmount;
TEM.wlCode = this.wlCode.label;
this.sendSpotList.push(this.wlCode.sendSpot);
console.log("this.sendSpotList", this.sendSpotList);
console.log("TEM", TEM);
this.LocationList.push(TEM);
this.every.wllist = this.LocationList;
console.log("表格数据", this.LocationList);
console.log("要上传的数据", this.every);
this.receiptAmount = "";
isTrue = true;
this.business();
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
this.every.wllist.splice(index, 1);
console.log("表格数据", this.LocationList);
console.log("要上传的数据", this.every);
this.business();
}
async onSubmit() {
if (this.every.wllist == null || this.every.wllist.length == 0) {
uni.showToast({
icon: "none",
title: "请确保所选物料已分配库位" as any,
});
}
this.upload.push(this.every);
await this.model.submitOrderInEnter(this.upload);
this.LocationList = [];
this.wlCode = "";
this.receiptAmount = "";
this.Cumulative = 0;
this.every = "";
this.materialList = [];
}
bill() {
this.redirectTo(this.page.raw.ingoods.dnReceipt.bill);
}
//
business() {
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.receiptAmount);
});
this.Cumulative = num;
this.every.receiptAmount = num;
console.log("this.every", this.every);
}
}
</script>
<style lang="scss" scoped>
.page-raw-receipt {
background: #f2f2f2
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 88rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.content {
width: 100%;
background: white;
border-radius: 15rpx;
padding: 10rpx;
.single {
width: 100%;
height: 100rpx;
display: flex;
.single-left {
width: 80%;
height: 100%;
display: flex;
view {
width: 110rpx;
height: 100%;
line-height: 100rpx;
}
}
.single-right {
button {
margin-top: 15rpx;
width: 150rpx;
height: 70rpx;
}
}
}
.material {
width: 100%;
height: 100rpx;
display: flex;
.material-left {
width: 50%;
height: 100%;
display: flex;
view {
width: 100rpx;
line-height: 100rpx;
}
}
.material-right {
width: 50%;
height: 100%;
display: flex;
.material-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.material-right-code {
width: 190rpx;
height: 100%;
// line-height: 100rpx;
}
}
}
.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;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
.number-right {
width: 50%;
height: 100%;
display: flex;
.number-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.input {
width: 200rpx;
height: 70rpx;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
}
.library {
width: 100%;
height: 100rpx;
display: flex;
.library-left {
width: 50%;
height: 100%;
display: flex;
view {
width: 100rpx;
line-height: 100rpx;
}
}
.library-right {
width: 50%;
height: 100%;
display: flex;
.library-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.input {
width: 200rpx;
height: 70rpx;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
}
.add {
width: 100%;
height: 100rpx;
position: relative;
button {
position: absolute;
top: 10rpx;
right: 20rpx;
}
}
}
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
}
</style>

@ -161,7 +161,28 @@ export class ReceiptModule extends VuexModule {
localStorage.setItem("sendSpot", JSON.stringify(list[0].sendSpot) as any);
return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx };
}
//海外DN 根据单号查询物料
@MutationAction
async ImportQueryOrderInfo(dnNo: string) {
const { list }: any = await http.post(url.material.DNorderin.ImportInfo, {
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;
// });
localStorage.setItem("list", JSON.stringify(list) as any);
localStorage.setItem("sendSpot", JSON.stringify(list[0].sendSpot) as any);
return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx };
}
/**
*
*/
@ -187,7 +208,29 @@ export class ReceiptModule extends VuexModule {
);
return { orderInInfoList };
}
//海外DN提交
@MutationAction
async submitImportOrder(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.ImportEnter, {
dnNo: this.dnNo,
factoryCode: session.factoryCode,
loginName: session.loginName,
list,
});
uni.showToast({
icon: "none",
title: result.msg,
});
const orderInInfoList = result.list.sort(
(a: any, b: any) =>
Number(a.accountingStatus) - Number(b.accountingStatus)
);
return { orderInInfoList };
}
/**
*
*/

@ -0,0 +1,465 @@
<template>
<view class="page-picking-order">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="index" />
</view>
<view class="title">{{ $t("message.Pi_ByOrderPicking") }}</view>
<view class="right"></view>
</view>
<view class="table-wrapper">
<wyb-table
class="table"
ref="table"
width="100%"
enable-check="single"
show-left-and-right-border
:headers="headers"
:contents="model.orderInInfoList"
:show-vert-border="false"
@onCheck="handleRow"
></wyb-table>
</view>
<!-- 列表展示数据 -->
<view class="Exhibition">
<view class="Exhibition-left">
<view class="Exhibition-left-title">工位:</view>
<view class="Exhibition-left-data">{{ some.sendSpot }}</view>
</view>
<view class="Exhibition-right">
<view class="Exhibition-right-title">已拣数量:</view>
<view class="Exhibition-right-data">{{ some.totalMoAmount }}</view>
</view>
</view>
<!-- 添加库位 -->
<view class="library">
<view class="library-left">
<view>库位:</view>
<jPicker
sureColor="#ff0000"
style="width: 230rpx"
@bindpicker="LocationChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="Location"
/>
</view>
<view class="library-right">
<view class="library-right-title">本次数量</view>
<u-input v-model="qty" :type="type" :border="border" class="input" />
</view>
</view>
<!-- 添加 -->
<view class="add">
<u-button type="primary" @click="Add"></u-button>
</view>
<!-- 表格 -->
<u-table class="library-table">
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.product_Location") }}</u-th>
<u-th class="u-th">{{ $t("message.product_Number") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.qty }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }}
</div>
</u-td>
</u-tr>
</u-table>
<view class="bottom-bar">
<div class="extra">
<u-form ref="form" :model="form" :error-type="['toast']">
<u-row class="bottom-info"> </u-row>
</u-form>
</div>
<div class="container">
<u-row>
<u-col :span="4">
<u-button type="primary" class="appoint" @click="appoint"
>拣配明细</u-button
>
</u-col>
<u-col :span="4">
<u-button type="success" @click="onSubmit"> </u-button>
</u-col>
<u-col :span="4">
<u-button type="error" @click="onUpload"> </u-button>
</u-col>
</u-row>
</div>
</view>
</view>
</template>
<script lang="ts">
import { Component, Ref } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import model from "./model";
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";
@Component({
components: {
jPicker,
},
})
export default class RawReceiptDetail extends BasePage {
/**
* 表单引用
*/
@Ref("form") readonly $form!: VForm;
@Ref("submitForm") readonly $submitForm!: VForm;
submitForm = {
receiver: "",
receiverName: "",
password: "",
};
/**
* 页面Module
*/
model = model;
type = "text";
wlCode: any = "";
border = true;
//
LocationList: any = [];
//
Location: any = [];
someIndex: number = 0;
some: any = {};
qty: any = "";
/**
* 表单数据
*/
form: any = {
// locationCode: null,
amount: null,
};
index() {
this.toPage(this.page.raw.ingoods.dnReturnGoods.index);
}
/**
* 表单校验
*/
rules: VFormRules<any> = {
// 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 },
],
};
/**
* 库存地点选择
*/
locationCodeSelect = false;
/**
* 表头
*/
headers = headers;
LocationChoice(e: any) {
console.log("e>>>>>>>>>>>>>>>>>>>>>>>>", e);
this.wlCode = e.pickerName;
}
handleRow({ data }: any) {
this.someIndex = data[0].index;
this.some = data[0].lineData;
}
Add() {
if (this.qty == "" || this.wlCode == "") {
uni.showToast({
icon: "none",
title: "请输入正确的库位和数量" as any,
});
return;
}
if (parseFloat(this.qty) <= 0) {
uni.showToast({
icon: "none",
title: "请输入大于0的数量" as any,
});
return;
}
// if (
// parseFloat(this.qty) > model.orderInInfoList[this.someIndex].receiptAmount
// ) {
// uni.showToast({
// icon: "none",
// title: "" as any,
// });
// return;
// }
let num = parseFloat(this.qty);
this.LocationList.forEach((item: any) => {
num += parseFloat(item.qty);
});
console.log(num);
// if (num > this.model.orderInInfoList[this.someIndex].receiptAmount) {
// uni.showToast({
// icon: "none",
// title: "" as any,
// });
// return;
// }
let isTrue: boolean = true;
if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => {
if (this.wlCode.sendSpot != item.Code) {
uni.showToast({
icon: "none",
title: "请选择正确的库位" as any,
});
return (isTrue = false);
}
});
}
if (this.some == {}) {
uni.showToast({
icon: "none",
title: "请先选择一个物料" as any,
});
return;
}
if ((isTrue = true)) {
let arr = {
wlCode: this.wlCode.label,
qty: this.qty,
Code: this.wlCode.sendSpot,
};
this.LocationList.push(arr);
let objString = JSON.stringify(this.some);
let TEM = JSON.parse(objString);
TEM.wlList = null;
TEM.wlCode = this.wlCode.label;
TEM.requestAmount = this.qty;
// this.model.orderInInfoList[this.someIndex].wlQTyList.push(TEM);
// this.model.orderInInfoList[this.someIndex].receiptAmount += parseFloat(
// this.qty
// );
console.log(
"this.model.orderInInfoList",
this.model.orderInInfoList[this.someIndex]
);
this.qty = "";
}
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
// this.model.orderInInfoList[this.someIndex].wlQTyList.splice(index, 1);
this.business();
}
business() {
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.qty);
});
// this.model.orderInInfoList[this.someIndex].receiptAmount = num;
console.log(
"this.model.orderInInfoList",
this.model.orderInInfoList[this.someIndex]
);
}
async onShow() {
//
let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let user: any = session.user;
let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: sendSpot,
factoryCode: means.session.user.factoryCode,
workArea: user.list[0].workareaCode,
};
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
res.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")";
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
this.model.orderInInfoList.forEach((item: any) => {
item.receiptAmount = 0;
item.wlQTyList = [];
});
console.log("this.model.orderInInfoList", this.model.orderInInfoList);
}
appoint() {}
/**
* 提交
*/
async onSubmit() {
await this.model.submitOrderInEnter();
}
}
</script>
<style lang="scss" scoped>
.page-picking-order {
background: #f2f2f2
linear-gradient(0deg, #311818 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 30rpx;
min-height: 100%;
padding-top: 118rpx;
padding-bottom: 222rpx;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
display: flex;
height: 88rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.table-wrapper {
background-color: #fff;
height: 500rpx;
overflow-x: auto;
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
}
.Exhibition {
width: 100%;
height: 100rpx;
margin-top: 20rpx;
display: flex;
.Exhibition-left {
width: 50%;
height: 100%;
display: flex;
.Exhibition-left-title {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
.Exhibition-left-data {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
}
.Exhibition-right {
width: 50%;
height: 100%;
display: flex;
.Exhibition-right-title {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
.Exhibition-right-data {
width: 50%;
height: 100%;
text-align: center;
line-height: 100rpx;
}
}
}
.library {
width: 100%;
height: 100rpx;
display: flex;
.library-left {
width: 50%;
height: 100%;
display: flex;
view {
width: 230rpx;
line-height: 100rpx;
text-align: center;
}
}
.library-right {
width: 50%;
height: 100%;
display: flex;
.library-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.input {
width: 200rpx;
height: 70rpx;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
}
.add {
width: 100%;
height: 100rpx;
position: relative;
button {
position: absolute;
top: 10rpx;
right: 20rpx;
}
}
.bottom-bar {
z-index: 21;
position: fixed;
bottom: 0;
left: 0;
right: 0;
.container {
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
.extra {
background-color: #fff;
margin: 5px;
border-radius: 5px;
padding: 0 10px;
}
.bottom-info {
.u-form-item {
padding: 0;
}
}
}
}
</style>

@ -27,9 +27,16 @@
>
</u-button>
</u-col>
<<<<<<< Updated upstream
<<<<<<< HEAD
<u-button @click="DNReceiving">DN</u-button>
<u-button @click="POReceiving">PO</u-button>
<u-button @click="importDN">DN</u-button>
=======
>>>>>>> 908d8a2f172057491172510bf10bf949d527de9f
=======
>>>>>>> Stashed changes
<!-- <u-col :span="12">
<u-button @click="toPage(page.raw.ingoods.poReceipt.index)">
<u-icon size="80" name="/static/icons/icon-14.png"></u-icon>
@ -56,15 +63,6 @@ export default class RawAppointment extends BasePage {
onLoad(option: { childData: any }) {
this.childData = JSON.parse(option.childData);
}
DNReceiving() {
this.toPage(this.page.raw.ingoods.dnReceipt.dnReceiving);
}
POReceiving() {
this.toPage(this.page.raw.ingoods.poReceipt.poReceiving);
}
importDN() {
this.toPage(this.page.raw.ingoods.dnReceipt.importDN);
}
}
</script>

@ -150,6 +150,7 @@ export class ReceiptModule extends VuexModule {
item.receiptAmount = item.requestAmount;
// item.receiptAmount = parseFloat(item.receiptAmount).toFixed(1);
});
localStorage.setItem("list", JSON.stringify(list) as any);
localStorage.setItem("sendSpot", JSON.stringify(list[0].sendSpot) as any);
return { poNo, orderInInfo, orderInInfoList, orderInInfoListEx, code1 };
}
@ -158,7 +159,7 @@ export class ReceiptModule extends VuexModule {
*
*/
@MutationAction
async submitOrderInEnter(list:any) {
async submitOrderInEnter(list: any) {
// const list = (this.state as any).orderInInfoList.map((item: any) => {
// item.orderStatus = item.checked ? "2" : "1";
// item.requestAmount = item.checked ? item.y : "0";

@ -0,0 +1,502 @@
<template>
<view class="page-raw-receipt">
<!-- 头部 -->
<view
class="header"
:style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }"
>
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t("message.po_ReceivingGoods") }}</view>
<view class="right"></view>
</view>
<view class="content">
<!-- 单号 -->
<view class="single">
<view class="single-left">
<view>{{ $t("message.po_OddNumbers") }}</view>
<u-search
:placeholder="$t('message.po_PleaseScan')"
v-model="form.documentNo"
@search="model.queryOrderInInfo"
:show-action="false"
></u-search>
</view>
<view class="single-right">
<u-button type="primary" @click="query"></u-button>
</view>
</view>
<!-- 物料 -->
<view class="material">
<view class="material-left">
<view>物料号</view>
<jPicker
sureColor="#ff0000"
style="width: 260rpx"
@bindpicker="materialChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="materialList"
/>
</view>
<view class="material-right">
<view class="material-right-title">物料描述</view>
<view class="material-right-code">{{ every.materialDesc }}</view>
</view>
</view>
<!-- 需求数量 -->
<view class="number">
<view class="number-left">
<view class="number-left-title">需求数量</view>
<u-input
v-model="every.requestAmount"
:type="type"
:border="border"
placeholder=" "
class="input"
disabled
/>
</view>
<view class="number-right">
<view class="number-right-title">累计数量</view>
<u-input
v-model="Cumulative"
:type="type"
:border="border"
class="input"
disabled
/>
</view>
</view>
<!-- 库位 -->
<view class="library">
<view class="library-left">
<view>库位</view>
<jPicker
sureColor="#ff0000"
style="width: 230rpx"
@bindpicker="LocationChoice"
showKey="value"
valKey="value"
:val="wlCode"
class="search"
:options="Location"
/>
</view>
<view class="library-right">
<view class="library-right-title">本次数量</view>
<u-input
v-model="receiptAmount"
:type="type"
:border="border"
class="input"
/>
</view>
</view>
<!-- 添加 -->
<view class="add">
<u-button type="primary" @click="Add"></u-button>
</view>
<!-- 表格 -->
<u-table class="library-table">
<u-tr class="u-tr">
<u-th class="u-th">{{ $t("message.product_Location") }}</u-th>
<u-th class="u-th">{{ $t("message.product_Number") }}</u-th>
<u-th class="u-th">{{ $t("message.operation") }}</u-th>
</u-tr>
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
<u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.receiptAmount }}</u-td>
<u-td class="u-td">
<div class="u-td" @click="deleteItem(index)">
{{ $t("message.product_Delete") }}
</div>
</u-td>
</u-tr>
</u-table>
</view>
<!-- 底部按钮 -->
<view class="bottom-bar">
<u-row class="button-bar">
<u-col :span="4">
<u-button type="primary" @click="bill"></u-button>
</u-col>
<u-col :span="4">
<u-button type="primary" @click="onSubmit"></u-button>
</u-col>
<u-col :span="4">
<u-button type="error" @click="back"></u-button>
</u-col>
</u-row>
</view>
</view>
</template>
<script lang="ts">
import { Component, Ref } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import jPicker from "@/components/J-Picker/jPicker.vue";
import { session } from "@/store/modules/session";
import { VForm, VFormRules } from "vue/types/form";
import model from "./model";
@Component({
components: {
jPicker,
},
})
export default class dnReceiptDom extends BasePage {
model = model;
form: any = {
documentNo: "",
};
material: any = {};
materialList: any = [];
every: any = "";
value = "";
type = "text";
border = true;
//
Cumulative: any = 0;
//
sendSpotList: any = [];
//
receiptAmount: any = "";
//
Location: any = [];
//
LocationList: any = [];
//
wlCode: any = "";
//
upload: any = [];
//
async onShow() {
//
let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let user: any = session.user;
let sendSpot = JSON.parse(localStorage.getItem("sendSpot") as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: sendSpot,
factoryCode: means.session.user.factoryCode,
workArea: user.list[0].workareaCode,
};
let res: any = await this.model.queryByFactoryCodeAndWorkAreaCode(content);
res.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.locationCode;
pickerName.value = item.locationCode + "(" + item.sendSpot + ")";
pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName);
});
}
//
async query() {
if (this.form.documentNo == "") {
uni.showToast({
icon: "none",
title: "请输入单号",
});
return;
}
await this.model.queryOrderInInfo(this.form.documentNo);
let list: any = localStorage.getItem("list");
localStorage.removeItem("list");
this.material = JSON.parse(list);
this.material.forEach((item: any) => {
let pickerName: any = {};
pickerName.label = item.materialCode;
pickerName.value = item.materialCode;
this.materialList.push(pickerName);
});
}
// receiptAmount requestAmount
materialChoice(e: any) {
this.material.forEach((item: any) => {
if (item.materialCode == e.pickerName.value) {
this.every = item;
return;
}
});
}
//
LocationChoice(e: any) {
console.log("e>>>>>>>>>>>>>>>>>>>>>>>>", e);
this.wlCode = e.pickerName;
}
//
Add() {
if (this.receiptAmount == "" || this.wlCode == "") {
uni.showToast({
icon: "none",
title: "请输入正确的库位和数量" as any,
});
return;
}
if (parseFloat(this.receiptAmount) <= 0) {
uni.showToast({
icon: "none",
title: "请输入大于0的数量" as any,
});
return;
}
if (parseFloat(this.receiptAmount) > this.every.requestAmount) {
uni.showToast({
icon: "none",
title: "不能大于需求数量,请重新输入" as any,
});
return;
}
let isTrue: boolean = true;
if (this.sendSpotList.length != 0) {
this.sendSpotList.forEach((item: any) => {
if (this.wlCode.sendSpot != item) {
isTrue = false;
}
});
}
if (isTrue != true) {
uni.showToast({
icon: "none",
title: "请选择相同库位" as any,
});
return;
}
let objString = JSON.stringify(this.every);
let TEM = JSON.parse(objString);
TEM.wllist = null;
TEM.receiptAmount = this.receiptAmount;
TEM.wlCode = this.wlCode.label;
this.sendSpotList.push(this.wlCode.sendSpot);
console.log("this.sendSpotList", this.sendSpotList);
console.log("TEM", TEM);
this.LocationList.push(TEM);
this.every.wllist = this.LocationList;
console.log("表格数据", this.LocationList);
console.log("要上传的数据", this.every);
this.receiptAmount = "";
isTrue = true;
this.business();
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
this.every.wllist.splice(index, 1);
console.log("表格数据", this.LocationList);
console.log("要上传的数据", this.every);
this.business();
}
async onSubmit() {
if (this.every.wllist == null || this.every.wllist.length == 0) {
uni.showToast({
icon: "none",
title: "请确保所选物料已分配库位" as any,
});
}
this.upload.push(this.every);
await this.model.submitOrderInEnter(this.upload);
this.LocationList = [];
this.wlCode = "";
this.receiptAmount = "";
this.Cumulative = 0;
this.every = "";
this.materialList = [];
}
bill() {
this.redirectTo(this.page.raw.ingoods.dnReceipt.bill);
}
//
business() {
let num: number = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.receiptAmount);
});
this.Cumulative = num;
this.every.receiptAmount = num;
console.log("this.every", this.every);
}
}
</script>
<style lang="scss" scoped>
.page-raw-receipt {
background: #f2f2f2
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;
.header {
position: fixed;
top: 36rpx;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 88rpx;
line-height: 88rpx;
color: #fff;
font-size: 34rpx;
font-weight: 500;
text-align: center;
.title {
flex: 3;
}
.left,
.right {
flex: 1;
}
.icon {
display: flex;
justify-content: center;
align-items: center;
width: 88rpx;
height: 88rpx;
}
}
.content {
width: 100%;
background: white;
border-radius: 15rpx;
padding: 10rpx;
.single {
width: 100%;
height: 100rpx;
display: flex;
.single-left {
width: 80%;
height: 100%;
display: flex;
view {
width: 110rpx;
height: 100%;
line-height: 100rpx;
}
}
.single-right {
button {
margin-top: 15rpx;
width: 150rpx;
height: 70rpx;
}
}
}
.material {
width: 100%;
height: 100rpx;
display: flex;
.material-left {
width: 50%;
height: 100%;
display: flex;
view {
width: 100rpx;
line-height: 100rpx;
}
}
.material-right {
width: 50%;
height: 100%;
display: flex;
.material-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.material-right-code {
width: 190rpx;
height: 100%;
// line-height: 100rpx;
}
}
}
.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;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
.number-right {
width: 50%;
height: 100%;
display: flex;
.number-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.input {
width: 200rpx;
height: 70rpx;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
}
.library {
width: 100%;
height: 100rpx;
display: flex;
.library-left {
width: 50%;
height: 100%;
display: flex;
view {
width: 100rpx;
line-height: 100rpx;
}
}
.library-right {
width: 50%;
height: 100%;
display: flex;
.library-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.input {
width: 200rpx;
height: 70rpx;
margin-top: 15rpx;
margin-left: 15rpx;
}
}
}
.add {
width: 100%;
height: 100rpx;
position: relative;
button {
position: absolute;
top: 10rpx;
right: 20rpx;
}
}
}
.bottom-bar {
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
background: #ffffff;
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx;
}
}
</style>

@ -13,43 +13,56 @@
<u-form class="form" ref="form" :model="form" label-width="180rpx">
<u-form-item
:required="true"
:label="this.$t('message.InventoryOrderNo')"
prop="documentNo"
:label="$t('message.InventoryOrderNo')"
prop="pddNo"
>
<u-search
:placeholder="this.$t('message.InventoryPleaseScan')"
v-model="form.documentNo"
@search="model.queryOrderInInfo"
:placeholder="$t('message.InventoryPleaseScan')"
v-model="form.pddNo"
@search="model.rawMaterialInventoryCheckRaw"
:show-action="false"
></u-search>
</u-form-item>
<u-form-item :label="this.$t('message.InventoryMaterielNo')">
<u-form-item
:label="$t('message.InventoryMaterielNo')"
prop="productCode"
>
<u-search
:placeholder="$t('message.po_PleaseInput')"
v-model="form.productCode"
@search="checkRawProductCode"
:show-action="false"
></u-search>
</u-form-item>
<u-form-item
:label="$t('message.InventoryMateriel')"
prop="productDescZh"
>
<u-input
v-model="model.orderInInfo.carNo"
:placeholder="this.$t('message.po_PleaseInput')"
v-model="form.productDescZh"
:placeholder="$t('message.po_PleaseInput')"
/>
</u-form-item>
<u-form-item :label="this.$t('message.InventoryMateriel')">
<u-form-item :label="$t('message.InventoryTotalNumber')" prop="spQty">
<u-input
v-model="model.orderInInfo.bookingTime"
:placeholder="this.$t('message.po_PleaseInput')"
/>
</u-form-item>
<u-form-item :label="this.$t('message.InventoryTotalNumber')">
<u-input
v-model="model.orderInInfo.supplyCode"
:placeholder="this.$t('message.po_PleaseInput')"
v-model="form.spQty"
:placeholder="$t('message.po_PleaseInput')"
/>
</u-form-item>
</u-form>
<view class="bottom-bar">
<u-row class="button-bar">
<u-col :span="6">
<u-button type="primary" @click="onSubmit">{{
<u-col :span="4">
<u-button type="primary" @click="checkRawCreateInfo">{{
$t("message.workArea_Confirm")
}}</u-button>
</u-col>
<u-col :span="6">
<u-col :span="4">
<u-button type="primary" @click="checkRawOrderComplete">{{
$t("message.InventoryFinish")
}}</u-button>
</u-col>
<u-col :span="4">
<u-button type="error" @click="back">{{
$t("message.po_Return")
}}</u-button>
@ -65,13 +78,13 @@ import { BasePage } from "@/components/base/page";
import { VForm, VFormRules } from "vue/types/form";
import model from "./model";
interface OptionType {
label: string;
value: string;
}
// interface OptionType {
// label: string;
// value: string;
// }
@Component
export default class dnReceiptDom extends BasePage {
export default class rawMaterialInventory extends BasePage {
/**
* 表单引用
*/
@ -84,17 +97,26 @@ export default class dnReceiptDom extends BasePage {
index() {
this.toPage(this.page.raw.index);
}
status = false;
/**
* 表单数据
*/
form = {
documentNo: null,
cboPlace: {} as OptionType,
//
pddNo: null,
//
productCode: null,
productDescZh: null,
//
spQty: null,
// cboPlace: {} as OptionType,
};
cboPlaceSelect = false;
rules: VFormRules<any> = {
documentNo: [
pddNo: [
{ required: true, message: this.$t("message.dn_PleaseScan") as string },
],
// cboPlace: [{ required: true, message: this.$t('message.Warehouse_Tip10') as string }],
@ -103,6 +125,27 @@ export default class dnReceiptDom extends BasePage {
value = "";
show = false;
//
async checkRawProductCode(productCode: string) {
let result = await model.checkRawProductCode({
productCode,
pddNo: this.form.pddNo,
});
console.log("result:::", result);
this.status = result.isState;
}
checkRawCreateInfo() {
if (this.status) {
model.checkRawProductComplete(this.form);
} else {
model.checkRawCreateInfo(this.form);
}
}
//
async checkRawOrderComplete() {
await model.checkRawOrderComplete(this.form.pddNo);
}
// onReadyonLoad
onReady() {
this.$form.setRules(this.rules);
@ -118,22 +161,24 @@ export default class dnReceiptDom extends BasePage {
back() {
uni.navigateBack({ delta: 1 });
}
onSubmit() {
async onSubmit() {
this.$form.validate((valid: boolean) => {
if (!valid) return;
// if (!this.model.hasDnInfo) {
// uni.showToast({
// icon: 'none',
// title: this.$t('message.dn_PleaseScan') as string,
// });
// return;
// }
sessionStorage.setItem(
"dnNo",
JSON.stringify(this.form.documentNo) as any
);
this.toPage(this.page.raw.ingoods.dnReceipt.detail);
if (!this.model.hasDnInfo) {
uni.showToast({
icon: "none",
title: this.$t("message.dn_PleaseScan") as string,
});
return;
}
// sessionStorage.setItem(
// "dnNo",
// JSON.stringify(this.form.pddNo) as any
// );
// this.toPage(this.page.raw.ingoods.dnReceipt.detail);
});
await this.model.submitOrderInEnter();
}
}
</script>

@ -32,6 +32,12 @@ class OrderInInfo {
name: "raw.ingoods.dnReceipt",
})
export class ReceiptModule extends VuexModule {
<<<<<<< HEAD
=======
// 是否有
isState = true;
>>>>>>> 908d8a2f172057491172510bf10bf949d527de9f
sendSpot = "";
/**
* sap
@ -162,6 +168,117 @@ export class ReceiptModule extends VuexModule {
}
/**
<<<<<<< HEAD
=======
*
*
* @param pddNo
*/
@Action
async rawMaterialInventoryCheckRaw(pddNo: string) {
const { msg }: any = await http.post(url.material.rawMaterialInventory.checkRaw, {
pddNo,
factoryCode: session.factoryCode,
loginName: session.loginName,
});
uni.showToast({
icon: "none",
title: msg,
});
}
/**
*
*
* @param {string} productCode
* @param {string} pddNo
* @memberof ReceiptModule
*/
@Action
async checkRawProductCode(form:any) {
const { code,msg }: any = await http.post(url.material.rawMaterialInventory.productCode, {
productCode:form.productCode,
pddNo:form.pddNo,
factoryCode: session.factoryCode,
loginName: session.loginName,
});
uni.showToast({
icon: "none",
title: msg,
});
console.log('code:::',code,msg)
const isState = !!+code
return {isState}
}
/**
*
*
* @param {string} productCode
* @param {string} pddNo
* @memberof ReceiptModule
*/
@Action
async checkRawCreateInfo(form:any) {
const { msg }: any = await http.post(url.material.rawMaterialInventory.createInfo, {
...form,
factoryCode: session.factoryCode,
loginName: session.loginName,
});
uni.showToast({
icon: "none",
title: msg,
});
}
/**
*
*
* @param {string} productCode
* @param {string} pddNo
* @memberof ReceiptModule
*/
@Action
async checkRawProductComplete(form:any) {
const { msg }: any = await http.post(url.material.rawMaterialInventory.productComplete, {
...form,
factoryCode: session.factoryCode,
loginName: session.loginName,
});
uni.showToast({
icon: "none",
title: msg,
});
}
/**
*
*
* @param {string} productCode
* @param {string} pddNo
* @memberof ReceiptModule
*/
@Action
async checkRawOrderComplete(pddNo?: string|null) {
const { msg }: any = await http.post(url.material.rawMaterialInventory.orderComplete, {
pddNo,
factoryCode: session.factoryCode,
loginName: session.loginName,
});
uni.showToast({
icon: "none",
title: msg,
});
}
/**
>>>>>>> 908d8a2f172057491172510bf10bf949d527de9f
*
*/
@MutationAction

@ -1,10 +1,13 @@
<template>
<view class="page-kan-dan-detail">
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
<view
class="header"
:style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }"
>
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t('message.Warehouse_TransferDetails') }}</view>
<view class="title">{{ $t("message.Warehouse_TransferDetails") }}</view>
<view class="right"></view>
</view>
<wyb-table
@ -39,11 +42,13 @@
<view class="container">
<u-row>
<u-col :span="6">
<u-button type="primary" @click="Confirm">{{ $t('message.dn_Confirm') }}</u-button>
<u-button type="primary" @click="Confirm">{{
$t("message.dn_Confirm")
}}</u-button>
</u-col>
<u-col :span="6">
<u-button type="error" @click="uni.navigateBack({ delta: 1 })">{{
$t('message.po_Return')
$t("message.po_Return")
}}</u-button>
</u-col>
</u-row>
@ -53,18 +58,18 @@
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { Component } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import model from "./model";
// import { order, OrderDetail } from '@/pages/raw/warehouse/transfer/model';
// import { auth } from '@/store/modules/auth';
// import { pick, omit, cloneDeep } from 'lodash/fp';
import { headers } from './config';
import { session } from '@/store/modules/session';
import { headers } from "./config";
import { session } from "@/store/modules/session";
@Component
export default class KanDanHandOverDetails extends BasePage {
order = '';
order = "";
headers = headers;
/**
@ -95,14 +100,25 @@ export default class KanDanHandOverDetails extends BasePage {
// }
async Confirm() {
const orderlist: any = this.model.orderInInfoList;
const orderlist: any = [];
this.model.orderInInfoList.forEach((item: any) => {
if (item.checked) {
orderlist.push(item);
}
});
if (orderlist.length == 0) {
uni.showToast({
icon: "none",
title: "请先选中要移库的数据" as any,
});
return;
}
orderlist.forEach((item: any) => {
item.type = '1';
item.type = "1";
item.keepBy = session.loginName;
item.orderType = '0';
item.orderType = "0";
});
await model.onTakeoutConfirm(orderlist);
// uni.navigateBack({ delta: 1 });
setTimeout(() => {
uni.navigateBack({ delta: 1 });
}, 2000);
@ -112,7 +128,8 @@ export default class KanDanHandOverDetails extends BasePage {
<style lang="scss" scoped>
.page-kan-dan-detail {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background: #f2f2f2
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx;
min-height: 100%;

@ -143,6 +143,7 @@ export const page = {
rowInventory: {
index: "/pages/raw/warehouse/rowInventory/index",
},
<<<<<<< HEAD
},
commission: {
index: "/pages/raw/commission/index",
@ -154,7 +155,20 @@ export const page = {
index: "/pages/raw/commission/goOut/index",
detail: "/pages/raw/commission/goOut/detail",
},
=======
>>>>>>> 908d8a2f172057491172510bf10bf949d527de9f
},
commission:{
index: "/pages/raw/commission/index",
entrant:{
index: "/pages/raw/commission/entrant/index",
detail: "/pages/raw/commission/entrant/detail",
},
goOut:{
index: "/pages/raw/commission/goOut/index",
detail: "/pages/raw/commission/goOut/detail",
}
}
},
SemiProduct: {
index: "/pages/SemiProduct/index",

@ -61,8 +61,10 @@ export const url = {
},
DNorderin: {
info: "/material/orderin/dnInfo",
ImportInfo: "/material/orderin/overseasDnInfo",
dnReturnInfo: "/material/orderin/dnReturnInfo",
enter: "/material/orderin/enter",
ImportEnter: "/material/orderin/overseasDnEnter",
out: "/material/orderin/out",
},
orderout: {
@ -71,6 +73,19 @@ export const url = {
unlock: "/material/orderout/unlock",
takeout: "/material/orderout/takeout",
},
// 原材料盘点
rawMaterialInventory: {
// 盘点单号查询检查
checkRaw: "/product/finished/checkRaw/order",
// 扫描物料号检查
productCode: "/product/finished/checkRaw/productCode",
// 3.盘点单中不存在该物料但继续盘点,需要新增单号和物料信息
createInfo: "/product/finished/checkRaw/createInfo",
// 4.物料盘点确定
productComplete: "/product/finished/checkRaw/productComplete",
// 5.盘点完成
orderComplete: "/product/finished/checkRaw/orderComplete",
},
},
SFG: {
DumpListFH: {

Loading…
Cancel
Save