批量下线入库,wms等修改

master
guoshuang 10 months ago
parent 2791e610a1
commit 0d23f86825

@ -142,7 +142,7 @@ export default class LoginPage extends BasePage {
// console.log('Version////', this.Version);
}
///******************
version = '0.0.94'; //
version = '0.0.95'; //
//version = '0.0.7'; //
//*************** false true ****************
//isTest = true;

@ -31,7 +31,7 @@
<!-- 机台 -->
<u-form-item label="出库仓库">
<!-- <u-input :border="true" v-model="histroyItem.productDescZh" placeholder="" style="overflow: hidden" /> -->
<jPicker sureColor="#ff0000" @bindpicker="warehouseChange" showKey="value" valKey="value" :val="cimWl.value" :options="warehouselist" />
<jPicker sureColor="#ff0000" @bindpicker="warehouseChange" showKey="label" valKey="value" :val="cimWl.value" :options="warehouselist" />
</u-form-item>
<!-- <u-form-item label="出库仓库"> 成品库 </u-form-item> -->
</u-form>

@ -120,7 +120,7 @@
</u-row>
</view>
<view>
<u-popup v-model="show" mode="center" width="580rpx" height="580rpx">
<u-popup v-model="show" mode="center" width="580rpx" height="650rpx">
<view class="form3">
<view class="poupitem">
<view class="pouptitle">标识码</view>
@ -259,18 +259,18 @@ export default class receivePO extends BasePage {
moren = '选择仓库';
moren1 = '选择库区';
waylist = [
{
value: '0',
lable: '根据物料',
},
// {
// value: '0',
// lable: '',
// },
{
value: '1',
lable: '根据托盘',
},
];
bimWl = {} as OptionType;
selectway: boolean = null;
showshow = false;
bimWl: any = {};
selectway = true;
showshow = true;
// remove: any = {};
// async onReady() {
// await this.model.queryLocation();
@ -317,9 +317,9 @@ export default class receivePO extends BasePage {
this.productCodeTypeList = {};
this.waCodeTypeList = {};
this.waCodeList = [];
this.showshow = false;
this.bimWl = {} as OptionType;
this.selectway = null;
this.showshow = true;
this.bimWl = this.waylist[0];
this.selectway = true;
}
nopoup() {
this.show = false;
@ -597,14 +597,14 @@ export default class receivePO extends BasePage {
//this.getlist();
}
bookTypeChangeway(e) {
this.showshow = true;
//this.showshow = true;
this.bimWl.value = e.pickerName.value;
console.log(e);
if (e.pickerName.value == '0') {
this.selectway = false;
} else {
this.selectway = true;
}
// if (e.pickerName.value == '0') {
// this.selectway = false;
// } else {
// this.selectway = true;
// }
}
//
async SignIn() {

@ -128,7 +128,7 @@
</u-row>
</view>
<view>
<u-popup v-model="show" mode="center" width="580rpx" height="580rpx">
<u-popup v-model="show" mode="center" width="580rpx" height="650rpx">
<view class="form3">
<view class="poupitem">
<view class="pouptitle">标识码</view>
@ -268,18 +268,18 @@ export default class receiveSRM extends BasePage {
moren = '选择仓库';
moren1 = '选择库区';
waylist = [
{
value: '0',
lable: '根据物料',
},
// {
// value: '0',
// lable: '',
// },
{
value: '1',
lable: '根据托盘',
},
];
bimWl = {} as OptionType;
selectway: boolean = null;
showshow = false;
bimWl: any = {};
selectway = true;
showshow = true;
// remove: any = {};
// async onReady() {
// await this.model.queryLocation();
@ -327,9 +327,9 @@ export default class receiveSRM extends BasePage {
this.productCodeTypeList = {};
this.waCodeTypeList = {};
this.waCodeList = [];
this.showshow = false;
this.bimWl = {} as OptionType;
this.selectway = null;
this.showshow = true;
this.bimWl = this.waylist[0];
this.selectway = true;
}
nopoup() {
this.show = false;
@ -656,14 +656,14 @@ export default class receiveSRM extends BasePage {
//this.getlist();
}
bookTypeChangeway(e) {
this.showshow = true;
//this.showshow = true;
this.bimWl.value = e.pickerName.value;
console.log(e);
if (e.pickerName.value == '0') {
this.selectway = false;
} else {
this.selectway = true;
}
// if (e.pickerName.value == '0') {
// this.selectway = false;
// } else {
// this.selectway = true;
// }
}
//
async SignIn() {

@ -9,100 +9,75 @@
</view>
<view class="fiexdcontent">
<u-form class="form" ref="form" label-width="180rpx">
<!-- 单号 -->
<view class="single">
<view class="single-left">
<view>标志码:</view>
<u-search placeholder="请扫描" v-model="orderNo" @search="query" :show-action="false"></u-search>
</view>
<!-- <view class="single-right">
<u-button type="primary" @click="tidan"></u-button>
</view> -->
</view>
<!-- 订单 -->
<!-- 机台 -->
<!-- <u-form-item label="出库仓库"> 成品库 </u-form-item> -->
</u-form>
<u-form style="margin-top: 1rpx" class="form3">
<view class="list">
<view class="row-list">
<view class="list-item"> 生产订单: </view>
<view> {{ orderNoItemList && orderNoItemList.productOrder }} </view>
</view>
<view class="row-list">
<view class="list-item"> 产品编码: </view>
<view> {{ orderNoItemList && orderNoItemList.productCode }} </view>
</view>
<view class="row-list">
<view class="list-item"> 产品名称: </view>
<view> {{ orderNoItemList && orderNoItemList.productName }} </view>
</view>
<view class="row-list">
<view class="list-item"> 批次号: </view>
<view> {{ orderNoItemList && orderNoItemList.batchNumber }} </view>
</view>
<view class="row-list">
<view class="row-list-item">
<view class="list-item"> 订单数量: </view>
<view> {{ orderNoItemList && orderNoItemList.planQuantity }} </view>
</view>
<view class="row-list-item">
<view class="list-item"> 单位: </view>
<view> {{ orderNoItemList && orderNoItemList.unitOfMeasure }} </view>
</view>
</view>
<view class="row-list">
<view class="list-item">入库数量: </view>
<u-input :border="border" v-model="number1" placeholder="" type="number" />
<!-- <view> {{ orderNoItemList && orderNoItemList.putQuantity }} </view> -->
</view>
<view class="row-list">
<view class="list-item">入库仓库: </view>
<jPicker style="width: 80%" sureColor="#ff0000" @bindpicker="warehouseChange" showKey="value" valKey="value" :val="cimWl.value" :options="warehouselist" />
</view>
<!-- <u-form-item label="出库仓库">
<jPicker sureColor="#ff0000" @bindpicker="warehouseChange" showKey="value" valKey="value" :val="cimWl.value" :options="warehouselist" />
</u-form-item> -->
</view>
</u-form>
<u-form class="form4" style="">
<!-- <u-search placeholder="请扫描" v-model="boxnumber" :show-action="false"></u-search> -->
<view class="buttontostore" @click="rukubutn"></view>
<!-- <u-input style="border: 0.5rpx solid #8d8989; border-radius: 10rpx" v-model="boxnumber" @click="clickscan"></u-input> -->
<u-form-item label="仓库">
<!-- <u-input :border="true" v-model="histroyItem.productDescZh" placeholder="" style="overflow: hidden" /> -->
<jPicker sureColor="#ff0000" @bindpicker="warehouseChange" showKey="label" valKey="value" :val="cimWl.value" :options="warehouselist" />
</u-form-item>
<u-form-item label="库区">
<u-search placeholder="请扫描库区" v-model="waCode" :show-action="false"></u-search>
</u-form-item>
<u-form-item label="标志卡">
<u-search placeholder="请扫描标志卡" v-model="orderNo" @search="query" :show-action="false"></u-search>
</u-form-item>
</u-form>
</view>
<view style="height: 14rpx"></view>
<view style="margin-top: 180rpx" class="scroll">
<view v-for="item in list" :key="item.id">
<u-form style="margin-top: 10rpx" class="form2">
<view class="scroll">
<view v-for="(item, index) in list" :key="item.id">
<u-form style="margin-top: 10rpx" class="form3">
<view class="list">
<view class="rowleft">
<view class="row-list">
<!-- <view class="row-list-item">
<view class="list-item"> 批次号: </view>
<view>{{ item.batchNumber }} </view>
</view> -->
<view class="row-list-item">
<view class="list-item"> 箱数: </view>
<view>{{ item.number }} </view>
</view>
<view style="color: red; text-align: right">{{ orderNoItemList.remark == '1' ? '已入库' : '未入库' }}</view>
<!-- <u-button style="width: 170rpx;margin-right: 0;margin-top: 10rpx;" type="error">{{orderNoItemList.remark=='1'?'已入库':'未入库'}}</u-button> -->
<view class="row-list">
<view class="list-item"> 生产订单: </view>
<view> {{ orderNoItemList && orderNoItemList.productOrder }} </view>
</view>
<view class="row-list">
<view class="list-item"> 产品编码: </view>
<view> {{ orderNoItemList && orderNoItemList.productCode }} </view>
</view>
<view class="row-list">
<view class="list-item"> 产品名称: </view>
<view> {{ orderNoItemList && orderNoItemList.productName }} </view>
</view>
<view class="row-list">
<view class="list-item"> 批次号: </view>
<view> {{ orderNoItemList && orderNoItemList.batchNumber }} </view>
</view>
<view class="row-list">
<view class="row-list-item">
<view class="list-item"> 订单数量: </view>
<view> {{ orderNoItemList && orderNoItemList.planQuantity }} </view>
</view>
<view class="row-list">
<view class="row-list-item">
<view class="list-item"> 库位码: </view>
<view>{{ item.wlCode }} </view>
</view>
<view class="row-list-item">
<view class="list-item"> 托盘码: </view>
<view>{{ item.sn }} </view>
</view>
<view class="row-list-item">
<view class="list-item"> 单位: </view>
<view> {{ orderNoItemList && orderNoItemList.unitOfMeasure }} </view>
</view>
</view>
<view class="rowright">
<view class="righttitle">
<view @click.stop="onPassdelet(item, index)" class="boder-icon-rigth"> 删除 </view>
<view class="row-list">
<view class="list-item"> 托盘号: </view>
<view> {{ orderNoItemList && orderNoItemList.batchNumber }} </view>
</view>
<view class="row-list">
<view class="row-list-item">
<view class="list-item"> 剩余数量: </view>
<view> {{ orderNoItemList && orderNoItemList.attr3 }} </view>
</view>
<view class="row-list-item">
<view class="list-item">实际入库数量: </view>
<u-input :border="border" v-model="orderNoItemList.number" placeholder="" type="number" />
</view>
</view>
<u-button style="width: 170rpx; margin-right: 0; margin-top: 10rpx" @click="delet(index)" type="error">删除</u-button>
<!-- <view class="row-list">
<view class="row-list-item">
</view>
</view> -->
<!-- <u-form-item label="出库仓库">
<jPicker sureColor="#ff0000" @bindpicker="warehouseChange" showKey="value" valKey="value" :val="cimWl.value" :options="warehouselist" />
</u-form-item> -->
</view>
</u-form>
</view>
@ -119,31 +94,6 @@
</u-col>
</u-row>
</view>
<view>
<u-popup v-model="show" mode="center" width="550rpx" height="450rpx">
<view class="form5">
<view class="poupitem">
<view class="pouptitle">托盘号</view>
<u-input class="poupcontent" :clearable="false" v-model="form5.sn" placeholder="" style="overflow: hidden" />
</view>
<view class="poupitem">
<view class="pouptitle">入库库位</view>
<u-input class="poupcontent" :clearable="false" v-model="form5.wlCode" placeholder="" style="overflow: hidden" />
</view>
<view class="poupitem">
<view class="pouptitle">箱数</view>
<u-input class="poupcontent" :clearable="false" v-model="form5.number" placeholder="" style="overflow: hidden" />
</view>
</view>
<view class="poupbutton">
<!-- 确定 -->
<u-button @click="onOk" type="primary">确定</u-button>
<!-- 返回 -->
<u-button type="error" @click="nopoup"></u-button>
</view>
</u-popup>
<view v-if="show" class="mask"></view>
</view>
<u-modal v-model="showmodal" @confirm="confirm" :content="content" :show-cancel-button="true"></u-modal>
<u-toast ref="uToast" />
</view>
@ -172,6 +122,7 @@ export default class BatchOfflineStorage extends BasePage {
form5: any = {};
boxnumber: any = '';
itemdetail: any = '';
waCode: any = '';
showmodal = false;
content: any = '';
number1 = 0;
@ -194,75 +145,70 @@ export default class BatchOfflineStorage extends BasePage {
async onReady() {
await this.model.getwarehouselist();
this.warehouselist = model.warehouselist;
const cimWl = this.warehouselist.find((item) => item.value === '0004');
const cimWl = this.warehouselist.find((item) => item.value === '0021');
if (cimWl) {
this.cimWl = cimWl;
} else {
this.cimWl = this.warehouselist[0];
}
}
//
async onPassdelet(item, index) {
console.log('1234567', item);
this.itemdetail = item;
this.delindex = index;
this.showmodal = true;
this.content = '是否删除?';
// let params = {
// item
// }
}
async confirm() {
this.itemdetail.orderNo = this.orderNo;
console.log(this.itemdetail, this.orderNo);
this.list.splice(this.delindex, 1);
// await this.model.deleteTray(this.itemdetail);
// if (this.model.SubmitCode == '200') {
// (this.$refs.uToast as any).show({
// title: '',
// type: 'success',
// });
// this.getlist();
// } else {
// (this.$refs.uToast as any).show({
// title: '',
// type: 'error',
// });
// this.getlist();
// }
async delet(index) {
uni.showModal({
content: '是否删除?',
success: (res) => {
if (res.confirm) {
this.list.splice(index, 1);
(this.$refs.uToast as any).show({
title: '删除成功',
type: 'success',
});
} else if (res.cancel) {
//console.log('');
}
},
});
}
//
warehouseChange(e: any) {
this.cimWl = e.pickerName;
}
//
nopoup() {
this.show = false;
this.form5 = {};
}
//
async query() {
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
title: '请扫描标志码',
title: '请勿扫描标志码',
// url: '/pages/user/index'
});
return;
}
await this.model.queryOrderNo(this.orderNo);
if (model.orderNoItemList) {
this.orderNoItemList = model.orderNoItemList;
this.number1 = this.orderNoItemList.attr3;
} else {
this.orderNoItemList = {};
let chongfuscan = this.list.some((item) => item.pallet === this.orderNoItemList.pallet);
if (chongfuscan) {
(this.$refs.uToast as any).show({
title: '重复扫描标志卡',
// url: '/pages/user/index'
});
return;
} else {
this.list.push(this.orderNoItemList);
}
}
//this.getlist();
}
//
async onSubmit() {
if (this.orderNo == '' || this.orderNo.length == 0) {
if (this.waCode == '') {
(this.$refs.uToast as any).show({
title: '请扫描标志码',
title: '请扫描库区',
// url: '/pages/user/index'
});
return;
}
if (this.cimWl.value == '') {
(this.$refs.uToast as any).show({
title: '请先选择仓库',
// url: '/pages/user/index'
});
return;
@ -270,54 +216,50 @@ export default class BatchOfflineStorage extends BasePage {
if (this.list.length == 0 || this.list == '') {
(this.$refs.uToast as any).show({
title: '请先入库',
title: '请先扫描标志卡查询订单',
// url: '/pages/user/index'
});
return;
}
let insertTarynumber = 0;
this.list.forEach((item) => {
insertTarynumber = insertTarynumber + parseInt(item.number);
});
let hasRemarkOne = this.list.some((item) => item.remark === '1');
if (hasRemarkOne) {
(this.$refs.uToast as any).show({
title: '有已出库的订单',
// url: '/pages/user/index'
});
return;
}
//console.log(insertTarynumber, model.orderNoItemList.putQuantity, insertTarynumber == model.orderNoItemList.putQuantity);
if (insertTarynumber <= this.number1) {
let params = {
workOrder: this.orderNoItemList.workOrder,
factoryCode: session.FactoryCode,
whCode: this.cimWl.value, //
productName: this.orderNoItemList.productName,
productCode: this.orderNoItemList.productCode,
planQuantity: this.orderNoItemList.planQuantity,
putQuantity: this.number1,
batchNumber: this.orderNoItemList.batchNumbe, //
createBy: session.loginName,
unitOfMeasure: this.orderNoItemList.unitOfMeasure,
productOrder: this.orderNoItemList.productOrder, //
wmsProductPut: this.list,
};
//console.log('',params);
await this.model.handPut(params);
if (this.model.SubmitCode == '200') {
(this.$refs.uToast as any).show({
title: '成功',
type: 'success',
});
this.show = false;
this.list = [];
this.query();
//this.getlist();
} else {
(this.$refs.uToast as any).show({
title: '失败',
type: 'error',
});
this.show = false;
//this.getlist();
}
this.list.forEach((item) => {
item.whCode = this.cimWl.value;
item.waCode = this.waCode;
item.createBy = session.loginName;
item.pallet = this.orderNo;
item.wlCode = '0001-01';
});
let params = {
factoryCode: session.FactoryCode,
whCode: this.cimWl.value,
waCode: this.waCode,
createBy: session.loginName,
wmsProductPut: this.list,
};
//console.log('',params);
await this.model.handPut(params);
if (this.model.SubmitCode == '200') {
(this.$refs.uToast as any).show({
title: '成功',
type: 'success',
});
this.list = [];
this.orderNo = '';
this.waCode = '';
} else {
(this.$refs.uToast as any).show({
title: '实际入库总数量不能超过入库数量,请正确入库',
// url: '/pages/user/index'
title: '失败',
type: 'error',
});
}
}
@ -330,72 +272,6 @@ export default class BatchOfflineStorage extends BasePage {
// }
// console.log(model.productCodeList);
// }
async rukubutn() {
this.form5 = {
number: 50,
};
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
title: '请扫描标志码',
// url: '/pages/user/index'
});
return;
}
if (this.list.length > 0) {
let insertTarynumber = 0;
this.list.forEach((item) => {
insertTarynumber = insertTarynumber + parseInt(item.number);
});
let ordernumber = this.number1 || 0;
if (insertTarynumber >= ordernumber) {
(this.$refs.uToast as any).show({
title: '实际入库数量不能大于入库数量,请先删除再入库',
// url: '/pages/user/index'
});
return;
}
this.show = true;
} else {
this.show = true;
}
}
//
async onOk() {
console.log(this.form5);
if (this.form5.sn == '' || this.form5.wlCode == '' || this.form5.number == '') {
(this.$refs.uToast as any).show({
title: '不能为空',
// url: '/pages/user/index'
});
return;
}
this.list.push({
number: this.form5.number,
wlCode: this.form5.wlCode,
sn: this.form5.sn,
//batchNumber: this.orderNoItemList.batchNumber,
});
this.show = false;
// await this.model.insertTary(this.form5);
// if (this.model.SubmitCode == '200') {
// (this.$refs.uToast as any).show({
// title: '',
// type: 'success',
// });
// this.show = false;
// this.getlist();
// } else {
// (this.$refs.uToast as any).show({
// title: '',
// type: 'error',
// });
// this.show = false;
// this.getlist();
// }
// //
// await this.model.queryOrderNo(this.form5);
// this.list = model.orderNoItemList;
}
}
</script>
<style lang="scss" scoped>
@ -565,10 +441,10 @@ export default class BatchOfflineStorage extends BasePage {
.scroll {
// margin-top: 2rpx;
height: 835rpx;
height: 730rpx;
position: absolute;
width: 92%;
top: 550rpx;
top: 470rpx;
/* bottom: 40px; */
overflow: auto;
.form2 {

@ -12,7 +12,7 @@ import { session } from '@/store/modules/session';
// http.defaults.headers.common['poolName'] = session.PoolName;
export class BatchOfflineStorage extends VuexModule {
WlList = [];
orderNoItemList: any = [];
orderNoItemList: any = {};
@MutationAction
async queryOrderNo(orderNo: any) {
const result: any = await http.post(url.lanjuwms.product.OfflineStorage.WorkOrderqueryBS, {
@ -49,7 +49,7 @@ export class BatchOfflineStorage extends VuexModule {
}
@MutationAction
async handPut(params: any) {
const result: any = await http.post(url.lanjuwms.product.OfflineStorage.WmsProductPutByWorkOrderConfirm, params);
const result: any = await http.post(url.lanjuwms.product.OfflineStorage.WmsProductPutByWorkOrderConfirmNew, params);
const SubmitCode = result.code;
return { SubmitCode };
}

@ -52,6 +52,7 @@ export const url = {
addSnCorrelationBarcode: qianzhuione + '/wms/WmsToWCSmission/addSnCorrelationBarcode',
deletSnCorrelationBarcode: qianzhuione + '/wms/WmsToWCSmission/deletSnCorrelationBarcode',
WorkOrderqueryBS: qianzhuione + '/wms/WmsToWCSmission/WmsProductPutByWorkOrderqueryBS',
WmsProductPutByWorkOrderConfirmNew: qianzhuione + '/wms/WmsToWCSmission/WmsProductPutByWorkOrderConfirmT',
},
// 销售出库/sellout/showProduceCode/ /sellout/s/订单号/产品编码
@ -296,6 +297,7 @@ export const url = {
getOaUserId: qianzhuione + '/quality/handCheck/getOaUserId',
commitCheckResultsCg: qianzhuione + '/quality/handCheck/commitCheckResultsCg',
getCheckTaskDetailListCG: qianzhuione + '/quality/handCheck/getCheckTaskDetailListCg',
getdisqualification: qianzhuione + '/system/dict/data/getDictData',
},
// 历史记录
Records: {

Loading…
Cancel
Save