diff --git a/src/views/material/back/component/addReturn.vue b/src/views/material/back/component/addReturn.vue
index 28a1a247..a0adb601 100644
--- a/src/views/material/back/component/addReturn.vue
+++ b/src/views/material/back/component/addReturn.vue
@@ -200,7 +200,7 @@
-
+
diff --git a/src/views/material/lease/materialConfirm/index.vue b/src/views/material/lease/materialConfirm/index.vue
index dddf9fe2..be303dc6 100644
--- a/src/views/material/lease/materialConfirm/index.vue
+++ b/src/views/material/lease/materialConfirm/index.vue
@@ -645,7 +645,7 @@ export default {
},
async handleDepartChange() {
- this.queryParams.proName = null // 清空工程已选
+ this.queryParams.projectName = null // 清空工程已选
this.proOptions = [] // 清空原有下拉
try {
diff --git a/src/views/materialsStation/equipment/totalLeaseRecord/index.vue b/src/views/materialsStation/equipment/totalLeaseRecord/index.vue
index 91a2cf4c..1117dd7f 100644
--- a/src/views/materialsStation/equipment/totalLeaseRecord/index.vue
+++ b/src/views/materialsStation/equipment/totalLeaseRecord/index.vue
@@ -20,9 +20,9 @@
-
+
({
diff --git a/src/views/materialsStation/equipment/totalReturnRecord/index.vue b/src/views/materialsStation/equipment/totalReturnRecord/index.vue
index ad331418..bc327bdb 100644
--- a/src/views/materialsStation/equipment/totalReturnRecord/index.vue
+++ b/src/views/materialsStation/equipment/totalReturnRecord/index.vue
@@ -251,7 +251,8 @@ export default {
dialogForm: {
pageNum: 1,
pageSize: 10,
- keyWord: '' // 关键字
+ keyWord: '', // 关键字
+ parentId: null, // 父级id
},
dialogColumns: [
{ label: '类型名称', prop: 'typeCode' },
@@ -407,7 +408,7 @@ export default {
this.dialogTitle = '查看'
this.dialogVisible = true
setTimeout(() => {
- this.dialogForm.code = row.code
+ this.dialogForm.parentId = row.id
this.getDetailsList()
}, 100)
},
diff --git a/src/views/materialsStation/toolsBack/back/component/addReturn.vue b/src/views/materialsStation/toolsBack/back/component/addReturn.vue
index 6d82ab2b..54d4ffcb 100644
--- a/src/views/materialsStation/toolsBack/back/component/addReturn.vue
+++ b/src/views/materialsStation/toolsBack/back/component/addReturn.vue
@@ -336,6 +336,7 @@ export default {
teamId: null,
proId: null,
agreementId: null, //协议id
+ agreementIds:[],
agreementCode: null, //协议code
// companyId: '', //登录信息中取
// createBy: '', //用户名
@@ -467,9 +468,9 @@ export default {
// this.GetAgreementInfoById()
},
// 获取 设备树结构数据
- async GetDeviceTypeTreeFn(agreementId) {
+ async GetDeviceTypeTreeFn(agreementIds) {
const params = {
- agreementId: agreementId
+ agreementIds: agreementIds
}
const res = await getDeviceTreeByAgreementId(params)
console.log('resgetUseTypeTreee==========', res)
@@ -600,7 +601,7 @@ export default {
}
const res = await getAgreementInfoByIdBackApi(params)
console.log(res)
- if (!(res.data && res.data.agreementId)) {
+ if (!(res.data && res.data.length > 0)) {
// this.$message.error('当前单位和工程无协议!')
this.queryParams.teamId = null
this.queryParams.proId = null
@@ -608,10 +609,10 @@ export default {
this.GetUnitData()
this.GetProData()
} else {
- this.queryParams.agreementId = res.data.agreementId
- this.queryParams.agreementCode = res.data.agreementCode
+ this.queryParams.agreementIds = res.data.map(item => item.agreementId)
+ // this.queryParams.agreementCode = res.data.agreementCode
this.equipmentList = []
- this.GetDeviceTypeTreeFn(res.data.agreementId)
+ this.GetDeviceTypeTreeFn(this.queryParams.agreementIds)
}
}
},
@@ -631,7 +632,7 @@ export default {
item.tempMaCodeList = item.maCodeList || item.maCodeVoList || []
item.maTypeName = item.materialName
})
- this.GetDeviceTypeTreeFn(data.backApplyInfo.agreementId)
+ this.GetDeviceTypeTreeFn(data.backApplyInfo.agreementIds)
},
//是否可用勾选框
selectable(row) {
@@ -672,7 +673,7 @@ export default {
backPerson: this.queryParams.backPerson,
phone: this.queryParams.phone,
remark: this.queryParams.remark,
- agreementId: this.queryParams.agreementId,
+ agreementIds: this.queryParams.agreementIds,
isBack,
taskId: this.queryParams.taskId,
createBy: sessionStorage.getItem('userName')
diff --git a/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue b/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue
index 6da8afce..62803cf4 100644
--- a/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue
+++ b/src/views/materialsStation/toolsLease/apply/component/addToolsApply.vue
@@ -4,7 +4,6 @@
-
-
{
+ return false
+ }
+ },
editTaskId: {
type: [String, Number],
default: () => {
@@ -356,31 +358,32 @@ export default {
},
async mounted() {
this.getStandardConfigListApi() //标准配置下拉选
- if (this.isEdit) {
+ if (this.isEdit && this.isView == false) {
console.log('isEdit', this.isEdit)
this.taskId = this.editTaskId
this.id = this.editId
- this.getTaskInfo()
- } else {
- // this.getBmTeam()
+ this.projectInfoList().then(() => {
+ this.getTaskInfo()
+ })
+ } else if(this.isEdit && this.isView){
this.projectInfoList()
}
setTimeout(() => {
this.fitNum = this.maForm.fitNum
}, 500)
},
- watch: {
- maForm: {
- handler(newVal, oldVal) {
- if (newVal.teamId && newVal.proId) {
- this.getAgreementId()
- } else {
- this.equipmentTypeList = []
- }
- },
- deep: true
- }
- },
+ // watch: {
+ // maForm: {
+ // handler(newVal, oldVal) {
+ // if (newVal.teamId && newVal.proId) {
+ // this.getAgreementId()
+ // } else {
+ // this.equipmentTypeList = []
+ // }
+ // },
+ // deep: true
+ // }
+ // },
methods: {
fitNumChange() {
const newVal = Math.min(5, Math.max(1, parseInt(this.maForm.fitNum) || 1))
@@ -395,7 +398,7 @@ export default {
this.maForm.fitNum = newVal
},
// 获取协议id
- getAgreementId() {
+ async getAgreementId() {
if (!this.maForm.teamId || !this.maForm.proId) return
getAgreement({
teamId: this.maForm.teamId,
@@ -463,11 +466,15 @@ export default {
console.log('🚀 ~ projectInfoList ~ error:', error)
}
},
- changePro(e) {
+ async changePro(e) {
console.log('🚀 ~ changePro ~ e:', e)
this.maForm.proId = e
this.maForm.projectId = this.projectList.find(item => item.proId === e)?.projectId
- this.getBmTeam()
+ await this.getBmTeam()
+ if(this.maForm.proId){
+ this.equipmentList = []
+ await this.getAgreementId()
+ }
},
changeTeam(e) {
console.log('🚀 ~ changeTeam ~ e:', e)
@@ -597,15 +604,17 @@ export default {
// this.loading = true;
await getApplyInfo(this.id).then(response => {
Object.assign(this.maForm, response.data.leaseApplyInfo)
- this.maForm.projectId = response.data.leaseApplyInfo.proId
this.maForm.proId = response.data.leaseApplyInfo.proId
+ this.maForm.projectId = this.projectList.find(item => item.proId === response.data.leaseApplyInfo.proId)?.projectId
+ this.maForm.relPhone = response.data.leaseApplyInfo.phone || response.data.leaseApplyInfo.relPhone || ''
+ this.getBmTeam()
this.equipmentList = response.data.leaseApplyDetailsList || []
+ this.getAgreementId()
// 如果 bmFileInfos有值
if (this.maForm.bmFileInfos.length > 0) {
this.isFileFbs = true
}
// this.loading = false;
- this.getAgreementId()
})
},
// 多选框选中数据
@@ -679,8 +688,8 @@ export default {
.confirm('是否确认保存当前页面')
.then(function () {})
.then(() => {
- if (this.isEdit) {
- this.maForm.leaseProjectId = this.maForm.projectId
+ if (this.isEdit && this.isView == false) {
+ this.maForm.leaseProjectId = this.maForm.proId
console.log('编辑')
this.loading = true
updateApplyInfo({
@@ -697,7 +706,7 @@ export default {
.catch(() => {
this.loading = false
})
- } else if (!this.isEdit) {
+ } else if (this.isEdit && this.isView ) {
console.log('新增')
// console.log(this.equipmentList)
this.loading = true
diff --git a/src/views/materialsStation/toolsLease/apply/index.vue b/src/views/materialsStation/toolsLease/apply/index.vue
index aaf42384..523207a6 100644
--- a/src/views/materialsStation/toolsLease/apply/index.vue
+++ b/src/views/materialsStation/toolsLease/apply/index.vue
@@ -48,7 +48,8 @@ export default {
methods: {
/* 新增工机具 */
addTools() {
- this.isEdit = false
+ this.isEdit = true
+ this.isView = true
this.editTaskId = ''
this.queryTaskId = ''
this.pageContent = '领料申请'
@@ -61,6 +62,7 @@ export default {
/* 编辑工机具 */
editTools(taskId, id) {
this.isEdit = true
+ this.isView = false
this.pageContent = '领料编辑'
this.editTaskId = taskId
this.editId = id
diff --git a/src/views/materialsStation/toolsLease/outBound/component/addToolsApply.vue b/src/views/materialsStation/toolsLease/outBound/component/addToolsApply.vue
index d33c2a23..b4068a82 100644
--- a/src/views/materialsStation/toolsLease/outBound/component/addToolsApply.vue
+++ b/src/views/materialsStation/toolsLease/outBound/component/addToolsApply.vue
@@ -4,9 +4,7 @@
-
-
{
+ return false
+ }
+ },
editTaskId: {
type: [String, Number],
default: () => {
@@ -380,34 +381,38 @@ export default {
},
mounted() {
this.getStandardConfigListApi() //标准配置下拉选
- if (this.isEdit) {
+ if (this.isEdit && this.isView == false) {
console.log('isEdit', this.isEdit)
this.taskId = this.editTaskId
this.id = this.editId
- this.getTaskInfo()
- } else {
+ this.projectInfoList().then(() => {
+ this.getTaskInfo()
+ })
+ } else if(this.isEdit && this.isView){
this.projectInfoList()
}
},
- watch: {
- 'maForm.teamId'(newVal) {
- if (newVal && this.maForm.proId) {
- this.getAgreementId()
- } else {
- this.equipmentTypeList = []
- }
- },
- 'maForm.proId'(newVal) {
- if (newVal && this.maForm.teamId) {
- this.getAgreementId()
- } else {
- this.equipmentTypeList = []
- }
- }
- },
+ // watch: {
+ // 'maForm.teamId'(newVal) {
+ // console.log("kkkkkkkkkkkkkkkkkkkk",newVal)
+ // if (newVal && this.maForm.proId) {
+ // this.getAgreementId()
+ // } else {
+ // this.equipmentTypeList = []
+ // }
+ // },
+ // 'maForm.proId'(newVal) {
+ // console.log("ppppppppppppppppppppppp",newVal)
+ // if (newVal && this.maForm.teamId) {
+ // this.getAgreementId()
+ // } else {
+ // this.equipmentTypeList = []
+ // }
+ // }
+ // },
methods: {
// 获取协议id
- getAgreementId() {
+ async getAgreementId() {
getAgreement({
teamId: this.maForm.teamId,
// projectId: this.maForm.projectId,
@@ -437,6 +442,7 @@ export default {
// 获取班组
async getBmTeam() {
try {
+ console.log("xxxxxxxxxxxxxxxxxx", this.maForm.projectId)
const idCard = sessionStorage.getItem('idCard')
const res = await getBmTeamApi({ isAll: 0, idCard, projectId: this.maForm.projectId })
// console.log('🚀 ~ getBmTeam ~ res:', res)
@@ -466,11 +472,16 @@ export default {
console.log('🚀 ~ getBmTeam ~ error:', error)
}
},
- changePro(e) {
+ async changePro(e) {
console.log('🚀 ~ changePro ~ e:', e)
this.maForm.proId = e
this.maForm.projectId = this.projectList.find(item => item.proId === e)?.projectId
- this.getBmTeam()
+ await this.getBmTeam()
+ if(this.maForm.proId){
+ console.log("xxxxxxxyyyyyyyyyyy", this.maForm.proId)
+ this.equipmentList = []
+ await this.getAgreementId()
+ }
},
changeTeam(e) {
@@ -622,10 +633,10 @@ export default {
this.$message.warning(response.msg)
}
Object.assign(this.maForm, response.data.leaseApplyInfo)
- this.maForm.projectId = response.data.leaseApplyInfo.proId
this.maForm.proId = response.data.leaseApplyInfo.proId
+ this.maForm.projectId = this.projectList.find(item => item.proId === response.data.leaseApplyInfo.proId)?.projectId
this.maForm.relPhone = response.data.leaseApplyInfo.phone || response.data.leaseApplyInfo.relPhone || ''
- // this.getBmTeam()
+ this.getBmTeam()
this.equipmentList = response.data.leaseApplyDetailsList || []
if (this.equipmentList.length > 0) {
this.equipmentList.forEach(item => {
@@ -636,6 +647,7 @@ export default {
this.parentId = this.equipmentList[0].parentId
console.log('🚀 ~ awaitgetApplyInfo ~ this.parentId:', this.parentId)
}
+ this.getAgreementId()
// 如果 bmFileInfos有值
if (this.maForm.bmFileInfos.length > 0) {
this.isFileFbs = true
@@ -732,8 +744,8 @@ export default {
this.loading = true
this.maForm.isOut = isOut
this.maForm.createBy = sessionStorage.getItem('userName')
- if (this.isEdit) {
- this.maForm.leaseProjectId = this.maForm.projectId
+ if (this.isEdit && this.isView == false) {
+ this.maForm.leaseProjectId = this.maForm.proId
console.log('编辑')
updateApplyInfo({
leaseApplyDetailsList: this.equipmentList,
@@ -749,7 +761,7 @@ export default {
.catch(() => {
this.loading = false
})
- } else if (!this.isEdit) {
+ } else if (this.isEdit && this.isView ) {
console.log('新增')
addApplyInfo({
leaseApplyDetailsList: this.equipmentList,
diff --git a/src/views/materialsStation/toolsLease/outBound/component/homeApply.vue b/src/views/materialsStation/toolsLease/outBound/component/homeApply.vue
index 49b3ef37..5f4b09ac 100644
--- a/src/views/materialsStation/toolsLease/outBound/component/homeApply.vue
+++ b/src/views/materialsStation/toolsLease/outBound/component/homeApply.vue
@@ -199,7 +199,7 @@
@click="handleUpdate(scope.row)"
v-if="scope.row.taskStatus == 1"
>
- 出库
+ 编辑
领料单
diff --git a/src/views/materialsStation/toolsLease/outBound/index.vue b/src/views/materialsStation/toolsLease/outBound/index.vue
index 4ece179a..615834fe 100644
--- a/src/views/materialsStation/toolsLease/outBound/index.vue
+++ b/src/views/materialsStation/toolsLease/outBound/index.vue
@@ -48,7 +48,8 @@ export default {
methods: {
/* 新增工机具 */
addTools() {
- this.isEdit = false
+ this.isEdit = true
+ this.isView = true
this.editTaskId = ''
this.queryTaskId = ''
this.pageContent = '领料申请'
@@ -61,6 +62,7 @@ export default {
/* 编辑工机具 */
editTools(taskId, id) {
this.isEdit = true
+ this.isView = false
this.pageContent = '领料出库'
this.editTaskId = taskId
this.editId = id