1.经销商-我的厂商-新增厂商

master
panqihua 2 years ago
parent eaa0cc657c
commit 4552ee1a80
  1. 11
      src/views/components/manufacturer/detail.vue
  2. 4
      src/views/manufacturer/dealer.vue
  3. 158
      src/views/manufacturer/my-manufacturer.vue
  4. 2
      src/views/manufacturer/store.vue

@ -6,16 +6,19 @@
<el-row> <el-row>
<el-col :span="16"> <el-col :span="16">
<el-form label-width="100px"> <el-form label-width="100px">
<el-form-item label="经销商名称"> <el-form-item :label="$route.query.subType+'名称'">
<el-input v-model="form.name"/> <el-input v-model="form.name"/>
</el-form-item> </el-form-item>
<el-form-item label="经销商id"> <el-form-item :label="$route.query.subType+'id'">
<el-input v-model="form.id"/> <el-input v-model="form.id"/>
</el-form-item> </el-form-item>
<el-form-item label="经营类型" v-if="$route.query.subType==='厂商'">
<el-input v-model="form.type"/>
</el-form-item>
<el-form-item label="申请时间"> <el-form-item label="申请时间">
<el-input v-model="form.applyTime"/> <el-input v-model="form.applyTime"/>
</el-form-item> </el-form-item>
<el-form-item label="申请时间"> <el-form-item label="授权时间">
<el-input v-model="form.authorizationTime"/> <el-input v-model="form.authorizationTime"/>
</el-form-item> </el-form-item>
<el-form-item label="选择品牌"> <el-form-item label="选择品牌">
@ -61,13 +64,13 @@
export default { export default {
name: 'detail', name: 'detail',
dicts: ['authorization_status', 'audit_status'], dicts: ['authorization_status', 'audit_status'],
data() { data() {
return { return {
visible: true, visible: true,
form: { form: {
name: '伊利', name: '伊利',
id: 11515, id: 11515,
type: '电子产品',
applyTime: '2022-12-31 12:31', applyTime: '2022-12-31 12:31',
authorizationTime: '2022-12-31 12:31', authorizationTime: '2022-12-31 12:31',
brands: [], brands: [],

@ -78,12 +78,12 @@
</div> </div>
</el-form> </el-form>
</el-dialog> </el-dialog>
<detail v-if="dialog.detail" @close="dialog.detail=false"/> <detail v-if="dialog.detail" @close="dialog.detail=false" type="经销商"/>
</div> </div>
</template> </template>
<script> <script>
import Detail from './detail' import Detail from '@/views/components/manufacturer/detail'
export default { export default {
name: 'index', name: 'index',

@ -0,0 +1,158 @@
<template>
<div class="app-container">
<el-form inline>
<el-form-item>
<el-input placeholder="请输入厂商名称"/>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入厂商ID"/>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入联系人"/>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入电话"/>
</el-form-item>
<el-form-item>
<el-select v-model="queryParams.type" placeholder="请选择类型">
<el-option value="0">类型</el-option>
</el-select>
</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-button type="primary">查询</el-button>
<el-button>重置</el-button>
</el-form-item>
</el-form>
<el-button type="primary" @click="dialog.add=true">新增厂商</el-button>
<el-button>批量取消</el-button>
<el-table :data="dataList" class="mt10">
<el-table-column align="center" type="selection"/>
<el-table-column align="center" label="ID">
CS00001
</el-table-column>
<el-table-column align="center" label="厂商名称">
联系厂商
</el-table-column>
<el-table-column align="center" label="logo">
<img src="http://www.dummyimage.com/50x50"/>
</el-table-column>
<el-table-column align="center" label="类型">
电子产品
</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="申请时间">
2022-12-31 12-31
</el-table-column>
<el-table-column align="center" label="授权时间">
2022-12-31 12-31
</el-table-column>
<el-table-column align="center" label="操作">
<el-button type="text" @click="dialog.detail=true">详情</el-button>
<el-button type="text">取消已授权</el-button>
</el-table-column>
</el-table>
<detail v-if="dialog.detail" @closed="dialog.detail=false" type="厂商"/>
<el-dialog title="新增" :visible.sync="dialog.add">
<el-row>
<el-col :span="16">
<el-form label-width="150px" label-position="left">
<el-form-item label="输入厂商ID">
<el-autocomplete class="inline-input" @select="handleSelect"
:fetch-suggestions="querySearch" :value="form.item&&form.item.id">
<template slot-scope="{ item }">
<el-row class="option-item">
<el-col :span="12" class="logo">
<img :src="item.logo"/>
</el-col>
<el-col :span="12">
<div>{{ item.name }}</div>
<div>{{ item.id }}</div>
</el-col>
</el-row>
</template>
</el-autocomplete>
<el-row class="option-item mt10" v-if="form.item">
<el-col :span="12" class="logo">
<img :src="form.item.logo"/>
</el-col>
<el-col :span="12">
<div>{{ form.item.name }}</div>
<div>{{ form.item.id }}</div>
</el-col>
</el-row>
</el-form-item>
<el-form-item label="选择品牌">
<el-checkbox-group v-model="form.brands">
<el-checkbox :label="'品牌'+item" v-for="item in 4" :key="item"></el-checkbox>
</el-checkbox-group>
</el-form-item>
<el-form-item label="授权书(选填)">
<image-upload :limit="1"/>
</el-form-item>
</el-form>
</el-col>
</el-row>
<div class="text-center">
<el-button type="primary">申请授权</el-button>
<el-button>重置</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import ImageUpload from '@/components/ImageUpload/index'
import Detail from '@/views/components/manufacturer/detail'
export default {
name: 'my-manufacturer',
dicts: ['manufacturer_type'],
components: { Detail, ImageUpload },
data() {
return {
dialog: {
detail: false,
add: false
},
dataList: [{}],
form: {
brands: [],
item: undefined
},
queryParams: {
type: undefined,
manufacturerType: undefined
}
}
},
methods: {
handleSelect(item) {
this.form.item = item
},
querySearch(queryString, cb) {
cb([{ value: 'CS000001', logo: 'http://www.dummyimage.com/50x50', id: 'CS000001', name: '联想经销商' }])
}
}
}
</script>
<style scoped lang="scss">
</style>

@ -75,7 +75,7 @@
</template> </template>
<script> <script>
import Detail from './detail' import Detail from '@/views/components/store/detail'
export default { export default {
name: 'index', name: 'index',
Loading…
Cancel
Save