原材料提示长存提示框

master
guoshuang 3 years ago
parent 770eb0a85a
commit bf9e0543a8

@ -172,7 +172,9 @@ export default {
ModelScanned: '型号已扫', ModelScanned: '型号已扫',
Pi_tip13: '请选择要提交的物料', Pi_tip13: '请选择要提交的物料',
Pi_tip15: '请确保交接数量等于需求数量', Pi_tip15: '请确保交接数量等于需求数量',
Pi_tip16: '只能选择一个DN单',
Pi_tip17: '请选择一条DN单',
Pi_tip18: '请选中要移库的数据',
//汇总交接 //汇总交接
Summary_Query: '汇总查询', Summary_Query: '汇总查询',
Summary_Contain: '包含', Summary_Contain: '包含',

@ -29,6 +29,9 @@ export default {
operation: 'Operation', operation: 'Operation',
Pi_tip13: 'Please select the material to submit', Pi_tip13: 'Please select the material to submit',
Pi_tip15: 'Please ensure that the handover quantity is equal to the demand quantity', Pi_tip15: 'Please ensure that the handover quantity is equal to the demand quantity',
Pi_tip16: 'You can only select one DN list',
Pi_tip17: 'Please select a dn list',
Pi_tip18: 'Please select the data to be moved',
//版本更新 //版本更新
updatePrompt: 'Update tips', updatePrompt: 'Update tips',
Tip1: 'New version detected, update?', Tip1: 'New version detected, update?',

@ -159,16 +159,13 @@ export default class dnReceiptDom extends BasePage {
// //
async query() { async query() {
if (!this.form.documentNo) { if (!this.form.documentNo) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as any);
icon: 'none',
title: this.$t('message.Commission_tips1') as any,
});
return; return;
} }
await this.model.ImportQueryOrderInfo(this.form.documentNo.trim()); await this.model.ImportQueryOrderInfo(this.form.documentNo.trim());
if (model.code == '1') { if (model.code == '1') {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'success',
title: this.$t('message.successful') as any, title: this.$t('message.successful') as any,
}); });
console.log('orderInInfoList', this.model.orderInInfoList); console.log('orderInInfoList', this.model.orderInInfoList);
@ -264,33 +261,21 @@ export default class dnReceiptDom extends BasePage {
// const count = this.totalLocation(this.LocationList); // const count = this.totalLocation(this.LocationList);
const count = parseFloat(this.every.requestAmount); const count = parseFloat(this.every.requestAmount);
if (this.receiptAmount == '' || !this.wl.value) { if (this.receiptAmount == '' || !this.wl.value) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips2') as any);
icon: 'none',
title: this.$t('message.Commission_tips2') as any,
});
return; return;
} }
if (parseFloat(this.receiptAmount) <= 0) { if (parseFloat(this.receiptAmount) <= 0) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips3') as any);
icon: 'none',
title: this.$t('message.Commission_tips3') as any,
});
return; return;
} }
if (parseFloat(this.receiptAmount) > count || parseFloat(this.receiptAmount) + parseFloat(this.every.receiptAmount) > count) { if (parseFloat(this.receiptAmount) > count || parseFloat(this.receiptAmount) + parseFloat(this.every.receiptAmount) > count) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips4') as any);
icon: 'none',
title: this.$t('message.Commission_tips4') as any,
});
return; return;
} }
let isTrue = true; let isTrue = true;
this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => { this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => {
if (item.wlCode == this.wl.label && item.receiptAmount == this.receiptAmount) { if (item.wlCode == this.wl.label && item.receiptAmount == this.receiptAmount) {
uni.showToast({ this.customToast(this.$t('message.repeatedly') as any);
icon: 'none',
title: this.$t('message.repeatedly') as any,
});
return (isTrue = false); return (isTrue = false);
} }
}); });
@ -369,10 +354,7 @@ export default class dnReceiptDom extends BasePage {
} }
async onSubmit() { async onSubmit() {
if (this.LocationList.length === 0) { if (this.LocationList.length === 0) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips5') as any);
icon: 'none',
title: this.$t('message.Commission_tips5') as any,
});
return null; return null;
} }
await this.model.submitOrderInEnter(this.DNReceivingList); await this.model.submitOrderInEnter(this.DNReceivingList);
@ -380,10 +362,7 @@ export default class dnReceiptDom extends BasePage {
} }
async bill() { async bill() {
if (this.form.documentNo == '') { if (this.form.documentNo == '') {
uni.showToast({ this.customToast(this.$t('message._tips6') as any);
icon: 'none',
title: this.$t('message._tips6') as any,
});
return; return;
} }
let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);

@ -168,16 +168,13 @@ export default class dnReceiptDom extends BasePage {
// //
async query() { async query() {
if (!this.form.documentNo) { if (!this.form.documentNo) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips1') as any);
icon: 'none',
title: this.$t('message.Commission_tips1') as any,
});
return; return;
} }
await this.model.queryOrderInInfo(this.form.documentNo.trim()); await this.model.queryOrderInInfo(this.form.documentNo.trim());
if (model.code == '1') { if (model.code == '1') {
uni.showToast({ uni.showToast({
icon: 'none', icon: 'success',
title: this.$t('message.successful') as any, title: this.$t('message.successful') as any,
}); });
console.log('orderInInfoList', this.model.orderInInfoList); console.log('orderInInfoList', this.model.orderInInfoList);
@ -273,33 +270,21 @@ export default class dnReceiptDom extends BasePage {
// const count = this.totalLocation(this.LocationList); // const count = this.totalLocation(this.LocationList);
const count = parseFloat(this.every.requestAmount); const count = parseFloat(this.every.requestAmount);
if (this.receiptAmount == '' || !this.wl.value) { if (this.receiptAmount == '' || !this.wl.value) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips2') as any);
icon: 'none',
title: this.$t('message.Commission_tips2') as any,
});
return; return;
} }
if (parseFloat(this.receiptAmount) <= 0) { if (parseFloat(this.receiptAmount) <= 0) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips3') as any);
icon: 'none',
title: this.$t('message.Commission_tips3') as any,
});
return; return;
} }
if (parseFloat(this.receiptAmount) > count || parseFloat(this.receiptAmount) + parseFloat(this.every.receiptAmount) > count) { if (parseFloat(this.receiptAmount) > count || parseFloat(this.receiptAmount) + parseFloat(this.every.receiptAmount) > count) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips4') as any);
icon: 'none',
title: this.$t('message.Commission_tips4') as any,
});
return; return;
} }
let isTrue = true; let isTrue = true;
this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => { this.DNReceivingList[this.everyIndex].wllist.forEach((item: any) => {
if (item.wlCode == this.wl.label && item.receiptAmount == this.receiptAmount) { if (item.wlCode == this.wl.label && item.receiptAmount == this.receiptAmount) {
uni.showToast({ this.customToast(this.$t('message.repeatedly') as any);
icon: 'none',
title: this.$t('message.repeatedly') as any,
});
return (isTrue = false); return (isTrue = false);
} }
}); });
@ -378,10 +363,7 @@ export default class dnReceiptDom extends BasePage {
} }
async onSubmit() { async onSubmit() {
if (this.LocationList.length === 0) { if (this.LocationList.length === 0) {
uni.showToast({ this.customToast(this.$t('message.Commission_tips5') as any);
icon: 'none',
title: this.$t('message.Commission_tips5') as any,
});
return null; return null;
} }
await this.model.submitOrderInEnter(this.DNReceivingList); await this.model.submitOrderInEnter(this.DNReceivingList);
@ -389,10 +371,7 @@ export default class dnReceiptDom extends BasePage {
} }
async bill() { async bill() {
if (this.form.documentNo == '') { if (this.form.documentNo == '') {
uni.showToast({ this.customToast(this.$t('message._tips6') as any);
icon: 'none',
title: this.$t('message._tips6') as any,
});
return; return;
} }
let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any); let person = JSON.parse(localStorage.getItem('__GWMS_APP_STATE_DATA__') as any);

@ -49,11 +49,8 @@ export default class RawReceiptDetail extends BasePage {
headers = headers; headers = headers;
poNo: any = ""; poNo: any = "";
async generate() { async generate() {
if (this.poNo == "") { if (this.poNo == '') {
uni.showToast({ this.customToast(this.$t('message._tips6') as any);
icon: "none",
title: this.$t("message._tips6") as any,
});
return; return;
} }
let content = { let content = {

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

@ -1,59 +1,33 @@
<template> <template>
<view class="page-raw-receipt"> <view class="page-raw-receipt">
<view <view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
class="header"
:style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }"
>
<view class="left"> <view class="left">
<u-icon class="icon" name="arrow-left" @click="index" /> <u-icon class="icon" name="arrow-left" @click="index" />
</view> </view>
<view class="title">{{ $t("message.po_ReturnGoods") }}</view> <view class="title">{{ $t('message.po_ReturnGoods') }}</view>
<view class="right"></view> <view class="right"></view>
</view> </view>
<u-form class="form" ref="form" :model="form" label-width="180rpx"> <u-form class="form" ref="form" :model="form" label-width="180rpx">
<u-form-item <u-form-item :required="true" :label="this.$t('message.dn_OddNumbers')" prop="documentNo">
:required="true" <u-search :placeholder="this.$t('message.dn_PleaseScan')" v-model="form.documentNo" @search="model.queryOrder" :show-action="false"></u-search>
:label="this.$t('message.dn_OddNumbers')"
prop="documentNo"
>
<u-search
:placeholder="this.$t('message.dn_PleaseScan')"
v-model="form.documentNo"
@search="model.queryOrder"
:show-action="false"
></u-search>
</u-form-item> </u-form-item>
<u-form-item :label="$t('message.po_Supplier')"> <u-form-item :label="$t('message.po_Supplier')">
<u-input <u-input v-model="model.orderInInfo.supplyCode" :placeholder="$t('message.po_PleaseInput')" />
v-model="model.orderInInfo.supplyCode"
:placeholder="$t('message.po_PleaseInput')"
/>
</u-form-item> </u-form-item>
<u-form-item :label="$t('message.po_OrderType')"> <u-form-item :label="$t('message.po_OrderType')">
<u-input <u-input v-model="model.orderInInfo.poType" :placeholder="$t('message.po_PleaseInput')" />
v-model="model.orderInInfo.poType"
:placeholder="$t('message.po_PleaseInput')"
/>
</u-form-item> </u-form-item>
<u-form-item :label="$t('message.po_Location')"> <u-form-item :label="$t('message.po_Location')">
<u-input <u-input :disabled="true" v-model="model.orderInInfo.wlCode" placeholder="" />
:disabled="true"
v-model="model.orderInInfo.wlCode"
placeholder=""
/>
</u-form-item> </u-form-item>
</u-form> </u-form>
<view class="bottom-bar"> <view class="bottom-bar">
<u-row class="button-bar"> <u-row class="button-bar">
<u-col :span="6"> <u-col :span="6">
<u-button type="primary" @click="onSubmit">{{ <u-button type="primary" @click="onSubmit">{{ $t('message.po_Continue') }}</u-button>
$t("message.po_Continue")
}}</u-button>
</u-col> </u-col>
<u-col :span="6"> <u-col :span="6">
<u-button type="error" @click="back">{{ <u-button type="error" @click="back">{{ $t('message.po_Return') }}</u-button>
$t("message.po_Return")
}}</u-button>
</u-col> </u-col>
</u-row> </u-row>
</view> </view>
@ -61,10 +35,10 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Ref } from "vue-property-decorator"; import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from "@/components/base/page"; import { BasePage } from '@/components/base/page';
import { VForm, VFormRules } from "vue/types/form"; import { VForm, VFormRules } from 'vue/types/form';
import model from "./model"; import model from './model';
interface OptionType { interface OptionType {
label: string; label: string;
@ -76,7 +50,7 @@ export default class dnReturnGoodsDom extends BasePage {
/** /**
* 表单引用 * 表单引用
*/ */
@Ref("form") readonly $form!: VForm; @Ref('form') readonly $form!: VForm;
/** /**
* 页面Module * 页面Module
@ -95,13 +69,11 @@ export default class dnReturnGoodsDom extends BasePage {
cboPlaceSelect = false; cboPlaceSelect = false;
rules: VFormRules<any> = { rules: VFormRules<any> = {
documentNo: [ documentNo: [{ required: true, message: this.$t('message.dn_PleaseScan') as string }],
{ required: true, message: this.$t("message.dn_PleaseScan") as string },
],
// cboPlace: [{ required: true, message: 'sap' }], // cboPlace: [{ required: true, message: 'sap' }],
}; };
value = ""; value = '';
show = false; show = false;
// onReadyonLoad // onReadyonLoad
@ -112,9 +84,9 @@ export default class dnReturnGoodsDom extends BasePage {
this.$form.resetFields(); this.$form.resetFields();
// this.model.orderInInfo.carNo = ''; // this.model.orderInInfo.carNo = '';
// this.model.orderInInfo.bookingTime = ''; // this.model.orderInInfo.bookingTime = '';
this.model.orderInInfo.supplyCode = ""; this.model.orderInInfo.supplyCode = '';
this.model.orderInInfo.poType = ""; this.model.orderInInfo.poType = '';
this.model.orderInInfo.location = ""; this.model.orderInInfo.location = '';
} }
back() { back() {
uni.navigateBack({ delta: 1 }); uni.navigateBack({ delta: 1 });
@ -124,10 +96,7 @@ export default class dnReturnGoodsDom extends BasePage {
if (!valid) return; if (!valid) return;
console.log(1); console.log(1);
if (this.model.orderInInfo == []) { if (this.model.orderInInfo == []) {
uni.showToast({ this.customToast(this.$t('message.dn_PleaseScan') as string);
icon: "none",
title: this.$t("message.dn_PleaseScan") as string,
});
return; return;
} }
this.toPage(this.page.raw.ingoods.dnReturnGoods.location); this.toPage(this.page.raw.ingoods.dnReturnGoods.location);
@ -138,8 +107,7 @@ export default class dnReturnGoodsDom extends BasePage {
<style lang="scss" scoped> <style lang="scss" scoped>
.page-raw-receipt { .page-raw-receipt {
background: #f2f2f2 background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx; background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx; padding: 118rpx 30rpx 162rpx;
min-height: 100%; min-height: 100%;

@ -4,20 +4,11 @@
<view class="left"> <view class="left">
<u-icon class="icon" name="arrow-left" @click="gohome" /> <u-icon class="icon" name="arrow-left" @click="gohome" />
</view> </view>
<view class="title">{{ $t("message.po_Detailed") }}</view> <view class="title">{{ $t('message.po_Detailed') }}</view>
<view class="right"></view> <view class="right"></view>
</view> </view>
<view class="table-wrapper"> <view class="table-wrapper">
<wyb-table <wyb-table class="table" ref="table" width="100%" enable-check="single" show-left-and-right-border :headers="headers" :contents="model.orderInInfoList" :show-vert-border="false"></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>
<view class="bottom-bar"> <view class="bottom-bar">
<!-- <div class="extra"> <!-- <div class="extra">
@ -59,29 +50,16 @@
<div class="container"> <div class="container">
<u-row> <u-row>
<u-col :span="3"> <u-col :span="3">
<u-button <u-button type="primary" @click="model.checkAllOrderInInfoList(!model.isCheckedAll)">
type="primary" {{ model.isCheckedAll ? this.$t('message.po_noSelectAll') : this.$t('message.po_SelectAll') }}
@click="model.checkAllOrderInInfoList(!model.isCheckedAll)"
>
{{
model.isCheckedAll
? this.$t("message.po_noSelectAll")
: this.$t("message.po_SelectAll")
}}
</u-button> </u-button>
</u-col> </u-col>
<u-col :span="3"> <u-col :span="3">
<u-button type="primary" class="appoint" @click="appoint">{{ <u-button type="primary" class="appoint" @click="appoint">{{ $t('message.Pi_distribution') }}</u-button>
$t("message.Pi_distribution")
}}</u-button>
</u-col> </u-col>
<u-col :span="3"> <u-col :span="3">
<u-button <u-button type="success" :loading="$wait.is('*submitOrderInEnter')" @click="onSubmit">
type="success" {{ $t('message.po_Submit') }}
:loading="$wait.is('*submitOrderInEnter')"
@click="onSubmit"
>
{{ $t("message.po_Submit") }}
</u-button> </u-button>
</u-col> </u-col>
<!-- <u-col :span="3">--> <!-- <u-col :span="3">-->
@ -90,9 +68,7 @@
<!-- </u-button>--> <!-- </u-button>-->
<!-- </u-col>--> <!-- </u-col>-->
<u-col :span="3"> <u-col :span="3">
<u-button type="error" @click="uni.navigateBack()">{{ <u-button type="error" @click="uni.navigateBack()">{{ $t('message.po_Return') }}</u-button>
$t("message.po_Return")
}}</u-button>
</u-col> </u-col>
</u-row> </u-row>
</div> </div>
@ -101,12 +77,12 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component } from "vue-property-decorator"; import { Component } from 'vue-property-decorator';
import { BasePage } from "@/components/base/page"; import { BasePage } from '@/components/base/page';
import model from "./model"; import model from './model';
import { headers } from "./config"; import { headers } from './config';
import jPicker from "@/components/J-Picker/jPicker.vue"; import jPicker from '@/components/J-Picker/jPicker.vue';
import { session } from "@/store/modules/session"; import { session } from '@/store/modules/session';
// import { page } from '@/utils/page'; // import { page } from '@/utils/page';
// @Component // @Component
@Component({ @Component({
@ -124,7 +100,7 @@ export default class RawReceiptDetail extends BasePage {
/** /**
* 库位 * 库位
*/ */
locationCode = ""; locationCode = '';
/** /**
* 表头 * 表头
@ -133,9 +109,9 @@ export default class RawReceiptDetail extends BasePage {
/** /**
* 实际数量 * 实际数量
*/ */
number = ""; number = '';
//PO //PO
poNo = ""; poNo = '';
/** /**
* 逐条修改 * 逐条修改
*/ */
@ -143,46 +119,40 @@ export default class RawReceiptDetail extends BasePage {
// //
onShow() { onShow() {
this.model.queryLocation(); this.model.queryLocation();
let ant: any = JSON.parse(sessionStorage.getItem("material") as string); let ant: any = JSON.parse(sessionStorage.getItem('material') as string);
let index: any = JSON.parse(sessionStorage.getItem("index") as string); let index: any = JSON.parse(sessionStorage.getItem('index') as string);
this.model.orderInInfoList[index] = ant; this.model.orderInInfoList[index] = ant;
console.log(this.model.orderInInfoList); console.log(this.model.orderInInfoList);
this.poNo = JSON.parse(sessionStorage.getItem("poNo") as string); this.poNo = JSON.parse(sessionStorage.getItem('poNo') as string);
sessionStorage.removeItem("material"); sessionStorage.removeItem('material');
sessionStorage.removeItem("index"); sessionStorage.removeItem('index');
} }
// //
gohome() { gohome() {
this.toPage(this.page.raw.ingoods.poReceipt.index); this.toPage(this.page.raw.ingoods.poReceipt.index);
sessionStorage.removeItem("material"); sessionStorage.removeItem('material');
sessionStorage.removeItem("index"); sessionStorage.removeItem('index');
sessionStorage.removeItem("poNo"); sessionStorage.removeItem('poNo');
} }
bookTypeChange(e: any) { bookTypeChange(e: any) {
this.locationCode = e.pickerName.value; this.locationCode = e.pickerName.value;
} }
changeNumber() { changeNumber() {
if (!this.model.hasChecked) { if (!this.model.hasChecked) {
uni.showToast({ this.customToast(this.$t('message.dn_Select') as string);
icon: "none",
title: this.$t("message.dn_Select") as string,
});
return; return;
} }
// //
this.model.orderInInfoList.forEach((item: any) => { this.model.orderInInfoList.forEach((item: any) => {
console.log("item.checked", item.checked); console.log('item.checked', item.checked);
if (item.checked) { if (item.checked) {
if (this.locationCode) { if (this.locationCode) {
item.location = this.locationCode; item.location = this.locationCode;
} }
if (this.number > item.requestAmount) { if (this.number > item.requestAmount) {
uni.showToast({ this.customToast(this.$t('message.dn_Tip') as string);
icon: "none",
title: this.$t("message.dn_Tip") as string,
});
return; return;
} else if (this.number == "") { } else if (this.number == '') {
item.receiptAmount = item.requestAmount; item.receiptAmount = item.requestAmount;
} else { } else {
item.receiptAmount = this.number; item.receiptAmount = this.number;
@ -207,21 +177,18 @@ export default class RawReceiptDetail extends BasePage {
}); });
if (i > 1) { if (i > 1) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: "只能选择一个PO单" as string, title: '只能选择一个PO单' as string,
}); });
} else if (i == 0) { } else if (i == 0) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: "请选择一个PO单" as string, title: '请选择一个PO单' as string,
}); });
} else { } else {
let mater: number = selectStatus.indexOf(true); let mater: number = selectStatus.indexOf(true);
sessionStorage.setItem( sessionStorage.setItem('mater', JSON.stringify(model.orderInInfoList[mater]) as string);
"mater", sessionStorage.setItem('index', JSON.stringify(mater) as string);
JSON.stringify(model.orderInInfoList[mater]) as string
);
sessionStorage.setItem("index", JSON.stringify(mater) as string);
this.toPage(this.page.raw.ingoods.poReceipt.idetailed); this.toPage(this.page.raw.ingoods.poReceipt.idetailed);
} }
} }
@ -232,8 +199,8 @@ export default class RawReceiptDetail extends BasePage {
// //
if (this.model.orderInInfoList.length === 0) { if (this.model.orderInInfoList.length === 0) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: this.$t("message.Pi_tip4") as string, title: this.$t('message.Pi_tip4') as string,
}); });
return; return;
} }
@ -245,31 +212,31 @@ export default class RawReceiptDetail extends BasePage {
} }
}); });
// //
if(checkData.length == 0){ if (checkData.length == 0) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: '请先选中要提交的数据' as string, title: '请先选中要提交的数据' as string,
}); });
return return;
} }
// //
let isTrue:boolean = true let isTrue: boolean = true;
checkData.forEach((item:any) => { checkData.forEach((item: any) => {
if(item.wllist == null || item.wllist.length == 0){ if (item.wllist == null || item.wllist.length == 0) {
uni.showToast({ uni.showToast({
icon: "none", icon: 'none',
title: '请确保所选数据都已分配库位' as string, title: '请确保所选数据都已分配库位' as string,
}); });
isTrue = false isTrue = false;
return; return;
} }
}) });
if(isTrue == true){ if (isTrue == true) {
await this.model.submitOrderInEnter(checkData); await this.model.submitOrderInEnter(checkData);
this.locationCode = ""; this.locationCode = '';
this.model.orderInInfo.supplyCode = ""; this.model.orderInInfo.supplyCode = '';
this.model.orderInInfo.poType = ""; this.model.orderInInfo.poType = '';
this.model.orderInInfo.location = ""; this.model.orderInInfo.location = '';
this.model.queryOrderInInfo(this.poNo); this.model.queryOrderInInfo(this.poNo);
await this.redirectTo(this.page.raw.ingoods.poReceipt.detail); await this.redirectTo(this.page.raw.ingoods.poReceipt.detail);
} }
@ -282,8 +249,7 @@ export default class RawReceiptDetail extends BasePage {
<style lang="scss" scoped> <style lang="scss" scoped>
.page-receipt-detail { .page-receipt-detail {
background: #f2f2f2 background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx; background-size: 100% 600rpx;
padding: 30rpx; padding: 30rpx;
min-height: 100%; min-height: 100%;

@ -69,10 +69,7 @@ export default class KanDanHandOverDetails extends BasePage {
} }
}); });
if (orderlist.length == 0) { if (orderlist.length == 0) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip18') as string);
icon: 'none',
title: '请先选中要移库的数据' as any,
});
return; return;
} }
orderlist.forEach((item: any) => { orderlist.forEach((item: any) => {

@ -75,14 +75,14 @@ export default class KanDanHandOver extends BasePage {
// //
async query() { async query() {
if (this.order3 === '') { if (this.order3 === '') {
uni.showToast({ icon: 'none', title: this.$t('message.Commission_tips1') as string }); this.customToast(this.$t('message.Commission_tips1') as string);
return; return;
} else { } else {
await this.model.takeLYOrder({ await this.model.takeLYOrder({
order3: this.order3, order3: this.order3,
}); });
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ icon: 'none', title: this.$t('message.successful') as string }); uni.showToast({ icon: 'success', title: this.$t('message.successful') as string });
this.model.orderInInfoList.forEach((item: any) => { this.model.orderInInfoList.forEach((item: any) => {
item.fileNo = ''; item.fileNo = '';
let arr: any = { let arr: any = {
@ -108,15 +108,15 @@ export default class KanDanHandOver extends BasePage {
// //
async submit() { async submit() {
if (this.order3 === '') { if (this.order3 === '') {
uni.showToast({ icon: 'none', title: this.$t('message.Commission_tips1') as string }); this.customToast(this.$t('message.Commission_tips1') as string);
return; return;
} }
if (!this.Some) { if (!this.Some) {
uni.showToast({ icon: 'none', title: this.$t('message.Warehouse_Tip5') as string }); this.customToast(this.$t('message.Warehouse_Tip5') as string);
return; return;
} }
if (this.Some.fileNo == '' || this.Some.fileNo == null || this.Some.fileNo == undefined) { if (this.Some.fileNo == '' || this.Some.fileNo == null || this.Some.fileNo == undefined) {
uni.showToast({ icon: 'none', title: this.$t('message.fileNumber') as string }); this.customToast(this.$t('message.fileNumber') as string);
return; return;
} }
let orderlist = []; let orderlist = [];
@ -126,7 +126,7 @@ export default class KanDanHandOver extends BasePage {
orderlist.push(this.Some); orderlist.push(this.Some);
await model.onTakeoutConfirm(orderlist); await model.onTakeoutConfirm(orderlist);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ icon: 'none', title: this.$t('message.success') as string }); uni.showToast({ icon: 'success', title: this.$t('message.success') as string });
this.Some = {}; this.Some = {};
this.Some.fileNo = ' '; this.Some.fileNo = ' ';
this.wl = {}; this.wl = {};

@ -4,20 +4,11 @@
<view class="left"> <view class="left">
<u-icon class="icon" name="arrow-left" @click="gohome" /> <u-icon class="icon" name="arrow-left" @click="gohome" />
</view> </view>
<view class="title">{{ $t("message.dn_Detailed") }}</view> <view class="title">{{ $t('message.dn_Detailed') }}</view>
<view class="right"></view> <view class="right"></view>
</view> </view>
<view class="table-wrapper"> <view class="table-wrapper">
<wyb-table <wyb-table class="table" ref="table" width="100%" enable-check="single" show-left-and-right-border :headers="headers" :contents="model.orderInInfoList" :show-vert-border="false"></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>
<view class="bottom-bar"> <view class="bottom-bar">
<!-- <div> <!-- <div>
@ -28,35 +19,20 @@
<div class="container"> <div class="container">
<u-row> <u-row>
<u-col :span="3"> <u-col :span="3">
<u-button <u-button type="warning" @click="model.checkAllOrderInInfoList(!model.isCheckedAll)">
type="warning" {{ model.isCheckedAll ? this.$t('message.po_noSelectAll') : this.$t('message.po_SelectAll') }}
@click="model.checkAllOrderInInfoList(!model.isCheckedAll)"
>
{{
model.isCheckedAll
? this.$t("message.po_noSelectAll")
: this.$t("message.po_SelectAll")
}}
</u-button> </u-button>
</u-col> </u-col>
<u-col :span="3"> <u-col :span="3">
<u-button type="primary" class="appoint" @click="appoint">{{ <u-button type="primary" class="appoint" @click="appoint">{{ $t('message.Pi_distribution') }}</u-button>
$t("message.Pi_distribution")
}}</u-button>
</u-col> </u-col>
<u-col :span="3"> <u-col :span="3">
<u-button <u-button type="success" :loading="$wait.is('*submitOrderInEnter')" @click="onSubmit">
type="success" {{ $t('message.po_Submit') }}
:loading="$wait.is('*submitOrderInEnter')"
@click="onSubmit"
>
{{ $t("message.po_Submit") }}
</u-button> </u-button>
</u-col> </u-col>
<u-col :span="3"> <u-col :span="3">
<u-button type="error" @click="gohome">{{ <u-button type="error" @click="gohome">{{ $t('message.po_Return') }}</u-button>
$t("message.po_Return")
}}</u-button>
</u-col> </u-col>
</u-row> </u-row>
</div> </div>
@ -66,13 +42,13 @@
<script lang="ts"> <script lang="ts">
// inventory // inventory
import { Component } from "vue-property-decorator"; import { Component } from 'vue-property-decorator';
import { BasePage } from "@/components/base/page"; import { BasePage } from '@/components/base/page';
import model from "./model"; import model from './model';
import { headers } from "./config"; import { headers } from './config';
import jPicker from "@/components/J-Picker/jPicker.vue"; import jPicker from '@/components/J-Picker/jPicker.vue';
import { session } from "@/store/modules/session"; import { session } from '@/store/modules/session';
import { truncate } from "lodash"; import { truncate } from 'lodash';
// @Component // @Component
@Component({ @Component({
components: { components: {
@ -85,30 +61,30 @@ export default class RawReceiptDetail extends BasePage {
*/ */
model = model; model = model;
factoryCode = session.factoryCode; factoryCode = session.factoryCode;
locationCode = ""; locationCode = '';
/** /**
* 实际数量 * 实际数量
*/ */
number = ""; number = '';
/** /**
* 表头 * 表头
*/ */
headers = headers; headers = headers;
dnNo = ""; dnNo = '';
onShow() { onShow() {
this.model.queryLocation(); this.model.queryLocation();
let ant: any = JSON.parse(sessionStorage.getItem("material") as string); let ant: any = JSON.parse(sessionStorage.getItem('material') as string);
let index: any = JSON.parse(sessionStorage.getItem("index") as string); let index: any = JSON.parse(sessionStorage.getItem('index') as string);
this.model.orderInInfoList[index] = ant; this.model.orderInInfoList[index] = ant;
this.dnNo = JSON.parse(sessionStorage.getItem("dnNo") as string); this.dnNo = JSON.parse(sessionStorage.getItem('dnNo') as string);
sessionStorage.removeItem("material"); sessionStorage.removeItem('material');
sessionStorage.removeItem("index"); sessionStorage.removeItem('index');
} }
gohome() { gohome() {
this.toPage(this.page.raw.ingoods.dnReceipt.index); this.toPage(this.page.raw.ingoods.dnReceipt.index);
sessionStorage.removeItem("material"); sessionStorage.removeItem('material');
sessionStorage.removeItem("index"); sessionStorage.removeItem('index');
sessionStorage.removeItem("dnNo"); sessionStorage.removeItem('dnNo');
} }
bookTypeChange(e: any) { bookTypeChange(e: any) {
this.locationCode = e.pickerName.value; this.locationCode = e.pickerName.value;
@ -118,10 +94,7 @@ export default class RawReceiptDetail extends BasePage {
*/ */
changeNumber() { changeNumber() {
if (!this.model.hasChecked) { if (!this.model.hasChecked) {
uni.showToast({ this.customToast(this.$t('message.dn_Select') as string);
icon: "none",
title: this.$t("message.dn_Select") as string,
});
return; return;
} }
// //
@ -131,18 +104,12 @@ export default class RawReceiptDetail extends BasePage {
item.location = this.locationCode; item.location = this.locationCode;
} }
if (this.number > item.requestAmount) { if (this.number > item.requestAmount) {
uni.showToast({ this.customToast(this.$t('message.dn_Tip') as string);
icon: "none",
title: this.$t("message.dn_Tip") as string,
});
return; return;
} else if (this.number == "") { } else if (this.number == '') {
item.receiptAmount = item.requestAmount; item.receiptAmount = item.requestAmount;
} else if (this.number < item.requestAmount) { } else if (this.number < item.requestAmount) {
uni.showToast({ this.customToast(this.$t('message.dn_Tip3') as string);
icon: "none",
title: this.$t("message.dn_Tip3") as string,
});
item.receiptAmount = this.number; item.receiptAmount = this.number;
} else { } else {
item.receiptAmount = this.number; item.receiptAmount = this.number;
@ -165,22 +132,13 @@ export default class RawReceiptDetail extends BasePage {
} }
}); });
if (i > 1) { if (i > 1) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip16') as string);
icon: "none",
title: "只能选择一个DN单" as string,
});
} else if (i == 0) { } else if (i == 0) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip17') as string);
icon: "none",
title: "请选择一个DN单" as string,
});
} else { } else {
let mater: number = selectStatus.indexOf(true); let mater: number = selectStatus.indexOf(true);
sessionStorage.setItem( sessionStorage.setItem('mater', JSON.stringify(model.orderInInfoList[mater]) as string);
"mater", sessionStorage.setItem('index', JSON.stringify(mater) as string);
JSON.stringify(model.orderInInfoList[mater]) as string
);
sessionStorage.setItem("index", JSON.stringify(mater) as string);
this.redirectTo(this.page.raw.ingoods.dnReceipt.idetailed); this.redirectTo(this.page.raw.ingoods.dnReceipt.idetailed);
} }
} }
@ -214,15 +172,15 @@ export default class RawReceiptDetail extends BasePage {
// return; // return;
// } // }
await this.model.submitOrderInEnter(); await this.model.submitOrderInEnter();
this.locationCode = ""; this.locationCode = '';
// setTimeout(() => { // setTimeout(() => {
// uni.navigateBack({ delta: 1 }); // uni.navigateBack({ delta: 1 });
// }, 2000); // }, 2000);
this.model.orderInInfo.carNo = ""; this.model.orderInInfo.carNo = '';
this.model.orderInInfo.bookingTime = ""; this.model.orderInInfo.bookingTime = '';
this.model.orderInInfo.supplyCode = ""; this.model.orderInInfo.supplyCode = '';
this.model.orderInInfo.poType = ""; this.model.orderInInfo.poType = '';
this.model.orderInInfo.location = ""; this.model.orderInInfo.location = '';
this.model.queryOrderInInfo(this.dnNo); this.model.queryOrderInInfo(this.dnNo);
// if (selectStatus[0]) { // if (selectStatus[0]) {
// await this.model.submitOrderInEnter(); // await this.model.submitOrderInEnter();
@ -248,8 +206,7 @@ export default class RawReceiptDetail extends BasePage {
<style lang="scss" scoped> <style lang="scss" scoped>
.page-receipt-detail { .page-receipt-detail {
background: #f2f2f2 background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx; background-size: 100% 600rpx;
padding: 30rpx; padding: 30rpx;
min-height: 100%; min-height: 100%;

@ -1,72 +1,36 @@
<template> <template>
<view class="page-raw-receipt"> <view class="page-raw-receipt">
<view <view class="header" :style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }">
class="header"
:style="{ backgroundColor: `rgba(23, 83, 234, ${scrollTop / 100})` }"
>
<view class="left"> <view class="left">
<u-icon class="icon" name="arrow-left" @click="back" /> <u-icon class="icon" name="arrow-left" @click="back" />
</view> </view>
<view class="title">{{ $t("message.raw_Inventory") }}</view> <view class="title">{{ $t('message.raw_Inventory') }}</view>
<view class="right"></view> <view class="right"></view>
</view> </view>
<u-form class="form" ref="form" :model="form" label-width="180rpx"> <u-form class="form" ref="form" :model="form" label-width="180rpx">
<u-form-item <u-form-item :required="true" :label="$t('message.InventoryOrderNo')" prop="pddNo">
:required="true" <u-search :placeholder="$t('message.InventoryPleaseScan')" v-model="form.pddNo" @search="model.rawMaterialInventoryCheckRaw" :show-action="false"></u-search>
:label="$t('message.InventoryOrderNo')"
prop="pddNo"
>
<u-search
:placeholder="$t('message.InventoryPleaseScan')"
v-model="form.pddNo"
@search="model.rawMaterialInventoryCheckRaw"
:show-action="false"
></u-search>
</u-form-item> </u-form-item>
<u-form-item <u-form-item :label="$t('message.InventoryMaterielNo')" prop="productCode">
:label="$t('message.InventoryMaterielNo')" <u-search :placeholder="$t('message.po_PleaseInput')" v-model="form.productCode" @search="checkRawProductCode" :show-action="false"></u-search>
prop="productCode"
>
<u-search
:placeholder="$t('message.po_PleaseInput')"
v-model="form.productCode"
@search="checkRawProductCode"
:show-action="false"
></u-search>
</u-form-item> </u-form-item>
<u-form-item <u-form-item :label="$t('message.InventoryMateriel')" prop="productDescZh">
:label="$t('message.InventoryMateriel')" <u-input v-model="form.productDescZh" :placeholder="$t('message.po_PleaseInput')" />
prop="productDescZh"
>
<u-input
v-model="form.productDescZh"
:placeholder="$t('message.po_PleaseInput')"
/>
</u-form-item> </u-form-item>
<u-form-item :label="$t('message.InventoryTotalNumber')" prop="spQty"> <u-form-item :label="$t('message.InventoryTotalNumber')" prop="spQty">
<u-input <u-input v-model="form.spQty" :placeholder="$t('message.po_PleaseInput')" type="number" />
v-model="form.spQty"
:placeholder="$t('message.po_PleaseInput')"
type="number"
/>
</u-form-item> </u-form-item>
</u-form> </u-form>
<view class="bottom-bar"> <view class="bottom-bar">
<u-row class="button-bar"> <u-row class="button-bar">
<u-col :span="4"> <u-col :span="4">
<u-button type="primary" @click="checkRawCreateInfo">{{ <u-button type="primary" @click="checkRawCreateInfo">{{ $t('message.workArea_Confirm') }}</u-button>
$t("message.workArea_Confirm")
}}</u-button>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="4">
<u-button type="primary" @click="checkRawOrderComplete">{{ <u-button type="primary" @click="checkRawOrderComplete">{{ $t('message.InventoryFinish') }}</u-button>
$t("message.InventoryFinish")
}}</u-button>
</u-col> </u-col>
<u-col :span="4"> <u-col :span="4">
<u-button type="error" @click="back">{{ <u-button type="error" @click="back">{{ $t('message.po_Return') }}</u-button>
$t("message.po_Return")
}}</u-button>
</u-col> </u-col>
</u-row> </u-row>
</view> </view>
@ -74,10 +38,10 @@
</template> </template>
<script lang="ts"> <script lang="ts">
import { Component, Ref } from "vue-property-decorator"; import { Component, Ref } from 'vue-property-decorator';
import { BasePage } from "@/components/base/page"; import { BasePage } from '@/components/base/page';
import { VForm, VFormRules } from "vue/types/form"; import { VForm, VFormRules } from 'vue/types/form';
import model from "./model"; import model from './model';
// interface OptionType { // interface OptionType {
// label: string; // label: string;
@ -89,7 +53,7 @@ export default class rawMaterialInventory extends BasePage {
/** /**
* 表单引用 * 表单引用
*/ */
@Ref("form") readonly $form!: VForm; @Ref('form') readonly $form!: VForm;
/** /**
* 页面Module * 页面Module
@ -117,13 +81,11 @@ export default class rawMaterialInventory extends BasePage {
cboPlaceSelect = false; cboPlaceSelect = false;
rules: VFormRules<any> = { rules: VFormRules<any> = {
pddNo: [ pddNo: [{ required: true, message: this.$t('message.dn_PleaseScan') as string }],
{ required: true, message: this.$t("message.dn_PleaseScan") as string },
],
// cboPlace: [{ required: true, message: this.$t('message.Warehouse_Tip10') as string }], // cboPlace: [{ required: true, message: this.$t('message.Warehouse_Tip10') as string }],
}; };
value = ""; value = '';
show = false; show = false;
// //
@ -132,7 +94,7 @@ export default class rawMaterialInventory extends BasePage {
productCode, productCode,
pddNo: this.form.pddNo, pddNo: this.form.pddNo,
}); });
console.log("result:::", result); console.log('result:::', result);
this.status = result.isState; this.status = result.isState;
} }
checkRawCreateInfo() { checkRawCreateInfo() {
@ -153,11 +115,11 @@ export default class rawMaterialInventory extends BasePage {
//this.model.queryLocation(); //this.model.queryLocation();
// //
this.$form.resetFields(); this.$form.resetFields();
this.model.orderInInfo.carNo = ""; this.model.orderInInfo.carNo = '';
this.model.orderInInfo.bookingTime = ""; this.model.orderInInfo.bookingTime = '';
this.model.orderInInfo.supplyCode = ""; this.model.orderInInfo.supplyCode = '';
this.model.orderInInfo.poType = ""; this.model.orderInInfo.poType = '';
this.model.orderInInfo.location = ""; this.model.orderInInfo.location = '';
} }
back() { back() {
uni.navigateBack({ delta: 1 }); uni.navigateBack({ delta: 1 });
@ -166,10 +128,7 @@ export default class rawMaterialInventory extends BasePage {
this.$form.validate((valid: boolean) => { this.$form.validate((valid: boolean) => {
if (!valid) return; if (!valid) return;
if (!this.model.hasDnInfo) { if (!this.model.hasDnInfo) {
uni.showToast({ this.customToast(this.$t('message.dn_PleaseScan') as string);
icon: "none",
title: this.$t("message.dn_PleaseScan") as string,
});
return; return;
} }
// sessionStorage.setItem( // sessionStorage.setItem(
@ -186,8 +145,7 @@ export default class rawMaterialInventory extends BasePage {
<style lang="scss" scoped> <style lang="scss" scoped>
.page-raw-receipt { .page-raw-receipt {
background: #f2f2f2 background: #f2f2f2 linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
linear-gradient(0deg, #f2f2f2 0%, #4a78ea 51%, #1753ea 100%) no-repeat;
background-size: 100% 600rpx; background-size: 100% 600rpx;
padding: 118rpx 30rpx 162rpx; padding: 118rpx 30rpx 162rpx;
min-height: 100%; min-height: 100%;

@ -84,10 +84,7 @@ export default class KanDanHandOverDetails extends BasePage {
} }
}); });
if (orderlist.length == 0) { if (orderlist.length == 0) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip18') as string);
icon: "none",
title: "请先选中要移库的数据" as any,
});
return; return;
} }
orderlist.forEach((item: any) => { orderlist.forEach((item: any) => {

@ -79,14 +79,14 @@ export default class KanDanHandOver extends BasePage {
// //
async query() { async query() {
if (this.order3 === '') { if (this.order3 === '') {
uni.showToast({ icon: 'none', title: this.$t('message.Commission_tips1') as string }); this.customToast(this.$t('message.Commission_tips1') as string);
return; return;
} else { } else {
await this.model.takeOrder({ await this.model.takeOrder({
order3: this.order3, order3: this.order3,
}); });
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ icon: 'none', title: this.$t('message.successful') as string }); uni.showToast({ icon: 'success', title: this.$t('message.successful') as string });
this.model.orderInInfoList.forEach((item: any) => { this.model.orderInInfoList.forEach((item: any) => {
item.fileNo = ''; item.fileNo = '';
let arr: any = { let arr: any = {
@ -112,15 +112,15 @@ export default class KanDanHandOver extends BasePage {
// //
async submit() { async submit() {
if (this.order3 === '') { if (this.order3 === '') {
uni.showToast({ icon: 'none', title: this.$t('message.Commission_tips1') as string }); this.customToast(this.$t('message.Commission_tips1') as string);
return; return;
} }
if (!this.Some) { if (!this.Some) {
uni.showToast({ icon: 'none', title: this.$t('message.Warehouse_Tip5') as string }); this.customToast(this.$t('message.Warehouse_Tip5') as string);
return; return;
} }
if (this.Some.fileNo == '' || this.Some.fileNo == null || this.Some.fileNo == undefined) { if (this.Some.fileNo == '' || this.Some.fileNo == null || this.Some.fileNo == undefined) {
uni.showToast({ icon: 'none', title: this.$t('message.fileNumber') as string }); this.customToast(this.$t('message.fileNumber') as string);
return; return;
} }
let orderlist = []; let orderlist = [];
@ -130,7 +130,7 @@ export default class KanDanHandOver extends BasePage {
orderlist.push(this.Some); orderlist.push(this.Some);
await model.onTakeoutConfirm(orderlist); await model.onTakeoutConfirm(orderlist);
if (this.model.code == '1') { if (this.model.code == '1') {
uni.showToast({ icon: 'none', title: this.$t('message.success') as string }); uni.showToast({ icon: 'success', title: this.$t('message.success') as string });
this.Some = {}; this.Some = {};
this.Some.fileNo = ' '; this.Some.fileNo = ' ';
this.wl = {}; this.wl = {};

@ -91,10 +91,7 @@ export default class KanDanHandOverDetails extends BasePage {
} }
}); });
if (orderlist.length == 0) { if (orderlist.length == 0) {
uni.showToast({ this.customToast(this.$t('message.Pi_tip18') as string);
icon: 'none',
title: '请先选中要移库的数据' as any,
});
return; return;
} }
orderlist.forEach((item: any) => { orderlist.forEach((item: any) => {

@ -67,14 +67,14 @@ export default class KanDanHandOver extends BasePage {
// //
async query() { async query() {
if (this.order3 === '') { if (this.order3 === '') {
uni.showToast({ icon: 'none', title: this.$t('message.Warehouse_Tip') as string }); this.customToast(this.$t('message.Warehouse_Tip') as string);
return; return;
} else { } else {
await this.model.takeYKOrder({ await this.model.takeYKOrder({
order3: this.order3, order3: this.order3,
}); });
if (model.code == '1') { if (model.code == '1') {
uni.showToast({ icon: 'none', title: this.$t('message.successful') as string }); uni.showToast({ icon: 'success', title: this.$t('message.successful') as string });
this.orderlist = model.materielList[0]; this.orderlist = model.materielList[0];
this.NEWqty = model.materielList[0].qty; this.NEWqty = model.materielList[0].qty;
} }
@ -93,19 +93,19 @@ export default class KanDanHandOver extends BasePage {
// //
async submit() { async submit() {
if (this.order3 == '') { if (this.order3 == '') {
uni.showToast({ icon: 'none', title: this.$t('message.InventoryPleaseScan') as string }); this.customToast(this.$t('message.InventoryPleaseScan') as string);
return; return;
} }
if (this.orderlist.length == 0) { if (this.orderlist.length == 0) {
uni.showToast({ icon: 'none', title: this.$t('message.Commission_tips6') as string }); this.customToast(this.$t('message.Commission_tips6') as string);
return; return;
} }
if (this.NEWqty == '' || parseFloat(this.NEWqty) == 0) { if (this.NEWqty == '' || parseFloat(this.NEWqty) == 0) {
uni.showToast({ icon: 'none', title: this.$t('message.PleaseQuantity') as string }); this.customToast(this.$t('message.PleaseQuantity') as string);
return; return;
} }
if (parseFloat(this.NEWqty) > parseFloat(this.orderlist.qty)) { if (parseFloat(this.NEWqty) > parseFloat(this.orderlist.qty)) {
uni.showToast({ icon: 'none', title: this.$t('message.greater') as string }); this.customToast(this.$t('message.greater') as string);
return; return;
} }
this.orderlist.type = '1'; this.orderlist.type = '1';
@ -116,7 +116,7 @@ export default class KanDanHandOver extends BasePage {
arr.push(this.orderlist); arr.push(this.orderlist);
await model.onTakeoutConfirm(arr); await model.onTakeoutConfirm(arr);
if (model.code == '1') { if (model.code == '1') {
uni.showToast({ icon: 'none', title: this.$t('message.Warehouse_Tip9') as string }); this.customToast(this.$t('message.Warehouse_Tip9') as string);
model.empty(); model.empty();
setTimeout(() => { setTimeout(() => {
this.toPage(this.page.raw.warehouse.rowTransfer.index); this.toPage(this.page.raw.warehouse.rowTransfer.index);

Loading…
Cancel
Save