前端问题修改(退料申请机具类型选择筛选)

This commit is contained in:
zzyuan 2024-04-26 17:22:16 +08:00
parent 3edb63e8b8
commit e95c7585c0
5 changed files with 21 additions and 66 deletions

View File

@ -707,25 +707,3 @@ export default {
} }
</script> </script>
<style scoped lang="scss">
/* input number类型取消增减箭头*/
::v-deep input::-webkit-outer-spin-button,
::v-deep input::-webkit-inner-spin-button {
-webkit-appearance: none;
}
::v-deep .el-input {
input[type='number'] {
padding-right: 0px;
-moz-appearance: textfield;
-webkit-appearance: textfield;
// el-inputnumber
line-height: 1px !important;
}
input[type='number']::-webkit-inner-spin-button,
input[type='number']::-webkit-outer-spin-button {
-webkit-appearance: none;
margin: 0;
}
}
</style>

View File

@ -551,15 +551,6 @@
<script> <script>
import { listPartTypeApi } from '@/api/repairTest/repair' import { listPartTypeApi } from '@/api/repairTest/repair'
import {
listType,
getType,
delType,
addType,
updateType,
refreshCache,
getUseTypeTree,
} from '@/api/system/dict/type'
import { import {
ApiGetBackApplyList, ApiGetBackApplyList,
getViewByApply, getViewByApply,
@ -692,15 +683,14 @@
methods: { methods: {
getTree() { getTree() {
listPartTypeApi().then((response) => { listPartTypeApi().then((response) => {
console.log('🚀 ~ listPartTypeApi ~ response:', response); // console.log('🚀 ~ listPartTypeApi ~ response:', response);
this.deptList = response.data this.deptList = response.data
}) })
}, },
selectDrop(value) { selectDrop(value) {
this.queryParams.typeId = value this.queryParams.typeId = value
}, },
// claimAndRefund/return/returnApplyAdd
// claimAndRefund/return/returnApplyAdd
/** 查询字典类型列表 startTime,结束日期endTime */ /** 查询字典类型列表 startTime,结束日期endTime */
async getList() { async getList() {
this.loading = true this.loading = true
@ -907,19 +897,11 @@
this.loadingTotal = res.data.total this.loadingTotal = res.data.total
}) })
}, },
/** 刷新缓存按钮操作 */
handleRefreshCache() {
refreshCache().then(() => {
this.$modal.msgSuccess('刷新成功')
this.$store.dispatch('dict/cleanDict')
})
},
InitIGetInfo() { InitIGetInfo() {
getInfo().then((res) => { getInfo().then((res) => {
this.companyId = res.user.companyId this.companyId = res.user.companyId
this.getList() this.getList()
}) })
// this.initGetUseTypeTree()
}, },
handleNodeClick(ev) { handleNodeClick(ev) {
console.log(ev) console.log(ev)
@ -928,7 +910,6 @@
this.GetUnitData() this.GetUnitData()
this.GetProData() this.GetProData()
}, },
// //
async GetUnitData() { async GetUnitData() {
const params = {} const params = {}
@ -943,7 +924,7 @@
const res = await getProData(params) const res = await getProData(params)
this.proList = res.data this.proList = res.data
}, },
// // ID
async InitGetAgreementInfoById() { async InitGetAgreementInfoById() {
const { unitId, proId } = this.queryParams const { unitId, proId } = this.queryParams
if (!unitId || !proId) { if (!unitId || !proId) {
@ -956,7 +937,6 @@
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()
@ -974,14 +954,7 @@
this.dialogQueryParams.keyWord = '' this.dialogQueryParams.keyWord = ''
this.getDialogList() this.getDialogList()
}, },
async initGetUseTypeTree(id) {
let params = {
agreementId: id,
}
const res = await getUseTypeTree(params)
console.log('res-getUseTypeTree', res)
this.deptOptions = res.data
},
}, },
} }
</script> </script>

View File

@ -105,7 +105,6 @@
v-hasPermi="['system:role:export']" v-hasPermi="['system:role:export']"
>导出</el-button>--> >导出</el-button>-->
</el-col> </el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
</el-row> </el-row>
<el-table <el-table
@ -725,8 +724,8 @@ export default {
// console.log("vall1211221122", this.$refs.deviceTypeCascader.getCheckedNodes().length, this.$refs.deviceTypeCascader.getCheckedNodes(), [this.$refs.deviceTypeCascader.panel.getNodeByValue(val)]) // 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) console.log("nodes", nodes)
const res = await getUseNumByTypeId({ typeId: nodes[0].data.typeId }) // const res = await getUseNumByTypeId({ typeId: nodes[0].data.typeId })
nodes[0].data.useNum = res.data nodes[0].data.useNum = nodes[0].data.num
if (nodes[0].level != 4) { if (nodes[0].level != 4) {
return return
} }

View File

@ -130,18 +130,13 @@
v-hasPermi="['system:role:export']" v-hasPermi="['system:role:export']"
>导出</el-button> --> >导出</el-button> -->
</el-col> </el-col>
<right-toolbar
:showSearch.sync="showSearch"
@queryTable="getList"
></right-toolbar>
</el-row> </el-row>
<el-table <el-table
v-loading="loading" v-loading="loading"
:data="leaseApplyDetails" :data="leaseApplyDetails"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
> >
<el-table-column type="selection" min-width="55" align="center" /> <el-table-column type="selection" min-width="55" align="center" :selectable="selectable"/>
<el-table-column label="序号" type="index" min-width="120" /> <el-table-column label="序号" type="index" min-width="120" />
<el-table-column <el-table-column
label="类型名称" label="类型名称"
@ -412,7 +407,7 @@ export default {
mounted() { mounted() {
this.GetUnitData() this.GetUnitData()
this.GetProData() this.GetProData()
this.GetDeviceTypeTreeFn() // this.GetDeviceTypeTreeFn()
// this.getList(); // this.getList();
// console.log('this.$route.query.isEdit', this.$route.query.isEdit) // console.log('this.$route.query.isEdit', this.$route.query.isEdit)
this.isEdit = this.$route.query.isEdit; this.isEdit = this.$route.query.isEdit;
@ -609,6 +604,15 @@ export default {
this.resetForm("queryForm"); this.resetForm("queryForm");
this.handleQuery(); this.handleQuery();
}, },
//
selectable(row) {
console.log(row)
if (row.num != 0) {
return true
} else {
return false
}
},
// //
handleSelectionChange(selection) { handleSelectionChange(selection) {
this.queryParams.leaseApplyDetails = selection this.queryParams.leaseApplyDetails = selection
@ -771,8 +775,8 @@ export default {
console.log("vall1211221122", this.$refs.deviceTypeCascader.getCheckedNodes().length, this.$refs.deviceTypeCascader.getCheckedNodes(), [this.$refs.deviceTypeCascader.panel.getNodeByValue(val)]) 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) console.log("nodes", nodes)
const res = await getUseNumByTypeId({ typeId: nodes[0].data.typeId }) // const res = await getUseNumByTypeId({ typeId: nodes[0].data.typeId })
nodes[0].data.useNum = res.data nodes[0].data.useNum = nodes[0].data.num
if (nodes[0].level != 4) { if (nodes[0].level != 4) {
return return
} }
@ -805,6 +809,7 @@ export default {
template.preNum = node.data.num template.preNum = node.data.num
template.typeName = node.pathLabels[2] template.typeName = node.pathLabels[2]
template.typeCode = node.pathLabels[3] template.typeCode = node.pathLabels[3]
template.num = node.data.num
template.useNum = node.data.useNum template.useNum = node.data.useNum
return template return template
} }

View File

@ -945,7 +945,7 @@
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) // this.initGetUseTypeTree(res.data.agreementId)
}, },
getAgreementByUnitAndProId() { getAgreementByUnitAndProId() {
this.InitGetAgreementInfoById() this.InitGetAgreementInfoById()