diff --git a/src/views/supplier/index.vue b/src/views/supplier/index.vue
index 0702d7d..891e891 100644
--- a/src/views/supplier/index.vue
+++ b/src/views/supplier/index.vue
@@ -69,24 +69,23 @@
-
+
-
-
-
+
+
@@ -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()
});
diff --git a/src/views/supplier/supplierForm.vue b/src/views/supplier/supplierForm.vue
index 47951a9..4b04401 100644
--- a/src/views/supplier/supplierForm.vue
+++ b/src/views/supplier/supplierForm.vue
@@ -11,8 +11,9 @@
-
-
+
+
@@ -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 => {
@@ -473,7 +481,7 @@ const handleSubmit = () => {
proxy.$refs["ruleFormRef"].validate(valid => {
if (valid) {
// 使用扩展运算符合并数组
- const mergedArray = [...businessLicenseList.value, ...otherFileList.value, ...mediaRightsList.value];
+ const mergedArray = [...businessLicenseList.value, ...otherFileList.value, ...mediaRightsList.value];
console.log('营业资质', mergedArray)
ruleForm.value.busSupplierFileList = mergedArray
if (ruleForm.value.supplierId != undefined) {