添加供应商查询条件
This commit is contained in:
parent
304011be2b
commit
2645242b30
|
@ -69,24 +69,23 @@
|
|||
<div class="searchSmallPanel" v-show="unfoldFlag">
|
||||
<el-form :inline="true" class="searchSmallPanelForm">
|
||||
<el-form-item label="供应商配合度:">
|
||||
<el-select v-model="queryParams.supplier_cooperation_degree" placeholder="请选择"
|
||||
style="min-width: 30px;" clearable>
|
||||
<el-select v-model="queryParams.supplierPeihe" placeholder="请选择" style="min-width: 30px;"
|
||||
clearable>
|
||||
<el-option v-for="dict in supplier_cooperation_degree" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="主营业务:">
|
||||
<el-select v-model="queryParams.main_business" placeholder="请选择" clearable
|
||||
<el-select v-model="queryParams.zhuyingYewu" placeholder="请选择" clearable
|
||||
style="min-width: 30px;">
|
||||
<el-option v-for="dict in main_business" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="业务部门:">
|
||||
<el-select v-model="queryParams.business_department" placeholder="请选择" clearable
|
||||
style="min-width: 30px;">
|
||||
<el-option v-for="dict in business_department" :key="dict.value" :label="dict.label"
|
||||
:value="dict.value" />
|
||||
<el-select v-model="queryParams.yewuDept" placeholder="请选择" clearable style="min-width: 30px;">
|
||||
<el-option v-for="item in deptList" :key="item.deptId" :label="item.deptName"
|
||||
:value="item.deptName" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="城市:">
|
||||
|
@ -243,6 +242,7 @@ import { useBackgroundStore } from '@/store/modules/background'
|
|||
import otherbg from '@/assets/images/otherbg.png'
|
||||
import { sysRegionListByPid } from "@/api/system/administrativeRegion"
|
||||
import { busSupplierPage, deleteBusSupplier } from "@/api/supplier"
|
||||
import { listDept } from "@/api/system/dept"
|
||||
|
||||
import supplierForm from "./supplierForm.vue";
|
||||
import supplierDetail from "./supplierDetail.vue";
|
||||
|
@ -258,7 +258,8 @@ const showDetail = ref(false)
|
|||
const supplierDetailRef = ref(null)
|
||||
const showLogs = ref(false)
|
||||
const supplierLogsRef = ref(null)
|
||||
|
||||
// 业务部门数据
|
||||
const deptList = ref([])
|
||||
// 查询条件 省、市、县
|
||||
const province = ref([])
|
||||
const city = ref([])
|
||||
|
@ -297,11 +298,22 @@ const data = reactive({
|
|||
isCooperation: undefined,
|
||||
meitiZhiliang: undefined,
|
||||
supplierLevel: undefined,
|
||||
supplierPeihe: undefined,
|
||||
zhuyingYewu: undefined,
|
||||
yewuDept: undefined,
|
||||
provinceId: undefined,
|
||||
cityId: undefined,
|
||||
countyId: undefined,
|
||||
}
|
||||
})
|
||||
|
||||
const { queryParams } = toRefs(data)
|
||||
|
||||
// 获取业务部门
|
||||
const getDepList = () => {
|
||||
listDept({ businessFlag: 1 }).then(response => {
|
||||
deptList.value = response.data
|
||||
})
|
||||
}
|
||||
// 折叠展开
|
||||
const unfoldFlag = ref(false)
|
||||
const handleFlod = () => {
|
||||
|
@ -362,6 +374,12 @@ const resetQuery = () => {
|
|||
isCooperation: undefined,
|
||||
meitiZhiliang: undefined,
|
||||
supplierLevel: undefined,
|
||||
supplierPeihe: undefined,
|
||||
zhuyingYewu: undefined,
|
||||
yewuDept: undefined,
|
||||
provinceId: undefined,
|
||||
cityId: undefined,
|
||||
countyId: undefined,
|
||||
}
|
||||
handleQuery()
|
||||
}
|
||||
|
@ -447,6 +465,7 @@ const handleCloseLogs = () => {
|
|||
// 初始化
|
||||
onMounted(() => {
|
||||
bgStore.setBgImage(otherbg)
|
||||
getDepList()
|
||||
getProvinceList()
|
||||
getSupplierPageList()
|
||||
});
|
||||
|
|
|
@ -11,8 +11,9 @@
|
|||
<el-form ref="ruleFormRef" :model="ruleForm" :rules="rules" label-width="150px" class="myInsertForm">
|
||||
<el-row :gutter="30" class="my_form_row">
|
||||
<el-col :span="6">
|
||||
<el-form-item label="业务部门" prop="yewuDept">
|
||||
<el-select v-model="ruleForm.yewuDept" placeholder="请选择" clearable style="min-width: 30px;">
|
||||
<el-form-item label="业务部门" prop="yewuDeptId">
|
||||
<el-select v-model="ruleForm.yewuDeptId" placeholder="请选择" @change="handleChangeDept" clearable
|
||||
style="min-width: 30px;">
|
||||
<el-option v-for="item in deptList" :key="item.deptId" :label="item.deptName"
|
||||
:value="item.deptId" />
|
||||
</el-select>
|
||||
|
@ -349,7 +350,7 @@ const mediaRightsRef = ref(null)
|
|||
const data = reactive({
|
||||
ruleForm: {},
|
||||
rules: {
|
||||
yewuDept: [{ required: true, message: "业务部门不能为空", trigger: "change" }],
|
||||
yewuDeptId: [{ required: true, message: "业务部门不能为空", trigger: "change" }],
|
||||
supplierName: [{ required: true, message: "供应商公司全称不能为空", trigger: "blur" }],
|
||||
zhuceZiben: [{ required: true, message: "注册资本不能为空", trigger: "blur" }],
|
||||
supplierLevel: [{ required: true, message: "供应商级别不能为空", trigger: "change" }],
|
||||
|
@ -443,6 +444,13 @@ const handleChangeSize = (val) => {
|
|||
ruleForm.value.renyuanGuimo = curSizeInfo?.label
|
||||
}
|
||||
|
||||
// 业务部门选择
|
||||
const handleChangeDept = (val) => {
|
||||
const curDepInfo = deptList.value.filter(item => item.deptId == val)[0]
|
||||
ruleForm.value.yewuDeptId = val
|
||||
ruleForm.value.yewuDept = curDepInfo?.deptName
|
||||
}
|
||||
|
||||
// 获取业务部门
|
||||
const getDepList = () => {
|
||||
listDept({ businessFlag: 1 }).then(response => {
|
||||
|
|
Loading…
Reference in New Issue
Block a user