Merge remote-tracking branch 'origin/dev'
This commit is contained in:
commit
ebd7674151
@ -10,3 +10,5 @@ VUE_APP_BASE_API = 'https://quanyidaojia.xinelu.cn'
|
||||
|
||||
# 路由懒加载
|
||||
VUE_CLI_BABEL_TRANSPILE_MODULES = true
|
||||
|
||||
|
||||
|
||||
51
src/api/system/certificate.js
Normal file
51
src/api/system/certificate.js
Normal file
@ -0,0 +1,51 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询健康咨询-科室人员资质证书信息列表
|
||||
export function listCertificate(query) {
|
||||
return request({
|
||||
url: '/system/certificate/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询健康咨询-科室人员信息列表
|
||||
export function listHospitalPerson(query) {
|
||||
return request({
|
||||
url: '/system/hospitalPerson/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询健康咨询-科室人员资质证书信息详细
|
||||
export function getCertificate(id) {
|
||||
return request({
|
||||
url: '/system/certificate/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增健康咨询-科室人员资质证书信息
|
||||
export function addCertificate(data) {
|
||||
return request({
|
||||
url: '/system/certificate/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改健康咨询-科室人员资质证书信息
|
||||
export function updateCertificate(data) {
|
||||
return request({
|
||||
url: '/system/certificate/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除健康咨询-科室人员资质证书信息
|
||||
export function delCertificate(id) {
|
||||
return request({
|
||||
url: '/system/certificate/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
src/api/system/coupon.js
Normal file
44
src/api/system/coupon.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询优惠券信息列表
|
||||
export function listCoupon(query) {
|
||||
return request({
|
||||
url: '/system/coupon/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询优惠券信息详细
|
||||
export function getCoupon(id) {
|
||||
return request({
|
||||
url: '/system/coupon/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增优惠券信息
|
||||
export function addCoupon(data) {
|
||||
return request({
|
||||
url: '/system/coupon/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改优惠券信息
|
||||
export function updateCoupon(data) {
|
||||
return request({
|
||||
url: '/system/coupon/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除优惠券信息
|
||||
export function delCoupon(id) {
|
||||
return request({
|
||||
url: '/system/coupon/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
51
src/api/system/groupQrCodeInfo.js
Normal file
51
src/api/system/groupQrCodeInfo.js
Normal file
@ -0,0 +1,51 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询在线客服列表
|
||||
export function listGroupQrCodeInfo(query) {
|
||||
return request({
|
||||
url: '/system/groupQrCodeInfo/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询在线客服详细
|
||||
export function getGroupQrCodeInfo(id) {
|
||||
return request({
|
||||
url: '/system/groupQrCodeInfo/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增在线客服
|
||||
export function addGroupQrCodeInfo(data) {
|
||||
return request({
|
||||
url: '/system/groupQrCodeInfo/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
export function getListByUser(query) {
|
||||
return request({
|
||||
url: '/system/station/list',
|
||||
method: 'GET',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 修改在线客服
|
||||
export function updateGroupQrCodeInfo(data) {
|
||||
return request({
|
||||
url: '/system/groupQrCodeInfo/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除在线客服
|
||||
export function delGroupQrCodeInfo(id) {
|
||||
return request({
|
||||
url: '/system/groupQrCodeInfo/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
44
src/api/system/settings.js
Normal file
44
src/api/system/settings.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询泉医到家平台系统业务设置信息列表
|
||||
export function listSettings(query) {
|
||||
return request({
|
||||
url: '/system/settings/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询泉医到家平台系统业务设置信息详细
|
||||
export function getSettings(id) {
|
||||
return request({
|
||||
url: '/system/settings/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增泉医到家平台系统业务设置信息
|
||||
export function addSettings(data) {
|
||||
return request({
|
||||
url: '/system/settings/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改泉医到家平台系统业务设置信息
|
||||
export function updateSettings(data) {
|
||||
return request({
|
||||
url: '/system/settings/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除泉医到家平台系统业务设置信息
|
||||
export function delSettings(id) {
|
||||
return request({
|
||||
url: '/system/settings/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
@ -213,6 +213,7 @@
|
||||
@click="clickinnerVisible"
|
||||
v-if="StationName == '请选择所属护理站'"
|
||||
style="
|
||||
|
||||
width: 210px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
@ -344,7 +345,47 @@
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品属性图片" align="center" width="300">
|
||||
<el-table-column label="积分兑换标识" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-select
|
||||
v-model.number="scope.row.integralExchangeFlag"
|
||||
placeholder="请选择积分兑换标识"
|
||||
clearable
|
||||
@change="changeExchangeFlag(scope.row)"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in integraloption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="使用积分数量" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
:disabled="!scope.row.integralExchangeFlag?true:false"
|
||||
v-model.number="scope.row.integralExchangeSill"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
placeholder="使用积分数量"
|
||||
maxLength="10"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="积分兑换商品数量" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-input
|
||||
:disabled="!scope.row.integralExchangeFlag?true:false"
|
||||
v-model.number="scope.row.integralExchangeCount"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
placeholder="积分兑换商品数量"
|
||||
maxLength="10"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="商品属性图片" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<stationAcatar
|
||||
@imgUrl="attributePitureUrl"
|
||||
|
||||
@ -54,15 +54,29 @@ export default {
|
||||
nursetotal: 0,
|
||||
nurseStationId: null,
|
||||
goods: [{
|
||||
value: "BUSINESS",
|
||||
label: "买卖",
|
||||
},
|
||||
{
|
||||
value: "LEASE",
|
||||
label: "租赁",
|
||||
},
|
||||
value: "BUSINESS",
|
||||
label: "买卖",
|
||||
},
|
||||
// {
|
||||
// value: "LEASE",
|
||||
// label: "租赁",
|
||||
// },
|
||||
],
|
||||
options: [{
|
||||
value: 0,
|
||||
label: "否",
|
||||
},
|
||||
{
|
||||
value: 1,
|
||||
label: "是",
|
||||
},
|
||||
],
|
||||
// goodAttributeDetailsLists:[],
|
||||
goodDetailsLists: [],
|
||||
idd: 9999999,
|
||||
ids: [],
|
||||
integraloption: [
|
||||
{
|
||||
value: 0,
|
||||
label: "否",
|
||||
},
|
||||
@ -71,10 +85,7 @@ export default {
|
||||
label: "是",
|
||||
},
|
||||
],
|
||||
// goodAttributeDetailsLists:[],
|
||||
goodDetailsLists: [],
|
||||
idd: 9999999,
|
||||
ids: [],
|
||||
value: "",
|
||||
// 查询参数
|
||||
shangjia: {
|
||||
id: null,
|
||||
@ -157,6 +168,12 @@ export default {
|
||||
// this.goodsCategoryinfo();
|
||||
},
|
||||
methods: {
|
||||
changeExchangeFlag(item) {
|
||||
if (item.integralExchangeFlag == 0) {
|
||||
item.integralExchangeCount = ''
|
||||
item.integralExchangeSill = ''
|
||||
}
|
||||
},
|
||||
imgs(item) {
|
||||
this.imgsurl.pictureUrlList.push(item);
|
||||
},
|
||||
@ -207,6 +224,9 @@ export default {
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
integralExchangeCount: null,
|
||||
integralExchangeFlag: null,
|
||||
integralExchangeSill: null,
|
||||
attributeDetailsSort: null,
|
||||
idd: this.idd,
|
||||
};
|
||||
@ -240,10 +260,10 @@ export default {
|
||||
obj.pictureUrlList.push(this.form.goodsPictureUrl);
|
||||
}
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then((res) => { });
|
||||
}
|
||||
if (this.imgsurl.pictureUrlList.length > 0) {
|
||||
updatePicture(this.imgsurl).then((res) => {});
|
||||
updatePicture(this.imgsurl).then((res) => { });
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
this.open = false;
|
||||
@ -251,13 +271,16 @@ export default {
|
||||
this.StationName = "请选择所属护理站";
|
||||
this.goodDetailsLists = [{
|
||||
attributeName: "",
|
||||
integralExchangeCount: null,
|
||||
integralExchangeFlag: null,
|
||||
integralExchangeSill: null,
|
||||
goodAttributeDetailsLists: [{
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
attributeDetailsSort: null,
|
||||
}, ],
|
||||
}, ];
|
||||
},],
|
||||
},];
|
||||
++this.isResouceShow
|
||||
},
|
||||
//页面所属护理站
|
||||
@ -323,8 +346,11 @@ export default {
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
attributeDetailsSort: null,
|
||||
integralExchangeCount: null,
|
||||
integralExchangeFlag: null,
|
||||
integralExchangeSill: null,
|
||||
idd: 9999999,
|
||||
}, ];
|
||||
},];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
@ -363,9 +389,12 @@ export default {
|
||||
attributePitureUrl: "",
|
||||
goodsPrice: "",
|
||||
goodsStock: "",
|
||||
integralExchangeCount: null,
|
||||
integralExchangeFlag: null,
|
||||
integralExchangeSill: null,
|
||||
sort: null,
|
||||
idd: 9999999,
|
||||
}, ];
|
||||
},];
|
||||
this.open = true;
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
@ -396,6 +425,19 @@ export default {
|
||||
submitForm() {
|
||||
this.form.goodAttributeDetailsLists = [];
|
||||
this.form.goodDetailsLists = this.goodDetailsLists;
|
||||
console.log(this.form.goodDetailsLists)
|
||||
|
||||
if (!this.form.goodDetailsLists.integralExchangeFlag) {
|
||||
this.form.goodDetailsLists.integralExchangeFlag = null
|
||||
}
|
||||
if (this.form.goodDetailsLists.integralExchangeSill == "") {
|
||||
this.form.goodDetailsLists.integralExchangeSill = null
|
||||
|
||||
}
|
||||
if (this.form.goodDetailsLists.integralExchangeCount == "") {
|
||||
this.form.goodDetailsLists.integralExchangeCount = null
|
||||
}
|
||||
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.goodsInfoId != null) {
|
||||
@ -414,7 +456,7 @@ export default {
|
||||
}
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then((res) => { });
|
||||
}
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
++this.isResouceShow
|
||||
@ -423,9 +465,9 @@ export default {
|
||||
});
|
||||
} else {
|
||||
this.form.goodDetailsLists.forEach(e => {
|
||||
e.goodsPrice = Number(e.goodsPrice)
|
||||
})
|
||||
// this.nurseStationId=this.form.nurseStationId
|
||||
e.goodsPrice = Number(e.goodsPrice)
|
||||
})
|
||||
// this.nurseStationId=this.form.nurseStationId
|
||||
addGoodsInfo(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.StationName = "请选择所属护理站";
|
||||
@ -440,22 +482,22 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
this.$confirm("是否确认删除订单信息的数据项?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(() => {
|
||||
delGoodsInfo(row.goodsInfoId).then((res) => {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(row.goodsPictureUrl);
|
||||
if (obj.pictureUrlList.length > 0) {
|
||||
updatePicture(obj).then((res) => {});
|
||||
updatePicture(obj).then((res) => { });
|
||||
}
|
||||
this.$message.success("删除成功");
|
||||
this.getList();
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
},
|
||||
imgUrl(imgUrl) {
|
||||
this.form.goodsPictureUrl = imgUrl;
|
||||
|
||||
651
src/views/system/certificate/index.vue
Normal file
651
src/views/system/certificate/index.vue
Normal file
@ -0,0 +1,651 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="证书名称" prop="certificateName">
|
||||
<el-input
|
||||
v-model="queryParams.certificateName"
|
||||
placeholder="请输入证书名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书编号" prop="certificateCode">
|
||||
<el-input
|
||||
v-model="queryParams.certificateCode"
|
||||
placeholder="请输入证书编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:certificate:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:certificate:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:certificate:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:certificate:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="certificateList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="证书名称" align="center" prop="certificateName" />
|
||||
<el-table-column label="证书编号" align="center" prop="certificateCode" />
|
||||
<el-table-column
|
||||
label="证书显示顺序"
|
||||
align="center"
|
||||
prop="certificateSort"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:certificate:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:certificate:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改健康咨询-科室人员资质证书信息对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="所属人员" prop="hospitalPersonId">
|
||||
<el-button
|
||||
type=""
|
||||
v-if="form.personName == '请选择所属人员'"
|
||||
@click="clickinnerVisible()"
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
color: #c0c4cc;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ form.personName }}</el-button
|
||||
>
|
||||
<el-button
|
||||
@click="clickinnerVisible()"
|
||||
type=""
|
||||
v-else
|
||||
style="
|
||||
width: 250px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
padding-left: -10px;
|
||||
overflow: hidden;
|
||||
"
|
||||
>{{ form.personName }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书名称" prop="certificateName">
|
||||
<el-input
|
||||
v-model="form.certificateName"
|
||||
style="width: 250px"
|
||||
placeholder="请输入证书名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="证书显示顺序" prop="certificateSort">
|
||||
<el-input
|
||||
v-model.number="form.certificateSort"
|
||||
style="width: 250px"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxLength="5"
|
||||
placeholder="请输入证书显示顺序"
|
||||
/>
|
||||
</el-form-item>
|
||||
<div
|
||||
v-for="(item, index) in form.certificateUrlList"
|
||||
:key="index"
|
||||
style="margin-top: 20px; border-bottom: 1px solid #f3f3f3"
|
||||
>
|
||||
<el-form-item
|
||||
label="证书图片"
|
||||
:rules="rules.certificateUrlList.certificateUrl"
|
||||
:prop="`certificateUrlList.${index}.certificateUrl`"
|
||||
>
|
||||
<stationAcatar
|
||||
@imgUrl="imgUrl"
|
||||
@item="imgclassifyItem"
|
||||
:img="item.certificateUrl"
|
||||
:item="item"
|
||||
:type="'certificateUrl'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-button
|
||||
style="margin-top: 50px;"
|
||||
type="primary"
|
||||
circle
|
||||
plain
|
||||
icon="el-icon-circle-plus-outline"
|
||||
@click="adddisease"
|
||||
v-if="index == 0"
|
||||
></el-button>
|
||||
<el-button
|
||||
style="margin-top: 50px; "
|
||||
type="danger"
|
||||
icon="el-icon-delete"
|
||||
circle
|
||||
plain
|
||||
@click="deldisease(index)"
|
||||
v-if="index != 0"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 选择人员 -->
|
||||
<el-dialog
|
||||
title="选择人员"
|
||||
:visible.sync="innerVisible"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
:before-close="innerVisiblecancel"
|
||||
>
|
||||
<el-form
|
||||
ref="queryForm"
|
||||
:model="hospitalqueryParams"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="人员编码" prop="personCode" label-width="120">
|
||||
<el-input
|
||||
v-model="hospitalqueryParams.personCode"
|
||||
placeholder="请输入人员编码"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="人员名称" prop="personName" label-width="120">
|
||||
<el-input
|
||||
v-model="hospitalqueryParams.personName"
|
||||
placeholder="请输入人员名称"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="info"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="addresetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
:data="hospitalPersonList"
|
||||
@cell-dblclick="nurseclick"
|
||||
v-loading="loading"
|
||||
>
|
||||
<el-table-column label="请选择" width="100" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
v-if="form.hospitalPersonId == scope.row.id"
|
||||
circle
|
||||
@click="nurseclick(scope.row)"
|
||||
></el-button>
|
||||
<el-button
|
||||
v-else
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="nurseclick(scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="personCode" label="人员编码" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="personName"
|
||||
label="人员名称"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
property="personPhone"
|
||||
label="人员联系电话"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="personAddress"
|
||||
label="人员地址"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column property="cardNo" label="身份证号" align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total2 > 0"
|
||||
:total="total2"
|
||||
:page.sync="hospitalqueryParams.pageNum"
|
||||
:limit.sync="hospitalqueryParams.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listCertificate,
|
||||
getCertificate,
|
||||
delCertificate,
|
||||
addCertificate,
|
||||
listHospitalPerson,
|
||||
updateCertificate,
|
||||
} from "@/api/system/certificate";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import { updatePicture } from "@/api/system/station";
|
||||
export default {
|
||||
components: { stationAcatar },
|
||||
name: "Certificate",
|
||||
data() {
|
||||
return {
|
||||
idd: 0,
|
||||
hospitalqueryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
personCode: "",
|
||||
personName: "",
|
||||
},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 健康咨询-科室人员资质证书信息表格数据
|
||||
certificateList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
deletNewImgs:[],
|
||||
objitem:[],
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
innerVisible: false,
|
||||
hospitalPersonList: [],
|
||||
total2: 0,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
hospitalPersonId: null,
|
||||
certificateName: null,
|
||||
certificateCode: null,
|
||||
certificateUrl: null,
|
||||
certificateSort: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
certificateUrlList: {
|
||||
certificateUrl: [
|
||||
{
|
||||
required: true,
|
||||
message: "请上传图片",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
certificateSort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入顺序",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
certificateName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入证书名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
hospitalPersonId: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择所属人员",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//删除deldisease
|
||||
deldisease(index) {
|
||||
this.form.certificateUrlList.splice(index, 1);
|
||||
},
|
||||
adddisease() {
|
||||
this.idd++;
|
||||
var obj = {
|
||||
certificateUrl: "",
|
||||
idd: this.idd
|
||||
};
|
||||
if (this.form.certificateUrlList.length == 5) {
|
||||
this.$message.error("最多只能5条");
|
||||
} else {
|
||||
this.form.certificateUrlList.push(obj);
|
||||
}
|
||||
},
|
||||
//接收图片所属的item
|
||||
imgclassifyItem(item) {
|
||||
let imgUrlData = JSON.parse(item);
|
||||
// 存贮新上传的图片数组
|
||||
this.deletNewImgs.push(imgUrlData.certificateUrl);
|
||||
this.objitem.push(imgUrlData.certificateUrl);
|
||||
console.log(item,'接受图片item')
|
||||
let items = JSON.parse(item);
|
||||
if (items.idd && !items.id) {
|
||||
this.form.certificateUrlList.forEach(e => {
|
||||
if (e.idd == items.idd) {
|
||||
e.certificateUrl = items.certificateUrl;
|
||||
}
|
||||
});
|
||||
} else if (!items.idd && items.id) {
|
||||
this.form.certificateUrl = items.certificateUrl;
|
||||
}
|
||||
},
|
||||
imgUrl(imgUrl) {
|
||||
console.log(imgUrl)
|
||||
|
||||
},
|
||||
innerVisiblecancel() {
|
||||
this.innerVisible = false;
|
||||
},
|
||||
nurseclick(row) {
|
||||
console.log(row);
|
||||
this.form.personName = row.personName;
|
||||
this.form.hospitalPersonId = row.id;
|
||||
this.innerVisible = false;
|
||||
},
|
||||
/** 查询健康咨询-科室人员信息列表 */
|
||||
info() {
|
||||
this.loading = true;
|
||||
listHospitalPerson(this.hospitalqueryParams).then((response) => {
|
||||
this.hospitalPersonList = response.rows;
|
||||
this.total2 = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 重置
|
||||
addresetQuery() {
|
||||
this.hospitalqueryParams = {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
personCode: "",
|
||||
personName: "",
|
||||
};
|
||||
this.info();
|
||||
},
|
||||
clickinnerVisible() {
|
||||
this.info();
|
||||
this.innerVisible = true;
|
||||
},
|
||||
/** 查询健康咨询-科室人员资质证书信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCertificate(this.queryParams).then((response) => {
|
||||
this.certificateList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.form.certificateUrlList) {
|
||||
this.form.certificateUrlList.forEach((e) => {
|
||||
obj.pictureUrlList.push(e.certificateUrl);
|
||||
});
|
||||
}
|
||||
console.log("2222",this.deletNewImgs)
|
||||
updatePicture({ pictureUrlList: this.deletNewImgs }).then(res => {
|
||||
this.open = false;
|
||||
});
|
||||
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
certificateUrlList: [
|
||||
{
|
||||
certificateUrl: null,
|
||||
},
|
||||
],
|
||||
id: null,
|
||||
hospitalPersonId: null,
|
||||
certificateName: null,
|
||||
certificateCode: null,
|
||||
certificateUrl: null,
|
||||
certificateSort: null,
|
||||
createBy: null,
|
||||
personName: "请选择所属人员",
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.deletNewImgs=[];
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.form = {
|
||||
certificateUrlList: [
|
||||
{
|
||||
certificateUrl:"",
|
||||
idd: this.idd
|
||||
}
|
||||
]
|
||||
};
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加健康咨询-科室人员资质证书信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
console.log(row)
|
||||
this.open = true;
|
||||
const hospitalPersonId = row.hospitalPersonId || this.hospitalPersonIds;
|
||||
getCertificate(hospitalPersonId).then((response) => {
|
||||
console.log(response,'打印返回的值')
|
||||
this.form = response.data;
|
||||
|
||||
this.title = "修改健康咨询-科室人员资质证书信息";
|
||||
});
|
||||
this.reset();
|
||||
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateCertificate(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCertificate(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row)
|
||||
const hospitalPersonIds = row.hospitalPersonId || this.hospitalPersonIds;
|
||||
this.$modal
|
||||
.confirm(
|
||||
'是否确认删除人员id为"' +
|
||||
hospitalPersonIds +
|
||||
'"的数据项?'
|
||||
)
|
||||
.then(function () {
|
||||
return delCertificate(hospitalPersonIds);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/certificate/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`certificate_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
637
src/views/system/coupon/index.vue
Normal file
637
src/views/system/coupon/index.vue
Normal file
@ -0,0 +1,637 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="优惠券名称" prop="couponTitle">
|
||||
<el-input
|
||||
v-model="queryParams.couponTitle"
|
||||
placeholder="请输入优惠券名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠券编码" prop="couponCode">
|
||||
<el-input
|
||||
v-model="queryParams.couponCode"
|
||||
placeholder="请输入优惠券编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:coupon:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:coupon:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:coupon:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:coupon:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>-->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="couponList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||
<el-table-column
|
||||
label="优惠券名称"
|
||||
align="center"
|
||||
prop="couponTitle"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="优惠券编码" align="center" prop="couponCode" />
|
||||
<el-table-column label="优惠券类型" align="center" prop="couponType">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.couponType == "FULL_REDUCTION_COUPON" ? "满减券" : "" }}
|
||||
{{ scope.row.couponType == "CASH_COUPON" ? "代金券" : "" }}
|
||||
{{ scope.row.couponType == "EXCHANGE_COUPON" ? "兑换券" : "" }}
|
||||
{{ scope.row.couponType == "DISCOUNT_COUPON" ? "抵扣券" : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column
|
||||
label="优惠券有效期(天)"
|
||||
align="center"
|
||||
prop="couponReductionDays"
|
||||
/>
|
||||
<el-table-column label="优惠券面额" align="center" prop="couponPrice" />
|
||||
<el-table-column
|
||||
label="优惠券适用门槛"
|
||||
align="center"
|
||||
prop="couponConsumePrice"
|
||||
/>
|
||||
<el-table-column label="领取方式" align="center" prop="receiveType">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.receiveType == "NEW_PEOPLE_WELFARE" ? "新人福利" : "" }}
|
||||
{{ scope.row.receiveType == "EVENT_GIFT" ? "活动赠送" : "" }}
|
||||
{{ scope.row.receiveType == "CONSUME_REBATE" ? "消费返券" : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column label="发放数量" align="center" prop="receiveCount" />
|
||||
<el-table-column label="发放数量上限" align="center" prop="receiveLimitCount" />-->
|
||||
<!-- <el-table-column label="全部商品" align="center" prop="useScope">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.useScope == "ALL_PRODUCT" ? "全部商品" : ""
|
||||
}}
|
||||
{{ scope.row.useScope == "SPECIFIED_COMMODITY" ? "指定商品" : "" }}
|
||||
|
||||
</template>
|
||||
</el-table-column>-->
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
<el-table-column label="创建人" align="center" prop="createBy" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:coupon:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:coupon:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改优惠券信息对话框 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="800px"
|
||||
append-to-body
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="130px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="优惠券名称" prop="couponTitle">
|
||||
<el-input
|
||||
v-model="form.couponTitle"
|
||||
maxlength="100"
|
||||
placeholder="请输入优惠券名称"
|
||||
style="width: 220px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="优惠券有效期(天)" prop="couponReductionDays">
|
||||
<el-input
|
||||
maxlength="5"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
v-model.number="form.couponReductionDays"
|
||||
placeholder="请输入优惠券有效期,单位:天"
|
||||
style="width: 220px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠券面额" prop="couponPrice">
|
||||
<el-input
|
||||
@keyup.native="form.couponPrice = oninput(form.couponPrice)"
|
||||
v-model="form.couponPrice"
|
||||
|
||||
maxlength="8"
|
||||
placeholder="请输入优惠券面额,单位:元"
|
||||
style="width: 220px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠券适用门槛" prop="couponConsumePrice">
|
||||
<el-input
|
||||
:change="checkPrice()"
|
||||
|
||||
maxlength="8"
|
||||
v-model="form.couponConsumePrice"
|
||||
placeholder="请输入优惠券适用门槛"
|
||||
style="width: 220px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="领取方式" prop="receiveType">
|
||||
<el-select
|
||||
style="width: 220px"
|
||||
clearable
|
||||
v-model="form.receiveType"
|
||||
placeholder="请选择领取方式"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in option"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠券类型" prop="couponType">
|
||||
<el-select
|
||||
style="width: 220px"
|
||||
clearable
|
||||
v-model="form.couponType"
|
||||
placeholder="请选择优惠券类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in couponTypeoption"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="显示顺序" prop="showSort">
|
||||
<el-input
|
||||
v-model.number="form.showSort"
|
||||
placeholder="请输入显示顺序"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxlength="5"
|
||||
style="width: 220px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠券概述" prop="couponDescription">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
maxlength="300"
|
||||
style="width: 540px"
|
||||
v-model="form.couponDescription"
|
||||
placeholder="请输入优惠券概述,包括使用范围,使用注意事项等信息"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listCoupon,
|
||||
getCoupon,
|
||||
delCoupon,
|
||||
addCoupon,
|
||||
updateCoupon,
|
||||
} from "@/api/system/coupon";
|
||||
|
||||
export default {
|
||||
name: "Coupon",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 优惠券信息表格数据
|
||||
couponList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
couponTypeoption: [
|
||||
{
|
||||
value: "FULL_REDUCTION_COUPON",
|
||||
label: "满减券",
|
||||
},
|
||||
// {
|
||||
// value: "CASH_COUPON",
|
||||
// label: "代金券",
|
||||
// },
|
||||
// {
|
||||
// value: "EXCHANGE_COUPON",
|
||||
// label: "兑换券",
|
||||
// },
|
||||
// {
|
||||
// value: "DISCOUNT_COUPON",
|
||||
// label: "抵扣券",
|
||||
// },
|
||||
],
|
||||
// options: [
|
||||
// {
|
||||
// value: "ALL_PRODUCT",
|
||||
// label: "全部商品",
|
||||
// },
|
||||
// {
|
||||
// value: "SPECIFIED_COMMODITY",
|
||||
// label: "指定商品",
|
||||
// },
|
||||
// ],
|
||||
option: [
|
||||
{
|
||||
value: "NEW_PEOPLE_WELFARE",
|
||||
label: "新人福利",
|
||||
},
|
||||
// {
|
||||
// value: "EVENT_GIFT",
|
||||
// label: "活动赠送",
|
||||
// },
|
||||
// {
|
||||
// value: "CONSUME_REBATE",
|
||||
// label: "消费返券",
|
||||
// },
|
||||
],
|
||||
value: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
couponTitle: null,
|
||||
couponCode: null,
|
||||
couponType: null,
|
||||
couponReductionDays: null,
|
||||
couponPrice: null,
|
||||
couponConsumePrice: null,
|
||||
couponDescription: null,
|
||||
receiveType: null,
|
||||
receiveCount: null,
|
||||
receiveLimitCount: null,
|
||||
useScope: null,
|
||||
showSort: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
couponTitle: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入优惠券名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
couponType: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择优惠券类型",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
couponReductionDays: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入优惠券有效期",
|
||||
trigger: "blur",
|
||||
|
||||
},
|
||||
],
|
||||
couponPrice: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入优惠券面额",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
couponConsumePrice: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入优惠券适用门槛",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
couponDescription: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入优惠券概述",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
receiveType: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择领取方式",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
// useScope: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: "请输入优惠券适用门槛",
|
||||
// trigger: "blur"
|
||||
// }
|
||||
// ],
|
||||
showSort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入显示顺序",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/**只能输入数字且有小数点最多保留两位*/
|
||||
checkPrice() {
|
||||
let checkPlan = "" + this.form.couponConsumePrice;
|
||||
checkPlan = checkPlan
|
||||
.replace(/[^\d.]/g, "") // 清除“数字”和“.”以外的字符
|
||||
.replace(/\.{2,}/g, ".") // 只保留第一个. 清除多余的
|
||||
.replace(/^\./g, "") // 保证第一个为数字而不是.
|
||||
.replace(".", "$#$")
|
||||
.replace(/\./g, "")
|
||||
.replace("$#$", ".");
|
||||
if (checkPlan.indexOf(".") < 0 && checkPlan !== "") {
|
||||
// 以上已经过滤,此处控制的是如果没有小数点,首位不能为类似于 01、02的金额
|
||||
checkPlan = parseFloat(checkPlan) + "";
|
||||
} else if (checkPlan.indexOf(".") >= 0) {
|
||||
checkPlan = checkPlan.replace(/^()*(\d+)\.(\d\d).*$/, "$1$2.$3"); // 只能输入两个小数
|
||||
}
|
||||
this.form.couponConsumePrice = checkPlan;
|
||||
},
|
||||
|
||||
oninput(num) {
|
||||
let str = num;
|
||||
const len1 = str.substr(0, 1);
|
||||
const len2 = str.substr(1, 1);
|
||||
//如果第一位是0,第二位不是点,就用数字把点替换掉
|
||||
if (str.length > 1 && len1 == 0 && len2 != ".") {
|
||||
str = str.substr(1, 1);
|
||||
}
|
||||
//第一位不能是.
|
||||
if (len1 == ".") {
|
||||
str = "";
|
||||
}
|
||||
//限制只能输入一个小数点
|
||||
if (str.indexOf(".") != -1) {
|
||||
const str_ = str.substr(str.indexOf(".") + 1);
|
||||
if (str_.indexOf(".") != -1) {
|
||||
str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1);
|
||||
}
|
||||
}
|
||||
//正则替换
|
||||
str = str.replace(/[^\d^.\\ .]+/g, ""); // 保留数字和小数点
|
||||
str = str.replace(".", "$#$").replace(/\./g, "").replace("$#$", "."); // 小数点后只能输两位
|
||||
str = str.replace(/^(-)*(\d+)\.(\d\d).*$/, "$1$2.$3");
|
||||
return str;
|
||||
},
|
||||
|
||||
/** 查询优惠券信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCoupon(this.queryParams).then((response) => {
|
||||
this.couponList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
changeInput(e) {
|
||||
if (e.target.value.indexOf(".") >= 0) {
|
||||
e.target.value = e.target.value.substring(
|
||||
0,
|
||||
e.target.value.indexOf(".") + 3
|
||||
);
|
||||
}
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
couponTitle: null,
|
||||
couponCode: null,
|
||||
couponType: null,
|
||||
couponReductionDays: null,
|
||||
couponPrice: null,
|
||||
couponConsumePrice: null,
|
||||
couponDescription: null,
|
||||
receiveType: null,
|
||||
receiveCount: null,
|
||||
receiveLimitCount: null,
|
||||
useScope: null,
|
||||
showSort: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加优惠券信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getCoupon(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改优惠券信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
if (this.form.couponPrice) {
|
||||
this.form.couponPrice = Number(this.form.couponPrice);
|
||||
}
|
||||
if (this.form.couponConsumePrice) {
|
||||
this.form.couponConsumePrice = Number(this.form.couponConsumePrice);
|
||||
}
|
||||
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateCoupon(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCoupon(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const couponTitles = row.couponTitle || this.couponTitles;
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm('是否确认删除优惠券名称为"' + couponTitles + '"的数据项?')
|
||||
.then(function () {
|
||||
return delCoupon(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/coupon/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`coupon_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -9,9 +9,11 @@
|
||||
label-width="90px"
|
||||
>
|
||||
<el-form-item label="所属护理站" prop="nurseStationName">
|
||||
<el-button type="" class="stationbtn" @click="ParamsStation(true)">{{
|
||||
queryParams.nurseStationName
|
||||
}}</el-button>
|
||||
<el-button
|
||||
type
|
||||
class="stationbtn"
|
||||
@click="ParamsStation(true)"
|
||||
>{{queryParams.nurseStationName}}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单编号" prop="orderNo">
|
||||
<el-input
|
||||
@ -23,17 +25,13 @@
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select
|
||||
v-model="queryParams.orderStatus"
|
||||
placeholder="请选择订单状态"
|
||||
>
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态">
|
||||
<el-option
|
||||
v-for="item in orderStatuslist"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
@ -45,96 +43,41 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="goodsOrderList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column
|
||||
label="所属护理站"
|
||||
align="center"
|
||||
prop="nurseStationName"
|
||||
/>
|
||||
<el-table-column
|
||||
label="订单编号"
|
||||
align="center"
|
||||
prop="orderNo"
|
||||
width="190"
|
||||
/>
|
||||
<el-table v-loading="loading" :data="goodsOrderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" align="center" />
|
||||
<el-table-column label="所属护理站" align="center" prop="nurseStationName" />
|
||||
<el-table-column label="订单编号" align="center" prop="orderNo" width="190" />
|
||||
<el-table-column label="商品名称" align="center" prop="goodsName" />
|
||||
|
||||
<el-table-column label="订单总金额" align="center" prop="totalPrice" />
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus">
|
||||
<el-table-column label="订单状态" align="center" width="95" prop="orderStatus">
|
||||
<template slot-scope="scope">
|
||||
<!-- {{ orderStatus(scope.row.orderStatus) }} -->
|
||||
<el-button v-if="scope.row.orderStatus == 'WAIT_PAY'"
|
||||
>待付款</el-button
|
||||
>
|
||||
<el-button type="primary" v-if="scope.row.orderStatus == 'PAY'"
|
||||
>待发货</el-button
|
||||
>
|
||||
<el-button type="danger" v-if="scope.row.orderStatus == 'CANCEL'"
|
||||
>已取消</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="scope.row.orderStatus == 'WAIT_RECEIVED_GOODS'"
|
||||
>待收货</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
v-if="scope.row.orderStatus == 'RECEIVED_GOODS'"
|
||||
>待评价</el-button
|
||||
>
|
||||
<el-button type="success" v-if="scope.row.orderStatus == 'EVALUATED'"
|
||||
>交易完成</el-button
|
||||
>
|
||||
<el-button
|
||||
type="warning"
|
||||
v-if="scope.row.orderStatus == 'WAIT_REFUND'"
|
||||
>退款中</el-button
|
||||
>
|
||||
<el-button
|
||||
type="warning"
|
||||
v-if="scope.row.orderStatus == 'WAIT_RETURNED_GOODS'"
|
||||
>待退货</el-button
|
||||
>
|
||||
<el-button type="danger" v-if="scope.row.orderStatus == 'REFUNDED'"
|
||||
>退款成功</el-button
|
||||
>
|
||||
<el-button
|
||||
type="danger"
|
||||
v-if="scope.row.orderStatus == 'RETURNED_GOODS'"
|
||||
>已退货</el-button
|
||||
>
|
||||
<el-button v-if="scope.row.orderStatus == 'WAIT_PAY'">待付款</el-button>
|
||||
<el-button type="primary" v-if="scope.row.orderStatus == 'PAY'">待发货</el-button>
|
||||
<el-button type="danger" v-if="scope.row.orderStatus == 'CANCEL'">已取消</el-button>
|
||||
<el-button type="primary" v-if="scope.row.orderStatus == 'WAIT_RECEIVED_GOODS'">待收货</el-button>
|
||||
<el-button type="primary" v-if="scope.row.orderStatus == 'RECEIVED_GOODS'">待评价</el-button>
|
||||
<el-button type="success" v-if="scope.row.orderStatus == 'EVALUATED'">交易完成</el-button>
|
||||
<el-button type="warning" v-if="scope.row.orderStatus == 'WAIT_REFUND'">退款中</el-button>
|
||||
<el-button type="warning" v-if="scope.row.orderStatus == 'WAIT_RETURNED_GOODS'">待退货</el-button>
|
||||
<el-button type="danger" v-if="scope.row.orderStatus == 'REFUNDED'">已退款</el-button>
|
||||
<el-button type="danger" v-if="scope.row.orderStatus == 'RETURNED_GOODS'">已退货</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="下单时间"
|
||||
align="center"
|
||||
prop="orderTime"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column
|
||||
label="联系电话"
|
||||
align="center"
|
||||
prop="phone"
|
||||
width="180"
|
||||
/>
|
||||
<el-table-column label="订单类型" align="center" prop="orderType">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.orderType == "INTEGRAL_EXCHANGE" ? "积分兑换" : "" }}
|
||||
{{ scope.row.orderType == "DIRECT_BUY" ? "直接购买" : "" }}
|
||||
{{ scope.row.orderType == "HEALTH_CONSULTATION" ? "健康咨询" : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="下单时间" align="center" prop="orderTime" width="180" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" width="180" />
|
||||
<el-table-column label="下单方式" align="center" prop="orderChannel">
|
||||
<template slot-scope="scope">
|
||||
{{ scope.row.orderChannel == "MOBILE_APP" ? "手机APP" : "" }}
|
||||
@ -155,8 +98,7 @@
|
||||
icon="el-icon-edit"
|
||||
@click="seelogistics(scope.row)"
|
||||
v-hasPermi="['system:goodsOrder:editExpressNo']"
|
||||
>修改物流单号</el-button
|
||||
>
|
||||
>修改物流单号</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
scope.row.orderStatus == 'WAIT_RECEIVED_GOODS' &&
|
||||
@ -167,8 +109,7 @@
|
||||
icon="el-icon-edit"
|
||||
@click="seelogistics(scope.row)"
|
||||
v-hasPermi="['system:goodsOrder:editExpressNo']"
|
||||
>录入物流单号</el-button
|
||||
>
|
||||
>录入物流单号</el-button>
|
||||
<el-button
|
||||
v-if="
|
||||
scope.row.orderStatus == 'WAIT_RECEIVED_GOODS' &&
|
||||
@ -179,15 +120,10 @@
|
||||
icon="el-icon-edit"
|
||||
@click="seelogistics(scope.row)"
|
||||
v-hasPermi="['system:goodsOrder:editExpressNo']"
|
||||
>录入物流单号</el-button
|
||||
>
|
||||
>录入物流单号</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
@ -195,8 +131,7 @@
|
||||
icon="el-icon-edit"
|
||||
@click="seeOrder(scope.row)"
|
||||
v-hasPermi="['system:goodsOrder:goodsOrderByOrder']"
|
||||
>订单详情</el-button
|
||||
>
|
||||
>订单详情</el-button>
|
||||
|
||||
<el-button
|
||||
v-if="scope.row.orderStatus == 'WAIT_REFUND'"
|
||||
@ -205,8 +140,7 @@
|
||||
icon="el-icon-edit"
|
||||
@click="refund(scope.row.id)"
|
||||
v-hasPermi="['system:goodsOrder:goodsOrderRefund']"
|
||||
>确认退款</el-button
|
||||
>
|
||||
>确认退款</el-button>
|
||||
<!-- <el-button
|
||||
v-else
|
||||
size="mini"
|
||||
@ -215,7 +149,7 @@
|
||||
disabled
|
||||
v-hasPermi="['system:goodsOrder:goodsOrderRefund']"
|
||||
>确认退款</el-button
|
||||
> -->
|
||||
>-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -227,54 +161,67 @@
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 查看商品订单弹框 -->
|
||||
<el-dialog
|
||||
title="订单详情"
|
||||
:visible.sync="innerorder"
|
||||
append-to-body
|
||||
width="1200px"
|
||||
>
|
||||
<el-form
|
||||
:inline="true"
|
||||
ref="orderList"
|
||||
:model="orderList"
|
||||
:rules="rules"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-dialog title="订单详情" :visible.sync="innerorder" append-to-body width="1200px">
|
||||
<el-form :inline="true" ref="orderList" :model="orderList" :rules="rules" label-width="120px">
|
||||
<el-form-item label="订单编号" prop="orderNo">
|
||||
<el-input v-model="orderList.orderNo" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="orderList.goodsName"
|
||||
disabled
|
||||
style="width: 240px"
|
||||
/>
|
||||
<el-input v-model="orderList.goodsName" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单金额" prop="totalPrice">
|
||||
<el-input
|
||||
v-model="orderList.totalPrice"
|
||||
<el-form-item label="订单类型" prop="orderType">
|
||||
<el-select
|
||||
v-model="orderList.orderType"
|
||||
placeholder="请选择订单类型"
|
||||
disabled
|
||||
style="width: 240px"
|
||||
/>
|
||||
>
|
||||
<el-option
|
||||
v-for="item in orderTypelist"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="兑换商品数量"
|
||||
prop="integralExchangeCount"
|
||||
v-if="orderList.orderType=='INTEGRAL_EXCHANGE'"
|
||||
>
|
||||
<el-input v-model="orderList.integralExchangeCount" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="兑换积分数"
|
||||
prop="integralExchangeSill"
|
||||
v-if="orderList.orderType=='INTEGRAL_EXCHANGE'"
|
||||
>
|
||||
<el-input v-model="orderList.integralExchangeSill" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品数量" prop="goodsCount" v-if="orderList.orderType=='DIRECT_BUY'">
|
||||
<el-input v-model="orderList.goodsCount" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单原始总金额" prop="originalTotalPrice">
|
||||
<el-input v-model="orderList.originalTotalPrice" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠券名称" prop="couponTitle">
|
||||
<el-input v-model="orderList.couponTitle" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="优惠金额" prop="discountPrice">
|
||||
<el-input v-model="orderList.discountPrice" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单应付总金额" prop="totalPrice">
|
||||
<el-input v-model="orderList.totalPrice" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收货人" prop="receiveAddress">
|
||||
<el-input
|
||||
v-model="orderList.receiver"
|
||||
disabled
|
||||
style="width: 240px"
|
||||
/>
|
||||
<el-input v-model="orderList.receiver" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收货地址" prop="receiveAddress">
|
||||
<el-input
|
||||
v-model="orderList.receiveAddress"
|
||||
disabled
|
||||
style="width: 240px"
|
||||
/>
|
||||
<el-input v-model="orderList.receiveAddress" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input v-model="orderList.phone" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
|
||||
<!-- <el-form-item label="商品属性" prop="goodsAttributeName">
|
||||
<el-input
|
||||
v-model="orderList.goodsAttributeName"
|
||||
@ -283,7 +230,7 @@
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="商品价格" prop="goodsPrice">
|
||||
<el-input
|
||||
v-model="orderList.goodsPrice"
|
||||
@ -292,7 +239,7 @@
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
</el-form-item>-->
|
||||
<!-- <el-form-item label="地址" prop="receiveAddress">
|
||||
<el-input
|
||||
v-model="orderList.receiveAddress"
|
||||
@ -301,14 +248,9 @@
|
||||
:disabled="true"
|
||||
style="width: 240px"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
|
||||
</el-form-item>-->
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-input
|
||||
:value="orderStatusinfo(orderList.orderStatus)"
|
||||
disabled
|
||||
style="width: 240px"
|
||||
/>
|
||||
<el-input :value="orderStatusinfo(orderList.orderStatus)" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下单方式" prop="buySource">
|
||||
<el-input
|
||||
@ -318,11 +260,7 @@
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="购买来源" prop="orderChannel">
|
||||
<el-input
|
||||
:value="buySourceinfo(orderList.buySource)"
|
||||
disabled
|
||||
style="width: 240px"
|
||||
/>
|
||||
<el-input :value="buySourceinfo(orderList.buySource)" disabled style="width: 240px" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="综合评分" v-if="orderList.compositeScore">
|
||||
@ -335,15 +273,8 @@
|
||||
show-score
|
||||
text-color="#ff9900"
|
||||
score-template="{value}"
|
||||
>
|
||||
</el-rate>
|
||||
<el-input
|
||||
v-else
|
||||
type="text"
|
||||
disabled
|
||||
style="width: 240px"
|
||||
placeholder="未评分"
|
||||
></el-input>
|
||||
></el-rate>
|
||||
<el-input v-else type="text" disabled style="width: 240px" placeholder="未评分"></el-input>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="评价内容" v-if="orderList.evaluateContent">
|
||||
@ -366,7 +297,7 @@
|
||||
style="width: 23%; height: 100%; margin: 1%"
|
||||
v-for="(item, index) in ratelist"
|
||||
:src="baseurl + item.evaluatePictureUrl"
|
||||
alt=""
|
||||
alt
|
||||
:key="index"
|
||||
/>
|
||||
</div>
|
||||
@ -420,16 +351,11 @@
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table> -->
|
||||
</el-table>-->
|
||||
</el-form>
|
||||
</el-dialog>
|
||||
<!-- 查看物流信息弹框 -->
|
||||
<el-dialog
|
||||
title="录入物流单号"
|
||||
:visible.sync="innerlogistics"
|
||||
append-to-body
|
||||
width="500px"
|
||||
>
|
||||
<el-dialog title="录入物流单号" :visible.sync="innerlogistics" append-to-body width="500px">
|
||||
<el-form
|
||||
:model="queryexpressNo"
|
||||
ref="queryForm"
|
||||
@ -442,7 +368,7 @@
|
||||
<el-input
|
||||
style="width: 230px"
|
||||
v-model="queryexpressNo.receiver"
|
||||
placeholder=""
|
||||
placeholder
|
||||
clearable
|
||||
disabled
|
||||
/>
|
||||
@ -451,7 +377,7 @@
|
||||
<el-input
|
||||
style="width: 230px"
|
||||
v-model="queryexpressNo.phone"
|
||||
placeholder=""
|
||||
placeholder
|
||||
clearable
|
||||
disabled
|
||||
/>
|
||||
@ -462,7 +388,7 @@
|
||||
style="width: 230px"
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
placeholder=""
|
||||
placeholder
|
||||
disabled
|
||||
clearable
|
||||
/>
|
||||
@ -482,12 +408,7 @@
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 退款弹框 -->
|
||||
<el-dialog
|
||||
title="退款信息"
|
||||
:visible.sync="innerrefund"
|
||||
append-to-body
|
||||
width="700px"
|
||||
>
|
||||
<el-dialog title="退款信息" :visible.sync="innerrefund" append-to-body width="700px">
|
||||
<el-form
|
||||
:model="refundlist"
|
||||
ref="queryForm"
|
||||
@ -497,48 +418,46 @@
|
||||
label-width="110px"
|
||||
>
|
||||
<el-form-item label="商品名称" prop="goodsName">
|
||||
<el-input
|
||||
v-model="refundlist.goodsName"
|
||||
placeholder=""
|
||||
clearable
|
||||
disabled
|
||||
/>
|
||||
<el-input v-model="refundlist.goodsName" placeholder clearable disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="退款类型" prop="refundType">
|
||||
<el-input
|
||||
:value="refundTypeStatus(refundlist.refundType)"
|
||||
disabled
|
||||
style="width: 205px"
|
||||
/>
|
||||
<el-input :value="refundTypeStatus(refundlist.refundType)" disabled style="width: 205px" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单类型" prop="orderType">
|
||||
<el-select v-model="refundlist.orderType" placeholder="请选择订单类型" disabled>
|
||||
<el-option
|
||||
v-for="item in orderTypelist"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="退款原因" prop="dictLabel">
|
||||
<el-input
|
||||
v-model="refundlist.dictLabel"
|
||||
placeholder=""
|
||||
clearable
|
||||
disabled
|
||||
/>
|
||||
<el-input v-model="refundlist.dictLabel" placeholder clearable disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="退款金额" prop="godTotalPrice">
|
||||
<el-input
|
||||
v-model="refundlist.godTotalPrice"
|
||||
placeholder=""
|
||||
clearable
|
||||
disabled
|
||||
/>
|
||||
<el-input v-model="refundlist.godTotalPrice" placeholder clearable disabled />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="退款积分"
|
||||
prop="godTotalPrice"
|
||||
v-if="refundlist.orderType =='INTEGRAL_EXCHANGE'"
|
||||
>
|
||||
<el-input v-model="refundlist.integralExchangeSill" placeholder clearable disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="补充描述和凭证" prop="refundReasonRemark">
|
||||
<el-input
|
||||
style="width: 300px"
|
||||
v-model="refundlist.refundReasonRemark"
|
||||
placeholder=""
|
||||
placeholder
|
||||
clearable
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
disabled
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item> </el-form-item>
|
||||
<el-form-item></el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="refundcancel">取 消</el-button>
|
||||
@ -553,42 +472,19 @@
|
||||
append-to-body
|
||||
:before-close="clicknurseStationshow"
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="getListByUserquery"
|
||||
label-width="110px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form ref="form" :model="getListByUserquery" label-width="110px" :inline="true">
|
||||
<el-form-item label="护理站编码" prop="nurseStationCode">
|
||||
<el-input
|
||||
v-model="getListByUserquery.nurseStationCode"
|
||||
placeholder="请输入护理站编码"
|
||||
/>
|
||||
<el-input v-model="getListByUserquery.nurseStationCode" placeholder="请输入护理站编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input
|
||||
v-model="getListByUserquery.nurseStationName"
|
||||
placeholder="请输入护理站名称"
|
||||
/>
|
||||
<el-input v-model="getListByUserquery.nurseStationName" placeholder="请输入护理站名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="info"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="stationcancel"
|
||||
>重置</el-button
|
||||
>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="info">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="stationcancel">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="nurseStationlist"
|
||||
@cell-dblclick="choicestationid"
|
||||
>
|
||||
<el-table v-loading="loading" :data="nurseStationlist" @cell-dblclick="choicestationid">
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
@ -604,31 +500,18 @@
|
||||
circle
|
||||
v-else
|
||||
@click="choicestationid(scope.row)"
|
||||
>
|
||||
</el-button>
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="nurseStationCode"
|
||||
label="护理站编码"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
property="nurseStationName"
|
||||
label="护理站名称"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column property="phone" label="联系电话" align="center">
|
||||
</el-table-column>
|
||||
<el-table-column property="nurseStationCode" label="护理站编码" align="center"></el-table-column>
|
||||
<el-table-column property="nurseStationName" label="护理站名称" align="center"></el-table-column>
|
||||
<el-table-column property="phone" label="联系电话" align="center"></el-table-column>
|
||||
<el-table-column
|
||||
property="address"
|
||||
label="护理站地址"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
</el-table-column>
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
@ -690,7 +573,7 @@
|
||||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog> -->
|
||||
</el-dialog>-->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
|
||||
@ -25,47 +25,60 @@ export default {
|
||||
innerrefund: false,
|
||||
orderList: [],
|
||||
refundlist: [],
|
||||
orderTypelist: [
|
||||
{
|
||||
value: "INTEGRAL_EXCHANGE",
|
||||
label: "积分兑换",
|
||||
},
|
||||
{
|
||||
value: "DIRECT_BUY",
|
||||
label: "直接购买",
|
||||
}, {
|
||||
value: "HEALTH_CONSULTATION",
|
||||
label: "健康咨询",
|
||||
}
|
||||
],
|
||||
ratelist: {}, //评分list
|
||||
orderStatuslist: [{
|
||||
value: "WAIT_PAY",
|
||||
label: "待付款",
|
||||
},
|
||||
{
|
||||
value: "PAY",
|
||||
label: "待发货",
|
||||
},
|
||||
{
|
||||
value: "WAIT_RECEIVED_GOODS",
|
||||
label: "待收货",
|
||||
},
|
||||
{
|
||||
value: "RECEIVED_GOODS",
|
||||
label: "待评价",
|
||||
},
|
||||
{
|
||||
value: "EVALUATED",
|
||||
label: "交易完成",
|
||||
},
|
||||
{
|
||||
value: "CANCEL",
|
||||
label: "已取消",
|
||||
},
|
||||
{
|
||||
value: "WAIT_RETURNED_GOODS",
|
||||
label: "待退货",
|
||||
},
|
||||
{
|
||||
value: "RETURNED_GOODS",
|
||||
label: "已退货",
|
||||
},
|
||||
{
|
||||
value: "WAIT_REFUND",
|
||||
label: "退款中",
|
||||
},
|
||||
{
|
||||
value: "REFUNDED",
|
||||
label: "退款成功",
|
||||
},
|
||||
value: "WAIT_PAY",
|
||||
label: "待付款",
|
||||
},
|
||||
{
|
||||
value: "PAY",
|
||||
label: "待发货",
|
||||
},
|
||||
{
|
||||
value: "WAIT_RECEIVED_GOODS",
|
||||
label: "待收货",
|
||||
},
|
||||
{
|
||||
value: "RECEIVED_GOODS",
|
||||
label: "待评价",
|
||||
},
|
||||
{
|
||||
value: "EVALUATED",
|
||||
label: "交易完成",
|
||||
},
|
||||
{
|
||||
value: "CANCEL",
|
||||
label: "已取消",
|
||||
},
|
||||
{
|
||||
value: "WAIT_RETURNED_GOODS",
|
||||
label: "待退货",
|
||||
},
|
||||
{
|
||||
value: "RETURNED_GOODS",
|
||||
label: "已退货",
|
||||
},
|
||||
{
|
||||
value: "WAIT_REFUND",
|
||||
label: "退款中",
|
||||
},
|
||||
{
|
||||
value: "REFUNDED",
|
||||
label: "退款成功",
|
||||
},
|
||||
],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
@ -245,7 +258,7 @@ export default {
|
||||
this.ratelist = {}
|
||||
if (row.orderStatus == 'EVALUATED') {
|
||||
this.ratelist = res.data.orderEvaluatePictureInfoList
|
||||
} else {}
|
||||
} else { }
|
||||
});
|
||||
},
|
||||
// 查看录入物流单号弹框
|
||||
@ -285,6 +298,7 @@ export default {
|
||||
//确认退款 确定按钮
|
||||
submitRefundOrder() {
|
||||
var obj = {};
|
||||
obj.orderType=this.refundlist.orderType;
|
||||
obj.orderNo = this.refundlist.goOrderNo;
|
||||
obj.refundReason = this.refundlist.dictLabel;
|
||||
obj.refundPrice = this.refundlist.godTotalPrice;
|
||||
@ -405,21 +419,21 @@ export default {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal
|
||||
.confirm('是否确认删除商品订单编号为"' + ids + '"的数据项?')
|
||||
.then(function() {
|
||||
.then(function () {
|
||||
return delGoodsOrder(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/goodsOrder/export", {
|
||||
...this.queryParams,
|
||||
},
|
||||
...this.queryParams,
|
||||
},
|
||||
`goodsOrder_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
|
||||
757
src/views/system/groupQrCodeInfo/index.vue
Normal file
757
src/views/system/groupQrCodeInfo/index.vue
Normal file
@ -0,0 +1,757 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="群名称" prop="groupName">
|
||||
<el-input
|
||||
v-model="queryParams.groupName"
|
||||
placeholder="请输入群名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="群编号" prop="groupCode">
|
||||
<el-input
|
||||
v-model="queryParams.groupCode"
|
||||
placeholder="请输入群编号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客服类型" prop="customerServiceType">
|
||||
<el-select clearable v-model="queryParams.customerServiceType" placeholder="请选择客服类型">
|
||||
<el-option
|
||||
v-for="item in option"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:groupQrCodeInfo:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:groupQrCodeInfo:edit']"
|
||||
>修改</el-button>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:groupQrCodeInfo:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:groupQrCodeInfo:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col>-->
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="groupQrCodeInfoList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||
<!-- <el-table-column label="所属护理机构id" align="center" prop="nurseStationId" /> -->
|
||||
<el-table-column label="群名称" align="center" prop="groupName" />
|
||||
<el-table-column label="群编号" align="center" prop="groupCode" />
|
||||
<!-- <el-table-column label="群二维码存放路径" align="center" prop="groupQrCodeUrl" /> -->
|
||||
<el-table-column label="客服类型" align="center" prop="customerServiceType">
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
scope.row.customerServiceType == "NURSE_AGENCY_CUSTOMER"
|
||||
? "护理机构客服"
|
||||
: ""
|
||||
}}
|
||||
{{
|
||||
scope.row.customerServiceType == "SYSTEM_CUSTOMER" ? "系统客服" : ""
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="展示顺序" align="center" prop="groupSort" />
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:groupQrCodeInfo:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:groupQrCodeInfo:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
<!-- 修改 -->
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="editopen"
|
||||
width="500px"
|
||||
append-to-body
|
||||
:before-close="cancel"
|
||||
>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<el-form-item label="群名称" prop="groupName">
|
||||
<el-input
|
||||
maxlength="50"
|
||||
style="width: 225px"
|
||||
v-model="form.groupName"
|
||||
placeholder="请输入群名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="群二维码" prop="groupQrCodeUrl">
|
||||
<stationAcatar
|
||||
@imgUrl="setUpdateImgUrl"
|
||||
:img="form.groupQrCodeUrl"
|
||||
:type="'groupQrCodeUrl'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="客服类型" prop="customerServiceType">
|
||||
<el-select style="width: 225px" v-model="form.customerServiceType" placeholder="请选择客服类型">
|
||||
<el-option
|
||||
v-for="item in option"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="所属护理站"
|
||||
prop="nurseStationId"
|
||||
v-if="form.customerServiceType == 'NURSE_AGENCY_CUSTOMER'"
|
||||
>
|
||||
<template>
|
||||
<el-button
|
||||
@click="ParamsStation(false)"
|
||||
style="
|
||||
width: 225px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #c0c4cc;
|
||||
"
|
||||
v-if="form.nurseStationName == '请选择所属护理站'"
|
||||
>{{ form.nurseStationName }}</el-button>
|
||||
<el-button
|
||||
type
|
||||
style="
|
||||
width: 225px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
"
|
||||
@click="ParamsStation(false)"
|
||||
v-else
|
||||
>{{ form.nurseStationName }}</el-button>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item label="展示顺序" prop="groupSort">
|
||||
<el-input
|
||||
style="width: 225px"
|
||||
v-model.number="form.groupSort"
|
||||
placeholder="请输入群二维码展示顺序"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxlength="5"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- </div> -->
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 添加在线客服对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
|
||||
<div
|
||||
v-for="(item, index) in form.groupQrCodeInfoDTOList"
|
||||
:key="index"
|
||||
style="margin-bottom: 30px"
|
||||
>
|
||||
<el-form-item
|
||||
:rules="rules.groupQrCodeInfoDTOList.groupName"
|
||||
label="群名称"
|
||||
prop="groupQrCodeInfoDTOList[0].groupName"
|
||||
>
|
||||
<el-input
|
||||
maxlength="50"
|
||||
style="width: 225px"
|
||||
v-model="item.groupName"
|
||||
placeholder="请输入群名称"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="群二维码"
|
||||
prop="groupQrCodeInfoDTOList[0].groupQrCodeUrl"
|
||||
:rules="rules.groupQrCodeInfoDTOList.groupQrCodeUrl"
|
||||
>
|
||||
<stationAcatar @imgUrl="imgUrl" :img="item.groupQrCodeUrl" :type="'groupQrCodeUrl'" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="客服类型"
|
||||
prop="groupQrCodeInfoDTOList[0].customerServiceType"
|
||||
:rules="rules.groupQrCodeInfoDTOList.customerServiceType"
|
||||
>
|
||||
<el-select
|
||||
style="width: 225px"
|
||||
v-model="item.customerServiceType"
|
||||
placeholder="请选择客服类型"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in option"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="所属护理站"
|
||||
prop="groupQrCodeInfoDTOList[0].nurseStationId"
|
||||
:rules="rules.groupQrCodeInfoDTOList.nurseStationId"
|
||||
v-if="item.customerServiceType == 'NURSE_AGENCY_CUSTOMER'"
|
||||
>
|
||||
<template>
|
||||
<el-button
|
||||
type
|
||||
@click="ParamsStation(true)"
|
||||
style="
|
||||
width: 225px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
color: #c0c4cc;
|
||||
"
|
||||
v-if="item.nurseStationName == '请选择所属护理站'"
|
||||
>{{ item.nurseStationName }}</el-button>
|
||||
<el-button
|
||||
type
|
||||
style="
|
||||
width: 225px;
|
||||
text-align: left;
|
||||
height: 36px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
"
|
||||
@click="ParamsStation(true)"
|
||||
v-else
|
||||
>{{ item.nurseStationName }}</el-button>
|
||||
</template>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="展示顺序"
|
||||
prop="groupQrCodeInfoDTOList[0].groupSort"
|
||||
:rules="rules.groupQrCodeInfoDTOList.groupSort"
|
||||
>
|
||||
<el-input
|
||||
style="width: 225px"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxlength="5"
|
||||
v-model.number="item.groupSort"
|
||||
placeholder="请输入群二维码展示顺序"
|
||||
/>
|
||||
</el-form-item>
|
||||
</div>
|
||||
</el-form>
|
||||
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 护理站 -->
|
||||
<el-dialog
|
||||
title="选择所属护理站"
|
||||
:visible.sync="nurseStationshow"
|
||||
width="1100px"
|
||||
append-to-body
|
||||
:before-close="clicknurseStationshow"
|
||||
>
|
||||
<el-form ref="form" :model="getListByUserquery" label-width="110px" :inline="true">
|
||||
<el-form-item label="护理站编码" prop="nurseStationCode">
|
||||
<el-input v-model="getListByUserquery.nurseStationCode" placeholder="请输入护理站编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="护理站名称" prop="nurseStationName">
|
||||
<el-input v-model="getListByUserquery.nurseStationName" placeholder="请输入护理站名称" />
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="info">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="stationcancel">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="nurseStationlist" @cell-dblclick="choicestationid">
|
||||
<el-table-column label="请选择" width="70" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
type="primary"
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
@click="choicestationid(scope.row)"
|
||||
v-if="stationidIndex == scope.row.id"
|
||||
></el-button>
|
||||
|
||||
<el-button
|
||||
style="width: 15px; height: 15px"
|
||||
circle
|
||||
v-else
|
||||
@click="choicestationid(scope.row)"
|
||||
></el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="nurseStationCode" label="护理站编码" align="center"></el-table-column>
|
||||
<el-table-column property="nurseStationName" label="护理站名称" align="center"></el-table-column>
|
||||
<el-table-column property="phone" label="联系电话" align="center"></el-table-column>
|
||||
<el-table-column
|
||||
property="address"
|
||||
label="护理站地址"
|
||||
align="center"
|
||||
:show-overflow-tooltip="true"
|
||||
></el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total4 > 0"
|
||||
:total="total4"
|
||||
:page.sync="getListByUserquery.pageNum"
|
||||
:limit.sync="getListByUserquery.pageSize"
|
||||
@pagination="info"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listGroupQrCodeInfo,
|
||||
getListByUser,
|
||||
getGroupQrCodeInfo,
|
||||
delGroupQrCodeInfo,
|
||||
addGroupQrCodeInfo,
|
||||
updateGroupQrCodeInfo
|
||||
} from "@/api/system/groupQrCodeInfo";
|
||||
import stationAcatar from "../stationAvatar/index.vue";
|
||||
import { updatePicture } from "@/api/system/station";
|
||||
export default {
|
||||
components: { stationAcatar },
|
||||
name: "GroupQrCodeInfo",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
groupName:[],
|
||||
getListByUserquery: {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
nurseStationlist: [],
|
||||
option: [
|
||||
{
|
||||
value: "NURSE_AGENCY_CUSTOMER",
|
||||
label: "护理机构客服"
|
||||
},
|
||||
{
|
||||
value: "SYSTEM_CUSTOMER",
|
||||
label: "系统客服"
|
||||
}
|
||||
],
|
||||
value: "",
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 在线客服表格数据
|
||||
groupQrCodeInfoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
total4: 0,
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nurseStationId: null,
|
||||
groupName: null,
|
||||
groupCode: null,
|
||||
groupQrCodeUrl: null,
|
||||
customerServiceType: null,
|
||||
groupSort: null
|
||||
},
|
||||
nurseStationshow: false,
|
||||
stationidIndex: "",
|
||||
editopen: false,
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
imgone: "",
|
||||
// 表单参数
|
||||
form: {
|
||||
groupQrCodeInfoDTOList: [],
|
||||
nurseStationId: null,
|
||||
nurseStationName: "请选择所属护理站"
|
||||
},
|
||||
homenumber: false,
|
||||
// deletNewImgs: [],
|
||||
objitem: [],
|
||||
// 表单校验
|
||||
rules: {
|
||||
groupQrCodeInfoDTOList: {
|
||||
groupName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入名称",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
groupSort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入排序",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
groupQrCodeUrl: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择上传图片",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
customerServiceType: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择客服类型",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
nurseStationId: [
|
||||
{ required: true, message: "请选择所属护理站", trigger: "blur" }
|
||||
]
|
||||
},
|
||||
groupName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入名称",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
groupSort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入排序",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
groupQrCodeUrl: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择上传图片",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
customerServiceType: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择客服类型",
|
||||
trigger: "blur"
|
||||
}
|
||||
],
|
||||
nurseStationId: [
|
||||
{ required: true, message: "请选择所属护理站", trigger: "blur" }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
//护理站页面 =》选择护理站
|
||||
choicestationid(item) {
|
||||
this.stationidIndex = item.id;
|
||||
if (this.editopen) {
|
||||
this.form.nurseStationName = item.nurseStationName;
|
||||
this.form.nurseStationId = item.id;
|
||||
} else if (this.open) {
|
||||
// this.form.groupQrCodeInfoDTOList[0].nurseStationId = item.id;
|
||||
this.form.groupQrCodeInfoDTOList[0].nurseStationName =
|
||||
item.nurseStationName;
|
||||
this.form.groupQrCodeInfoDTOList[0].nurseStationId = item.id;
|
||||
}
|
||||
this.nurseStationshow = false;
|
||||
this.stationcancel();
|
||||
},
|
||||
//护理站重置
|
||||
stationcancel() {
|
||||
this.getListByUserquery = {
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
};
|
||||
this.info();
|
||||
},
|
||||
//关闭护理站页面
|
||||
clicknurseStationshow() {
|
||||
this.nurseStationshow = false;
|
||||
},
|
||||
//所属护理站页面
|
||||
ParamsStation(item) {
|
||||
console.log(
|
||||
item,
|
||||
this.form.nurseStationId,
|
||||
"打印this.queryParams.nurseStationId"
|
||||
);
|
||||
this.info();
|
||||
this.stationidIndex = this.form.nurseStationId;
|
||||
this.nurseStationshow = true;
|
||||
},
|
||||
//护理站list
|
||||
info() {
|
||||
getListByUser(this.getListByUserquery).then(res => {
|
||||
this.nurseStationlist = res.rows;
|
||||
this.total4 = res.total;
|
||||
});
|
||||
},
|
||||
// 设置修改的图片地址
|
||||
setUpdateImgUrl(e) {
|
||||
this.form.groupQrCodeUrl = e;
|
||||
console.log(this.form);
|
||||
},
|
||||
imgUrl(imgUrl) {
|
||||
console.log(this.form);
|
||||
// this.$set(this.form,"groupQrCodeInfoDTOList",[])
|
||||
this.form.groupQrCodeInfoDTOList.forEach(e => {
|
||||
this.$set(e, "groupQrCodeUrl", imgUrl);
|
||||
});
|
||||
},
|
||||
/** 查询在线客服列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listGroupQrCodeInfo(this.queryParams).then(response => {
|
||||
this.groupQrCodeInfoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
if (this.editopen) {
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.form.groupQrCodeUrl != this.imgone) {
|
||||
obj.pictureUrlList.push(this.form.groupQrCodeUrl);
|
||||
}
|
||||
console.log(obj);
|
||||
updatePicture(obj).then(res => {
|
||||
this.editopen = false;
|
||||
});
|
||||
}
|
||||
if (this.open) {
|
||||
var obj = { pictureUrlList: [] };
|
||||
if (this.form.groupQrCodeInfoDTOList) {
|
||||
this.form.groupQrCodeInfoDTOList.forEach(e => {
|
||||
obj.pictureUrlList.push(e.groupQrCodeUrl);
|
||||
});
|
||||
}
|
||||
updatePicture(obj).then(res => {
|
||||
this.open = false;
|
||||
});
|
||||
this.imgsurl = { pictureUrlList: [] };
|
||||
}
|
||||
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
groupQrCodeInfoDTOList: [
|
||||
{
|
||||
nurseStationId: null,
|
||||
groupName: null,
|
||||
// groupCode: null,
|
||||
groupQrCodeUrl: null,
|
||||
customerServiceType: null,
|
||||
groupSort: null,
|
||||
nurseStationName: "请选择所属护理站"
|
||||
}
|
||||
]
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.id);
|
||||
this.groupName = selection.map(item => item.groupName);
|
||||
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.form = {
|
||||
groupQrCodeInfoDTOList: [
|
||||
{
|
||||
nurseStationId: null,
|
||||
groupName: null,
|
||||
groupSort: null,
|
||||
customerServiceType: null,
|
||||
nurseStationName: "请选择所属护理站",
|
||||
groupQrCodeUrl: null
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
this.open = true;
|
||||
this.title = "添加在线客服";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
// this.form.nurseStationId = response.data.nurseStationId;
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getGroupQrCodeInfo(id).then(response => {
|
||||
console.log(response.data);
|
||||
this.form = response.data;
|
||||
|
||||
// this.form.nurseStationName = item.nurseStationName;
|
||||
// this.form.nurseStationId = item.id;
|
||||
this.imgone = this.form.groupQrCodeUrl;
|
||||
|
||||
this.editopen = true;
|
||||
this.title = "修改在线客服";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateGroupQrCodeInfo(this.form).then(response => {
|
||||
if (this.form.groupQrCodeUrl != this.imgone) {
|
||||
var obj = { pictureUrlList: [] };
|
||||
obj.pictureUrlList.push(this.imgone);
|
||||
updatePicture(obj).then(res => {});
|
||||
}
|
||||
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.editopen = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addGroupQrCodeInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
console.log(row);
|
||||
const ids = row.id || this.ids;
|
||||
const groupNames = row.groupName || this.groupNames;
|
||||
this.$modal
|
||||
.confirm('确认删除群名称为"' + groupNames + '"的信息吗?')
|
||||
.then(function() {
|
||||
return delGroupQrCodeInfo(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/groupQrCodeInfo/export",
|
||||
{
|
||||
...this.queryParams
|
||||
},
|
||||
`groupQrCodeInfo_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -128,10 +128,10 @@
|
||||
<el-input style="width:200px" v-model="form.hospitalAddress" placeholder="请输入医院地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input v-model="form.phone" style="width:200px" placeholder="请输入联系电话" />
|
||||
<el-input v-model="form.phone" maxlength="11" style="width:200px" placeholder="请输入联系电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="显示顺序" prop="hospitalSort">
|
||||
<el-input v-model="form.hospitalSort" style="width:200px" placeholder="请输入显示顺序" />
|
||||
<el-input v-model="form.hospitalSort" maxlength="5" style="width:200px" placeholder="请输入显示顺序" />
|
||||
</el-form-item>
|
||||
<el-form-item label="医院简介" prop="hospitalIntroduce">
|
||||
<editor
|
||||
|
||||
@ -228,6 +228,7 @@
|
||||
:prop="`hospitalDepartmentInfoList.${index}.departmentPhone`"
|
||||
>
|
||||
<el-input
|
||||
maxlength="11"
|
||||
style="width: 250px"
|
||||
v-model="item.departmentPhone"
|
||||
placeholder="请输入科室联系电话"
|
||||
@ -261,6 +262,7 @@
|
||||
:prop="`hospitalDepartmentInfoList.${index}.departmentSort`"
|
||||
>
|
||||
<el-input
|
||||
maxlength="5"
|
||||
v-model="item.departmentSort"
|
||||
placeholder="请输入科室显示顺序"
|
||||
style="width:250px"
|
||||
@ -440,6 +442,7 @@
|
||||
</el-form-item>
|
||||
<el-form-item label="科室显示顺序" prop="departmentSort">
|
||||
<el-input
|
||||
maxlength="5"
|
||||
v-model="form.departmentSort"
|
||||
placeholder="请输入科室显示顺序"
|
||||
style="width: 250px"
|
||||
@ -544,21 +547,21 @@ export default {
|
||||
departmentSort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室显示排序",
|
||||
message: "请输入科室显示排序",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
departmentName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室名称",
|
||||
message: "请输入科室名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
departmentPerson: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室负责人",
|
||||
message: "请输入科室负责人",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
@ -573,7 +576,7 @@ export default {
|
||||
departmentAddress: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室地址",
|
||||
message: "请输入科室地址",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
@ -582,14 +585,14 @@ export default {
|
||||
departmentName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室名称",
|
||||
message: "请输入科室名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
departmentPerson: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室负责人",
|
||||
message: "请输入科室负责人",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
@ -604,7 +607,7 @@ export default {
|
||||
departmentAddress: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室地址",
|
||||
message: "请输入科室地址",
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
@ -612,7 +615,7 @@ export default {
|
||||
departmentSort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择科室显示顺序",
|
||||
message: "请输入科室显示顺序",
|
||||
trigger: "blur",
|
||||
message: "",
|
||||
},
|
||||
|
||||
@ -253,7 +253,7 @@
|
||||
:rules="rules.hospitalPersonInfoList.personName"
|
||||
:prop="`hospitalPersonInfoList.${index}.personName`"
|
||||
>
|
||||
<el-input v-model="item.personName" placeholder="请输入人员名称" />
|
||||
<el-input v-model="item.personName" placeholder="请输入人员名称" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="人员联系电话"
|
||||
@ -261,6 +261,7 @@
|
||||
:prop="`hospitalPersonInfoList.${index}.personPhone`"
|
||||
>
|
||||
<el-input
|
||||
maxlength="11"
|
||||
v-model="item.personPhone"
|
||||
placeholder="请输入人员联系电话"
|
||||
/>
|
||||
@ -280,7 +281,7 @@
|
||||
:rules="rules.hospitalPersonInfoList.cardNo"
|
||||
:prop="`hospitalPersonInfoList.${index}.cardNo`"
|
||||
>
|
||||
<el-input v-model="item.cardNo" placeholder="请输入身份证号" />
|
||||
<el-input maxlength="18" v-model="item.cardNo" placeholder="请输入身份证号" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="人员职称"
|
||||
@ -307,6 +308,7 @@
|
||||
:prop="`hospitalPersonInfoList.${index}.consultingFee`"
|
||||
>
|
||||
<el-input
|
||||
maxlength="10"
|
||||
v-model="item.consultingFee"
|
||||
placeholder="请输入咨询费用"
|
||||
/>
|
||||
@ -316,7 +318,10 @@
|
||||
:rules="rules.hospitalPersonInfoList.personSort"
|
||||
:prop="`hospitalPersonInfoList.${index}.personSort`"
|
||||
>
|
||||
<el-input v-model="item.personSort" placeholder="请输入显示顺序" />
|
||||
<el-input
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
maxlength="5"
|
||||
v-model="item.personSort" placeholder="请输入显示顺序" />
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="个人简介"
|
||||
@ -567,8 +572,19 @@
|
||||
/>
|
||||
</el-dialog>
|
||||
<!-- 修改对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="110px" :inline="true">
|
||||
<el-dialog
|
||||
:title="title"
|
||||
:visible.sync="open"
|
||||
width="1000px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="所属医院" prop="hospitalName">
|
||||
<el-button
|
||||
type=""
|
||||
@ -596,10 +612,8 @@
|
||||
"
|
||||
>{{ form.hospitalName }}</el-button
|
||||
>
|
||||
|
||||
</el-form-item>
|
||||
<el-form-item label="所属科室" prop="departmentName">
|
||||
|
||||
<el-button
|
||||
type=""
|
||||
v-if="form.departmentName == '请选择所属科室'"
|
||||
@ -650,8 +664,7 @@
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
<el-form-item label="身份证" prop="cardNo">
|
||||
<el-input
|
||||
v-model="form.cardNo"
|
||||
@ -660,7 +673,7 @@
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="人员职称" prop="academicTitle">
|
||||
<el-select
|
||||
v-model="form.academicTitle"
|
||||
@ -680,12 +693,15 @@
|
||||
<el-input
|
||||
v-model="form.consultingFee"
|
||||
placeholder="请输入咨询费用"
|
||||
maxlength="10"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="显示顺序" prop="personSort">
|
||||
<el-input
|
||||
v-model="form.personSort"
|
||||
maxlength="5"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
placeholder="请输入显示顺序"
|
||||
style="width: 250px"
|
||||
/>
|
||||
@ -1243,11 +1259,11 @@ export default {
|
||||
// }
|
||||
this.innerVisibledepartmentxg = false;
|
||||
},
|
||||
//医院关闭
|
||||
//医院关闭
|
||||
innerVisiblecancel() {
|
||||
this.innerVisible = false;
|
||||
},
|
||||
|
||||
|
||||
innerVisiblecancelxg() {
|
||||
this.innerVisiblexg = false;
|
||||
},
|
||||
@ -1314,7 +1330,7 @@ export default {
|
||||
this.innerVisibledepartment = true;
|
||||
},
|
||||
// 修改科室按钮
|
||||
clickdepartmentlist(){
|
||||
clickdepartmentlist() {
|
||||
this.departmentList();
|
||||
// this.form.departmentId = item.departmentId;
|
||||
this.innerVisibledepartmentxg = true;
|
||||
|
||||
@ -134,6 +134,7 @@
|
||||
<el-table-column
|
||||
label="资讯标题"
|
||||
align="center"
|
||||
show-overflow-tooltip
|
||||
prop="informationTitle"
|
||||
/>
|
||||
|
||||
|
||||
@ -231,7 +231,7 @@
|
||||
label-width="110px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="客户姓名" prop="patientName">
|
||||
<el-form-item label="客户姓名" prop="patientName">
|
||||
<el-input
|
||||
v-model="form.patientName"
|
||||
placeholder="请输入客户姓名"
|
||||
@ -323,6 +323,22 @@
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="出生日期" prop="birthDate">
|
||||
<el-input
|
||||
v-model="form.birthDate"
|
||||
placeholder="请输入出生日期"
|
||||
maxlength="11"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="会员积分" prop="integral">
|
||||
<el-input
|
||||
v-model="form.integral"
|
||||
placeholder="请输入出生日期"
|
||||
maxlength="11"
|
||||
:disabled="true"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="身份证号" prop="cardNo">
|
||||
<el-input
|
||||
v-model="form.cardNo"
|
||||
@ -330,6 +346,23 @@
|
||||
maxlength="18"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="性别" prop="cardNo">
|
||||
<el-select
|
||||
v-model="form.sex"
|
||||
clearable
|
||||
placeholder="请选择性别"
|
||||
:disabled="true"
|
||||
style="width: 100px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="居住地址" prop="address">
|
||||
<el-input
|
||||
@ -470,6 +503,16 @@ export default {
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
options: [
|
||||
{
|
||||
value: "MALE",
|
||||
label: "男",
|
||||
},
|
||||
{
|
||||
value: "FEMALE",
|
||||
label: "女",
|
||||
},
|
||||
],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
@ -602,11 +645,11 @@ export default {
|
||||
methods: {
|
||||
// 重置密码
|
||||
handleResetPwd(row) {
|
||||
console.log(row)
|
||||
const id= row.id
|
||||
console.log(id)
|
||||
console.log(row);
|
||||
const id = row.id;
|
||||
console.log(id);
|
||||
// const id=row.userId
|
||||
this.$prompt('请输入新的密码', "提示", {
|
||||
this.$prompt("请输入新的密码", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
closeOnClickModal: false,
|
||||
@ -614,16 +657,16 @@ export default {
|
||||
inputErrorMessage: "用户密码长度必须介于 5 和 20 之间",
|
||||
})
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
console.log(res);
|
||||
const params = {
|
||||
id,
|
||||
password: res.value
|
||||
}
|
||||
password: res.value,
|
||||
};
|
||||
updatePassword(params).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功,新密码是:" + res.value);
|
||||
});
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
},
|
||||
// 查询省事件
|
||||
province(item) {
|
||||
@ -858,7 +901,7 @@ export default {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => { });
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
|
||||
622
src/views/system/settings/index.vue
Normal file
622
src/views/system/settings/index.vue
Normal file
@ -0,0 +1,622 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
size="small"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-form-item label="规则名称" prop="settingsName">
|
||||
<el-input
|
||||
v-model="queryParams.settingsName"
|
||||
placeholder="请输入规则名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规则编码" prop="settingsCode">
|
||||
<el-input
|
||||
v-model="queryParams.settingsCode"
|
||||
placeholder="请输入规则编码"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="规则类型" prop="settingsType">
|
||||
<el-select
|
||||
style="width: 220px"
|
||||
clearable
|
||||
v-model="queryParams.settingsType"
|
||||
placeholder="请选择"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="累计签到天数,签到设置使用" prop="totalSignInDays">
|
||||
<el-input
|
||||
v-model="queryParams.totalSignInDays"
|
||||
placeholder="请输入累计签到天数,签到设置使用"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="积分数量,累计签到、邀请好友、积分抵扣等系统设置使用" prop="integralCount">
|
||||
<el-input
|
||||
v-model="queryParams.integralCount"
|
||||
placeholder="请输入积分数量,累计签到、邀请好友、积分抵扣等系统设置使用"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="积分抵扣金额,积分抵扣设置使用" prop="creditAmount">
|
||||
<el-input
|
||||
v-model="queryParams.creditAmount"
|
||||
placeholder="请输入积分抵扣金额,积分抵扣设置使用"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="显示顺序" prop="sort">
|
||||
<el-input
|
||||
v-model="queryParams.sort"
|
||||
placeholder="请输入显示顺序"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
size="mini"
|
||||
@click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
||||
>重置</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="el-icon-plus"
|
||||
size="mini"
|
||||
@click="handleAdd"
|
||||
v-hasPermi="['system:settings:add']"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="success"
|
||||
plain
|
||||
icon="el-icon-edit"
|
||||
size="mini"
|
||||
:disabled="single"
|
||||
@click="handleUpdate"
|
||||
v-hasPermi="['system:settings:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
</el-col>
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="danger"
|
||||
plain
|
||||
icon="el-icon-delete"
|
||||
size="mini"
|
||||
:disabled="multiple"
|
||||
@click="handleDelete"
|
||||
v-hasPermi="['system:settings:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</el-col>
|
||||
<!-- <el-col :span="1.5">
|
||||
<el-button
|
||||
type="warning"
|
||||
plain
|
||||
icon="el-icon-download"
|
||||
size="mini"
|
||||
@click="handleExport"
|
||||
v-hasPermi="['system:settings:export']"
|
||||
>导出</el-button
|
||||
>
|
||||
</el-col> -->
|
||||
<right-toolbar
|
||||
:showSearch.sync="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="settingsList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键id" align="center" prop="id" /> -->
|
||||
<el-table-column
|
||||
label="规则名称"
|
||||
align="center"
|
||||
prop="settingsName"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column label="规则编码" align="center" prop="settingsCode" />
|
||||
<!-- <el-table-column
|
||||
label="系统设置内容"
|
||||
align="center"
|
||||
prop="settingsContent"
|
||||
show-overflow-tooltip
|
||||
/> -->
|
||||
<el-table-column label="规则类型" align="center" prop="settingsType">
|
||||
<template slot-scope="scope">
|
||||
<!-- {{
|
||||
scope.row.settingsType == "INTEGRAL_EXCHANGE_RULE" ? "积分兑换" : ""
|
||||
}} -->
|
||||
{{ scope.row.settingsType == "SIGN_IN_RULE" ? "签到" : "" }}
|
||||
{{ scope.row.settingsType == "INTEGRAL_DEDUCTION" ? "积分抵扣" : "" }}
|
||||
{{ scope.row.settingsType == "INVITE_FRIENDS" ? "邀请好友" : "" }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="累计签到天数"
|
||||
align="center"
|
||||
prop="totalSignInDays"
|
||||
/>
|
||||
|
||||
<el-table-column label="积分数量" align="center" prop="integralCount" />
|
||||
<el-table-column
|
||||
label="积分抵扣金额"
|
||||
align="center"
|
||||
prop="creditAmount"
|
||||
/>
|
||||
<!-- <el-table-column
|
||||
label="积分有效期"
|
||||
align="center"
|
||||
prop="integralExpirationDate"
|
||||
/> -->
|
||||
<el-table-column label="显示顺序" align="center" prop="sort" />
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:settings:edit']"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:settings:remove']"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改泉医到家平台系统业务设置信息对话框 -->
|
||||
<el-dialog
|
||||
:title="
|
||||
!isEditFlag
|
||||
? '添加系统规则信息'
|
||||
: '修改系统规则信息'
|
||||
"
|
||||
:visible.sync="open"
|
||||
width="900px"
|
||||
append-to-body
|
||||
>
|
||||
<el-form
|
||||
ref="form"
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
label-width="110px"
|
||||
:inline="true"
|
||||
>
|
||||
<el-form-item label="规则名称" prop="settingsName">
|
||||
<el-input
|
||||
maxlength="100"
|
||||
v-model="form.settingsName"
|
||||
placeholder="请输入规则名称"
|
||||
style="width: 250px"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="规则类型" prop="settingsType">
|
||||
<el-select
|
||||
style="width: 250px"
|
||||
v-model="form.settingsType"
|
||||
placeholder="请选择"
|
||||
:disabled="isEditFlag"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
>
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="累计签到天数"
|
||||
prop="totalSignInDays"
|
||||
v-if="form.settingsType == 'SIGN_IN_RULE'"
|
||||
>
|
||||
<el-input
|
||||
style="width: 250px"
|
||||
onkeyup="this.value=this.value.replace(/[^[0-9]/g,'').replace(/^0[0-9]*/g, '')"
|
||||
onafterpaste="this.value=this.value.replace(/[^[0-9]/g,'').replace(/^0[0-9]*/g, '')"
|
||||
maxlength="9"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
v-model.number="form.totalSignInDays"
|
||||
placeholder="请输入累计签到天数"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item
|
||||
prop="integralCount"
|
||||
:label="
|
||||
form.settingsType == 'INVITE_FRIENDS'
|
||||
? '赠送积分数量'
|
||||
: form.settingsType == 'SIGN_IN_RULE'
|
||||
? '赠送积分数量'
|
||||
: '积分数量'
|
||||
"
|
||||
>
|
||||
<el-input
|
||||
style="width: 250px"
|
||||
maxlength="9"
|
||||
onkeyup="this.value=this.value.replace(/[^[0-9]/g,'').replace(/^0[0-9]*/g, '')"
|
||||
onafterpaste="this.value=this.value.replace(/[^[0-9]/g,'').replace(/^0[0-9]*/g, '')"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
v-model.number="form.integralCount"
|
||||
placeholder="请输入积分数量"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
label="积分抵扣金额"
|
||||
prop="creditAmount"
|
||||
v-if="form.settingsType == 'INTEGRAL_DEDUCTION'"
|
||||
>
|
||||
<el-input
|
||||
maxlength="8"
|
||||
style="width: 250px"
|
||||
v-model="form.creditAmount"
|
||||
onkeyup="this.value=this.value.replace(/[^[0-9]/g,'').replace(/^0[0-9]*/g, '')"
|
||||
onafterpaste="this.value=this.value.replace(/[^[0-9]/g,'').replace(/^0[0-9]*/g, '')"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
placeholder="请输入积分抵扣金额"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item
|
||||
label="积分有效期"
|
||||
prop="integralExpirationDate"
|
||||
v-if="form.settingsType == 'INTEGRAL_EXCHANGE_RULE'||form.settingsType == 'INTEGRAL_DEDUCTION'"
|
||||
>
|
||||
<el-input
|
||||
style="width: 250px"
|
||||
maxlength="9"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
v-model.number="form.integralExpirationDate"
|
||||
placeholder="请输入积分有效期"
|
||||
/>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="显示顺序" prop="sort">
|
||||
<el-input
|
||||
maxlength="5"
|
||||
style="width: 250px"
|
||||
v-model.number="form.sort"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
placeholder="请输入显示顺序"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="系统设置内容" prop="settingsContent">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="5"
|
||||
style="width: 540px"
|
||||
placeholder="请输入系统设置内容"
|
||||
v-model="form.settingsContent"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
listSettings,
|
||||
getSettings,
|
||||
delSettings,
|
||||
addSettings,
|
||||
updateSettings,
|
||||
} from "@/api/system/settings";
|
||||
import editor from "@/components/Editor";
|
||||
export default {
|
||||
components: { editor },
|
||||
name: "Settings",
|
||||
data() {
|
||||
return {
|
||||
imgsurl: { pictureUrlList: [] },
|
||||
options: [
|
||||
// {
|
||||
// value: "INTEGRAL_EXCHANGE_RULE",
|
||||
// label: "积分兑换",
|
||||
// },
|
||||
{
|
||||
value: "SIGN_IN_RULE",
|
||||
label: "签到",
|
||||
},
|
||||
{
|
||||
value: "INTEGRAL_DEDUCTION",
|
||||
label: "积分抵扣",
|
||||
},
|
||||
{
|
||||
value: "INVITE_FRIENDS",
|
||||
label: "邀请好友",
|
||||
},
|
||||
],
|
||||
value: "",
|
||||
// 弹出层判断新增还是修改
|
||||
isEditFlag: false,
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 泉医到家平台系统业务设置信息表格数据
|
||||
settingsList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
settingsName: null,
|
||||
settingsCode: null,
|
||||
settingsContent: null,
|
||||
settingsType: null,
|
||||
totalSignInDays: null,
|
||||
integralExpirationDate: null,
|
||||
integralCount: null,
|
||||
creditAmount: null,
|
||||
sort: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
integralExpirationDate: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入积分有效期",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
settingsName: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入系统设置名称",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
// settingsContent: [
|
||||
// {
|
||||
// required: true,
|
||||
// message: "请输入系统设置内容",
|
||||
// trigger: "blur",
|
||||
// },
|
||||
// ],
|
||||
settingsType: [
|
||||
{
|
||||
required: true,
|
||||
message: "请选择系统设置类型",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
totalSignInDays: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入累计签到天数",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
|
||||
integralCount: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入积分数量",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
creditAmount: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入积分抵扣金额",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
sort: [
|
||||
{
|
||||
required: true,
|
||||
message: "请输入显示顺序",
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
// computed: {
|
||||
// label() {
|
||||
// let label = "积分数量";
|
||||
// if (this.form.settingsType == "INVITE_FRIENDS") label = "邀请好友次数";
|
||||
// if (this.form.settingsType == "SIGN_IN_RULE") label = "赠送积分数量";
|
||||
// return label;
|
||||
// },
|
||||
// },
|
||||
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
imgs(item) {
|
||||
console.log(item);
|
||||
this.imgsurl.pictureUrlList.push(item);
|
||||
},
|
||||
/** 查询泉医到家平台系统业务设置信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listSettings(this.queryParams).then((response) => {
|
||||
this.settingsList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
settingsName: null,
|
||||
settingsCode: null,
|
||||
settingsContent: null,
|
||||
settingsType: null,
|
||||
totalSignInDays: null,
|
||||
integralExpirationDate: null,
|
||||
integralCount: null,
|
||||
creditAmount: null,
|
||||
sort: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map((item) => item.id);
|
||||
this.single = selection.length !== 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.isEditFlag = false;
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加泉医到家平台系统业务设置信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.isEditFlag = true;
|
||||
this.reset();
|
||||
const id = row.id || this.ids;
|
||||
getSettings(id).then((response) => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改泉医到家平台系统业务设置信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateSettings(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addSettings(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
const settingsNames=row.settingsName||this.settingsNames
|
||||
this.$modal
|
||||
.confirm('是否确认删除规则名称为"' + settingsNames + '"的数据项?')
|
||||
.then(function () {
|
||||
return delSettings(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download(
|
||||
"system/settings/export",
|
||||
{
|
||||
...this.queryParams,
|
||||
},
|
||||
`settings_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -304,6 +304,10 @@ export default {
|
||||
this.items.posterPictureUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
if(this.types == "certificateUrl"){
|
||||
this.items.certificateUrl = response.imgUrl;
|
||||
this.$emit("item", JSON.stringify(this.items));
|
||||
}
|
||||
this.openimg = false;
|
||||
});
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user