|
@ -4,7 +4,7 @@ |
|
|
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="flex u-col-center space-between"> |
|
|
<view class="" style="font-size: 35rpx;"> |
|
|
<view class="" style="font-size: 35rpx;"> |
|
|
计划单号 : {{planCode}} |
|
|
生产计划 : {{planNumber}} |
|
|
<text v-if="planName!=''">({{planName}})</text> |
|
|
<text v-if="planName!=''">({{planName}})</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class=""> |
|
|
<view class=""> |
|
@ -23,7 +23,7 @@ |
|
|
</uni-section> |
|
|
</uni-section> |
|
|
<view class="uni-flex space-between"> |
|
|
<view class="uni-flex space-between"> |
|
|
<view class="" style="width: 75%;"> |
|
|
<view class="" style="width: 75%;"> |
|
|
<uni-easyinput disabled trim="all" v-model="planCode"></uni-easyinput> |
|
|
<uni-easyinput disabled trim="all" v-model="planNumber"></uni-easyinput> |
|
|
</view> |
|
|
</view> |
|
|
<view class="uni-flex" style="width: 25%; align-items: center;"> |
|
|
<view class="uni-flex" style="width: 25%; align-items: center;"> |
|
|
<button type="primary" size="mini" @click="showPlanSelect">选择</button> |
|
|
<button type="primary" size="mini" @click="showPlanSelect">选择</button> |
|
@ -36,10 +36,8 @@ |
|
|
</uni-section> |
|
|
</uni-section> |
|
|
|
|
|
|
|
|
<view class="uni-flex"> |
|
|
<view class="uni-flex"> |
|
|
<uni-easyinput |
|
|
<uni-easyinput @clear="bucketClear" ref="inputBucketCode" class="" trim="all" |
|
|
@clear="bucketClear" |
|
|
v-model="bucketCode" @confirm="onConfirmBucketCode"></uni-easyinput> |
|
|
ref="inputBucketCode" class="" trim="all" v-model="bucketCode" |
|
|
|
|
|
@confirm="onConfirmBucketCode" ></uni-easyinput> |
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
@ -49,10 +47,7 @@ |
|
|
type="line"> |
|
|
type="line"> |
|
|
</uni-section> |
|
|
</uni-section> |
|
|
<view class="uni-flex space-between"> |
|
|
<view class="uni-flex space-between"> |
|
|
<uni-easyinput |
|
|
<uni-easyinput ref="inputItemCode" @clear="itemClear" class="" trim="all" v-model="itemCode" |
|
|
ref="inputItemCode" |
|
|
|
|
|
@clear="itemClear" |
|
|
|
|
|
class="" trim="all" v-model="itemCode" |
|
|
|
|
|
@confirm="onConfirmItemCode"></uni-easyinput> |
|
|
@confirm="onConfirmItemCode"></uni-easyinput> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -61,11 +56,7 @@ |
|
|
type="line"> |
|
|
type="line"> |
|
|
</uni-section> |
|
|
</uni-section> |
|
|
<view class="uni-flex space-between"> |
|
|
<view class="uni-flex space-between"> |
|
|
<uni-easyinput |
|
|
<uni-easyinput class="" trim="all" ref="inputBatchCode" v-model="batchCode" |
|
|
class="" |
|
|
|
|
|
trim="all" |
|
|
|
|
|
ref="inputBatchCode" |
|
|
|
|
|
v-model="batchCode" |
|
|
|
|
|
@confirm="onConfirmBatchCode"></uni-easyinput> |
|
|
@confirm="onConfirmBatchCode"></uni-easyinput> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -74,11 +65,7 @@ |
|
|
type="line"> |
|
|
type="line"> |
|
|
</uni-section> |
|
|
</uni-section> |
|
|
<view class="uni-flex space-between"> |
|
|
<view class="uni-flex space-between"> |
|
|
<uni-easyinput |
|
|
<uni-easyinput class="" trim="all" ref="inputReferenceCode" v-model="referenceCode" |
|
|
class="" |
|
|
|
|
|
trim="all" |
|
|
|
|
|
ref="inputReferenceCode" |
|
|
|
|
|
v-model="referenceCode" |
|
|
|
|
|
@confirm="onConfirmReferenceCode"></uni-easyinput> |
|
|
@confirm="onConfirmReferenceCode"></uni-easyinput> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -87,11 +74,7 @@ |
|
|
type="line"> |
|
|
type="line"> |
|
|
</uni-section> |
|
|
</uni-section> |
|
|
<view class="uni-flex space-between"> |
|
|
<view class="uni-flex space-between"> |
|
|
<uni-easyinput |
|
|
<uni-easyinput class="" ref="inputSupplierCode" trim="all" v-model="supplierCode" |
|
|
class="" |
|
|
|
|
|
ref="inputSupplierCode" |
|
|
|
|
|
trim="all" |
|
|
|
|
|
v-model="supplierCode" |
|
|
|
|
|
@confirm="onConfirmSupplierCode"></uni-easyinput> |
|
|
@confirm="onConfirmSupplierCode"></uni-easyinput> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -100,11 +83,7 @@ |
|
|
type="line"> |
|
|
type="line"> |
|
|
</uni-section> |
|
|
</uni-section> |
|
|
<view class="uni-flex space-between"> |
|
|
<view class="uni-flex space-between"> |
|
|
<uni-easyinput |
|
|
<uni-easyinput class="" trim="all" ref="inputWeight" v-model="weight" |
|
|
class="" |
|
|
|
|
|
trim="all" |
|
|
|
|
|
ref="inputWeight" |
|
|
|
|
|
v-model="weight" |
|
|
|
|
|
@confirm="onConfirmWeight"></uni-easyinput> |
|
|
@confirm="onConfirmWeight"></uni-easyinput> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -125,8 +104,7 @@ |
|
|
</view> |
|
|
</view> |
|
|
<winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal> |
|
|
<winScanNormal ref="scanPopup" title="设备编号" @getResult='getScanResult'></winScanNormal> |
|
|
|
|
|
|
|
|
<wz-select-popup ref="selectPopup" title="选择计划单号" @select="select" /> |
|
|
<wz-select-popup ref="selectPopup" title="选择生产计划" @select="selectPlan" /> |
|
|
<wz-select-popup ref="selectPopupMaterial" title="选择原料" @select="selectMaterial" /> |
|
|
|
|
|
<showModal ref="comMessage" @confirm="confirm"></showModal> |
|
|
<showModal ref="comMessage" @confirm="confirm"></showModal> |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -142,11 +120,11 @@ |
|
|
getMaterialList |
|
|
getMaterialList |
|
|
} from "../foam/mock.js" |
|
|
} from "../foam/mock.js" |
|
|
import { |
|
|
import { |
|
|
getPlaneNumberList, |
|
|
getPlasticsPlaneNumberList, |
|
|
getMaterialLists, |
|
|
getMaterialLists, |
|
|
foamInputSubmit, |
|
|
plasticsInputSubmit, |
|
|
getBucketCode, |
|
|
getBucketCode, |
|
|
getItemCode |
|
|
checkItemCodeByBucket |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
import showModal from '../../mycomponents/common/showModal.vue' |
|
|
import showModal from '../../mycomponents/common/showModal.vue' |
|
|
import winScanNormal from "@/mycomponents/scan/winScanNormal.vue" |
|
|
import winScanNormal from "@/mycomponents/scan/winScanNormal.vue" |
|
@ -161,7 +139,7 @@ |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
dateTime: "", |
|
|
dateTime: "", |
|
|
|
|
|
planNumber: "", |
|
|
planName: "", |
|
|
planName: "", |
|
|
dataList: [], |
|
|
dataList: [], |
|
|
userForm: { |
|
|
userForm: { |
|
@ -169,7 +147,6 @@ |
|
|
values: [], |
|
|
values: [], |
|
|
origin: [] |
|
|
origin: [] |
|
|
}, |
|
|
}, |
|
|
planCode: "", |
|
|
|
|
|
bucketCheckCode: "", |
|
|
bucketCheckCode: "", |
|
|
bucketCode: "", |
|
|
bucketCode: "", |
|
|
itemCode: "", |
|
|
itemCode: "", |
|
@ -211,28 +188,10 @@ |
|
|
this.$refs.inputBucketCode.focused = true |
|
|
this.$refs.inputBucketCode.focused = true |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
uni.showLoading({ |
|
|
this.bucketCode = data |
|
|
title: "加载中", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}) |
|
|
|
|
|
// getBucketCode().then(res=>{ |
|
|
|
|
|
// uni.hideLoading(); |
|
|
|
|
|
// this.bucketCheckCode = data; |
|
|
|
|
|
// }).catch(error=>{ |
|
|
|
|
|
// uni.hideLoading(); |
|
|
|
|
|
// this.bucketCode = "" |
|
|
|
|
|
// this.bucketCheckCode = ""; |
|
|
|
|
|
// this.showMessage("2.料筒号","料筒号【"+data+"】无效"+error) |
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
if(this.checkBucketCode(data)){ |
|
|
|
|
|
this.bucketCheckCode = data; |
|
|
this.bucketCheckCode = data; |
|
|
this.$refs.inputItemCode.focused = true |
|
|
this.$refs.inputItemCode.focused = true |
|
|
}else { |
|
|
|
|
|
this.bucketCode = "" |
|
|
|
|
|
this.bucketCheckCode = ""; |
|
|
|
|
|
this.showMessage("2.料筒号","料筒号【"+data+"】无效") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
onConfirmItemCode(data) { |
|
|
onConfirmItemCode(data) { |
|
@ -249,32 +208,28 @@ |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// getItemCode().then(res=>{ |
|
|
checkItemCodeByBucket(this.bucketCode, this.itemCode).then(res => { |
|
|
// uni.hideLoading(); |
|
|
uni.hideLoading(); |
|
|
// this.itemCheckCode = data; |
|
|
this.itemCheckCode = data; |
|
|
// }).catch(error=>{ |
|
|
|
|
|
// uni.hideLoading(); |
|
|
|
|
|
// this.itemCode = "" |
|
|
|
|
|
// this.itemCheckCode = ""; |
|
|
|
|
|
// this.showMessage("3.零件号","零件号【"+data+"】无效"+error) |
|
|
|
|
|
// }) |
|
|
|
|
|
|
|
|
|
|
|
if(this.checkItemCode(data)){ |
|
|
|
|
|
this.itemCode = data |
|
|
this.itemCode = data |
|
|
this.itemCheckCode =data |
|
|
|
|
|
this.$refs.inputBatchCode.focused = true |
|
|
this.$refs.inputBatchCode.focused = true |
|
|
}else { |
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading(); |
|
|
this.itemCode = "" |
|
|
this.itemCode = "" |
|
|
this.itemCheckCode ="" |
|
|
this.itemCheckCode = ""; |
|
|
this.showMessage("3.零件号","零件号【"+data+"】无效") |
|
|
this.$refs.inputItemCode.focused = true |
|
|
} |
|
|
this.showMessage("3.零件号", "零件号【" + data + "】无效," + error) |
|
|
|
|
|
// this.showMessage("3.零件号",error) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
confirm(content) { |
|
|
confirm(content) { |
|
|
if(content.includes("料筒")){ |
|
|
if (content.includes("料筒号")) { |
|
|
this.$refs.inputBucketCode.focused = true |
|
|
this.$refs.inputBucketCode.focused = true |
|
|
}else if(content.includes("零件")){ |
|
|
} else if (content.includes("零件号")) { |
|
|
this.$refs.inputItemCode.focused = true |
|
|
this.$refs.inputItemCode.focused = true |
|
|
} else if (content.includes("批次")) { |
|
|
} else if (content.includes("批次")) { |
|
|
this.$refs.inputBatchCode.focused = true |
|
|
this.$refs.inputBatchCode.focused = true |
|
@ -287,26 +242,6 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
checkBucketCode(code){ |
|
|
|
|
|
var isCheckPass =false; |
|
|
|
|
|
if(code=="1"){ |
|
|
|
|
|
isCheckPass=true |
|
|
|
|
|
}else { |
|
|
|
|
|
isCheckPass=false |
|
|
|
|
|
} |
|
|
|
|
|
return isCheckPass; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
checkItemCode(code){ |
|
|
|
|
|
var isCheckPass =false; |
|
|
|
|
|
if(code=="123"){ |
|
|
|
|
|
isCheckPass=true |
|
|
|
|
|
}else { |
|
|
|
|
|
isCheckPass=false |
|
|
|
|
|
} |
|
|
|
|
|
return isCheckPass; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
onConfirmBatchCode(data) { |
|
|
onConfirmBatchCode(data) { |
|
|
if (data == undefined || data == "") { |
|
|
if (data == undefined || data == "") { |
|
|
this.showMessage("4.批次", "输入批次号位空") |
|
|
this.showMessage("4.批次", "输入批次号位空") |
|
@ -337,8 +272,8 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
submit() { |
|
|
submit() { |
|
|
if (this.planCode == "") { |
|
|
if (this.planNumber == "") { |
|
|
this.showMessage("1.计划单号","请选择计划单号") |
|
|
this.showMessage("1.生产计划", "请选择生产计划") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -389,13 +324,15 @@ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var param = { |
|
|
var param = { |
|
|
planCode:this.planCode, |
|
|
planNumber: this.planNumber, |
|
|
bucketCode: this.bucketCheckCode, |
|
|
bucketCode: this.bucketCheckCode, |
|
|
itemCode: this.itemCheckCode, |
|
|
itemCode: this.itemCheckCode, |
|
|
batchCode: this.batchCode, |
|
|
batchCode: this.batchCode, |
|
|
referenceCode: this.referenceCode, |
|
|
referenceCode: this.referenceCode, |
|
|
supplierCode: this.supplierCode, |
|
|
supplierCode: this.supplierCode, |
|
|
weight:this.weight |
|
|
weight: this.weight, |
|
|
|
|
|
id: this.$store.state.user.id, |
|
|
|
|
|
createTime: getCurrDateTime(), |
|
|
} |
|
|
} |
|
|
console.log("参数", param) |
|
|
console.log("参数", param) |
|
|
// uni.showLoading({ |
|
|
// uni.showLoading({ |
|
@ -403,11 +340,11 @@ |
|
|
// mask: true |
|
|
// mask: true |
|
|
// }) |
|
|
// }) |
|
|
// var param = { |
|
|
// var param = { |
|
|
// planCode: this.planCode, |
|
|
// planNumber: this.planNumber, |
|
|
// materialName: this.materialName, |
|
|
// materialName: this.materialName, |
|
|
// materialQty: this.materialQty |
|
|
// materialQty: this.materialQty |
|
|
// } |
|
|
// } |
|
|
// foamInputSubmit(param).then(res=>{ |
|
|
// plasticsInputSubmit(param).then(res=>{ |
|
|
// uni.hideLoading() |
|
|
// uni.hideLoading() |
|
|
// this.showMessage("提交成功") |
|
|
// this.showMessage("提交成功") |
|
|
// this.clearData() |
|
|
// this.clearData() |
|
@ -417,43 +354,31 @@ |
|
|
// }) |
|
|
// }) |
|
|
}, |
|
|
}, |
|
|
showMessage(title, hint) { |
|
|
showMessage(title, hint) { |
|
|
|
|
|
this.$refs.inputBucketCode.focused = false |
|
|
|
|
|
this.$refs.inputItemCode.focused = false |
|
|
|
|
|
this.$refs.inputBatchCode.focused = false |
|
|
|
|
|
this.$refs.inputReferenceCode.focused = false |
|
|
|
|
|
this.$refs.inputSupplierCode.focused = false |
|
|
|
|
|
this.$refs.inputWeight.focused = false |
|
|
this.$refs.comMessage.showMessage(title, hint) |
|
|
this.$refs.comMessage.showMessage(title, hint) |
|
|
}, |
|
|
}, |
|
|
resetData() { |
|
|
resetData() { |
|
|
this.planCode = ""; |
|
|
this.planNumber = ""; |
|
|
this.materialName = "" |
|
|
this.materialName = "" |
|
|
this.materialQty = 0 |
|
|
this.materialQty = 0 |
|
|
}, |
|
|
}, |
|
|
showPlanSelect() { |
|
|
showPlanSelect() { |
|
|
// uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
// title:"加载中", |
|
|
title: "加载中", |
|
|
// mask:true |
|
|
mask: true |
|
|
// }) |
|
|
}) |
|
|
// getPlaneNumberList().then(res=>{ |
|
|
getPlasticsPlaneNumberList().then(res => { |
|
|
// uni.hideLoading() |
|
|
uni.hideLoading() |
|
|
// this.$refs.selectPopup.open({ |
|
|
var list = []; |
|
|
// mode: 'radio', //radio checkbox 单选、多选 |
|
|
list = res.Result; |
|
|
// dataList: getDataList(), //如果dataList传入了数组则直接使用传入的数组渲染,无需再配置proxyConfig |
|
|
|
|
|
// // selected: this.userForm.values, //已选中的数据 |
|
|
|
|
|
// // proxyConfig: { //组件内部代理请求数据配置 |
|
|
|
|
|
// // reqFun: this.reqGetList, //请求方法 |
|
|
|
|
|
// // localPaging: false //前端本地分页 |
|
|
|
|
|
// // }, |
|
|
|
|
|
// search: { |
|
|
|
|
|
// type: 'local', //local本地数据搜索 | remote请求接口 |
|
|
|
|
|
// }, |
|
|
|
|
|
// fields: { |
|
|
|
|
|
// label: 'name', |
|
|
|
|
|
// value: 'code' |
|
|
|
|
|
// } |
|
|
|
|
|
// }) |
|
|
|
|
|
// }).catch(error=>{ |
|
|
|
|
|
// uni.hideLoading() |
|
|
|
|
|
// this.showMessage(error) |
|
|
|
|
|
// }) |
|
|
|
|
|
this.$refs.selectPopup.open({ |
|
|
this.$refs.selectPopup.open({ |
|
|
mode: 'radio', //radio checkbox 单选、多选 |
|
|
mode: 'radio', //radio checkbox 单选、多选 |
|
|
dataList: getDataList(), //如果dataList传入了数组则直接使用传入的数组渲染,无需再配置proxyConfig |
|
|
dataList: list, //如果dataList传入了数组则直接使用传入的数组渲染,无需再配置proxyConfig |
|
|
// selected: this.userForm.values, //已选中的数据 |
|
|
// selected: this.userForm.values, //已选中的数据 |
|
|
// proxyConfig: { //组件内部代理请求数据配置 |
|
|
// proxyConfig: { //组件内部代理请求数据配置 |
|
|
// reqFun: this.reqGetList, //请求方法 |
|
|
// reqFun: this.reqGetList, //请求方法 |
|
@ -463,10 +388,15 @@ |
|
|
type: 'local', //local本地数据搜索 | remote请求接口 |
|
|
type: 'local', //local本地数据搜索 | remote请求接口 |
|
|
}, |
|
|
}, |
|
|
fields: { |
|
|
fields: { |
|
|
label: 'name', |
|
|
label: 'PLAN_NO', |
|
|
value: 'code' |
|
|
value: 'SHIFT_CODE' |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
onConfirm(data) { |
|
|
onConfirm(data) { |
|
@ -474,18 +404,13 @@ |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select(mode, data) { |
|
|
selectPlan(mode, data) { |
|
|
this.planCode = data.code |
|
|
this.planNumber = data.PLAN_NO |
|
|
this.planName = data.name |
|
|
this.planName = data.SHIFT_CODE |
|
|
console.log(mode) |
|
|
console.log(mode) |
|
|
console.log(data) |
|
|
console.log(data) |
|
|
}, |
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
selectMaterial(mode, data) { |
|
|
|
|
|
this.materialName = data.name |
|
|
|
|
|
console.log("selectPopupMaterial") |
|
|
|
|
|
}, |
|
|
|
|
|
reqGetList(data) { |
|
|
reqGetList(data) { |
|
|
// var data ={ |
|
|
// var data ={ |
|
|
// pageIndex:1, |
|
|
// pageIndex:1, |
|
|