|
|
|
@ -0,0 +1,371 @@
|
|
|
|
|
<template>
|
|
|
|
|
<view class="page-product-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.pickOrder') }}</view>
|
|
|
|
|
<view class="right"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-form class="form" ref="form" label-width="180rpx">
|
|
|
|
|
<!-- 单号 -->
|
|
|
|
|
<view class="single">
|
|
|
|
|
<view class="single-left">
|
|
|
|
|
<view>{{ $t('message.pickno') }}:</view>
|
|
|
|
|
<u-search :placeholder="$t('message.InventoryPleaseScan')" v-model="orderNumber" @search="query" :show-action="false"></u-search>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="single-right">
|
|
|
|
|
<u-button type="primary" @click="query">{{ $t('message.Query') }}</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- dn -->
|
|
|
|
|
<u-form-item :label="$t('message.dn_OddNumbers')">
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.nxOutCode" placeholder="" style="overflow: hidden" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- hangxiangmu -->
|
|
|
|
|
<u-form-item :label="$t('message.Line')">
|
|
|
|
|
<jPicker sureColor="#ff0000" @bindpicker="selectProductCode" showKey="value" valKey="value" :val="productCodeList.value" :options="model.productCodeList" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 物料bianma-->
|
|
|
|
|
<u-form-item :label="$t('message.matcode')">
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.materialCode" placeholder="" style="overflow: hidden" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 物料描述 -->
|
|
|
|
|
<u-form-item :label="$t('message.po_MaterielDes')">
|
|
|
|
|
<u-input :disabled="true" v-model="histroyItem.materialDesc" placeholder="" style="overflow: hidden" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 箱码 -->
|
|
|
|
|
<u-form-item :required="true" :label="$t('message.Box')" prop="boxCode">
|
|
|
|
|
<u-search :placeholder="$t('message.barcode')" v-model.trim="boxCode" @search="onSubmit" :show-action="false"></u-search>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 物料条码 -->
|
|
|
|
|
<u-form-item :required="true" :label="$t('message.product_MaterialCode')" prop="martcode">
|
|
|
|
|
<u-search :placeholder="$t('message.barcode')" v-model.trim="martcode" @search="onSubmitmart" :show-action="false"></u-search>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- sold to/send to -->
|
|
|
|
|
<view class="number">
|
|
|
|
|
<view class="number-left">
|
|
|
|
|
<view class="number-left-title">sold to</view>
|
|
|
|
|
<u-input v-model="histroyItem.soldto" placeholder=" " :type="type" :border="border" class="input" disabled style="padding: '0'" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="number-right">
|
|
|
|
|
<view class="number-right-title">send to</view>
|
|
|
|
|
<u-input v-model="supplierCode" placeholder="" :type="type" :border="border" class="input" disabled style="padding: '0'" />
|
|
|
|
|
<!-- <u-input v-model="allNum" :placeholder="$t('message.po_PleaseInput')" :type="type" :border="border" class="input" disabled /> -->
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 箱子顺序/数量,条码总数 -->
|
|
|
|
|
<view class="number">
|
|
|
|
|
<view class="number-left">
|
|
|
|
|
<view class="number-left-title">{{ $t('message.bosnum') }}</view>
|
|
|
|
|
<u-input v-model="boxjilu" placeholder=" " :type="type" :border="border" class="input" disabled style="padding: '0'" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="number-right">
|
|
|
|
|
<view class="number-right-title">{{ $t('message.dn_Number') }}</view>
|
|
|
|
|
<u-input v-model="barCodeNumber" placeholder="" :type="type" :border="border" class="input" disabled style="padding: '0'" />
|
|
|
|
|
<!-- <u-input v-model="allNum" :placeholder="$t('message.po_PleaseInput')" :type="type" :border="border" class="input" disabled /> -->
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-form>
|
|
|
|
|
|
|
|
|
|
<view class="bottom-bar">
|
|
|
|
|
<u-row class="button-bar">
|
|
|
|
|
<!-- 确定 -->
|
|
|
|
|
<!-- <u-col :span="6">
|
|
|
|
|
<u-button type="primary">{{ $t('message.workArea_Confirm') }}</u-button>
|
|
|
|
|
</u-col> -->
|
|
|
|
|
<!-- 返回 -->
|
|
|
|
|
<u-col :span="12">
|
|
|
|
|
<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 } from 'vue-property-decorator';
|
|
|
|
|
import { BasePage } from '@/components/base/page';
|
|
|
|
|
import jPicker from '@/components/J-Picker/jPicker.vue';
|
|
|
|
|
import model from './model';
|
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
|
@Component({
|
|
|
|
|
components: {
|
|
|
|
|
jPicker,
|
|
|
|
|
},
|
|
|
|
|
})
|
|
|
|
|
export default class productCheckReceipt extends BasePage {
|
|
|
|
|
model = model;
|
|
|
|
|
orderNumber: any = '';
|
|
|
|
|
martcode: any = '';
|
|
|
|
|
boxCode: any = '';
|
|
|
|
|
boxjilu: any = '';
|
|
|
|
|
barCodeNumber: any = null;
|
|
|
|
|
supplierCode: any = null;
|
|
|
|
|
remove: any = {};
|
|
|
|
|
type = 'text';
|
|
|
|
|
border = true;
|
|
|
|
|
matreturndata: any = {};
|
|
|
|
|
async onReady() {
|
|
|
|
|
await this.model.queryLocation();
|
|
|
|
|
this.remove = this.model.WlList[0];
|
|
|
|
|
}
|
|
|
|
|
selectItem(e: any) {
|
|
|
|
|
this.remove = e.pickerName;
|
|
|
|
|
}
|
|
|
|
|
orderNo: any = '';
|
|
|
|
|
productCodeList: any = {};
|
|
|
|
|
boxreturndata: any = {};
|
|
|
|
|
async query() {
|
|
|
|
|
if (this.orderNumber == '' || this.orderNumber.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.shurupickno') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await this.model.queryOrderNo(this.orderNumber);
|
|
|
|
|
this.productCodeList = this.model.productCodeList[0];
|
|
|
|
|
this.histroyItem = this.model.orderNoItemList[0];
|
|
|
|
|
}
|
|
|
|
|
histroyItem: any = {};
|
|
|
|
|
selectProductCode(e: any) {
|
|
|
|
|
this.model.productCodeList.forEach((item: any) => {
|
|
|
|
|
if (item.rowItem == e.pickerName.value) {
|
|
|
|
|
this.histroyItem = item;
|
|
|
|
|
this.productCodeList = item;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
barcode: any = '';
|
|
|
|
|
async onSubmit() {
|
|
|
|
|
if (this.orderNumber == '' || this.orderNumber.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.shurupickno') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!this.histroyItem.materialDesc) {
|
|
|
|
|
this.customToast(this.$t('message.pselctrowitem') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.boxCode == '' || this.boxCode.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.boxnoscan') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let params = {
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
factoryCode: session.factoryCode,
|
|
|
|
|
orderNumber: this.orderNumber,
|
|
|
|
|
nxOutCode: this.histroyItem.nxOutCode,
|
|
|
|
|
rowItem: this.productCodeList.value,
|
|
|
|
|
boxCode: this.boxCode,
|
|
|
|
|
materialCode: this.histroyItem.materialCode,
|
|
|
|
|
};
|
|
|
|
|
await this.model.OnSubmit(params);
|
|
|
|
|
if (this.model.SubmitCode == '1') {
|
|
|
|
|
this.customToast(this.$t('message.Warehouse_Tip9') as string);
|
|
|
|
|
this.boxreturndata = this.model.boxreturndata;
|
|
|
|
|
console.log('123', this.boxreturndata);
|
|
|
|
|
let findvalue = this.boxreturndata.filter((item) => {
|
|
|
|
|
//debugger;
|
|
|
|
|
// console.log('aaa',this.orderNumber);
|
|
|
|
|
// console.log('aaa',this.productCodeList.value);
|
|
|
|
|
// console.log('aaa',this.histroyItem.materialCode);
|
|
|
|
|
// console.log('aaa',this.boxCode);
|
|
|
|
|
return item.orderNumber == this.orderNumber && item.rowItem == this.productCodeList.value && item.materialCode == this.histroyItem.materialCode && item.boxCode == this.boxCode;
|
|
|
|
|
});
|
|
|
|
|
console.log('456', findvalue);
|
|
|
|
|
this.boxjilu = findvalue[0].boxOrder + '/' + findvalue[0].boxNumber;
|
|
|
|
|
this.barCodeNumber = findvalue[0].barCodeNumber;
|
|
|
|
|
this.supplierCode = findvalue[0].supplierCode;
|
|
|
|
|
//this.boxjilu = this.boxreturndata.boxOrder + '/' + this.boxreturndata.boxNumber;
|
|
|
|
|
//this.boxCode = '';
|
|
|
|
|
|
|
|
|
|
// this.histroyItem = {};
|
|
|
|
|
// this.productCodeList = {};
|
|
|
|
|
// this.model.empty();
|
|
|
|
|
// await this.query();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
async onSubmitmart() {
|
|
|
|
|
if (this.orderNumber == '' || this.orderNumber.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.shurupickno') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (!this.histroyItem.materialDesc) {
|
|
|
|
|
this.customToast(this.$t('message.pselctrowitem') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.boxCode == '' || this.boxCode.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.boxnoscan') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.martcode == '' || this.martcode.length == 0) {
|
|
|
|
|
this.customToast(this.$t('message.matscan') as string);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let params = {
|
|
|
|
|
loginName: session.loginName,
|
|
|
|
|
factoryCode: session.factoryCode,
|
|
|
|
|
nxOutCode: this.histroyItem.nxOutCode,
|
|
|
|
|
orderNumber: this.orderNumber,
|
|
|
|
|
rowItem: this.productCodeList.value,
|
|
|
|
|
boxCode: this.boxCode,
|
|
|
|
|
materialCode: this.histroyItem.materialCode,
|
|
|
|
|
materialDesc: this.histroyItem.materialDesc,
|
|
|
|
|
barCode: this.martcode,
|
|
|
|
|
barCodeNumber: this.barCodeNumber,
|
|
|
|
|
};
|
|
|
|
|
await this.model.OnSubmitmart(params);
|
|
|
|
|
if (this.model.SubmitCode == '1') {
|
|
|
|
|
this.customToast(this.$t('message.Warehouse_Tip9') as string);
|
|
|
|
|
this.matreturndata = this.model.matreturndata;
|
|
|
|
|
let matfindvalue = this.matreturndata.filter((item) => {
|
|
|
|
|
return item.orderNumber == this.orderNumber && item.rowItem == this.productCodeList.value && item.materialCode == this.histroyItem.materialCode && item.boxCode == this.boxCode;
|
|
|
|
|
});
|
|
|
|
|
this.barCodeNumber = matfindvalue[0].barCodeNumber;
|
|
|
|
|
//this.boxCode = '';
|
|
|
|
|
this.martcode = '';
|
|
|
|
|
// this.histroyItem = {};
|
|
|
|
|
// this.productCodeList = {};
|
|
|
|
|
// this.model.empty();
|
|
|
|
|
// await this.query();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.page-product-receipt {
|
|
|
|
|
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
|
|
|
|
background-size: 100% 600rpx;
|
|
|
|
|
padding: 118rpx 30rpx 162rpx;
|
|
|
|
|
min-height: 100%;
|
|
|
|
|
|
|
|
|
|
.header {
|
|
|
|
|
position: fixed;
|
|
|
|
|
top: 36rpx;
|
|
|
|
|
left: 0;
|
|
|
|
|
right: 0;
|
|
|
|
|
z-index: 99;
|
|
|
|
|
display: flex;
|
|
|
|
|
height: 88rpx;
|
|
|
|
|
line-height: 88rpx;
|
|
|
|
|
color: #fff;
|
|
|
|
|
font-size: 34rpx;
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
|
|
.title {
|
|
|
|
|
flex: 3;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.left,
|
|
|
|
|
.right {
|
|
|
|
|
flex: 1;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.icon {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
align-items: center;
|
|
|
|
|
width: 88rpx;
|
|
|
|
|
height: 88rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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: 280rpx;
|
|
|
|
|
height: 64rpx;
|
|
|
|
|
background: rgb(242, 242, 242);
|
|
|
|
|
border-radius: 110rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.single {
|
|
|
|
|
width: 100%;
|
|
|
|
|
height: 100rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
.single-left {
|
|
|
|
|
width: 80%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
view {
|
|
|
|
|
width: 170rpx;
|
|
|
|
|
height: 100%;
|
|
|
|
|
line-height: 100rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.single-right {
|
|
|
|
|
button {
|
|
|
|
|
margin-top: 15rpx;
|
|
|
|
|
width: 140rpx;
|
|
|
|
|
height: 70rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.number {
|
|
|
|
|
height: 100rpx;
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
.number-left {
|
|
|
|
|
width: 45%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
.number-left-title {
|
|
|
|
|
width: 160rpx;
|
|
|
|
|
height: 100%;
|
|
|
|
|
line-height: 100rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.input {
|
|
|
|
|
width: 200rpx;
|
|
|
|
|
height: 70rpx;
|
|
|
|
|
margin-top: 15rpx;
|
|
|
|
|
margin-left: 15rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.number-right {
|
|
|
|
|
width: 55%;
|
|
|
|
|
height: 100%;
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
|
|
.number-right-title {
|
|
|
|
|
width: 140rpx;
|
|
|
|
|
height: 100%;
|
|
|
|
|
//text-align: center;
|
|
|
|
|
line-height: 100rpx;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.input {
|
|
|
|
|
width: 200rpx;
|
|
|
|
|
height: 70rpx;
|
|
|
|
|
margin-top: 15rpx;
|
|
|
|
|
margin-left: 15rpx;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</style>
|