|
|
@ -2,36 +2,12 @@ |
|
|
|
<view class="page-wraper" @touchstart="touchScreen"> |
|
|
|
<view class="page-header flex" |
|
|
|
style="font-size: 32rpx; padding-left: 10rpx; padding-top: 10rpx; flex-direction: column;"> |
|
|
|
<!-- <view class="flex u-col-center space-between"> |
|
|
|
<view class="" style="font-size: 35rpx;"> |
|
|
|
生产计划 : {{planNumber}} |
|
|
|
<text v-if="planName!=''">({{planName}})</text> |
|
|
|
</view> |
|
|
|
<view class=""> |
|
|
|
<button type="primary" size="mini" @click="showPlanSelect">选择单号</button> |
|
|
|
</view> |
|
|
|
</view> --> |
|
|
|
<!-- <view class="" style="width: 100%;background-color: gray;height: 2rpx; margin-top: 10rpx;" /> --> |
|
|
|
|
|
|
|
</view> |
|
|
|
<view class="page-main"> |
|
|
|
<scroll-view scroll-y="true" class="page-main-scroll"> |
|
|
|
<view style="padding-bottom: 80rpx;width: 100%;"> |
|
|
|
<view class="uni-flex uni-column " style="margin: 10rpx;"> |
|
|
|
<uni-section title="1.生产计划" subTitle="选择生产计划" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
|
type="line"> |
|
|
|
</uni-section> |
|
|
|
<view class="uni-flex space-between"> |
|
|
|
<view class="" style="width: 75%;"> |
|
|
|
<uni-easyinput disabled trim="all" v-model="planNumber"></uni-easyinput> |
|
|
|
</view> |
|
|
|
<view class="uni-flex" style="width: 25%; align-items: center;"> |
|
|
|
<button type="primary" size="mini" @click="showPlanSelect">选择</button> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="uni-flex uni-column " style="margin: 10rpx;"> |
|
|
|
<uni-section title="2.料筒号" subTitle="扫描料筒号" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
|
<uni-section title="1.料筒号" subTitle="扫描料筒号" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
|
type="line"> |
|
|
|
</uni-section> |
|
|
|
|
|
|
@ -43,7 +19,7 @@ |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="uni-flex uni-column " style="margin: 10rpx;"> |
|
|
|
<uni-section title="3.零件号" subTitle="扫描零件号" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
|
<uni-section title="2.零件号" subTitle="扫描零件号" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
|
type="line"> |
|
|
|
</uni-section> |
|
|
|
<view class="uni-flex space-between"> |
|
|
@ -52,7 +28,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="uni-flex uni-column " style="margin: 10rpx;"> |
|
|
|
<uni-section title="4.批次号" subTitle="扫描批次号" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
|
<uni-section title="3.批次号" subTitle="扫描批次号" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
|
type="line"> |
|
|
|
</uni-section> |
|
|
|
<view class="uni-flex space-between"> |
|
|
@ -61,7 +37,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="uni-flex uni-column " style="margin: 10rpx;"> |
|
|
|
<uni-section title="5.参考号" subTitle="扫描参考号" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
|
<uni-section title="4.参考号" subTitle="扫描参考号" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
|
type="line"> |
|
|
|
</uni-section> |
|
|
|
<view class="uni-flex space-between"> |
|
|
@ -70,7 +46,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="uni-flex uni-column " style="margin: 10rpx;"> |
|
|
|
<uni-section title="6.供应商编码" subTitle="扫描供应商编码" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
|
<uni-section title="5.供应商编码" subTitle="扫描供应商编码" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
|
type="line"> |
|
|
|
</uni-section> |
|
|
|
<view class="uni-flex space-between"> |
|
|
@ -79,7 +55,7 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="uni-flex uni-column " style="margin: 10rpx;"> |
|
|
|
<uni-section title="7.重量" subTitle="输入重量" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
|
<uni-section title="6.重量" subTitle="输入重量" subTitleFontSize="26rpx" titleFontSize="35rpx" |
|
|
|
type="line"> |
|
|
|
</uni-section> |
|
|
|
<view class="uni-flex space-between"> |
|
|
@ -102,7 +78,6 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<selectClickList ref="selectPopup" title="选择计划单号" @select="selectPlan" ></selectClickList> |
|
|
|
</view> |
|
|
|
|
|
|
|
|
|
|
@ -110,7 +85,6 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
getPlasticsPlaneNumberList, |
|
|
|
getMaterialLists, |
|
|
|
plasticsInputSubmit, |
|
|
|
getBucketCode, |
|
|
@ -135,7 +109,6 @@ |
|
|
|
data() { |
|
|
|
return { |
|
|
|
dateTime: "", |
|
|
|
planNumber: "", |
|
|
|
dataList: [], |
|
|
|
userForm: { |
|
|
|
names: [], |
|
|
@ -189,7 +162,7 @@ |
|
|
|
this.itemCode = "" |
|
|
|
this.itemCheckCode = "" |
|
|
|
if (data == undefined || data == "") { |
|
|
|
this.showMessage("2.料筒号", "输入料筒号") |
|
|
|
this.showMessage("1.料筒号", "输入料筒号") |
|
|
|
this.$refs.inputBucketCode.focused = true |
|
|
|
return; |
|
|
|
} |
|
|
@ -204,11 +177,11 @@ |
|
|
|
this.itemCode = "" |
|
|
|
this.bucketCheckCode = "" |
|
|
|
this.$refs.inputBucketCode.focused = true |
|
|
|
this.showMessage("2.料筒号", "请先扫描料筒号") |
|
|
|
this.showMessage("1.料筒号", "请先扫描料筒号") |
|
|
|
return; |
|
|
|
} |
|
|
|
if (data == undefined || data == "") { |
|
|
|
this.showMessage("3.零件号", "输入零件号") |
|
|
|
this.showMessage("2.零件号", "输入零件号") |
|
|
|
this.$refs.inputItemCode.focused = true |
|
|
|
return; |
|
|
|
} |
|
|
@ -223,7 +196,7 @@ |
|
|
|
this.itemCode = "" |
|
|
|
this.itemCheckCode = ""; |
|
|
|
this.$refs.inputItemCode.focused = true |
|
|
|
this.showMessage("3.零件号", "零件号【" + data + "】无效," + error) |
|
|
|
this.showMessage("2.零件号", "零件号【" + data + "】无效," + error) |
|
|
|
// this.showMessage("3.零件号",error) |
|
|
|
}) |
|
|
|
|
|
|
@ -231,87 +204,81 @@ |
|
|
|
|
|
|
|
onConfirmBatchCode(data) { |
|
|
|
if (data == undefined || data == "") { |
|
|
|
this.showMessage("4.批次", "输入批次号位空") |
|
|
|
this.showMessage("3.批次", "输入批次号位空") |
|
|
|
return; |
|
|
|
} |
|
|
|
this.$refs.inputReferenceCode.focused = true |
|
|
|
}, |
|
|
|
onConfirmReferenceCode(data) { |
|
|
|
if (data == undefined || data == "") { |
|
|
|
this.showMessage("4.批次", "输入参考号位空") |
|
|
|
this.showMessage("3.批次", "输入参考号位空") |
|
|
|
return; |
|
|
|
} |
|
|
|
this.$refs.inputSupplierCode.focused = true |
|
|
|
}, |
|
|
|
onConfirmSupplierCode(data) { |
|
|
|
if (data == undefined || data == "") { |
|
|
|
this.showMessage("6.供应商编码", "输入供应商编码位空") |
|
|
|
this.showMessage("5.供应商编码", "输入供应商编码位空") |
|
|
|
return; |
|
|
|
} |
|
|
|
this.$refs.inputWeight.focused = true |
|
|
|
}, |
|
|
|
onConfirmWeight(data) { |
|
|
|
if (data == undefined || data == "") { |
|
|
|
this.showMessage("7.数量", "输入数量为空") |
|
|
|
this.showMessage("6.数量", "输入数量为空") |
|
|
|
return; |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
submit() { |
|
|
|
if (this.planNumber == "") { |
|
|
|
this.showMessage("1.生产计划", "请选择生产计划") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (this.bucketCode == "") { |
|
|
|
this.bucketCode = "" |
|
|
|
this.bucketCheckCode =="" |
|
|
|
this.showMessage("2.料筒号", "请扫描料筒号") |
|
|
|
this.showMessage("1.料筒号", "请扫描料筒号") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (this.bucketCheckCode == "") { |
|
|
|
this.showMessage("2.料筒号", "请按回车校验料筒号") |
|
|
|
this.showMessage("1.料筒号", "请按回车校验料筒号") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (this.itemCode == "") { |
|
|
|
this.itemCode = "" |
|
|
|
this.itemCheckCode = "" |
|
|
|
this.showMessage("3.零件号", "请扫描零件号") |
|
|
|
this.showMessage("2.零件号", "请扫描零件号") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (this.itemCheckCode == "") { |
|
|
|
this.showMessage("3.零件号", "请按回车校验零件号") |
|
|
|
this.showMessage("2.零件号", "请按回车校验零件号") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
if (this.batchCode == "") { |
|
|
|
this.showMessage("4.批次号", "请扫描批次号") |
|
|
|
this.showMessage("3.批次号", "请扫描批次号") |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.referenceCode == "") { |
|
|
|
this.showMessage("5.参考号", "请扫描参考号") |
|
|
|
this.showMessage("4.参考号", "请扫描参考号") |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.supplierCode == "") { |
|
|
|
this.showMessage("6.供应商编码", "请扫描供应商") |
|
|
|
this.showMessage("5.供应商编码", "请扫描供应商") |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.weight == "") { |
|
|
|
this.showMessage("7.数量", "请输入重量") |
|
|
|
this.showMessage("6.数量", "请输入重量") |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.weight == 0) { |
|
|
|
this.showMessage("7.数量", "输入重量必须大于0") |
|
|
|
this.showMessage("6.数量", "输入重量必须大于0") |
|
|
|
return |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var param = { |
|
|
|
planNumber: this.planNumber, |
|
|
|
bucketCode: this.bucketCheckCode, |
|
|
|
itemCode: this.itemCheckCode, |
|
|
|
batchCode: this.batchCode, |
|
|
@ -360,7 +327,6 @@ |
|
|
|
}) |
|
|
|
}, |
|
|
|
resetData() { |
|
|
|
this.planNumber = "" |
|
|
|
this.bucketCheckCode = "" |
|
|
|
this.bucketCode = "" |
|
|
|
this.itemCheckCode = "" |
|
|
@ -370,35 +336,6 @@ |
|
|
|
this.supplierCode = "" |
|
|
|
this.weight = "" |
|
|
|
}, |
|
|
|
showPlanSelect() { |
|
|
|
uni.showLoading({ |
|
|
|
title: "加载中", |
|
|
|
mask: true |
|
|
|
}) |
|
|
|
getPlasticsPlaneNumberList().then(res => { |
|
|
|
uni.hideLoading() |
|
|
|
if(res.Result.length>0){ |
|
|
|
var list = []; |
|
|
|
list = res.Result; |
|
|
|
list.forEach(res => { |
|
|
|
res.label = res.PLAN_NO; |
|
|
|
res.value = res.SHIFT_CODE |
|
|
|
}) |
|
|
|
this.$refs.selectPopup.openScanPopup(list) |
|
|
|
}else { |
|
|
|
this.showMessage("原料列表为0") |
|
|
|
} |
|
|
|
}).catch(error => { |
|
|
|
uni.hideLoading() |
|
|
|
this.showMessage("",error) |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
selectPlan(data) { |
|
|
|
this.planNumber = data.label |
|
|
|
console.log(data) |
|
|
|
}, |
|
|
|
|
|
|
|
onConfirm(data) { |
|
|
|
console.log(data.detail.value) |
|
|
|