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

master
panqihua 2 years ago
parent ca1ade1b2e
commit 14119eb866
  1. 31
      src/views/platform/manufacturer/authorized.vue
  2. 39
      src/views/platform/manufacturer/base.vue
  3. 26
      src/views/platform/manufacturer/detail.vue
  4. 18
      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-row>
<el-col :span="18"> <el-col :span="18">
<div class="w240"> <div class="w240">
<el-form-item label="厂商名称"> <el-form-item :label="(manufacturerType === 1 ? '厂商' : '经销商') + '名称'">
<el-input v-model="form.name"></el-input> <el-input v-model="form.name"></el-input>
</el-form-item> </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-input v-model="form.id"></el-input>
</el-form-item> </el-form-item>
<br /> <br />
@ -19,10 +19,10 @@
<el-form-item label="负责人电话" class="ml"> <el-form-item label="负责人电话" class="ml">
<el-input v-model="form.phone"></el-input> <el-input v-model="form.phone"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="厂商类型"> <el-form-item label="厂商类型" v-if="manufacturerType === 1">
<el-select v-model="form.type"></el-select> <el-select v-model="form.type"></el-select>
</el-form-item> </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" <el-date-picker v-model="form.dateRange" value-format="yyyy-MM-dd" type="daterange"
range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker> range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"></el-date-picker>
</el-form-item> </el-form-item>
@ -56,6 +56,8 @@
}}</el-radio> }}</el-radio>
</el-form-item> </el-form-item>
<br /> <br />
<template v-if="type === '2'"> <template v-if="type === '2'">
<el-form-item label="审核"> <el-form-item label="审核">
<el-radio v-model="form.audit" :key="item.value" v-for="item in dict.type.audit_status" <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> :minRow="5"></el-input>
</el-form-item> </el-form-item>
<template v-if="manufacturerType === 2">
<div class="h1">授权厂商</div> </template>
<el-form-item label="厂商名称"> <template v-if="manufacturerType === 2">
<el-input v-model="authorized.name"></el-input> <div class="h1">授权厂商</div>
</el-form-item> <authorized />
<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>
</template> </template>
</el-col> </el-col>
<el-col :span="5" :offset="1"> <el-col :span="5" :offset="1">
@ -102,9 +93,10 @@
</template> </template>
<script> <script>
import userAvatar from "@/views/system/user/profile/userAvatar"; import userAvatar from "@/views/system/user/profile/userAvatar";
import Authorized from "./authorized"
export default { export default {
name: 'Base', name: 'Base',
components: { userAvatar }, components: { userAvatar, Authorized },
dicts: ['manufacturer_type_1', 'audit_status'], dicts: ['manufacturer_type_1', 'audit_status'],
data() { data() {
return { return {
@ -125,11 +117,6 @@ export default {
}, },
status: '0', status: '0',
audit: undefined audit: undefined
},
authorized: {
name: '厂商名称',
brands: []
} }
} }
}, },

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

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

Loading…
Cancel
Save