|
@ -20,6 +20,30 @@ |
|
|
@confirm="onConfirm"></uni-easyinput> |
|
|
@confirm="onConfirm"></uni-easyinput> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
<view class="" v-if="scanCode!=''"> |
|
|
|
|
|
<uni-table border stripe> |
|
|
|
|
|
<!-- 表头行 --> |
|
|
|
|
|
<!-- <uni-tr> |
|
|
|
|
|
<uni-th align="center">日期</uni-th> |
|
|
|
|
|
<uni-th align="center">姓名</uni-th> |
|
|
|
|
|
<uni-th align="left">地址</uni-th> |
|
|
|
|
|
</uni-tr> --> |
|
|
|
|
|
<!-- 表格数据行 --> |
|
|
|
|
|
<uni-tr> |
|
|
|
|
|
<uni-td>箱码</uni-td> |
|
|
|
|
|
<uni-td>1234</uni-td> |
|
|
|
|
|
</uni-tr> |
|
|
|
|
|
<uni-tr> |
|
|
|
|
|
<uni-td>批次</uni-td> |
|
|
|
|
|
<uni-td>20240508</uni-td> |
|
|
|
|
|
</uni-tr> |
|
|
|
|
|
<uni-tr> |
|
|
|
|
|
<uni-td>库位</uni-td> |
|
|
|
|
|
<uni-td>103</uni-td> |
|
|
|
|
|
</uni-tr> |
|
|
|
|
|
|
|
|
|
|
|
</uni-table> |
|
|
|
|
|
</view> |
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
@ -38,8 +62,6 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
|
<selectClickList ref="selectPopup" title="选择计划单号" @select="selectPlan"></selectClickList> |
|
|
|
|
|
<selectClickList ref="selectPopupMaterial" title="选择原料" @select="selectMaterial"></selectClickList> |
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
|
|
|
|
|
@ -56,8 +78,6 @@ |
|
|
</script> |
|
|
</script> |
|
|
<script> |
|
|
<script> |
|
|
import { |
|
|
import { |
|
|
getFoamPlaneNumberList, |
|
|
|
|
|
getMaterialLists, |
|
|
|
|
|
foamInputSubmit |
|
|
foamInputSubmit |
|
|
} from '@/api/request2.js'; |
|
|
} from '@/api/request2.js'; |
|
|
import { |
|
|
import { |
|
@ -76,9 +96,6 @@ |
|
|
data() { |
|
|
data() { |
|
|
return { |
|
|
return { |
|
|
dateTime: "", |
|
|
dateTime: "", |
|
|
planNumber: "", |
|
|
|
|
|
materialName: "", |
|
|
|
|
|
materialCode: "", |
|
|
|
|
|
materialQty: "", |
|
|
materialQty: "", |
|
|
dataList: [], |
|
|
dataList: [], |
|
|
userForm: { |
|
|
userForm: { |
|
@ -86,8 +103,6 @@ |
|
|
values: [], |
|
|
values: [], |
|
|
origin: [] |
|
|
origin: [] |
|
|
}, |
|
|
}, |
|
|
materialList: [], |
|
|
|
|
|
planList: [], |
|
|
|
|
|
scanCode: "" |
|
|
scanCode: "" |
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -102,27 +117,17 @@ |
|
|
|
|
|
|
|
|
methods: { |
|
|
methods: { |
|
|
submit() { |
|
|
submit() { |
|
|
if (this.planNumber == "") { |
|
|
if (this.scanCode == "") { |
|
|
this.showMessage("请选择计划单号") |
|
|
this.showMessage("请选择计划单号") |
|
|
return |
|
|
return |
|
|
} |
|
|
} |
|
|
if (this.materialName == "") { |
|
|
|
|
|
this.showMessage("请输入原料名称") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
if (this.materialQty == "" || this.materialQty == 0) { |
|
|
|
|
|
this.showMessage("请输入原料数量") |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
uni.showLoading({ |
|
|
uni.showLoading({ |
|
|
title: "加载中", |
|
|
title: "加载中", |
|
|
mask: true |
|
|
mask: true |
|
|
}) |
|
|
}) |
|
|
var param = { |
|
|
var param = { |
|
|
planNumber: this.planNumber, |
|
|
scanCode: this.scanCode, |
|
|
materialName: this.materialName, |
|
|
|
|
|
materialCode: this.materialCode, |
|
|
|
|
|
materialQty: this.materialQty, |
|
|
|
|
|
id: this.$store.state.user.id, |
|
|
id: this.$store.state.user.id, |
|
|
createTime: getCurrDateTime(), |
|
|
createTime: getCurrDateTime(), |
|
|
} |
|
|
} |
|
@ -143,10 +148,7 @@ |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
resetData() { |
|
|
resetData() { |
|
|
this.planNumber = ""; |
|
|
this.scanCode = ""; |
|
|
this.materialName = "" |
|
|
|
|
|
this.materialQty = ""; |
|
|
|
|
|
this.materialCode = "" |
|
|
|
|
|
}, |
|
|
}, |
|
|
clearCode() { |
|
|
clearCode() { |
|
|
this.scanCode = ""; |
|
|
this.scanCode = ""; |
|
@ -154,69 +156,7 @@ |
|
|
onConfirm(data) { |
|
|
onConfirm(data) { |
|
|
console.log(data) |
|
|
console.log(data) |
|
|
}, |
|
|
}, |
|
|
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() { |
|
|
|
|
|
uni.showLoading({ |
|
|
|
|
|
title: "加载中", |
|
|
|
|
|
mask: true |
|
|
|
|
|
}) |
|
|
|
|
|
getMaterialLists().then(res => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
if (res.Result.length > 0) { |
|
|
|
|
|
var list = []; |
|
|
|
|
|
list = res.Result; |
|
|
|
|
|
|
|
|
|
|
|
list.forEach(res => { |
|
|
|
|
|
res.label = res.Name; |
|
|
|
|
|
res.value = res.Code |
|
|
|
|
|
}) |
|
|
|
|
|
this.$refs.selectPopupMaterial.openScanPopup(list) |
|
|
|
|
|
} else { |
|
|
|
|
|
this.showMessage("原料列表为0") |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
uni.hideLoading() |
|
|
|
|
|
this.showMessage(error) |
|
|
|
|
|
}) |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
selectMaterial(data) { |
|
|
|
|
|
this.materialName = data.label |
|
|
|
|
|
this.materialCode = data.value |
|
|
|
|
|
this.$refs.inputQty.focused = true |
|
|
|
|
|
console.log("selectPopupMaterial") |
|
|
|
|
|
}, |
|
|
|
|
|
openScanPopup() { |
|
|
openScanPopup() { |
|
|
this.$refs.scanPopup.openScanPopup(); |
|
|
this.$refs.scanPopup.openScanPopup(); |
|
|
}, |
|
|
}, |
|
|