1.增加厂商-经销商管理

master
panqihua 2 years ago
parent 41a62f0c63
commit 05ca75b8b6
  1. 11
      src/plugins/platform.js
  2. 90
      src/views/components/manufacturer/detail.vue
  3. 117
      src/views/components/manufacturer/index.vue
  4. 22
      src/views/platform/manufacturer/index.vue

@ -1,14 +1,15 @@
import router from "@/router"; //TODO:待删除,通过路由参数控制
import router from '@/router'
function meta(to, type, desc) { function meta(to, type, desc) {
to.meta.manufacturer = { to.meta.manufacturer = {
name: to.fullPath.split("/").at(1), name: to.fullPath.split('/').at(1),
//1:厂商管理,2:经销商管理,3:门店管理 //1:厂商管理,2:经销商管理,3:门店管理
type, type,
//1:厂商/经销商/商店列表,2:审核 //1:厂商/经销商/商店列表,2:审核
subType: to.fullPath.split("/").at(-1), subType: to.fullPath.split('/').at(-1),
desc, desc
}; }
} }
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {

@ -0,0 +1,90 @@
<template>
<el-dialog :visible.sync="visible" @closed="$emit('close')">
<div class="title mb20">已授权
<!-- TODO:已授权已取消已到期-->
</div>
<el-row>
<el-col :span="16">
<el-form label-width="100px">
<el-form-item label="经销商名称">
<el-input v-model="form.name"/>
</el-form-item>
<el-form-item label="经销商id">
<el-input v-model="form.id"/>
</el-form-item>
<el-form-item label="申请时间">
<el-input v-model="form.applyTime"/>
</el-form-item>
<el-form-item label="申请时间">
<el-input v-model="form.authorizationTime"/>
</el-form-item>
<el-form-item label="选择品牌">
<el-checkbox-group v-model="form.brands">
<el-checkbox label="品牌1"></el-checkbox>
<el-checkbox label="品牌2"></el-checkbox>
<el-checkbox label="品牌3"></el-checkbox>
<el-checkbox label="品牌4"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="授权书">
<img src="http://www.dummyimage.com/50x50"/>
</el-form-item>
<el-form-item label="状态" v-if="$route.query.type==='list'">
<el-radio v-model="form.status" :key="item.value"
v-for="item in dict.type.authorization_status" :label="item.value">{{
item.label
}}
</el-radio>
</el-form-item>
<el-form-item label="审核" v-else-if="$route.query.type==='auth'">
<el-radio v-model="form.status" :key="item.value"
v-for="item in dict.type.audit_status" :label="item.value">{{
item.label
}}
</el-radio>
<el-input type="textarea" :autosize="{minRows:3}"/>
</el-form-item>
</el-form>
</el-col>
</el-row>
<div class="text-center">
<el-button type="primary" @click="$emit('close')">保存</el-button>
<el-button>重置</el-button>
</div>
</el-dialog>
</template>
<script>
export default {
name: 'detail',
dicts: ['authorization_status', 'audit_status'],
data() {
return {
visible: true,
form: {
name: '伊利',
id: 11515,
applyTime: '2022-12-31 12:31',
authorizationTime: '2022-12-31 12:31',
brands: [],
status: '0'
}
}
}
}
</script>
<style scoped lang="scss">
.title {
padding: 20px 15px;
border-radius: 2px;
background-color: rgba(22, 132, 252, 0.12);
color: rgba(16, 16, 16, 1);
font-size: 14px;
font-family: Roboto;
}
</style>

@ -0,0 +1,117 @@
<template>
<div class="app-container">
<el-form :inline="true">
<el-form-item>
<el-input placeholder="请输入经销商名称"></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入经销商ID"></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入联系人"></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入电话"></el-input>
</el-form-item>
<el-form-item>
<el-select v-model="queryParams.manufacturerType" placeholder="全部状态" clearable>
<el-option v-for="dict in dict.type.manufacturer_type" :key="dict.value" :label="dict.label"
:value="dict.value"></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-cascader
placeholder="全部地区"
v-model="queryParams.address"
:options="address"
:props="{ expandTrigger: 'hover' }"
></el-cascader>
</el-form-item>
<el-form-item>
<el-button type="primary">查询</el-button>
<el-button>重置</el-button>
</el-form-item>
</el-form>
<div class="mb10">
<template v-if="$route.query.type==='list'">
<el-button>批量开启</el-button>
<el-button>批量取消</el-button>
</template>
<template v-if="$route.query.type==='auth'">
<el-button>批量授权</el-button>
<el-button>批量锁定</el-button>
</template>
</div>
<el-table :data="dataList">
<el-table-column align="center" type="selection"/>
<el-table-column align="center" label="ID">CS00001</el-table-column>
<el-table-column align="center" label="经销商名称">CS00001</el-table-column>
<el-table-column align="center" label="地区">河南省郑州市金水区</el-table-column>
<el-table-column align="center" label="门店">125</el-table-column>
<el-table-column align="center" label="商品数量">1125</el-table-column>
<el-table-column align="center" label="状态">
已到期
<!-- TODO:已授权已取消已到期 不同字体颜色-->
</el-table-column>
<el-table-column align="center" label="操作">
<el-button type="text" @click="dialog.detail=true">详情</el-button>
<el-button type="text" v-if="$route.query.type==='list'">开启授权
<!-- TODO:开启授权|取消授权-->
</el-button>
<el-button type="text" v-else-if="$route.query.type==='auth'" @click="dialog.audit=true">授权</el-button>
</el-table-column>
</el-table>
<el-dialog :visible.sync="dialog.audit" title="审核">
<el-form inline>
<el-form-item label="审核">
<el-radio v-model="form.status" :key="item.value"
v-for="item in dict.type.audit_status" :label="item.value">{{
item.label
}}
</el-radio>
<el-input type="textarea" :autosize="{minRows:3}"/>
</el-form-item>
<div class="text-center">
<el-button type="primary">保存</el-button>
<el-button>重置</el-button>
</div>
</el-form>
</el-dialog>
<detail v-if="dialog.detail" @close="dialog.detail=false"/>
</div>
</template>
<script>
import Detail from './detail'
export default {
name: 'index',
dicts: ['manufacturer_type', 'audit_status'],
components: { Detail },
data() {
return {
form: {
status: '0'
},
dialog: {
detail: false,
audit: false
},
dataList: [{}],
address: [
{ label: '河南省', children: [{ label: '郑州市', children: [{ label: '金水区' }] }] }
],
queryParams: {
address: undefined,
manufacturerType: undefined
}
}
}
}
</script>
<style scoped>
</style>

@ -171,18 +171,18 @@
</div> </div>
</template> </template>
<script> <script>
import Detail from "./detail" import Detail from './detail'
//TODO:/使
export default { export default {
name: "Index", name: 'Index',
dicts: ['manufacturer_type', 'audit_status'], dicts: ['manufacturer_type', 'audit_status'],
components: { Detail }, components: { Detail },
data() { data() {
return { return {
width: 100, width: 100,
dialog: { dialog: {
detail: false, detail: false,
audit: false audit: false
}, },
dataList: [{}], dataList: [{}],
// //

Loading…
Cancel
Save