hou 3 years ago
commit d784d8feb8

@ -145,7 +145,7 @@ export default class LoginPage extends BasePage {
onReady(): void { onReady(): void {
this.$form.setRules(this.rules); this.$form.setRules(this.rules);
this.update(); //this.update();
console.log('image', this.image); console.log('image', this.image);
console.log("Version////",this.Version); console.log("Version////",this.Version);
} }

@ -139,6 +139,7 @@ export default class dnReceiptDom extends BasePage {
pickerName.sendSpot = item.sendSpot; pickerName.sendSpot = item.sendSpot;
this.Location.push(pickerName); this.Location.push(pickerName);
}); });
this.wlCode = this.Location[0];
console.log('库位列表', this.Location); console.log('库位列表', this.Location);
} }
// //

@ -130,6 +130,7 @@ export default class dnReceiptDom extends BasePage {
pickerName.sendSpot = item.sendSpot; pickerName.sendSpot = item.sendSpot;
this.Loc.push(pickerName); this.Loc.push(pickerName);
}); });
this.wlCode = this.Loc[0];
} }
empty() { empty() {
this.list = []; this.list = [];

@ -2,7 +2,7 @@
<view class="page-picking-order"> <view class="page-picking-order">
<view class="header"> <view class="header">
<view class="left"> <view class="left">
<u-icon class="icon" name="arrow-left" @click="uni.navigateBack({delta:1})" /> <u-icon class="icon" name="arrow-left" @click="uni.navigateBack({ delta: 1 })" />
</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>
@ -58,19 +58,19 @@
<!-- 库存地点 --> <!-- 库存地点 -->
<view class="number-left"> <view class="number-left">
<view class="number-left-title">{{ $t('message.po_Location') }}:</view> <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';"/> <u-input v-model="some.wlCode" placeholder=" " :type="type" :border="border" class="input" disabled style="padding: '0'" />
</view> </view>
<!-- 累计 --> <!-- 累计 -->
<view class="number-right"> <view class="number-right">
<view class="number-right-title">{{ $t('message.total') }}:</view> <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 /> <u-input placeholder=" " v-model="some.receiptAmount" :type="type" :border="border" class="input" style="padding: '0'" disabled />
</view> </view>
</view> </view>
<!-- 库位 --> <!-- 库位 -->
<view class="library"> <view class="library">
<!-- 库位 --> <!-- 库位 -->
<view class="library-left"> <view class="library-left">
<view style="text-align:left">{{ $t('message.CommissionedLocation') }}:</view> <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" /> <jPicker sureColor="#ff0000" style="width: 230rpx" @bindpicker="LocationChoice" showKey="value" valKey="value" :val="wlCode.value" class="search" :options="Location" />
</view> </view>
<!-- 本次 --> <!-- 本次 -->
@ -144,17 +144,17 @@ export default class RawReceiptDetail extends BasePage {
* 页面Module * 页面Module
*/ */
model = model; model = model;
materialList:any = [] materialList: any = [];
type = 'text'; type = 'text';
wlCode: any = ''; wlCode: any = '';
wl:any = {} wl: any = {};
border = true; border = true;
// //
LocationList: any = []; LocationList: any = [];
// //
Location: any = []; Location: any = [];
some: any = {}; some: any = {};
someIndex:any = 0 someIndex: any = 0;
qty: any = ''; qty: any = '';
/** /**
* 表单数据 * 表单数据
@ -164,17 +164,16 @@ export default class RawReceiptDetail extends BasePage {
amount: null, amount: null,
}; };
rules: VFormRules<any> = { rules: VFormRules<any> = {
amount: [ amount: [{ required: true, message: this.$t('message.Pi_tip1') as string }],
{ required: true, message: this.$t('message.Pi_tip1') as string },
],
}; };
locationCodeSelect = false; locationCodeSelect = false;
headers = headers; headers = headers;
// //
async onReady() { async onReady() {
await this.GetLocation() await this.GetLocation();
this.wlCode = this.Location[0];
} }
async GetLocation(){ async GetLocation() {
let content = { let content = {
loginName: session.loginName, loginName: session.loginName,
factoryCode: session.factoryCode, factoryCode: session.factoryCode,
@ -190,41 +189,41 @@ export default class RawReceiptDetail extends BasePage {
}); });
this.wlCode = this.Location[0] this.wlCode = this.Location[0]
} }
onUpload(){ onUpload() {
uni.navigateBack({delta:1}) uni.navigateBack({ delta: 1 });
} }
async query(){ async query() {
if(!this.form.documentNo){ if (!this.form.documentNo) {
this.customToast(this.$t('message.Commission_tips1') as any); this.customToast(this.$t('message.Commission_tips1') as any);
return return;
} }
await this.model.queryOrder(this.form.documentNo).then(() =>{ await this.model.queryOrder(this.form.documentNo).then(() => {
if(this.model.code == '1'){ if (this.model.code == '1') {
this.model.dnReturnList.forEach((item:any) =>{ this.model.dnReturnList.forEach((item: any) => {
let arr = { let arr = {
label:item.materialCode, label: item.materialCode,
value:item.materialCode + '(' + item.poLine + ')', value: item.materialCode + '(' + item.poLine + ')',
Line:item.poLine, Line: item.poLine,
poNo:item.poNo, poNo: item.poNo,
} };
this.materialList.push(arr) this.materialList.push(arr);
}) });
this.wl = this.materialList[0] this.wl = this.materialList[0];
this.some = this.model.dnReturnList[0] this.some = this.model.dnReturnList[0];
console.log('this.some',this.some) console.log('this.some', this.some);
} }
}) });
} }
materialChoice(e:any){ materialChoice(e: any) {
console.log('e',e) console.log('e', e);
this.model.dnReturnList.forEach((item:any,index:any) =>{ this.model.dnReturnList.forEach((item: any, index: any) => {
if(item.poLine == e.pickerName.Line && item.materialCode == e.pickerName.label && item.poNo == e.pickerName.poNo){ if (item.poLine == e.pickerName.Line && item.materialCode == e.pickerName.label && item.poNo == e.pickerName.poNo) {
this.some = item this.some = item;
this.someIndex = index this.someIndex = index;
} }
}) });
console.log('this.some',this.some) console.log('this.some', this.some);
console.log('this.someIndex',this.someIndex) console.log('this.someIndex', this.someIndex);
} }
// //
LocationChoice(e: any) { LocationChoice(e: any) {
@ -233,7 +232,7 @@ export default class RawReceiptDetail extends BasePage {
// //
Add() { Add() {
if (this.qty == '' || this.wlCode == '') { if (this.qty == '' || this.wlCode == '') {
this.customToast(this.$t('message.Commission_tips2') as any); this.customToast(this.$t('message.Commission_tips2') as any);
return; return;
} }
if (parseFloat(this.qty) <= 0) { if (parseFloat(this.qty) <= 0) {
@ -248,75 +247,75 @@ export default class RawReceiptDetail extends BasePage {
this.customToast(this.$t('message.Commission_tips6') as any); this.customToast(this.$t('message.Commission_tips6') as any);
return; return;
} }
let num: number = parseFloat(this.qty) + parseFloat(this.some.receiptAmount) let num: number = parseFloat(this.qty) + parseFloat(this.some.receiptAmount);
if (num > parseFloat(this.some.poAmount)) { if (num > parseFloat(this.some.poAmount)) {
this.customToast(this.$t('message.dn_Tip2') as any); this.customToast(this.$t('message.dn_Tip2') as any);
return; return;
} }
let arr = { let arr = {
poNo:this.some.poNo, poNo: this.some.poNo,
poLine:this.some.poLine, poLine: this.some.poLine,
materialCode:this.some.materialCode, materialCode: this.some.materialCode,
loginName:this.session.loginName, loginName: this.session.loginName,
factoryCode:this.session.factoryCode, factoryCode: this.session.factoryCode,
wlCode:this.wlCode.label, wlCode: this.wlCode.label,
nowAmount:this.qty, nowAmount: this.qty,
}; };
this.model.dnReturnList[this.someIndex].receiptAmount += parseFloat(this.qty) this.model.dnReturnList[this.someIndex].receiptAmount += parseFloat(this.qty);
console.log('this.model.dnReturnList',this.model.dnReturnList) console.log('this.model.dnReturnList', this.model.dnReturnList);
this.LocationList.push(arr); this.LocationList.push(arr);
this.qty = ''; this.qty = '';
} }
// //
deleteItem(e: any) { deleteItem(e: any) {
console.log('e',e.contentIndex) console.log('e', e.contentIndex);
console.log('eeeee',e) console.log('eeeee', e);
uni.showModal({ uni.showModal({
content:this.$t('message.product_Delete') as any, content: this.$t('message.product_Delete') as any,
cancelText:this.$t('message.Cancel') as any, cancelText: this.$t('message.Cancel') as any,
confirmText:this.$t('message.workArea_Confirm') as any, confirmText: this.$t('message.workArea_Confirm') as any,
success:(res) =>{ success: (res) => {
if(res.confirm){ if (res.confirm) {
this.LocationList.splice(e.contentIndex,1) this.LocationList.splice(e.contentIndex, 1);
this.model.dnReturnList.forEach((item:any) =>{ this.model.dnReturnList.forEach((item: any) => {
if(item.materialCode == e.lineData.materialCode && item.poLine == e.lineData.poLine && item.poNo == e.lineData.poNo){ if (item.materialCode == e.lineData.materialCode && item.poLine == e.lineData.poLine && item.poNo == e.lineData.poNo) {
item.receiptAmount -= parseFloat(e.lineData.nowAmount) item.receiptAmount -= parseFloat(e.lineData.nowAmount);
} }
}) });
} else if(res.cancel){ } else if (res.cancel) {
return return;
} }
} },
}) });
} }
appoint() { appoint() {
this.toPage(this.page.raw.ingoods.dnReturnGoods.Local); this.toPage(this.page.raw.ingoods.dnReturnGoods.Local);
} }
async onSubmit() { async onSubmit() {
let isTrue = true let isTrue = true;
this.model.dnReturnList.forEach((item:any) =>{ this.model.dnReturnList.forEach((item: any) => {
if(item.receiptAmount != null || item.receiptAmount != 0){ if (item.receiptAmount != null || item.receiptAmount != 0) {
if(item.receiptAmount != item.poAmount){ if (item.receiptAmount != item.poAmount) {
this.customToast(this.$t('message.materials') as any); this.customToast(this.$t('message.materials') as any);
return isTrue = false return (isTrue = false);
} }
} }
}) });
if(isTrue){ if (isTrue) {
await this.model.submit(this.LocationList).then(() =>{ await this.model.submit(this.LocationList).then(() => {
if(this.model.code == '1'){ if (this.model.code == '1') {
this.materialList = [] this.materialList = [];
this.some = {} this.some = {};
this.someIndex = 0 this.someIndex = 0;
this.LocationList = [] this.LocationList = [];
this.qty = '' this.qty = '';
this.Location = [] this.Location = [];
this.wl = {} this.wl = {};
this.wlCode = '' this.wlCode = '';
this.query() this.query();
this.GetLocation() this.GetLocation();
} }
}) });
} }
} }
} }
@ -395,7 +394,7 @@ export default class RawReceiptDetail extends BasePage {
width: 145rpx; width: 145rpx;
line-height: 100rpx; line-height: 100rpx;
} }
.search{ .search {
padding-left: 19px; padding-left: 19px;
} }
} }

@ -131,7 +131,7 @@ export default class KanDanHandOver extends BasePage {
this.Some.fileNo = ' '; this.Some.fileNo = ' ';
this.wl = {}; this.wl = {};
this.MaterialList = []; this.MaterialList = [];
this.query() this.query();
} }
} }
} }

@ -135,7 +135,7 @@ export default class KanDanHandOver extends BasePage {
this.Some.fileNo = ' '; this.Some.fileNo = ' ';
this.wl = {}; this.wl = {};
this.MaterialList = []; this.MaterialList = [];
this.query() this.query();
} }
} }
} }

@ -116,11 +116,16 @@ 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') {
this.customToast(this.$t('message.Warehouse_Tip9') as string); //this.customToast(this.$t('message.Warehouse_Tip9') as string);
model.empty(); uni.showToast({ icon: 'success', title: this.$t('message.Warehouse_Tip9') as string });
setTimeout(() => { //model.empty();
this.toPage(this.page.raw.warehouse.rowTransfer.index); this.orderlist = {};
}, 2000); this.model.materielList.length = 0;
this.NEWqty = '';
// setTimeout(() => {
// this.toPage(this.page.raw.warehouse.rowTransfer.index);
// }, 2000);
this.query();
} }
} }
} }

@ -84,7 +84,7 @@ export class rowTransfer extends VuexModule {
//清除数据 //清除数据
@MutationAction @MutationAction
async empty() { async empty() {
const materielList = []; const materielList = null;
return { materielList }; return { materielList };
} }
} }

Loading…
Cancel
Save