feat:企业经销商抽检页面搭建
This commit is contained in:
parent
2fb5713f65
commit
de70cb3cf5
@ -60,51 +60,51 @@ const inputSuppliesRoutes = [
|
|||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
|
||||||
path: '/sub-government-affairs-service/productionDealer',
|
|
||||||
name: 'productionDealer',
|
|
||||||
component: Views,
|
|
||||||
meta: { title: '生产经销商管理', icon: 'Document' },
|
|
||||||
redirect: '/sub-government-affairs-service/productionDealer/pesticideDealer',
|
|
||||||
children: [
|
|
||||||
{
|
|
||||||
path: '/sub-government-affairs-service/productionDealer/pesticideDealer',
|
|
||||||
name: 'input-supplies-pesticide-dealer',
|
|
||||||
component: () => import('@/views/inputSuppliesManage/productionDealer/pesticideDealer/index.vue'),
|
|
||||||
meta: { title: '农药经销商管理', icon: 'Document' },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/sub-government-affairs-service/productionDealer/fertilizerDealer',
|
|
||||||
name: 'input-supplies-fertilizer-dealer',
|
|
||||||
component: () => import('@/views/inputSuppliesManage/productionDealer/fertilizerDealer/index.vue'),
|
|
||||||
meta: { title: '肥料经销商管理', icon: 'Document' },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/sub-government-affairs-service/productionDealer/ratPoisonDealer',
|
|
||||||
name: 'input-supplies-ratPoison-dealer',
|
|
||||||
component: () => import('@/views/inputSuppliesManage/productionDealer/ratPoisonDealer/index.vue'),
|
|
||||||
meta: { title: '兽药经销商管理', icon: 'Document' },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/sub-government-affairs-service/productionDealer/farmMachineryDealer',
|
|
||||||
name: 'input-supplies-farmMachinery-dealer',
|
|
||||||
component: () => import('@/views/inputSuppliesManage/productionDealer/farmMachineryDealer/index.vue'),
|
|
||||||
meta: { title: '农机经销商管理', icon: 'Document' },
|
|
||||||
},
|
|
||||||
{
|
|
||||||
path: '/sub-government-affairs-service/productionDealer/seedDealer',
|
|
||||||
name: 'input-supplies-seed-dealer',
|
|
||||||
component: () => import('@/views/inputSuppliesManage/productionDealer/seedDealer/index.vue'),
|
|
||||||
meta: { title: '种源经销商管理', icon: 'Document' },
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
// {
|
// {
|
||||||
// path: '/sub-government-affairs-service/enterpriseDealer',
|
// path: '/sub-government-affairs-service/productionDealer',
|
||||||
// name: 'enterpriseDealer',
|
// name: 'productionDealer',
|
||||||
// component: () => import('@/views/inputSuppliesManage/enterpriseDealer/index.vue'),
|
// component: Views,
|
||||||
// meta: { title: '企业经销商抽检', icon: 'Document' },
|
// meta: { title: '生产经销商管理', icon: 'Document' },
|
||||||
|
// redirect: '/sub-government-affairs-service/productionDealer/pesticideDealer',
|
||||||
|
// children: [
|
||||||
|
// {
|
||||||
|
// path: '/sub-government-affairs-service/productionDealer/pesticideDealer',
|
||||||
|
// name: 'input-supplies-pesticide-dealer',
|
||||||
|
// component: () => import('@/views/inputSuppliesManage/productionDealer/pesticideDealer/index.vue'),
|
||||||
|
// meta: { title: '农药经销商管理', icon: 'Document' },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/sub-government-affairs-service/productionDealer/fertilizerDealer',
|
||||||
|
// name: 'input-supplies-fertilizer-dealer',
|
||||||
|
// component: () => import('@/views/inputSuppliesManage/productionDealer/fertilizerDealer/index.vue'),
|
||||||
|
// meta: { title: '肥料经销商管理', icon: 'Document' },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/sub-government-affairs-service/productionDealer/ratPoisonDealer',
|
||||||
|
// name: 'input-supplies-ratPoison-dealer',
|
||||||
|
// component: () => import('@/views/inputSuppliesManage/productionDealer/ratPoisonDealer/index.vue'),
|
||||||
|
// meta: { title: '兽药经销商管理', icon: 'Document' },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/sub-government-affairs-service/productionDealer/farmMachineryDealer',
|
||||||
|
// name: 'input-supplies-farmMachinery-dealer',
|
||||||
|
// component: () => import('@/views/inputSuppliesManage/productionDealer/farmMachineryDealer/index.vue'),
|
||||||
|
// meta: { title: '农机经销商管理', icon: 'Document' },
|
||||||
|
// },
|
||||||
|
// {
|
||||||
|
// path: '/sub-government-affairs-service/productionDealer/seedDealer',
|
||||||
|
// name: 'input-supplies-seed-dealer',
|
||||||
|
// component: () => import('@/views/inputSuppliesManage/productionDealer/seedDealer/index.vue'),
|
||||||
|
// meta: { title: '种源经销商管理', icon: 'Document' },
|
||||||
|
// },
|
||||||
|
// ],
|
||||||
// },
|
// },
|
||||||
|
{
|
||||||
|
path: '/sub-government-affairs-service/enterpriseDealerCheck',
|
||||||
|
name: 'enterpriseDealerCheck',
|
||||||
|
component: () => import('@/views/inputSuppliesManage/enterpriseDealerCheck/index.vue'),
|
||||||
|
meta: { title: '企业经销商抽检', icon: 'Document' },
|
||||||
|
},
|
||||||
// {
|
// {
|
||||||
// path: '/sub-government-affairs-service/useSupervise',
|
// path: '/sub-government-affairs-service/useSupervise',
|
||||||
// name: 'useSupervise',
|
// name: 'useSupervise',
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
<template>
|
|
||||||
<CustomCard> 企业经销商抽检 </CustomCard>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script setup>
|
|
||||||
import { ref } from 'vue';
|
|
||||||
import CustomCard from '@/components/CustomCard.vue';
|
|
||||||
|
|
||||||
/* --------------- data --------------- */
|
|
||||||
// #region
|
|
||||||
|
|
||||||
// #endregion
|
|
||||||
|
|
||||||
/* --------------- methods --------------- */
|
|
||||||
// #region
|
|
||||||
|
|
||||||
// #endregion
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style lang="scss" scoped></style>
|
|
@ -0,0 +1,183 @@
|
|||||||
|
<template>
|
||||||
|
<CustomCard>
|
||||||
|
<h2>企业经销商抽检</h2>
|
||||||
|
<br />
|
||||||
|
<avue-crud
|
||||||
|
v-model:search="searchCondition"
|
||||||
|
v-model:page="pageData"
|
||||||
|
:data="data"
|
||||||
|
:option="option"
|
||||||
|
:loading="_loading"
|
||||||
|
@search-change="
|
||||||
|
(form, done) => {
|
||||||
|
getData(1);
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
"
|
||||||
|
@search-reset="() => getData(1)"
|
||||||
|
@current-change="getData"
|
||||||
|
@size-change="getData"
|
||||||
|
@row-save="handleRowSave"
|
||||||
|
@row-update="handleRowUpdate"
|
||||||
|
>
|
||||||
|
<template #emnu="{ row }">
|
||||||
|
<el-button>button</el-button>
|
||||||
|
</template>
|
||||||
|
</avue-crud>
|
||||||
|
</CustomCard>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup>
|
||||||
|
import { ref, reactive, onMounted } from 'vue';
|
||||||
|
import CustomCard from '@/components/CustomCard.vue';
|
||||||
|
import { CRUD_OPTIONS } from '@/config';
|
||||||
|
import { size } from 'lodash';
|
||||||
|
|
||||||
|
onMounted(getData);
|
||||||
|
|
||||||
|
/* --------------- data --------------- */
|
||||||
|
// #region
|
||||||
|
|
||||||
|
const _loading = ref(false);
|
||||||
|
const searchCondition = ref({
|
||||||
|
keywords: '',
|
||||||
|
});
|
||||||
|
const pageData = ref({
|
||||||
|
currentPage: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
total: 0,
|
||||||
|
});
|
||||||
|
const data = ref([]);
|
||||||
|
const option = reactive({
|
||||||
|
...CRUD_OPTIONS,
|
||||||
|
selection: false,
|
||||||
|
column: [
|
||||||
|
{
|
||||||
|
hide: true,
|
||||||
|
search: true,
|
||||||
|
label: '关键字',
|
||||||
|
prop: 'keywords',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '任务编号',
|
||||||
|
prop: 'taskNum',
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择任务类型',
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '任务类型',
|
||||||
|
prop: 'taskType',
|
||||||
|
type: 'select',
|
||||||
|
render: ({ row }) => {
|
||||||
|
return row.taskType == '0' ? '直接创建' : '民众投诉';
|
||||||
|
},
|
||||||
|
dicData: [
|
||||||
|
{ label: '直接创建', value: '0' },
|
||||||
|
{ label: '民众投诉', value: '1' },
|
||||||
|
],
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择任务类型',
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '企业名称',
|
||||||
|
prop: 'enterpriseName',
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择任务类型',
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '企业法人',
|
||||||
|
prop: 'enterpriseOwner',
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择任务类型',
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '联系电话',
|
||||||
|
prop: 'phone',
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择任务类型',
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: '状态',
|
||||||
|
prop: 'status',
|
||||||
|
render: ({ row }) => {
|
||||||
|
return row.status == '0' ? '未完成' : '已完成';
|
||||||
|
},
|
||||||
|
rules: [
|
||||||
|
{
|
||||||
|
required: true,
|
||||||
|
message: '请选择任务类型',
|
||||||
|
trigger: 'change',
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
// #endregion
|
||||||
|
|
||||||
|
/* --------------- methods --------------- */
|
||||||
|
// #region
|
||||||
|
async function getData(resetPage) {
|
||||||
|
resetPage === 1 && (pageData.value.currentPage = 1);
|
||||||
|
_loading.value = true;
|
||||||
|
let params = Object.assign(
|
||||||
|
{
|
||||||
|
currentPage: pageData.value.currentPage,
|
||||||
|
size: pageData.value.pageSize,
|
||||||
|
},
|
||||||
|
searchCondition.value
|
||||||
|
);
|
||||||
|
console.log('params', params);
|
||||||
|
for (let i = 0; i < 14; i++) {
|
||||||
|
data.value.push({
|
||||||
|
taskNum: '20220101' + `${i}${i}${i}${i}${i}`,
|
||||||
|
taskType: i % 2 == 0 ? '0' : '1',
|
||||||
|
enterpriseName: '上海XX有限公司',
|
||||||
|
enterpriseOwner: '张三',
|
||||||
|
phone: '123456789',
|
||||||
|
status: i % 2 == 0 ? '0' : '1',
|
||||||
|
});
|
||||||
|
}
|
||||||
|
pageData.value.total = data.value.length;
|
||||||
|
_loading.value = false;
|
||||||
|
}
|
||||||
|
|
||||||
|
function handleRowSave(row, done, loading) {
|
||||||
|
console.log('row', row);
|
||||||
|
loading();
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
function handleRowUpdate(row, index, done, loading) {
|
||||||
|
console.log('row', row);
|
||||||
|
loading();
|
||||||
|
done();
|
||||||
|
}
|
||||||
|
// #endregion
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped></style>
|
Loading…
x
Reference in New Issue
Block a user