cosmoim-852 fix 新增俄罗斯退料
parent
952bb42ecb
commit
a726f886d0
@ -0,0 +1,195 @@
|
||||
<template>
|
||||
<view class="page-raw-returning">
|
||||
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
|
||||
<view class="left">
|
||||
<u-icon class="icon" name="arrow-left" @click="back" />
|
||||
</view>
|
||||
<view class="title">{{ $t('message.screen') }}</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<view>
|
||||
<u-form-item :label="$t('message.Warehouse_No')" prop="prdOrder" style="background: white; border-radius: 5px">
|
||||
<u-search :placeholder="$t('message.po_PleaseInput')" v-model.trim="prdOrderFuzzy" :show-action="false"> </u-search>
|
||||
</u-form-item>
|
||||
</view>
|
||||
<!-- 开始时间 -->
|
||||
<view style="display: flex; padding-top: 3px">
|
||||
<u-field style="background: white; border-radius: 10rpx" v-model="startMobile" :placeholder="$t('message.starttime')" :label="$t('message.start')"> </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>
|
||||
<!-- 结束时间 -->
|
||||
<view style="display: flex; margin-top: 20rpx">
|
||||
<u-field style="background: white; border-radius: 10rpx" v-model="endMobile" :placeholder="$t('message.endtime')" :label="$t('message.end')"> </u-field>
|
||||
<u-picker :confirm-text="$t('message.product_Confirm')" :cancel-text="$t('message.product_Cancel')" v-model="endShow" :params="endParams" mode="time" @confirm="endConfirm"></u-picker>
|
||||
<u-button @click="endShow = true" type="primary">{{ $t('message.workArea_Selelct') }}</u-button>
|
||||
</view>
|
||||
<!-- 表格 -->
|
||||
<view class="table-wrapper" style="margin-top: 10rpx">
|
||||
<wyb-table class="table" ref="table" width="100%" enable-check="single" checkType="single" show-left-and-right-border :headers="headers" :contents="OddList" :show-vert-border="false" @onCheck="onCheck"> </wyb-table>
|
||||
</view>
|
||||
<view class="bottom-bar">
|
||||
<u-row class="button-bar">
|
||||
<u-col :span="6">
|
||||
<u-button type="primary" @click="onSubmit">{{ $t('message.Query') }}</u-button>
|
||||
</u-col>
|
||||
<u-col :span="6">
|
||||
<u-button type="error" @click="back">{{ $t('message.workArea_Confirm') }}</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 model from './model';
|
||||
import { headers } from './config';
|
||||
@Component({
|
||||
components: {},
|
||||
})
|
||||
export default class returningDom extends BasePage {
|
||||
model = model;
|
||||
startShow = false;
|
||||
endShow = false;
|
||||
startMobile = '';
|
||||
endMobile = '';
|
||||
materialList = [];
|
||||
OddList: any = [];
|
||||
prdOrderFuzzy: any = '';
|
||||
data: any = {
|
||||
label: '',
|
||||
value: '',
|
||||
amount: 0,
|
||||
sendSpot: '',
|
||||
};
|
||||
|
||||
startParams = {
|
||||
year: true,
|
||||
month: true,
|
||||
day: true,
|
||||
hour: false,
|
||||
minute: false,
|
||||
second: false,
|
||||
};
|
||||
endParams = {
|
||||
year: true,
|
||||
month: true,
|
||||
day: true,
|
||||
hour: false,
|
||||
minute: false,
|
||||
second: false,
|
||||
};
|
||||
headers = headers;
|
||||
startConfirm(startParams: any) {
|
||||
this.startMobile = startParams.year + '-' + startParams.month + '-' + startParams.day;
|
||||
}
|
||||
endConfirm(endParams: any) {
|
||||
this.endMobile = endParams.year + '-' + endParams.month + '-' + endParams.day;
|
||||
}
|
||||
onCheck(e: any) {
|
||||
console.log('eeeee', e.data[0].lineData);
|
||||
this.data = e.data[0].lineData;
|
||||
}
|
||||
back() {
|
||||
if (this.data.label == '' || this.data.label == null) {
|
||||
this.redirectTo(this.page.raw.handover.returning.index);
|
||||
} else {
|
||||
uni.setStorageSync('data', JSON.stringify(this.data));
|
||||
this.redirectTo(this.page.raw.handover.returning.index);
|
||||
}
|
||||
}
|
||||
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;
|
||||
}
|
||||
async onReady() {
|
||||
this.startMobile = this.getNowFormatDate();
|
||||
this.endMobile = this.getNowFormatDate();
|
||||
if (!uni.getStorageSync('prdOrderFuzzy')) {
|
||||
await this.onSubmit();
|
||||
} else {
|
||||
let proorder = uni.getStorageSync('prdOrderFuzzy') as any;
|
||||
this.prdOrderFuzzy = JSON.parse(proorder);
|
||||
uni.removeStorageSync('prdOrderFuzzy');
|
||||
await this.onSubmit();
|
||||
}
|
||||
}
|
||||
async onSubmit() {
|
||||
if (this.startMobile == '' || this.endMobile == '') {
|
||||
this.customToast(this.$t('message.time') as string);
|
||||
return;
|
||||
}
|
||||
let time = {
|
||||
requireDateMin: this.startMobile,
|
||||
requireDateMax: this.endMobile,
|
||||
prdOrderFuzzy: this.prdOrderFuzzy,
|
||||
};
|
||||
await this.model.queryTimeInInfo(time);
|
||||
this.OddList = model.materielList;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page-raw-returning {
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
||||
.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,41 @@
|
||||
/**
|
||||
* 看单明细表格列
|
||||
*/
|
||||
import vm from '@/main';
|
||||
export const headers = [
|
||||
{
|
||||
label: vm.$t('message.InventoryOrderNo'),
|
||||
key: 'label',
|
||||
width: 330,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.InventoryMaterielNo'),
|
||||
key: 'value',
|
||||
width: 330,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.receiveAStation'),
|
||||
key: 'sendSpot',
|
||||
width: 216,
|
||||
},
|
||||
];
|
||||
export const RUSdetailHeader = [
|
||||
{
|
||||
label: vm.$t('message.po_MaterielNo'),
|
||||
key: 'materialCode',
|
||||
width: 260,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.CommissionedLocation'),
|
||||
key: 'wlCode',
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.dn_Number'),
|
||||
key: 'amount',
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.Container'),
|
||||
key: 'barcode',
|
||||
width: 700,
|
||||
},
|
||||
];
|
||||
@ -0,0 +1,376 @@
|
||||
<template>
|
||||
<view class="page-raw-returning">
|
||||
<view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
|
||||
<view class="left">
|
||||
<u-icon class="icon" name="arrow-left" @click="back" />
|
||||
</view>
|
||||
<view class="title">{{ $t('message.ReturnedMaterials') }}</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<u-form class="form" ref="form" :model="form" :error-type="['toast']" label-width="150rpx">
|
||||
<!-- 订单号 -->
|
||||
<u-form-item :required="true" :label="$t('message.Pi_OrderNo')" prop="prdOrder">
|
||||
<u-search :placeholder="$t('message.po_PleaseInput')" v-model.trim="form.prdOrder" @search="query" :show-action="false"></u-search>
|
||||
<u-button size="mini" style="margin-left: 10rpx" type="primary" @click="query">{{ $t('message.Query') }} </u-button>
|
||||
</u-form-item>
|
||||
<!-- 物料号 -->
|
||||
<u-form-item :required="true" :label="$t('message.Pi_materielNo')" prop="materialCode">
|
||||
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="materialConfirm" showKey="value" valKey="value" :val="materieCode.value" class="search" :options="model.materielList" />
|
||||
</u-form-item>
|
||||
<!-- 工位 -->
|
||||
<u-form-item :label="$t('message.Pi_Station')">
|
||||
<u-input v-model="form.sendSpot" disabled placeholder=" " />
|
||||
</u-form-item>
|
||||
<!-- 库存 -->
|
||||
<view class="newly">
|
||||
<u-form-item :label="$t('message.Pi_factory')" style="width: 50%">
|
||||
<u-input style="flex: 0.9" v-model="form.sapFactoryCode" placeholder=" " :disabled="true" />
|
||||
</u-form-item>
|
||||
<u-col :span="6">
|
||||
<u-form-item :label="$t('message.Summary_Number')" prop="sapFactoryCode">
|
||||
<u-input style="flex: 0.9" :disabled="true" v-model="form.totalAmount" placeholder="" />
|
||||
</u-form-item>
|
||||
</u-col>
|
||||
</view>
|
||||
<!-- 容器编码 -->
|
||||
<view class="single">
|
||||
<view class="single-left">
|
||||
<view>{{ $t('message.Container') }}:</view>
|
||||
<u-search :placeholder="$t('message.PleaseScan')" style="z-index: 10000" v-model="Barcode" @search="searchBarcode" :show-action="false"></u-search>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 添加 -->
|
||||
<view class="add">
|
||||
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
|
||||
</view>
|
||||
<!-- 工厂 -->
|
||||
<u-row gutter="0">
|
||||
<u-form-item :label="$t('message.product_Location')" style="width: 50%; margin-top: 16rpx">
|
||||
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode.value" class="search" :options="Location" />
|
||||
</u-form-item>
|
||||
<u-col :span="6">
|
||||
<u-form-item :required="true" :label="$t('message.the')" prop="amount" label-width="80rpx">
|
||||
<u-input v-model="qty" :border="border" type="number" :placeholder="$t('message.po_PleaseInput')" style="margin-left: 12px" />
|
||||
</u-form-item>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</u-form>
|
||||
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="RUSdetailHeader" :contents="LocationList" :show-vert-border="false" @onCellClick="deleteItem($event)"></wyb-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>
|
||||
<u-form ref="form2" :error-type="['toast']" style="background: rgb(255, 255, 255)">
|
||||
<u-row class="bottom-info">
|
||||
<u-col :span="6">
|
||||
<u-form-item :label="$t('message.Summary_Receiver')" label-width="120rpx">
|
||||
<u-input v-model="operator" :border="border" :placeholder="$t('message.po_PleaseInput')" />
|
||||
</u-form-item>
|
||||
</u-col>
|
||||
<u-col :span="6">
|
||||
<u-form-item :label="$t('message.Summary_Password')">
|
||||
<u-input v-model="rfPwd" :border="border" type="password" :placeholder="$t('message.po_PleaseInput')" />
|
||||
</u-form-item>
|
||||
</u-col>
|
||||
</u-row>
|
||||
</u-form>
|
||||
<u-row class="button-bar">
|
||||
<u-col :span="6">
|
||||
<u-button type="primary" @click="onSubmit">{{ $t('message.po_Submit') }}</u-button>
|
||||
</u-col>
|
||||
<u-col :span="6">
|
||||
<u-button type="error" @click="back">{{ $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 model from './model';
|
||||
import jPicker from '@/components/J-Picker/jPicker.vue';
|
||||
import { session } from '@/store/modules/session';
|
||||
import { RUSdetailHeader } from './config';
|
||||
@Component({
|
||||
components: {
|
||||
jPicker,
|
||||
},
|
||||
})
|
||||
export default class returningDom extends BasePage {
|
||||
model = model;
|
||||
border = true;
|
||||
RUSdetailHeader = RUSdetailHeader;
|
||||
rfPwd: any = '';
|
||||
operator: any = '';
|
||||
form: any = {};
|
||||
Barcode: any = '';
|
||||
qty: any = '';
|
||||
prdOrder: any = [];
|
||||
wlCode: any = '';
|
||||
LocationList: any = [];
|
||||
materieCode: any = '';
|
||||
Container: any = {};
|
||||
Location: any = [];
|
||||
checkindex = 0;
|
||||
async onReady() {
|
||||
this.operator = session.loginName;
|
||||
this.rfPwd = session.password;
|
||||
}
|
||||
async query() {
|
||||
if (this.form.prdOrder == null || this.form.prdOrder.length == 0) {
|
||||
this.customToast(this.$t('message.borrow_Tip') as string);
|
||||
return;
|
||||
}
|
||||
await this.model.queryOrderInInfo(this.form.prdOrder);
|
||||
this.form = this.model.materielList[0];
|
||||
this.materieCode = this.model.materielList[0];
|
||||
}
|
||||
LocationChoice(e: any) {
|
||||
this.wlCode = e.pickerName;
|
||||
this.form.wkposCode = e.pickerName.sendSpot;
|
||||
}
|
||||
back() {
|
||||
this.model.materielList.length = 0;
|
||||
uni.navigateBack({ delta: 1 });
|
||||
}
|
||||
materialConfirm(v: any) {
|
||||
this.materieCode = v.pickerName;
|
||||
this.form = this.model.materielList[v.pickerVal];
|
||||
this.checkindex = v.pickerVal;
|
||||
}
|
||||
async searchBarcode() {
|
||||
if (this.Barcode == '') {
|
||||
this.customToast(this.$t('message.barcode') 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.amount);
|
||||
}
|
||||
});
|
||||
}
|
||||
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 (parseFloat(this.qty) > parseFloat(this.form.totalAmount)) {
|
||||
this.customToast(this.$t('message.return_Tip4') as string);
|
||||
return;
|
||||
}
|
||||
if (this.Container == '' || this.Container.barcode.length == 0) {
|
||||
this.customToast(this.$t('message.scanningContainer') as string);
|
||||
return;
|
||||
}
|
||||
if (this.form == {}) {
|
||||
this.customToast(this.$t('message.AppendMateriel5') as string);
|
||||
return;
|
||||
}
|
||||
let CodeNum = 0;
|
||||
if (this.LocationList.length != 0) {
|
||||
this.LocationList.forEach((item: any) => {
|
||||
if (item.barcode == this.Container.barcode) {
|
||||
CodeNum += parseFloat(item.amount);
|
||||
}
|
||||
});
|
||||
}
|
||||
if (this.Container.cpRef4 == null) {
|
||||
if (parseFloat(this.qty) > parseFloat(this.Container.qty) - CodeNum) {
|
||||
this.customToast(this.$t('message.Commission_tips4') as string);
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
if (parseFloat(this.qty) > parseFloat(this.Container.qty) - CodeNum - parseFloat(this.Container.cpRef4)) {
|
||||
this.customToast(this.$t('message.Commission_tips4') as string);
|
||||
return;
|
||||
}
|
||||
}
|
||||
this.LocationList.push(JSON.parse(JSON.stringify(this.form)));
|
||||
this.LocationList[this.LocationList.length - 1].amount = this.qty;
|
||||
this.LocationList[this.LocationList.length - 1].barcode = this.Container.barcode;
|
||||
this.LocationList[this.LocationList.length - 1].wlCode = this.wlCode.label;
|
||||
this.LocationList[this.LocationList.length - 1].operator = this.operator;
|
||||
this.LocationList[this.LocationList.length - 1].rfPwd = this.rfPwd;
|
||||
this.LocationList[this.LocationList.length - 1].loginName = this.operator;
|
||||
this.LocationList[this.LocationList.length - 1].operatorPass = this.operator;
|
||||
this.LocationList[this.LocationList.length - 1].wkposCode = this.wlCode.label;
|
||||
this.model.materielList[this.checkindex].totalAmount = this.accSubtract(this.LocationList[this.LocationList.length - 1].totalAmount, this.qty);
|
||||
}
|
||||
deleteItem(e: any) {
|
||||
uni.showModal({
|
||||
content: this.$t('message.product_Delete') as string,
|
||||
cancelText: this.$t('message.Cancel') as string,
|
||||
confirmText: this.$t('message.workArea_Confirm') as string,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.model.materielList.forEach((item: any) => {
|
||||
if (e.lineData.materialCode == item.materialCode) {
|
||||
item.totalAmount = parseFloat(item.totalAmount) + parseFloat(e.lineData.amount);
|
||||
}
|
||||
});
|
||||
this.LocationList.splice(e.contentIndex, 1);
|
||||
} else if (res.cancel) {
|
||||
return;
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
async onSubmit() {
|
||||
if (this.LocationList.length == 0) {
|
||||
this.customToast(this.$t('message.Pi_NoData') as string);
|
||||
return;
|
||||
}
|
||||
this.LocationList.forEach((item: any) => {
|
||||
if (item.operator != session.loginName) {
|
||||
this.customToast(this.$t('message.returner') as string);
|
||||
return;
|
||||
}
|
||||
});
|
||||
await this.model.tluSubmit(this.LocationList);
|
||||
this.model.materielList.length = 0;
|
||||
this.empty();
|
||||
}
|
||||
async empty() {
|
||||
this.form.materialCode = '';
|
||||
this.form.sendSpot = '';
|
||||
this.form.amount = '';
|
||||
this.LocationList = [];
|
||||
this.Barcode = '';
|
||||
this.Container = '';
|
||||
this.qty = '';
|
||||
this.materieCode = '';
|
||||
this.wlCode = '';
|
||||
this.checkindex = 0;
|
||||
this.Location = [];
|
||||
await this.query();
|
||||
}
|
||||
accSubtract(num1: any, num2: any) {
|
||||
const num1Digits = (num1.toString().split('.')[1] || '').length;
|
||||
const num2Digits = (num2.toString().split('.')[1] || '').length;
|
||||
const baseNum = Math.pow(10, Math.max(num1Digits, num2Digits));
|
||||
return (Math.round(num1 * baseNum) - Math.round(num2 * baseNum)) / baseNum;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-raw-returning {
|
||||
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
||||
background-size: 100% 600rpx;
|
||||
padding: 118rpx 30rpx 162rpx;
|
||||
min-height: 100%;
|
||||
.single {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
.single-left {
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
view {
|
||||
width: 110rpx;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
z-index: 10000;
|
||||
}
|
||||
}
|
||||
.single-right {
|
||||
button {
|
||||
margin-top: 15rpx;
|
||||
width: 150rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.add {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
position: absolute;
|
||||
background-color: white;
|
||||
top: 350px;
|
||||
left: 0;
|
||||
button {
|
||||
position: absolute;
|
||||
top: 3rpx;
|
||||
right: 35rpx;
|
||||
z-index: 10000;
|
||||
}
|
||||
}
|
||||
.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;
|
||||
}
|
||||
|
||||
.newly {
|
||||
display: flex;
|
||||
}
|
||||
}
|
||||
|
||||
.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;
|
||||
padding-top: 0;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,124 @@
|
||||
import { Action, getModule, Module, MutationAction, VuexModule } from 'vuex-module-decorators';
|
||||
import store from '@/store';
|
||||
import http from '@/utils/request';
|
||||
import { url } from '@/utils/url';
|
||||
import { auth } from '@/store/modules/auth';
|
||||
import { session } from '@/store/modules/session';
|
||||
|
||||
class OrderInInfo {
|
||||
amount?: any;
|
||||
sapFactoryCode?: any;
|
||||
materialCode?: any;
|
||||
sendSpot?: any;
|
||||
totalBackAmount?: any;
|
||||
}
|
||||
|
||||
@Module({
|
||||
namespaced: true,
|
||||
dynamic: true,
|
||||
store,
|
||||
name: 'raw.handover.RUSreturning',
|
||||
})
|
||||
export class ReturningModule extends VuexModule {
|
||||
materielList: any[] = [];
|
||||
// 容器码
|
||||
ContainerCode: any = '';
|
||||
/**
|
||||
* 订单号查询结果
|
||||
*/
|
||||
orderInInfo: OrderInInfo = new OrderInInfo();
|
||||
/**
|
||||
* 查询订单号
|
||||
* @param orderNo
|
||||
*/
|
||||
@MutationAction
|
||||
async queryOrderInInfo(prdOrderFrom: string) {
|
||||
this.materielList = [];
|
||||
const { data }: any = await http.post(url.material.prdOrder.info, {
|
||||
prdOrderFrom,
|
||||
page: '1',
|
||||
rows: '50',
|
||||
loginName: session.loginName,
|
||||
});
|
||||
const materielList = data.map((item: any) => ({
|
||||
...item,
|
||||
label: item.materialCode,
|
||||
value: item.materialCode,
|
||||
totalAmount: item.amount,
|
||||
}));
|
||||
const orderInInfo = data[0] || {};
|
||||
return { orderInInfo, materielList };
|
||||
}
|
||||
//根据时间查询单号列表
|
||||
@MutationAction
|
||||
async queryTimeInInfo(time: any) {
|
||||
this.materielList = [];
|
||||
const { data }: any = await http.post(url.material.prdOrder.info, {
|
||||
requireDateMin: time.requireDateMin,
|
||||
requireDateMax: time.requireDateMax,
|
||||
page: '1',
|
||||
rows: '50',
|
||||
loginName: session.loginName,
|
||||
prdOrderFuzzy: time.prdOrderFuzzy,
|
||||
});
|
||||
console.log('qqqqqqqqq', data);
|
||||
const materielList = data.map((item: any) => ({
|
||||
label: item.prdOrder,
|
||||
value: item.materialCode,
|
||||
amount: item.amount,
|
||||
wkposCode: item.wkposCode,
|
||||
sendSpot: item.sendSpot,
|
||||
totalBackAmount: item.totalBackAmount,
|
||||
}));
|
||||
const orderInInfo = data[0] || {};
|
||||
return { orderInInfo, materielList };
|
||||
}
|
||||
/**
|
||||
* 获取默认的工厂
|
||||
*/
|
||||
@Action
|
||||
async queryDefaultFactoryCode() {
|
||||
const values: any = await http.post(url.auth.factory.sap, {
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
});
|
||||
return values[0];
|
||||
}
|
||||
|
||||
/**
|
||||
* 退料上传
|
||||
*/
|
||||
@Action
|
||||
async tluSubmit(params: any) {
|
||||
console.log(params);
|
||||
await auth.checkPassword({
|
||||
factoryCode: session.factoryCode as string,
|
||||
loginName: params[0].operator,
|
||||
rfPwd: params[0].rfPwd,
|
||||
});
|
||||
await http.post(url.tl.uRussia, params);
|
||||
uni.showToast({
|
||||
//icon: "success",
|
||||
title: 'success',
|
||||
duration: 2000,
|
||||
image: '/static/icons/icon-51.png',
|
||||
});
|
||||
}
|
||||
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||
async queryByFactoryCodeAndWorkAreaCode(content: any) {
|
||||
const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
|
||||
return res;
|
||||
}
|
||||
@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 };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(ReturningModule);
|
||||
@ -0,0 +1,113 @@
|
||||
<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="poNo" placeholder="" class="Transfer" />
|
||||
<u-button type="primary" style="height: 60rpx; margin-left: 20rpx" @click="generate">{{ $t('message.Query') }}</u-button>
|
||||
</u-form-item>
|
||||
</u-form>
|
||||
<view class="table-wrapper">
|
||||
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="headers" :contents="model.detailedList" :show-vert-border="false"></wyb-table>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { Component } from 'vue-property-decorator';
|
||||
import { BasePage } from '@/components/base/page';
|
||||
import { headers } from './config';
|
||||
import model from './model';
|
||||
import { session } from '@/store/modules/session';
|
||||
|
||||
@Component
|
||||
export default class RawReceiptDetail extends BasePage {
|
||||
model = model;
|
||||
headers = headers;
|
||||
poNo: any = '';
|
||||
async generate() {
|
||||
if (this.poNo == '') {
|
||||
this.customToast(this.$t('message._tips6') as any);
|
||||
return;
|
||||
}
|
||||
let content = {
|
||||
loginName: session.loginName,
|
||||
poNo: this.poNo,
|
||||
factoryCode: session.factoryCode,
|
||||
};
|
||||
await this.model.querydetaildlist(content);
|
||||
}
|
||||
// go() {
|
||||
// this.toPage(this.page.raw.ingoods.dnReturnGoods.location);
|
||||
// }
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.page-receipt-detail {
|
||||
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
||||
background-size: 100% 600rpx;
|
||||
padding: 30rpx;
|
||||
min-height: 100%;
|
||||
padding-top: 118rpx;
|
||||
padding-bottom: 162rpx;
|
||||
|
||||
.header {
|
||||
position: fixed;
|
||||
top: 36rpx;
|
||||
left: 0;
|
||||
right: 0;
|
||||
display: flex;
|
||||
height: 88rpx;
|
||||
line-height: 88rpx;
|
||||
color: #fff;
|
||||
font-size: 34rpx;
|
||||
font-weight: 500;
|
||||
text-align: center;
|
||||
.title {
|
||||
flex: 3;
|
||||
}
|
||||
.left,
|
||||
.right {
|
||||
flex: 1;
|
||||
}
|
||||
.icon {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 88rpx;
|
||||
height: 88rpx;
|
||||
}
|
||||
}
|
||||
.form {
|
||||
background-color: #fff;
|
||||
// padding: 40rpx;
|
||||
border-radius: 10rpx;
|
||||
box-shadow: 0 0 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
|
||||
.u-form-item {
|
||||
// padding: 30rpx 0;
|
||||
line-height: 35rpx;
|
||||
.Transfer {
|
||||
width: 180rpx;
|
||||
height: 64rpx;
|
||||
background: rgb(242, 242, 242);
|
||||
border-radius: 110rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.table-wrapper {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.form {
|
||||
background-color: #fff;
|
||||
// padding: 40rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,636 @@
|
||||
<template>
|
||||
<view class="page-picking-order">
|
||||
<view class="header">
|
||||
<view class="left">
|
||||
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({ delta: 1 })" />
|
||||
</view>
|
||||
<view class="title">{{ $t('message.rawMenu_ReturnGoods') }}</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<!-- 单号 -->
|
||||
<view class="single">
|
||||
<view class="single-left">
|
||||
<view>{{ $t('message.InventoryOrderNo') }}:</view>
|
||||
<u-search :placeholder="$t('message.InventoryPleaseScan')" v-model="form.documentNo" @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>
|
||||
<!-- 物料 -->
|
||||
<view class="material">
|
||||
<view class="material-left">
|
||||
<view>{{ $t('message.CommissionedMaterielNo') }}:</view>
|
||||
<jPicker sureColor="#ff0000" style="width: 260rpx" @bindpicker="materialChoice" showKey="value" valKey="value" :val="wl.value" class="search" :options="materialList" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 物料描述 -->
|
||||
<view class="material">
|
||||
<view class="material-right">
|
||||
<view class="material-right-title">{{ $t('message.CommissionedMaterielDesc') }}:</view>
|
||||
<view class="material-right-code" style="overflow: hidden">{{ some.materialDesc }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 应退数量 -->
|
||||
<view class="material">
|
||||
<view class="material-right">
|
||||
<view class="material-right-title" style="width: 260rpx">{{ $t('message.returneds') }}:</view>
|
||||
<view class="material-right-code" style="overflow: hidden">{{ some.poAmount }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 订单类型 -->
|
||||
<view class="material">
|
||||
<view class="material-right">
|
||||
<view class="material-right-title">{{ $t('message.po_OrderType') }}:</view>
|
||||
<view class="material-right-code" style="overflow: hidden">{{ some.poType }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 供应商 -->
|
||||
<view class="material">
|
||||
<view class="material-right">
|
||||
<view class="material-right-title">{{ $t('message.po_Supplier') }}:</view>
|
||||
<view class="material-right-code" style="overflow: hidden">{{ some.supplyCode }}</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 列表展示数据 -->
|
||||
<view class="number">
|
||||
<!-- 库存地点 -->
|
||||
<view class="number-left">
|
||||
<view class="number-left-title">{{ $t('message.po_Location') }}:</view>
|
||||
<u-input v-model="some.wlCode" placeholder=" " :type="type" :border="border" class="input" disabled style="padding: '0'" />
|
||||
</view>
|
||||
<!-- 累计 -->
|
||||
<view class="number-right">
|
||||
<view class="number-right-title">{{ $t('message.total') }}:</view>
|
||||
<u-input placeholder=" " v-model="some.receiptAmount" :type="type" :border="border" class="input" style="padding: '0'" disabled />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 库位 -->
|
||||
<view class="library">
|
||||
<!-- 库位 -->
|
||||
<view class="library-left">
|
||||
<view style="text-align: left">{{ $t('message.CommissionedLocation') }}:</view>
|
||||
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode.value" class="search" :options="Location" />
|
||||
</view>
|
||||
<!-- 本次 -->
|
||||
<view class="library-right">
|
||||
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}:</view>
|
||||
<u-input :placeholder="$t('message.po_PleaseInput')" v-model="qty" type="number" :border="border" class="input" />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 添加 -->
|
||||
<view class="add">
|
||||
<u-button type="primary" @click="Add">{{ $t('message.product_add') }}</u-button>
|
||||
</view>
|
||||
<!-- 表格 -->
|
||||
<wyb-table class="table" ref="table" width="100%" show-left-and-right-border :headers="headers" :contents="LocationList" :show-vert-border="false" @onCellClick="deleteItem($event)"></wyb-table>
|
||||
</view>
|
||||
<view class="bottom-bar">
|
||||
<div class="extra">
|
||||
<u-form ref="form" :model="form" :error-type="['toast']">
|
||||
<u-row class="bottom-info"> </u-row>
|
||||
</u-form>
|
||||
</div>
|
||||
<div class="container">
|
||||
<u-row>
|
||||
<!-- 明细 -->
|
||||
<u-col :span="4">
|
||||
<u-button type="primary" class="appoint" @click="appoint">{{ $t('message.detailed') }}</u-button>
|
||||
</u-col>
|
||||
<!-- 提交 -->
|
||||
<u-col :span="4">
|
||||
<u-button type="success" @click="onSubmit">
|
||||
{{ $t('message.po_Submit') }}
|
||||
</u-button>
|
||||
</u-col>
|
||||
<!-- 返回 -->
|
||||
<u-col :span="4">
|
||||
<u-button type="error" @click="onUpload">
|
||||
{{ $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 { session } from '@/store/modules/session';
|
||||
import { VForm, VFormRules } from 'vue/types/form';
|
||||
import jPicker from '@/components/J-Picker/jPicker.vue';
|
||||
import { headers } from './config';
|
||||
@Component({
|
||||
components: {
|
||||
jPicker,
|
||||
},
|
||||
})
|
||||
export default class RawReceiptDetail extends BasePage {
|
||||
/**
|
||||
* 表单引用
|
||||
*/
|
||||
@Ref('form') readonly $form!: VForm;
|
||||
@Ref('submitForm') readonly $submitForm!: VForm;
|
||||
submitForm = {
|
||||
receiver: '',
|
||||
receiverName: '',
|
||||
password: '',
|
||||
};
|
||||
/**
|
||||
* 页面Module
|
||||
*/
|
||||
model = model;
|
||||
materialList: any = [];
|
||||
type = 'text';
|
||||
wlCode: any = '';
|
||||
wl: any = {};
|
||||
border = true;
|
||||
//添加库位和数量的列表
|
||||
LocationList: any = [];
|
||||
//库位
|
||||
Location: any = [];
|
||||
some: any = {};
|
||||
someIndex: any = 0;
|
||||
qty: any = '';
|
||||
/**
|
||||
* 表单数据
|
||||
*/
|
||||
form: any = {
|
||||
// locationCode: null,
|
||||
amount: null,
|
||||
};
|
||||
rules: VFormRules<any> = {
|
||||
amount: [{ required: true, message: this.$t('message.Pi_tip1') as string }],
|
||||
};
|
||||
locationCodeSelect = false;
|
||||
headers = headers;
|
||||
//页面初始化
|
||||
async onReady() {
|
||||
await this.GetLocation();
|
||||
this.wlCode = this.Location[0];
|
||||
}
|
||||
//获取库位
|
||||
async GetLocation() {
|
||||
let content = {
|
||||
loginName: session.loginName,
|
||||
factoryCode: session.factoryCode,
|
||||
workArea: session.workareaCode,
|
||||
};
|
||||
let res: any = await this.model.queryByFactory(content);
|
||||
res.forEach((item: any) => {
|
||||
let pickerName: any = {};
|
||||
pickerName.label = item.locationCode;
|
||||
pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
|
||||
pickerName.sendSpot = item.sendSpot;
|
||||
this.Location.push(pickerName);
|
||||
});
|
||||
this.wlCode = this.Location[0];
|
||||
}
|
||||
//返回
|
||||
onUpload() {
|
||||
uni.navigateBack({ delta: 1 });
|
||||
}
|
||||
//单号查询
|
||||
async query() {
|
||||
if (!this.form.documentNo) {
|
||||
this.customToast(this.$t('message.Commission_tips1') as any);
|
||||
return;
|
||||
}
|
||||
await this.model.queryOrder(this.form.documentNo).then(() => {
|
||||
if (this.model.code == '1') {
|
||||
this.model.dnReturnList.forEach((item: any) => {
|
||||
let arr = {
|
||||
label: item.materialCode,
|
||||
value: item.materialCode + '(' + item.poLine + ')',
|
||||
Line: item.poLine,
|
||||
poNo: item.poNo,
|
||||
};
|
||||
this.materialList.push(arr);
|
||||
});
|
||||
this.wl = this.materialList[0];
|
||||
this.some = this.model.dnReturnList[0];
|
||||
this.qty = this.model.dnReturnList[0].poAmount;
|
||||
console.log('this.some', this.some);
|
||||
}
|
||||
});
|
||||
}
|
||||
//选择物料
|
||||
materialChoice(e: any) {
|
||||
console.log('e', e);
|
||||
this.model.dnReturnList.forEach((item: any, index: any) => {
|
||||
if (item.poLine == e.pickerName.Line && item.materialCode == e.pickerName.label && item.poNo == e.pickerName.poNo) {
|
||||
this.some = item;
|
||||
this.someIndex = index;
|
||||
}
|
||||
});
|
||||
this.qty = this.some.poAmount;
|
||||
console.log('this.some', this.some);
|
||||
console.log('this.someIndex', this.someIndex);
|
||||
}
|
||||
//选择库位触发事件
|
||||
LocationChoice(e: any) {
|
||||
this.wlCode = e.pickerName;
|
||||
}
|
||||
//添加触发事件
|
||||
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 (parseFloat(this.qty) > parseFloat(this.some.poAmount)) {
|
||||
this.customToast(this.$t('message.quantitys') as any);
|
||||
return;
|
||||
}
|
||||
if (this.some == {}) {
|
||||
this.customToast(this.$t('message.Commission_tips6') as any);
|
||||
return;
|
||||
}
|
||||
let num: number = parseFloat(this.qty) + parseFloat(this.some.receiptAmount);
|
||||
if (num > parseFloat(this.some.poAmount)) {
|
||||
this.customToast(this.$t('message.dn_Tip2') as any);
|
||||
return;
|
||||
}
|
||||
let arr = {
|
||||
poNo: this.some.poNo,
|
||||
poLine: this.some.poLine,
|
||||
materialCode: this.some.materialCode,
|
||||
loginName: this.session.loginName,
|
||||
factoryCode: this.session.factoryCode,
|
||||
wlCode: this.wlCode.label,
|
||||
nowAmount: this.qty,
|
||||
};
|
||||
this.model.dnReturnList[this.someIndex].receiptAmount += parseFloat(this.qty);
|
||||
console.log('this.model.dnReturnList', this.model.dnReturnList);
|
||||
this.LocationList.push(arr);
|
||||
this.qty = '';
|
||||
}
|
||||
//删除某一项 触发事件
|
||||
deleteItem(e: any) {
|
||||
console.log('e', e.contentIndex);
|
||||
console.log('eeeee', e);
|
||||
uni.showModal({
|
||||
content: this.$t('message.product_Delete') as any,
|
||||
cancelText: this.$t('message.Cancel') as any,
|
||||
confirmText: this.$t('message.workArea_Confirm') as any,
|
||||
success: (res) => {
|
||||
if (res.confirm) {
|
||||
this.LocationList.splice(e.contentIndex, 1);
|
||||
this.model.dnReturnList.forEach((item: any) => {
|
||||
if (item.materialCode == e.lineData.materialCode && item.poLine == e.lineData.poLine && item.poNo == e.lineData.poNo) {
|
||||
item.receiptAmount -= parseFloat(e.lineData.nowAmount);
|
||||
}
|
||||
});
|
||||
} else if (res.cancel) {
|
||||
return;
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
//查询明细
|
||||
appoint() {
|
||||
this.toPage(this.page.raw.ingoods.dnReturnGoods.Local);
|
||||
}
|
||||
//提交
|
||||
async onSubmit() {
|
||||
let isTrue = true;
|
||||
// this.model.dnReturnList.forEach((item: any) => {
|
||||
// if (item.receiptAmount != null || item.receiptAmount != 0) {
|
||||
// if (item.receiptAmount != item.poAmount) {
|
||||
// this.customToast(this.$t('message.materials') as any);
|
||||
// return (isTrue = false);
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
if (isTrue) {
|
||||
await this.model.submit(this.LocationList).then(() => {
|
||||
if (this.model.code == '1') {
|
||||
this.materialList = [];
|
||||
this.some = {};
|
||||
this.someIndex = 0;
|
||||
this.LocationList = [];
|
||||
this.qty = '';
|
||||
this.Location = [];
|
||||
this.wl = {};
|
||||
this.wlCode = '';
|
||||
this.query();
|
||||
this.GetLocation();
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.page-picking-order {
|
||||
background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
||||
background-size: 100% 600rpx;
|
||||
padding: 118rpx 30rpx 162rpx;
|
||||
min-height: 100%;
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
.content {
|
||||
width: 100%;
|
||||
background: white;
|
||||
border-radius: 15rpx;
|
||||
padding: 10rpx;
|
||||
.single {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
.single-left {
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
view {
|
||||
width: 110rpx;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
}
|
||||
.single-right {
|
||||
button {
|
||||
margin-top: 15rpx;
|
||||
width: 150rpx;
|
||||
height: 70rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.material {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
.material-left {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
view {
|
||||
width: 145rpx;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.search {
|
||||
padding-left: 19px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.material {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
.material-right {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.material-right-title {
|
||||
width: 160rpx;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.material-right-code {
|
||||
width: 80%;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
text-align: left;
|
||||
padding-left: 10px;
|
||||
// line-height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.number {
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
.number-left {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.number-left-title {
|
||||
width: 120rpx;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.input {
|
||||
width: 200rpx;
|
||||
height: 70rpx;
|
||||
margin-top: 15rpx;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
}
|
||||
.number-right {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.number-right-title {
|
||||
width: 120rpx;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.input {
|
||||
width: 200rpx;
|
||||
height: 70rpx;
|
||||
margin-top: 15rpx;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.library {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
.library-left {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
view {
|
||||
width: 70rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.search {
|
||||
padding-left: 0px;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
.library-right {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.library-right-title {
|
||||
width: 120rpx;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.input {
|
||||
width: 200rpx;
|
||||
height: 70rpx;
|
||||
margin-top: 15rpx;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.add {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
position: relative;
|
||||
button {
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: 20rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.table-wrapper {
|
||||
background-color: #fff;
|
||||
height: 500rpx;
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.form {
|
||||
background-color: #fff;
|
||||
padding: 40rpx;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
.Exhibition {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
margin-top: 20rpx;
|
||||
display: flex;
|
||||
.Exhibition-left {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.Exhibition-left-title {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.Exhibition-left-data {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
}
|
||||
.Exhibition-right {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.Exhibition-right-title {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.Exhibition-right-data {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.library {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
.library-left {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
view {
|
||||
width: 230rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
.library-right {
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
.library-right-title {
|
||||
width: 120rpx;
|
||||
height: 100%;
|
||||
line-height: 100rpx;
|
||||
}
|
||||
.input {
|
||||
width: 200rpx;
|
||||
height: 70rpx;
|
||||
margin-top: 15rpx;
|
||||
margin-left: 15rpx;
|
||||
}
|
||||
}
|
||||
}
|
||||
.add {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
position: relative;
|
||||
button {
|
||||
position: absolute;
|
||||
top: 10rpx;
|
||||
right: 20rpx;
|
||||
}
|
||||
}
|
||||
.bottom-bar {
|
||||
z-index: 21;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
|
||||
.container {
|
||||
background: #ffffff;
|
||||
box-shadow: 0 1rpx 20rpx 0 rgba(128, 128, 128, 0.2);
|
||||
padding: 20rpx;
|
||||
}
|
||||
|
||||
.extra {
|
||||
background-color: #fff;
|
||||
margin: 5px;
|
||||
border-radius: 5px;
|
||||
padding: 0 10px;
|
||||
}
|
||||
|
||||
.bottom-info {
|
||||
.u-form-item {
|
||||
padding: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,51 @@
|
||||
/**
|
||||
* 看单明细表格列
|
||||
*/
|
||||
import vm from '@/main';
|
||||
export const headers = [
|
||||
{
|
||||
label: vm.$t('message.po_MaterielNo'),
|
||||
key: 'materialCode', //物料号
|
||||
width: 204,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.Line'),
|
||||
key: 'poLine', //行项目
|
||||
width: 156,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.CommissionedLocation'),
|
||||
key: 'wlCode', //库位
|
||||
width: 156,
|
||||
},
|
||||
{
|
||||
label: vm.$t('message.product_Number'),
|
||||
key: 'nowAmount', //数量
|
||||
width: 156,
|
||||
},
|
||||
// {
|
||||
// label: vm.$t("message.po_MaterielDes"),
|
||||
// key: "materialDesc",//物料描述
|
||||
// width: 350,
|
||||
// },
|
||||
// {
|
||||
// label: vm.$t("message.returned"),
|
||||
// key: "poAmount",//应退货数量
|
||||
// },
|
||||
// {
|
||||
// label: vm.$t("message.quantity"),
|
||||
// key: "receiptAmount",//累计退货数量
|
||||
// },
|
||||
// {
|
||||
// label: vm.$t("message.po_Supplier"),
|
||||
// key: "supplyCode",//供应商
|
||||
// },
|
||||
// {
|
||||
// label: vm.$t("message.po_OrderType"),
|
||||
// key: "poType",//订单类型
|
||||
// },
|
||||
// {
|
||||
// label: vm.$t("message.po_Location"),
|
||||
// key: "wlCode",//库存地点
|
||||
// },
|
||||
];
|
||||
@ -0,0 +1,125 @@
|
||||
<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">看单明细未通过明细</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<view class="table-wrapper">
|
||||
<wyb-table class="table" ref="table" width="100%" enable-check="multiple" show-left-and-right-border :headers="headers" :contents="model.orderInInfoListEx" :show-vert-border="false"></wyb-table>
|
||||
</view>
|
||||
<view class="bottom-bar">
|
||||
<div class="extra">
|
||||
<u-row class="bottom-info">
|
||||
<u-col :span="3">共{{ model.orderInInfoListEx.length }}条</u-col>
|
||||
<u-col :span="2"></u-col>
|
||||
<u-col :span="4"></u-col>
|
||||
<u-col :span="3"></u-col>
|
||||
</u-row>
|
||||
</div>
|
||||
<div class="container">
|
||||
<u-row>
|
||||
<u-col :span="3"></u-col>
|
||||
<u-col :span="3"></u-col>
|
||||
<u-col :span="3"></u-col>
|
||||
<u-col :span="3">
|
||||
<u-button @click="uni.navigateBack()">返回</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 { headers } from './config';
|
||||
|
||||
@Component
|
||||
export default class RawReceiptDetailEx extends BasePage {
|
||||
/**
|
||||
* 页面Module
|
||||
*/
|
||||
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;
|
||||
|
||||
.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;
|
||||
height: 72rpx;
|
||||
line-height: 72rpx;
|
||||
margin: 5px;
|
||||
padding: 0 10px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,225 @@
|
||||
<template>
|
||||
<view class="page-receipt-detail">
|
||||
<view class="header">
|
||||
<view class="left">
|
||||
<u-icon class="icon" name="arrow-left" @click="gohome" />
|
||||
</view>
|
||||
<view class="title">{{ $t('message.dn_Detailed') }}</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<view class="table-wrapper">
|
||||
<wyb-table class="table" ref="table" width="100%" enable-check="single" show-left-and-right-border :headers="headers" :contents="model.orderInInfoList" :show-vert-border="false"></wyb-table>
|
||||
</view>
|
||||
<view class="bottom-bar">
|
||||
<div>
|
||||
<u-button type="primary" class="appoint" size="medium" @click="appoint">退货数量</u-button>
|
||||
</div>
|
||||
<div class="container">
|
||||
<u-row>
|
||||
<u-col :span="4">
|
||||
<u-button type="warning" @click="model.checkAllOrderInInfoList(!model.isCheckedAll)">
|
||||
{{ model.isCheckedAll ? this.$t('message.po_noSelectAll') : this.$t('message.po_SelectAll') }}
|
||||
</u-button>
|
||||
</u-col>
|
||||
<u-col :span="4">
|
||||
<u-button type="success" :loading="$wait.is('*submitOrderInEnter')" @click="onSubmit">
|
||||
{{ $t('message.po_Submit') }}
|
||||
</u-button>
|
||||
</u-col>
|
||||
<!-- <u-col :span="3">-->
|
||||
<!-- <u-button type="primary"> 确认 </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 { headers } from './config';
|
||||
|
||||
@Component
|
||||
export default class RawReceiptDetail extends BasePage {
|
||||
/**
|
||||
* 页面Module
|
||||
*/
|
||||
model = model;
|
||||
locationCode = '';
|
||||
/**
|
||||
* 实际数量
|
||||
*/
|
||||
number = '';
|
||||
|
||||
/**
|
||||
* 表头
|
||||
*/
|
||||
headers = headers;
|
||||
onReady() {
|
||||
this.model.queryLocation();
|
||||
let ant: any = JSON.parse(uni.getStorageSync('material') as string);
|
||||
let index: any = JSON.parse(uni.getStorageSync('index') as string);
|
||||
this.model.orderInInfoList[index] = ant;
|
||||
console.log(this.model.orderInInfoList);
|
||||
// this.$nextTick(() => {
|
||||
// this.toPage(this.page.raw.ingoods.dnReturnGoods.detail);
|
||||
// });
|
||||
}
|
||||
gohome() {
|
||||
this.toPage(this.page.raw.ingoods.dnReturnGoods.index);
|
||||
uni.removeStorageSync('material');
|
||||
uni.removeStorageSync('index');
|
||||
}
|
||||
/**
|
||||
* 逐条修改
|
||||
*/
|
||||
changeNumber() {
|
||||
if (!this.model.hasChecked) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: this.$t('message.dn_Select') as string,
|
||||
});
|
||||
return;
|
||||
}
|
||||
if (!this.number) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: this.$t('message.return_Tip3') as string,
|
||||
});
|
||||
return;
|
||||
}
|
||||
//改变列表的值
|
||||
this.model.orderInInfoList.forEach((item: any) => {
|
||||
console.log('item.checked', item.checked);
|
||||
if (item.checked) {
|
||||
console.log(this.number, item.requestAmount);
|
||||
if (this.number > item.requestAmount) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: this.$t('message.dn_Tip2') as string,
|
||||
});
|
||||
return;
|
||||
} else {
|
||||
item.returnAmount = this.number;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
appoint() {
|
||||
let selectStatus = model.orderInInfoList.map((item) => {
|
||||
if (item.checked == true) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
let i = 0;
|
||||
selectStatus.forEach((item) => {
|
||||
if (item == true) {
|
||||
i++;
|
||||
}
|
||||
});
|
||||
if (i > 1) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '只能选择一个DN单' as string,
|
||||
});
|
||||
} else if (i == 0) {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请选择一个DN单' as string,
|
||||
});
|
||||
} else {
|
||||
let mater: number = selectStatus.indexOf(true);
|
||||
uni.setStorageSync('mater', JSON.stringify(model.orderInInfoList[mater]) as string);
|
||||
uni.setStorageSync('index', JSON.stringify(mater) as string);
|
||||
this.toPage(this.page.raw.ingoods.dnReturnGoods.idetailed);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 提交
|
||||
*/
|
||||
async onSubmit() {
|
||||
await this.model.submitOrderInEnter();
|
||||
this.locationCode = '';
|
||||
// uni.navigateBack({ delta: 1 });
|
||||
// setTimeout(() => {
|
||||
// uni.navigateBack({ delta: 1 });
|
||||
// }, 2000);
|
||||
}
|
||||
}
|
||||
</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;
|
||||
|
||||
.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>
|
||||
@ -0,0 +1,251 @@
|
||||
<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.dn_Detailed') }}</view>
|
||||
<view class="right"></view>
|
||||
</view>
|
||||
<div class="content">
|
||||
<div class="content-item">
|
||||
<div class="item-left">MAT code</div>
|
||||
<div class="item-right">{{ this.material.materialCode }}</div>
|
||||
</div>
|
||||
<div class="content-item">
|
||||
<div class="item-left">MAT desc</div>
|
||||
<div class="item-right">{{ this.material.materialDesc }}</div>
|
||||
</div>
|
||||
<div class="content-item">
|
||||
<div class="item-left">Request Qty</div>
|
||||
<div class="item-right">{{ this.material.requestAmount }}</div>
|
||||
</div>
|
||||
<div class="content-item">
|
||||
<div class="item-left">Receive Qty</div>
|
||||
<div class="item-right">{{ this.material.requestAmount }}</div>
|
||||
</div>
|
||||
<div class="content-item">
|
||||
<div class="item-left">Loc</div>
|
||||
<div class="item-right">{{ this.material.location }}</div>
|
||||
</div>
|
||||
</div>
|
||||
<u-search :placeholder="this.$t('message.dn_PleaseScan')" v-model="documentNo" @search="model.queryOrderInInfo" :show-action="false"></u-search>
|
||||
<div class="library">
|
||||
<input type="text" placeholder="请输入库位" v-model="wlCode" />
|
||||
<input type="text" placeholder="请输入数量" v-model="number" />
|
||||
<u-button type="primary" size="medium" class="confirm" @click="confirm">确认</u-button>
|
||||
</div>
|
||||
<u-table class="library-table">
|
||||
<u-tr class="u-tr">
|
||||
<u-th class="u-th">库位</u-th>
|
||||
<u-th class="u-th">数量</u-th>
|
||||
<u-th class="u-th">操作</u-th>
|
||||
</u-tr>
|
||||
<u-tr class="u-tr" v-for="(item, index) in LocationList" :key="index">
|
||||
<u-td class="u-td">{{ item.value }}</u-td>
|
||||
<u-td class="u-td">{{ item.num }}</u-td>
|
||||
<u-td class="u-td">
|
||||
<div class="u-td" @click="deleteItem(index)">删除</div>
|
||||
</u-td>
|
||||
</u-tr>
|
||||
</u-table>
|
||||
<view class="bottom-bar">
|
||||
<div class="extra">
|
||||
<u-row class="bottom-info">
|
||||
<u-button type="primary" class="main" @click="Reservoir">确认</u-button>
|
||||
<u-col :span="2" v-if="factoryCode == '6662'"> { {$t('message.product_Location')}} </u-col>
|
||||
<u-col :span="4" v-if="factoryCode == '6662'">
|
||||
<jPicker style="margin: 6px 0px" sureColor="#ff0000" @bindpicker="bookTypeChange" showKey="value" valKey="value" :val="locationCode" :options="model.cboPlaceList" />
|
||||
</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 { headers } from './config';
|
||||
import jPicker from '@/components/J-Picker/jPicker.vue';
|
||||
import { session } from '@/store/modules/session';
|
||||
// @Component
|
||||
@Component({
|
||||
components: {
|
||||
jPicker,
|
||||
},
|
||||
})
|
||||
export default class RawReceiptDetail extends BasePage {
|
||||
/**
|
||||
* 页面Module
|
||||
*/
|
||||
model = model;
|
||||
factoryCode = session.factoryCode;
|
||||
locationCode = '';
|
||||
/**
|
||||
* 实际数量
|
||||
*/
|
||||
number = '';
|
||||
wlCode = '';
|
||||
material: any = {};
|
||||
LocationList = [];
|
||||
documentNo = '';
|
||||
/**
|
||||
* 表头
|
||||
*/
|
||||
headers = headers;
|
||||
async onReady() {
|
||||
await this.model.queryLocation();
|
||||
let ant: any = uni.getStorageSync('mater');
|
||||
this.material = JSON.parse(ant);
|
||||
uni.removeStorageSync('mater');
|
||||
}
|
||||
confirm() {
|
||||
if (this.wlCode == '' || this.number == '') {
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: '请输入正确的库位和数量',
|
||||
});
|
||||
return;
|
||||
}
|
||||
let arr: any = {
|
||||
value: this.wlCode,
|
||||
num: this.number,
|
||||
};
|
||||
this.LocationList.push(arr as never);
|
||||
}
|
||||
deleteItem(index: any) {
|
||||
this.LocationList.splice(index, 1);
|
||||
}
|
||||
bookTypeChange(e: any) {
|
||||
this.locationCode = e.pickerName.value;
|
||||
}
|
||||
Reservoir() {
|
||||
let wlQTyList: Array<string> = [];
|
||||
let requestAmountNum = 0;
|
||||
this.LocationList.forEach((item: any) => {
|
||||
let objString = JSON.stringify(this.material);
|
||||
let TEM = JSON.parse(objString);
|
||||
TEM.wlCode = item.value;
|
||||
TEM.requestAmount = item.num;
|
||||
wlQTyList.push(TEM);
|
||||
let pras = parseInt(item.num);
|
||||
requestAmountNum += pras;
|
||||
});
|
||||
this.material.wlQTyList = wlQTyList;
|
||||
this.material.receiptAmount = requestAmountNum;
|
||||
console.log(this.material);
|
||||
uni.setStorageSync('material', JSON.stringify(this.material));
|
||||
this.toPage(this.page.raw.ingoods.dnReturnGoods.detail);
|
||||
}
|
||||
}
|
||||
</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;
|
||||
|
||||
.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;
|
||||
}
|
||||
}
|
||||
|
||||
.content {
|
||||
width: 100%;
|
||||
height: 500rpx;
|
||||
|
||||
.content-item {
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
background-color: white;
|
||||
.item-left {
|
||||
width: 30%;
|
||||
}
|
||||
.item-right {
|
||||
width: 70%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.library {
|
||||
width: 100%;
|
||||
background-color: white;
|
||||
display: flex;
|
||||
|
||||
input {
|
||||
display: block;
|
||||
width: 30%;
|
||||
padding: 10rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.library-table {
|
||||
margin-top: 30rpx;
|
||||
}
|
||||
|
||||
.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 {
|
||||
margin: 5px;
|
||||
border-radius: 5px;
|
||||
padding: 0 10px;
|
||||
|
||||
.main {
|
||||
margin-right: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@ -0,0 +1,227 @@
|
||||
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';
|
||||
|
||||
class OrderInInfo {
|
||||
checked?: boolean;
|
||||
dnNo?: string;
|
||||
kw?: string;
|
||||
userDefined10?: string;
|
||||
orderStatus?: string;
|
||||
// carNo?: string;
|
||||
// bookingTime?: string;
|
||||
supplyCode?: string;
|
||||
poType?: string;
|
||||
location?: string;
|
||||
}
|
||||
|
||||
@Module({
|
||||
namespaced: true,
|
||||
dynamic: true,
|
||||
store,
|
||||
name: 'raw.ingoods.dnReturnGoods',
|
||||
})
|
||||
export class ReceiptModule extends VuexModule {
|
||||
/**
|
||||
* sap库存地点列表
|
||||
*/
|
||||
cboPlaceList = [];
|
||||
/**
|
||||
* 隐藏看单号
|
||||
*/
|
||||
dnNo = '';
|
||||
dnReturnList = [];
|
||||
code: any = '';
|
||||
/**
|
||||
* 看单号查询结果
|
||||
*/
|
||||
orderInInfo: OrderInInfo = new OrderInInfo();
|
||||
detailedList = [];
|
||||
/**
|
||||
* 看单明细
|
||||
*/
|
||||
orderInInfoList: OrderInInfo[] = [];
|
||||
/**
|
||||
* 看单明细未通过明细
|
||||
*/
|
||||
orderInInfoListEx: OrderInInfo[] = [];
|
||||
|
||||
/**
|
||||
* 是否已查询看单号
|
||||
*/
|
||||
get hasDnInfo() {
|
||||
return !!this.orderInInfo.dnNo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否全选
|
||||
*/
|
||||
get isCheckedAll() {
|
||||
return !this.orderInInfoList.filter((_) => !_.checked).length;
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否有选择项
|
||||
*/
|
||||
get hasChecked() {
|
||||
return this.orderInInfoList.filter((_) => _.checked).length > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新看单明细库位
|
||||
* @param kw 库位
|
||||
*/
|
||||
@Mutation
|
||||
updateOrderInInfoListKw(kw: string) {
|
||||
this.orderInInfoList = this.orderInInfoList.map((item) => {
|
||||
item.kw = kw;
|
||||
return item;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新选中的看单明细库位
|
||||
* @param kw 库位
|
||||
*/
|
||||
@Mutation
|
||||
updateCheckedOrderInInfoListKw(kw: string) {
|
||||
this.orderInInfoList = this.orderInInfoList.map((item) => {
|
||||
if (item.checked) {
|
||||
item.kw = kw;
|
||||
}
|
||||
return item;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 看单明细全选/全不选
|
||||
*/
|
||||
@Mutation
|
||||
checkAllOrderInInfoList(checked: boolean) {
|
||||
this.orderInInfoList = this.orderInInfoList.map((item) => {
|
||||
item.checked = checked;
|
||||
return item;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询库位列表
|
||||
*/
|
||||
@MutationAction
|
||||
async queryLocation() {
|
||||
const result: any = await http.post(url.auth.query.location, {
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
workareaCode: session.workareaCode,
|
||||
});
|
||||
const cboPlaceList = result.list.map((_: any) => ({
|
||||
label: _.locationCode,
|
||||
value: _.locationCode,
|
||||
}));
|
||||
return { cboPlaceList };
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询单号
|
||||
* 查询DN单号
|
||||
* @param dnNo
|
||||
*/
|
||||
@MutationAction
|
||||
async queryOrderInInfo(dnNo: string) {
|
||||
const { list }: any = await http.post(url.material.DNorderin.dnReturnInfo, {
|
||||
dnNo,
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
});
|
||||
const orderInInfo = list[0] || {};
|
||||
const orderInInfoList = list.filter((_: OrderInInfo) => _.userDefined10 === '1');
|
||||
const orderInInfoListEx = list.filter((_: OrderInInfo) => _.userDefined10 === '0');
|
||||
orderInInfoList.forEach((item: any) => {
|
||||
item.returnAmount = item.requestAmount;
|
||||
});
|
||||
console.log('1111111', orderInInfoList);
|
||||
return { dnNo, orderInInfo, orderInInfoList, orderInInfoListEx };
|
||||
}
|
||||
@MutationAction
|
||||
async queryOrder(poNo: string) {
|
||||
const res: any = await http.post(url.material.DNorderin.queryOrder, {
|
||||
poNo,
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
});
|
||||
const orderInInfoListEx = res.data.filter((_: OrderInInfo) => _.userDefined10 === '0');
|
||||
const dnReturnList = res.data;
|
||||
dnReturnList.forEach((item: any) => {
|
||||
item.list = [];
|
||||
});
|
||||
const orderInInfo: any = res.data[0] || {};
|
||||
const code = res.code;
|
||||
console.log('orderInInfo', orderInInfo);
|
||||
return { orderInInfo, orderInInfoListEx, dnReturnList, code };
|
||||
}
|
||||
/**
|
||||
* 提交看单明细
|
||||
*/
|
||||
@MutationAction
|
||||
async submitOrderInEnter() {
|
||||
// const list = (this.state as any).orderInInfoList.map((item: any) => {
|
||||
// item.orderStatus = item.checked ? '2' : '1';
|
||||
// item.requestAmount = item.checked ? item.y : '0';
|
||||
// return item;
|
||||
// });
|
||||
const list = (this.state as any).orderInInfoList;
|
||||
const result: any = await http.post(url.material.DNorderin.out, {
|
||||
dnNo: this.dnNo,
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
list,
|
||||
});
|
||||
uni.showToast({
|
||||
icon: 'none',
|
||||
title: result.msg,
|
||||
});
|
||||
const orderInInfoList = result.list.sort((a: any, b: any) => Number(a.accountingStatus) - Number(b.accountingStatus));
|
||||
return { orderInInfoList };
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改库位
|
||||
*/
|
||||
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||
async changeOrderInLocation(kw: string) {
|
||||
await http.post('/wmspda/material/orderin/enter', {
|
||||
warehouseCode: session.warehouseCode,
|
||||
factoryCode: session.factoryCode,
|
||||
loginName: session.loginName,
|
||||
locationCode: kw,
|
||||
});
|
||||
return kw;
|
||||
}
|
||||
|
||||
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||
async queryByFactoryCodeAndWorkAreaCode(content: any) {
|
||||
const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
|
||||
return res;
|
||||
}
|
||||
@Action({ commit: 'updateCheckedOrderInInfoListKw' })
|
||||
async queryByFactory(content: any) {
|
||||
const res = await http.post('/wmspda/fg/queryByFactoryCodeAndWorkAreaCode', content);
|
||||
return res;
|
||||
}
|
||||
@MutationAction
|
||||
async submit(content: any) {
|
||||
const res: any = await http.post('/wmspda/material/poReturn/materialComplete', content);
|
||||
const code = res.code;
|
||||
return { code };
|
||||
}
|
||||
@MutationAction
|
||||
async querydetaildlist(content: any) {
|
||||
const res = await http.post('/wmspda/material/poReturn/info', content);
|
||||
const detailedList = res.data;
|
||||
return { detailedList };
|
||||
}
|
||||
}
|
||||
|
||||
export default getModule(ReceiptModule);
|
||||
Loading…
Reference in New Issue