fix: 退料接收管理-退料审核-工机具类型下拉框

This commit is contained in:
binbin_pan 2024-04-20 15:20:39 +08:00
parent 57291ad37e
commit 34aafe3095
2 changed files with 40 additions and 33 deletions

View File

@ -41,18 +41,12 @@
</el-select>
</el-form-item>
<el-form-item label="工机具类型" prop="typeId">
<el-cascader
v-model="queryParams.typeId"
:options="deptOptions"
:props="{
expandTrigger: 'hover',
label: 'label',
value: 'id',
checkStrictly: true,
}"
@change="handleNodeClick"
aria-placeholder="请选择极具类型"
></el-cascader>
<Tree
ref="mychildSon"
:width="240"
:dataList="deptList"
@changeId="selectDrop"
></Tree>
</el-form-item>
<el-form-item label="协议号" prop="agreementCode">
<el-input
@ -434,12 +428,14 @@ import {
import { getInfo, h } from '@/api/login'
import { getUnitData, getProData, getAgreementInfoById } from '@/api/claimAndRefund/receive.js'
import dialogForm from './dialogFormExame.vue'
import { listPartTypeApi } from '@/api/repairTest/repair'
import Tree from './tree.vue'
// 10:42startTime,endTime typeId
// http://localhost/claimAndRefund/return/returnApply
export default {
// name: "ReturnExamine",
dicts: ['sys_normal_disable'],
components: { dialogForm },
components: { dialogForm, Tree },
data() {
return {
checkResultOne: false,
@ -511,7 +507,7 @@ export default {
openTextTwo: '',
openTextThree: '',
companyId: '',
deptOptions: [],
deptList: [],
unitList: [],
proList: [],
taskStatusList: [
@ -546,6 +542,7 @@ export default {
this.initSelectData()
this.InitIGetInfo()
this.getList()
this.getTree()
},
methods: {
// claimAndRefund/return/returnApplyAdd
@ -568,6 +565,11 @@ export default {
this.loading = false
} catch (error) {}
},
getTree() {
listPartTypeApi().then((response) => {
this.deptList = response.data
})
},
//
cancel() {
this.open = false
@ -595,6 +597,7 @@ export default {
this.timeRange = []
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.$refs.mychildSon.inputValue = ''
this.initSelectData()
this.handleQuery()
},
@ -795,7 +798,9 @@ export default {
this.getList()
})
},
handleNodeClick(ev) {},
selectDrop(value) {
this.queryParams.typeId = value
},
initSelectData() {
this.GetUnitData()
this.GetProData()

View File

@ -62,19 +62,12 @@
/>
</el-form-item>
<el-form-item label="工机具类型" prop="typeId">
<el-cascader
v-model="queryParams.typeId"
:options="deptOptions"
:props="{
expandTrigger: 'hover',
label: 'label',
value: 'id',
checkStrictly: true,
}"
@change="handleNodeClick"
aria-placeholder="请选择极具类型"
>
</el-cascader>
<Tree
ref="mychildSon"
:width="240"
:dataList="deptList"
@changeId="selectDrop"
></Tree>
</el-form-item>
<el-form-item label="退料状态" prop="taskStatus">
@ -205,9 +198,11 @@
import { getInfo } from "@/api/login";
import { getUnitData, getProData, getAgreementInfoById, } from "@/api/claimAndRefund/receive.js"
import dialogForm from "./dialogFormExame.vue";
import { listPartTypeApi } from '@/api/repairTest/repair'
import Tree from './tree.vue'
export default {
// name: "ReturnExamine",
components: { dialogForm, },
components: { dialogForm, Tree },
data() {
return {
type: '',
@ -248,7 +243,7 @@
endTime: ''
},
companyId: '',
deptOptions: [],
deptList: [],
unitList: [],
proList: [],
taskStatusList: [
@ -279,6 +274,7 @@
created() {
this.initSelectData()
this.InitIGetInfo()
this.getTree()
},
methods: {
InitIGetInfo() {
@ -287,9 +283,15 @@
this.getList();
})
},
getTree() {
listPartTypeApi().then((response) => {
console.log('🚀 ~ listPartTypeApi ~ response.data:', response.data);
this.deptList = response.data
})
},
//
handleNodeClick(ev) {
selectDrop(value) {
this.queryParams.typeId = value
},
//
initSelectData() {
@ -367,8 +369,8 @@
resetQuery() {
this.dateRange = [];
// this.resetForm("queryForm");
this.$refs.queryForm.resetFields()
this.$refs.mychildSon.inputValue = ''
this.initSelectData()
this.handleQuery();
},