From 4dd202758022baefa9ea6b3fd74a6d21b951572a Mon Sep 17 00:00:00 2001
From: hongchao <3228015117@qq.com>
Date: Tue, 1 Apr 2025 18:57:34 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/claimAndRefund/receive.js | 12 +++
.../picking/apply/component/AddPicking1.vue | 76 ++++++++++++++-----
.../auditing/component/EditPicking.vue | 5 +-
src/views/system/dept/index.vue | 26 +++++++
4 files changed, 101 insertions(+), 18 deletions(-)
diff --git a/src/api/claimAndRefund/receive.js b/src/api/claimAndRefund/receive.js
index 074379e..8369c69 100644
--- a/src/api/claimAndRefund/receive.js
+++ b/src/api/claimAndRefund/receive.js
@@ -373,6 +373,18 @@ export function getMaTypeDataById(data) {
data,
})
}
+
+// 根据二级id 查4级规格类型
+export function getMaTypeDataByIdTwo(data) {
+ return request({
+ url: '/material/select/getMaTypeDataByIdTwo',
+ method: 'post',
+ headers: {
+ repeatSubmit: false,
+ },
+ data,
+ })
+}
export function getFourMaTypeList(data) {
return request({
url: '/material/select/getFourMaTypeList',
diff --git a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue
index 0bc6add..515fde2 100644
--- a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue
+++ b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue
@@ -62,7 +62,7 @@
-
+
+
+
+ {{ scope.row.preNum }}
+
+
@@ -564,11 +577,11 @@ export default {
// this.getList();
if (this.$route.query.taskId && !this.$route.query.isBack) {
console.log('查看')
- this.GetTaskDetail(this.$route.query.taskId)
+ await this.GetTaskDetail(this.$route.query.taskId)
}
if (this.$route.query.taskId && this.$route.query.isBack) {
console.log('驳回提交查看')
- this.GetTaskDetail2(this.$route.query.taskId)
+ await this.GetTaskDetail2(this.$route.query.taskId)
}
// this.taskId = this.$route.query.taskId
// this.isEdit = this.$route.query.isEdit
@@ -594,7 +607,7 @@ export default {
})
} else {
- this.GetDeviceTypeTree()
+ await this.GetDeviceTypeTree()
}
// console.log(typeof(this.isEdit))
@@ -739,6 +752,7 @@ export default {
})
this.deviceType = selectList
this.propsKey++
+ await this.$nextTick();
if (data.ctLeaseApplyDetails) {
this.getCtFileList(data.ctLeaseApplyDetails)
@@ -775,7 +789,16 @@ export default {
return this.handelEchoData(item)
})
+ let selectList = []
+ this.leaseApplyDetails.forEach((e) => {
+ selectList.push(this.getParentsById(this.deviceTypeTree, e.typeId))
+ })
+ this.deviceType = selectList
+ this.propsKey++
+ await this.$nextTick();
+
if (data.ctLeaseApplyDetails) {
+ this.
this.getCtFileList(data.ctLeaseApplyDetails)
}
},
@@ -793,19 +816,34 @@ export default {
}
ctList.forEach((e) => {
- queryCompleteSetToolsApi(e).then((res) => {
- e.childrenList = res.data.map((j) => {
- return {
- ...j,
- initNum: j.deviceNum,
- }
- })
+ // queryCompleteSetToolsApi(e).then((res) => {
+ // e.childrenList = res.data.map((j) => {
+ // return {
+ // ...j,
+ // initNum: j.deviceNum,
+ // preNum: j.preNum,
+ // }
+ // })
- e.childrenList.forEach((i) => {
- i.deviceNum = i.initNum * e.wholeTypeNum
- })
- this.wholeTypeNameList.push(e)
+ // e.childrenList.forEach((i) => {
+ // i.deviceNum = i.initNum * e.wholeTypeNum
+ // })
+ // this.wholeTypeNameList.push(e)
+ // })
+ e.childrenList = ctData[e.wholeTypeName].map((j) => {
+ console.log("pppppppp",j)
+ return {
+ ...j,
+ initNum: j.deviceNum,
+ preNum: j.preNum,
+ }
})
+ e.childrenList.forEach((i) => {
+ i.deviceNum = i.initNum * e.wholeTypeNum
+ i.preNum = Number(i.preNum )
+ })
+ this.wholeTypeNameList.push(e)
+ console.log("hhhhhhhhhhhh",this.wholeTypeNameList)
})
},
//生成回显数据
@@ -1184,6 +1222,7 @@ export default {
wholeTypeNameData.childrenList = res.data.map((e) => {
return {
...e,
+ preNum: e.deviceNum,
initNum: e.deviceNum,
}
})
@@ -1205,7 +1244,10 @@ export default {
/* 更改数量 */
onChangeInput(val, v) {
- this.wholeTypeNameList[v].childrenList.forEach((e) => (e.deviceNum = e.initNum * val))
+ console.log("sssssssssss",this.wholeTypeNameList),
+ this.wholeTypeNameList[v].childrenList.forEach((e) => (
+ console.log("uuuuuuuuuu",e),
+ e.deviceNum = e.deviceNum * val,e.preNum = e.preNum * val))
},
// 获取规格型号
async getMaTypeDataByIdFun(val) {
diff --git a/src/views/claimAndreturn/picking/auditing/component/EditPicking.vue b/src/views/claimAndreturn/picking/auditing/component/EditPicking.vue
index b9129bf..dcda445 100644
--- a/src/views/claimAndreturn/picking/auditing/component/EditPicking.vue
+++ b/src/views/claimAndreturn/picking/auditing/component/EditPicking.vue
@@ -305,6 +305,7 @@ import {
getHoldingPoleSelListApi,
getLevelTwoUnitCbx,
getMaTypeDataById,
+ getMaTypeDataByIdTwo,
} from '@/api/claimAndRefund/receive'
import { getInfo } from '@/api/login'
export default {
@@ -726,7 +727,8 @@ export default {
console.log('🚀 ~ 以大代小 ~ item:')
// 是否以大代小
if (item.isReplace == 1) {
- getMaTypeDataById({ id: item.maTypeId }).then((res) => {
+ console.log("xxxxxxxxxxxx",item)
+ getMaTypeDataByIdTwo({ id: item.levelTwoId }).then((res) => {
console.log('🚀 ~ this.leaseApplyDetails.forEach ~ res:', res)
this.$set(item, 'isReplaceOpt', res.data)
})
@@ -826,6 +828,7 @@ export default {
template.maTypeId = item.maTypeId
template.replaceTypeId = item.replaceTypeId
template.maModel = item.maModel
+ template.levelTwoId = item.levelTwoId
return template
},
diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue
index 8c76e22..dfd951c 100644
--- a/src/views/system/dept/index.vue
+++ b/src/views/system/dept/index.vue
@@ -289,6 +289,20 @@
+
+
+
+
+ {{ dict.label }}
+
+
+
+