|
@@ -10,10 +10,13 @@
|
|
|
style="padding: 10px 0 0 0">
|
|
|
|
|
|
<el-form-item v-for="column in searchColumns " :label="column.title" :key="column.key">
|
|
|
+
|
|
|
<el-input v-if="column.type == 'Input'" v-model="searchParams[column.key]" clearable></el-input>
|
|
|
+
|
|
|
<el-select v-if="column.type == 'Select'" v-model="searchParams[column.key]" clearable>
|
|
|
<el-option v-for="op in column.options" :label="op.label" :value="op.value"></el-option>
|
|
|
</el-select>
|
|
|
+
|
|
|
<el-date-picker v-if="column.type == 'DateRange'" v-model="searchParams[column.key]" clearable type="daterange"
|
|
|
format="yyyy-MM-dd " value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
|
|
|
end-placeholder="结束日期">
|
|
@@ -21,15 +24,18 @@
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item>
|
|
|
- <el-button type="primary" @click="handelSearch">查询</el-button>
|
|
|
- <el-button @click="handelResetSearch">重置</el-button>
|
|
|
+ <el-button type="primary" icon="el-icon-search" @click="handelSearch"
|
|
|
+ v-hasPermi="['pu:authorization:list']">查询</el-button>
|
|
|
+ <el-button icon="el-icon-refresh" @click="handelResetSearch">重置</el-button>
|
|
|
</el-form-item>
|
|
|
+
|
|
|
</el-form>
|
|
|
|
|
|
<!-- 操作区 -->
|
|
|
<el-row :gutter="24" style="padding: 0 10px">
|
|
|
<el-col :span="24" style="text-align: right">
|
|
|
- <el-button size="mini" type="primary" @click="handleOpenAddDialog">新增</el-button>
|
|
|
+ <el-button size="mini" type="primary" @click="handleOpenAddDialog"
|
|
|
+ v-hasPermi="['pu:authorization:add']">新增</el-button>
|
|
|
<el-button size="mini" @click="handleSubmit">提交</el-button>
|
|
|
<el-button size="mini" @click="handleDownload">下载授权书</el-button>
|
|
|
</el-col>
|
|
@@ -40,13 +46,18 @@
|
|
|
highlight-current-row max-height="500">
|
|
|
<el-table-column type="selection" width="35"></el-table-column>
|
|
|
<el-table-column type="index" width="55" label="序号"></el-table-column>
|
|
|
- <el-table-column v-for="column in tableColumns" :prop="column.key" :label="column.title" v-if="column.show"
|
|
|
+ <el-table-column v-for="column in tableColumns" :label="column.title" v-if="column.show"
|
|
|
:width="column.width || 180">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ {{ column.key == 'status' ? judgeStatus(scope.row[column.key]) : scope.row[column.key] }}
|
|
|
+ </template>
|
|
|
</el-table-column>
|
|
|
<el-table-column fixed="right" label="操作" width="120">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" size="small" @click="handleOpenAddDialog(scope.row)">编辑</el-button>
|
|
|
- <el-button type="text" size="small" @click="handleDelDialog(scope.row)">删除</el-button>
|
|
|
+ <el-button type="text" size="small" @click="handleOpenAddDialog(scope.row)"
|
|
|
+ v-hasPermi="['pu:authorization:edit']">编辑</el-button>
|
|
|
+ <el-button type="text" size="small" @click="handleDelDialog(scope.row)"
|
|
|
+ v-hasPermi="['pu:authorization:remove']">删除</el-button>
|
|
|
<el-button @click="handleOpenSeeDialog(scope.row)" type="text" size="small">查看</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
@@ -63,6 +74,7 @@
|
|
|
<script>
|
|
|
import authprivAdd from './authprivAdd.vue';
|
|
|
import authprivSee from './authprivSee.vue';
|
|
|
+import dealerApi from '@/api/marketing/dealer-authorization'
|
|
|
|
|
|
export default {
|
|
|
|
|
@@ -133,15 +145,15 @@ export default {
|
|
|
authorizedAreaCode: "授权区域/医院 编码",
|
|
|
authorizedAreaName: "授权区域/医院 名称",
|
|
|
authorizedProductsName: "授权产品 名称",
|
|
|
- status: "状态",
|
|
|
+ status: "0",
|
|
|
createPerson: "创建人",
|
|
|
createTime: "创建时间",
|
|
|
updatePerson: "最后修改人",
|
|
|
updateTime: "最后修改时间",
|
|
|
id: "主键id----该值不显示",
|
|
|
- startTime: "开始时间",
|
|
|
- endTime: "结束时间",
|
|
|
- issueTime: "授权书开具时间",
|
|
|
+ startTime: "2023-01-02",
|
|
|
+ endTime: "2025-01-01",
|
|
|
+ issueTime: "2023-01-02",
|
|
|
}
|
|
|
],
|
|
|
checkedList: [],
|
|
@@ -151,8 +163,9 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
- // 查询
|
|
|
+ // 查询---列表查询
|
|
|
handelSearch() {
|
|
|
+ this.loading = true;
|
|
|
console.log(this.searchParams, '查询');
|
|
|
let isTime = this.searchParams.time && this.searchParams.time != '' && this.searchParams.time.length;
|
|
|
let params = {
|
|
@@ -163,6 +176,12 @@ export default {
|
|
|
delete params['time']
|
|
|
console.log(params, 'params--------');
|
|
|
|
|
|
+ dealerApi.dealerList(params, this.page).then(res => {
|
|
|
+ console.log(res, '获取列表');
|
|
|
+ this.loading = false;
|
|
|
+ }).catch(error => {
|
|
|
+ this.loading = false;
|
|
|
+ })
|
|
|
},
|
|
|
// 重置
|
|
|
handelResetSearch() {
|
|
@@ -173,41 +192,86 @@ export default {
|
|
|
this.searchParams[key] = '';
|
|
|
}
|
|
|
},
|
|
|
+ // 判断状态
|
|
|
+ judgeStatus(status) {
|
|
|
+ // 单据状态0=自由态,1=审批中,2=已审核,3=已驳回
|
|
|
+ let statusName = '';
|
|
|
+ switch (status) {
|
|
|
+ case '0':
|
|
|
+ statusName = '自由态';
|
|
|
+ break;
|
|
|
+ case '1':
|
|
|
+ statusName = '审批中';
|
|
|
+ break;
|
|
|
+ case '2':
|
|
|
+ statusName = '已审核';
|
|
|
+ break;
|
|
|
+ case '3':
|
|
|
+ statusName = '已驳回';
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+
|
|
|
+ return statusName;
|
|
|
+ },
|
|
|
// 刷新
|
|
|
handleRefresh() {
|
|
|
|
|
|
},
|
|
|
- handleSizeChange() { },
|
|
|
- handleCurrentChange() { },
|
|
|
+ handleSizeChange(e) {
|
|
|
+ this.page.pageSize = e;
|
|
|
+ this.handelSearch();
|
|
|
+ },
|
|
|
+ handleCurrentChange(e) {
|
|
|
+ this.page.pageNum = e;
|
|
|
+ this.handelSearch();
|
|
|
+ },
|
|
|
|
|
|
// 选择列表
|
|
|
handleSelect(selection, row) {
|
|
|
console.log('selection/////////', selection, 'row/////////', row);
|
|
|
this.checkedList = [...selection];
|
|
|
},
|
|
|
- // 新增授权信息
|
|
|
+ // 新增、编辑授权信息
|
|
|
handleOpenAddDialog(rows) {
|
|
|
console.log(rows, '授权信息');
|
|
|
-
|
|
|
- const { setVisible } = this.$refs.addDialogRef;
|
|
|
-
|
|
|
+ const { setVisible, setFormData } = this.$refs.addDialogRef;
|
|
|
+ setFormData(rows);
|
|
|
setVisible(true);
|
|
|
|
|
|
},
|
|
|
- // 编辑、查看
|
|
|
+ // 查看
|
|
|
handleOpenSeeDialog(rows) {
|
|
|
console.log(rows, '编辑、查看');
|
|
|
- const { setVisible } = this.$refs.seeDialogRef;
|
|
|
-
|
|
|
+ const { setVisible, setFormData } = this.$refs.seeDialogRef;
|
|
|
+ setFormData(rows);
|
|
|
setVisible(true);
|
|
|
},
|
|
|
// 删除
|
|
|
handleDelDialog(rows) {
|
|
|
console.log(rows, '删除');
|
|
|
+
|
|
|
+ // dealerApi.dealerDelete().then(res => {
|
|
|
+ // console.log(res, '删除');
|
|
|
+ // }).catch(error => {
|
|
|
+
|
|
|
+ // })
|
|
|
},
|
|
|
// 提交
|
|
|
handleSubmit() {
|
|
|
- console.log('提交');
|
|
|
+ console.log('批量提交');
|
|
|
+ let params = {
|
|
|
+ id: '',
|
|
|
+ status: ''
|
|
|
+ }
|
|
|
+ // 编辑
|
|
|
+ // dealerApi.dealerUpdate(params).then(res => {
|
|
|
+ // console.log(res, '编辑');
|
|
|
+
|
|
|
+ // }).catch(error => {
|
|
|
+
|
|
|
+ // })
|
|
|
},
|
|
|
// 下载
|
|
|
handleDownload() {
|