cosmoim-852 fix 俄罗斯拣配

master
guoshuang 3 years ago
parent 658f609f22
commit e553ee10fb

@ -898,6 +898,54 @@
"navigationBarTextStyle": "white" // white-black- "navigationBarTextStyle": "white" // white-black-
} }
}, },
{
"path": "pages/raw/handover/RUS-picking/index",
"style": {
"navigationBarTitleText": "拣配查询", //
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/handover/RUS-picking/ByOrder",
"style": {
"navigationBarTitleText": "拣配查询", //
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/handover/RUS-picking/BySummary",
"style": {
"navigationBarTitleText": "拣配查询", //
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/handover/RUS-picking/result",
"style": {
"navigationBarTitleText": "拣配查询结果", //
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/handover/RUS-picking/Local-details",
"style": {
"navigationBarTitleText": "本地DN收货明细",
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{
"path": "pages/raw/handover/RUS-picking/Summary-details",
"style": {
"navigationBarTitleText": "本地DN收货明细",
"navigationStyle": "custom", //
"navigationBarTextStyle": "white" // white-black-
}
},
{ {
"path": "pages/demo/index", "path": "pages/demo/index",
"style": { "style": {
@ -911,4 +959,4 @@
"navigationBarBackgroundColor": "#F8F8F8", "navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
} }
} }

@ -0,0 +1,566 @@
<template>
<view class="page-picking-order">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</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">{{ $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.CommissionedLocation') }}:</view>
<jPicker sureColor="#ff0000" style="width: 400rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode.value" class="search" :options="Location" />
</view>
<view class="single-left">
<view>{{ $t('message.Container') }}</view>
<u-search :placeholder="$t('message.PleaseScan')" v-model="form.XXXXX" :show-action="false"></u-search>
</view>
<view class="library-right">
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}:</view>
<u-input v-model="qty" type="number" :border="border" :placeholder="$t('message.Summary_PleaseInputNumber')" class="input" />
<view class="add">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
</view>
</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.Container') }}</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">{{ item.xxxx }}</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-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="bill">{{ $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="uni.navigateBack()">
{{ $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 { orderHeaders } from './config';
import { session } from '@/store/modules/session';
import { VForm, VFormRules } from 'vue/types/form';
import jPicker from '@/components/J-Picker/jPicker.vue';
@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 = '';
LOCKProOrderResultListParams: any = '';
border = true;
//
LocationList: any = [];
//
Location: any = [];
someIndex = 0;
some: any = {};
qty: any = '';
/**
* 表单数据
*/
form: any = {
// locationCode: null,
amount: null,
};
/**
* 表单校验
*/
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;
}
async handleRow({ data }: any) {
console.log('data[0]', data[0]);
if (!this.model.proOrderResultList[data[0].index].sendSpot) {
uni.showModal({
content: this.$t('message.SAPLocation') as any,
success: (res) => {
if (res.confirm) {
this.model.proOrderResultList[data[0].index].checked = false;
}
},
});
return;
}
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 = '';
this.form.xxxx = '';
//
await this.model.queryItemLoc({
workArea: session.workareaCode,
loginName: session.loginName,
sendSpot: null,
materialCode: this.some.materialCode,
factoryCode: session.factoryCode,
});
this.Location = [];
if (this.model.LocList.length == 0) {
uni.showModal({
content: this.$t('message.selected') as any,
showCancel: false,
confirmText: this.$t('message.workArea_Confirm') as any,
});
} else {
this.Location = this.model.LocList;
console.log('this.Location', this.Location);
this.wlCode = this.Location[0];
}
}
Add() {
if (this.qty == '' || this.wlCode == '') {
this.customToast(this.$t('message.Commission_tips2') as any);
return;
}
if (parseFloat(this.qty) <= 0) {
this.customToast(this.$t('message.Commission_tips3') as any);
return;
}
if (JSON.stringify(this.some) == '{}') {
this.customToast(this.$t('message.Commission_tips6') as any);
return;
}
let isTrue = true;
if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => {
if (this.wlCode.sendSpot != item.Code || this.wlCode.label === item.wlCode) {
this.customToast(this.$t('message.Commission_tips7') 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,
xxxx: this.form.xxxx,
};
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;
TEM.xxxx = this.form.xxxx;
//add
this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
this.form.xxxx = '';
}
},
});
} else {
let arr = {
wlCode: this.wlCode.label,
qty: this.qty,
Code: this.wlCode.sendSpot,
xxxx: this.form.xxxx,
};
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;
TEM.xxxx = this.form.xxxx;
this.model.proOrderResultList[this.someIndex].wlList.push(TEM);
this.model.proOrderResultList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
this.form.xxxx = '';
}
}
}
deleteItem(index: any) {
this.LocationList.splice(index, 1);
this.model.proOrderResultList[this.someIndex].wlList.splice(index, 1);
this.business();
}
business() {
let num = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.qty);
});
this.model.proOrderResultList[this.someIndex].currentAmount = num;
}
async onReady() {
await this.onAggregate();
// await this.GetLocation();
}
async bill() {
if (this.some == {} || this.some.prdOrder == null) {
this.customToast(this.$t('message.Commission_tips6') as any);
return;
}
let person = JSON.parse(uni.getStorageSync('__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.RUSpicking.Local);
}
/**
* 提交
*/
async onSubmit() {
const dataList: any = [];
this.model.proOrderResultList.forEach((item: any) => {
if (item.checked == true) {
dataList.push(item);
}
});
if (dataList.length == 0) {
this.customToast(this.$t('message.Warehouse_Tip6') as any);
return;
}
await this.model.saveProOrderResultUpload(dataList);
if (this.model.code == '1') {
uni.showToast({
//icon: 'success',
title: this.$t('message.Warehouse_Tip9') as any,
duration: 2000,
image: '/static/icons/icon-51.png',
});
// this.GetLocation();
setTimeout(() => {
this.onAggregate();
}, 2000);
}
}
async onAggregate() {
await this.model.queryProOrder(this.model.formParams);
await this.model.queryProOrderResult(this.model.NEWparams);
if (this.model.proOrderResultList.length == 0) {
this.some = {};
this.LocationList = [];
this.wlCode = '';
return;
}
this.LOCKProOrderResultListParams = this.model.proOrderResultList;
await this.model.lockProOrderResult(this.model.proOrderResultList);
this.some = {};
this.LocationList = [];
this.wlCode = '';
}
async GetLocation() {
this.Location = [];
let means: any = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__') as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: null,
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);
});
}
beforeDestroy() {
this.unlock();
}
onHide() {
this.unlock();
}
async unlock() {
await this.model.unlockProOrderResult(this.LOCKProOrderResultListParams);
}
}
</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: 200rpx;
// display: flex;
display: block;
.library-left {
width: 100%;
height: 100rpx;
padding-left: 36rpx;
// display: flex;
// view {
// width: 230rpx;
// line-height: 100rpx;
// text-align: center;
// }
}
.single-left {
width: 100%;
height: 100rpx;
display: flex;
view {
width: 110rpx;
height: 100rpx;
line-height: 100rpx;
}
}
.library-right {
width: 100%;
height: 100rpx;
padding-left: 36rpx;
display: flex;
.library-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.input {
width: 200rpx;
height: 70rpx;
margin-top: 15rpx;
margin-left: 4rpx;
}
.add {
width: 200rpx;
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,590 @@
<template>
<view class="page-picking-order">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({})" />
</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.CommissionedLocation') }}:</view>
<jPicker sureColor="#ff0000" style="width: 400rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode.value" class="search" :options="Location" />
</view>
<!-- 容器编码 -->
<view class="single-left">
<view>{{ $t('message.Container') }}</view>
<u-search :placeholder="$t('message.PleaseScan')" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
</view>
<view class="library-right">
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}:</view>
<u-input v-model="qty" type="number" :border="border" :placeholder="$t('message.Summary_PleaseInputNumber')" class="input" />
<view class="add">
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
</view>
</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.Container') }}</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">{{ item.xxxx }}</u-td>
<u-td class="u-td">
<u-button type="error" size="small" style="font-size: 20px" @click="deleteItem(index)">{{ $t('message.product_Delete') }}</u-button>
</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="bill">{{ $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="uni.navigateBack({})">
{{ $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';
@Component({
components: {
jPicker,
},
})
export default class RawReceiptDetail extends BasePage {
@Ref('form') readonly $form!: VForm;
@Ref('submitForm') readonly $submitForm!: VForm;
submitForm = {
receiver: '',
receiverName: '',
password: '',
};
model = model;
type = 'text';
wlCode: any = '';
border = true;
//
LocationList: any = [];
//
Location: any = [];
unLockParams: any = '';
someIndex = 0;
some: any = {};
Container: any = {};
Barcode: any = '';
qty: any = '';
//
form: any = {
// locationCode: null,
amount: null,
};
/**
* 表单校验
*/
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;
}
//
async handleRow({ data }: any) {
if (!this.model.aggregateList[data[0].index].sendSpot) {
uni.showModal({
content: this.$t('message.SAPLocation') as any,
confirmText: this.$t('message.workArea_Confirm') as string,
cancelText: this.$t('message.Cancel') as string,
success: (res) => {
if (res.confirm) {
this.model.aggregateList[data[0].index].checked = false;
}
},
});
return;
}
this.someIndex = data[0].index;
this.some = data[0].lineData;
this.model.aggregateList[this.someIndex].wlList = [];
this.model.aggregateList[this.someIndex].currentAmount = 0;
//add
this.LocationList = [];
this.qty = '';
this.Barcode = '';
//
// await this.model.queryItemLoc({
// workArea: session.workareaCode,
// loginName: session.loginName,
// sendSpot: null,
// materialCode: this.some.materialCode,
// factoryCode: session.factoryCode,
// });
// this.Location = [];
// if (this.model.LocList.length == 0) {
// uni.showModal({
// content: this.$t('message.selected') as any,
// showCancel: false,
// confirmText: this.$t('message.workArea_Confirm') as any,
// });
// } else {
// this.Location = this.model.LocList;
// console.log('this.Location', this.Location);
// this.wlCode = this.Location[0];
// }
}
async searchBarcode() {
if (this.Barcode == '') {
this.customToast(this.$t('message.barcode') as string);
return;
}
// if (this.materialList.length == 0) {
// this.customToast(this.$t('message.AppendMateriel5') as string);
// return;
// }
await this.model.searchBarcode(this.Barcode);
this.Container = this.model.ContainerCode;
let arr = {
label: this.Container.locCode,
value: this.Container.locCode + '(' + this.Container.sendSpot + ')',
sendSpot: this.Container.sendSpot,
};
this.Location.push(arr);
this.wlCode = this.Location[0];
//let num = 0;
// if (this.LocationList.length != 0) {
// this.LocationList.forEach((item: any) => {
// if (item.barcode == this.Container.barcode) {
// num += parseFloat(item.qty);
// }
// });
// }
// if (this.Container.cpRef4 == null) {
// this.qty = parseFloat(this.Container.qty) - num;
// } else {
// this.qty = parseFloat(this.Container.qty) - parseFloat(this.Container.cpRef4) - num;
// }
}
Add() {
if (this.qty == '' || this.wlCode == '') {
this.customToast(this.$t('message.Commission_tips2') as any);
return;
}
if (parseFloat(this.qty) <= 0) {
this.customToast(this.$t('message.Commission_tips3') as any);
return;
}
if (JSON.stringify(this.some) == '{}') {
this.customToast(this.$t('message.Commission_tips6') as any);
return;
}
let isTrue = true;
if (this.LocationList.length != 0) {
this.LocationList.forEach((item: any) => {
if (this.wlCode.sendSpot != item.Code) {
this.customToast(this.$t('message.Commission_tips7') 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,
barcode: this.Container.barcode,
};
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;
//
TEM.xxxx = this.form.xxxx;
this.model.aggregateList[this.someIndex].wlList.push(TEM);
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
this.form.xxxx = '';
}
},
});
} else {
let arr = {
wlCode: this.wlCode.label,
qty: this.qty,
Code: this.wlCode.sendSpot,
barcode: this.Container.barcode,
};
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;
///
TEM.xxxx = this.form.xxxx;
this.model.aggregateList[this.someIndex].wlList.push(TEM);
this.model.aggregateList[this.someIndex].currentAmount += parseFloat(this.qty);
this.qty = '';
this.form.xxxx = '';
}
}
}
//
deleteItem(index: any) {
this.LocationList.splice(index, 1);
this.model.aggregateList[this.someIndex].wlList.splice(index, 1);
this.business();
}
//
business() {
let num = 0;
this.LocationList.forEach((item: any) => {
num += parseFloat(item.qty);
});
this.model.aggregateList[this.someIndex].currentAmount = num;
}
async onReady() {
await this.onAggregate();
// await this.GetLocation();
}
async bill() {
this.redirectTo(this.page.raw.handover.RUSpicking.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) {
this.customToast(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({
duration: 2000,
title: this.$t('message.Warehouse_Tip9') as string,
image: '/static/icons/icon-51.png',
});
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,
};
this.unLockParams = params;
await this.model.queryAggregateList(params);
this.some = {};
this.LocationList = [];
this.wlCode = '';
this.form.xxxx = '';
}
async GetLocation() {
this.Location = [];
let means: any = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__') as any);
let content = {
loginName: means.session.user.loginName,
sendSpot: null,
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);
});
}
beforeDestroy() {
this.unlock();
}
onHide() {
this.unlock();
}
async unlock() {
await this.model.unlockAggregateResult(this.unLockParams);
}
}
</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: 200rpx;
// display: flex;
display: block;
.library-left {
width: 100%;
height: 100rpx;
padding-left: 36rpx;
// display: flex;
// view {
// width: 230rpx;
// line-height: 100rpx;
// text-align: center;
// }
}
.single-left {
width: 100%;
height: 100rpx;
display: flex;
view {
width: 110rpx;
height: 100rpx;
line-height: 100rpx;
}
}
.library-right {
width: 100%;
height: 100rpx;
padding-left: 36rpx;
display: flex;
.library-right-title {
width: 120rpx;
height: 100%;
line-height: 100rpx;
}
.input {
width: 200rpx;
height: 70rpx;
margin-top: 15rpx;
margin-left: 4rpx;
}
.add {
width: 200rpx;
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,74 @@
<template>
<view class="page-receipt-detail">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t('message.Pi_QueryResults') }}</view>
<view class="right"></view>
</view>
<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';
@Component
export default class RawReceiptDetail extends BasePage {
model = model;
headers = Headers;
}
</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;
}
}
.table-wrapper {
background-color: #fff;
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
}
}
</style>

@ -0,0 +1,114 @@
<template>
<view class="page-receipt-detail">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</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="prdOrder" 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="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';
@Component
export default class RawReceiptDetail extends BasePage {
model = model;
headers = Headers;
prdOrder: any = '';
detailedList: any = [];
onShow() {
model.detailedList = [];
}
async generate() {
if (this.prdOrder == '') {
this.customToast(this.$t('message._tips6') as any);
return;
}
let person = JSON.parse(uni.getStorageSync('__GWMS_APP_STATE_DATA__') as any);
let content = {
loginName: person.session.user.loginName,
prdOrder: this.prdOrder,
};
await this.model.querydetaildlist(content);
this.detailedList = this.model.detailedList;
}
}
</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>

@ -0,0 +1,287 @@
/**
*
*/
import vm from '@/main';
export const headers = [
{
label: vm.$t('message.Pi_OrderNo'),
key: 'prdOrder', //订单号
width: 250,
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount', //需求数量
width: 255,
},
{
label: vm.$t('message.Pi_materielNo'),
key: 'materialCode', //物料号
width: 250,
},
{
label: vm.$t('message.CommissionedMaterielDesc'),
key: 'materialDesc', //物料描述
width: 300,
},
{
label: vm.$t('message.Summary_ProductionDate'),
key: 'requireDate', //生产日期
width: 300,
},
{
label: vm.$t('message.product_FGCode'),
key: 'prodCode', //成品编码
},
{
label: vm.$t('message.Pi_FinishedProductModel'),
key: 'prodDesc', //成品型号
width: 300,
},
];
/**
*
*/
export const resultHeaders = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
width: 220,
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount',
},
{
label: vm.$t('message.Pi_CumulativePickingQuantity'),
key: 'totalMoAmount',
width: 300,
},
{
label: vm.$t('message.Pi_HandoverQuantity'),
key: 'totalHvAmount',
},
{
label: vm.$t('message.Pi_factory'),
key: 'sapFactoryCode',
},
{
label: vm.$t('message.Pi_Station'),
key: 'sendSpot',
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'materialDesc',
width: 350,
},
{
label: 'MRP',
key: 'mrpCode',
},
{
label: vm.$t('message.Pi_unit'),
key: 'unit',
},
{
label: vm.$t('message.Pi_OrderNo'),
key: 'prdOrder',
},
// {
// label: vm.$t('message.Pi_FinishedProductModel'),
// key: 'prdMaterialDesc',
// width: 300,
// },
{
label: vm.$t('message.po_Location'),
key: 'wkposCode',
},
{
label: vm.$t('message.product_FGCode'),
key: 'prodCode', //成品编码
},
{
label: vm.$t('message.Pi_FinishedProductModel'),
key: 'prodDesc', //成品型号
width: 300,
},
];
/**
*
*/
export const summaryHeaders = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
width: 220,
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount',
},
{
label: vm.$t('message.shortage'),
key: 'differences',
},
{
label: vm.$t('message.Pi_CurrentPickingQuantity'),
key: 'currentAmount',
width: 300,
},
{
label: vm.$t('message.Pi_PickedQuantity'),
key: 'totalMoAmount',
},
{
label: vm.$t('message.Pi_QuantityHandedOver'),
key: 'totalHvAmount',
},
{
label: vm.$t('message.po_Location'),
// key: 'currentWkposCode',
key: 'wkposCode',
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'materialDesc',
width: 350,
},
{
label: vm.$t('message.Pi_unit'),
key: 'unit',
},
{
label: vm.$t('message.target'),
key: 'sendSpot',
// width: 300,
},
// {
// label: '工位',
// key: 'sendSpot',
// },
// {
// label: '工厂',
// key: 'sapFactoryCode',
// },
];
/**
*
*/
export const orderHeaders = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
width: 220,
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount',
},
{
label: vm.$t('message.shortage'),
key: 'differences',
},
{
label: vm.$t('message.Pi_CurrentPickingQuantity'),
key: 'currentAmount',
width: 300,
},
{
label: vm.$t('message.Pi_PickedQuantity'),
key: 'totalMoAmount',
},
{
label: vm.$t('message.Pi_QuantityHandedOver'),
key: 'totalHvAmount',
},
{
label: vm.$t('message.target'),
// key: 'currentWkposCode',
//key: 'wkposCode',
key: 'sendSpot',
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'materialDesc',
width: 350,
},
{
label: vm.$t('message.Pi_unit'),
key: 'unit',
},
{
label: vm.$t('message.Pi_FinishedProductModel'),
key: 'prdMaterialDesc',
width: 300,
},
{
label: vm.$t('message.Pi_factory'),
key: 'sapFactoryCode',
},
{
label: vm.$t('message.Pi_Station'),
//key: 'sendSpot',
key: 'wkposCode',
},
{
label: vm.$t('message.Pi_OrderNo'),
key: 'prdOrder',
},
{
label: vm.$t('message.product_FGCode'),
key: 'prodCode', //成品编码
},
{
label: vm.$t('message.Pi_FinishedProductModel'),
key: 'prodDesc', //成品型号
width: 300,
},
];
export const Headers = [
{
label: vm.$t('message.po_MaterielNo'),
key: 'materialCode',
width: 220,
},
{
label: vm.$t('message.po_DemandQuantity'),
key: 'amount',
},
{
label: vm.$t('message.Pi_CurrentPickingQuantity'),
key: 'operatorAmount', //本次拣配数量
width: 300,
},
{
label: vm.$t('message.po_Location'),
// key: 'currentWkposCode',
key: 'originLocation',
},
{
label: vm.$t('message.po_MaterielDes'),
key: 'materialDesc',
width: 350,
},
{
label: vm.$t('message.Pi_unit'),
key: 'unit',
},
{
label: vm.$t('message.Pi_factory'),
key: 'sapFactoryCode',
},
{
label: vm.$t('message.Pi_Station'),
key: 'sendSpot',
},
{
label: vm.$t('message.Pi_OrderNo'),
key: 'prdOrder',
},
{
label: vm.$t('message.CommissionedLocation'),
key: 'wlCode',
},
];

@ -0,0 +1,311 @@
<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.Pi_PickingQuery') }}</view>
<view class="right"></view>
</view>
<u-form class="form" ref="form" :model="form" :error-type="['toast']" label-width="120rpx">
<u-row align="top">
<u-col :span="12">
<!-- MRP -->
<u-form-item :required="true" label="MRP" prop="mrpCodeRegion">
<u-input v-model="form.mrpCodeRegion" :border="border" :placeholder="$t('message.po_PleaseInput')" />
</u-form-item>
<!-- 订单号 -->
<u-form-item :label="$t('message.Pi_OrderNo')">
<u-input v-model="form.prdOrderFrom" :border="border" :placeholder="$t('message.po_PleaseInput')" />
</u-form-item>
<!-- 工厂 -->
<u-form-item :required="true" :label="$t('message.Pi_factory')" prop="sapFactoryCode">
<u-input v-model="form.sapFactoryCode" :placeholder="$t('message.po_PleaseInput')" />
</u-form-item>
<!-- 物料号 -->
<u-form-item :label="$t('message.Pi_materielNo')">
<u-input v-model="form.materialCodeList" :border="border" style="padding-left: 14px" :placeholder="$t('message.po_PleaseInput')" />
</u-form-item>
<!-- 时间 -->
<view style="display: flex">
<u-field style="background: white; border-radius: 10rpx; padding-left: 0" v-model="form.requireDateRegion" :placeholder="$t('message.SelectTime')" :label="$t('message.NowTime')"> </u-field>
<u-picker :confirm-text="$t('message.product_Confirm')" :cancel-text="$t('message.product_Cancel')" v-model="startShow" :params="startParams" mode="time" @confirm="startConfirm"></u-picker>
<u-button @click="startShow = true" type="primary">{{ $t('message.workArea_Selelct') }}</u-button>
</view>
</u-col>
<u-col :span="12">
<view class="table-wrapper">
<wyb-table class="table" ref="table" width="100%" enable-check="multiple" show-left-and-right-border :headers="headers" :contents="model.proOrderList" :show-vert-border="false"></wyb-table>
</view>
</u-col>
</u-row>
</u-form>
<view class="bottom-bar">
<u-row class="button-bar">
<u-col :span="6">
<u-button type="primary" @click="onQuery">{{ $t('message.Pi_order') }}</u-button>
</u-col>
<u-col :span="3">
<u-button type="success" @click="onOk">{{ $t('message.dn_Confirm') }}</u-button>
</u-col>
<u-col :span="3">
<u-button type="error" @click="uni.navigateBack({})">{{ $t('message.po_Return') }}</u-button>
</u-col>
</u-row>
</view>
</view>
</template>
<script lang="ts">
import { Component, Ref, Watch } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import { VForm } from 'vue/types/form';
import model from './model';
import { headers } from './config';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
@Component
export default class pickingDom extends BasePage {
/**
* 表单引用
*/
@Ref('form') readonly $form!: VForm;
@Watch('form', { immediate: true, deep: true })
onPersonChanged() {
this.isFormChange = true;
}
/**
* 页面Module
*/
model = model;
border = true;
/**
* 表头
*/
headers = headers;
startShow = false;
/**
* 表单数据
*/
form = {
mrpCodeRegion: '',
mrpCodeIncludeList: '',
mrpCodeExcludeList: '',
prdOrderFrom: '',
prdOrderTo: '',
sapFactoryCode: '',
wkposCode: '',
batchNumberList: '',
materialCodeList: '',
sendSpotList: '',
requireDateRegion: '',
};
startParams = {
year: true,
month: true,
day: true,
hour: false,
minute: false,
second: false,
};
/**
* 表单是否改变
*/
isFormChange = false;
/**
* 选择项显示
*/
requireDateRegionSelect = false;
productDateRegionSelect = false;
/**
* 表单校验
*/
rules = {
mrpCodeRegion: [{ required: true, message: this.$t('message.Pi_InputMrp') as string }],
sapFactoryCode: [{ required: true, message: this.$t('message.Pi_InputFactory') as string }],
};
/**
* 生成表单参数
*/
get formParams() {
const params: any = {
...this.form,
factoryCode: session.factoryCode,
loginName: session.loginName,
};
if (this.form.batchNumberList) {
params.batchNumberList = this.form.batchNumberList.split(',');
} else {
delete params.batchNumberList;
}
if (this.form.materialCodeList) {
params.materialCodeList = this.form.materialCodeList.split(',');
} else {
delete params.materialCodeList;
}
if (this.form.mrpCodeIncludeList) {
params.mrpCodeIncludeList = this.form.mrpCodeIncludeList.split(',');
} else {
delete params.mrpCodeIncludeList;
}
if (this.form.mrpCodeExcludeList) {
params.mrpCodeExcludeList = this.form.mrpCodeExcludeList.split(',');
} else {
delete params.mrpCodeExcludeList;
}
if (this.form.sendSpotList) {
params.sendSpotList = this.form.sendSpotList.split(',');
} else {
delete params.sendSpotList;
}
if (this.form.requireDateRegion) {
params.requireDateRegion = this.form.requireDateRegion.split('-').join('').toString();
} else {
delete params.sendSpotList;
}
return params;
}
// onReadyonLoad
onReady() {
this.$form.setRules(this.rules);
model.clearProOrderList();
this.form.sapFactoryCode = session.factoryCode;
//this.form.requireDateRegion = this.getNowFormatDate();
}
// getNowFormatDate() {
// var date = new Date();
// var seperator1 = '-';
// var year = date.getFullYear();
// var month: any = date.getMonth() + 1;
// var strDate: any = date.getDate();
// if (month >= 1 && month <= 9) {
// month = '0' + month;
// }
// if (strDate >= 0 && strDate <= 9) {
// strDate = '0' + strDate;
// }
// var currentdate = year + seperator1 + month + seperator1 + strDate;
// return currentdate;
// }
startConfirm(startParams: any) {
this.form.requireDateRegion = startParams.year + '-' + startParams.month + '-' + startParams.day;
}
/**
* 确认
*/
async onOk() {
let orderOutIdList = [];
if (this.isFormChange || this.model.proOrderList.length === 0) {
const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, this.formParams);
orderOutIdList = proOrderList.map((_: any) => _.orderOutId);
} else {
orderOutIdList = this.model.checkedProOrderList.map((_: any) => _.orderOutId);
}
if (orderOutIdList.length === 0 && this.model.proOrderList.length > 0) {
this.customToast(this.$t('message.Pi_OrderNoNotSelected') as string);
return;
} else if (orderOutIdList.length === 0) {
this.customToast(this.$t('message.Pi_NoDataFound') as string);
return;
}
const params = {
sapFactoryCode: this.form.sapFactoryCode,
factoryCode: session.factoryCode,
loginName: session.loginName,
orderOutIdList,
};
this.model.NEWparams = params;
await this.model.queryProOrderResult(params);
uni.setStorageSync('factory', JSON.stringify(params) as any);
this.toPage(this.page.raw.handover.RUSpicking.result);
}
/**
* 订单查询
*/
onQuery() {
this.$form.validate(async (valid: boolean) => {
if (!valid) return;
await this.model.queryProOrder(this.formParams);
this.model.checkAllProOrderList(true);
this.isFormChange = false;
model.mrpCodeRegion = this.form.mrpCodeRegion as any;
model.sapFactoryCode = this.form.sapFactoryCode as any;
model.formParams = this.formParams;
});
}
}
</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: 0rpx;
padding-top: 12rpx;
left: 0;
right: 0;
z-index: 99;
display: flex;
height: 100rpx;
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: 30rpx;
border-radius: 10rpx;
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
.u-form-item {
padding: 30rpx 0;
line-height: 35rpx;
}
}
.table-wrapper {
padding: 10rpx 0;
}
.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,423 @@
import { Action, getModule, Module, Mutation, MutationAction, VuexModule } from 'vuex-module-decorators';
import store from '@/store';
import http from '@/utils/request';
import { url } from '@/utils/url';
import { session } from '@/store/modules/session';
import vm from '@/main';
@Module({
namespaced: true,
dynamic: true,
store,
name: 'raw.handover.picking',
})
export class PickingModule extends VuexModule {
/**
*
*/
proOrderList: any[] = [];
detailedList: any;
mrpCodeRegion: '';
sapFactoryCode: '';
formParams: '';
code = '';
orderOutIdList: any;
NEWparams: any;
LocList: any = [];
lockCode: any = '';
// 容器码返回
ContainerCode: any = '';
/**
*
*/
proOrderResultList: any[] = [];
/**
*
*/
aggregateList: any[] = [];
/**
*
*/
locationList = [];
/**
*
*/
get isCheckedAll() {
return !this.proOrderList.filter((_: any) => !_.checked).length;
}
/**
*
*/
get hasChecked() {
return this.checkedProOrderList.length > 0;
}
/**
*
*/
get checkedProOrderList() {
return this.proOrderList.filter((_: any) => _.checked);
}
/**
*
*/
get isAggregateCheckedAll() {
return !this.aggregateList.filter((_: any) => !_.checked).length;
}
/**
*
*/
get hasAggregateChecked() {
return this.checkedAggregateList.length > 0;
}
/**
*
*/
get checkedAggregateList() {
return this.aggregateList.filter((_: any) => _.checked);
}
/**
*
*/
get hasAggregateCurrentAmount() {
return this.aggregateList.findIndex((_: any) => _.currentAmount) > -1;
}
/**
*
*/
get aggregateUploadList() {
return this.aggregateList.map((item: any) => {
if (!item.checked) {
item.currentAmount = 0;
}
return item;
});
}
/**
*
*/
get isProOrderResultCheckedAll() {
return !this.proOrderResultList.filter((_: any) => !_.checked).length;
}
/**
*
*/
get hasProOrderResultChecked() {
return this.checkedProOrderResultList.length > 0;
}
/**
*
*/
get checkedProOrderResultList() {
return this.proOrderResultList.filter((_: any) => _.checked);
}
/**
*
*/
get hasProOrderResultCurrentAmount() {
return this.proOrderResultList.findIndex((_: any) => _.currentAmount) > -1;
}
/**
*
*/
get proOrderResultUploadList() {
return this.proOrderResultList.map((item: any) => {
if (!item.checked) {
item.currentAmount = 0;
}
return item;
});
}
/**
*
*/
@Mutation
clearState() {
this.proOrderList = [];
this.proOrderResultList = [];
this.aggregateList = [];
}
/**
*
*/
@Mutation
clearProOrderList() {
this.proOrderList = [];
}
/**
* /
* @param checked
*/
@Mutation
checkAllProOrderList(checked: boolean) {
this.proOrderList = this.proOrderList.map((item: any) => ({
...item,
checked,
}));
}
/**
* /
* @param checked
*/
@Mutation
checkAllAggregateList(checked: boolean) {
this.aggregateList = this.aggregateList.map((item: any) => ({
...item,
checked,
}));
}
/**
*
* @param params
*/
@Mutation
confirmCheckedAggregateList(params: { locationCode: string; amount: number }) {
this.aggregateList
.filter((_: any) => _.checked)
.forEach((item: any) => {
if (params.locationCode) {
item.currentWkposCode = params.locationCode;
}
if (params.amount) {
item.currentAmount = params.amount;
}
});
}
/**
* /
* @param checked
*/
@Mutation
checkAllProOrderResultList(checked: boolean) {
this.proOrderResultList = this.proOrderResultList.map((item: any) => ({
...item,
checked,
}));
}
/**
*
* @param params
*/
@Mutation
confirmCheckedProOrderResultList(params: { amount: number }) {
this.proOrderResultList
.filter((_: any) => _.checked)
.forEach((item: any) => {
// if (params.locationCode) {
// item.currentWkposCode = params.locationCode;
// }
if (params.amount) {
item.currentAmount = params.amount;
}
});
}
/**
*
* @param params
*/
@MutationAction
async queryProOrder(params: any) {
const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, params);
if (!proOrderList.length) {
// uni.showToast({
// icon: 'none',
// title: 'No Data Found',
// });
vm.customToast(vm.$t('message.Pi_NoDataFound') as any);
}
return { proOrderList };
}
@MutationAction
async queryOrder() {
const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, this.formParams);
if (!proOrderList.length) {
// uni.showToast({
// icon: 'none',
// title: 'No Data Found',
// });
vm.customToast(vm.$t('message.Pi_NoDataFound') as any);
}
return { proOrderList };
}
/**
*
* @param params
*/
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async queryStockList(params: any) {
const res: any = await http.post('/material/queryOdsRawStorageNews', params);
return res;
}
/**
*
* @param params
*/
@MutationAction
async queryProOrderResult(params: any) {
const { list: proOrderResultList }: any = await http.post(url.sortscan.query.prdorderList, params);
proOrderResultList.forEach((item: any) => {
(item.loginName = params.loginName), (item.differences = parseFloat(item.amount) - parseFloat(item.totalMoAmount));
});
return { proOrderResultList };
}
/**
* -
* @param params
*/
@MutationAction
async queryAggregateList(params: any) {
const { list: aggregateList }: any = await http.post(url.sortscan.query.aggregateList, params);
if (!aggregateList.length) {
// uni.showToast({
// icon: 'none',
// title: 'No Data Found',
// });
// vm.customToast(vm.$t('message.Pi_NoDataFound') as any);
return;
}
aggregateList.forEach((item: any) => {
(item.loginName = params.loginName), (item.differences = parseFloat(item.amount) - parseFloat(item.totalMoAmount));
});
return { aggregateList };
}
/**
* url.auth.locations listvalues item string
*/
@MutationAction
async queryLocationList() {
const params = {
factoryCode: session.factoryCode,
loginName: session.loginName,
};
const { values }: any = await http.post(url.auth.locations, params);
const locationList = values.map((value: string) => ({
label: value,
value,
}));
return { locationList };
}
@MutationAction
async lock(params: any) {
const res: any = await http.post(url.sortscan.lock.list, params);
const lockCode = res.code;
return { lockCode };
}
//俄罗斯汇总拣配扫描容器码
@MutationAction
async searchBarcode(barcode: any) {
const res: any = await http.post(url.auth.query.barcode, {
factoryCode: session.factoryCode,
loginName: session.loginName,
barcode,
});
const ContainerCode = res.data;
return { ContainerCode };
}
/**
*
*/
// @Action({ commit: 'clearState' })
@MutationAction
async saveAggregateUpload(params: any) {
const res: any = await http.post(url.sortscan.save.aggregate, params);
console.log('res', res);
const code = res.code;
return { code };
}
/**
*
*/
// @Action({ commit: 'clearState' })
@MutationAction
async saveProOrderResultUpload(dataList: any[]) {
const res: any = await http.post(url.sortscan.save.order, dataList);
const code = res.code;
console.log('code', code);
return { code };
}
@MutationAction
async queryItemLoc(params: any = {}) {
const res: any = await http.post(url.sortscan.save.queryWlByMat, params);
const LocList = [];
res.forEach((item: any) => {
const arr: any = {
label: item.locationCode,
value: item.locationCode + '(' + item.sendSpot + ')' + '(' + item.amount + ')',
};
LocList.push(arr);
});
console.log('res', res);
console.log('LocList', LocList);
return { LocList };
}
/**
*
* @param list
*/
@Action
async unlockProOrderResult(list: any[]) {
try {
await http.post(url.sortscan.unlock.list, list, {
custom: { hideError: true },
} as any);
} catch {
//
}
}
@Action
async unlockAggregateResult(params: any) {
try {
await http.post(url.sortscan.unlock.aggregateList, params);
} catch {
//
}
}
/**
*
* @param list
*/
@Action
async lockProOrderResult(list: any[]) {
await http.post(url.sortscan.lock.list, list);
}
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async queryByFactoryCodeAndWorkAreaCode(content: any) {
const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
return res;
}
//查询拣配明细
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
async querydetaildlist(content: any) {
const res: any = await http.post('/wmspda/sortscan/getJhListSn', content);
this.detailedList = res.list;
console.log(this.detailedList);
return res;
}
}
export default getModule(PickingModule);

@ -0,0 +1,142 @@
<template>
<view class="page-receipt-detail">
<view class="header">
<view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack()" />
</view>
<view class="title">{{ $t('message.Pi_QueryResults') }}</view>
<view class="right"></view>
</view>
<!-- 表格数据 -->
<view class="table-wrapper">
<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 class="bottom-bar">
<div class="container">
<u-row>
<!-- 汇总 -->
<u-col :span="4">
<u-button type="primary" @click="onAggregate">
{{ $t('message.Pi_Summary') }}
</u-button>
</u-col>
<!-- 按单 -->
<u-col :span="4">
<u-button type="success" @click="onOrder">
{{ $t('message.Pi_ByOrder') }}
</u-button>
</u-col>
<!-- 返回 -->
<u-col :span="4">
<u-button type="error" @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>
</u-col>
</u-row>
</div>
</view>
</view>
</template>
<script lang="ts">
import { Component } from 'vue-property-decorator';
import { BasePage } from '@/components/base/page';
import model from './model';
import { resultHeaders } from './config';
@Component
export default class RawReceiptDetail extends BasePage {
model = model;
//
headers = resultHeaders;
index() {
this.toPage(this.page.raw.handover.RUSpicking.index);
}
//
async onOrder() {
// const list = this.model.proOrderResultList;
// await this.model.lockProOrderResult(list);
// await this.model.lock(this.model.proOrderResultList);
this.toPage(this.page.raw.handover.RUSpicking.byorder);
}
//
async onAggregate() {
// const orderOutIdList = this.model.proOrderResultList.map((_: any) => _.orderOutId);
// const params = {
// factoryCode: session.factoryCode,
// loginName: session.loginName,
// orderOutIdList,
// };
// await this.model.queryAggregateList(params);
// if (this.model.aggregateList.length === 0) {
// return;
// }
this.toPage(this.page.raw.handover.RUSpicking.bysummary);
}
}
</script>
<style lang="scss" scoped>
.page-receipt-detail {
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1b45b1 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;
}
}
.table-wrapper {
background-color: #fff;
}
.form {
background-color: #fff;
padding: 40rpx;
border-radius: 10rpx;
}
.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;
}
}
}
</style>

@ -88,6 +88,14 @@ export const page = {
Local: '/pages/raw/handover/picking/Local-details', Local: '/pages/raw/handover/picking/Local-details',
SummaryLocal: '/pages/raw/handover/picking/Summary-details', SummaryLocal: '/pages/raw/handover/picking/Summary-details',
}, },
RUSpicking: {
index: '/pages/raw/handover/RUS-picking/index',
result: '/pages/raw/handover/RUS-picking/result',
bysummary: '/pages/raw/handover/RUS-picking/BySummary',
byorder: '/pages/raw/handover/RUS-picking/ByOrder',
Local: '/pages/raw/handover/RUS-picking/Local-details',
SummaryLocal: '/pages/raw/handover/RUS-picking/Summary-details',
},
feeding: { feeding: {
index: '/pages/raw/handover/feeding/index', index: '/pages/raw/handover/feeding/index',
detail: '/pages/raw/handover/feeding/detail', detail: '/pages/raw/handover/feeding/detail',

Loading…
Cancel
Save