Browse Source

MES——> PDA 叫料前后端更新

master
gaojs 7 months ago
parent
commit
4775f6f9f6
  1. 8
      src/api/mes/workScheduling/index.ts
  2. 32
      src/pages/mes/workScheduling/callMaterial.vue

8
src/api/mes/workScheduling/index.ts

@ -79,8 +79,12 @@ export function completeHandle(data) {
}
//叫料
export function callBasicItem(data) {
return http.get('/mes/orderDayBom/page', {data})
export function callBasicItem(params) {
return http.get('/mes/orderDayBom/page', {params})
}
export function callBasicItemForm(params) {
console.log(params)
return http.post('/mes/item-request-main/create-call-material', params)
}
//领料

32
src/pages/mes/workScheduling/callMaterial.vue

@ -15,7 +15,7 @@
<view>物料号</view><view>{{ item.repMaterialCode }}</view>
</view>
<view class="dec">
<view>数量</view><view>{{ item.srcMaterialCounts * planCountStr }}</view>
<view>计划数量</view><view>{{ item.srcMaterialCounts * planCountStr }}</view>
</view>
<view>
<u-form-item label="叫料数量" prop="callMaterialCounts">
@ -54,6 +54,7 @@ const workingNodeStr = ref('')
const planMasterCodeStr = ref('')
const schedulingCodeStr = ref('')
const planCountStr = ref('')
const workroomCodeStr = ref('')
const list = ref([])
@ -65,7 +66,12 @@ const params = ref({
pageNo: 1,
pageSize: 10,
planDayCode: '',
processCode: ''
processCode: '',
remark:''
})
const param = ref({
remark:''
})
function getBomInspectList() {
@ -89,7 +95,25 @@ function getBomInspectList() {
}
function submitCMForm () {
console.log(list)
for (var i = 0; i < list.value.length; i++) {
console.log(list.value[i].repMaterialCode+":"+list.value[i].totalMaterialCounts);
list.value[i].schedulingCode = schedulingCodeStr.value
list.value[i].workroomCode= workroomCodeStr.value
if(/^\d+$/.test(list.value[i].totalMaterialCounts)){
console.log(/^\d+$/.test(list.value[i].totalMaterialCounts))
}else{
proxy.$modal.alert("叫料数量请输入正确的数字");
return
}
if( parseInt(list.value[i].totalMaterialCounts) > parseInt(list.value[i].srcMaterialCounts * planCountStr.value)){
proxy.$modal.alert("叫料数量不能大于计划数量");
return
}
}
param.value.remark = JSON.stringify(list.value)
workSchedulingListApi.callBasicItemForm(param.value).then((res) => {
console.log(res)
})
}
//
@ -101,12 +125,12 @@ onReachBottom(() => {
onLoad((option) => {
console.log(JSON.parse(option.obj))
if (option.obj) {
schedulingCodeStr.value = JSON.parse(option.obj).schedulingCode
workingNodeStr.value = JSON.parse(option.obj).workingNode
planMasterCodeStr.value = JSON.parse(option.obj).planMasterCode
planCountStr.value = JSON.parse(option.obj).planCount
workroomCodeStr.value = JSON.parse(option.obj).workroomCode
}
})
onShow(() => {

Loading…
Cancel
Save