|
|
|
@ -16,7 +16,7 @@
|
|
|
|
|
<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>
|
|
|
|
|
<u-button type="primary" @click="query">提单</u-button>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- 订单 -->
|
|
|
|
@ -31,30 +31,30 @@
|
|
|
|
|
<view class="list">
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="list-item"> 产品编码: </view>
|
|
|
|
|
<view> 40000006954 </view>
|
|
|
|
|
<view> {{ orderNoItemList && orderNoItemList.productCode }} </view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="list-item"> 产品名称: </view>
|
|
|
|
|
<view> 纸箱 </view>
|
|
|
|
|
<view> {{ orderNoItemList && orderNoItemList.productName }} </view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="row-list-item">
|
|
|
|
|
<view class="list-item"> 订单数量: </view>
|
|
|
|
|
<view> 100/0 </view>
|
|
|
|
|
<view> {{ orderNoItemList && orderNoItemList.planQuantity }} </view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list-item">
|
|
|
|
|
<view class="list-item"> 单位: </view>
|
|
|
|
|
<view> 件 </view>
|
|
|
|
|
<view> {{ orderNoItemList && orderNoItemList.unitOfMeasure }} </view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="list-item">捡货数量: </view>
|
|
|
|
|
<view> 3 </view>
|
|
|
|
|
<view> {{ outnumber }} </view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</u-form>
|
|
|
|
|
<u-form class="form4">
|
|
|
|
|
<u-search placeholder="请扫描箱码" v-model="boxnumber" :show-action="false"></u-search>
|
|
|
|
|
<u-search placeholder="请扫描箱码" @search="addlist" v-model="boxnumber" :show-action="false"></u-search>
|
|
|
|
|
<!-- <u-input style="border: 0.5rpx solid #8d8989; border-radius: 10rpx" v-model="boxnumber" @click="clickscan"></u-input> -->
|
|
|
|
|
</u-form>
|
|
|
|
|
</view>
|
|
|
|
@ -67,17 +67,17 @@
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="row-list-item">
|
|
|
|
|
<view class="list-item"> 批次号: </view>
|
|
|
|
|
<view> 100/0 </view>
|
|
|
|
|
<view> {{ item.lotNumber }} </view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list-item">
|
|
|
|
|
<view class="list-item"> 箱码: </view>
|
|
|
|
|
<view> 件 </view>
|
|
|
|
|
<view> {{ item.barcode }}件 </view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="row-list">
|
|
|
|
|
<view class="row-list-item">
|
|
|
|
|
<view class="list-item"> 库位码: </view>
|
|
|
|
|
<view> 100/0 </view>
|
|
|
|
|
<view> {{ item.wlCode }} </view>
|
|
|
|
|
</view>
|
|
|
|
|
<!-- <view class="row-list-item">
|
|
|
|
|
<view class="list-item"> 出库数量: </view>
|
|
|
|
@ -87,7 +87,7 @@
|
|
|
|
|
</view>
|
|
|
|
|
<view class="rowright">
|
|
|
|
|
<view class="righttitle">
|
|
|
|
|
<view @click.stop="onPass(item)" class="boder-icon-rigth"> 删除 </view>
|
|
|
|
|
<view @click.stop="ondelete(item)" class="boder-icon-rigth"> 删除 </view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
@ -106,6 +106,7 @@
|
|
|
|
|
</u-col>
|
|
|
|
|
</u-row>
|
|
|
|
|
</view>
|
|
|
|
|
<u-toast ref="uToast" />
|
|
|
|
|
</view>
|
|
|
|
|
</template>
|
|
|
|
|
<script lang="ts">
|
|
|
|
@ -125,19 +126,10 @@ interface OptionType {
|
|
|
|
|
})
|
|
|
|
|
export default class SaleOutWH extends BasePage {
|
|
|
|
|
model = model;
|
|
|
|
|
list: any = [{ id: 1 }, { id: 2 }, { id: 3 }, { id: 4 }, { id: 5 }, { id: 6 }, { id: 7 }, { id: 8 }];
|
|
|
|
|
list: any = [];
|
|
|
|
|
aimWl = {} as OptionType;
|
|
|
|
|
boxnumber: any = '';
|
|
|
|
|
materilist = [
|
|
|
|
|
{
|
|
|
|
|
label: '合格',
|
|
|
|
|
value: '1',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '不合格',
|
|
|
|
|
value: '0',
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
materilist = [];
|
|
|
|
|
// remove: any = {};
|
|
|
|
|
// async onReady() {
|
|
|
|
|
// await this.model.queryLocation();
|
|
|
|
@ -148,64 +140,166 @@ export default class SaleOutWH extends BasePage {
|
|
|
|
|
// }
|
|
|
|
|
orderNo: any = '';
|
|
|
|
|
border = true;
|
|
|
|
|
height = 100;
|
|
|
|
|
autoHeight = true;
|
|
|
|
|
imgList: any = [];
|
|
|
|
|
imgUrlList: any = [];
|
|
|
|
|
isqualified = [
|
|
|
|
|
{
|
|
|
|
|
label: '合格',
|
|
|
|
|
value: '1',
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
label: '不合格',
|
|
|
|
|
value: '0',
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
productCodeList: any = {};
|
|
|
|
|
orderNoItemList: any = [];
|
|
|
|
|
showProduceCodeList: any = [];
|
|
|
|
|
itemdetail: any = '';
|
|
|
|
|
outnumber: any = 0;
|
|
|
|
|
bookTypeChange(e: any) {
|
|
|
|
|
this.aimWl = e.pickerName;
|
|
|
|
|
this.getlist();
|
|
|
|
|
this.queryinformation();
|
|
|
|
|
}
|
|
|
|
|
//收货按钮
|
|
|
|
|
onPass(item) {
|
|
|
|
|
async ondelete(item) {
|
|
|
|
|
console.log('1234567', item);
|
|
|
|
|
this.itemdetail = item;
|
|
|
|
|
// this.showmodal = true;
|
|
|
|
|
// this.content = '是否删除?';
|
|
|
|
|
this.itemdetail.orderNo = this.orderNo;
|
|
|
|
|
console.log(this.itemdetail, this.orderNo);
|
|
|
|
|
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 query() {
|
|
|
|
|
// if (this.orderNo == '' || this.orderNo.length == 0) {
|
|
|
|
|
// this.customToast('请输入nficl');
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
// await this.model.queryOrderNo(this.orderNo);
|
|
|
|
|
if (this.orderNo == '' || this.orderNo.length == 0) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '请输入备货单号',
|
|
|
|
|
// url: '/pages/user/index'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
await this.model.showProduceCode(this.orderNo);
|
|
|
|
|
if (model.orderNoItemList) {
|
|
|
|
|
this.materilist = [];
|
|
|
|
|
let a: any = {};
|
|
|
|
|
model.orderNoItemList.forEach((item) => {
|
|
|
|
|
a.label = item.productName;
|
|
|
|
|
a.value = item.productCode;
|
|
|
|
|
this.materilist.push(a);
|
|
|
|
|
});
|
|
|
|
|
this.aimWl.value = this.materilist[0].value;
|
|
|
|
|
this.queryinformation();
|
|
|
|
|
this.getlist();
|
|
|
|
|
} else {
|
|
|
|
|
this.materilist = [];
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
//查询货单关联采购单信息
|
|
|
|
|
async queryinformation() {
|
|
|
|
|
if (this.orderNo == '' || this.orderNo.length == 0) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '请输入备货单号',
|
|
|
|
|
// url: '/pages/user/index'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let item: any = {};
|
|
|
|
|
item.orderNo = this.orderNo;
|
|
|
|
|
item.value = this.aimWl.value;
|
|
|
|
|
await this.model.queryinformation(item);
|
|
|
|
|
if (model.information) {
|
|
|
|
|
this.orderNoItemList = model.information;
|
|
|
|
|
} else {
|
|
|
|
|
this.orderNoItemList = {};
|
|
|
|
|
}
|
|
|
|
|
// this.getlist();
|
|
|
|
|
}
|
|
|
|
|
async getlist() {
|
|
|
|
|
let item: any = {};
|
|
|
|
|
item.orderNo = this.orderNo;
|
|
|
|
|
item.value = this.aimWl.value;
|
|
|
|
|
await (this.model as any).showTrays(item);
|
|
|
|
|
if (model.TraysList.length > 0) {
|
|
|
|
|
this.list = model.TraysList;
|
|
|
|
|
this.outnumber = model.TraysList.length;
|
|
|
|
|
} else {
|
|
|
|
|
this.list = [];
|
|
|
|
|
this.outnumber = 0;
|
|
|
|
|
}
|
|
|
|
|
console.log(model.TraysList);
|
|
|
|
|
}
|
|
|
|
|
async addlist() {
|
|
|
|
|
if (this.orderNo == '' || this.orderNo.length == 0) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '请输入备货单号',
|
|
|
|
|
// url: '/pages/user/index'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
if (this.aimWl.value == '' || this.aimWl.value.length == 0) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '请输入选择产品编码',
|
|
|
|
|
// url: '/pages/user/index'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
let item: any = {};
|
|
|
|
|
item.productCode = this.aimWl.value;
|
|
|
|
|
item.barcode = this.boxnumber;
|
|
|
|
|
await this.model.selloutconntray(item);
|
|
|
|
|
if (this.model.SubmitCode == '200') {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '成功',
|
|
|
|
|
type: 'success',
|
|
|
|
|
});
|
|
|
|
|
this.getlist();
|
|
|
|
|
this.boxnumber = '';
|
|
|
|
|
} else {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '失败',
|
|
|
|
|
type: 'error',
|
|
|
|
|
});
|
|
|
|
|
this.getlist();
|
|
|
|
|
this.boxnumber = '';
|
|
|
|
|
}
|
|
|
|
|
// //入库后的查询下面列表的接口
|
|
|
|
|
// await this.model.queryOrderNo(this.form5);
|
|
|
|
|
// this.list = model.orderNoItemList;
|
|
|
|
|
}
|
|
|
|
|
histroyItem: any = {};
|
|
|
|
|
barcode: any = '';
|
|
|
|
|
onSubmit() {
|
|
|
|
|
console.log('1234567');
|
|
|
|
|
async onSubmit() {
|
|
|
|
|
if (this.orderNo == '' || this.orderNo.length == 0) {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '请输入备货单号',
|
|
|
|
|
// url: '/pages/user/index'
|
|
|
|
|
});
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
// tidan() {}
|
|
|
|
|
clickscan() {
|
|
|
|
|
const self: SaleOutWH = this as SaleOutWH;
|
|
|
|
|
const showToast = (message: string) => {
|
|
|
|
|
uni.showToast({
|
|
|
|
|
title: message,
|
|
|
|
|
icon: 'none',
|
|
|
|
|
|
|
|
|
|
if (this.list.length == 0 || this.list == '') {
|
|
|
|
|
(this.$refs.uToast as any).show({
|
|
|
|
|
title: '请先扫码箱码',
|
|
|
|
|
// url: '/pages/user/index'
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
uni.scanCode({
|
|
|
|
|
onlyFromCamera: true,
|
|
|
|
|
success: function (res) {
|
|
|
|
|
console.log('条码类型:' + res.scanType);
|
|
|
|
|
console.log('条码内容:' + res.result);
|
|
|
|
|
self.boxnumber = res.result;
|
|
|
|
|
//that.getByPoint();
|
|
|
|
|
},
|
|
|
|
|
fail: function () {
|
|
|
|
|
showToast('扫码不成功');
|
|
|
|
|
},
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
this.list[0].outnumber = this.outnumber;
|
|
|
|
|
await this.model.out(this.list);
|
|
|
|
|
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();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
</script>
|
|
|
|
|