Commit 1007d0fc authored by zhanglw's avatar zhanglw

调整

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