|
|
|
@ -4,78 +4,51 @@
|
|
|
|
|
<view class="left">
|
|
|
|
|
<u-icon class="icon" name="arrow-left" @click="index" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="title">{{ $t("message.rawMenu_ReturnGoods") }}</view>
|
|
|
|
|
<view class="title">{{ $t('message.rawMenu_ReturnGoods') }}</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.dnReturnList"
|
|
|
|
|
:show-vert-border="false"
|
|
|
|
|
@onCheck="handleRow"
|
|
|
|
|
></wyb-table>
|
|
|
|
|
<wyb-table class="table" ref="table" width="100%" enable-check="single" show-left-and-right-border :headers="headers" :contents="model.dnReturnList" :show-vert-border="false" @onCheck="handleRow"></wyb-table>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 列表展示数据 -->
|
|
|
|
|
<view class="Exhibition">
|
|
|
|
|
<view class="Exhibition-left">
|
|
|
|
|
<view class="Exhibition-left-title"
|
|
|
|
|
>{{ $t("message.return_Type") }}:</view
|
|
|
|
|
>
|
|
|
|
|
<view class="Exhibition-left-title">{{ $t('message.return_Type') }}:</view>
|
|
|
|
|
<view class="Exhibition-left-data">{{ some.poType }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="Exhibition-right">
|
|
|
|
|
<view class="Exhibition-right-title"
|
|
|
|
|
>{{ $t("message.po_ReturnGoodsQuantity") }}:</view
|
|
|
|
|
>
|
|
|
|
|
<view class="Exhibition-right-title">{{ $t('message.po_ReturnGoodsQuantity') }}:</view>
|
|
|
|
|
<view class="Exhibition-right-data">{{ some.poAmount }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 添加库位 -->
|
|
|
|
|
<view class="library">
|
|
|
|
|
<view class="library-left">
|
|
|
|
|
<view>{{ $t("message.CommissionedLocation") }}:</view>
|
|
|
|
|
<jPicker
|
|
|
|
|
sureColor="#ff0000"
|
|
|
|
|
style="width: 230rpx"
|
|
|
|
|
@bindpicker="LocationChoice"
|
|
|
|
|
showKey="value"
|
|
|
|
|
valKey="value"
|
|
|
|
|
:val="wlCode"
|
|
|
|
|
class="search"
|
|
|
|
|
:options="Location"
|
|
|
|
|
/>
|
|
|
|
|
<view>{{ $t('message.CommissionedLocation') }}:</view>
|
|
|
|
|
<jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode" class="search" :options="Location" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="library-right">
|
|
|
|
|
<view class="library-right-title">{{
|
|
|
|
|
$t("message.CommissionedThisNumber")
|
|
|
|
|
}}</view>
|
|
|
|
|
<view class="library-right-title">{{ $t('message.CommissionedThisNumber') }}</view>
|
|
|
|
|
<u-input v-model="qty" :type="type" :border="border" class="input" />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 添加 -->
|
|
|
|
|
<view class="add">
|
|
|
|
|
<u-button type="primary" @click="Add">{{
|
|
|
|
|
$t("message.product_add")
|
|
|
|
|
}}</u-button>
|
|
|
|
|
<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.operation") }}</u-th>
|
|
|
|
|
<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.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">
|
|
|
|
|
<div class="u-td" @click="deleteItem(index)">
|
|
|
|
|
{{ $t("message.product_Delete") }}
|
|
|
|
|
{{ $t('message.product_Delete') }}
|
|
|
|
|
</div>
|
|
|
|
|
</u-td>
|
|
|
|
|
</u-tr>
|
|
|
|
@ -89,18 +62,16 @@
|
|
|
|
|
<div class="container">
|
|
|
|
|
<u-row>
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-button type="primary" class="appoint" @click="appoint">{{
|
|
|
|
|
$t("message.detailed")
|
|
|
|
|
}}</u-button>
|
|
|
|
|
<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") }}
|
|
|
|
|
{{ $t('message.po_Submit') }}
|
|
|
|
|
</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="4">
|
|
|
|
|
<u-button type="error" @click="onUpload">
|
|
|
|
|
{{ $t("message.po_Return") }}
|
|
|
|
|
{{ $t('message.po_Return') }}
|
|
|
|
|
</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
@ -110,13 +81,13 @@
|
|
|
|
|
</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";
|
|
|
|
|
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,
|
|
|
|
@ -126,26 +97,26 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
/**
|
|
|
|
|
* 表单引用
|
|
|
|
|
*/
|
|
|
|
|
@Ref("form") readonly $form!: VForm;
|
|
|
|
|
@Ref("submitForm") readonly $submitForm!: VForm;
|
|
|
|
|
@Ref('form') readonly $form!: VForm;
|
|
|
|
|
@Ref('submitForm') readonly $submitForm!: VForm;
|
|
|
|
|
submitForm = {
|
|
|
|
|
receiver: "",
|
|
|
|
|
receiverName: "",
|
|
|
|
|
password: "",
|
|
|
|
|
receiver: '',
|
|
|
|
|
receiverName: '',
|
|
|
|
|
password: '',
|
|
|
|
|
};
|
|
|
|
|
/**
|
|
|
|
|
* 页面Module
|
|
|
|
|
*/
|
|
|
|
|
model = model;
|
|
|
|
|
type = "text";
|
|
|
|
|
wlCode: any = "";
|
|
|
|
|
type = 'text';
|
|
|
|
|
wlCode: any = '';
|
|
|
|
|
border = true;
|
|
|
|
|
//添加库位和数量的列表
|
|
|
|
|
LocationList: any = [];
|
|
|
|
|
//库位
|
|
|
|
|
Location: any = [];
|
|
|
|
|
some: any = {};
|
|
|
|
|
qty: any = "";
|
|
|
|
|
qty: any = '';
|
|
|
|
|
/**
|
|
|
|
|
* 表单数据
|
|
|
|
|
*/
|
|
|
|
@ -162,7 +133,7 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
rules: VFormRules<any> = {
|
|
|
|
|
// locationCode: [{ required: true, message: '请选择库存地点!' }],
|
|
|
|
|
amount: [
|
|
|
|
|
{ required: true, message: this.$t("message.Pi_tip1") as string },
|
|
|
|
|
{ required: true, message: this.$t('message.Pi_tip1') as string },
|
|
|
|
|
// { type: 'integer', min: 1, transform: Number, message: this.$t('message.Pi_tip2') as string },
|
|
|
|
|
],
|
|
|
|
|
};
|
|
|
|
@ -178,9 +149,7 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
headers = headers;
|
|
|
|
|
//页面初始化
|
|
|
|
|
async onReady() {
|
|
|
|
|
let means: any = JSON.parse(
|
|
|
|
|
localStorage.getItem("__GWMS_APP_STATE_DATA__") as any
|
|
|
|
|
);
|
|
|
|
|
let means: any = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);
|
|
|
|
|
let user: any = session.user;
|
|
|
|
|
let content = {
|
|
|
|
|
loginName: means.session.user.loginName,
|
|
|
|
@ -191,7 +160,7 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
res.forEach((item: any) => {
|
|
|
|
|
let pickerName: any = {};
|
|
|
|
|
pickerName.label = item.locationCode;
|
|
|
|
|
pickerName.value = item.locationCode + "(" + item.sendSpot + ")";
|
|
|
|
|
pickerName.value = item.locationCode + '(' + item.sendSpot + ')';
|
|
|
|
|
pickerName.sendSpot = item.sendSpot;
|
|
|
|
|
this.Location.push(pickerName);
|
|
|
|
|
});
|
|
|
|
@ -203,37 +172,25 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
//表格单选触发事件
|
|
|
|
|
handleRow({ data }: any) {
|
|
|
|
|
this.LocationList = [];
|
|
|
|
|
this.qty = "";
|
|
|
|
|
this.qty = '';
|
|
|
|
|
this.some = data[0].lineData;
|
|
|
|
|
}
|
|
|
|
|
//添加触发事件
|
|
|
|
|
Add() {
|
|
|
|
|
if (this.qty == "" || this.wlCode == "") {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: this.$t("message.Commission_tips2") as any,
|
|
|
|
|
});
|
|
|
|
|
if (this.qty == '' || this.wlCode == '') {
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips2') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(this.qty) <= 0) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: this.$t("message.Commission_tips3") as any,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips3') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (parseFloat(this.qty) > parseFloat(this.some.poAmount)) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: this.$t("message.quantitys") as any,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.quantitys') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.some == {}) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: this.$t("message.Commission_tips6") as any,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.Commission_tips6') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let num: number = parseFloat(this.qty);
|
|
|
|
@ -241,10 +198,7 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
num += parseFloat(item.qty);
|
|
|
|
|
});
|
|
|
|
|
if (num > parseFloat(this.some.poAmount)) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: this.$t("message.dn_Tip2") as any,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.dn_Tip2') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let arr = {
|
|
|
|
@ -258,7 +212,7 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
nowAmount: this.qty,
|
|
|
|
|
};
|
|
|
|
|
this.some.list.push(TEM);
|
|
|
|
|
this.qty = "";
|
|
|
|
|
this.qty = '';
|
|
|
|
|
}
|
|
|
|
|
//删除某一项 触发事件
|
|
|
|
|
deleteItem(index: any) {
|
|
|
|
@ -272,15 +226,12 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
* 提交
|
|
|
|
|
*/
|
|
|
|
|
async onSubmit() {
|
|
|
|
|
let num: number = 0;
|
|
|
|
|
let num = 0;
|
|
|
|
|
this.some.list.forEach((item: any) => {
|
|
|
|
|
num += parseFloat(item.nowAmount);
|
|
|
|
|
});
|
|
|
|
|
if (num != parseFloat(this.some.poAmount)) {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
icon: "none",
|
|
|
|
|
title: this.$t("message.actual") as any,
|
|
|
|
|
});
|
|
|
|
|
this.customToast(this.$t('message.actual') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await this.model.submit({
|
|
|
|
@ -297,8 +248,7 @@ export default class RawReceiptDetail extends BasePage {
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
|
|
.page-picking-order {
|
|
|
|
|
background: #f2f2f2
|
|
|
|
|
linear-gradient(0deg, #311818 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
|
|
|
|
background: #f2f2f2 linear-gradient(0deg, #311818 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
|
|
|
|
|
background-size: 100% 600rpx;
|
|
|
|
|
padding: 30rpx;
|
|
|
|
|
min-height: 100%;
|
|
|
|
|