完善厂商/经销商管理 详情

master
panqihua 2 years ago
parent ca1ade1b2e
commit 14119eb866
  1. 31
      src/views/platform/manufacturer/authorized.vue
  2. 35
      src/views/platform/manufacturer/base.vue
  3. 14
      src/views/platform/manufacturer/detail.vue
  4. 16
      src/views/platform/manufacturer/detail_table.vue

@ -0,0 +1,31 @@
<template>
<div>
<el-form-item label="厂商名称">
<el-input v-model="authorized.name"></el-input>
</el-form-item>
<br />
<el-form-item label="选择品牌">
<el-checkbox-group v-model="authorized.brands">
<el-checkbox v-for="item in 4" :label="item" :key="item">品牌{{ item }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<br />
<el-form-item label="授权书">
<img src="http://www.dummyimage.com/100x100" />
</el-form-item>
</div>
</template>
<script>
export default {
name: 'Authorized',
data() {
return {
authorized: {
name: '厂商名称',
brands: []
}
}
}
}
</script>

@ -6,10 +6,10 @@
<el-row>
<el-col :span="18">
<div class="w240">
<el-form-item label="厂商名称">
<el-form-item :label="(manufacturerType === 1 ? '厂商' : '经销商') + '名称'">
<el-input v-model="form.name"></el-input>
</el-form-item>
<el-form-item label="厂商ID" class="ml">
<el-form-item :label="(manufacturerType === 1 ? '厂商' : '经销商') + 'ID'" class="ml">
<el-input v-model="form.id"></el-input>
</el-form-item>
<br />
@ -19,10 +19,10 @@
<el-form-item label="负责人电话" class="ml">
<el-input v-model="form.phone"></el-input>
</el-form-item>
<el-form-item label="厂商类型">
<el-form-item label="厂商类型" v-if="manufacturerType === 1">
<el-select v-model="form.type"></el-select>
</el-form-item>
<el-form-item label="技术支持时间" class="ml">
<el-form-item label="技术支持时间" :class="{ 'ml': manufacturerType === 1 }">
<el-date-picker v-model="form.dateRange" value-format="yyyy-MM-dd" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item>
@ -56,6 +56,8 @@
}}</el-radio>
</el-form-item>
<br />
<template v-if="type === '2'">
<el-form-item label="审核">
<el-radio v-model="form.audit" :key="item.value" v-for="item in dict.type.audit_status"
@ -71,22 +73,11 @@
:minRow="5"></el-input>
</el-form-item>
</template>
<template v-if="manufacturerType === 2">
<div class="h1">授权厂商</div>
<el-form-item label="厂商名称">
<el-input v-model="authorized.name"></el-input>
</el-form-item>
<br />
<el-form-item label="选择品牌">
<el-checkbox-group v-model="authorized.brands">
<el-checkbox v-for="item in 4" :label="item" :key="item">品牌{{ item }}</el-checkbox>
</el-checkbox-group>
</el-form-item>
<br />
<el-form-item label="授权书">
<img src="http://www.dummyimage.com/100x100" />
</el-form-item>
</template>
<authorized />
</template>
</el-col>
<el-col :span="5" :offset="1">
@ -102,9 +93,10 @@
</template>
<script>
import userAvatar from "@/views/system/user/profile/userAvatar";
import Authorized from "./authorized"
export default {
name: 'Base',
components: { userAvatar },
components: { userAvatar, Authorized },
dicts: ['manufacturer_type_1', 'audit_status'],
data() {
return {
@ -125,11 +117,6 @@ export default {
},
status: '0',
audit: undefined
},
authorized: {
name: '厂商名称',
brands: []
}
}
},

@ -5,12 +5,22 @@
<el-tab-pane label="基本信息" name="base">
<base-info @close="$emit('close')" />
</el-tab-pane>
<template v-if="manufacturerType === 1">
<el-tab-pane label="经销商(5)" name="dealer">
<detail-table :type="1" />
</el-tab-pane>
<el-tab-pane label="直营门店(12)" name="direct_store">
<detail-table :type="2" />
</el-tab-pane>
</template>
<template v-else>
<el-tab-pane label="厂商(12)" name="dealer">
<detail-table :type="1" />
</el-tab-pane>
<el-tab-pane label="加盟店(12)" name="direct_store">
<detail-table :type="2" />
</el-tab-pane>
</template>
</el-tabs>
</template>
<base-info @close="$emit('close')" v-else />
@ -34,6 +44,10 @@ export default {
// 12
type() {
return this.$route.fullPath.split('/').at(-1)
},
// 1:2
manufacturerType() {
return this.$route.fullPath.includes('manufacturer') ? 1 : 2
}
}
}

@ -2,11 +2,21 @@
<div>
<el-button>批量锁定</el-button>
<el-button>批量开启</el-button>
<el-button v-if="manufacturerType === 2">批量删除</el-button>
<el-table :data="dataList" class="table">
<el-table-column type="selection" align="center"></el-table-column>
<el-table-column label="ID" align="center">CS000001</el-table-column>
<template v-if="manufacturerType === 1">
<el-table-column label="经销商名称" align="center" v-if="type === 1">联想经销商</el-table-column>
</template>
<template v-else>
<template v-if="type === 1">
<el-table-column label="厂商名称" align="center">厂商名称</el-table-column>
<el-table-column label="厂商分类" align="center">厂商分类</el-table-column>
</template>
</template>
<template v-if="type === 2">
<el-table-column label="门店名称" align="center">门店名称</el-table-column>
<el-table-column label="门店类型" align="center">直营门店</el-table-column>
</template>
@ -45,6 +55,12 @@ export default {
getList() {
}
},
computed: {
// 1:2
manufacturerType() {
return this.$route.fullPath.includes('manufacturer') ? 1 : 2
}
}
}
</script>

Loading…
Cancel
Save