parent
eaa0cc657c
commit
4552ee1a80
@ -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> |
Loading…
Reference in new issue