Commit 1007d0fc authored by zhanglw's avatar zhanglw

调整

parent 1ca216b5
...@@ -194,6 +194,13 @@ export const HttpReq = { ...@@ -194,6 +194,13 @@ export const HttpReq = {
return res return res
}) })
}, },
// 内容管理-供应商列表查询
querySupplierListPage: function(params) {
return request({
url: '/api/bsw/supplierListPage/querySupplierListPage?' + qs.stringify(params, { indices: false }),
method: 'get'
})
},
xxx: null xxx: null
} }
} }
......
...@@ -4,17 +4,17 @@ ...@@ -4,17 +4,17 @@
<el-form ref="formViewRef" :model="formData" :rules="rules" :status-icon="true" label-width="240px"> <el-form ref="formViewRef" :model="formData" :rules="rules" :status-icon="true" label-width="240px">
<el-form-item label="供应商名称:" class="form-cell" prop="xxx"> <el-form-item label="供应商名称:" class="form-cell" prop="xxx">
<div class="cell-box"> <div class="cell-box">
<el-input v-model="formData.xxx" disabled placeholder="单行输入" class="cell-input" /> <el-input v-model="formData.supplierName" placeholder="单行输入" class="cell-input" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="供应商ID:" class="form-cell" prop="xxx"> <el-form-item label="供应商ID:" class="form-cell" prop="xxx">
<div class="cell-box"> <div class="cell-box">
<el-input v-model="formData.xxx" disabled placeholder="单行输入" class="cell-input" /> <el-input v-model="formData.supplierId" placeholder="单行输入" class="cell-input" />
</div> </div>
</el-form-item> </el-form-item>
<el-form-item label="标识设置:" class="form-cell" prop="supplierLevel"> <el-form-item label="标识设置:" class="form-cell" prop="supplierLevel">
<div class="cell-box"> <div class="cell-box">
<el-select v-model="formData.xxx" disabled placeholder="无" class="cell-select"> <el-select v-model="formData.mark" placeholder="无" class="cell-select">
<el-option v-for="item in dict.supplier_rank" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in dict.supplier_rank" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
</div> </div>
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
</el-form> </el-form>
<div slot="footer" class="dialog-footer" style="text-align: center"> <div slot="footer" class="dialog-footer" style="text-align: center">
<el-button @click="cancelView">关闭</el-button> <el-button @click="cancelView">关闭</el-button>
<el-button type="primary" @click="submitForm()">保存</el-button> <el-button type="primary" @click="saveForm()">保存</el-button>
<el-button type="success" @click="submitForm()">发布</el-button> <el-button type="success" @click="submitForm()">发布</el-button>
</div> </div>
</el-dialog> </el-dialog>
...@@ -54,6 +54,9 @@ export default { ...@@ -54,6 +54,9 @@ export default {
visible: false, visible: false,
title: '内容管理供应商设置', title: '内容管理供应商设置',
formData: { formData: {
supplierName: '',
supplierId: '',
mark: '1',
id: null id: null
}, },
rules: {} rules: {}
...@@ -72,6 +75,7 @@ export default { ...@@ -72,6 +75,7 @@ export default {
cancelView() { cancelView() {
this.hideView() this.hideView()
}, },
saveForm() {},
submitForm() { submitForm() {
this.$refs.formViewRef.validate((valid, obj) => { this.$refs.formViewRef.validate((valid, obj) => {
if (valid) { if (valid) {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<el-option v-for="item in dict.area_province" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in dict.area_province" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<el-select v-model="query.status" clearable placeholder="请选择标识" style="width: 120px"> <el-select v-model="query.status" clearable placeholder="请选择标识" style="width: 120px">
<el-option v-for="item in dict.issue_status" :key="item.value" :label="item.label" :value="item.value" /> <el-option v-for="item in dict.supplier_rank" :key="item.value" :label="item.label" :value="item.value" />
</el-select> </el-select>
<el-input v-model="query.username" clearable placeholder="请输入供应商名称" style="width:280px;" /> <el-input v-model="query.username" clearable placeholder="请输入供应商名称" style="width:280px;" />
<el-select v-model="query.status" clearable placeholder="请选择状态" style="width: 120px"> <el-select v-model="query.status" clearable placeholder="请选择状态" style="width: 120px">
...@@ -29,15 +29,15 @@ ...@@ -29,15 +29,15 @@
<el-table id="dataTable" ref="dataTable" v-loading="loading" :data="tableData" tooltip-effect="dark" style="width:auto;min-height: 70vh" @selection-change="handleSelectionChange"> <el-table id="dataTable" ref="dataTable" v-loading="loading" :data="tableData" tooltip-effect="dark" style="width:auto;min-height: 70vh" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" /> <el-table-column type="selection" width="55" />
<el-table-column type="index" width="55" label="序号" :index="indexMethod" /> <el-table-column type="index" width="55" label="序号" :index="indexMethod" />
<el-table-column prop="area" label="标识" width="200" /> <el-table-column prop="mark" label="标识" width="200" :formatter="(row, col, val)=>{return dict.label.supplier_rank[val]}" />
<el-table-column prop="xxx" label="供应产品名称" /> <el-table-column prop="supplierName" label="供应产品名称" />
<el-table-column label="状态" width="100"> <el-table-column label="状态" width="100">
<template slot-scope="scope"> <template slot-scope="scope">
<div :style="'color:'+textColors[scope.row.status]">{{ dict.label.issue_status[scope.row.status] }}</div> <div :style="'color:'+textColors[scope.row.status]">{{ dict.label.issue_status[scope.row.status] }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="xxx" label="最后维护日期" align="center" width="200" /> <el-table-column prop="updateTime" label="最后维护日期" align="center" width="200" />
<el-table-column prop="xxx" label="操作" align="right" width="240"> <el-table-column label="操作" align="right" width="240">
<template slot-scope="scope"> <template slot-scope="scope">
<el-tooltip v-if="scope.row.status==='1'" content="发布"><el-button round plain type="success" icon="el-icon-finished" @click="toEdit(scope.row)" /></el-tooltip> <el-tooltip v-if="scope.row.status==='1'" content="发布"><el-button round plain type="success" icon="el-icon-finished" @click="toEdit(scope.row)" /></el-tooltip>
<el-tooltip content="设置"><el-button round plain icon="el-icon-s-tools" @click="toEdit(scope.row)" /></el-tooltip> <el-tooltip content="设置"><el-button round plain icon="el-icon-s-tools" @click="toEdit(scope.row)" /></el-tooltip>
...@@ -57,7 +57,7 @@ import editPage from './edit' ...@@ -57,7 +57,7 @@ import editPage from './edit'
export default { export default {
components: { DateRangePicker, editPage }, components: { DateRangePicker, editPage },
dicts: ['issue_status', 'product_type', 'area_province'], dicts: ['issue_status', 'product_type', 'area_province', 'supplier_rank'],
data() { data() {
return { return {
textColors: ['#ccc', '#bba', '#32cd32'], textColors: ['#ccc', '#bba', '#32cd32'],
...@@ -85,17 +85,18 @@ export default { ...@@ -85,17 +85,18 @@ export default {
this.multipleSelection = val this.multipleSelection = val
}, },
loadData() { loadData() {
var sort = 'id,desc' // 清除参数无值的情况
var param = { ...this.query } Object.keys(this.query).length !== 0 && Object.keys(this.query).forEach(item => {
param.page = this.page if (this.query[item] === null || this.query[item] === '') this.query[item] = undefined
param.pageSize = this.pageSize })
param.sort = sort HttpReq.backstageApi.querySupplierListPage({
this.tableData = [ page: this.page - 1,
{ username: '张三', area: '火星', status: '1', enabled: false, xxx: '2023-05-09' }, pageSize: this.pageSize,
{ username: '张三', area: '火星', status: '2', enabled: false, xxx: '2023-05-09' }, ...this.query
{ username: '张三', area: '火星', status: '1', enabled: false, xxx: '2023-05-09' } }).then((res) => {
] this.tableData = res.data.data
this.total = 2 this.total = res.data.total
})
}, },
batchOperate(opt) { batchOperate(opt) {
if (!this.multipleSelection.length) { if (!this.multipleSelection.length) {
...@@ -121,6 +122,9 @@ export default { ...@@ -121,6 +122,9 @@ export default {
data.enabled = !data.enabled data.enabled = !data.enabled
}) })
}, },
toAdd() {
this.$refs.editPage.loadData()
},
toEdit(item) { toEdit(item) {
this.$refs.editPage.loadData(item.customerId) this.$refs.editPage.loadData(item.customerId)
}, },
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment