From 8e9208a43836d29c9bbc2fa3cc9d5faa44e1039e Mon Sep 17 00:00:00 2001
From: BianLzhaoMin <11485688+bianliangzhaomin123@user.noreply.gitee.com>
Date: Mon, 10 Mar 2025 13:31:53 +0800
Subject: [PATCH] =?UTF-8?q?=E9=A2=86=E6=96=99=E7=94=B3=E8=AF=B7=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../picking/apply/component/AddPicking1.vue | 93 ++++++++++++++-----
src/views/store/poleConfig/poleConfig.vue | 8 +-
2 files changed, 74 insertions(+), 27 deletions(-)
diff --git a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue
index b3a74cc..b0e27f5 100644
--- a/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue
+++ b/src/views/claimAndreturn/picking/apply/component/AddPicking1.vue
@@ -59,11 +59,14 @@
-
-
+
+
-
+
@@ -868,6 +879,8 @@ export default {
typeId: j.deviceTypeId,
preNum: j.deviceNum,
num: j.num,
+ isCt: 0,
+ ctParentId: e.ctParentId,
}
this.queryParams.leaseApplyDetails.push(items)
@@ -987,7 +1000,7 @@ export default {
createBy: this.user.name,
companyId: deviceTypeList[0].data.companyId,
// num: deviceTypeList[0].data.num,
- typeCn: deviceTypeList[0].data.label
+ typeCn: deviceTypeList[0].data.label,
}
console.log('🚀 ~ deviceTypeChange ~ this.selectParams:', this.selectParams)
this.getMaTypeDataByIdFun(val[val.length - 1])
@@ -1025,7 +1038,7 @@ export default {
// 获取规格型号
async getMaTypeDataByIdFun(val) {
const res = await getMaTypeDataById({ id: val })
- this.typeListDev = res.data
+ this.typeListDev = res.data.filter((e) => e.isStorage == 1)
console.log('🚀 ~ getMaTypeDataByIdFun ~ res:', res)
},
// 选择规格型号
@@ -1047,7 +1060,7 @@ export default {
this.$message.error('当前设备已添加,不可重复添加!')
return
}
- this.leaseApplyDetails.push({...this.selectParams})
+ this.leaseApplyDetails.push({ ...this.selectParams })
console.log('🚀 ~ changeType ~ this.leaseApplyDetails:', this.leaseApplyDetails)
},
//// 将数据处理成 表格中需要的数据
@@ -1102,31 +1115,61 @@ export default {
},
/* 抱杆成套设备change事件 */
onChangeWholeTypeName(val) {
- const selLable = this.holdingPoleSelList.find((e) => e.id === val)
- const wholeTypeNameData = {
- id: val,
- wholeTypeName: selLable.wholeTypeName,
- wholeTypeNum: 1,
- childrenList: [],
- }
- queryCompleteSetToolsApi(wholeTypeNameData).then((res) => {
- console.log(res, '996')
+ val.forEach((e) => {
+ const selLable = this.holdingPoleSelList.find((j) => j.id === e)
+ const isPush = this.leaseApplyDetails.some((z) => z.ctParentId == e)
- this.leaseApplyDetails.push({ wholeTypeName: selLable.wholeTypeName, childrenList: res.data })
- // wholeTypeNameData.childrenList = res.data
- // wholeTypeNameData.childrenList.forEach((e) => (e.initNum = e.deviceNum))
- // const isREpeat = this.wholeTypeNameList.find((e) => e.id === val)
- // if (!isREpeat) {
- // this.wholeTypeNameList.push(wholeTypeNameData)
- // } else {
- // this.$modal.msgError('当前抱杆成套设备已添加,不可重复添加!')
- // }
- // console.log(this.wholeTypeNameList, '处理后的数据---')
+ if (!isPush) {
+ const wholeTypeNameData = {
+ id: e,
+ wholeTypeName: selLable.wholeTypeName,
+ wholeTypeNum: 1,
+ childrenList: [],
+ }
+
+ queryCompleteSetToolsApi(wholeTypeNameData).then((res) => {
+ this.leaseApplyDetails.push({
+ wholeTypeName: selLable.wholeTypeName,
+ childrenList: res.data,
+ ctParentId: e,
+ })
+ })
+ }
})
+ // const selLable = this.holdingPoleSelList.find((e) => e.id === val)
+ // const wholeTypeNameData = {
+ // id: val,
+ // wholeTypeName: selLable.wholeTypeName,
+ // wholeTypeNum: 1,
+ // childrenList: [],
+ // }
+ // queryCompleteSetToolsApi(wholeTypeNameData).then((res) => {
+ // console.log(res, '996')
+
+ // this.leaseApplyDetails.push({
+ // wholeTypeName: selLable.wholeTypeName,
+ // childrenList: res.data,
+ // ctParentId: val,
+ // })
+ // // wholeTypeNameData.childrenList = res.data
+ // // wholeTypeNameData.childrenList.forEach((e) => (e.initNum = e.deviceNum))
+ // // const isREpeat = this.wholeTypeNameList.find((e) => e.id === val)
+ // // if (!isREpeat) {
+ // // this.wholeTypeNameList.push(wholeTypeNameData)
+ // // } else {
+ // // this.$modal.msgError('当前抱杆成套设备已添加,不可重复添加!')
+ // // }
+ // // console.log(this.wholeTypeNameList, '处理后的数据---')
+ // })
// this.queryParams.wholeTypeName = ''
},
+ // 移除时触发
+ onRemoveTag(val) {
+ this.leaseApplyDetails = this.leaseApplyDetails.filter((e) => e.ctParentId !== val)
+ },
+
/* 删除 */
onHandelDelete(index) {
this.wholeTypeNameList.splice(index, 1)
diff --git a/src/views/store/poleConfig/poleConfig.vue b/src/views/store/poleConfig/poleConfig.vue
index b66a917..690b26e 100644
--- a/src/views/store/poleConfig/poleConfig.vue
+++ b/src/views/store/poleConfig/poleConfig.vue
@@ -299,6 +299,8 @@ export default {
mainDevice: '',
assortDevice: '',
}
+
+ this.$delete(this.saveParams, 'id')
this.tempList = []
this.mainDeviceDisabled = false
this.open = true
@@ -310,6 +312,7 @@ export default {
this.saveParams.id = row.id
this.parentId = row.id
this.saveParams.wholeTypeName = row.wholeTypeName
+ this.deviceName = row.wholeTypeName
this.mainDeviceDisabled = true
this.isEdit = true
@@ -374,7 +377,8 @@ export default {
this.parentId = value
const res = await getInfoListByTypeApi({ level: '4', parentId: value + '' })
this.lastTypesList = res.data
- console.log(res, '第四级数据')
+ this.tempList = []
+ this.addCompleteForm.assortDevice = ''
},
// 配套设备选择
selAssortDevice(val) {
@@ -460,7 +464,7 @@ export default {
const res = await addCompleteSetToolsApi(this.saveParams)
if (res.code == 200) {
- this.$message.success(!this.title === '成套设备新增' ? '新增成功!' : '修改成功!')
+ this.$message.success(this.title === '成套设备新增' ? '新增成功!' : '修改成功!')
this.open = false
this.tempList = []
this.getList()