|
|
|
@ -11,9 +11,9 @@
|
|
|
|
|
<u-row align="top">
|
|
|
|
|
<u-col :span="12">
|
|
|
|
|
<!-- MRP -->
|
|
|
|
|
<u-form-item :required="mrpFlag" label="MRP" prop="mrpCodeRegion">
|
|
|
|
|
<!-- <u-form-item :required="mrpFlag" label="MRP" prop="mrpCodeRegion">
|
|
|
|
|
<u-input v-model="form.mrpCodeRegion" :border="border" :placeholder="$t('message.po_PleaseInput')" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-form-item> -->
|
|
|
|
|
<!-- 订单号 -->
|
|
|
|
|
<u-form-item :required="true" :label="$t('message.Pi_OrderNo')" prop="prdOrderFrom">
|
|
|
|
|
<u-input v-model="form.prdOrderFrom" :border="border" :placeholder="$t('message.po_PleaseInput')" />
|
|
|
|
@ -28,9 +28,14 @@
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 时间 -->
|
|
|
|
|
<view style="display: flex">
|
|
|
|
|
<u-field style="background: white; border-radius: 10rpx; padding-left: 0" v-model="form.requireDateRegion" :placeholder="$t('message.SelectTime')" :label="$t('message.NowTime')"> </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>
|
|
|
|
|
<u-field style="background: white; border-radius: 10rpx; padding-left: 0" v-model="form.requireDateRegionFrom" :placeholder="'StartTime'" :label="'Start'"> </u-field>
|
|
|
|
|
<u-picker :confirm-text="$t('message.product_Confirm')" :cancel-text="$t('message.product_Cancel')" v-model="startShowFrom" :params="startParams" mode="time" @confirm="startConfirmFrom"></u-picker>
|
|
|
|
|
<u-button @click="startShowFrom = true" type="primary">{{ $t('message.workArea_Selelct') }}</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
<view style="display: flex">
|
|
|
|
|
<u-field style="background: white; border-radius: 10rpx; padding-left: 0" v-model="form.requireDateRegionTo" :placeholder="'EndTime'" :label="'End'"> </u-field>
|
|
|
|
|
<u-picker :confirm-text="$t('message.product_Confirm')" :cancel-text="$t('message.product_Cancel')" v-model="startShowTo" :params="startParams" mode="time" @confirm="startConfirmTo"></u-picker>
|
|
|
|
|
<u-button @click="startShowTo = true" type="primary">{{ $t('message.workArea_Selelct') }}</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col :span="12">
|
|
|
|
@ -45,7 +50,7 @@
|
|
|
|
|
<!-- 已拣配数量 -->
|
|
|
|
|
<uni-th width="80" align="center">Picked Qty</uni-th>
|
|
|
|
|
<!-- 本次拣配数量 -->
|
|
|
|
|
<uni-th width="80" align="center">Selection Qty</uni-th>
|
|
|
|
|
<uni-th width="80" align="center">Qty</uni-th>
|
|
|
|
|
<uni-th width="380" align="center">{{ $t('message.product_Location') }} </uni-th>
|
|
|
|
|
<uni-th width="50" align="center">{{ $t('message.Pi_materielNo') }}</uni-th>
|
|
|
|
|
<uni-th width="100" align="center">{{ $t('message.CommissionedMaterielDesc') }}</uni-th>
|
|
|
|
@ -65,11 +70,15 @@
|
|
|
|
|
</uni-td>
|
|
|
|
|
<!-- 本次拣配数量 -->
|
|
|
|
|
<uni-td align="center">
|
|
|
|
|
<u-input type="number" v-model="item.currentAmount" />
|
|
|
|
|
</uni-td>
|
|
|
|
|
<!-- 原本次拣配数量 -->
|
|
|
|
|
<!-- <uni-td align="center">
|
|
|
|
|
<view v-if="selectIndex.indexOf(index) == -1">{{ item.amount }}</view>
|
|
|
|
|
<view v-else>
|
|
|
|
|
<u-input type="number" placeholder="input" @input="inputNum" @focus="focusNum(index)" />
|
|
|
|
|
</view>
|
|
|
|
|
</uni-td>
|
|
|
|
|
</uni-td> -->
|
|
|
|
|
<uni-td align="center">
|
|
|
|
|
<!-- 地址可选 -->
|
|
|
|
|
<!-- <view @click="selectClick(index)">{{
|
|
|
|
@ -81,8 +90,13 @@
|
|
|
|
|
? loc
|
|
|
|
|
: '-'
|
|
|
|
|
}}</view> -->
|
|
|
|
|
<!-- 库位改成可手动修改 -->
|
|
|
|
|
<uni-td align="center">
|
|
|
|
|
<u-input v-model="item.wkposCode" />
|
|
|
|
|
</uni-td>
|
|
|
|
|
<!-- 此处为地址展示,字段替换下方loc即可 -->
|
|
|
|
|
<view>{{ item.wkposCode }}</view>
|
|
|
|
|
<!-- <view>{{ item.wkposCode }}</view> -->
|
|
|
|
|
|
|
|
|
|
<!-- <view v-if="index == indexChoose">
|
|
|
|
|
<u-select v-model="showList" :list="loclist" @confirm="locConfirm" :default-value="subjectAarr"></u-select>
|
|
|
|
|
</view> -->
|
|
|
|
@ -123,6 +137,7 @@ import { headers } from './config';
|
|
|
|
|
// import http from '@/utils/request';
|
|
|
|
|
// import { url } from '@/utils/url';
|
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
|
import moment from 'moment';
|
|
|
|
|
|
|
|
|
|
@Component
|
|
|
|
|
export default class pickingDom extends BasePage {
|
|
|
|
@ -161,6 +176,8 @@ export default class pickingDom extends BasePage {
|
|
|
|
|
*/
|
|
|
|
|
headers = headers;
|
|
|
|
|
startShow = false;
|
|
|
|
|
startShowFrom = false;
|
|
|
|
|
startShowTo = false;
|
|
|
|
|
/**
|
|
|
|
|
* 表单数据
|
|
|
|
|
*/
|
|
|
|
@ -176,6 +193,8 @@ export default class pickingDom extends BasePage {
|
|
|
|
|
materialCodeList: '',
|
|
|
|
|
sendSpotList: '',
|
|
|
|
|
requireDateRegion: '',
|
|
|
|
|
requireDateRegionFrom: '',
|
|
|
|
|
requireDateRegionTo: '',
|
|
|
|
|
};
|
|
|
|
|
startParams = {
|
|
|
|
|
year: true,
|
|
|
|
@ -246,10 +265,12 @@ export default class pickingDom extends BasePage {
|
|
|
|
|
} else {
|
|
|
|
|
delete params.sendSpotList;
|
|
|
|
|
}
|
|
|
|
|
if (this.form.requireDateRegion) {
|
|
|
|
|
params.requireDateRegion = this.form.requireDateRegion.split('-').join('').toString();
|
|
|
|
|
if (this.form.requireDateRegionFrom && this.form.requireDateRegionTo) {
|
|
|
|
|
params.requireDateRegionFrom = this.form.requireDateRegionFrom.split('-').join('').toString();
|
|
|
|
|
params.requireDateRegionTo = this.form.requireDateRegionTo.split('-').join('').toString();
|
|
|
|
|
params.requireDateRegion = params.requireDateRegionFrom + ' 00:00:00-' + params.requireDateRegionTo + ' 23:59:59';
|
|
|
|
|
} else {
|
|
|
|
|
delete params.sendSpotList;
|
|
|
|
|
delete params.requireDateRegion;
|
|
|
|
|
}
|
|
|
|
|
return params;
|
|
|
|
|
}
|
|
|
|
@ -258,6 +279,11 @@ export default class pickingDom extends BasePage {
|
|
|
|
|
if (session.factoryCode == '9A61' || session.factoryCode == '9A62') {
|
|
|
|
|
this.mrpFlag = false;
|
|
|
|
|
this.$form.setRules(this.mrpRules);
|
|
|
|
|
//设置开始时间,结束时间
|
|
|
|
|
const today = moment(); // 获取当前时间
|
|
|
|
|
const last_month = today.clone().subtract(1, 'month'); // 获取一个月前的日期
|
|
|
|
|
this.form.requireDateRegionFrom = last_month.format('YYYY-MM-DD');
|
|
|
|
|
this.form.requireDateRegionTo = moment().format('YYYY-MM-DD');
|
|
|
|
|
} else {
|
|
|
|
|
this.mrpFlag = true;
|
|
|
|
|
this.$form.setRules(this.rules);
|
|
|
|
@ -286,6 +312,12 @@ export default class pickingDom extends BasePage {
|
|
|
|
|
startConfirm(startParams: any) {
|
|
|
|
|
this.form.requireDateRegion = startParams.year + '-' + startParams.month + '-' + startParams.day;
|
|
|
|
|
}
|
|
|
|
|
startConfirmFrom(startParams: any) {
|
|
|
|
|
this.form.requireDateRegionFrom = startParams.year + '-' + startParams.month + '-' + startParams.day;
|
|
|
|
|
}
|
|
|
|
|
startConfirmTo(startParams: any) {
|
|
|
|
|
this.form.requireDateRegionTo = startParams.year + '-' + startParams.month + '-' + startParams.day;
|
|
|
|
|
}
|
|
|
|
|
/**
|
|
|
|
|
* 确认
|
|
|
|
|
*/
|
|
|
|
@ -299,6 +331,15 @@ export default class pickingDom extends BasePage {
|
|
|
|
|
const dataList: any = [];
|
|
|
|
|
this.arrList.forEach((item: any) => {
|
|
|
|
|
if (item.checked == true) {
|
|
|
|
|
item.loginName = session.loginName;
|
|
|
|
|
item.factoryCode = session.factoryCode;
|
|
|
|
|
item.wlList = [
|
|
|
|
|
{
|
|
|
|
|
wlCode: item.wkposCode,
|
|
|
|
|
qty: item.currentAmount,
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
dataList.push(item);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
@ -306,49 +347,28 @@ export default class pickingDom extends BasePage {
|
|
|
|
|
this.customToast(this.$t('message.Warehouse_Tip6') as any);
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await this.model.saveProOrderResultUpload(dataList);
|
|
|
|
|
await this.model.saveProOrderResultUploadVN(dataList);
|
|
|
|
|
if (this.model.code == '1') {
|
|
|
|
|
console.log('提交成功!');
|
|
|
|
|
uni.showToast({
|
|
|
|
|
//icon: 'success',
|
|
|
|
|
title: this.$t('message.Warehouse_Tip9') as any,
|
|
|
|
|
duration: 2000,
|
|
|
|
|
image: '/static/icons/icon-51.png',
|
|
|
|
|
});
|
|
|
|
|
this.onQueryVN();
|
|
|
|
|
// this.GetLocation();
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
// this.onAggregate();
|
|
|
|
|
}, 2000);
|
|
|
|
|
}
|
|
|
|
|
// let orderOutIdList = [];
|
|
|
|
|
// if (this.isFormChange || this.model.proOrderList.length === 0) {
|
|
|
|
|
// const { list: proOrderList }: any = await http.post(url.sortscan.query.prdorder, this.formParams);
|
|
|
|
|
// orderOutIdList = proOrderList.map((_: any) => _.orderOutId);
|
|
|
|
|
// } else {
|
|
|
|
|
// orderOutIdList = this.model.checkedProOrderList.map((_: any) => _.orderOutId);
|
|
|
|
|
// }
|
|
|
|
|
// if (orderOutIdList.length === 0 && this.model.proOrderList.length > 0) {
|
|
|
|
|
// this.customToast(this.$t('message.Pi_OrderNoNotSelected') as string);
|
|
|
|
|
// return;
|
|
|
|
|
// } else if (orderOutIdList.length === 0) {
|
|
|
|
|
// this.customToast(this.$t('message.Pi_NoDataFound') as string);
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// const params = {
|
|
|
|
|
// sapFactoryCode: this.form.sapFactoryCode,
|
|
|
|
|
// factoryCode: session.factoryCode,
|
|
|
|
|
// loginName: session.loginName,
|
|
|
|
|
// orderOutIdList,
|
|
|
|
|
// };
|
|
|
|
|
// this.model.NEWparams = params;
|
|
|
|
|
// await this.model.queryProOrderResult(params);
|
|
|
|
|
// uni.setStorageSync('factory', JSON.stringify(params) as any);
|
|
|
|
|
// this.toPage(this.page.raw.handover.picking.result);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 订单查询
|
|
|
|
|
*/
|
|
|
|
|
onQueryVN() {
|
|
|
|
|
console.log('调用订单查询');
|
|
|
|
|
this.$form.validate(async (valid: boolean) => {
|
|
|
|
|
if (!valid) return;
|
|
|
|
|
await this.model.queryProOrder(this.formParams);
|
|
|
|
@ -376,13 +396,21 @@ export default class pickingDom extends BasePage {
|
|
|
|
|
// console.log('选中的当前行数据', this.arrList);
|
|
|
|
|
// this.selectedIndexs = e.detail.index
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
//原方法
|
|
|
|
|
// inputNum(e) {
|
|
|
|
|
// console.log(e);
|
|
|
|
|
// model.proOrderList[this.indexChoose].amount = e;
|
|
|
|
|
// // console.log(model.proOrderList);
|
|
|
|
|
// }
|
|
|
|
|
//输入内容会触发
|
|
|
|
|
inputNum(e) {
|
|
|
|
|
console.log(e);
|
|
|
|
|
model.proOrderList[this.indexChoose].amount = e;
|
|
|
|
|
console.log('输入的内容:' + e);
|
|
|
|
|
model.proOrderList[this.indexChoose].currentAmount = e;
|
|
|
|
|
// console.log(model.proOrderList);
|
|
|
|
|
}
|
|
|
|
|
//点击输入框会除法
|
|
|
|
|
focusNum(index) {
|
|
|
|
|
console.log('聚焦:' + index);
|
|
|
|
|
this.indexChoose = index;
|
|
|
|
|
// console.log(this.indexChoose, '聚焦index');
|
|
|
|
|
}
|
|
|
|
|