This commit is contained in:
wangchengming 2025-08-12 17:16:17 +08:00
parent 841b52f2e0
commit d1485520eb
5 changed files with 89 additions and 22 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

@ -73,7 +73,7 @@ const appStore = useAppStore()
const userStore = useUserStore()
const settingsStore = useSettingsStore()
const { proxy } = getCurrentInstance()
function toggleSideBar() {
appStore.toggleSideBar()
}

View File

@ -3,7 +3,7 @@ import { ElMessageBox, } from 'element-plus'
import { login, logout, getInfo } from '@/api/login'
import { getToken, setToken, removeToken } from '@/utils/auth'
import { isHttp, isEmpty } from "@/utils/validate"
import defAva from '@/assets/images/profile.jpg'
import defAva from '@/assets/images/avatar_icon.png'
const useUserStore = defineStore(
'user',

View File

@ -90,14 +90,23 @@
</el-select>
</el-form-item>
<el-form-item label="城市:">
<el-select v-model="queryParams.provinceId" placeholder="请选择" @change="getCityList" clearable
style="min-width: 30px">
<el-option v-for="item in province" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="">
<el-select v-model="queryParams.cityId" placeholder="请选择" @change="getCountyList" clearable
style="min-width: 30px">
<el-option v-for="item in city" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
<el-form-item label="">
</el-form-item>
<el-select v-model="queryParams.countyId" placeholder="请选择" clearable
style="min-width: 30px">
<el-option v-for="item in county" :key="item.id" :label="item.name" :value="item.id" />
</el-select>
</el-form-item>
</el-form>
</div>
@ -130,7 +139,7 @@
<el-table-column label="供应商名称" align="center" prop="supplierName" width="230">
<template #default="scope">
<span class="supplierNameLabel" @click="handleOpenDetail">{{ scope.row.supplierName
}}</span>
}}</span>
</template>
</el-table-column>
<el-table-column label="城市" align="center" prop="postCode" width="150" />
@ -166,7 +175,7 @@
@mouseenter="scope.row.currentImageSrc = hoverImageSrc"
@mouseleave="scope.row.currentImageSrc = defaultImageSrc" />
</template>
</el-popover>
</el-popover>
</template>
</el-table-column>
</el-table>
@ -214,6 +223,7 @@ import optionIcon from '@/assets/images/optionIcon.png'
import optionIconHover from '@/assets/images/optionIconHover.png'
import { useBackgroundStore } from '@/store/modules/background'
import otherbg from '@/assets/images/otherbg.png'
import { sysRegionListByPid } from "@/api/system/administrativeRegion"
import supplierForm from "./supplierForm.vue";
import supplierDetail from "./supplierDetail.vue";
@ -226,6 +236,10 @@ const showForm = ref(false)
const supplierFormRef = ref(null)
const showDetail = ref(false)
const supplierDetailRef = ref(null)
//
const province = ref([])
const city = ref([])
const county = ref([])
const defaultImageSrc = ref(optionIcon);
const hoverImageSrc = ref(optionIconHover);
@ -270,6 +284,29 @@ const unfoldFlag = ref(false)
const handleFlod = () => {
unfoldFlag.value = !unfoldFlag.value
}
// /
const getProvinceList = () => {
sysRegionListByPid({ parentId: '0' }).then(res => {
province.value = res.data
})
}
// /
const getCityList = (value) => {
sysRegionListByPid({ parentId: value }).then(res => {
queryParams.value.cityId = undefined
queryParams.value.countyId = undefined
city.value = res.data
})
}
// /
const getCountyList = (value) => {
sysRegionListByPid({ parentId: value }).then(res => {
queryParams.value.countyId = undefined
county.value = res.data
})
}
/** 查询岗位列表 */
const getList = () => {
@ -356,6 +393,7 @@ const handleShowList = () => {
//
onMounted(() => {
bgStore.setBgImage(otherbg)
getProvinceList()
getList()
});
</script>

View File

@ -152,28 +152,28 @@
<el-row :gutter="20" class="my_form_row">
<el-col :span="8">
<el-form-item label="">
<el-select v-model="ruleForm.media_quality" placeholder="请选择"
style="min-width: 30px;" clearable>
<el-option v-for="dict in media_quality" :key="dict.value" :label="dict.label"
:value="dict.value" />
<el-select v-model="ruleForm.provinceId" placeholder="请选择" @change="getCityList"
clearable style="min-width: 30px">
<el-option v-for="item in province" :key="item.id" :label="item.name"
:value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="">
<el-select v-model="ruleForm.media_quality" placeholder="请选择"
style="min-width: 30px;" clearable>
<el-option v-for="dict in media_quality" :key="dict.value" :label="dict.label"
:value="dict.value" />
<el-select v-model="ruleForm.cityId" placeholder="请选择" @change="getCountyList"
clearable style="min-width: 30px">
<el-option v-for="item in city" :key="item.id" :label="item.name"
:value="item.id" />
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="">
<el-select v-model="ruleForm.media_quality" placeholder="请选择"
style="min-width: 30px;" clearable>
<el-option v-for="dict in media_quality" :key="dict.value" :label="dict.label"
:value="dict.value" />
<el-select v-model="ruleForm.countyId" placeholder="请选择" clearable
style="min-width: 30px">
<el-option v-for="item in county" :key="item.id" :label="item.name"
:value="item.id" />
</el-select>
</el-form-item>
</el-col>
@ -424,7 +424,7 @@
<script setup>
import { onMounted, defineEmits, ref } from 'vue'
import { Close } from '@element-plus/icons-vue'
import { sysRegionListByPid } from "@/api/system/administrativeRegion"
import iconDoc from '@/assets/images/iconDoc.png'
import iconOther from '@/assets/images/iconOther.png'
import iconPdf from '@/assets/images/iconPdf.png'
@ -442,7 +442,10 @@ const { proxy } = getCurrentInstance()
const emit = defineEmits(['handleShowList']);
const route = useRoute()
const formTitle = ref('新建')
//
const province = ref([])
const city = ref([])
const county = ref([])
const data = reactive({
ruleForm: {},
rules: {
@ -453,6 +456,31 @@ const { ruleForm, rules } = toRefs(data)
const { invoice_type, media_ownership, personnel_size, main_media_types, media_quality, history_cooperation, supplier_level, supplier_cooperation_degree, main_business, business_department, company_type, cooperative_procurement_amount, cooperation_discount_intensity, enterprise_bad_records } = proxy.useDict("invoice_type", "media_ownership", "personnel_size", "main_media_types", "media_quality", "history_cooperation", "supplier_level", "supplier_cooperation_degree", "main_business", "business_department", "company_type", "cooperative_procurement_amount", "cooperation_discount_intensity", "enterprise_bad_records")
// /
const getProvinceList = () => {
sysRegionListByPid({ parentId: '0' }).then(res => {
province.value = res.data
})
}
// /
const getCityList = (value) => {
sysRegionListByPid({ parentId: value }).then(res => {
ruleForm.value.cityId = undefined
ruleForm.value.countyId = undefined
city.value = res.data
})
}
// /
const getCountyList = (value) => {
sysRegionListByPid({ parentId: value }).then(res => {
ruleForm.value.countyId = undefined
county.value = res.data
})
}
//
const docUploadList = ref([])
const baseUrl = import.meta.env.VITE_APP_BASE_API
@ -517,6 +545,7 @@ const handleClose = () => {
//
onMounted(() => {
bgStore.setBgImage(otherbg)
getProvinceList()
const id = route.params && route.params.Id
if (id) {
ruleForm.value.id = id