页面优化
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'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 工机具类型
|
||||||
|
export function getUseTypeTree(data) {
|
||||||
|
return request({
|
||||||
|
url: '/material/backApply/getUseTypeTree',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,8 @@
|
||||||
:options="deptOptions"
|
:options="deptOptions"
|
||||||
:props="{
|
:props="{
|
||||||
expandTrigger: 'hover',
|
expandTrigger: 'hover',
|
||||||
label: 'label',
|
label: 'typeName',
|
||||||
value: 'id',
|
value: 'typeId',
|
||||||
checkStrictly: true,
|
checkStrictly: true,
|
||||||
}"
|
}"
|
||||||
@change="handleNodeClick"
|
@change="handleNodeClick"
|
||||||
|
|
@ -531,7 +531,7 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<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 { ApiGetBackApplyList, ApiGetView, backApplyDelApi, submitBackApplyApi } from "@/api/claimAndRefund/return.js"
|
||||||
import {
|
import {
|
||||||
getInfo, h
|
getInfo, h
|
||||||
|
|
@ -774,9 +774,10 @@ export default {
|
||||||
return backApplyDelApi(param);
|
return backApplyDelApi(param);
|
||||||
}).then(() => {
|
}).then(() => {
|
||||||
this.getList();
|
this.getList();
|
||||||
this.$modal.msgSuccess('删除成功');
|
// this.$modal.msgSuccess('删除成功');
|
||||||
|
this.$message.success('操作成功!')
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
this.$modal.msgError('删除失败');
|
// this.$modal.msgError('删除失败');
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
handlePrint(row) {
|
handlePrint(row) {
|
||||||
|
|
@ -831,6 +832,7 @@ export default {
|
||||||
this.companyId = res.user.companyId
|
this.companyId = res.user.companyId
|
||||||
this.getList();
|
this.getList();
|
||||||
})
|
})
|
||||||
|
// this.initGetUseTypeTree()
|
||||||
},
|
},
|
||||||
handleNodeClick(ev) {
|
handleNodeClick(ev) {
|
||||||
|
|
||||||
|
|
@ -871,6 +873,7 @@ export default {
|
||||||
const res = await getAgreementInfoById(params)
|
const res = await getAgreementInfoById(params)
|
||||||
// this.proList = res.data
|
// this.proList = res.data
|
||||||
this.queryParams.agreementCode = res.data.agreementCode
|
this.queryParams.agreementCode = res.data.agreementCode
|
||||||
|
this.initGetUseTypeTree(res.data.agreementId)
|
||||||
},
|
},
|
||||||
getAgreementByUnitAndProId() {
|
getAgreementByUnitAndProId() {
|
||||||
this.InitGetAgreementInfoById()
|
this.InitGetAgreementInfoById()
|
||||||
|
|
@ -886,6 +889,14 @@ export default {
|
||||||
},
|
},
|
||||||
resetQuery1() {
|
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: {
|
deviceTypeTreeProps: {
|
||||||
children: 'children',
|
children: 'children',
|
||||||
label: 'typeName'
|
label: 'typeName',
|
||||||
// multiple: false,
|
// multiple: false,
|
||||||
// value: 'typeId'
|
value: 'typeId'
|
||||||
},
|
},
|
||||||
// 选中的设备类型
|
// 选中的设备类型
|
||||||
deviceType: null,
|
deviceType: null,
|
||||||
|
|
@ -404,7 +404,7 @@ export default {
|
||||||
created() {
|
created() {
|
||||||
this.GetUnitData()
|
this.GetUnitData()
|
||||||
this.GetProData()
|
this.GetProData()
|
||||||
this.GetDeviceTypeTree()
|
this.GetDeviceTypeTreeFn()
|
||||||
// this.getList();
|
// this.getList();
|
||||||
console.log('this.$route.query.taskId', this.$route.query.taskId)
|
console.log('this.$route.query.taskId', this.$route.query.taskId)
|
||||||
if (this.$route.query.taskId) {
|
if (this.$route.query.taskId) {
|
||||||
|
|
@ -440,12 +440,14 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
// 获取 设备树结构数据
|
// 获取 设备树结构数据
|
||||||
async GetDeviceTypeTree() {
|
async GetDeviceTypeTreeFn(agreementId) {
|
||||||
const params = {
|
const params = {
|
||||||
agreementId: 15
|
agreementId: agreementId
|
||||||
// this.agreementId
|
// this.agreementId
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await getUseTypeTreee(params)
|
const res = await getUseTypeTreee(params)
|
||||||
|
console.log("resgetUseTypeTreee",res)
|
||||||
this.deviceTypeTree = res.data
|
this.deviceTypeTree = res.data
|
||||||
},
|
},
|
||||||
// 获取 协议id
|
// 获取 协议id
|
||||||
|
|
@ -465,6 +467,8 @@ export default {
|
||||||
} else {
|
} else {
|
||||||
this.queryParams.agreementId = res.data.agreementId
|
this.queryParams.agreementId = res.data.agreementId
|
||||||
this.queryParams.agreementCode = res.data.agreementCode
|
this.queryParams.agreementCode = res.data.agreementCode
|
||||||
|
this.GetDeviceTypeTreeFn(res.data.agreementId)
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
@ -759,10 +763,13 @@ export default {
|
||||||
/////// 设备类型树 切换
|
/////// 设备类型树 切换
|
||||||
deviceTypeChange(val) {
|
deviceTypeChange(val) {
|
||||||
let nodes = null;
|
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)]
|
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) {
|
if (nodes[0].level != 4) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
this.leaseApplyDetails.push(
|
this.leaseApplyDetails.push(
|
||||||
this.handelTableItemData(nodes[0])
|
this.handelTableItemData(nodes[0])
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue