From 4775f6f9f6fadb995016d11e5fce932b69f2d7c7 Mon Sep 17 00:00:00 2001
From: gaojs <757918719@qq.com>
Date: Tue, 7 May 2024 16:54:14 +0800
Subject: [PATCH] =?UTF-8?q?MES=E2=80=94=E2=80=94>=20PDA=20=20=E5=8F=AB?=
=?UTF-8?q?=E6=96=99=E5=89=8D=E5=90=8E=E7=AB=AF=E6=9B=B4=E6=96=B0?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/mes/workScheduling/index.ts | 8 +++--
src/pages/mes/workScheduling/callMaterial.vue | 32 ++++++++++++++++---
2 files changed, 34 insertions(+), 6 deletions(-)
diff --git a/src/api/mes/workScheduling/index.ts b/src/api/mes/workScheduling/index.ts
index 14e42d6..b3773b0 100644
--- a/src/api/mes/workScheduling/index.ts
+++ b/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)
}
//领料
diff --git a/src/pages/mes/workScheduling/callMaterial.vue b/src/pages/mes/workScheduling/callMaterial.vue
index 3590519..2a309ed 100644
--- a/src/pages/mes/workScheduling/callMaterial.vue
+++ b/src/pages/mes/workScheduling/callMaterial.vue
@@ -15,7 +15,7 @@
物料号:{{ item.repMaterialCode }}
- 数量:{{ item.srcMaterialCounts * planCountStr }}
+ 计划数量:{{ item.srcMaterialCounts * planCountStr }}
@@ -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(() => {