新增 退货

master
hou 4 years ago
parent a0ea126856
commit b573cd8198

@ -1,28 +1,28 @@
<script lang="ts"> <script lang="ts">
import Vue from 'vue'; import Vue from "vue";
// #ifdef APP-PLUS // #ifdef APP-PLUS
import checkAppUpdate from '@/plugins/app-update'; import checkAppUpdate from "@/plugins/app-update";
// #endif // #endif
export default Vue.extend({ export default Vue.extend({
mpType: 'app', mpType: "app",
onLaunch() { onLaunch() {
console.log('App Launch'); console.log("App Launch");
// #ifdef APP-PLUS // #ifdef APP-PLUS
checkAppUpdate(); checkAppUpdate();
// #endif // #endif
}, },
onShow() { onShow() {
console.log('App Show'); console.log("App Show");
}, },
onHide() { onHide() {
console.log('App Hide'); console.log("App Hide");
}, },
}); });
</script> </script>
<style lang="scss"> <style lang="scss">
/* 注意要写在第一行同时给style标签加入lang="scss"属性 */ /* 注意要写在第一行同时给style标签加入lang="scss"属性 */
@import '~uview-ui/index.scss'; @import "~uview-ui/index.scss";
/*每个页面公共css */ /*每个页面公共css */
page { page {
height: 100%; height: 100%;

@ -78,6 +78,8 @@ export default {
po_MaterielNo: "物料号", po_MaterielNo: "物料号",
Materiel: "物料", Materiel: "物料",
po_MaterielDes: "物料描述", po_MaterielDes: "物料描述",
returned: "应退货数量",
quantity: "累计退货数量",
po_DemandQuantity: "需求数量", po_DemandQuantity: "需求数量",
DemandQuantity: "需求", DemandQuantity: "需求",
po_ActualQuantity: "实际数量", po_ActualQuantity: "实际数量",
@ -188,6 +190,7 @@ export default {
return_Tip2: "工厂代码不能为空", return_Tip2: "工厂代码不能为空",
return_Tip3: "数量不能为空", return_Tip3: "数量不能为空",
return_Tip4: "退料数量不能大于总数", return_Tip4: "退料数量不能大于总数",
quantitys: "不能大于应退货数量",
//库内主菜单 //库内主菜单
Warehouse: "成品库内", Warehouse: "成品库内",

@ -56,6 +56,8 @@ export default {
//po收货 //po收货
po_ReceivingGoods: "PO receive", po_ReceivingGoods: "PO receive",
po_ReturnGoods: "DN return", po_ReturnGoods: "DN return",
returned: "Quantity to be returned",
quantity: "Cumulative return quantity",
po_OddNumbers: "PO No", po_OddNumbers: "PO No",
po_Supplier: "Supplier", po_Supplier: "Supplier",
po_OrderType: "Order type", po_OrderType: "Order type",
@ -189,6 +191,7 @@ export default {
return_Tip2: "Factory code cannot be empty", return_Tip2: "Factory code cannot be empty",
return_Tip3: "Qty cannot be empty", return_Tip3: "Qty cannot be empty",
return_Tip4: "Return Qty cannot be greater than total Qty", return_Tip4: "Return Qty cannot be greater than total Qty",
quantitys: "Cannot be greater than the quantity to be returned",
//库内主菜单 //库内主菜单
Warehouse: "FG WH", Warehouse: "FG WH",

@ -473,6 +473,22 @@
"navigationBarTextStyle": "white" // white-black- "navigationBarTextStyle": "white" // white-black-
} }
}, },
{
"path": "pages/raw/ingoods/dnReturnGoods/Location",
"style": {
"navigationBarTitleText": "PO退货",
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/ingoods/dnReturnGoods/Local-details",
"style": {
"navigationBarTitleText": "PO退货明细",
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{ {
"path": "pages/raw/handover/returning/index", "path": "pages/raw/handover/returning/index",
"style": { "style": {

@ -13,49 +13,42 @@
<u-form class="form" ref="form" :model="form" label-width="180rpx"> <u-form class="form" ref="form" :model="form" label-width="180rpx">
<u-form-item <u-form-item
:required="true" :required="true"
:label="this.$t('message.Warehouse_OrderNo')" :label="$t('message.Warehouse_OrderNo')"
prop="pddNo" prop="pddNo"
> >
<u-search <u-search
:placeholder="this.$t('message.po_PleaseInput')" :placeholder="$t('message.po_PleaseInput')"
v-model="form.pddNo" v-model="form.pddNo"
@search="model.getProductCode" @search="model.getProductCode"
:show-action="false" :show-action="false"
></u-search> ></u-search>
</u-form-item> </u-form-item>
<u-form-item :required="true" :label="this.$t('message.product_FGCode')"> <u-form-item :required="true" :label="$t('message.product_Location')">
<u-input <u-input
v-model="form.originWl.productCode" v-model="form.originWl.locCode"
type="select" type="select"
@click="originWlSelect = true" @click="originWlSelect = true"
:placeholder="this.$t('message.po_PleaseInput')" :placeholder="$t('message.po_PleaseInput')"
/> />
<u-select <u-select
:confirm-text="this.$t('message.product_Confirm')" :confirm-text="$t('message.product_Confirm')"
:cancel-text="this.$t('message.product_Cancel')" :cancel-text="$t('message.product_Cancel')"
v-model="originWlSelect" v-model="originWlSelect"
:list="model.WlList" :list="model.WlList"
@confirm="onchange" @confirm="onchange"
></u-select> ></u-select>
</u-form-item> </u-form-item>
<u-form-item :label="this.$t('message.product_FGDes')"> <u-form-item :label="$t('message.Warehouse_ScanCode')">
<u-input <u-search
v-model="form.originWl.productDescZh" v-model="form.code"
:placeholder="this.$t('message.po_PleaseInput')" :placeholder="$t('message.po_PleaseInput')"
/> @search="scanCode"
</u-form-item> :show-action="false"
<u-form-item :label="this.$t('message.product_Location')"> ></u-search>
<u-input
v-model="form.originWl.locCode"
:placeholder="this.$t('message.po_PleaseInput')"
/>
</u-form-item> </u-form-item>
<u-row> <u-row>
<u-col :span="6"> <u-col :span="6">
<u-form-item <u-form-item :label="$t('message.product_Swept')" label-width="80rpx">
:label="this.$t('message.product_Swept')"
label-width="80rpx"
>
<u-input <u-input
:disabled="true" :disabled="true"
v-model="form.originWl.spQty" v-model="form.originWl.spQty"
@ -65,23 +58,27 @@
</u-col> </u-col>
<u-col :span="6"> <u-col :span="6">
<u-form-item <u-form-item
:label="this.$t('message.Warehouse_TotalNumber')" :label="$t('message.Warehouse_TotalNumber')"
label-width="80rpx" label-width="80rpx"
> >
<u-input <u-input
v-model="form.originWl.ypQty" v-model="form.originWl.ypQty"
:placeholder="this.$t('message.po_PleaseInput')" :placeholder="$t('message.po_PleaseInput')"
/> />
</u-form-item> </u-form-item>
</u-col> </u-col>
</u-row> </u-row>
<u-form-item :label="this.$t('message.Warehouse_ScanCode')"> <u-form-item :label="$t('message.product_FGDes')">
<u-search <u-input
v-model="form.code" v-model="productDescZh"
:placeholder="this.$t('message.po_PleaseInput')" :placeholder="$t('message.po_PleaseInput')"
@search="scanCode" />
:show-action="false" </u-form-item>
></u-search> <u-form-item :label="$t('message.product_FGCode')">
<u-input
v-model="productCode"
:placeholder="$t('message.po_PleaseInput')"
/>
</u-form-item> </u-form-item>
</u-form> </u-form>
<view class="bottom-bar"> <view class="bottom-bar">
@ -140,50 +137,39 @@ export default class productCheckReceipt extends BasePage {
code: "", code: "",
pdMode: "", pdMode: "",
}; };
productCode: any = ""; //
productDescZh: any = ""; //
originWlSelect = false; originWlSelect = false;
aimWlSelect = false; aimWlSelect = false;
cboPlaceSelect = false; cboPlaceSelect = false;
rules: VFormRules<any> = { rules: VFormRules<any> = {
originWl: [ originWl: [
{ required: true, message: this.$t("message.Warehouse_Tip2") as string }, { required: true, message: this.$t("message.Warehouse_Tip2") as string }, //
], ],
}; };
show = false; show = false;
// onReadyonLoad
async onReady() { async onReady() {
// this.form.originWl = {};
this.$form.setRules(this.rules); this.$form.setRules(this.rules);
// await this.model.getProductCode('PD2012290001');
// console.log('', this.model.WlList);
} }
onchange(e: any) { onchange(e: any) {
console.log("value", e);
//locCode
// this.form.originWl = e[0];
this.model.WlListaa.forEach((item: any) => { this.model.WlListaa.forEach((item: any) => {
if (item.locCode == e[0].value) { if (item.locCode == e[0].value) {
this.form.originWl = item; this.form.originWl = item;
return;
} }
}); });
console.log(this.form.originWl);
} }
async scanCode(e: any) { async scanCode(e: any) {
if (!this.form.pddNo) { if (!this.form.pddNo) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title: this.$t("message.Warehouse_Tip5") as string, title: this.$t("message.Warehouse_Tip5") as string, //
});
return;
}
if (!this.form.originWl.productCode) {
uni.showToast({
icon: "none",
title: this.$t("message.Warehouse_Tip6") as string,
}); });
return; return;
} }
const list = { const list = {
// user: '1999',
user: session.loginName, user: session.loginName,
factoryCode: session.factoryCode, factoryCode: session.factoryCode,
regionCode: session.regionCode, regionCode: session.regionCode,
@ -191,7 +177,6 @@ export default class productCheckReceipt extends BasePage {
whCode: session.warehouseCode, whCode: session.warehouseCode,
pdCd: this.form.pddNo, pdCd: this.form.pddNo,
locCode: this.form.originWl.locCode, locCode: this.form.originWl.locCode,
productCode: this.form.originWl.productCode,
snFlag: this.form.originWl.snFlag, snFlag: this.form.originWl.snFlag,
pdMode: this.form.originWl.pdMode, pdMode: this.form.originWl.pdMode,
sn: e, sn: e,
@ -200,6 +185,8 @@ export default class productCheckReceipt extends BasePage {
await this.model.toScanCode(list); await this.model.toScanCode(list);
if (this.model.records.code == "1") { if (this.model.records.code == "1") {
this.form.originWl.spQty += 1; this.form.originWl.spQty += 1;
this.productCode = model.productCode;
this.productDescZh = model.productDescZh;
} }
} }
onSubmit() { onSubmit() {
@ -208,45 +195,25 @@ export default class productCheckReceipt extends BasePage {
if (!this.form.pddNo) { if (!this.form.pddNo) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title: this.$t("message.Warehouse_Tip5") as string, title: this.$t("message.Warehouse_Tip5") as string, //
}); });
return; return;
} }
if (!this.form.originWl.productCode) { if (!this.form.originWl.productCode) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title: this.$t("message.Warehouse_Tip6") as string, title: this.$t("message.Warehouse_Tip6") as string, //
}); });
return; return;
} }
// this.model.WlListaa.forEach((item) => {
// if (item.ypQty !== item.spQty) {
// this.show = true;
// }
// console.log('', this.show);
// });
// if (this.show) {
// uni.showModal({
// title: '',
// content: '',
// showCancel: true,
// success: (res) => {
// if (res.confirm) {
// this.commit();
// }
// },
// });
// } else {
// this.commit();
// }
if (this.form.originWl.ypQty == this.form.originWl.spQty) { if (this.form.originWl.ypQty == this.form.originWl.spQty) {
this.commit(); this.commit();
} else { } else {
uni.showModal({ uni.showModal({
title: "Tip", title: "Tip",
content: this.$t("message.Warehouse_Tip7") as string, content: this.$t("message.Warehouse_Tip7") as string, //
confirmText: this.$t("message.workArea_Confirm") as string, confirmText: this.$t("message.workArea_Confirm") as string, //
cancelText: this.$t("message.Cancel") as string, cancelText: this.$t("message.Cancel") as string, //
showCancel: true, showCancel: true,
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
@ -257,7 +224,7 @@ export default class productCheckReceipt extends BasePage {
} }
}); });
} }
commit() { async commit() {
const list = { const list = {
// user: '1999', // user: '1999',
user: session.loginName, user: session.loginName,
@ -274,7 +241,7 @@ export default class productCheckReceipt extends BasePage {
spQty: this.form.originWl.spQty, spQty: this.form.originWl.spQty,
}; };
console.log("orderlist", list); console.log("orderlist", list);
this.model.onTakeoutConfirm(list); await this.model.onTakeoutConfirm(list);
} }
} }
</script> </script>
@ -338,8 +305,5 @@ export default class productCheckReceipt extends BasePage {
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2); box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
padding: 20rpx; padding: 20rpx;
} }
.button-bar {
}
} }
</style> </style>

@ -30,6 +30,8 @@ export class wholeLnventory extends VuexModule {
*/ */
WlList = []; WlList = [];
WlListaa = []; WlListaa = [];
productCode: any = "";
productDescZh: any = "";
/** /**
* *
*/ */
@ -97,9 +99,14 @@ export class wholeLnventory extends VuexModule {
loginName: session.loginName, loginName: session.loginName,
}); });
const WlListaa = res.data; const WlListaa = res.data;
const WlList = res.data.map((_: any) => ({ let arr: any = [];
label: _.productCode + "-" + _.locCode, res.data.forEach((item: any) => {
value: _.locCode, arr.push(item.locCode);
});
let newArr = Array.from(new Set(arr));
const WlList = newArr.map((item: any) => ({
label: item,
value: item,
})); }));
console.log("WlList", WlList); console.log("WlList", WlList);
return { WlList, WlListaa }; return { WlList, WlListaa };
@ -133,6 +140,8 @@ export class wholeLnventory extends VuexModule {
icon: "none", icon: "none",
title: vm.$t("message.Warehouse_Tip9") as any, title: vm.$t("message.Warehouse_Tip9") as any,
}); });
this.productCode = records.data.productCode;
this.productDescZh = records.data.productDescZh;
return { records }; return { records };
} }
// if (records.code == 0) { // if (records.code == 0) {

@ -0,0 +1,136 @@
<template>
<view class="page-receipt-detail">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="go" />
</view>
<view class="title">{{ $t("message.Pi_QueryResults") }}</view>
<view class="right"></view>
</view>
<u-form
class="form"
ref="form"
style="padding-left: 30px"
label-width="180rpx"
>
<u-form-item :label="$t('message.Pi_OrderNo')">
<u-input v-model="poNo" placeholder="" class="Transfer" />
<u-button
type="primary"
style="height: 60rpx; margin-left: 20rpx"
@click="generate"
>{{ $t("message.Query") }}</u-button
>
</u-form-item>
</u-form>
<view class="table-wrapper">
<wyb-table
class="table"
ref="table"
width="100%"
show-left-and-right-border
:headers="headers"
:contents="model.detailedList"
:show-vert-border="false"
></wyb-table>
</view>
</view>
</template>
<script lang="ts">
import { Component } from "vue-property-decorator";
import { BasePage } from "@/components/base/page";
import { headers } from "./config";
import model from "./model";
import { session } from "@/store/modules/session";
@Component
export default class RawReceiptDetail extends BasePage {
model = model;
headers = headers;
poNo: any = "";
async generate() {
if (this.poNo == "") {
uni.showToast({
icon: "none",
title: this.$t("message._tips6") as any,
});
return;
}
let content = {
loginName: session.loginName,
poNo: this.poNo,
factoryCode: session.factoryCode,
};
await this.model.querydetaildlist(content);
console.log(model.detailedList);
}
go() {
this.toPage(this.page.raw.ingoods.dnReturnGoods.location);
}
}
</script>
<style lang="scss" scoped>
.page-receipt-detail {
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: 162rpx;
.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;
}
}
.form {
background-color: #fff;
// padding: 40rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
.u-form-item {
// padding: 30rpx 0;
line-height: 35rpx;
.Transfer {
width: 180rpx;
height: 64rpx;
background: rgb(242, 242, 242);
border-radius: 110rpx;
}
}
}
.table-wrapper {
background-color: #fff;
}
.form {
background-color: #fff;
// padding: 40rpx;
border-radius: 10rpx;
}
}
</style>

@ -15,7 +15,7 @@
enable-check="single" enable-check="single"
show-left-and-right-border show-left-and-right-border
:headers="headers" :headers="headers"
:contents="model.orderInInfoList" :contents="model.dnReturnList"
:show-vert-border="false" :show-vert-border="false"
@onCheck="handleRow" @onCheck="handleRow"
></wyb-table> ></wyb-table>
@ -24,15 +24,15 @@
<view class="Exhibition"> <view class="Exhibition">
<view class="Exhibition-left"> <view class="Exhibition-left">
<view class="Exhibition-left-title" <view class="Exhibition-left-title"
>{{ $t("message.Pi_Station") }}:</view >{{ $t("message.return_Type") }}:</view
> >
<view class="Exhibition-left-data">{{ some.sendSpot }}</view> <view class="Exhibition-left-data">{{ some.poType }}</view>
</view> </view>
<view class="Exhibition-right"> <view class="Exhibition-right">
<view class="Exhibition-right-title" <view class="Exhibition-right-title"
>{{ $t("message.po_ReturnGoodsQuantity") }}:</view >{{ $t("message.po_ReturnGoodsQuantity") }}:</view
> >
<view class="Exhibition-right-data">{{ some.totalMoAmount }}</view> <view class="Exhibition-right-data">{{ some.poAmount }}</view>
</view> </view>
</view> </view>
<!-- 添加库位 --> <!-- 添加库位 -->
@ -144,7 +144,6 @@ export default class RawReceiptDetail extends BasePage {
LocationList: any = []; LocationList: any = [];
// //
Location: any = []; Location: any = [];
someIndex: number = 0;
some: any = {}; some: any = {};
qty: any = ""; qty: any = "";
/** /**
@ -177,14 +176,35 @@ export default class RawReceiptDetail extends BasePage {
* 表头 * 表头
*/ */
headers = headers; headers = headers;
//
async onReady() {
let means: any = JSON.parse(
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let user: any = session.user;
let content = {
loginName: means.session.user.loginName,
factoryCode: means.session.user.factoryCode,
workArea: user.list[0].workareaCode,
};
let res: any = await this.model.queryByFactory(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);
});
}
//
LocationChoice(e: any) { LocationChoice(e: any) {
console.log("e>>>>>>>>>>>>>>>>>>>>>>>>", e);
this.wlCode = e.pickerName; this.wlCode = e.pickerName;
} }
//
handleRow({ data }: any) { handleRow({ data }: any) {
this.someIndex = data[0].index;
this.some = data[0].lineData; this.some = data[0].lineData;
} }
//
Add() { Add() {
if (this.qty == "" || this.wlCode == "") { if (this.qty == "" || this.wlCode == "") {
uni.showToast({ uni.showToast({
@ -200,38 +220,12 @@ export default class RawReceiptDetail extends BasePage {
}); });
return; return;
} }
// if ( if (parseFloat(this.qty) > parseFloat(this.some.poAmount)) {
// parseFloat(this.qty) > model.orderInInfoList[this.someIndex].receiptAmount uni.showToast({
// ) { icon: "none",
// uni.showToast({ title: this.$t("message.quantitys") as any,
// 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: this.$t("message.Commission_tips7") as any,
});
return (isTrue = false);
}
}); });
return;
} }
if (this.some == {}) { if (this.some == {}) {
uni.showToast({ uni.showToast({
@ -240,79 +234,50 @@ export default class RawReceiptDetail extends BasePage {
}); });
return; return;
} }
if ((isTrue = true)) { let num: number = parseFloat(this.qty);
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) => { this.LocationList.forEach((item: any) => {
num += parseFloat(item.qty); num += parseFloat(item.qty);
}); });
// this.model.orderInInfoList[this.someIndex].receiptAmount = num; if (num > parseFloat(this.some.poAmount)) {
console.log( uni.showToast({
"this.model.orderInInfoList", icon: "none",
this.model.orderInInfoList[this.someIndex] title: this.$t("message.dn_Tip2") as any,
); });
} return;
async onShow() { }
// let arr = {
let means: any = JSON.parse( wlCode: this.wlCode.label,
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any qty: this.qty,
); Code: this.wlCode.sendSpot,
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); this.LocationList.push(arr);
res.forEach((item: any) => { let TEM = {
let pickerName: any = {}; wlCode: this.wlCode.label,
pickerName.label = item.locationCode; nowAmount: this.qty,
pickerName.value = item.locationCode + "(" + item.sendSpot + ")"; };
pickerName.sendSpot = item.sendSpot; this.some.list.push(TEM);
this.Location.push(pickerName); this.qty = "";
}); }
this.model.orderInInfoList.forEach((item: any) => { //
item.receiptAmount = 0; deleteItem(index: any) {
item.wlQTyList = []; this.LocationList.splice(index, 1);
}); this.some.list.splice(index, 1);
console.log("this.model.orderInInfoList", this.model.orderInInfoList); }
appoint() {
this.redirectTo(this.page.raw.ingoods.dnReturnGoods.Local);
} }
appoint() {}
/** /**
* 提交 * 提交
*/ */
async onSubmit() { async onSubmit() {
await this.model.submitOrderInEnter(); await this.model.submit({
poNo: this.some.poNo,
loginName: session.loginName,
factoryCode: session.factoryCode,
materialCode: this.some.materialCode,
poLine: this.some.poLine,
list: this.some.list,
});
} }
} }
</script> </script>

@ -1,31 +1,35 @@
/** /**
* *
*/ */
import vm from '@/main'; import vm from "@/main";
export const headers = [ export const headers = [
{ {
label: vm.$t('message.po_MaterielNo'), label: vm.$t("message.po_MaterielNo"),
key: 'materialCode', key: "materialCode",
}, },
{ {
label: vm.$t('message.po_MaterielDes'), label: vm.$t("message.po_MaterielDes"),
key: 'materialDesc', key: "materialDesc",
width: 350, width: 350,
}, },
{ {
label: vm.$t('message.po_DemandQuantity'), label: vm.$t("message.returned"),
key: 'receiptAmount', key: "poAmount",
}, },
{ {
label: vm.$t('message.po_ReturnGoodsQuantity'), label: vm.$t("message.quantity"),
key: 'returnAmount', key: "receiptAmount",
}, },
{ {
label: vm.$t('message.po_RemainingQuantity'), label: vm.$t("message.po_Supplier"),
key: 'splitAmount', key: "supplyCode",
}, },
{ {
label: vm.$t('message.po_Location'), label: vm.$t("message.po_OrderType"),
key: 'location', key: "poType",
},
{
label: vm.$t("message.po_Location"),
key: "wlCode",
}, },
]; ];

@ -19,57 +19,29 @@
<u-search <u-search
:placeholder="this.$t('message.dn_PleaseScan')" :placeholder="this.$t('message.dn_PleaseScan')"
v-model="form.documentNo" v-model="form.documentNo"
@search="model.queryOrderInInfo" @search="model.queryOrder"
:show-action="false" :show-action="false"
></u-search> ></u-search>
</u-form-item> </u-form-item>
<!-- <u-form-item :label="this.$t('message.dn_CarNumber')"> <u-form-item :label="$t('message.po_Supplier')">
<u-input
v-model="model.orderInInfo.carNo"
:placeholder="this.$t('message.po_PleaseInput')"
/>
</u-form-item> -->
<!-- <u-form-item :label="this.$t('message.dn_Time')">
<u-input
v-model="model.orderInInfo.bookingTime"
:placeholder="this.$t('message.po_PleaseInput')"
/>
</u-form-item> -->
<u-form-item :label="this.$t('message.po_Supplier')">
<u-input <u-input
v-model="model.orderInInfo.supplyCode" v-model="model.orderInInfo.supplyCode"
:placeholder="this.$t('message.po_PleaseInput')" :placeholder="$t('message.po_PleaseInput')"
/> />
</u-form-item> </u-form-item>
<!-- <u-form-item label="需求工段">--> <u-form-item :label="$t('message.po_OrderType')">
<!-- <u-input v-model="model.orderInInfo.line" />-->
<!-- </u-form-item>-->
<u-form-item :label="this.$t('message.po_OrderType')">
<u-input <u-input
v-model="model.orderInInfo.poType" v-model="model.orderInInfo.poType"
:placeholder="this.$t('message.po_PleaseInput')" :placeholder="$t('message.po_PleaseInput')"
/> />
</u-form-item> </u-form-item>
<u-form-item :label="this.$t('message.po_Location')"> <u-form-item :label="$t('message.po_Location')">
<u-input <u-input
:disabled="true" :disabled="true"
v-model="model.orderInInfo.location" v-model="model.orderInInfo.wlCode"
placeholder="" placeholder=""
/> />
</u-form-item> </u-form-item>
<!-- <u-form-item :label="this.$t('message.po_Location')" prop="cboPlace">-->
<!-- <u-input-->
<!-- v-model="form.cboPlace.label"-->
<!-- type="select"-->
<!-- @click="cboPlaceSelect = true"-->
<!-- :placeholder="this.$t('message.po_PleaseInput')"-->
<!-- />-->
<!-- <u-select-->
<!-- v-model="cboPlaceSelect"-->
<!-- :list="model.cboPlaceList"-->
<!-- @confirm="(v) => (form.cboPlace = v[0])"-->
<!-- ></u-select>-->
<!-- </u-form-item>-->
</u-form> </u-form>
<view class="bottom-bar"> <view class="bottom-bar">
<u-row class="button-bar"> <u-row class="button-bar">
@ -150,7 +122,8 @@ export default class dnReturnGoodsDom extends BasePage {
onSubmit() { onSubmit() {
this.$form.validate((valid: boolean) => { this.$form.validate((valid: boolean) => {
if (!valid) return; if (!valid) return;
if (!this.model.hasDnInfo) { console.log(1);
if (this.model.orderInInfo == []) {
uni.showToast({ uni.showToast({
icon: "none", icon: "none",
title: this.$t("message.dn_PleaseScan") as string, title: this.$t("message.dn_PleaseScan") as string,

@ -39,10 +39,12 @@ export class ReceiptModule extends VuexModule {
* *
*/ */
dnNo = ""; dnNo = "";
dnReturnList = [];
/** /**
* *
*/ */
orderInInfo: OrderInInfo = new OrderInInfo(); orderInInfo: OrderInInfo = new OrderInInfo();
detailedList = [];
/** /**
* *
*/ */
@ -152,7 +154,24 @@ export class ReceiptModule extends VuexModule {
console.log("1111111", orderInInfoList); console.log("1111111", orderInInfoList);
return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx }; return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx };
} }
@MutationAction
async queryOrder(poNo: string) {
const res: any = await http.post(url.material.DNorderin.queryOrder, {
poNo,
factoryCode: session.factoryCode,
loginName: session.loginName,
});
const orderInInfoListEx = res.data.filter(
(_: OrderInInfo) => _.userDefined10 === "0"
);
let dnReturnList = res.data;
dnReturnList.forEach((item: any) => {
item.list = [];
});
const orderInInfo: any = res.data[0] || {};
console.log("orderInInfo", orderInInfo);
return { orderInInfo, orderInInfoListEx, dnReturnList };
}
/** /**
* *
*/ */
@ -203,6 +222,29 @@ export class ReceiptModule extends VuexModule {
); );
return res; return res;
} }
@Action({ commit: "updateCheckedOrderInInfoListKw" })
async queryByFactory(content: any) {
let res = await http.post(
"/wmspda/fg/queryByFactoryCodeAndWorkAreaCode",
content
);
return res;
}
@Action({ commit: "updateCheckedOrderInInfoListKw" })
async submit(content: any) {
let res = await http.post(
"/material/outsourcing/into/materialComplete",
content
);
return res;
}
@Action({ commit: "updateCheckedOrderInInfoListKw" })
async querydetaildlist(content: any) {
let res = await http.post("/material/outsourcing/into/info", content);
let detailedList = res.data;
console.log(res);
return { detailedList };
}
} }
export default getModule(ReceiptModule); export default getModule(ReceiptModule);

File diff suppressed because it is too large Load Diff

@ -129,6 +129,7 @@ export const page = {
index: "/pages/raw/ingoods/dnReturnGoods/index", index: "/pages/raw/ingoods/dnReturnGoods/index",
detail: "/pages/raw/ingoods/dnReturnGoods/detail", detail: "/pages/raw/ingoods/dnReturnGoods/detail",
location: "/pages/raw/ingoods/dnReturnGoods/Location", location: "/pages/raw/ingoods/dnReturnGoods/Location",
Local: "/pages/raw/ingoods/dnReturnGoods/Local-details",
detailEx: "/pages/raw/ingoods/dnReturnGoods/detail-ex", detailEx: "/pages/raw/ingoods/dnReturnGoods/detail-ex",
idetailed: "/pages/raw/ingoods/dnReturnGoods/idetailed", idetailed: "/pages/raw/ingoods/dnReturnGoods/idetailed",
}, },

@ -63,6 +63,7 @@ export const url = {
info: "/wmspda/material/orderin/dnInfo", info: "/wmspda/material/orderin/dnInfo",
ImportInfo: "/wmspda/material/orderin/overseasDnInfo", ImportInfo: "/wmspda/material/orderin/overseasDnInfo",
dnReturnInfo: "/wmspda/material/orderin/dnReturnInfo", dnReturnInfo: "/wmspda/material/orderin/dnReturnInfo",
queryOrder: "/wmspda/material/poReturn/queryOrder", //dn退货 单号查询
enter: "/wmspda/material/orderin/enter", enter: "/wmspda/material/orderin/enter",
ImportEnter: "/wmspda/material/orderin/overseasDnEnter", ImportEnter: "/wmspda/material/orderin/overseasDnEnter",
out: "/wmspda/material/orderin/out", out: "/wmspda/material/orderin/out",

Loading…
Cancel
Save