页面优化

This commit is contained in:
13218645326 2023-12-24 21:15:04 +08:00
parent d19284f996
commit d3682b99fc
4 changed files with 46 additions and 11 deletions

View File

@ -149,6 +149,14 @@ export function auditLeaseByCompany(params = {} ){
})
}
// 获取 物品类型
export function getUseTypeTreee(params = {}){
return request({
url: '/material/backApply/getUseTypeTree',
method: 'post',
data: params
})
}

View File

@ -72,3 +72,12 @@ export function optionselect() {
method: 'get'
})
}
// 工机具类型
export function getUseTypeTree(data) {
return request({
url: '/material/backApply/getUseTypeTree',
method: 'post',
data: data
})
}

View File

@ -56,8 +56,8 @@
:options="deptOptions"
:props="{
expandTrigger: 'hover',
label: 'label',
value: 'id',
label: 'typeName',
value: 'typeId',
checkStrictly: true,
}"
@change="handleNodeClick"
@ -531,7 +531,7 @@
</template>
<script>
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type";
import { listType, getType, delType, addType, updateType, refreshCache ,getUseTypeTree} from "@/api/system/dict/type";
import { ApiGetBackApplyList, ApiGetView, backApplyDelApi, submitBackApplyApi } from "@/api/claimAndRefund/return.js"
import {
getInfo, h
@ -774,9 +774,10 @@ export default {
return backApplyDelApi(param);
}).then(() => {
this.getList();
this.$modal.msgSuccess('删除成功');
// this.$modal.msgSuccess('');
this.$message.success('操作成功!')
}).catch(() => {
this.$modal.msgError('删除失败');
// this.$modal.msgError('');
});
},
handlePrint(row) {
@ -831,6 +832,7 @@ export default {
this.companyId = res.user.companyId
this.getList();
})
// this.initGetUseTypeTree()
},
handleNodeClick(ev) {
@ -871,6 +873,7 @@ export default {
const res = await getAgreementInfoById(params)
// this.proList = res.data
this.queryParams.agreementCode = res.data.agreementCode
this.initGetUseTypeTree(res.data.agreementId)
},
getAgreementByUnitAndProId() {
this.InitGetAgreementInfoById()
@ -886,6 +889,14 @@ export default {
},
resetQuery1() {
},
async initGetUseTypeTree(id){
let params ={
agreementId:id
}
const res = await getUseTypeTree(params)
console.log("res-getUseTypeTree",res)
this.deptOptions = res.data
}

View File

@ -372,9 +372,9 @@ export default {
//
deviceTypeTreeProps: {
children: 'children',
label: 'typeName'
label: 'typeName',
// multiple: false,
// value: 'typeId'
value: 'typeId'
},
//
deviceType: null,
@ -404,7 +404,7 @@ export default {
created() {
this.GetUnitData()
this.GetProData()
this.GetDeviceTypeTree()
this.GetDeviceTypeTreeFn()
// this.getList();
console.log('this.$route.query.taskId', this.$route.query.taskId)
if (this.$route.query.taskId) {
@ -440,12 +440,14 @@ export default {
},
//
async GetDeviceTypeTree() {
async GetDeviceTypeTreeFn(agreementId) {
const params = {
agreementId: 15
agreementId: agreementId
// this.agreementId
}
const res = await getUseTypeTreee(params)
console.log("resgetUseTypeTreee",res)
this.deviceTypeTree = res.data
},
// id
@ -465,6 +467,8 @@ export default {
} else {
this.queryParams.agreementId = res.data.agreementId
this.queryParams.agreementCode = res.data.agreementCode
this.GetDeviceTypeTreeFn(res.data.agreementId)
}
}
},
@ -759,10 +763,13 @@ export default {
///////
deviceTypeChange(val) {
let nodes = null;
console.log("vall1211221122",this.$refs.deviceTypeCascader.getCheckedNodes().length,this.$refs.deviceTypeCascader.getCheckedNodes(),[this.$refs.deviceTypeCascader.panel.getNodeByValue(val)])
nodes = this.$refs.deviceTypeCascader.getCheckedNodes().length > 0 ? this.$refs.deviceTypeCascader.getCheckedNodes() : [this.$refs.deviceTypeCascader.panel.getNodeByValue(val)]
console.log("nodes",nodes)
if (nodes[0].level != 4) {
return
}
this.leaseApplyDetails.push(
this.handelTableItemData(nodes[0])
)