1
This commit is contained in:
parent
672acee0f0
commit
1477b721bb
@ -59,6 +59,7 @@
|
||||
"jsencrypt": "3.3.1",
|
||||
"min-dash": "3.5.2",
|
||||
"nprogress": "0.2.0",
|
||||
"nvm": "^0.0.4",
|
||||
"qrcode.vue": "^1.7.0",
|
||||
"quill": "1.3.7",
|
||||
"screenfull": "5.0.2",
|
||||
|
@ -8,6 +8,7 @@
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= webpackConfig.name %></title>
|
||||
<!--[if lt IE 11]><script>window.location.href='html/ie.html';</script><![endif]-->
|
||||
<script src="https://map.qq.com/api/gljs?v=1.exp&key=4YEBZ-SJ73Q-F5G5F-4X3FW-DBG4V-Y5BXO&callback=onMapCallback"></script>
|
||||
<style>
|
||||
html,
|
||||
body,
|
||||
|
44
src/api/system/inspectionGoods.js
Normal file
44
src/api/system/inspectionGoods.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询检测商品列表
|
||||
export function listInspectionGoods(query) {
|
||||
return request({
|
||||
url: '/system/inspectionGoods/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询检测商品详细
|
||||
export function getInspectionGoods(id) {
|
||||
return request({
|
||||
url: '/system/inspectionGoods/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增检测商品
|
||||
export function addInspectionGoods(data) {
|
||||
return request({
|
||||
url: '/system/inspectionGoods',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改检测商品
|
||||
export function updateInspectionGoods(data) {
|
||||
return request({
|
||||
url: '/system/inspectionGoods',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除检测商品
|
||||
export function delInspectionGoods(id) {
|
||||
return request({
|
||||
url: '/system/inspectionGoods/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
src/api/system/inspectionOrder.js
Normal file
44
src/api/system/inspectionOrder.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询检测订单列表
|
||||
export function listInspectionOrder(query) {
|
||||
return request({
|
||||
url: '/system/inspectionOrder/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询检测订单详细
|
||||
export function getInspectionOrder(orderId) {
|
||||
return request({
|
||||
url: '/system/inspectionOrder/' + orderId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增检测订单
|
||||
export function addInspectionOrder(data) {
|
||||
return request({
|
||||
url: '/system/inspectionOrder',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改检测订单
|
||||
export function updateInspectionOrder(data) {
|
||||
return request({
|
||||
url: '/system/inspectionOrder',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除检测订单
|
||||
export function delInspectionOrder(orderId) {
|
||||
return request({
|
||||
url: '/system/inspectionOrder/' + orderId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
src/api/system/insuranceGoods.js
Normal file
44
src/api/system/insuranceGoods.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询保险商品列表
|
||||
export function listInsuranceGoods(query) {
|
||||
return request({
|
||||
url: '/system/insuranceGoods/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询保险商品详细
|
||||
export function getInsuranceGoods(id) {
|
||||
return request({
|
||||
url: '/system/insuranceGoods/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增保险商品
|
||||
export function addInsuranceGoods(data) {
|
||||
return request({
|
||||
url: '/system/insuranceGoods',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改保险商品
|
||||
export function updateInsuranceGoods(data) {
|
||||
return request({
|
||||
url: '/system/insuranceGoods',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除保险商品
|
||||
export function delInsuranceGoods(id) {
|
||||
return request({
|
||||
url: '/system/insuranceGoods/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
src/api/system/insuranceOrder.js
Normal file
44
src/api/system/insuranceOrder.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询保险订单列表
|
||||
export function listInsuranceOrder(query) {
|
||||
return request({
|
||||
url: '/system/insuranceOrder/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询保险订单详细
|
||||
export function getInsuranceOrder(orderId) {
|
||||
return request({
|
||||
url: '/system/insuranceOrder/' + orderId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增保险订单
|
||||
export function addInsuranceOrder(data) {
|
||||
return request({
|
||||
url: '/system/insuranceOrder',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改保险订单
|
||||
export function updateInsuranceOrder(data) {
|
||||
return request({
|
||||
url: '/system/insuranceOrder',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除保险订单
|
||||
export function delInsuranceOrder(orderId) {
|
||||
return request({
|
||||
url: '/system/insuranceOrder/' + orderId,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
@ -1,24 +1,88 @@
|
||||
<template>
|
||||
<span>
|
||||
<template v-for="(dict, index) in this.getDictDatas2(type, value)">
|
||||
<!-- 默认样式 -->
|
||||
<span v-if="dict.colorType === 'default' || dict.colorType === '' || dict.colorType === undefined" :key="dict.value" :index="index"
|
||||
:class="dict.cssClass">{{ dict.label }}</span>
|
||||
<!-- Tag 样式 -->
|
||||
<el-tag v-else :disable-transitions="true" :key="dict.value" :index="index" :type="dict.colorType" :class="dict.cssClass">
|
||||
{{ dict.label }}
|
||||
</el-tag>
|
||||
<div>
|
||||
<template v-for="(item, index) in options">
|
||||
<template v-if="values.includes(item.value)">
|
||||
<span
|
||||
v-if="item.listClass == 'default' || item.listClass == ''"
|
||||
:key="item.value"
|
||||
:index="index"
|
||||
:class="item.cssClass"
|
||||
>{{ item.label + " " }}</span
|
||||
>
|
||||
<el-tag
|
||||
v-else
|
||||
:disable-transitions="true"
|
||||
:key="item.value"
|
||||
:index="index"
|
||||
:type="item.listClass == 'primary' ? '' : item.listClass"
|
||||
:class="item.cssClass"
|
||||
>
|
||||
{{ item.label + " " }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</template>
|
||||
</span>
|
||||
<template v-if="unmatch && showValue">
|
||||
{{ unmatchArray | handleArray }}
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: "DictTag",
|
||||
props: {
|
||||
type: String,
|
||||
value: [Number, String, Boolean, Array],
|
||||
options: {
|
||||
type: Array,
|
||||
default: null,
|
||||
},
|
||||
value: [Number, String, Array],
|
||||
// 当未找到匹配的数据时,显示value
|
||||
showValue: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
unmatchArray: [], // 记录未匹配的项
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
values() {
|
||||
if (this.value !== null && typeof this.value !== "undefined") {
|
||||
return Array.isArray(this.value) ? this.value : [String(this.value)];
|
||||
} else {
|
||||
return [];
|
||||
}
|
||||
},
|
||||
unmatch() {
|
||||
this.unmatchArray = [];
|
||||
if (this.value !== null && typeof this.value !== "undefined") {
|
||||
// 传入值为非数组
|
||||
if (!Array.isArray(this.value)) {
|
||||
if (this.options.some((v) => v.value == this.value)) return false;
|
||||
this.unmatchArray.push(this.value);
|
||||
return true;
|
||||
}
|
||||
// 传入值为Array
|
||||
this.value.forEach((item) => {
|
||||
if (!this.options.some((v) => v.value == item))
|
||||
this.unmatchArray.push(item);
|
||||
});
|
||||
return true;
|
||||
}
|
||||
// 没有value不显示
|
||||
return false;
|
||||
},
|
||||
},
|
||||
filters: {
|
||||
handleArray(array) {
|
||||
if (array.length === 0) return "";
|
||||
return array.reduce((pre, cur) => {
|
||||
return pre + " " + cur;
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
|
331
src/views/inspection/inspection/NewsAnnouncement/index.vue
Normal file
331
src/views/inspection/inspection/NewsAnnouncement/index.vue
Normal file
@ -0,0 +1,331 @@
|
||||
<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="newsTitle">
|
||||
<el-input
|
||||
v-model="queryParams.newsTitle"
|
||||
placeholder="请输入新闻标题"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布单位" prop="publishUnit">
|
||||
<el-input
|
||||
v-model="queryParams.publishUnit"
|
||||
placeholder="请输入发布单位"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="新闻类型" prop="category">
|
||||
<el-select v-model="queryParams.category" placeholder="请选择新闻类型" clearable>
|
||||
<el-option
|
||||
v-for="item in inspection_new_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</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:news:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="newsList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="序号" align="center" prop="orderNum" />-->
|
||||
<el-table-column label="新闻标题" align="center" prop="newsTitle" />
|
||||
<el-table-column label="发布单位" align="center" prop="publishUnit" />
|
||||
<el-table-column label="新闻类型" align="center" prop="category">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="inspection_hygg" :value="scope.row.category"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" align="center" prop="type">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="inspection_new_type" :value="scope.row.type ? scope.row.type.split(',') : []"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="阅读数量" align="center" prop="readNum" />
|
||||
<el-table-column label="点赞数量" align="center" prop="likeNum" />
|
||||
<el-table-column label="收藏数量" align="center" prop="collectNum" />
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{m}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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:news:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:news: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="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="新闻类型" prop="category">
|
||||
<el-select v-model="form.category" placeholder="请选择新闻类型">
|
||||
<el-option
|
||||
v-for="item in inspection_hygg"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="新闻标题" prop="newsTitle">
|
||||
<el-input v-model="form.newsTitle" placeholder="请输入新闻标题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="新闻封面" prop="newsCover">
|
||||
<image-upload v-model="form.newsCover"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="发布单位" prop="publishUnit">
|
||||
<el-input v-model="form.publishUnit" placeholder="请输入发布单位" />
|
||||
</el-form-item>
|
||||
<el-form-item label="新闻内容">
|
||||
<editor v-model="form.newsContent" :min-height="192"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="类型" prop="type">
|
||||
<el-radio-group v-model="form.type">
|
||||
<el-radio v-for="item in inspection_new_type" :label="item.value">{{item.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="视频上传" prop="videoUrl">
|
||||
<video-upload v-model="form.videoUrl"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="序号" prop="orderNum">
|
||||
<el-input v-model="form.orderNum" 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 { listNews, getNews, delNews, addNews, updateNews } from "../api/NewsAnnouncement";
|
||||
import { getDicts } from '@/api/system/dict/data.js'
|
||||
import request from "@/utils/request";
|
||||
import {parseTime} from "../../../../utils/ruoyi";
|
||||
export default {
|
||||
name: "News",
|
||||
data() {
|
||||
return {
|
||||
inspection_new_type: [],
|
||||
inspection_hygg: [],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 新闻公告表格数据
|
||||
newsList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
category: null,
|
||||
newsTitle: null,
|
||||
newsCover: null,
|
||||
publishUnit: null,
|
||||
newsContent: null,
|
||||
type: null,
|
||||
orderNum: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
newsTitle: [
|
||||
{ required: true, message: "新闻标题不能为空", trigger: "blur" }
|
||||
],
|
||||
newsCover: [
|
||||
{ required: true, message: "新闻封面不能为空", trigger: "blur" }
|
||||
],
|
||||
publishUnit: [
|
||||
{ required: true, message: "发布单位不能为空", trigger: "blur" }
|
||||
],
|
||||
newsContent: [
|
||||
{ required: true, message: "新闻内容不能为空", trigger: "blur" }
|
||||
],
|
||||
type: [
|
||||
{ required: true, message: "类型不能为空", trigger: "blur" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
request({
|
||||
url: '/rescue/dict/data/type/inspection_hygg',
|
||||
method: 'get'
|
||||
}).then(res=>{
|
||||
this.$set(this,'inspection_hygg',res.data)
|
||||
})
|
||||
request({
|
||||
url: '/rescue/dict/data/type/inspection_new_type',
|
||||
method: 'get'
|
||||
}).then(res=>{
|
||||
this.$set(this,'inspection_new_type',res.data)
|
||||
})
|
||||
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
parseTime,
|
||||
/** 查询新闻公告列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listNews(this.queryParams).then(response => {
|
||||
this.newsList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
category: null,
|
||||
newsTitle: null,
|
||||
newsCover: null,
|
||||
publishUnit: null,
|
||||
newsContent: null,
|
||||
type: null,
|
||||
videoUrl: null,
|
||||
orderNum: null,
|
||||
readNum: null,
|
||||
likeNum: null,
|
||||
collectNum: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: 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();
|
||||
this.form = row;
|
||||
this.open = true;
|
||||
this.title = "修改新闻公告";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateNews(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addNews(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除新闻公告编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delNews(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/news/export', {
|
||||
...this.queryParams
|
||||
}, `news_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
@ -0,0 +1,345 @@
|
||||
<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="title">
|
||||
<el-input
|
||||
v-model="queryParams.title"
|
||||
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="['shop:couponTemplate: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="['shop:couponTemplate: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="['shop:couponTemplate:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="couponTemplateList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
|
||||
<el-table-column label="优惠券名称" align="center" prop="title" />
|
||||
<el-table-column label="抵扣金额" align="center" prop="discount" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.discount/100 || 0 }}元</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="身份" align="center" prop="roleKey" >
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.roleKey == null ">未知</div>
|
||||
<div v-if="scope.row.roleKey == 'jcdb' ">代办</div>
|
||||
<div v-if="scope.row.roleKey == 'jcdwgly' ">单位管理员</div>
|
||||
<div v-if="scope.row.roleKey == 'jcyh' ">普通用户</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领取多少天内有效" align="center" prop="effectiveDay" />
|
||||
<el-table-column label="生效时间" align="center" prop="startTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="过期时间" align="center" prop="expirationTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.expirationTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="活动开始时间" align="center" prop="eventsStartTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.eventsStartTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="活动结束时间" align="center" prop="eventsEndTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.eventsEndTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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="['shop:couponTemplate:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['shop:couponTemplate: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="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="优惠券名称" prop="title">
|
||||
<el-input v-model="form.title" placeholder="请输入优惠券名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="抵扣金额" prop="discount">
|
||||
<el-input v-model="form.discount" placeholder="请输入抵扣金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="领取多少天内有效" prop="effectiveDay" v-if="form.startTime == null">
|
||||
<el-input v-model="form.effectiveDay" placeholder="请输入领取多少天内有效" />
|
||||
</el-form-item>
|
||||
<el-form-item label="身份" prop="effectiveDay">
|
||||
<el-select v-model="form.roleKey" placeholder="请选择身份">
|
||||
<el-option label="代办" value="jcdb"></el-option>
|
||||
<el-option label="单位管理员" value="jcdwgly"></el-option>
|
||||
<el-option label="普通用户" value="jcyh"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="生效时间" prop="startTime" v-if="form.effectiveDay == null">
|
||||
<el-date-picker clearable
|
||||
v-model="form.startTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择生效时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="过期时间" prop="expirationTime" v-if="form.effectiveDay == null">
|
||||
<el-date-picker clearable
|
||||
v-model="form.expirationTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择过期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动开始时间" prop="eventsStartTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.eventsStartTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择活动开始时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="活动结束时间" prop="eventsEndTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.eventsEndTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择活动结束时间">
|
||||
</el-date-picker>
|
||||
</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 { listCouponTemplate, getCouponTemplate, delCouponTemplate, addCouponTemplate, updateCouponTemplate } from "../api/couponTemplate";
|
||||
|
||||
export default {
|
||||
name: "CouponTemplate",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 优惠券模板表格数据
|
||||
couponTemplateList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
title: null,
|
||||
discount: null,
|
||||
effectiveDay: null,
|
||||
startTime: null,
|
||||
expirationTime: null,
|
||||
eventsStartTime: null,
|
||||
eventsEndTime: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询优惠券模板列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.allPlatform = '1'
|
||||
listCouponTemplate(this.queryParams).then(response => {
|
||||
this.couponTemplateList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
couponType: null,
|
||||
allPlatform: null,
|
||||
partnerId: null,
|
||||
title: null,
|
||||
bindMoudle: null,
|
||||
bindGoodsIds: null,
|
||||
bindPartnerId: null,
|
||||
discount: null,
|
||||
effectiveDay: null,
|
||||
startTime: null,
|
||||
expirationTime: null,
|
||||
eventsStartTime: null,
|
||||
eventsEndTime: null,
|
||||
roleKey: 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
|
||||
getCouponTemplate(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改优惠券模板";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
this.form.couponType = 'cash'
|
||||
this.form.allPlatform = '1'
|
||||
this.form.bindMoudle = '检测项目现金券'
|
||||
this.form.discount = this.form.discount * 100
|
||||
if (this.form.id != null) {
|
||||
updateCouponTemplate(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addCouponTemplate(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除优惠券模板编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delCouponTemplate(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('shop/couponTemplate/export', {
|
||||
...this.queryParams
|
||||
}, `couponTemplate_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
675
src/views/inspection/inspection/PartnerManagement/index.vue
Normal file
675
src/views/inspection/inspection/PartnerManagement/index.vue
Normal file
@ -0,0 +1,675 @@
|
||||
<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="partnerName">
|
||||
<el-input
|
||||
v-model="queryParams.partnerName"
|
||||
placeholder="请输入合作商名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<el-form-item label="状态" prop="isBanned">
|
||||
<el-radio-group v-model="queryParams.isBanned">
|
||||
<el-radio :label="0">正常</el-radio>
|
||||
<el-radio :label="1">封禁</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item style="margin-left: 5%">
|
||||
<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:mallPartners:add']"
|
||||
>新增</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:mallPartners:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="mallPartnersList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
|
||||
<el-table-column label="店主" align="center" prop="userId" >
|
||||
<template slot-scope="scope">
|
||||
|
||||
|
||||
<div style="display: flex;align-items: center ">
|
||||
<div style="margin-right: 5px" > {{scope.row.realName}} </div>
|
||||
<el-button type="text" @click="getlistdian(scope.row)">设置</el-button>
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" align="center" prop="partnerName" />
|
||||
<el-table-column label="合作商Logo" align="center" prop="partnerLogo" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.partnerLogo" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="店铺展示图" align="center" prop="shopImages" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.shopImages" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="联系电话" align="center" prop="contactNumber" />
|
||||
<el-table-column label="详细地址" align="center" prop="address" />
|
||||
|
||||
<!--
|
||||
-->
|
||||
<el-table-column label="评分" align="center" prop="averageScore" />
|
||||
|
||||
<el-table-column label="店铺描述" align="center" prop="remark" />
|
||||
<el-table-column label="营业时间" align="center" prop="workTime" />
|
||||
<el-table-column label="销量" align="center" prop="salesNum" />
|
||||
<el-table-column label="排序" align="center" prop="orderNum" />
|
||||
<el-table-column label="评论" align="center" prop="isBanned" >
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-view"
|
||||
@click="chakanpinglun(scope.row.partnerId)"
|
||||
v-hasPermi="['system:mallPartners:edit']"
|
||||
>查看</el-button>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="isBanned" >
|
||||
<template slot-scope="scope">
|
||||
<el-button type="success" @click="getfj(scope.row)" v-if="scope.row.isBanned == '0'">正常</el-button>
|
||||
<el-button type="danger" @click="getfj(scope.row)" v-if="scope.row.isBanned == '1'">封禁</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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:mallPartners:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:mallPartners:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<el-dialog title="选择店主" :visible.sync="dialogTableVisible">
|
||||
<div style="display: flex;align-items: center; margin: 15px auto;">
|
||||
<div style="width: 70%;margin-right: 10px">
|
||||
<el-input v-model="queryParamsx.phonenumber" placeholder="请输入手机号搜索" ></el-input>
|
||||
</div>
|
||||
|
||||
<el-button type="primary" icon="el-icon-search" @click="getUserList()">搜索</el-button>
|
||||
</div>
|
||||
<el-table :data="userList">
|
||||
<el-table-column property="createBy" label="账号信息" width="150"></el-table-column>
|
||||
<el-table-column property="realName" label="真实姓名" width="150"></el-table-column>
|
||||
<el-table-column property="phonenumber" label="手机号" width="200"></el-table-column>
|
||||
<el-table-column label="操作" align="center" >
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" @click="getcaozuo(scope.row.userId)">设为店主</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="forpinglunUser"
|
||||
/>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- 添加或修改合作商管理对话框 点击新增弹出 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
|
||||
<el-form-item label="合作商名称" prop="partnerName">
|
||||
<el-input v-model="form.partnerName" placeholder="请输入合作商名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="合作商Logo" prop="partnerLogo">
|
||||
<image-upload v-model="form.partnerLogo"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="店铺展示图" prop="shopImages">
|
||||
<image-upload v-model="form.shopImages"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="联系电话" prop="contactNumber">
|
||||
<el-input v-model="form.contactNumber" placeholder="请输入联系电话" />
|
||||
</el-form-item>
|
||||
<el-form-item label="详细地址" prop="address">
|
||||
<el-input v-model="form.address" placeholder="请输入详细地址" />
|
||||
</el-form-item>
|
||||
<el-form-item label="选择位置" prop="province">
|
||||
<el-button type="primary" icon="el-icon-location-outline"
|
||||
@click="chooseLatLng('group',form.latitude,form.longitude)"></el-button>
|
||||
</el-form-item>
|
||||
<div class="mapPop" v-show="mapOpen" style="z-index: 999">
|
||||
<div class="title">单击位置选点,用于小程序导航使用 <span @click="mapOpen = false">X</span></div>
|
||||
<div id="map" style="width: 800px;height: 500px"></div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<el-form-item label="店铺描述" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入店铺描述" />
|
||||
</el-form-item>
|
||||
<el-form-item label="营业时间" prop="workTime">
|
||||
<el-input v-model="form.workTime" placeholder="请输入营业时间" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="排序" prop="orderNum">
|
||||
<el-input v-model="form.orderNum" 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>
|
||||
<el-dialog title="评论列表" :visible.sync="dialogTableVisibles">
|
||||
<el-table :data="pinglunlist">
|
||||
<el-table-column property="commentDesc" label="评论" width="300"></el-table-column>
|
||||
<el-table-column property="commentStar" label="评分" width="150">
|
||||
<template slot-scope="scope">
|
||||
<div>{{scope.row.commentStar}}</div>
|
||||
<!-- scope.row.commentStar-->
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column property="realName" label="姓名" width="200"></el-table-column>
|
||||
<el-table-column property="commentTime" label="时间"></el-table-column>
|
||||
<el-table-column property="id" label="操作">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="pinglundelete(scope.row.id)"
|
||||
v-hasPermi="['system:mallPartners:remove']"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="pltotal>0"
|
||||
:total="pltotal"
|
||||
:page.sync="plfye.pageNum"
|
||||
:limit.sync="plfye.pageSize"
|
||||
@pagination="forpinglun()"
|
||||
/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listUser,} from "@/api/system/user";
|
||||
import {pinglunshanchu, pinglun, fjPartners, listMallPartners, getMallPartners, delMallPartners, addMallPartners, updateMallPartners,listCategory } from "../api/Partner";
|
||||
// 引入加载TXMap的方法
|
||||
// import TMap from "@/utils/initMap";
|
||||
export default {
|
||||
name: "MallPartners",
|
||||
data() {
|
||||
return {
|
||||
value:true,
|
||||
mapOpen:false,
|
||||
mapType: null,
|
||||
centerPoint: {
|
||||
latitude: 39.984120,
|
||||
longitude: 116.307484
|
||||
},
|
||||
shopconfigList: [],
|
||||
shopConfig: {},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 合作商管理表格数据
|
||||
mallPartnersList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
plfye:{
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
},
|
||||
pltotal:0,
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userId: null,
|
||||
type: null,
|
||||
partnerName: null,
|
||||
partnerLogo: null,
|
||||
shopImages: null,
|
||||
contactNumber: null,
|
||||
address: null,
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
partnerCategoryId: null,
|
||||
averageScore: null,
|
||||
longitude: null,
|
||||
latitude: null,
|
||||
workTime: null,
|
||||
salesNum: null,
|
||||
orderNum: null,
|
||||
isBanned: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
userId: [
|
||||
{ required: true, message: "用户id不能为空", trigger: "blur" }
|
||||
],
|
||||
partnerName: [
|
||||
{ required: true, message: "合作商名称不能为空", trigger: "blur" }
|
||||
],
|
||||
partnerLogo: [
|
||||
{ required: true, message: "合作商Logo不能为空", trigger: "blur" }
|
||||
],
|
||||
shopImages: [
|
||||
{ required: true, message: "店铺展示图不能为空", trigger: "blur" }
|
||||
],
|
||||
contactNumber: [
|
||||
{ required: true, message: "联系电话不能为空", trigger: "blur" }
|
||||
],
|
||||
address: [
|
||||
{ required: true, message: "详细地址不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
options: [],
|
||||
//需要传给商家分类id的
|
||||
queryParamss: {
|
||||
pageNum: 1,
|
||||
pageSize: 9999,
|
||||
pid: null,
|
||||
categoryName: null,
|
||||
orderNum: null
|
||||
},
|
||||
gridData: [{
|
||||
date: '2016-05-02',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1518 弄'
|
||||
}, {
|
||||
date: '2016-05-04',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1518 弄'
|
||||
}, {
|
||||
date: '2016-05-01',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1518 弄'
|
||||
}, {
|
||||
date: '2016-05-03',
|
||||
name: '王小虎',
|
||||
address: '上海市普陀区金沙江路 1518 弄'
|
||||
}],
|
||||
userList:[],
|
||||
pinglunlist:[],
|
||||
dialogTableVisibles:false,
|
||||
dialogTableVisible: false,
|
||||
queryParamsx: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userName: undefined,
|
||||
phonenumber: undefined,
|
||||
status: undefined,
|
||||
deptId: undefined
|
||||
},
|
||||
dateRange: [],
|
||||
linglist:{},
|
||||
// ----
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
mounted() {
|
||||
//this.mapInit()
|
||||
},
|
||||
methods: {
|
||||
pinglundelete(id){
|
||||
console.log(id)
|
||||
let data = {
|
||||
orderId :id
|
||||
}
|
||||
pinglunshanchu(data).then(res=>{
|
||||
console.log(res)
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
})
|
||||
},
|
||||
getlistdian(row){
|
||||
// console.log(row)
|
||||
|
||||
this.linglist = row
|
||||
this.dialogTableVisible = true
|
||||
this.getUserList()
|
||||
|
||||
},
|
||||
getcaozuo(userid){
|
||||
console.log(userid)
|
||||
this.linglist.userId = userid
|
||||
updateMallPartners(this.linglist).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
|
||||
},
|
||||
getfj(row){
|
||||
console.log(row.isBanned,'1111')
|
||||
if (row.isBanned=='1'){
|
||||
row.isBanned='0'
|
||||
}else if(row.isBanned=='0'){
|
||||
row.isBanned='1'
|
||||
}
|
||||
console.log(row.isBanned,'222')
|
||||
fjPartners(row).then(res =>{
|
||||
this.$message.success("成功")
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
chakanpinglun(id){
|
||||
this.partnerId = id
|
||||
let data = {
|
||||
partnerId : this.partnerId,
|
||||
pageNum: this.plfye.pageNum,//第几页
|
||||
pageSize: this.plfye.pageSize,//一页多少张
|
||||
}
|
||||
this.dialogTableVisibles = true
|
||||
pinglun(data).then(res=>{
|
||||
console.log(res)
|
||||
this.pinglunlist = res.rows
|
||||
this.pltotal = res.total
|
||||
})
|
||||
},
|
||||
forpinglun(){
|
||||
|
||||
let data = {
|
||||
partnerId : this.partnerId,
|
||||
pageNum: this.plfye.pageNum,//第几页
|
||||
pageSize: this.plfye.pageSize,//一页多少张
|
||||
}
|
||||
this.dialogTableVisibles = true
|
||||
pinglun(data).then(res=>{
|
||||
console.log(res)
|
||||
this.pinglunlist = res.rows
|
||||
this.pltotal = res.total
|
||||
})
|
||||
},
|
||||
forpinglunUser(){
|
||||
|
||||
let data = {
|
||||
partnerId : this.partnerId,
|
||||
pageNum: this.queryParams.pageNum,//第几页
|
||||
pageSize: this.queryParams.pageSize,//一页多少张
|
||||
}
|
||||
listUser(data).then(response => {
|
||||
this.userList = response.rows;
|
||||
this.total = response.total
|
||||
} );
|
||||
|
||||
},
|
||||
|
||||
/** 查询合作商管理列表 */
|
||||
|
||||
getList() {
|
||||
|
||||
this.loading = true;
|
||||
listMallPartners(this.queryParams).then(response => {
|
||||
this.mallPartnersList = response.rows;
|
||||
console.log('查询合作商管理列表 ',this.mallPartnersList)
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
listCategory(this.queryParamss).then(responses => {
|
||||
this.options = responses.rows;
|
||||
});
|
||||
|
||||
},
|
||||
getUserList(){
|
||||
// 店主列表
|
||||
listUser(this.addDateRange(this.queryParamsx, this.dateRange)).then(response => {
|
||||
this.userList = response.rows;
|
||||
this.total = response.total
|
||||
this.queryParamsx.phonenumber = undefined
|
||||
// console.log('userlist',response.rows)
|
||||
} );
|
||||
},
|
||||
//获取地址
|
||||
mapInit(lat, lng) {
|
||||
console.log(lat, lng)
|
||||
let that = this;
|
||||
let map = new qq.maps.Map(document.getElementById("map"), {
|
||||
center: new qq.maps.LatLng(lat, lng),
|
||||
zoom: 13
|
||||
});
|
||||
let marker = new qq.maps.Marker({
|
||||
map: map,
|
||||
position: new qq.maps.LatLng(lat, lng),
|
||||
});
|
||||
|
||||
//添加监听事件
|
||||
qq.maps.event.addListener(map, 'click', function (event) {
|
||||
console.log('经纬赋值',event.latLng.lat, event.latLng.lng);
|
||||
// this.queryParams.longitude = event.latLng.lat
|
||||
// this.queryParams.latitude = event.latLng.lng
|
||||
// console.log('赋值后', this.queryParams.longitude, this.queryParams.latitude);
|
||||
let marker = new qq.maps.Marker({
|
||||
map: map,
|
||||
position: new qq.maps.LatLng(event.latLng.lat, event.latLng.lng),
|
||||
});
|
||||
setTimeout(() => {
|
||||
that.setValueLatLng(event.latLng.lat, event.latLng.lng)
|
||||
}, 500)
|
||||
});
|
||||
},
|
||||
chooseLatLng(type, lat, lng) {
|
||||
this.mapOpen = true
|
||||
this.mapInit(lat, lng);
|
||||
this.mapType = type
|
||||
},
|
||||
//经纬度
|
||||
setValueLatLng(lat, lng) {
|
||||
console.log('这一步',lat, lng)
|
||||
this.form.latitude=lat
|
||||
this.form.longitude=lng
|
||||
// if (this.mapType == "group") {
|
||||
// this.form.groupLongitude = lng
|
||||
// this.form.groupLatitude = lat
|
||||
// }
|
||||
// if (this.mapType == "school") {
|
||||
// this.form.schoolLongitude = lng
|
||||
// this.form.schoolLatitude = lat
|
||||
// }
|
||||
this.mapOpen = false
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
partnerId: null,
|
||||
userId: null,
|
||||
type: null,
|
||||
partnerName: null,
|
||||
partnerLogo: null,
|
||||
shopImages: null,
|
||||
contactNumber: null,
|
||||
address: null,
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
partnerCategoryId: null,
|
||||
averageScore: null,
|
||||
longitude: null,
|
||||
latitude: null,
|
||||
remark: null,
|
||||
workTime: null,
|
||||
salesNum: null,
|
||||
orderNum: null,
|
||||
isBanned: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: 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.partnerId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.form.latitude="28.8696310243285"
|
||||
this.form.longitude="105.4421806242317"
|
||||
this.open = true;
|
||||
this.title = "添加合作商管理";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
this.form = row
|
||||
this.open = true;
|
||||
this.title = "修改合作商管理";
|
||||
|
||||
},
|
||||
//id
|
||||
getcategoryid(){
|
||||
console.log('fenlei', this.form.partnerCategoryId)
|
||||
},
|
||||
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
if (!this.form.longitude||!this.form.latitude){
|
||||
this.$message.warning("请选择位置")
|
||||
return
|
||||
}
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.partnerId != null) {
|
||||
updateMallPartners(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addMallPartners(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const partnerIds = row.partnerId || this.ids;
|
||||
this.$modal.confirm('是否确认删除合作商管理编号为"' + partnerIds + '"的数据项?').then(function() {
|
||||
return delMallPartners(partnerIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/mallPartners/export', {
|
||||
...this.queryParams
|
||||
}, `mallPartners_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.mapPop {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
#map {
|
||||
border: 2px solid #d5d5d5;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 10px;
|
||||
background-color: #00afff;
|
||||
color: #FFF;
|
||||
|
||||
span {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
.dianz{
|
||||
cursor:pointer;
|
||||
color: #1c84c6;
|
||||
}
|
||||
</style>
|
@ -0,0 +1,289 @@
|
||||
<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="partnerName">
|
||||
<el-input
|
||||
v-model="queryParams.partnerName"
|
||||
placeholder="请输入店铺名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="联系电话" prop="phone">
|
||||
<el-input
|
||||
v-model="queryParams.phone"
|
||||
placeholder="请输入联系电话"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="phone">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择状态">
|
||||
<el-option label="待审核" value="1"></el-option>
|
||||
<el-option label="已通过" value="2"></el-option>
|
||||
<el-option label="已拒绝" value="3"></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-table v-loading="loading" :data="detailList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
||||
<!-- <el-table-column label="用户主键" align="center" prop="userId" />-->
|
||||
<!-- <el-table-column label="合作商类型" align="center" prop="type" />-->
|
||||
<!-- <el-table-column label="合作商主键" align="center" prop="partnerId" />-->
|
||||
<el-table-column label="店铺名称" align="center" prop="partnerName" />
|
||||
<el-table-column label="营业执照" align="center" prop="businessLicense" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.businessLicense" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="门头信息" align="center" prop="shopImage" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.shopImage" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="位置信息" align="center" prop="position" />
|
||||
<el-table-column label="联系电话" align="center" prop="phone" />
|
||||
<el-table-column label="身份证正面" align="center" prop="idCardFront" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.idCardFront" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="身份证反面" align="center" prop="idCardBack" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.idCardBack" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="status" >
|
||||
<template slot-scope="scope">
|
||||
<div v-if="scope.row.status == 1">
|
||||
<el-tag type="warning">待审核</el-tag>
|
||||
</div>
|
||||
<div v-if="scope.row.status == 2">
|
||||
<el-tag type="success">已通过</el-tag>
|
||||
</div>
|
||||
<div v-if="scope.row.status == 3">
|
||||
<el-tag type="danger">已拒绝</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.status == 1"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:detail:edit']"
|
||||
>审核</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="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
|
||||
|
||||
|
||||
|
||||
<el-form-item label="是否通过">
|
||||
<el-select v-model="form.status" placeholder="请选择活动区域">
|
||||
<el-option label="通过" value="2"></el-option>
|
||||
<el-option label="不通过" value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注">
|
||||
<el-input type="textarea" v-model="form.rejectReason"></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 { listDetail, getDetail, delDetail, addDetail, updateDetail,examine} from "../api/partnerApply";
|
||||
|
||||
export default {
|
||||
name: "Detail",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 合作商申请表格数据
|
||||
detailList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
userId: null,
|
||||
type: null,
|
||||
partnerId: null,
|
||||
partnerName: null,
|
||||
businessLicense: null,
|
||||
shopImage: null,
|
||||
position: null,
|
||||
phone: null,
|
||||
idCardFront: null,
|
||||
idCardBack: null,
|
||||
status: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询合作商申请列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listDetail(this.queryParams).then(response => {
|
||||
this.detailList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
userId: null,
|
||||
type: null,
|
||||
partnerId: null,
|
||||
partnerName: null,
|
||||
businessLicense: null,
|
||||
shopImage: null,
|
||||
position: null,
|
||||
phone: null,
|
||||
idCardFront: null,
|
||||
idCardBack: null,
|
||||
status: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: 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
|
||||
getDetail(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) {
|
||||
examine(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
examine(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
this.getList();
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除合作商申请编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delDetail(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/detail/export', {
|
||||
...this.queryParams
|
||||
}, `detail_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
377
src/views/inspection/inspection/PartnerManagement/siteInfo.vue
Normal file
377
src/views/inspection/inspection/PartnerManagement/siteInfo.vue
Normal file
@ -0,0 +1,377 @@
|
||||
<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="siteName">
|
||||
<el-input
|
||||
v-model="queryParams.siteName"
|
||||
placeholder="请输入站点名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<el-form-item label="联系人" prop="siteContractName">
|
||||
<el-input
|
||||
v-model="queryParams.siteContractName"
|
||||
placeholder="请输入联系人"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="siteContractPhone">
|
||||
<el-input
|
||||
v-model="queryParams.siteContractPhone"
|
||||
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="['inspection:info: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="['inspection:info: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="['inspection:info:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="infoList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
|
||||
<el-table-column label="站点名称" align="center" prop="siteName" />
|
||||
|
||||
<el-table-column label="位置详细" align="center" prop="siteAddress" />
|
||||
<el-table-column label="联系人" align="center" prop="siteContractName" />
|
||||
<el-table-column label="电话" align="center" prop="siteContractPhone" />
|
||||
<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="['inspection:info:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['inspection:info: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"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改inspection对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="站点名称" prop="siteName">
|
||||
<el-input v-model="form.siteName" placeholder="请输入站点名称" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="选择位置" prop="province">
|
||||
<el-button type="primary" icon="el-icon-location-outline"
|
||||
@click="chooseLatLng('group',form.siteLatitude,form.siteLongitude)"></el-button>
|
||||
</el-form-item>
|
||||
<div class="mapPop" v-show="mapOpen" style="z-index: 999">
|
||||
<div class="title">单击位置选点,用于小程序导航使用 <span @click="mapOpen = false">X</span></div>
|
||||
<div id="map" style="width: 800px;height: 500px"></div>
|
||||
</div>
|
||||
<el-form-item label="位置详细" prop="siteAddress">
|
||||
<el-input v-model="form.siteAddress" placeholder="请输入位置详细" />
|
||||
</el-form-item>
|
||||
<el-form-item label="联系人" prop="siteContractName">
|
||||
<el-input v-model="form.siteContractName" placeholder="请输入联系人" />
|
||||
</el-form-item>
|
||||
<el-form-item label="电话" prop="siteContractPhone">
|
||||
<el-input v-model="form.siteContractPhone" 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 { listInfo, getInfo, delInfo, addInfo, updateInfo } from "../api/siteInfo";
|
||||
|
||||
export default {
|
||||
name: "Info",
|
||||
data() {
|
||||
return {
|
||||
mapOpen:false,
|
||||
mapType: null,
|
||||
centerPoint: {
|
||||
latitude: 28.87094638073256,
|
||||
longitude: 105.44209957122803
|
||||
},
|
||||
shopconfigList: [],
|
||||
shopConfig: {},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// inspection表格数据
|
||||
infoList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
siteName: null,
|
||||
siteLongitude: null,
|
||||
siteLatitude: null,
|
||||
siteAddress: null,
|
||||
siteContractName: null,
|
||||
siteContractPhone: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询inspection列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listInfo(this.queryParams).then(response => {
|
||||
this.infoList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
//获取地址
|
||||
mapInit(lat, lng) {
|
||||
console.log(lat, lng)
|
||||
lat = lat?lat:this.centerPoint.latitude
|
||||
lng = lng?lng:this.centerPoint.longitude
|
||||
let that = this;
|
||||
let map = new qq.maps.Map(document.getElementById("map"), {
|
||||
center: new qq.maps.LatLng(lat, lng),
|
||||
zoom: 13
|
||||
});
|
||||
let marker = new qq.maps.Marker({
|
||||
map: map,
|
||||
position: new qq.maps.LatLng(lat, lng),
|
||||
});
|
||||
|
||||
//添加监听事件
|
||||
qq.maps.event.addListener(map, 'click', function (event) {
|
||||
console.log('经纬赋值',event.latLng.lat, event.latLng.lng);
|
||||
// this.queryParams.longitude = event.latLng.lat
|
||||
// this.queryParams.latitude = event.latLng.lng
|
||||
// console.log('赋值后', this.queryParams.longitude, this.queryParams.latitude);
|
||||
let marker = new qq.maps.Marker({
|
||||
map: map,
|
||||
position: new qq.maps.LatLng(event.latLng.lat, event.latLng.lng),
|
||||
});
|
||||
setTimeout(() => {
|
||||
that.setValueLatLng(event.latLng.lat, event.latLng.lng)
|
||||
}, 500)
|
||||
});
|
||||
},
|
||||
chooseLatLng(type, lat, lng) {
|
||||
|
||||
this.mapOpen = true
|
||||
this.mapInit(lat, lng);
|
||||
this.mapType = type
|
||||
},
|
||||
//经纬度
|
||||
setValueLatLng(lat, lng) {
|
||||
console.log('这一步',lat, lng)
|
||||
this.form.siteLatitude=lat
|
||||
this.form.siteLongitude=lng
|
||||
// if (this.mapType == "group") {
|
||||
// this.form.groupLongitude = lng
|
||||
// this.form.groupLatitude = lat
|
||||
// }
|
||||
// if (this.mapType == "school") {
|
||||
// this.form.schoolLongitude = lng
|
||||
// this.form.schoolLatitude = lat
|
||||
// }
|
||||
this.mapOpen = false
|
||||
},
|
||||
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
siteName: null,
|
||||
siteLongitude: null,
|
||||
siteLatitude: null,
|
||||
siteAddress: null,
|
||||
siteContractName: null,
|
||||
siteContractPhone: null,
|
||||
orderNum: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: 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 = "添加inspection";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const id = row.id || this.ids
|
||||
getInfo(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改inspection";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addInfo(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除inspection编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delInfo(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('inspection/info/export', {
|
||||
...this.queryParams
|
||||
}, `info_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.mapPop {
|
||||
position: fixed;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
|
||||
#map {
|
||||
border: 2px solid #d5d5d5;
|
||||
}
|
||||
|
||||
.title {
|
||||
padding: 10px;
|
||||
background-color: #00afff;
|
||||
color: #FFF;
|
||||
|
||||
span {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
.dianz{
|
||||
cursor:pointer;
|
||||
color: #1c84c6;
|
||||
}
|
||||
</style>
|
44
src/views/inspection/inspection/api/NewsAnnouncement.js
Normal file
44
src/views/inspection/inspection/api/NewsAnnouncement.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询新闻公告列表
|
||||
export function listNews(query) {
|
||||
return request({
|
||||
url: '/system/inspectionNews/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询新闻公告详细
|
||||
export function getNews(id) {
|
||||
return request({
|
||||
url: '/system/inspectionNews/list?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增新闻公告
|
||||
export function addNews(data) {
|
||||
return request({
|
||||
url: '/system/inspectionNews/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改新闻公告
|
||||
export function updateNews(data) {
|
||||
return request({
|
||||
url: '/system/inspectionNews/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除新闻公告
|
||||
export function delNews(id) {
|
||||
return request({
|
||||
url: '/system/inspectionNews/del?idList=' + id,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
75
src/views/inspection/inspection/api/Partner.js
Normal file
75
src/views/inspection/inspection/api/Partner.js
Normal file
@ -0,0 +1,75 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询合作商管理列表
|
||||
export function listMallPartners(query) {
|
||||
return request({
|
||||
url: '/system/inspectionMallPartners/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// pinglunshanchu
|
||||
export function pinglunshanchu(data) {
|
||||
return request({
|
||||
url: '/system/inspectionMallPartners/delCommentByOrderId',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// pinglun
|
||||
export function pinglun(query) {
|
||||
return request({
|
||||
url: '/system/inspectionMallPartners/listComment',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询【商家分类id】列表
|
||||
export function listCategory(query) {
|
||||
return request({
|
||||
url: '/system/shopInspectionCategory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
// 查询合作商管理详细
|
||||
export function getMallPartners(partnerId) {
|
||||
return request({
|
||||
url: '/system/inspectionMallPartners/list?partnerId=' + partnerId,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增合作商管理
|
||||
export function addMallPartners(data) {
|
||||
return request({
|
||||
url: '/system/inspectionMallPartners/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改合作商管理
|
||||
export function updateMallPartners(data) {
|
||||
return request({
|
||||
url: '/system/inspectionMallPartners/setShopAdmin',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除合作商管理
|
||||
export function delMallPartners(partnerId) {
|
||||
return request({
|
||||
url: '/system/inspectionMallPartners/del?idList=' + partnerId,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
// 封禁
|
||||
export function fjPartners(data) {
|
||||
return request({
|
||||
url: '/system/inspectionMallPartners/banned',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
44
src/views/inspection/inspection/api/couponTemplate.js
Normal file
44
src/views/inspection/inspection/api/couponTemplate.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询优惠券模板列表
|
||||
export function listCouponTemplate(query) {
|
||||
return request({
|
||||
url: '/shop/couponTemplate/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询优惠券模板详细
|
||||
export function getCouponTemplate(id) {
|
||||
return request({
|
||||
url: '/shop/couponTemplate/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增优惠券模板
|
||||
export function addCouponTemplate(data) {
|
||||
return request({
|
||||
url: '/shop/couponTemplate',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改优惠券模板
|
||||
export function updateCouponTemplate(data) {
|
||||
return request({
|
||||
url: '/shop/couponTemplate',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除优惠券模板
|
||||
export function delCouponTemplate(id) {
|
||||
return request({
|
||||
url: '/shop/couponTemplate/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
src/views/inspection/inspection/api/inspection.js
Normal file
44
src/views/inspection/inspection/api/inspection.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询【请填写功能名称】列表
|
||||
export function listCategory(query) {
|
||||
return request({
|
||||
url: '/system/shopInspectionCategory/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询【请填写功能名称】详细
|
||||
export function getCategory(id) {
|
||||
return request({
|
||||
url: '/system/shopInspectionCategory/getById?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增【请填写功能名称】
|
||||
export function addCategory(data) {
|
||||
return request({
|
||||
url: '/system/shopInspectionCategory/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改【请填写功能名称】
|
||||
export function updateCategory(data) {
|
||||
return request({
|
||||
url: '/system/shopInspectionCategory/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除【请填写功能名称】
|
||||
export function delCategory(id) {
|
||||
return request({
|
||||
url: '/system/shopInspectionCategory/del?idList=' + id,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
52
src/views/inspection/inspection/api/partnerApply.js
Normal file
52
src/views/inspection/inspection/api/partnerApply.js
Normal file
@ -0,0 +1,52 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询合作商申请列表
|
||||
export function listDetail(query) {
|
||||
return request({
|
||||
url: '/partner/detail/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询合作商申请详细
|
||||
export function getDetail(id) {
|
||||
return request({
|
||||
url: '/partner/detail/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增合作商申请
|
||||
export function addDetail(data) {
|
||||
return request({
|
||||
url: '/partner/detail',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改合作商申请
|
||||
export function updateDetail(data) {
|
||||
return request({
|
||||
url: '/partner/detail',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
// 是否合格
|
||||
export function examine(data) {
|
||||
return request({
|
||||
url: '/partner/detail/examine',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除合作商申请
|
||||
export function delDetail(id) {
|
||||
return request({
|
||||
url: '/partner/detail/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
src/views/inspection/inspection/api/siteInfo.js
Normal file
44
src/views/inspection/inspection/api/siteInfo.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询inspection列表
|
||||
export function listInfo(query) {
|
||||
return request({
|
||||
url: '/inspection/info/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询inspection详细
|
||||
export function getInfo(id) {
|
||||
return request({
|
||||
url: '/inspection/info/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增inspection
|
||||
export function addInfo(data) {
|
||||
return request({
|
||||
url: '/inspection/info',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改inspection
|
||||
export function updateInfo(data) {
|
||||
return request({
|
||||
url: '/inspection/info',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除inspection
|
||||
export function delInfo(id) {
|
||||
return request({
|
||||
url: '/inspection/info/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
44
src/views/inspection/inspection/fzRecord/api/fzApi.js
Normal file
44
src/views/inspection/inspection/fzRecord/api/fzApi.js
Normal file
@ -0,0 +1,44 @@
|
||||
import request from '@/utils/request'
|
||||
|
||||
// 查询分账记录列表
|
||||
export function listFzRecord(query) {
|
||||
return request({
|
||||
url: '/fzRecord/fzRecord/list',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询分账记录详细
|
||||
export function getFzRecord(id) {
|
||||
return request({
|
||||
url: '/fzRecord/fzRecord/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增分账记录
|
||||
export function addFzRecord(data) {
|
||||
return request({
|
||||
url: '/fzRecord/fzRecord',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改分账记录
|
||||
export function updateFzRecord(data) {
|
||||
return request({
|
||||
url: '/fzRecord/fzRecord',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除分账记录
|
||||
export function delFzRecord(id) {
|
||||
return request({
|
||||
url: '/fzRecord/fzRecord/' + id,
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
236
src/views/inspection/inspection/fzRecord/fzList.vue
Normal file
236
src/views/inspection/inspection/fzRecord/fzList.vue
Normal file
@ -0,0 +1,236 @@
|
||||
<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="partnerName">
|
||||
<el-input
|
||||
v-model="queryParams.partnerName"
|
||||
placeholder="请输入商户名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="单号" prop="orderNo">
|
||||
<el-input
|
||||
v-model="queryParams.orderNo"
|
||||
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-table v-loading="loading" :data="fzRecordList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="商户名称" align="center" prop="partnerName" />
|
||||
<el-table-column label="单号" align="center" prop="orderNo" />
|
||||
<el-table-column label="入账金额" align="center" prop="amount" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.amount/100 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="总金额" align="center" prop="totalAmount" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.totalAmount/100 }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否成功" align="center" prop="isSuccess" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ scope.row.isSuccess==='1'?'成功':'失败' }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注说明" align="center" prop="reason" >
|
||||
<template slot-scope="scope">
|
||||
<el-popover
|
||||
placement="top-start"
|
||||
title="备注说明"
|
||||
width="200"
|
||||
trigger="hover"
|
||||
:content="scope.row.reason">
|
||||
<el-button slot="reference">备注说明</el-button>
|
||||
</el-popover>
|
||||
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
|
||||
</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="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="单号" prop="orderNo">
|
||||
<el-input v-model="form.orderNo" 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 { listFzRecord, getFzRecord, delFzRecord, addFzRecord, updateFzRecord } from "./api/fzApi";
|
||||
|
||||
export default {
|
||||
name: "FzRecord",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 分账记录表格数据
|
||||
fzRecordList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
partnerName: null,
|
||||
orderNo: null,
|
||||
isSuccess: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询分账记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listFzRecord(this.queryParams).then(response => {
|
||||
this.fzRecordList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
partnerId: null,
|
||||
partnerName: null,
|
||||
orderId: null,
|
||||
orderNo: null,
|
||||
amount: null,
|
||||
totalAmount: null,
|
||||
isSuccess: null,
|
||||
reason: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: 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
|
||||
getFzRecord(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) {
|
||||
updateFzRecord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addFzRecord(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除分账记录编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delFzRecord(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('fzRecord/fzRecord/export', {
|
||||
...this.queryParams
|
||||
}, `fzRecord_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
291
src/views/inspection/inspection/inspectionCategory/index.vue
Normal file
291
src/views/inspection/inspection/inspectionCategory/index.vue
Normal file
@ -0,0 +1,291 @@
|
||||
<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="categoryName">
|
||||
<el-input
|
||||
v-model="queryParams.categoryName"
|
||||
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:category:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="categoryList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
||||
<!-- <el-table-column label="父分类" align="center" prop="pid" />-->
|
||||
<el-table-column label="分类名称" align="center" prop="categoryName" />
|
||||
<el-table-column label="排序" align="center" prop="orderNum" />
|
||||
<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:category:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:category: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="900px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="排序" prop="orderNum">
|
||||
<el-input v-model="form.orderNum" placeholder="请输入排序" />
|
||||
</el-form-item>
|
||||
<el-form-item label="分类名称" prop="categoryName">
|
||||
<el-input v-model="form.categoryName" placeholder="请输入分类名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图标" prop="shopImages">
|
||||
<image-upload v-model="form.image"/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
<div v-for="(item,index) in form.templates" :key="index" style="width: 100%; display: flex; align-items: center">
|
||||
<el-form-item label="规格名称" prop="categoryName">
|
||||
<el-input v-model="item.skuName" placeholder="请输入规格名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="价格" prop="categoryName">
|
||||
<el-input-number v-model="item.skuPrice" @change="handleChange" :min="0" :max="999999999" label="请输入价格"></el-input-number>
|
||||
</el-form-item>
|
||||
<div style="margin-left: 20px">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="deletecomm(index)"
|
||||
v-hasPermi="['system:category:remove']"
|
||||
>删除</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="width: 100%; margin: 20px auto; display: flex;align-items: center; justify-content: flex-end ">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="addCommodity()" >新增</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>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listCategory, getCategory, delCategory, addCategory, updateCategory } from "../api/inspection";
|
||||
|
||||
export default {
|
||||
name: "Category",
|
||||
data() {
|
||||
return {
|
||||
|
||||
skuName:'',
|
||||
skuPrice:'',
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 【请填写功能名称】表格数据
|
||||
categoryList: [],
|
||||
// 弹出层标题
|
||||
titletitle: "编辑",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
pid: null,
|
||||
categoryName: null,
|
||||
orderNum: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {
|
||||
image:'',
|
||||
templates:[{
|
||||
skuName:'',
|
||||
skuPrice:0
|
||||
}]
|
||||
},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询【请填写功能名称】列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listCategory(this.queryParams).then(response => {
|
||||
this.categoryList = response.data.list;
|
||||
this.total = response.data.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
addCommodity(){
|
||||
let data = {
|
||||
skuName:this.skuName,
|
||||
skuPrice:this.skuPrice
|
||||
}
|
||||
this.form.templates.push(data)
|
||||
},
|
||||
deletecomm(index){
|
||||
this.form.templates.splice(index, 1);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
handleChange(value) {
|
||||
console.log(value);
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
pid: null,
|
||||
categoryName: null,
|
||||
orderNum: null,
|
||||
templates:[{
|
||||
skuName:'',
|
||||
skuPrice:0
|
||||
}]
|
||||
};
|
||||
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();
|
||||
getCategory(row.id).then(res=>{
|
||||
this.form = res.data;
|
||||
this.form.templates.forEach(it=>{
|
||||
it.skuPrice = it.skuPrice / 100
|
||||
})
|
||||
})
|
||||
this.open = true;
|
||||
this.title = "编辑";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
let json = JSON.parse(JSON.stringify(this.form))
|
||||
json.templates.forEach(it=>{
|
||||
it.skuPrice = it.skuPrice *100
|
||||
})
|
||||
updateCategory(json).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
let json = JSON.parse(JSON.stringify(this.form))
|
||||
json.templates.forEach(it=>{
|
||||
it.skuPrice = it.skuPrice *100
|
||||
})
|
||||
addCategory(json).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除?').then(function() {
|
||||
return delCategory(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/category/export', {
|
||||
...this.queryParams
|
||||
}, `category_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
62
src/views/inspection/inspectionGoods/api/inspectionGoods.js
Normal file
62
src/views/inspection/inspectionGoods/api/inspectionGoods.js
Normal file
@ -0,0 +1,62 @@
|
||||
|
||||
|
||||
import request from '@/utils/request'
|
||||
// 查询检测商品列表
|
||||
export function listInspectionGoods(query) {
|
||||
return request({
|
||||
url: '/system/inspectionGoods/listSystem',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
// 查询检测商品详细
|
||||
export function getInspectionGoods(id) {
|
||||
return request({
|
||||
url: '/system/inspectionGoods/' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 新增检测商品
|
||||
export function addInspectionGoods(data) {
|
||||
return request({
|
||||
url: '/system/inspectionGoods/add',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改检测商品
|
||||
export function updateInspectionGoods(data) {
|
||||
return request({
|
||||
url: '/system/inspectionGoods/edit',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除检测商品
|
||||
export function delInspectionGoods(id) {
|
||||
return request({
|
||||
url: '/system/inspectionGoods/del?idList=' + id,
|
||||
method: 'post'
|
||||
})
|
||||
}
|
||||
//首页推荐
|
||||
export function homeGoods(data) {
|
||||
return request({
|
||||
url: '/system/homeGoods/add',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
//提交审核
|
||||
export function tijiaoshenhe(data) {
|
||||
return request({
|
||||
url: '/system/inspectionGoods/examine',
|
||||
method: 'post',
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
573
src/views/inspection/inspectionGoods/index.vue
Normal file
573
src/views/inspection/inspectionGoods/index.vue
Normal file
@ -0,0 +1,573 @@
|
||||
<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="title">
|
||||
<el-input
|
||||
v-model="queryParams.title"
|
||||
placeholder="请输入商品标题"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="上下架" prop="title">
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.isListing"-->
|
||||
<!-- placeholder="上架输入1下架输入0"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<el-select v-model="queryParams.isListing" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in sxjarr"
|
||||
: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:inspectionGoods: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:inspectionGoods: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:inspectionGoods:remove']"
|
||||
>删除</el-button>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="inspectionGoodsList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="商品标题" align="center" prop="title" />
|
||||
<el-table-column label="商品分类" align="center" prop="categoryName" />
|
||||
<el-table-column label="合作商" align="center" prop="partnerName" />
|
||||
<el-table-column label="价格(元)" align="center" prop="price" >
|
||||
<template slot-scope="scope">
|
||||
<div>{{scope.row.price/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="封面图" align="center" prop="image" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.image" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品图片" align="center" prop="images" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.images" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="特价/正常" align="center" prop="isSpecial">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.is_special" :value="scope.row.isSpecial"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="状态" align="center" prop="listingStatus">
|
||||
<template slot-scope="scope">
|
||||
|
||||
<div v-if="scope.row.listingStatus == 0 || scope.row.listingStatus == null">
|
||||
|
||||
</div>
|
||||
<div v-if="scope.row.listingStatus == 1">
|
||||
<el-tag type="warning">待审核</el-tag>
|
||||
</div>
|
||||
<div v-if="scope.row.listingStatus == 2">
|
||||
<el-tag type="success">已通过</el-tag>
|
||||
</div>
|
||||
<div v-if="scope.row.listingStatus == 3">
|
||||
<el-tag type="danger">未通过</el-tag>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="下架/上架" align="center" prop="isListing">
|
||||
<template slot-scope="scope">
|
||||
<el-tag type="success" v-if="scope.row.isListing == '1'">上架</el-tag>
|
||||
<el-tag type="danger" v-if="scope.row.isListing == '0'">下架</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
<!-- <el-table-column label="不参与/参与" align="center" prop="isAttend">-->
|
||||
<!-- <template slot-scope="scope">-->
|
||||
<!-- <dict-tag :options="dict.type.yes_no" :value="scope.row.isAttend"/>-->
|
||||
<!-- </template>-->
|
||||
<!-- </el-table-column>-->
|
||||
|
||||
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="scope.row.isListing == '0'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="getfj(scope.row)"
|
||||
v-hasPermi="['system:inspectionGoods:edit']"
|
||||
>上架</el-button>
|
||||
<el-button
|
||||
v-if="scope.row.isListing == '1'"
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="getfj(scope.row)"
|
||||
v-hasPermi="['system:inspectionGoods:edit']"
|
||||
>下架</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
v-hasPermi="['system:inspectionGoods:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:inspectionGoods:remove']"
|
||||
>删除</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
v-if="scope.row.listingStatus == 1"
|
||||
icon="el-icon-edit"
|
||||
@click="shenhe(scope.row)"
|
||||
v-hasPermi="['system:inspectionGoods: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="审核" :visible.sync="dialogFormVisible">
|
||||
<el-form :model="froms">
|
||||
|
||||
<el-form-item label="是否通过" :label-width="formLabelWidth">
|
||||
<el-select v-model="froms.listingStatus" placeholder="请选择">
|
||||
<el-option label="通过" value="2"></el-option>
|
||||
<el-option label="拒绝" value="3"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" :label-width="formLabelWidth">
|
||||
<el-input type="textarea" v-model="froms.rejectReason"></el-input>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogFormVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="tjshenhe()">确 定</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 添加或修改检测商品对话框 新增 修改 -->
|
||||
|
||||
<el-dialog :title="title" :visible.sync="open" width="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="商品标题" prop="title">
|
||||
<el-input v-model="form.title" placeholder="请输入商品标题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="价格" prop="price">
|
||||
<!-- <el-input v-model="form.price" placeholder="请输入价格" />-->
|
||||
<el-input-number v-model="form.price " :precision="2" :step="0.1" :max="999999999" :min="0.01"></el-input-number>
|
||||
</el-form-item>
|
||||
<!-- 合作商id-->
|
||||
<el-form-item label="合作商" prop="price">
|
||||
<el-select v-model="form.partnerId" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in mallPartnersList"
|
||||
:key="item.partnerId"
|
||||
:label="item.partnerName"
|
||||
:value="item.partnerId">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- 商品id-->
|
||||
<el-form-item label="商品分类" prop="price">
|
||||
<el-select v-model="form.goodsCategoryId" placeholder="请选择">
|
||||
<el-option
|
||||
v-for="item in categoryList"
|
||||
:key="item.id"
|
||||
:label="item.categoryName"
|
||||
:value="item.id">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="封面图" prop="image">
|
||||
<image-upload v-model="form.image"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品图片" prop="images">
|
||||
<image-upload v-model="form.images"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="特价/正常" prop="isSpecial">
|
||||
<el-radio-group v-model="form.isSpecial">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.is_special"
|
||||
:key="dict.value"
|
||||
:label="parseInt(dict.value)"
|
||||
>{{dict.label}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="详细描述" prop="goodsDesc">
|
||||
<editor v-model="form.goodsDesc" :min-height="192"/>
|
||||
</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 { listCategory, } from "../inspection/api/inspection";
|
||||
import {fjPartners, listMallPartners,} from "../inspection/api/Partner";
|
||||
import { tijiaoshenhe, homeGoods, listInspectionGoods, getInspectionGoods, delInspectionGoods, addInspectionGoods, updateInspectionGoods } from "./api/inspectionGoods";
|
||||
import request from "@/utils/request";
|
||||
|
||||
export default {
|
||||
name: "InspectionGoods",
|
||||
dicts: ['is_special', 'yes_no'],
|
||||
data() {
|
||||
|
||||
return {
|
||||
dialogFormVisible: false,
|
||||
froms: {
|
||||
id:0,
|
||||
listingStatus:2,
|
||||
rejectReason:'',
|
||||
name: '',
|
||||
region: '',
|
||||
date1: '',
|
||||
date2: '',
|
||||
delivery: false,
|
||||
type: [],
|
||||
resource: '',
|
||||
desc: ''
|
||||
},
|
||||
formLabelWidth: '120px',
|
||||
sxjarr:[
|
||||
{
|
||||
value: '1',
|
||||
label: '上架'
|
||||
},
|
||||
{
|
||||
value: '0',
|
||||
label: '下架'
|
||||
},
|
||||
],
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 检测商品表格数据
|
||||
inspectionGoodsList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
id: null,
|
||||
title: null,
|
||||
goodsCategoryId: null,
|
||||
partnerId: null,
|
||||
price: null,
|
||||
image: null,
|
||||
images: null,
|
||||
isSpecial: null,
|
||||
goodsDesc: null,
|
||||
isListing: null,
|
||||
isAttend: null,
|
||||
orderNum: null,
|
||||
},
|
||||
//合作商
|
||||
mallPartnersList: [],
|
||||
//请求合作商参数
|
||||
hzsarr: {
|
||||
pageNum: 1,
|
||||
pageSize: 9999,
|
||||
userId: null,
|
||||
type: null,
|
||||
partnerName: null,
|
||||
partnerLogo: null,
|
||||
shopImages: null,
|
||||
contactNumber: null,
|
||||
address: null,
|
||||
province: null,
|
||||
city: null,
|
||||
area: null,
|
||||
partnerCategoryId: null,
|
||||
averageScore: null,
|
||||
longitude: null,
|
||||
latitude: null,
|
||||
workTime: null,
|
||||
salesNum: null,
|
||||
orderNum: null,
|
||||
isBanned: null,
|
||||
},
|
||||
//分类请求参数
|
||||
flarr: {
|
||||
pageNum: 1,
|
||||
pageSize: 999,
|
||||
pid: null,
|
||||
categoryName: null,
|
||||
orderNum: null
|
||||
},
|
||||
categoryList: [],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
title: [
|
||||
{ required: true, message: "商品标题不能为空", trigger: "blur" }
|
||||
],
|
||||
price: [
|
||||
{ required: true, message: "价格不能为空", trigger: "blur" }
|
||||
],
|
||||
image: [
|
||||
{ required: true, message: "封面图不能为空", trigger: "blur" }
|
||||
],
|
||||
images: [
|
||||
{ required: true, message: "商品图片不能为空", trigger: "blur" }
|
||||
],
|
||||
isSpecial: [
|
||||
{ required: true, message: "特价/正常不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.dict = {type:{}}
|
||||
for (let i = 0; i < this.$options.dicts.length; i++) {
|
||||
request({
|
||||
url: '/rescue/dict/data/type/'+this.$options.dicts[i],
|
||||
method: 'get'
|
||||
}).then(res=>{
|
||||
this.$set(this.dict.type,this.$options.dicts[i],res.data)
|
||||
})
|
||||
}
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
tjshenhe(item){
|
||||
let arr = {
|
||||
id:this.froms.id,
|
||||
listingStatus:this.froms.listingStatus,
|
||||
rejectReason:this.froms.rejectReason
|
||||
}
|
||||
tijiaoshenhe(arr).then(res =>{
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.dialogFormVisible = false
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
shenhe(item){
|
||||
this.dialogFormVisible = true
|
||||
this.froms.id = item.id
|
||||
|
||||
},
|
||||
/** 查询检测商品列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listInspectionGoods(this.queryParams).then(response => {
|
||||
this.inspectionGoodsList = response.rows;
|
||||
this.inspectionGoodsList.price=this.inspectionGoodsList.price / 100
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
listMallPartners(this.hzsarr).then(response => {
|
||||
this.mallPartnersList = response.rows;
|
||||
console.log('查询合作商管理列表 ',this.mallPartnersList)
|
||||
});
|
||||
listCategory(this.flarr).then(response => {
|
||||
this.categoryList = response.data.list;
|
||||
console.log('查询分类管理列表 ',this.categoryList)
|
||||
|
||||
});
|
||||
},
|
||||
//推荐
|
||||
gettui(id){
|
||||
let data = {
|
||||
goodsId : id
|
||||
}
|
||||
homeGoods(data).then(res=>{
|
||||
console.log(res)
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
//上下架管理
|
||||
getfj(row){
|
||||
console.log(row,'1111')
|
||||
let arr = row
|
||||
if (arr.isListing=='1'){
|
||||
arr.isListing='0'
|
||||
}else if(arr.isListing=='0'){
|
||||
arr.isListing='1'
|
||||
}
|
||||
console.log(arr.isListing,'222')
|
||||
updateInspectionGoods(arr).then(res =>{
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.getList()
|
||||
})
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
title: null,
|
||||
goodsCategoryId: null,
|
||||
partnerId: null,
|
||||
price: null,
|
||||
image: null,
|
||||
images: null,
|
||||
isSpecial: null,
|
||||
goodsDesc: null,
|
||||
isListing: null,
|
||||
isAttend: null,
|
||||
orderNum: null,
|
||||
createTime: null,
|
||||
createBy: null,
|
||||
updateTime: null,
|
||||
updateBy: 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
|
||||
getInspectionGoods(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.form.price = this.form.price / 100
|
||||
this.open = true;
|
||||
this.title = "修改检测商品";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.price = this.form.price * 100
|
||||
console.log('提交的时候', this.form.price)
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
|
||||
updateInspectionGoods(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
|
||||
addInspectionGoods(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除检测商品编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delInspectionGoods(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/inspectionGoods/export', {
|
||||
...this.queryParams
|
||||
}, `inspectionGoods_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
448
src/views/inspection/inspectionOrder/index.vue
Normal file
448
src/views/inspection/inspectionOrder/index.vue
Normal file
@ -0,0 +1,448 @@
|
||||
<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="orderNo">
|
||||
<el-input
|
||||
v-model="queryParams.orderNo"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品id" prop="goodsId">
|
||||
<el-input
|
||||
v-model="queryParams.goodsId"
|
||||
placeholder="请输入商品id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="goodsTitle">
|
||||
<el-input
|
||||
v-model="queryParams.goodsTitle"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户id" prop="userId">
|
||||
<el-input
|
||||
v-model="queryParams.userId"
|
||||
placeholder="请输入用户id"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户姓名" prop="realName">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入用户姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="下单时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeOrderTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付时间">
|
||||
<el-date-picker
|
||||
v-model="daterangePayTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="星级" prop="commentStar">
|
||||
<el-select v-model="queryParams.commentStar" placeholder="请选择星级" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.comment_star"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</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:inspectionOrder: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:inspectionOrder: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:inspectionOrder: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:inspectionOrder:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="inspectionOrderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="订单id" align="center" prop="orderId" />
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" />
|
||||
<el-table-column label="商品id" align="center" prop="goodsId" />
|
||||
<el-table-column label="商品名称" align="center" prop="goodsTitle" />
|
||||
<el-table-column label="用户id" align="center" prop="userId" />
|
||||
<el-table-column label="用户姓名" align="center" prop="realName" />
|
||||
<el-table-column label="用户手机号" align="center" prop="phonenumber" />
|
||||
<el-table-column label="商品原价" align="center" prop="goodsPrice" />
|
||||
<el-table-column label="实付金额" align="center" prop="payMoney" />
|
||||
<el-table-column label="下单时间" align="center" prop="orderTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.orderTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付时间" align="center" prop="payTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.order_status" :value="scope.row.orderStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="评价详情" align="center" prop="commentDesc">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.sys_user_sex" :value="scope.row.commentDesc"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="星级" align="center" prop="commentStar">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.comment_star" :value="scope.row.commentStar"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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:inspectionOrder:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:inspectionOrder: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="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="订单号" prop="orderNo">
|
||||
<el-input v-model="form.orderNo" placeholder="请输入订单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品id" prop="goodsId">
|
||||
<el-input v-model="form.goodsId" placeholder="请输入商品id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="goodsTitle">
|
||||
<el-input v-model="form.goodsTitle" placeholder="请输入商品名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户id" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户姓名" prop="realName">
|
||||
<el-input v-model="form.realName" placeholder="请输入用户姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户手机号" prop="phonenumber">
|
||||
<el-input v-model="form.phonenumber" placeholder="请输入用户手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品原价" prop="goodsPrice">
|
||||
<el-input v-model="form.goodsPrice" placeholder="请输入商品原价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实付金额" prop="payMoney">
|
||||
<el-input v-model="form.payMoney" placeholder="请输入实付金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下单时间" prop="orderTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.orderTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择下单时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付时间" prop="payTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.payTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择支付时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select v-model="form.orderStatus" placeholder="请选择订单状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="评价详情">
|
||||
<editor v-model="form.commentDesc" :min-height="192"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="星级" prop="commentStar">
|
||||
<el-select v-model="form.commentStar" placeholder="请选择星级">
|
||||
<el-option
|
||||
v-for="dict in dict.type.comment_star"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</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 { listInspectionOrder, getInspectionOrder, delInspectionOrder, addInspectionOrder, updateInspectionOrder } from "@/api/system/inspectionOrder";
|
||||
|
||||
export default {
|
||||
name: "InspectionOrder",
|
||||
dicts: ['comment_star', 'order_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 检测订单表格数据
|
||||
inspectionOrderList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 星级时间范围
|
||||
daterangeOrderTime: [],
|
||||
// 星级时间范围
|
||||
daterangePayTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderNo: null,
|
||||
goodsId: null,
|
||||
goodsTitle: null,
|
||||
userId: null,
|
||||
realName: null,
|
||||
orderTime: null,
|
||||
payTime: null,
|
||||
orderStatus: null,
|
||||
commentDesc: null,
|
||||
commentStar: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询检测订单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeOrderTime && '' != this.daterangeOrderTime) {
|
||||
this.queryParams.params["beginOrderTime"] = this.daterangeOrderTime[0];
|
||||
this.queryParams.params["endOrderTime"] = this.daterangeOrderTime[1];
|
||||
}
|
||||
if (null != this.daterangePayTime && '' != this.daterangePayTime) {
|
||||
this.queryParams.params["beginPayTime"] = this.daterangePayTime[0];
|
||||
this.queryParams.params["endPayTime"] = this.daterangePayTime[1];
|
||||
}
|
||||
listInspectionOrder(this.queryParams).then(response => {
|
||||
this.inspectionOrderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
orderId: null,
|
||||
orderNo: null,
|
||||
goodsId: null,
|
||||
goodsTitle: null,
|
||||
userId: null,
|
||||
realName: null,
|
||||
phonenumber: null,
|
||||
goodsPrice: null,
|
||||
payMoney: null,
|
||||
orderTime: null,
|
||||
payTime: null,
|
||||
orderStatus: null,
|
||||
commentDesc: null,
|
||||
commentStar: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeOrderTime = [];
|
||||
this.daterangePayTime = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.orderId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加检测订单";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const orderId = row.orderId || this.ids
|
||||
getInspectionOrder(orderId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改检测订单";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.orderId != null) {
|
||||
updateInspectionOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addInspectionOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const orderIds = row.orderId || this.ids;
|
||||
this.$modal.confirm('是否确认删除检测订单编号为"' + orderIds + '"的数据项?').then(function() {
|
||||
return delInspectionOrder(orderIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/inspectionOrder/export', {
|
||||
...this.queryParams
|
||||
}, `inspectionOrder_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
321
src/views/inspection/insuranceGoods/index.vue
Normal file
321
src/views/inspection/insuranceGoods/index.vue
Normal file
@ -0,0 +1,321 @@
|
||||
<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="title">
|
||||
<el-input
|
||||
v-model="queryParams.title"
|
||||
placeholder="请输入标题"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否特价" prop="isSpecial">
|
||||
<el-select v-model="queryParams.isSpecial" placeholder="请选择是否特价" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.is_special"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</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:insuranceGoods: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:insuranceGoods: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:insuranceGoods: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:insuranceGoods:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="insuranceGoodsList" @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="title" />
|
||||
<el-table-column label="价格 (元)" align="center" prop="price" >
|
||||
<template slot-scope="scope">
|
||||
<div>{{scope.row.price/100}}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="封面图" align="center" prop="image" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.image" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="商品图片" align="center" prop="images" width="100">
|
||||
<template slot-scope="scope">
|
||||
<image-preview :src="scope.row.images" :width="50" :height="50"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="是否特价" align="center" prop="isSpecial">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.is_special" :value="scope.row.isSpecial"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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:insuranceGoods:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:insuranceGoods: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="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="标题" prop="title">
|
||||
<el-input v-model="form.title" placeholder="请输入标题" />
|
||||
</el-form-item>
|
||||
<el-form-item label="价格(元)" prop="price">
|
||||
<el-input-number v-model="form.price" :precision="2" :step="0.1" :max="999" :min="0"></el-input-number>
|
||||
</el-form-item>
|
||||
<el-form-item label="封面图" prop="image">
|
||||
<image-upload v-model="form.image"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品图片" prop="images">
|
||||
<image-upload v-model="form.images"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="是否特价" prop="isSpecial">
|
||||
<el-select v-model="form.isSpecial" placeholder="请选择是否特价">
|
||||
<el-option
|
||||
v-for="dict in dict.type.is_special"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="详细描述">
|
||||
<editor v-model="form.goodsDesc" :min-height="192"/>
|
||||
</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 { listInsuranceGoods, getInsuranceGoods, delInsuranceGoods, addInsuranceGoods, updateInsuranceGoods } from "@/api/system/insuranceGoods";
|
||||
|
||||
export default {
|
||||
name: "InsuranceGoods",
|
||||
dicts: ['is_special'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 保险商品表格数据
|
||||
insuranceGoodsList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
title: null,
|
||||
isSpecial: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
title: [
|
||||
{ required: true, message: "标题不能为空", trigger: "blur" }
|
||||
],
|
||||
price: [
|
||||
{ required: true, message: "价格不能为空", trigger: "blur" }
|
||||
],
|
||||
image: [
|
||||
{ required: true, message: "封面图不能为空", trigger: "blur" }
|
||||
],
|
||||
images: [
|
||||
{ required: true, message: "商品图片不能为空", trigger: "blur" }
|
||||
],
|
||||
isSpecial: [
|
||||
{ required: true, message: "是否特价不能为空", trigger: "change" }
|
||||
],
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询保险商品列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
listInsuranceGoods(this.queryParams).then(response => {
|
||||
this.insuranceGoodsList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
title: null,
|
||||
price: null,
|
||||
image: null,
|
||||
images: null,
|
||||
isSpecial: null,
|
||||
goodsDesc: 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
|
||||
getInsuranceGoods(id).then(response => {
|
||||
this.form = response.data;
|
||||
this.form.price = this.form.price / 100
|
||||
this.open = true;
|
||||
this.title = "修改保险商品";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.form.price = this.form.price * 100
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateInsuranceGoods(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addInsuranceGoods(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const ids = row.id || this.ids;
|
||||
this.$modal.confirm('是否确认删除保险商品编号为"' + ids + '"的数据项?').then(function() {
|
||||
return delInsuranceGoods(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/insuranceGoods/export', {
|
||||
...this.queryParams
|
||||
}, `insuranceGoods_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
452
src/views/inspection/insuranceOrder/index.vue
Normal file
452
src/views/inspection/insuranceOrder/index.vue
Normal file
@ -0,0 +1,452 @@
|
||||
<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="orderNo">
|
||||
<el-input
|
||||
v-model="queryParams.orderNo"
|
||||
placeholder="请输入订单号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="商品id" prop="goodsId">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.goodsId"-->
|
||||
<!-- placeholder="请输入商品id"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="商品名称" prop="goodsTitle">
|
||||
<el-input
|
||||
v-model="queryParams.goodsTitle"
|
||||
placeholder="请输入商品名称"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="用户id" prop="userId">-->
|
||||
<!-- <el-input-->
|
||||
<!-- v-model="queryParams.userId"-->
|
||||
<!-- placeholder="请输入用户id"-->
|
||||
<!-- clearable-->
|
||||
<!-- @keyup.enter.native="handleQuery"-->
|
||||
<!-- />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="用户姓名" prop="realName">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入用户姓名"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户手机号" prop="phonenumber" label-width="220">
|
||||
<el-input
|
||||
v-model="queryParams.phonenumber"
|
||||
placeholder="请输入用户手机号"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="下单时间">
|
||||
<el-date-picker
|
||||
v-model="daterangeOrderTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付时间">
|
||||
<el-date-picker
|
||||
v-model="daterangePayTime"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select v-model="queryParams.orderStatus" placeholder="请选择订单状态" clearable>
|
||||
<el-option
|
||||
v-for="dict in dict.type.order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="星级" prop="commentStar">-->
|
||||
<!-- <el-select v-model="queryParams.commentStar" placeholder="请选择星级" clearable>-->
|
||||
<!-- <el-option-->
|
||||
<!-- v-for="dict in dict.type.comment_star"-->
|
||||
<!-- :key="dict.value"-->
|
||||
<!-- :label="dict.label"-->
|
||||
<!-- :value="dict.value"-->
|
||||
<!-- />-->
|
||||
<!-- </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:insuranceOrder: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:insuranceOrder: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:insuranceOrder: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:insuranceOrder:export']"
|
||||
>导出</el-button>
|
||||
</el-col>
|
||||
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="insuranceOrderList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<!-- <el-table-column label="订单id" align="center" prop="orderId" />-->
|
||||
<el-table-column label="订单号" align="center" prop="orderNo" />
|
||||
<!-- <el-table-column label="商品id" align="center" prop="goodsId" />-->
|
||||
<el-table-column label="商品名称" align="center" prop="goodsTitle" />
|
||||
<!-- <el-table-column label="用户id" align="center" prop="userId" />-->
|
||||
<el-table-column label="用户姓名" align="center" prop="realName" />
|
||||
<el-table-column label="用户手机号" align="center" prop="phonenumber" />
|
||||
<el-table-column label="商品原价" align="center" prop="goodsPrice" />
|
||||
<el-table-column label="实付金额" align="center" prop="payMoney" />
|
||||
<el-table-column label="下单时间" align="center" prop="orderTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.orderTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="支付时间" align="center" prop="payTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d}') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单状态" align="center" prop="orderStatus">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.order_status" :value="scope.row.orderStatus"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="评价详情" align="center" prop="commentDesc" />
|
||||
<el-table-column label="星级" align="center" prop="commentStar">
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :options="dict.type.comment_star" :value="scope.row.commentStar"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<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:insuranceOrder:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['system:insuranceOrder: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="600px" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
|
||||
<el-form-item label="订单号" prop="orderNo">
|
||||
<el-input v-model="form.orderNo" placeholder="请输入订单号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品id" prop="goodsId">
|
||||
<el-input v-model="form.goodsId" placeholder="请输入商品id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品名称" prop="goodsTitle">
|
||||
<el-input v-model="form.goodsTitle" placeholder="请输入商品名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户id" prop="userId">
|
||||
<el-input v-model="form.userId" placeholder="请输入用户id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户姓名" prop="realName">
|
||||
<el-input v-model="form.realName" placeholder="请输入用户姓名" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户手机号" prop="phonenumber">
|
||||
<el-input v-model="form.phonenumber" placeholder="请输入用户手机号" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品原价" prop="goodsPrice">
|
||||
<el-input v-model="form.goodsPrice" placeholder="请输入商品原价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="实付金额" prop="payMoney">
|
||||
<el-input v-model="form.payMoney" placeholder="请输入实付金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="下单时间" prop="orderTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.orderTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择下单时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="支付时间" prop="payTime">
|
||||
<el-date-picker clearable
|
||||
v-model="form.payTime"
|
||||
type="date"
|
||||
value-format="yyyy-MM-dd"
|
||||
placeholder="请选择支付时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单状态" prop="orderStatus">
|
||||
<el-select v-model="form.orderStatus" placeholder="请选择订单状态">
|
||||
<el-option
|
||||
v-for="dict in dict.type.order_status"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="评价详情">
|
||||
<editor v-model="form.commentDesc" :min-height="192"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="星级" prop="commentStar">
|
||||
<el-select v-model="form.commentStar" placeholder="请选择星级">
|
||||
<el-option
|
||||
v-for="dict in dict.type.comment_star"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="parseInt(dict.value)"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</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 { listInsuranceOrder, getInsuranceOrder, delInsuranceOrder, addInsuranceOrder, updateInsuranceOrder } from "@/api/system/insuranceOrder";
|
||||
|
||||
export default {
|
||||
name: "InsuranceOrder",
|
||||
dicts: ['comment_star', 'order_status'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 保险订单表格数据
|
||||
insuranceOrderList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 星级时间范围
|
||||
daterangeOrderTime: [],
|
||||
// 星级时间范围
|
||||
daterangePayTime: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderNo: null,
|
||||
goodsId: null,
|
||||
goodsTitle: null,
|
||||
userId: null,
|
||||
realName: null,
|
||||
phonenumber: null,
|
||||
orderTime: null,
|
||||
payTime: null,
|
||||
orderStatus: null,
|
||||
commentStar: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询保险订单列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
this.queryParams.params = {};
|
||||
if (null != this.daterangeOrderTime && '' != this.daterangeOrderTime) {
|
||||
this.queryParams.params["beginOrderTime"] = this.daterangeOrderTime[0];
|
||||
this.queryParams.params["endOrderTime"] = this.daterangeOrderTime[1];
|
||||
}
|
||||
if (null != this.daterangePayTime && '' != this.daterangePayTime) {
|
||||
this.queryParams.params["beginPayTime"] = this.daterangePayTime[0];
|
||||
this.queryParams.params["endPayTime"] = this.daterangePayTime[1];
|
||||
}
|
||||
listInsuranceOrder(this.queryParams).then(response => {
|
||||
this.insuranceOrderList = response.rows;
|
||||
this.total = response.total;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
orderId: null,
|
||||
orderNo: null,
|
||||
goodsId: null,
|
||||
goodsTitle: null,
|
||||
userId: null,
|
||||
realName: null,
|
||||
phonenumber: null,
|
||||
goodsPrice: null,
|
||||
payMoney: null,
|
||||
orderTime: null,
|
||||
payTime: null,
|
||||
orderStatus: null,
|
||||
commentDesc: null,
|
||||
commentStar: null
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
/** 重置按钮操作 */
|
||||
resetQuery() {
|
||||
this.daterangeOrderTime = [];
|
||||
this.daterangePayTime = [];
|
||||
this.resetForm("queryForm");
|
||||
this.handleQuery();
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.orderId)
|
||||
this.single = selection.length!==1
|
||||
this.multiple = !selection.length
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加保险订单";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const orderId = row.orderId || this.ids
|
||||
getInsuranceOrder(orderId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
this.title = "修改保险订单";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.orderId != null) {
|
||||
updateInsuranceOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addInsuranceOrder(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const orderIds = row.orderId || this.ids;
|
||||
this.$modal.confirm('是否确认删除保险订单编号为"' + orderIds + '"的数据项?').then(function() {
|
||||
return delInsuranceOrder(orderIds);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
this.download('system/insuranceOrder/export', {
|
||||
...this.queryParams
|
||||
}, `insuranceOrder_${new Date().getTime()}.xlsx`)
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user