拣配(汇总&&交接)代码优化 问题修复

master
hou 4 years ago
parent 02e6c0b3cb
commit 1afca0deeb

@ -181,7 +181,7 @@ export default class productCheckReceipt extends BasePage {
this.form.productCode = ''; this.form.productCode = '';
model.empty(); model.empty();
setTimeout(() => { setTimeout(() => {
this.toPage(this.page.product.warehouse.wholeTransfer.index); this.$forceUpdate();
}, 2000); }, 2000);
} }
}); });

@ -2,7 +2,7 @@
<view class="page-picking-order"> <view class="page-picking-order">
<view class="header"> <view class="header">
<view class="left"> <view class="left">
<u-icon class="icon" name="arrow-left" @click="index" /> <u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view> </view>
<view class="title">{{ $t('message.Pi_ByOrderPicking') }}</view> <view class="title">{{ $t('message.Pi_ByOrderPicking') }}</view>
<view class="right"></view> <view class="right"></view>
@ -71,7 +71,7 @@
</u-button> </u-button>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="4">
<u-button type="error" @click="index"> <u-button type="error" @click="uni.navigateBack()">
{{ $t('message.po_Return') }} {{ $t('message.po_Return') }}
</u-button> </u-button>
</u-col> </u-col>
@ -120,7 +120,6 @@ export default class RawReceiptDetail extends BasePage {
someIndex: number = 0; someIndex: number = 0;
some: any = {}; some: any = {};
qty: any = ''; qty: any = '';
again: any;
/** /**
* 表单数据 * 表单数据
*/ */
@ -128,9 +127,6 @@ export default class RawReceiptDetail extends BasePage {
// locationCode: null, // locationCode: null,
amount: null, amount: null,
}; };
index() {
this.toPage(this.page.raw.handover.picking.result);
}
/** /**
* 表单校验 * 表单校验
*/ */
@ -255,28 +251,7 @@ export default class RawReceiptDetail extends BasePage {
this.model.proOrderResultList[this.someIndex].currentAmount = num; this.model.proOrderResultList[this.someIndex].currentAmount = num;
} }
async onReady() { async onReady() {
// this.GetLocation();
let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: sendSpot,
factoryCode: means.session.user.factoryCode,
workArea: session.workareaCode,
};
let res: any = await this.model.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');
} }
async bill() { async bill() {
if (this.some == {} || this.some.prdOrder == null) { if (this.some == {} || this.some.prdOrder == null) {
@ -304,12 +279,47 @@ export default class RawReceiptDetail extends BasePage {
dataList.push(item); dataList.push(item);
} }
}); });
await this.model.saveProOrderResultUpload(dataList).then(() => { if (dataList.length == 0) {
this.model.queryProOrderResult(this.again).then(() => { uni.showToast({
// this.toPage(this.page.raw.handover.picking.result); icon: 'none',
this.model.queryAggregate(); title: this.$t('message.Warehouse_Tip6') as any,
this.toPage(this.page.raw.handover.picking.byorder);
}); });
return;
}
await this.model.saveProOrderResultUpload(dataList);
if (this.model.code == '1') {
uni.showToast({
icon: 'none',
title: this.$t('message.Warehouse_Tip9') as any,
});
this.GetLocation();
setTimeout(() => {
this.onAggregate();
}, 2000);
}
}
async onAggregate() {
await this.model.queryProOrder(this.model.formParams);
await this.model.queryProOrderResult(this.model.NEWparams);
await this.model.lockProOrderResult(this.model.proOrderResultList);
}
async GetLocation() {
this.Location = [];
let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: sendSpot,
factoryCode: means.session.user.factoryCode,
workArea: session.workareaCode,
};
let res: any = await this.model.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);
}); });
} }
} }

@ -2,15 +2,16 @@
<view class="page-picking-order"> <view class="page-picking-order">
<view class="header"> <view class="header">
<view class="left"> <view class="left">
<u-icon class="icon" name="arrow-left" @click="index" /> <u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view> </view>
<view class="title">{{ $t('message.Pi_SummaryPicking') }}</view> <view class="title">{{ $t('message.Pi_SummaryPicking') }}</view>
<view class="right"></view> <view class="right"></view>
</view> </view>
<!-- 列表展示数据 -->
<view class="table-wrapper"> <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> <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>
<!-- 列表展示数据 --> <!-- 展示详细信息 -->
<view class="Exhibition"> <view class="Exhibition">
<view class="Exhibition-left"> <view class="Exhibition-left">
<view class="Exhibition-left-title">{{ $t('message.Pi_Station') }}:</view> <view class="Exhibition-left-title">{{ $t('message.Pi_Station') }}:</view>
@ -47,9 +48,6 @@
<u-td class="u-td">{{ item.wlCode }}</u-td> <u-td class="u-td">{{ item.wlCode }}</u-td>
<u-td class="u-td">{{ item.qty }}</u-td> <u-td class="u-td">{{ item.qty }}</u-td>
<u-td class="u-td"> <u-td class="u-td">
<!-- <div class="u-td" @click="deleteItem(index)">
{{ $t('message.product_Delete') }}
</div> -->
<u-button type="error" size="small" style="font-size: 20px" @click="deleteItem(index)">{{ $t('message.product_Delete') }}</u-button> <u-button type="error" size="small" style="font-size: 20px" @click="deleteItem(index)">{{ $t('message.product_Delete') }}</u-button>
</u-td> </u-td>
</u-tr> </u-tr>
@ -71,7 +69,7 @@
</u-button> </u-button>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="4">
<u-button type="error" @click="index"> <u-button type="error" @click="uni.navigateBack()">
{{ $t('message.po_Return') }} {{ $t('message.po_Return') }}
</u-button> </u-button>
</u-col> </u-col>
@ -80,7 +78,6 @@
</view> </view>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Ref } from 'vue-property-decorator'; import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page'; import { BasePage } from '@/components/base/page';
@ -96,9 +93,6 @@ import { pick } from 'lodash/fp';
}, },
}) })
export default class RawReceiptDetail extends BasePage { export default class RawReceiptDetail extends BasePage {
/**
* 表单引用
*/
@Ref('form') readonly $form!: VForm; @Ref('form') readonly $form!: VForm;
@Ref('submitForm') readonly $submitForm!: VForm; @Ref('submitForm') readonly $submitForm!: VForm;
submitForm = { submitForm = {
@ -106,9 +100,6 @@ export default class RawReceiptDetail extends BasePage {
receiverName: '', receiverName: '',
password: '', password: '',
}; };
/**
* 页面Module
*/
model = model; model = model;
type = 'text'; type = 'text';
wlCode: any = ''; wlCode: any = '';
@ -120,17 +111,11 @@ export default class RawReceiptDetail extends BasePage {
someIndex: number = 0; someIndex: number = 0;
some: any = {}; some: any = {};
qty: any = ''; qty: any = '';
again: any; //
/**
* 表单数据
*/
form: any = { form: any = {
// locationCode: null, // locationCode: null,
amount: null, amount: null,
}; };
index() {
this.toPage(this.page.raw.handover.picking.result);
}
/** /**
* 表单校验 * 表单校验
*/ */
@ -146,10 +131,7 @@ export default class RawReceiptDetail extends BasePage {
* 库存地点选择 * 库存地点选择
*/ */
locationCodeSelect = false; locationCodeSelect = false;
//
/**
* 表头
*/
headers = summaryHeaders; headers = summaryHeaders;
// //
LocationChoice(e: any) { LocationChoice(e: any) {
@ -260,8 +242,59 @@ export default class RawReceiptDetail extends BasePage {
}); });
this.model.aggregateList[this.someIndex].currentAmount = num; this.model.aggregateList[this.someIndex].currentAmount = num;
} }
//
async onReady() { async onReady() {
await this.GetLocation();
}
async bill() {
this.redirectTo(this.page.raw.handover.picking.SummaryLocal);
}
//
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);
}
});
if (dataList.length == 0) {
uni.showToast({
icon: 'none',
title: this.$t('message.Warehouse_Tip6') as any,
});
return;
}
const params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
dataList,
includeOrderOutIdList,
};
await this.model.saveAggregateUpload(params);
if (this.model.code == '1') {
uni.showToast({
icon: 'none',
title: this.$t('message.Warehouse_Tip9') as any,
});
this.GetLocation();
setTimeout(() => {
this.onAggregate();
}, 2000);
}
}
async onAggregate() {
await this.model.queryProOrder(this.model.formParams);
await this.model.queryProOrderResult(this.model.NEWparams);
const orderOutIdList = this.model.proOrderResultList.map((_: any) => _.orderOutId);
const params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
orderOutIdList,
};
await this.model.queryAggregateList(params);
}
async GetLocation() {
this.Location = [];
let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any); let sendSpot = JSON.parse(localStorage.getItem('sendSpot') as any);
let content = { let content = {
@ -278,52 +311,6 @@ export default class RawReceiptDetail extends BasePage {
pickerName.sendSpot = item.sendSpot; pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName); 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');
}
async bill() {
// if (this.some == {} || this.some.prdOrder == null) {
// uni.showToast({
// icon: "none",
// title: "" as any,
// });
// return;
// }
// let person = JSON.parse(
// localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
// );
// let content = {
// loginName: person.session.user.loginName,
// prdOrder: this.some.prdOrder,
// };
// await this.model.querydetaildlist(content);
this.redirectTo(this.page.raw.handover.picking.SummaryLocal);
}
//
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);
this.model.queryAggregate();
this.toPage(this.page.raw.handover.picking.bysummary);
});
});
} }
} }
</script> </script>

@ -4,64 +4,44 @@
<view class="left"> <view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" /> <u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view> </view>
<view class="title">{{ $t("message.Pi_QueryResults") }}</view> <view class="title">{{ $t('message.Pi_QueryResults') }}</view>
<view class="right"></view> <view class="right"></view>
</view> </view>
<u-form <u-form class="form" ref="form" style="padding-left: 30px" label-width="180rpx">
class="form"
ref="form"
style="padding-left: 30px"
label-width="180rpx"
>
<u-form-item :label="$t('message.Pi_OrderNo')"> <u-form-item :label="$t('message.Pi_OrderNo')">
<u-input v-model="prdOrder" placeholder="" class="Transfer" /> <u-input v-model="prdOrder" placeholder="" class="Transfer" />
<u-button <u-button type="primary" style="height: 60rpx; margin-left: 20rpx" @click="generate">{{ $t('message.Query') }}</u-button>
type="primary"
style="height: 60rpx; margin-left: 20rpx"
@click="generate"
>{{ $t("message.Query") }}</u-button
>
</u-form-item> </u-form-item>
</u-form> </u-form>
<view class="table-wrapper"> <view class="table-wrapper">
<wyb-table <wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="headers" :contents="detailedList" :show-vert-border="false"></wyb-table>
class="table"
ref="table"
width="100%"
show-left-and-right-border
:headers="headers"
:contents="detailedList"
:show-vert-border="false"
></wyb-table>
</view> </view>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component } from "vue-property-decorator"; import { Component } from 'vue-property-decorator';
import { BasePage } from "@/components/base/page"; import { BasePage } from '@/components/base/page';
import { Headers } from "./config"; import { Headers } from './config';
import model from "./model"; import model from './model';
@Component @Component
export default class RawReceiptDetail extends BasePage { export default class RawReceiptDetail extends BasePage {
model = model; model = model;
headers = Headers; headers = Headers;
prdOrder: any = ""; prdOrder: any = '';
detailedList: any = []; detailedList: any = [];
onShow() { onShow() {
model.detailedList = []; model.detailedList = [];
} }
async generate() { async generate() {
if (this.prdOrder == "") { if (this.prdOrder == '') {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message._tips6") as any, title: this.$t('message._tips6') as any,
}); });
return; return;
} }
let person = JSON.parse( let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
);
let content = { let content = {
loginName: person.session.user.loginName, loginName: person.session.user.loginName,
prdOrder: this.prdOrder, prdOrder: this.prdOrder,
@ -73,8 +53,7 @@ export default class RawReceiptDetail extends BasePage {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page-receipt-detail { .page-receipt-detail {
background: #f2f2f2 background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx; background-size: 100% 600rpx;
padding: 30rpx; padding: 30rpx;
min-height: 100%; min-height: 100%;

@ -1,11 +1,26 @@
/** /**
* *
*/ */
import vm from "@/main"; import vm from '@/main';
export const headers = [ export const headers = [
{ {
label: vm.$t("message.Pi_OrderNo"), label: vm.$t('message.Pi_OrderNo'),
key: "prdOrder", key: 'prdOrder', //订单号
width: 550,
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount', //需求数量
width: 550,
},
{
label: vm.$t('message.Pi_materielNo'),
key: 'materialCode', //物料号
width: 550,
},
{
label: vm.$t('message.CommissionedMaterielDesc'),
key: 'materialDesc', //物料描述
width: 550, width: 550,
}, },
]; ];
@ -15,56 +30,56 @@ export const headers = [
*/ */
export const resultHeaders = [ export const resultHeaders = [
{ {
label: vm.$t("message.po_MaterielNo"), label: vm.$t('message.po_MaterielNo'),
key: "materialCode", key: 'materialCode',
width: 220, width: 220,
}, },
{ {
label: vm.$t("message.po_DemandQuantity"), label: vm.$t('message.po_DemandQuantity'),
key: "amount", key: 'amount',
}, },
{ {
label: vm.$t("message.Pi_CumulativePickingQuantity"), label: vm.$t('message.Pi_CumulativePickingQuantity'),
key: "totalMoAmount", key: 'totalMoAmount',
width: 300, width: 300,
}, },
{ {
label: vm.$t("message.Pi_HandoverQuantity"), label: vm.$t('message.Pi_HandoverQuantity'),
key: "totalHvAmount", key: 'totalHvAmount',
}, },
{ {
label: vm.$t("message.Pi_factory"), label: vm.$t('message.Pi_factory'),
key: "sapFactoryCode", key: 'sapFactoryCode',
}, },
{ {
label: vm.$t("message.Pi_Station"), label: vm.$t('message.Pi_Station'),
key: "sendSpot", key: 'sendSpot',
}, },
{ {
label: vm.$t("message.po_MaterielDes"), label: vm.$t('message.po_MaterielDes'),
key: "materialDesc", key: 'materialDesc',
width: 350, width: 350,
}, },
{ {
label: "MRP", label: 'MRP',
key: "mrpCode", key: 'mrpCode',
}, },
{ {
label: vm.$t("message.Pi_unit"), label: vm.$t('message.Pi_unit'),
key: "unit", key: 'unit',
}, },
{ {
label: vm.$t("message.Pi_OrderNo"), label: vm.$t('message.Pi_OrderNo'),
key: "prdOrder", key: 'prdOrder',
}, },
{ {
label: vm.$t("message.Pi_FinishedProductModel"), label: vm.$t('message.Pi_FinishedProductModel'),
key: "prdMaterialDesc", key: 'prdMaterialDesc',
width: 300, width: 300,
}, },
{ {
label: vm.$t("message.po_Location"), label: vm.$t('message.po_Location'),
key: "wkposCode", key: 'wkposCode',
}, },
]; ];
@ -73,40 +88,40 @@ export const resultHeaders = [
*/ */
export const summaryHeaders = [ export const summaryHeaders = [
{ {
label: vm.$t("message.po_MaterielNo"), label: vm.$t('message.po_MaterielNo'),
key: "materialCode", key: 'materialCode',
width: 220, width: 220,
}, },
{ {
label: vm.$t("message.po_DemandQuantity"), label: vm.$t('message.po_DemandQuantity'),
key: "amount", key: 'amount',
}, },
{ {
label: vm.$t("message.Pi_CurrentPickingQuantity"), label: vm.$t('message.Pi_CurrentPickingQuantity'),
key: "currentAmount", key: 'currentAmount',
width: 300, width: 300,
}, },
{ {
label: vm.$t("message.Pi_PickedQuantity"), label: vm.$t('message.Pi_PickedQuantity'),
key: "totalMoAmount", key: 'totalMoAmount',
}, },
{ {
label: vm.$t("message.Pi_QuantityHandedOver"), label: vm.$t('message.Pi_QuantityHandedOver'),
key: "totalHvAmount", key: 'totalHvAmount',
}, },
{ {
label: vm.$t("message.po_Location"), label: vm.$t('message.po_Location'),
// key: 'currentWkposCode', // key: 'currentWkposCode',
key: "wkposCode", key: 'wkposCode',
}, },
{ {
label: vm.$t("message.po_MaterielDes"), label: vm.$t('message.po_MaterielDes'),
key: "materialDesc", key: 'materialDesc',
width: 350, width: 350,
}, },
{ {
label: vm.$t("message.Pi_unit"), label: vm.$t('message.Pi_unit'),
key: "unit", key: 'unit',
}, },
// { // {
// label: '成品型号', // label: '成品型号',
@ -128,103 +143,103 @@ export const summaryHeaders = [
*/ */
export const orderHeaders = [ export const orderHeaders = [
{ {
label: vm.$t("message.po_MaterielNo"), label: vm.$t('message.po_MaterielNo'),
key: "materialCode", key: 'materialCode',
width: 220, width: 220,
}, },
{ {
label: vm.$t("message.po_DemandQuantity"), label: vm.$t('message.po_DemandQuantity'),
key: "amount", key: 'amount',
}, },
{ {
label: vm.$t("message.Pi_CurrentPickingQuantity"), label: vm.$t('message.Pi_CurrentPickingQuantity'),
key: "currentAmount", key: 'currentAmount',
width: 300, width: 300,
}, },
{ {
label: vm.$t("message.Pi_PickedQuantity"), label: vm.$t('message.Pi_PickedQuantity'),
key: "totalMoAmount", key: 'totalMoAmount',
}, },
{ {
label: vm.$t("message.Pi_QuantityHandedOver"), label: vm.$t('message.Pi_QuantityHandedOver'),
key: "totalHvAmount", key: 'totalHvAmount',
}, },
{ {
label: vm.$t("message.po_Location"), label: vm.$t('message.po_Location'),
// key: 'currentWkposCode', // key: 'currentWkposCode',
key: "wkposCode", key: 'wkposCode',
}, },
{ {
label: vm.$t("message.po_MaterielDes"), label: vm.$t('message.po_MaterielDes'),
key: "materialDesc", key: 'materialDesc',
width: 350, width: 350,
}, },
{ {
label: vm.$t("message.Pi_unit"), label: vm.$t('message.Pi_unit'),
key: "unit", key: 'unit',
}, },
{ {
label: vm.$t("message.Pi_FinishedProductModel"), label: vm.$t('message.Pi_FinishedProductModel'),
key: "prdMaterialDesc", key: 'prdMaterialDesc',
width: 300, width: 300,
}, },
{ {
label: vm.$t("message.Pi_factory"), label: vm.$t('message.Pi_factory'),
key: "sapFactoryCode", key: 'sapFactoryCode',
}, },
{ {
label: vm.$t("message.Pi_Station"), label: vm.$t('message.Pi_Station'),
key: "sendSpot", key: 'sendSpot',
}, },
{ {
label: vm.$t("message.Pi_OrderNo"), label: vm.$t('message.Pi_OrderNo'),
key: "prdOrder", key: 'prdOrder',
}, },
]; ];
export const Headers = [ export const Headers = [
{ {
label: vm.$t("message.po_MaterielNo"), label: vm.$t('message.po_MaterielNo'),
key: "materialCode", key: 'materialCode',
width: 220, width: 220,
}, },
{ {
label: vm.$t("message.po_DemandQuantity"), label: vm.$t('message.po_DemandQuantity'),
key: "amount", key: 'amount',
}, },
{ {
label: vm.$t("message.Pi_CurrentPickingQuantity"), label: vm.$t('message.Pi_CurrentPickingQuantity'),
key: "operatorAmount", //本次拣配数量 key: 'operatorAmount', //本次拣配数量
width: 300, width: 300,
}, },
{ {
label: vm.$t("message.po_Location"), label: vm.$t('message.po_Location'),
// key: 'currentWkposCode', // key: 'currentWkposCode',
key: "originLocation", key: 'originLocation',
}, },
{ {
label: vm.$t("message.po_MaterielDes"), label: vm.$t('message.po_MaterielDes'),
key: "materialDesc", key: 'materialDesc',
width: 350, width: 350,
}, },
{ {
label: vm.$t("message.Pi_unit"), label: vm.$t('message.Pi_unit'),
key: "unit", key: 'unit',
}, },
{ {
label: vm.$t("message.Pi_factory"), label: vm.$t('message.Pi_factory'),
key: "sapFactoryCode", key: 'sapFactoryCode',
}, },
{ {
label: vm.$t("message.Pi_Station"), label: vm.$t('message.Pi_Station'),
key: "sendSpot", key: 'sendSpot',
}, },
{ {
label: vm.$t("message.Pi_OrderNo"), label: vm.$t('message.Pi_OrderNo'),
key: "prdOrder", key: 'prdOrder',
}, },
{ {
label: vm.$t("message.CommissionedLocation"), label: vm.$t('message.CommissionedLocation'),
key: "wlCode", key: 'wlCode',
}, },
]; ];

@ -10,7 +10,7 @@
<u-form class="form" ref="form" :model="form" :error-type="['toast']" label-width="120rpx"> <u-form class="form" ref="form" :model="form" :error-type="['toast']" label-width="120rpx">
<u-row align="top"> <u-row align="top">
<u-col :span="12"> <u-col :span="12">
<!-- mMRP --> <!-- MRP -->
<u-form-item :required="true" label="MRP" prop="mrpCodeRegion"> <u-form-item :required="true" label="MRP" prop="mrpCodeRegion">
<u-input v-model="form.mrpCodeRegion" :placeholder="$t('message.po_PleaseInput')" /> <u-input v-model="form.mrpCodeRegion" :placeholder="$t('message.po_PleaseInput')" />
</u-form-item> </u-form-item>
@ -192,6 +192,7 @@ export default class pickingDom extends BasePage {
loginName: session.loginName, loginName: session.loginName,
orderOutIdList, orderOutIdList,
}; };
this.model.NEWparams = params;
await this.model.queryProOrderResult(params); await this.model.queryProOrderResult(params);
sessionStorage.setItem('factory', JSON.stringify(params) as any); sessionStorage.setItem('factory', JSON.stringify(params) as any);
this.toPage(this.page.raw.handover.picking.result); this.toPage(this.page.raw.handover.picking.result);

@ -19,6 +19,9 @@ export class PickingModule extends VuexModule {
mrpCodeRegion: ''; mrpCodeRegion: '';
sapFactoryCode: ''; sapFactoryCode: '';
formParams: ''; formParams: '';
code = '';
orderOutIdList: any;
NEWparams: any;
/** /**
* *
@ -288,20 +291,6 @@ export class PickingModule extends VuexModule {
aggregateList.forEach((_: any) => (_.loginName = params.loginName)); aggregateList.forEach((_: any) => (_.loginName = params.loginName));
return { aggregateList }; return { aggregateList };
} }
@MutationAction
async queryAggregate() {
let params = JSON.parse(sessionStorage.getItem('factory'));
const { list: aggregateList }: any = await http.post(url.sortscan.query.aggregateList, params);
if (!aggregateList.length) {
uni.showToast({
icon: 'none',
title: 'No Data Found',
});
}
aggregateList.forEach((_: any) => (_.loginName = params.loginName));
return { aggregateList };
}
/** /**
* url.auth.locations listvalues item string * url.auth.locations listvalues item string
*/ */
@ -322,27 +311,25 @@ export class PickingModule extends VuexModule {
/** /**
* *
*/ */
@Action({ commit: 'clearState' }) // @Action({ commit: 'clearState' })
@MutationAction
async saveAggregateUpload(params: any) { async saveAggregateUpload(params: any) {
await http.post(url.sortscan.save.aggregate, params); const res: any = await http.post(url.sortscan.save.aggregate, params);
uni.showToast({ console.log('res', res);
icon: 'success', const code = res.code;
title: 'success', return { code };
});
// await this.unlockProOrderResult(params.dataList);
} }
/** /**
* *
*/ */
@Action({ commit: 'clearState' }) // @Action({ commit: 'clearState' })
@MutationAction
async saveProOrderResultUpload(dataList: any[]) { async saveProOrderResultUpload(dataList: any[]) {
await http.post(url.sortscan.save.order, dataList); const res: any = await http.post(url.sortscan.save.order, dataList);
uni.showToast({ const code = res.code;
icon: 'success', console.log('code', code);
title: 'success', return { code };
});
// await this.unlockProOrderResult(dataList);
} }
/** /**

@ -2,101 +2,78 @@
<view class="page-receipt-detail"> <view class="page-receipt-detail">
<view class="header"> <view class="header">
<view class="left"> <view class="left">
<u-icon class="icon" name="arrow-left" @click="index" /> <u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view> </view>
<view class="title">{{ $t("message.Pi_QueryResults") }}</view> <view class="title">{{ $t('message.Pi_QueryResults') }}</view>
<view class="right"></view> <view class="right"></view>
</view> </view>
<!-- 表格数据 -->
<view class="table-wrapper"> <view class="table-wrapper">
<wyb-table <wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="headers" :contents="model.proOrderResultList" :show-vert-border="false"></wyb-table>
class="table"
ref="table"
width="100%"
show-left-and-right-border
:headers="headers"
:contents="model.proOrderResultList"
:show-vert-border="false"
></wyb-table>
</view> </view>
<view class="bottom-bar"> <view class="bottom-bar">
<div class="container"> <div class="container">
<u-row> <u-row>
<!-- 汇总 -->
<u-col :span="4"> <u-col :span="4">
<u-button type="primary" @click="onAggregate"> <u-button type="primary" @click="onAggregate">
{{ $t("message.Pi_Summary") }} {{ $t('message.Pi_Summary') }}
</u-button> </u-button>
</u-col> </u-col>
<!-- 按单 -->
<u-col :span="4"> <u-col :span="4">
<u-button type="success" @click="onOrder"> <u-button type="success" @click="onOrder">
{{ $t("message.Pi_ByOrder") }} {{ $t('message.Pi_ByOrder') }}
</u-button> </u-button>
</u-col> </u-col>
<!-- 返回 -->
<u-col :span="4"> <u-col :span="4">
<u-button type="error" @click="index">{{ <u-button type="error" @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>
$t("message.po_Return")
}}</u-button>
</u-col> </u-col>
</u-row> </u-row>
</div> </div>
</view> </view>
</view> </view>
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component } from "vue-property-decorator"; import { Component } from 'vue-property-decorator';
import { BasePage } from "@/components/base/page"; import { BasePage } from '@/components/base/page';
import model from "./model"; import model from './model';
import { resultHeaders } from "./config"; import { resultHeaders } from './config';
import { session } from "@/store/modules/session"; import { session } from '@/store/modules/session';
@Component @Component
export default class RawReceiptDetail extends BasePage { export default class RawReceiptDetail extends BasePage {
/**
* 页面Module
*/
model = model; model = model;
//
/**
* 表头
*/
headers = resultHeaders; headers = resultHeaders;
index() { index() {
this.toPage(this.page.raw.handover.picking.index); this.toPage(this.page.raw.handover.picking.index);
} }
/** //
* 按单
*/
async onOrder() { async onOrder() {
const list = this.model.proOrderResultList; const list = this.model.proOrderResultList;
await this.model.lockProOrderResult(list); await this.model.lockProOrderResult(list);
this.toPage(this.page.raw.handover.picking.byorder); this.toPage(this.page.raw.handover.picking.byorder);
} }
//
/**
* 汇总
*/
async onAggregate() { async onAggregate() {
const orderOutIdList = this.model.proOrderResultList.map( // const orderOutIdList = this.model.proOrderResultList.map((_: any) => _.orderOutId);
(_: any) => _.orderOutId // const params = {
); // factoryCode: session.factoryCode,
const params = { // loginName: session.loginName,
factoryCode: session.factoryCode, // orderOutIdList,
loginName: session.loginName, // };
orderOutIdList, // await this.model.queryAggregateList(params);
}; // if (this.model.aggregateList.length === 0) {
await this.model.queryAggregateList(params); // return;
if (this.model.aggregateList.length === 0) { // }
return;
}
this.toPage(this.page.raw.handover.picking.bysummary); this.toPage(this.page.raw.handover.picking.bysummary);
} }
} }
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.page-receipt-detail { .page-receipt-detail {
background: #f2f2f2 background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1b45b1 100%) no-repeat;
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx; background-size: 100% 600rpx;
padding: 30rpx; padding: 30rpx;
min-height: 100%; min-height: 100%;

Loading…
Cancel
Save