页面优化
This commit is contained in:
parent
d19284f996
commit
d3682b99fc
|
|
@ -149,6 +149,14 @@ export function auditLeaseByCompany(params = {} ){
|
|||
})
|
||||
}
|
||||
|
||||
// 获取 物品类型
|
||||
export function getUseTypeTreee(params = {}){
|
||||
return request({
|
||||
url: '/material/backApply/getUseTypeTree',
|
||||
method: 'post',
|
||||
data: params
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -72,3 +72,12 @@ export function optionselect() {
|
|||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 工机具类型
|
||||
export function getUseTypeTree(data) {
|
||||
return request({
|
||||
url: '/material/backApply/getUseTypeTree',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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])
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue