Browse Source

去除投料计划单号选择

master
lijuncheng 4 months ago
parent
commit
93546cd250
  1. 67
      src/pages/foam/input.vue
  2. 109
      src/pages/plastics/input.vue

67
src/pages/foam/input.vue

@ -2,40 +2,11 @@
<view class="page-wraper" @touchstart="touchScreen"> <view class="page-wraper" @touchstart="touchScreen">
<view class="page-header flex" <view class="page-header flex"
style="font-size: 32rpx; padding-left: 10rpx; padding-top: 10rpx; flex-direction: column;"> 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>
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view style="padding-bottom: 80rpx;width: 100%;"> <view style="padding-bottom: 80rpx;width: 100%;">
<view class="uni-flex uni-column " style="margin: 10rpx;">
<!-- <view class="" style="font-size: 35rpx;">
计划单号
</view> -->
<uni-section title="计划单号" subTitle="选择计划单号" subTitleFontSize="26rpx" titleFontSize="35rpx"
type="line">
</uni-section>
<view class="uni-flex space-between">
<view class="" style="width: 75%; ">
<uni-easyinput disabled style="margin-left: 10rpx; margin-right: 10rpx;" 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;"> <view class="uni-flex uni-column " style="margin: 10rpx;">
<uni-section title="原料名称" subTitle="输入或者选择原料名称" subTitleFontSize="26rpx" titleFontSize="35rpx" <uni-section title="原料名称" subTitle="输入或者选择原料名称" subTitleFontSize="26rpx" titleFontSize="35rpx"
@ -81,7 +52,6 @@
</view> </view>
</view> </view>
<selectClickList ref="selectPopup" title="选择计划单号" @select="selectPlan"></selectClickList>
<selectClickList ref="selectPopupMaterial" title="选择原料" @select="selectMaterial"></selectClickList> <selectClickList ref="selectPopupMaterial" title="选择原料" @select="selectMaterial"></selectClickList>
</view> </view>
@ -99,7 +69,6 @@
</script> </script>
<script> <script>
import { import {
getFoamPlaneNumberList,
getMaterialLists, getMaterialLists,
foamInputSubmit foamInputSubmit
} from '@/api/request2.js'; } from '@/api/request2.js';
@ -120,7 +89,6 @@
data() { data() {
return { return {
dateTime: "", dateTime: "",
planNumber: "",
materialName: "", materialName: "",
materialCode: "", materialCode: "",
materialQty: "", materialQty: "",
@ -159,10 +127,6 @@
} }
}, },
submit() { submit() {
if (this.planNumber == "") {
this.showMessage("请选择计划单号")
return
}
if (this.materialName == "") { if (this.materialName == "") {
this.showMessage("请输入原料名称") this.showMessage("请输入原料名称")
return return
@ -176,7 +140,6 @@
mask: true mask: true
}) })
var param = { var param = {
planNumber: this.planNumber,
materialName: this.materialName, materialName: this.materialName,
materialCode: this.materialCode, materialCode: this.materialCode,
materialQty: this.materialQty, materialQty: this.materialQty,
@ -200,40 +163,10 @@
}) })
}, },
resetData() { resetData() {
this.planNumber = "";
this.materialName = "" this.materialName = ""
this.materialQty = ""; this.materialQty = "";
this.materialCode = "" this.materialCode = ""
}, },
showPlanSelect() {
uni.showLoading({
title: "加载中",
mask: true
})
getFoamPlaneNumberList().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)
},
showMaterialSelect() { showMaterialSelect() {
uni.showLoading({ uni.showLoading({

109
src/pages/plastics/input.vue

@ -2,36 +2,12 @@
<view class="page-wraper" @touchstart="touchScreen"> <view class="page-wraper" @touchstart="touchScreen">
<view class="page-header flex" <view class="page-header flex"
style="font-size: 32rpx; padding-left: 10rpx; padding-top: 10rpx; flex-direction: column;"> 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>
<view class="page-main"> <view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view style="padding-bottom: 80rpx;width: 100%;"> <view style="padding-bottom: 80rpx;width: 100%;">
<view class="uni-flex uni-column " style="margin: 10rpx;"> <view class="uni-flex uni-column " style="margin: 10rpx;">
<uni-section title="1.生产计划" subTitle="选择生产计划" subTitleFontSize="26rpx" titleFontSize="35rpx" <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"
type="line"> type="line">
</uni-section> </uni-section>
@ -43,7 +19,7 @@
</view> </view>
<view class="uni-flex uni-column " style="margin: 10rpx;"> <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"> type="line">
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
@ -52,7 +28,7 @@
</view> </view>
</view> </view>
<view class="uni-flex uni-column " style="margin: 10rpx;"> <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"> type="line">
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
@ -61,7 +37,7 @@
</view> </view>
</view> </view>
<view class="uni-flex uni-column " style="margin: 10rpx;"> <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"> type="line">
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
@ -70,7 +46,7 @@
</view> </view>
</view> </view>
<view class="uni-flex uni-column " style="margin: 10rpx;"> <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"> type="line">
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
@ -79,7 +55,7 @@
</view> </view>
</view> </view>
<view class="uni-flex uni-column " style="margin: 10rpx;"> <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"> type="line">
</uni-section> </uni-section>
<view class="uni-flex space-between"> <view class="uni-flex space-between">
@ -102,7 +78,6 @@
</view> </view>
</view> </view>
</view> </view>
<selectClickList ref="selectPopup" title="选择计划单号" @select="selectPlan" ></selectClickList>
</view> </view>
@ -110,7 +85,6 @@
<script> <script>
import { import {
getPlasticsPlaneNumberList,
getMaterialLists, getMaterialLists,
plasticsInputSubmit, plasticsInputSubmit,
getBucketCode, getBucketCode,
@ -135,7 +109,6 @@
data() { data() {
return { return {
dateTime: "", dateTime: "",
planNumber: "",
dataList: [], dataList: [],
userForm: { userForm: {
names: [], names: [],
@ -189,7 +162,7 @@
this.itemCode = "" this.itemCode = ""
this.itemCheckCode = "" this.itemCheckCode = ""
if (data == undefined || data == "") { if (data == undefined || data == "") {
this.showMessage("2.料筒号", "输入料筒号") this.showMessage("1.料筒号", "输入料筒号")
this.$refs.inputBucketCode.focused = true this.$refs.inputBucketCode.focused = true
return; return;
} }
@ -204,11 +177,11 @@
this.itemCode = "" this.itemCode = ""
this.bucketCheckCode = "" this.bucketCheckCode = ""
this.$refs.inputBucketCode.focused = true this.$refs.inputBucketCode.focused = true
this.showMessage("2.料筒号", "请先扫描料筒号") this.showMessage("1.料筒号", "请先扫描料筒号")
return; return;
} }
if (data == undefined || data == "") { if (data == undefined || data == "") {
this.showMessage("3.零件号", "输入零件号") this.showMessage("2.零件号", "输入零件号")
this.$refs.inputItemCode.focused = true this.$refs.inputItemCode.focused = true
return; return;
} }
@ -223,7 +196,7 @@
this.itemCode = "" this.itemCode = ""
this.itemCheckCode = ""; this.itemCheckCode = "";
this.$refs.inputItemCode.focused = true this.$refs.inputItemCode.focused = true
this.showMessage("3.零件号", "零件号【" + data + "】无效," + error) this.showMessage("2.零件号", "零件号【" + data + "】无效," + error)
// this.showMessage("3.",error) // this.showMessage("3.",error)
}) })
@ -231,87 +204,81 @@
onConfirmBatchCode(data) { onConfirmBatchCode(data) {
if (data == undefined || data == "") { if (data == undefined || data == "") {
this.showMessage("4.批次", "输入批次号位空") this.showMessage("3.批次", "输入批次号位空")
return; return;
} }
this.$refs.inputReferenceCode.focused = true this.$refs.inputReferenceCode.focused = true
}, },
onConfirmReferenceCode(data) { onConfirmReferenceCode(data) {
if (data == undefined || data == "") { if (data == undefined || data == "") {
this.showMessage("4.批次", "输入参考号位空") this.showMessage("3.批次", "输入参考号位空")
return; return;
} }
this.$refs.inputSupplierCode.focused = true this.$refs.inputSupplierCode.focused = true
}, },
onConfirmSupplierCode(data) { onConfirmSupplierCode(data) {
if (data == undefined || data == "") { if (data == undefined || data == "") {
this.showMessage("6.供应商编码", "输入供应商编码位空") this.showMessage("5.供应商编码", "输入供应商编码位空")
return; return;
} }
this.$refs.inputWeight.focused = true this.$refs.inputWeight.focused = true
}, },
onConfirmWeight(data) { onConfirmWeight(data) {
if (data == undefined || data == "") { if (data == undefined || data == "") {
this.showMessage("7.数量", "输入数量为空") this.showMessage("6.数量", "输入数量为空")
return; return;
} }
}, },
submit() { submit() {
if (this.planNumber == "") {
this.showMessage("1.生产计划", "请选择生产计划")
return
}
if (this.bucketCode == "") { if (this.bucketCode == "") {
this.bucketCode = "" this.bucketCode = ""
this.bucketCheckCode =="" this.bucketCheckCode ==""
this.showMessage("2.料筒号", "请扫描料筒号") this.showMessage("1.料筒号", "请扫描料筒号")
return return
} }
if (this.bucketCheckCode == "") { if (this.bucketCheckCode == "") {
this.showMessage("2.料筒号", "请按回车校验料筒号") this.showMessage("1.料筒号", "请按回车校验料筒号")
return return
} }
if (this.itemCode == "") { if (this.itemCode == "") {
this.itemCode = "" this.itemCode = ""
this.itemCheckCode = "" this.itemCheckCode = ""
this.showMessage("3.零件号", "请扫描零件号") this.showMessage("2.零件号", "请扫描零件号")
return return
} }
if (this.itemCheckCode == "") { if (this.itemCheckCode == "") {
this.showMessage("3.零件号", "请按回车校验零件号") this.showMessage("2.零件号", "请按回车校验零件号")
return return
} }
if (this.batchCode == "") { if (this.batchCode == "") {
this.showMessage("4.批次号", "请扫描批次号") this.showMessage("3.批次号", "请扫描批次号")
return return
} }
if (this.referenceCode == "") { if (this.referenceCode == "") {
this.showMessage("5.参考号", "请扫描参考号") this.showMessage("4.参考号", "请扫描参考号")
return return
} }
if (this.supplierCode == "") { if (this.supplierCode == "") {
this.showMessage("6.供应商编码", "请扫描供应商") this.showMessage("5.供应商编码", "请扫描供应商")
return return
} }
if (this.weight == "") { if (this.weight == "") {
this.showMessage("7.数量", "请输入重量") this.showMessage("6.数量", "请输入重量")
return return
} }
if (this.weight == 0) { if (this.weight == 0) {
this.showMessage("7.数量", "输入重量必须大于0") this.showMessage("6.数量", "输入重量必须大于0")
return return
} }
var param = { var param = {
planNumber: this.planNumber,
bucketCode: this.bucketCheckCode, bucketCode: this.bucketCheckCode,
itemCode: this.itemCheckCode, itemCode: this.itemCheckCode,
batchCode: this.batchCode, batchCode: this.batchCode,
@ -360,7 +327,6 @@
}) })
}, },
resetData() { resetData() {
this.planNumber = ""
this.bucketCheckCode = "" this.bucketCheckCode = ""
this.bucketCode = "" this.bucketCode = ""
this.itemCheckCode = "" this.itemCheckCode = ""
@ -370,35 +336,6 @@
this.supplierCode = "" this.supplierCode = ""
this.weight = "" 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) { onConfirm(data) {
console.log(data.detail.value) console.log(data.detail.value)

Loading…
Cancel
Save