|
|
|
@ -12,7 +12,7 @@
|
|
|
|
|
<view class="single">
|
|
|
|
|
<view class="single-left">
|
|
|
|
|
<view>送货单号:</view>
|
|
|
|
|
<u-search placeholder="请扫描" v-model="orderNo" @search="query" :show-action="false"></u-search>
|
|
|
|
|
<u-search placeholder="请扫描" v-model="procureCode" @search="query" :show-action="false"></u-search>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="single-right">
|
|
|
|
|
<u-button type="primary" @click="tidan">提单</u-button>
|
|
|
|
@ -20,19 +20,19 @@
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 订单 -->
|
|
|
|
|
<u-form-item label="物料编码">
|
|
|
|
|
<u-input :border="true" v-model="histroyItem.productDescZh" placeholder="" style="overflow: hidden" />
|
|
|
|
|
<u-input :border="true" v-model="materialCode" placeholder="" @confirm="query" style="overflow: hidden" />
|
|
|
|
|
</u-form-item>
|
|
|
|
|
<!-- 机台 -->
|
|
|
|
|
<u-form-item>
|
|
|
|
|
<!-- <u-form-item>
|
|
|
|
|
<view class="row">
|
|
|
|
|
<view>收货仓库:</view>
|
|
|
|
|
<view>0001-小榄物料仓</view>
|
|
|
|
|
<view></view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row">
|
|
|
|
|
<view>工厂:</view>
|
|
|
|
|
<view>1000</view>
|
|
|
|
|
<view></view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-form-item>
|
|
|
|
|
</u-form-item> -->
|
|
|
|
|
</u-form>
|
|
|
|
|
|
|
|
|
|
<view class="scroll">
|
|
|
|
@ -40,23 +40,28 @@
|
|
|
|
|
<u-form style="margin-top: 10rpx" class="form2">
|
|
|
|
|
<view class="list">
|
|
|
|
|
<view class="righttitle">
|
|
|
|
|
<view class="boder-icon-top zhuangtai" data-state="0">待收货</view>
|
|
|
|
|
<!-- 0是未收货,1是正在收货,2是收货完成 -->
|
|
|
|
|
<view class="boder-icon-top zhuangtai" data-state="0">{{ item.orderStatus == 0 ? '未收货' : item.orderStatus == 1 ? '正在收货' : '收货完成' }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="list-item"> 采购单号: </view>
|
|
|
|
|
<view> 4500331750 </view>
|
|
|
|
|
<view> {{ item.procureCode }} </view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="list-item"> 物料编码: </view>
|
|
|
|
|
<view> 40000006954 </view>
|
|
|
|
|
<view> {{ item.materialCode }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="list-item"> 物料名称: </view>
|
|
|
|
|
<view> 纸箱 </view>
|
|
|
|
|
<view class="list-item"> 物料描述: </view>
|
|
|
|
|
<view>{{ item.materialDesc }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="list-item"> 工厂号: </view>
|
|
|
|
|
<view>{{ item.siteCode }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="list-item"> 应收/已收: </view>
|
|
|
|
|
<view> 1000/0(PC) </view>
|
|
|
|
|
<view>{{ item.planNumber }}/{{ item.realityNumber }}</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view a:if="true" class="righttitle">
|
|
|
|
|
<view @click.stop="onPass(item)" class="boder-icon-rigth"> 收货 </view>
|
|
|
|
@ -68,46 +73,47 @@
|
|
|
|
|
<view class="bottom-bar">
|
|
|
|
|
<u-row class="button-bar">
|
|
|
|
|
<!-- 确定 -->
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<!-- <u-col :span="6">
|
|
|
|
|
<u-button @click="onSubmit" type="primary">确定</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-col> -->
|
|
|
|
|
<!-- 返回 -->
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-col :span="12">
|
|
|
|
|
<u-button type="error" @click="uni.navigateBack({})">返回</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
|
</view>
|
|
|
|
|
<view>
|
|
|
|
|
<u-popup v-model="show" mode="center" width="550rpx" height="450rpx">
|
|
|
|
|
<u-popup v-model="show" mode="center" width="580rpx" height="550rpx">
|
|
|
|
|
<view class="form3">
|
|
|
|
|
<view class="poupitem">
|
|
|
|
|
<view class="pouptitle">批次号:</view>
|
|
|
|
|
<u-input class="poupcontent" :clearable="false" v-model="form3.productDescZh" placeholder="" style="overflow: hidden" />
|
|
|
|
|
<u-input class="poupcontent" :clearable="false" v-model="form3.incomeBatchNo" placeholder="" style="overflow: hidden" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="poupitem">
|
|
|
|
|
<view class="pouptitle">数量:</view>
|
|
|
|
|
<u-input class="poupcontent" :clearable="false" v-model="form3.productDescZh" placeholder="" style="overflow: hidden" />
|
|
|
|
|
<u-input class="poupcontent" :clearable="false" v-model="form3.planNumber" placeholder="" style="overflow: hidden" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="poupitem">
|
|
|
|
|
<view class="pouptitle">托盘号:</view>
|
|
|
|
|
<u-input class="poupcontent" :clearable="false" v-model="form3.productDescZh" placeholder="" style="overflow: hidden" />
|
|
|
|
|
<u-input class="poupcontent" :clearable="false" v-model="form3.sn" placeholder="" style="overflow: hidden" />
|
|
|
|
|
</view>
|
|
|
|
|
<view class="poupitem">
|
|
|
|
|
<view class="pouptitle">收货仓库:</view>
|
|
|
|
|
<jPicker sureColor="#ff0000" :moren="moren" @bindpicker="selectProductlocCode" showKey="label" valKey="value" :val="form3.whCode" :options="whList" />
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="poupbutton">
|
|
|
|
|
<u-row>
|
|
|
|
|
<!-- 确定 -->
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-button @click="onOk" size="mini" type="primary">确定</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
<!-- 返回 -->
|
|
|
|
|
<u-col :span="6">
|
|
|
|
|
<u-button size="mini" type="error" @click="nopoup">取消</u-button>
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
|
<view class="poupbutton" style="margin-top: 10px">
|
|
|
|
|
<div>
|
|
|
|
|
<u-button style="width: 100px; height: 35px" @click="onOk" size="mini" type="primary">确定</u-button>
|
|
|
|
|
</div>
|
|
|
|
|
<div>
|
|
|
|
|
<u-button style="width: 100px; height: 35px" size="mini" type="error" @click="nopoup">取消</u-button>
|
|
|
|
|
</div>
|
|
|
|
|
</view>
|
|
|
|
|
</u-popup>
|
|
|
|
|
<view v-if="show" class="mask"></view>
|
|
|
|
|
</view>
|
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts">
|
|
|
|
@ -115,7 +121,7 @@ import { Component } from 'vue-property-decorator';
|
|
|
|
|
import { BasePage } from '@/components/base/page';
|
|
|
|
|
import jPicker from '@/components/J-Picker/jPicker.vue';
|
|
|
|
|
import model from './model';
|
|
|
|
|
//import { session } from '@/store/modules/session';
|
|
|
|
|
import { session } from '@/store/modules/session';
|
|
|
|
|
@Component({
|
|
|
|
|
components: {
|
|
|
|
|
jPicker,
|
|
|
|
@ -123,9 +129,11 @@ import model from './model';
|
|
|
|
|
})
|
|
|
|
|
export default class receivePO extends BasePage {
|
|
|
|
|
model = model;
|
|
|
|
|
list: any = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }];
|
|
|
|
|
list: any = [];
|
|
|
|
|
whList: any = [];
|
|
|
|
|
show = false;
|
|
|
|
|
form3: any = {};
|
|
|
|
|
moren = '选择仓库';
|
|
|
|
|
// remove: any = {};
|
|
|
|
|
// async onReady() {
|
|
|
|
|
// await this.model.queryLocation();
|
|
|
|
@ -134,7 +142,8 @@ export default class receivePO extends BasePage {
|
|
|
|
|
// selectItem(e: any) {
|
|
|
|
|
// this.remove = e.pickerName;
|
|
|
|
|
// }
|
|
|
|
|
orderNo: any = '';
|
|
|
|
|
procureCode: any = '';
|
|
|
|
|
materialCode: any = '';
|
|
|
|
|
border = true;
|
|
|
|
|
height = 100;
|
|
|
|
|
autoHeight = true;
|
|
|
|
@ -150,11 +159,11 @@ export default class receivePO extends BasePage {
|
|
|
|
|
value: '0',
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
clickitem: any = '';
|
|
|
|
|
productCodeList: any = {};
|
|
|
|
|
//收货按钮
|
|
|
|
|
onPass(item) {
|
|
|
|
|
console.log('1234567', item);
|
|
|
|
|
this.clickitem = item;
|
|
|
|
|
this.show = true;
|
|
|
|
|
}
|
|
|
|
|
nopoup() {
|
|
|
|
@ -162,34 +171,114 @@ export default class receivePO extends BasePage {
|
|
|
|
|
this.form3 = {};
|
|
|
|
|
}
|
|
|
|
|
//点击收货按钮,录入批次(或系统自动生成)、数量、托盘码进行收货。
|
|
|
|
|
onOk() {
|
|
|
|
|
async onOk() {
|
|
|
|
|
if (this.form3.incomeBatchNo == '' || this.form3.incomeBatchNo == undefined) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '批次号不能为空',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.form3.planNumber == '' || this.form3.planNumber == undefined) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '数量不能为空',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.form3.sn == '' || this.form3.sn == undefined) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '托盘号不能为空',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.form3.whCode == '' || this.form3.whCode == undefined) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '请选择仓库',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
console.log('1234567');
|
|
|
|
|
let query = this.clickitem;
|
|
|
|
|
// query.applyList = this.Sparepartlist;
|
|
|
|
|
query.workStatus = this.form3.workStatus;
|
|
|
|
|
query.sn = this.form3.sn;
|
|
|
|
|
query.planNumber = this.form3.planNumber;
|
|
|
|
|
query.whCode = this.form3.whCode;
|
|
|
|
|
await this.model.PurchaseOrderdetailPda(query);
|
|
|
|
|
if (this.model.SubmitCode.code == '200') {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '成功',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
setTimeout(() => {
|
|
|
|
|
uni.navigateTo({
|
|
|
|
|
url: `/pages/equipment/Upkeep/index?listitem=`,
|
|
|
|
|
});
|
|
|
|
|
}, 1000);
|
|
|
|
|
} else {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '失败',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
async onFormDoubleClick(item) {
|
|
|
|
|
console.log('双击', item);
|
|
|
|
|
//await this.model.OnSubmit(item.id);
|
|
|
|
|
// uni.navigateTo({
|
|
|
|
|
// url: `/pages/equipment/Upkeep/repairing?listitem=` + encodeURIComponent(JSON.stringify(item)),
|
|
|
|
|
// });
|
|
|
|
|
this.uni.navigateTo({
|
|
|
|
|
url: this.page.wms.ReceivePODetail,
|
|
|
|
|
url: this.page.wms.ReceivePODetail + '?listitem=' + encodeURIComponent(JSON.stringify(item)),
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
//查询货单关联采购单信息
|
|
|
|
|
async query() {
|
|
|
|
|
// if (this.orderNo == '' || this.orderNo.length == 0) {
|
|
|
|
|
// this.customToast('请输入nficl');
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// await this.model.queryOrderNo(this.orderNo);
|
|
|
|
|
// this.list = model.orderNoItemList;
|
|
|
|
|
console.log(session);
|
|
|
|
|
if (this.procureCode == '' || this.procureCode.length == 0) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '请输入rfid',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let query = {
|
|
|
|
|
procureCode: this.procureCode,
|
|
|
|
|
materialCode: this.materialCode,
|
|
|
|
|
factoryCode: '1000',
|
|
|
|
|
};
|
|
|
|
|
await this.model.PurchaseOrderPda(query);
|
|
|
|
|
this.list = model.orderNoItemList;
|
|
|
|
|
}
|
|
|
|
|
//提单按钮
|
|
|
|
|
tidan() {
|
|
|
|
|
console.log('11111');
|
|
|
|
|
async tidan() {
|
|
|
|
|
if (this.procureCode == '' || this.procureCode.length == 0) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '请输入rfid',
|
|
|
|
|
type: 'default',
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let query = {
|
|
|
|
|
procureCode: this.procureCode,
|
|
|
|
|
materialCode: this.materialCode,
|
|
|
|
|
factoryCode: '1000',
|
|
|
|
|
};
|
|
|
|
|
await this.model.PurchaseOrderPda(query);
|
|
|
|
|
this.list = model.orderNoItemList;
|
|
|
|
|
}
|
|
|
|
|
histroyItem: any = {};
|
|
|
|
|
barcode: any = '';
|
|
|
|
|
async selectProductlocCode(e: any) {
|
|
|
|
|
this.form3 = e.pickerName;
|
|
|
|
|
// await this.model.getpalletLocation(this.form3.value); //参数:成型区2,烘房3
|
|
|
|
|
}
|
|
|
|
|
//完成送货单
|
|
|
|
|
async onSubmit() {
|
|
|
|
|
// if (this.orderNo == '' || this.orderNo.length == 0) {
|
|
|
|
|
// if (this.procureCode == '' || this.procureCode.length == 0) {
|
|
|
|
|
// this.customToast('请输入nficl');
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
@ -204,7 +293,7 @@ export default class receivePO extends BasePage {
|
|
|
|
|
// let params = {
|
|
|
|
|
// loginName: session.loginName,
|
|
|
|
|
// factoryCode: session.factoryCode,
|
|
|
|
|
// orderNo: this.orderNo,
|
|
|
|
|
// procureCode: this.procureCode,
|
|
|
|
|
// orderItem: this.histroyItem.orderItem,
|
|
|
|
|
// productCode: this.histroyItem.productCode,
|
|
|
|
|
// productDescZh: this.histroyItem.productDescZh,
|
|
|
|
@ -472,7 +561,8 @@ export default class receivePO extends BasePage {
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
margin: 20rpx;
|
|
|
|
|
.pouptitle {
|
|
|
|
|
width: 25%;
|
|
|
|
|
min-width: 30%;
|
|
|
|
|
white-space: nowrap;
|
|
|
|
|
}
|
|
|
|
|
.poupcontent {
|
|
|
|
|
border: 1px solid rgba(128, 128, 128, 0.2);
|
|
|
|
@ -481,7 +571,7 @@ export default class receivePO extends BasePage {
|
|
|
|
|
}
|
|
|
|
|
.poupbutton {
|
|
|
|
|
display: flex;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
justify-content: space-around;
|
|
|
|
|
}
|
|
|
|
|
.mask {
|
|
|
|
|
position: fixed;
|
|
|
|
|