master
parent
b42e546ad5
commit
db8ca18e1a
@ -1,95 +0,0 @@
|
||||
<template>
|
||||
<el-dialog title="领取记录" :visible.sync="open" width="80%" append-to-body>
|
||||
<el-form :model="queryParams" :inline="true" label-width="100px" size="medium" class="ry_form">
|
||||
<el-form-item label="使用状态" prop="useStatus">
|
||||
<DictRadio v-model="queryParams.useStatus" @change="handleQuery" size="small"
|
||||
:radioData="dict.type.activity_coupon_status" :showAll="'all'"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="loading" :data="tableList" border>
|
||||
<el-table-column label="券ID" prop="id" />
|
||||
<el-table-column label="用户信息 " >
|
||||
<template slot-scope="scope">
|
||||
<div class="flex-center">
|
||||
<el-avatar :src="scope.row.avatar"></el-avatar>
|
||||
<div class="tl ml5">
|
||||
<p>{{scope.row.nickname}}</p>
|
||||
<p>{{scope.row.phone}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="领取时间" prop="createTime" width="180" />
|
||||
<el-table-column label="使用状态" >
|
||||
<template slot-scope="scope">
|
||||
<dict-tag :value="scope.row.useStatus" prop-name="activity_coupon_status"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="有效期" width="180" >
|
||||
<template slot-scope="scope">
|
||||
<p>{{ scope.row.beginTime}}</p>
|
||||
<p> ~ </p>
|
||||
<p>{{ scope.row.endTime}}</p>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="订单号" prop="orderId" />
|
||||
<el-table-column label="使用时间" prop="useTime" width="180" />
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
|
||||
import {listMemberCoupon} from "@/api/act/memberCoupon";
|
||||
|
||||
export default {
|
||||
dicts: ['activity_coupon_status'],
|
||||
data(){
|
||||
return{
|
||||
open:false,
|
||||
loading: false,
|
||||
tableList: [],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
useStatus: null,
|
||||
couponActivityId: null,
|
||||
},
|
||||
total: 0,
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
async init(activityId){
|
||||
if (!activityId) {
|
||||
return
|
||||
}
|
||||
this.queryParams.couponActivityId = activityId
|
||||
await this.handleQuery()
|
||||
this.open = true
|
||||
},
|
||||
handleQuery() {
|
||||
this.queryParams.pageNum = 1;
|
||||
this.getList();
|
||||
},
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const {pageNum, pageSize} = this.queryParams;
|
||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
||||
return listMemberCoupon(query, pageReq).then(response => {
|
||||
const { content, totalElements } = response
|
||||
this.tableList = content;
|
||||
this.total = totalElements;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@ -1,291 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
||||
<el-form-item label="MEMBER_ID" prop="memberId">
|
||||
<el-input
|
||||
v-model="queryParams.memberId"
|
||||
placeholder="请输入MEMBER_ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单id" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入订单id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="子订单id" prop="orderItemId">
|
||||
<el-input
|
||||
v-model="queryParams.orderItemId"
|
||||
placeholder="请输入子订单id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退款金额" prop="returnAmount">
|
||||
<el-input
|
||||
v-model="queryParams.returnAmount"
|
||||
placeholder="请输入退款金额"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="退货数量" prop="quantity">
|
||||
<el-input
|
||||
v-model="queryParams.quantity"
|
||||
placeholder="请输入退货数量"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item class="flex_one tr">
|
||||
<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="['oms:aftersaleItem:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="omsAftersaleItemList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="MEMBER_ID" align="center" prop="memberId" />
|
||||
<el-table-column label="订单id" align="center" prop="orderId" />
|
||||
<el-table-column label="子订单id" align="center" prop="orderItemId" />
|
||||
<el-table-column label="退款金额" align="center" prop="returnAmount" />
|
||||
<el-table-column label="退货数量" align="center" prop="quantity" />
|
||||
<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="['oms:aftersaleItem:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['oms:aftersaleItem: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="50%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two">
|
||||
<el-form-item label="MEMBER_ID" prop="memberId">
|
||||
<el-input v-model="form.memberId" placeholder="请输入MEMBER_ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单id" prop="orderId">
|
||||
<el-input v-model="form.orderId" placeholder="请输入订单id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="子订单id" prop="orderItemId">
|
||||
<el-input v-model="form.orderItemId" placeholder="请输入子订单id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="退款金额" prop="returnAmount">
|
||||
<el-input v-model="form.returnAmount" placeholder="请输入退款金额" />
|
||||
</el-form-item>
|
||||
<el-form-item label="退货数量" prop="quantity">
|
||||
<el-input v-model="form.quantity" 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 { listOmsAftersaleItem, getOmsAftersaleItem, delOmsAftersaleItem, addOmsAftersaleItem, updateOmsAftersaleItem, exportOmsAftersaleItem } from "@/api/oms/aftersaleItem";
|
||||
|
||||
export default {
|
||||
name: "OmsAftersaleItem",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 订单售后表格数据
|
||||
omsAftersaleItemList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
memberId: null,
|
||||
orderId: null,
|
||||
orderItemId: null,
|
||||
returnAmount: null,
|
||||
quantity: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
memberId: [
|
||||
{ required: true, message: "MEMBER_ID不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询订单售后列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const {pageNum, pageSize} = this.queryParams;
|
||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
||||
listOmsAftersaleItem(query, pageReq).then(response => {
|
||||
const { content, totalElements } = response
|
||||
this.omsAftersaleItemList = content;
|
||||
this.total = totalElements;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
memberId: null,
|
||||
orderId: null,
|
||||
orderItemId: null,
|
||||
returnAmount: null,
|
||||
quantity: 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
|
||||
getOmsAftersaleItem(id).then(response => {
|
||||
this.form = response;
|
||||
this.open = true;
|
||||
this.title = "修改订单售后";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateOmsAftersaleItem(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addOmsAftersaleItem(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 delOmsAftersaleItem(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$modal.confirm('是否确认导出所有订单售后数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportOmsAftersaleItem(queryParams);
|
||||
}).then(response => {
|
||||
this.$download.download(response);
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1,258 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
||||
<el-form-item label="订单id" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入订单id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物流公司(配送方式)" prop="deliveryCompany">
|
||||
<el-input
|
||||
v-model="queryParams.deliveryCompany"
|
||||
placeholder="请输入物流公司(配送方式)"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="物流单号" prop="deliverySn">
|
||||
<el-input
|
||||
v-model="queryParams.deliverySn"
|
||||
placeholder="请输入物流单号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item class="flex_one tr">
|
||||
<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="['oms:orderDeliveryHistory:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="omsOrderDeliveryHistoryList" @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="deliveryCompany" />
|
||||
<el-table-column label="物流单号" align="center" prop="deliverySn" />
|
||||
<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="['oms:orderDeliveryHistory:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['oms:orderDeliveryHistory: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="50%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two">
|
||||
<el-form-item label="订单id" prop="orderId">
|
||||
<el-input v-model="form.orderId" placeholder="请输入订单id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流公司(配送方式)" prop="deliveryCompany">
|
||||
<el-input v-model="form.deliveryCompany" placeholder="请输入物流公司(配送方式)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="物流单号" prop="deliverySn">
|
||||
<el-input v-model="form.deliverySn" 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 { listOmsOrderDeliveryHistory, getOmsOrderDeliveryHistory, delOmsOrderDeliveryHistory, addOmsOrderDeliveryHistory, updateOmsOrderDeliveryHistory, exportOmsOrderDeliveryHistory } from "@/api/oms/orderDeliveryHistory";
|
||||
|
||||
export default {
|
||||
name: "OmsOrderDeliveryHistory",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 订单发货记录表格数据
|
||||
omsOrderDeliveryHistoryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderId: null,
|
||||
deliveryCompany: null,
|
||||
deliverySn: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询订单发货记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const {pageNum, pageSize} = this.queryParams;
|
||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
||||
listOmsOrderDeliveryHistory(query, pageReq).then(response => {
|
||||
const { content, totalElements } = response
|
||||
this.omsOrderDeliveryHistoryList = content;
|
||||
this.total = totalElements;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
orderId: null,
|
||||
deliveryCompany: null,
|
||||
deliverySn: 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
|
||||
getOmsOrderDeliveryHistory(id).then(response => {
|
||||
this.form = response;
|
||||
this.open = true;
|
||||
this.title = "修改订单发货记录";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateOmsOrderDeliveryHistory(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addOmsOrderDeliveryHistory(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 delOmsOrderDeliveryHistory(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$modal.confirm('是否确认导出所有订单发货记录数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportOmsOrderDeliveryHistory(queryParams);
|
||||
}).then(response => {
|
||||
this.$download.download(response);
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1,424 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
||||
<el-form-item label="订单id" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入订单id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="PRODUCT_ID" prop="productId">
|
||||
<el-input
|
||||
v-model="queryParams.productId"
|
||||
placeholder="请输入PRODUCT_ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品编码" prop="outProductId">
|
||||
<el-input
|
||||
v-model="queryParams.outProductId"
|
||||
placeholder="请输入商品编码"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品sku id" prop="skuId">
|
||||
<el-input
|
||||
v-model="queryParams.skuId"
|
||||
placeholder="请输入商品sku id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="sku编码" prop="outSkuId">
|
||||
<el-input
|
||||
v-model="queryParams.outSkuId"
|
||||
placeholder="请输入sku编码"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品快照id" prop="productSnapshotId">
|
||||
<el-input
|
||||
v-model="queryParams.productSnapshotId"
|
||||
placeholder="请输入商品快照id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="sku快照id" prop="skuSnapshotId">
|
||||
<el-input
|
||||
v-model="queryParams.skuSnapshotId"
|
||||
placeholder="请输入sku快照id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<template v-if="showMoreCondition">
|
||||
<el-form-item label="展示图片" prop="pic">
|
||||
<el-input
|
||||
v-model="queryParams.pic"
|
||||
placeholder="请输入展示图片"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="PRODUCT_NAME" prop="productName">
|
||||
<el-input
|
||||
v-model="queryParams.productName"
|
||||
placeholder="请输入PRODUCT_NAME"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="销售价格" prop="salePrice">
|
||||
<el-input
|
||||
v-model="queryParams.salePrice"
|
||||
placeholder="请输入销售价格"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="采购价" prop="purchasePrice">
|
||||
<el-input
|
||||
v-model="queryParams.purchasePrice"
|
||||
placeholder="请输入采购价"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="购买数量" prop="quantity">
|
||||
<el-input
|
||||
v-model="queryParams.quantity"
|
||||
placeholder="请输入购买数量"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类id" prop="productCategoryId">
|
||||
<el-input
|
||||
v-model="queryParams.productCategoryId"
|
||||
placeholder="请输入商品分类id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item class="flex_one tr">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button :icon="showMoreCondition ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" size="mini" @click="showMoreCondition = !showMoreCondition">{{showMoreCondition ? '收起条件' : '展开条件'}}</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="['oms:orderItem:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="omsOrderItemList" @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="PRODUCT_ID" align="center" prop="productId" />
|
||||
<el-table-column label="商品编码" align="center" prop="outProductId" />
|
||||
<el-table-column label="商品sku id" align="center" prop="skuId" />
|
||||
<el-table-column label="sku编码" align="center" prop="outSkuId" />
|
||||
<el-table-column label="商品快照id" align="center" prop="productSnapshotId" />
|
||||
<el-table-column label="sku快照id" align="center" prop="skuSnapshotId" />
|
||||
<el-table-column label="展示图片" align="center" prop="pic" />
|
||||
<el-table-column label="PRODUCT_NAME" align="center" prop="productName" />
|
||||
<el-table-column label="销售价格" align="center" prop="salePrice" />
|
||||
<el-table-column label="采购价" align="center" prop="purchasePrice" />
|
||||
<el-table-column label="购买数量" align="center" prop="quantity" />
|
||||
<el-table-column label="商品分类id" align="center" prop="productCategoryId" />
|
||||
<el-table-column label="商品sku属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]" align="center" prop="spData" />
|
||||
<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="['oms:orderItem:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['oms:orderItem: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="50%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two">
|
||||
<el-form-item label="订单id" prop="orderId">
|
||||
<el-input v-model="form.orderId" placeholder="请输入订单id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="PRODUCT_ID" prop="productId">
|
||||
<el-input v-model="form.productId" placeholder="请输入PRODUCT_ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品编码" prop="outProductId">
|
||||
<el-input v-model="form.outProductId" placeholder="请输入商品编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品sku id" prop="skuId">
|
||||
<el-input v-model="form.skuId" placeholder="请输入商品sku id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="sku编码" prop="outSkuId">
|
||||
<el-input v-model="form.outSkuId" placeholder="请输入sku编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品快照id" prop="productSnapshotId">
|
||||
<el-input v-model="form.productSnapshotId" placeholder="请输入商品快照id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="sku快照id" prop="skuSnapshotId">
|
||||
<el-input v-model="form.skuSnapshotId" placeholder="请输入sku快照id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="展示图片" prop="pic">
|
||||
<el-input v-model="form.pic" placeholder="请输入展示图片" />
|
||||
</el-form-item>
|
||||
<el-form-item label="PRODUCT_NAME" prop="productName">
|
||||
<el-input v-model="form.productName" placeholder="请输入PRODUCT_NAME" />
|
||||
</el-form-item>
|
||||
<el-form-item label="销售价格" prop="salePrice">
|
||||
<el-input v-model="form.salePrice" placeholder="请输入销售价格" />
|
||||
</el-form-item>
|
||||
<el-form-item label="采购价" prop="purchasePrice">
|
||||
<el-input v-model="form.purchasePrice" placeholder="请输入采购价" />
|
||||
</el-form-item>
|
||||
<el-form-item label="购买数量" prop="quantity">
|
||||
<el-input v-model="form.quantity" placeholder="请输入购买数量" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品分类id" prop="productCategoryId">
|
||||
<el-input v-model="form.productCategoryId" placeholder="请输入商品分类id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="商品sku属性:[{"key":"颜色","value":"颜色"},{"key":"容量","value":"4G"}]" prop="spData">
|
||||
<el-input v-model="form.spData" type="textarea" 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 { listOmsOrderItem, getOmsOrderItem, delOmsOrderItem, addOmsOrderItem, updateOmsOrderItem, exportOmsOrderItem } from "@/api/oms/orderItem";
|
||||
|
||||
export default {
|
||||
name: "OmsOrderItem",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 订单中所包含的商品表格数据
|
||||
omsOrderItemList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
orderId: null,
|
||||
productId: null,
|
||||
outProductId: null,
|
||||
skuId: null,
|
||||
outSkuId: null,
|
||||
productSnapshotId: null,
|
||||
skuSnapshotId: null,
|
||||
pic: null,
|
||||
productName: null,
|
||||
salePrice: null,
|
||||
purchasePrice: null,
|
||||
quantity: null,
|
||||
productCategoryId: null,
|
||||
spData: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
outProductId: [
|
||||
{ required: true, message: "商品编码不能为空", trigger: "blur" }
|
||||
],
|
||||
outSkuId: [
|
||||
{ required: true, message: "sku编码不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
showMoreCondition: false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询订单中所包含的商品列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const {pageNum, pageSize} = this.queryParams;
|
||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
||||
listOmsOrderItem(query, pageReq).then(response => {
|
||||
const { content, totalElements } = response
|
||||
this.omsOrderItemList = content;
|
||||
this.total = totalElements;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
orderId: null,
|
||||
productId: null,
|
||||
outProductId: null,
|
||||
skuId: null,
|
||||
outSkuId: null,
|
||||
productSnapshotId: null,
|
||||
skuSnapshotId: null,
|
||||
pic: null,
|
||||
productName: null,
|
||||
salePrice: null,
|
||||
purchasePrice: null,
|
||||
quantity: null,
|
||||
productCategoryId: null,
|
||||
spData: 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
|
||||
getOmsOrderItem(id).then(response => {
|
||||
this.form = response;
|
||||
this.open = true;
|
||||
this.title = "修改订单中所包含的商品";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateOmsOrderItem(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addOmsOrderItem(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 delOmsOrderItem(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$modal.confirm('是否确认导出所有订单中所包含的商品数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportOmsOrderItem(queryParams);
|
||||
}).then(response => {
|
||||
this.$download.download(response);
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1,395 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
||||
<el-form-item label="payment_id" prop="paymentId">
|
||||
<el-input
|
||||
v-model="queryParams.paymentId"
|
||||
placeholder="请输入payment_id"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户 ID" prop="memberId">
|
||||
<el-input
|
||||
v-model="queryParams.memberId"
|
||||
placeholder="请输入用户 ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="OPENID" prop="openid">
|
||||
<el-input
|
||||
v-model="queryParams.openid"
|
||||
placeholder="请输入OPENID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="真实姓名,提现需要" prop="realName">
|
||||
<el-input
|
||||
v-model="queryParams.realName"
|
||||
placeholder="请输入真实姓名,提现需要"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="标题|商品名称" prop="title">
|
||||
<el-input
|
||||
v-model="queryParams.title"
|
||||
placeholder="请输入标题|商品名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号 支付时是payId 其他为orderId" prop="orderId">
|
||||
<el-input
|
||||
v-model="queryParams.orderId"
|
||||
placeholder="请输入订单号 支付时是payId 其他为orderId"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="金额,单位分" prop="money">
|
||||
<el-input
|
||||
v-model="queryParams.money"
|
||||
placeholder="请输入金额,单位分"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<template v-if="showMoreCondition">
|
||||
<el-form-item label="交易类型" prop="opType">
|
||||
<el-select v-model="queryParams.opType" placeholder="请选择交易类型" clearable size="small">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态" prop="paymentStatus">
|
||||
<el-select v-model="queryParams.paymentStatus" placeholder="请选择状态" clearable size="small">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="附加数据" prop="attach">
|
||||
<el-input
|
||||
v-model="queryParams.attach"
|
||||
placeholder="请输入附加数据"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item class="flex_one tr">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button :icon="showMoreCondition ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" size="mini" @click="showMoreCondition = !showMoreCondition">{{showMoreCondition ? '收起条件' : '展开条件'}}</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="['pms:wechatPaymentHistory:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="omsWechatPaymentHistoryList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="payment_id" align="center" prop="paymentId" />
|
||||
<el-table-column label="用户 ID" align="center" prop="memberId" />
|
||||
<el-table-column label="OPENID" align="center" prop="openid" />
|
||||
<el-table-column label="真实姓名,提现需要" align="center" prop="realName" />
|
||||
<el-table-column label="标题|商品名称" align="center" prop="title" />
|
||||
<el-table-column label="订单号 支付时是payId 其他为orderId" align="center" prop="orderId" />
|
||||
<el-table-column label="金额,单位分" align="center" prop="money" />
|
||||
<el-table-column label="交易类型" align="center" prop="opType" />
|
||||
<el-table-column label="状态" align="center" prop="paymentStatus" />
|
||||
<el-table-column label="备注" align="center" prop="remark" />
|
||||
<el-table-column label="附加数据" align="center" prop="attach" />
|
||||
<el-table-column label="响应内容" align="center" prop="responseBody" />
|
||||
<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="['pms:wechatPaymentHistory:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['pms:wechatPaymentHistory: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="50%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two">
|
||||
<el-form-item label="payment_id" prop="paymentId">
|
||||
<el-input v-model="form.paymentId" placeholder="请输入payment_id" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户 ID" prop="memberId">
|
||||
<el-input v-model="form.memberId" placeholder="请输入用户 ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="OPENID" prop="openid">
|
||||
<el-input v-model="form.openid" placeholder="请输入OPENID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="真实姓名,提现需要" prop="realName">
|
||||
<el-input v-model="form.realName" placeholder="请输入真实姓名,提现需要" />
|
||||
</el-form-item>
|
||||
<el-form-item label="标题|商品名称" prop="title">
|
||||
<el-input v-model="form.title" placeholder="请输入标题|商品名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="订单号 支付时是payId 其他为orderId" prop="orderId">
|
||||
<el-input v-model="form.orderId" placeholder="请输入订单号 支付时是payId 其他为orderId" />
|
||||
</el-form-item>
|
||||
<el-form-item label="金额,单位分" prop="money">
|
||||
<el-input v-model="form.money" placeholder="请输入金额,单位分" />
|
||||
</el-form-item>
|
||||
<el-form-item label="交易类型" prop="opType">
|
||||
<el-select v-model="form.opType" placeholder="请选择交易类型">
|
||||
<el-option label="请选择字典生成" value="" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<el-radio-group v-model="form.paymentStatus">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
<el-form-item label="附加数据" prop="attach">
|
||||
<el-input v-model="form.attach" placeholder="请输入附加数据" />
|
||||
</el-form-item>
|
||||
<el-form-item label="响应内容" prop="responseBody">
|
||||
<el-input v-model="form.responseBody" type="textarea" 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 { listOmsWechatPaymentHistory, getOmsWechatPaymentHistory, delOmsWechatPaymentHistory, addOmsWechatPaymentHistory, updateOmsWechatPaymentHistory, exportOmsWechatPaymentHistory } from "@/api/oms/wechatPaymentHistory";
|
||||
|
||||
export default {
|
||||
name: "OmsWechatPaymentHistory",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 微信订单表表格数据
|
||||
omsWechatPaymentHistoryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
paymentId: null,
|
||||
memberId: null,
|
||||
openid: null,
|
||||
realName: null,
|
||||
title: null,
|
||||
orderId: null,
|
||||
money: null,
|
||||
opType: null,
|
||||
paymentStatus: null,
|
||||
attach: null,
|
||||
responseBody: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
memberId: [
|
||||
{ required: true, message: "用户 ID不能为空", trigger: "blur" }
|
||||
],
|
||||
openid: [
|
||||
{ required: true, message: "OPENID不能为空", trigger: "blur" }
|
||||
],
|
||||
title: [
|
||||
{ required: true, message: "标题|商品名称不能为空", trigger: "blur" }
|
||||
],
|
||||
orderId: [
|
||||
{ required: true, message: "订单号 支付时是payId 其他为orderId不能为空", trigger: "blur" }
|
||||
],
|
||||
money: [
|
||||
{ required: true, message: "金额,单位分不能为空", trigger: "blur" }
|
||||
],
|
||||
opType: [
|
||||
{ required: true, message: "交易类型不能为空", trigger: "change" }
|
||||
],
|
||||
paymentStatus: [
|
||||
{ required: true, message: "状态不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
showMoreCondition: false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询微信订单表列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const {pageNum, pageSize} = this.queryParams;
|
||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
||||
listOmsWechatPaymentHistory(query, pageReq).then(response => {
|
||||
const { content, totalElements } = response
|
||||
this.omsWechatPaymentHistoryList = content;
|
||||
this.total = totalElements;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
paymentId: null,
|
||||
memberId: null,
|
||||
openid: null,
|
||||
realName: null,
|
||||
title: null,
|
||||
orderId: null,
|
||||
money: null,
|
||||
opType: null,
|
||||
paymentStatus: 0,
|
||||
remark: null,
|
||||
attach: null,
|
||||
responseBody: 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
|
||||
getOmsWechatPaymentHistory(id).then(response => {
|
||||
this.form = response;
|
||||
this.open = true;
|
||||
this.title = "修改微信订单表";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateOmsWechatPaymentHistory(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addOmsWechatPaymentHistory(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 delOmsWechatPaymentHistory(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$modal.confirm('是否确认导出所有微信订单表数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportOmsWechatPaymentHistory(queryParams);
|
||||
}).then(response => {
|
||||
this.$download.download(response);
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1,257 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
||||
<el-form-item label="状态" prop="showStatus">
|
||||
<DictRadio v-model="queryParams.showStatus" @change="handleQuery" size="small"
|
||||
:radioData="dict.type.sys_normal_disable" :showAll="'all'"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.nameLike"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item class="flex_one tr">
|
||||
<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"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="pmsBrandList" @selection-change="handleSelectionChange" border>
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="品牌logo" prop="logo">
|
||||
<template slot-scope="{ row }">
|
||||
<el-image v-if="row.logo" :src="row.logo" :preview-src-list="[row.logo]" class="small-img circle-img"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="名称" prop="name"/>
|
||||
<el-table-column label="排序" prop="sort"/>
|
||||
<el-table-column label="状态" prop="showStatus">
|
||||
<template slot-scope="{ row }">
|
||||
<dict-tag :value="row.showStatus" prop-name="sys_normal_disable"/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<InBody v-show="total>0">
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</InBody>
|
||||
|
||||
<!-- 添加或修改品牌管理对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="50%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-one">
|
||||
<el-form-item label="状态">
|
||||
<DictRadio v-model="form.showStatus" size="small"
|
||||
:radioData="dict.type.sys_normal_disable"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="form.sort" placeholder="请输入排序" />
|
||||
</el-form-item>
|
||||
<el-form-item label="logo" prop="logo">
|
||||
<oss-image-upload v-model="form.logo" :limit="1" />
|
||||
</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 {addPmsBrand, delPmsBrand, exportPmsBrand, getPmsBrand, listPmsBrand, updatePmsBrand} from "@/api/pms/brand";
|
||||
|
||||
export default {
|
||||
name: "PmsBrand",
|
||||
dicts: ['sys_normal_disable'],
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 品牌管理表格数据
|
||||
pmsBrandList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nameLike: null,
|
||||
sort: null,
|
||||
showStatus: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询品牌管理列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const {pageNum, pageSize} = this.queryParams;
|
||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
||||
listPmsBrand(query, pageReq).then(response => {
|
||||
const { content, totalElements } = response
|
||||
this.pmsBrandList = content;
|
||||
this.total = totalElements;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
name: null,
|
||||
sort: null,
|
||||
showStatus: 0,
|
||||
logo: 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
|
||||
getPmsBrand(id).then(response => {
|
||||
this.form = response;
|
||||
this.open = true;
|
||||
this.title = "修改品牌管理";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updatePmsBrand(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addPmsBrand(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 delPmsBrand(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$modal.confirm('是否确认导出所有品牌管理数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportPmsBrand(queryParams);
|
||||
}).then(response => {
|
||||
this.$download.download(response);
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1,363 +0,0 @@
|
||||
<template>
|
||||
<div class="add-product-wrapper">
|
||||
<el-form label-width="108px" :model="form" ref="form" :rules="rules">
|
||||
<el-card style="margin: 20px 20px; font-size: 14px">
|
||||
<div slot="header">
|
||||
<span>基本信息</span>
|
||||
</div>
|
||||
<el-row>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="商品名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入商品名称"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="商品编码" prop="outProductId">
|
||||
<el-input v-model="form.outProductId" placeholder="请输入商品编码"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="品牌" prop="brandId">
|
||||
<brand-select v-model="form.brandId" @change="onBrandChange"></brand-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="分类" prop="categoryId">
|
||||
<product-category-select v-model="form.categoryId" @change="categoryChange"></product-category-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="form.sort" placeholder="请输入排序"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="价格" prop="price">
|
||||
<el-input v-model="form.price" placeholder="请输入PRICE"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="单位" prop="unit">
|
||||
<el-input v-model="form.unit" placeholder="请输入单位"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="商品重量" prop="weight">
|
||||
<el-input v-model="form.weight" placeholder="商品重量,默认为克"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span="8">
|
||||
<el-form-item label="上架状态">
|
||||
<DictRadio v-model="form.publishStatus" size="small"
|
||||
:radioData="dict.type.pms_publish_status"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin: 20px 20px; font-size: 14px">
|
||||
<div slot="header">
|
||||
<span>产品图片</span>
|
||||
</div>
|
||||
<el-form-item label="主图" prop="pic">
|
||||
<oss-image-upload v-model="form.pic" :limit="1"></oss-image-upload>
|
||||
</el-form-item>
|
||||
<el-form-item label="轮播图" prop="albumPics">
|
||||
<oss-image-upload v-model="albumPics" :limit="5"></oss-image-upload>
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
|
||||
<el-card style="margin: 20px 20px; font-size: 14px">
|
||||
<div slot="header">
|
||||
<span>产品规格</span>
|
||||
</div>
|
||||
<el-form-item label="规格类型">
|
||||
<div class="sku-wrapper">
|
||||
<div class="sku_sorts">
|
||||
<div class="sku_sort" v-for="(s, idx0) in productAttr" :key="s.name">
|
||||
<div class="label flex-center">
|
||||
<div class="flex-one">
|
||||
<dict-select v-model="s.name" prop-name="sku_sort_list" value-prop="label"></dict-select>
|
||||
</div><a class="red" @click="deleteSkuSort(idx0)">删除规格类型</a>
|
||||
</div>
|
||||
<div class="values" v-if="s.name">
|
||||
<div class="value" v-for="(it2, idx1) in s.options" :key="idx1">
|
||||
<el-input :value="it2.name" @input="changeName(s, idx1, $event)" placeholder="请输入规格名称"></el-input><a class="red no-break ml8" v-if="idx1 < s.options.length - 1 || (s.options.length === maxOptionNum && idx1 === 3)" @click="deleteOption(s, idx1)">删除</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-button v-if="productAttr.length < 2" @click="addSkuSort">+添加规格类型</el-button>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-form-item label="规格信息">
|
||||
<el-button @click="refreshSku()" class="mb20">刷新列表</el-button>
|
||||
<el-table :data="form.skuList" :max-height="400">
|
||||
<el-table-column v-for="s in skuAttr" :label="s.name" :key="s.name" :prop="s.name"></el-table-column>
|
||||
<el-table-column label="展示图片">
|
||||
<template v-slot="{ row }">
|
||||
<oss-image-upload class="img-upload-mini" v-model="row.pic" :limit="1" :is-show-tip="false"></oss-image-upload>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="销售价格" >
|
||||
<template v-slot="{ row,$index }">
|
||||
<el-form-item
|
||||
:rules="{ required: true, message: '请填写价格', trigger: 'blur' }"
|
||||
:prop="'skuList['+$index+'].price'">
|
||||
<el-input v-model="row.price"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="库存">
|
||||
<template v-slot="{ row, $index }">
|
||||
<el-input v-model="row.stock" type="number"></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="编码">
|
||||
<template v-slot="{ row }">
|
||||
<el-form-item>
|
||||
<el-input v-model="row.outSkuId"></el-input>
|
||||
<el-input v-model="row.spData" v-show="false"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-card>
|
||||
<el-card style="margin: 20px 20px; font-size: 14px">
|
||||
<div slot="header">
|
||||
<span>详情页</span>
|
||||
</div>
|
||||
<el-form-item label="移动端" prop="detailMobileHtml">
|
||||
<Editor v-model="form.detailMobileHtml" placeholder="请输入内容" type="url"></Editor>
|
||||
</el-form-item>
|
||||
<el-form-item label="PC端" prop="detailHtml">
|
||||
<Editor v-model="form.detailHtml" placeholder="请输入内容" type="url"></Editor>
|
||||
</el-form-item>
|
||||
|
||||
</el-card>
|
||||
|
||||
<div class="tc">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {addPmsProduct, getPmsProduct, updatePmsProduct} from "@/api/pms/product";
|
||||
import ProductCategorySelect from "@/views/components/ProductCategorySelect";
|
||||
import BrandSelect from "@/views/components/BrandSelect";
|
||||
|
||||
export default {
|
||||
name: "AddProduct",
|
||||
dicts: ['pms_publish_status'],
|
||||
components: {BrandSelect, ProductCategorySelect},
|
||||
data() {
|
||||
return {
|
||||
rules: {
|
||||
name: [
|
||||
{ required: true, message: '请输入商品名称', trigger: 'blur' },
|
||||
],
|
||||
},
|
||||
form: {
|
||||
publishStatus: 0,
|
||||
sort: 1000
|
||||
},
|
||||
skuAttr:[],
|
||||
albumPics:null,
|
||||
productAttr: [
|
||||
{
|
||||
name: '颜色',
|
||||
options: [
|
||||
{name: '红'},
|
||||
{name: null}
|
||||
]
|
||||
}
|
||||
],
|
||||
maxOptionNum: 44
|
||||
}
|
||||
},
|
||||
created() {
|
||||
const {id} = this.$route.query
|
||||
if (id) {
|
||||
this.getInfo(id);
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
refreshSku(){
|
||||
let skus = [];
|
||||
let skuMap = new Map()
|
||||
this.skuAttr=[...this.productAttr]
|
||||
if(this.form.skuList){
|
||||
this.form.skuList.forEach(sku=>{
|
||||
skuMap.set(sku.spData,sku)
|
||||
})
|
||||
}
|
||||
this.productAttr.forEach((attr, index) => {
|
||||
const attrSku = [];
|
||||
attr.options.forEach((option) => {
|
||||
if (!option.name) {
|
||||
return
|
||||
}
|
||||
if (index === 0) {
|
||||
attrSku.push({[attr.name]: option.name});
|
||||
} else {
|
||||
skus.forEach(it3 => {
|
||||
attrSku.push({...it3, [attr.name]: option.name })
|
||||
})
|
||||
}
|
||||
})
|
||||
skus = attrSku;
|
||||
})
|
||||
skus.forEach(it => {
|
||||
if(it){
|
||||
it.spData=JSON.stringify(it)
|
||||
}
|
||||
})
|
||||
skus.forEach(it => {
|
||||
let sku = skuMap.get(it.spData);
|
||||
if(sku){
|
||||
it.outSkuId = sku.outSkuId;
|
||||
it.price = sku.price;
|
||||
it.pic = sku.pic;
|
||||
it.stock = sku.stock;
|
||||
it.id = sku.id
|
||||
}else{
|
||||
it.outSkuId = null;
|
||||
it.price = null;
|
||||
it.pic = null;
|
||||
it.stock = null;
|
||||
it.id = null
|
||||
}
|
||||
|
||||
})
|
||||
this.form.productAttr = JSON.stringify(this.productAttr)
|
||||
this.form.skuList= skus
|
||||
},
|
||||
categoryChange(value){
|
||||
if(Array.isArray(value)){
|
||||
console.log(value.toString())
|
||||
this.form.productCategoryName=value.toString()
|
||||
}else{
|
||||
this.form.productCategoryName=null
|
||||
}
|
||||
|
||||
},
|
||||
onBrandChange(value){
|
||||
this.form.brandName = value
|
||||
},
|
||||
getInfo(id) {
|
||||
getPmsProduct(id).then(response => {
|
||||
const {albumPics } = response
|
||||
if (albumPics) {
|
||||
this.albumPics = albumPics.split(',')
|
||||
}
|
||||
this.form = response;
|
||||
if(this.form.productAttr){
|
||||
this.productAttr =JSON.parse(this.form.productAttr)
|
||||
}
|
||||
this.refreshSku()
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if(this.albumPics){
|
||||
this.form.albumPics = this.albumPics.toString()
|
||||
}
|
||||
if(this.form.categoryId && Array.isArray(this.form.categoryId)){
|
||||
this.form.categoryId = this.form.categoryId.pop()
|
||||
}
|
||||
//商品价格没填时取sku的最低价
|
||||
if (!this.form.price){
|
||||
this.form.price = Math.min.apply(Math, this.form.skuList.map(it => it.price))
|
||||
}
|
||||
if (this.form.id != null) {
|
||||
updatePmsProduct(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
});
|
||||
} else {
|
||||
addPmsProduct(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
});
|
||||
}
|
||||
this.cancel();
|
||||
}else{
|
||||
if(this.form.name){
|
||||
this.$alert('请填写规格价格', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
});
|
||||
}else{
|
||||
this.$alert('请填写商品名称', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
cancel() {
|
||||
this.$tab.closeOpenPage({ path: '/pms/product' })
|
||||
},
|
||||
changeName(s, idx, val) {
|
||||
s.options[idx].name = val;
|
||||
if (s.options.length - 1 !== idx || s.options.length >= this.maxOptionNum) {
|
||||
return
|
||||
}
|
||||
s.options.push({name: null})
|
||||
},
|
||||
addSkuSort() {
|
||||
this.productAttr.push({
|
||||
name: null,
|
||||
options: [{name: null}]
|
||||
})
|
||||
},
|
||||
deleteSkuSort(idx) {
|
||||
this.productAttr.splice(idx);
|
||||
},
|
||||
deleteOption(s, idx) {
|
||||
s.options.splice(idx, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
.add-product-wrapper
|
||||
padding 12px
|
||||
.content
|
||||
margin 0 auto
|
||||
width 75%
|
||||
min-width 800px
|
||||
.sku-wrapper
|
||||
background-color #f7f8fa
|
||||
padding 12px
|
||||
.sku_sorts
|
||||
.sku_sort
|
||||
background-color white
|
||||
margin-bottom 12px
|
||||
.label
|
||||
padding 8px
|
||||
.values
|
||||
padding 8px 0 0 8px
|
||||
border-top 1px solid $border-color
|
||||
display flex
|
||||
flex-wrap wrap
|
||||
.value
|
||||
padding 0 32px 8px 0
|
||||
width 200px!important
|
||||
display flex
|
||||
align-items center
|
||||
.img-upload-mini .el-upload--picture-card
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
line-height: 57px;
|
||||
</style>
|
||||
@ -1,131 +0,0 @@
|
||||
<template>
|
||||
<el-dialog :title="chooseSkuObj.title" :visible.sync="chooseSkuObj.open" :width="chooseSkuObj.width" append-to-body>
|
||||
<el-form ref="auditForm" inline :model="chooseSkuObj.queryParams" label-width="80px">
|
||||
<el-form-item label="菜品名称" prop="nameLike">
|
||||
<el-input
|
||||
size="small"
|
||||
placeholder="请输入菜品名称"
|
||||
v-model="chooseSkuObj.queryParams.nameLike"
|
||||
clearable
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="菜品分类" prop="productCategoryName">
|
||||
<product-category-select v-model="chooseSkuObj.queryParams.categoryId"></product-category-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="getSkuList">搜索</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table class="mt20" :data="chooseSkuObj.list" ref="table" v-loading="chooseSkuObj.loading" max-height="500" border
|
||||
row-key="id" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"/>
|
||||
<el-table-column label="菜品名称" prop="name">
|
||||
<template v-slot="{row}">
|
||||
<div class="flex-center">
|
||||
<el-image v-if="row.pic" :src="row.pic" :preview-src-list="[row.pic]" class="small-img circle-img"/>
|
||||
<span class="ml5">{{ row.name }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="销量" prop="sales"/>
|
||||
<el-table-column label="创建时间" prop="createTime"/>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="chooseSkuObj.total>0"
|
||||
:total="chooseSkuObj.total"
|
||||
:page.sync="chooseSkuObj.queryParams.pageNum"
|
||||
:limit.sync="chooseSkuObj.queryParams.pageSize"
|
||||
@pagination="getSkuList"
|
||||
/>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="chooseSkuObj.open=false">取 消</el-button>
|
||||
</div>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import {listPmsProduct} from "@/api/pms/product";
|
||||
import ProductCategorySelect from "@/views/components/ProductCategorySelect.vue";
|
||||
|
||||
export default {
|
||||
components: {ProductCategorySelect},
|
||||
data() {
|
||||
return {
|
||||
selectSkuIds: [],
|
||||
selectProducts: [],
|
||||
chooseSkuObj: {
|
||||
loading: false,
|
||||
open: false,
|
||||
title: "选择菜品",
|
||||
list: [],
|
||||
width: '60%',
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
categoryId: null,
|
||||
pageSize: 10,
|
||||
nameLike: null,
|
||||
publishStatus: 1,
|
||||
excludeProductIds: []
|
||||
},
|
||||
total: 0
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitForm() {
|
||||
this.$emit('onComplete', this.selectProducts)
|
||||
this.chooseSkuObj.open = false
|
||||
},
|
||||
async init(chooseProductId) {
|
||||
this.chooseSkuObj.queryParams.excludeProductIds = chooseProductId;
|
||||
this.chooseSkuObj.queryParams.pageNum = 1;
|
||||
await this.getSkuList();
|
||||
this.chooseSkuObj.open = true
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.table.clearSelection()
|
||||
})
|
||||
},
|
||||
judge() {
|
||||
this.$nextTick(()=>{
|
||||
this.chooseSkuObj.list.forEach(ele => {
|
||||
if (this.selectProducts.some(item => item.id === ele.id)) {
|
||||
this.$refs.table.toggleRowSelection(ele, true)
|
||||
} else {
|
||||
this.$refs.table.toggleRowSelection(ele, false)
|
||||
}
|
||||
});
|
||||
})
|
||||
},
|
||||
handleSelectionChange(selection) {
|
||||
this.selectProducts = selection
|
||||
},
|
||||
async getSkuList() {
|
||||
this.chooseSkuObj.loading = true;
|
||||
const query = {...this.chooseSkuObj.queryParams, pageNum: undefined, pageSize: undefined};
|
||||
if (query.categoryId && Array.isArray(query.categoryId)) {
|
||||
query.categoryId = query.categoryId.pop()
|
||||
}
|
||||
const {pageNum, pageSize} = this.chooseSkuObj.queryParams;
|
||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
||||
await listPmsProduct(query, pageReq).then(response => {
|
||||
const {content, totalElements} = response
|
||||
this.chooseSkuObj.list = [...content];
|
||||
this.chooseSkuObj.total = totalElements;
|
||||
this.chooseSkuObj.loading = false;
|
||||
});
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="stylus">
|
||||
.line
|
||||
display flex
|
||||
align-items center
|
||||
margin-bottom: 5px;
|
||||
border-bottom 1px dashed #ccc
|
||||
|
||||
.line:last-child
|
||||
border-bottom 0 !important
|
||||
margin-bottom 0 !important
|
||||
</style>
|
||||
@ -1,320 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="100px"
|
||||
size="medium"
|
||||
class="ry_form"
|
||||
>
|
||||
<el-form-item label="状态" prop="showStatus">
|
||||
<DictRadio
|
||||
v-model="queryParams.showStatus"
|
||||
@change="handleQuery"
|
||||
size="small"
|
||||
:radioData="dict.type.sys_show_status"
|
||||
:showAll="'all'"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.nameLike"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item class="flex_one tr">
|
||||
<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"
|
||||
>新增
|
||||
</el-button>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="pmsProductCategoryList"
|
||||
border
|
||||
:tree-props="{ hasChildren: 'hasChildren', children: 'children' }"
|
||||
@selection-change="handleSelectionChange"
|
||||
row-key="id"
|
||||
>
|
||||
<el-table-column label="名称" prop="name" />
|
||||
<el-table-column label="图片" prop="icon">
|
||||
<template slot-scope="{ row }">
|
||||
<el-image
|
||||
v-if="row.icon"
|
||||
:src="row.icon"
|
||||
:preview-src-list="[row.icon]"
|
||||
class="small-img circle-img"
|
||||
/>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="排序" prop="sort" />
|
||||
<el-table-column label="状态" prop="showStatus">
|
||||
<template v-slot="{ row }">
|
||||
<dict-tag
|
||||
:value="row.showStatus"
|
||||
prop-name="sys_show_status"
|
||||
></dict-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
>修改
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<!-- 添加或修改商品分类对话框 -->
|
||||
<el-dialog :title="title" :visible.sync="open" width="500px">
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="108px">
|
||||
<el-form-item label="名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="图片" prop="icon">
|
||||
<oss-image-upload v-model="form.icon" :limit="1" />
|
||||
</el-form-item>
|
||||
<el-form-item label="状态">
|
||||
<DictRadio
|
||||
v-model="form.showStatus"
|
||||
size="small"
|
||||
:radioData="dict.type.sys_show_status"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="排序" prop="sort">
|
||||
<el-input v-model="form.sort" placeholder="排序" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="层级" prop="level">
|
||||
<el-input v-model="form.level" placeholder="层级" />
|
||||
</el-form-item> -->
|
||||
<!-- <el-form-item label="上级分类" prop="parentId">
|
||||
<product-category-select class="w200" v-model="form.parentId" :props="{ checkStrictly: true }"/>
|
||||
</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 {
|
||||
listPmsProductCategory,
|
||||
getPmsProductCategory,
|
||||
delPmsProductCategory,
|
||||
addPmsProductCategory,
|
||||
updatePmsProductCategory,
|
||||
exportPmsProductCategory,
|
||||
} from "@/api/pms/productCategory";
|
||||
import ProductCategorySelect from "@/views/components/ProductCategorySelect";
|
||||
|
||||
export default {
|
||||
name: "PmsProductCategory",
|
||||
dicts: ["sys_show_status"],
|
||||
components: { ProductCategorySelect },
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 商品分类表格数据
|
||||
pmsProductCategoryList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
parentId: null,
|
||||
nameLike: null,
|
||||
level: null,
|
||||
showStatus: null,
|
||||
sort: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询商品分类列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const query = { ...this.queryParams };
|
||||
listPmsProductCategory(query).then((rows) => {
|
||||
this.pmsProductCategoryList = rows;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
parentId: null,
|
||||
name: null,
|
||||
level: null,
|
||||
showStatus: 0,
|
||||
sort: null,
|
||||
icon: null,
|
||||
createBy: null,
|
||||
createTime: null,
|
||||
updateBy: null,
|
||||
updateTime: null,
|
||||
};
|
||||
this.resetForm("form");
|
||||
},
|
||||
/** 搜索按钮操作 */
|
||||
handleQuery() {
|
||||
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;
|
||||
getPmsProductCategory(id).then((response) => {
|
||||
this.form = response;
|
||||
this.open = true;
|
||||
this.title = "修改商品分类";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate((valid) => {
|
||||
if (valid) {
|
||||
let p;
|
||||
if (this.form.parentId) {
|
||||
this.form.parentId = this.form.parentId.pop();
|
||||
}
|
||||
if (this.form.id != null) {
|
||||
p = updatePmsProductCategory(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
p = addPmsProductCategory(this.form).then((response) => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
p.then(() => {
|
||||
this.$store.dispatch("mall/loadProductCategories", true);
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
if (row.children && row.children.length > 0) {
|
||||
this.$message.error("请先删除子目录");
|
||||
return;
|
||||
}
|
||||
const ids = row.id;
|
||||
this.$modal
|
||||
.confirm('是否确认删除商品分类编号为"' + ids + '"的数据项?')
|
||||
.then(function () {
|
||||
return delPmsProductCategory(ids);
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$modal
|
||||
.confirm("是否确认导出所有商品分类数据项?")
|
||||
.then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportPmsProductCategory(queryParams);
|
||||
})
|
||||
.then((response) => {
|
||||
this.$download.download(response);
|
||||
this.exportLoading = false;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
@ -1,427 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<div v-show="show">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
||||
<el-form-item label="创建时间">
|
||||
<el-date-picker
|
||||
size="small"
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
:clearable="true"
|
||||
:picker-options='pickerOptions'
|
||||
range-separator="-"
|
||||
start-placeholder="开始日期"
|
||||
end-placeholder="结束日期"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="账号启用状态">-->
|
||||
<!-- <el-select v-model="queryParams.status" placeholder="请选择" :clearable="true" size="small">-->
|
||||
<!-- <el-option label="禁用" value="0">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- <el-option label="启用" value="1">-->
|
||||
<!-- </el-option>-->
|
||||
<!-- </el-select>-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="昵称" prop="nickname">
|
||||
<el-input
|
||||
v-model.trim="queryParams.nickname"
|
||||
placeholder="请输入昵称"
|
||||
clearable
|
||||
size="small"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号码" prop="phone">
|
||||
<el-input
|
||||
v-model.trim="queryParams.phone"
|
||||
placeholder="请输入手机号码"
|
||||
clearable
|
||||
size="small"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="mark">
|
||||
<el-select v-model="queryParams.hasMark" clearable size="small">
|
||||
<el-option value="1" label="有备注" />
|
||||
<el-option value="0" label="无备注"/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item class="flex_one tr">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<!-- <el-button :icon="showMoreCondition ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" size="mini" @click="showMoreCondition = !showMoreCondition">{{showMoreCondition ? '收起条件' : '展开条件'}}</el-button>-->
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="loading" :data="umsMemberList" border>
|
||||
<el-table-column label="昵称" prop="nickname" width="150"/>
|
||||
<el-table-column label="手机号码" prop="phoneHidden" width="150"/>
|
||||
<el-table-column label="佣金" width="120">
|
||||
<template v-slot="scope">
|
||||
<div>0.00</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="积分" width="120">
|
||||
<template v-slot="scope">
|
||||
<div>0.00</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="余额" width="120">
|
||||
<template v-slot="scope">
|
||||
<div>0.00</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="注册时间" prop="createTime" width="180">
|
||||
<template v-slot="scope">
|
||||
<div>{{ parseTime(scope.row.createTime) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="上次登录" prop="createTime">
|
||||
<template v-slot="scope">
|
||||
<div>{{ parseTime(scope.row.createTime) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="备注">
|
||||
<template v-slot="scope">
|
||||
<span class="mr10">{{scope.row.mark}}</span>
|
||||
<i class="el-icon-edit pointer" @click="showUpdateMark(scope.row)"></i>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" class-name="small-padding fixed-width" fix="right" width="200">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="showStatistics(scope.row.id)"
|
||||
v-hasPermi="['ums:member:statistics']"
|
||||
>查看数据
|
||||
</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="goOrder(scope.row.phoneEncrypted)"
|
||||
>查看下单</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
@click="goCart(scope.row.phoneEncrypted)"
|
||||
>查看购物车</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<InBody v-show="total>0">
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</InBody>
|
||||
</div>
|
||||
<SeeAdsComponent ref="seeAdsComponentRef" v-if="!show" @confirmOk="confirmOk"/>
|
||||
<!-- 统计 -->
|
||||
<el-dialog :title="statisticsObj.title" :visible.sync="statisticsObj.open" width="500px" append-to-body>
|
||||
<el-descriptions direction="vertical" :column="2" border>
|
||||
<el-descriptions-item label="购物车数">{{ statisticsObj.data.cartCount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="订单数">{{ statisticsObj.data.orderCount }}</el-descriptions-item>
|
||||
<el-descriptions-item label="下单金额">¥{{ statisticsObj.data.orderAmount.toFixed(2) }}</el-descriptions-item>
|
||||
<el-descriptions-item label="售后数">{{ statisticsObj.data.aftersaleCount }}</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-dialog>
|
||||
<el-dialog title="修改备注" :visible.sync="remarkModal.visible" width="30%" append-to-body>
|
||||
<el-input type='textarea' :rows='3' placeholder='请输入内容' v-model='remarkModal.mark'/>
|
||||
<span class="dialog-footer" slot="footer">
|
||||
<el-button @click="remarkModal.visible = false">取 消</el-button>
|
||||
<el-button type='primary' @click='updateRemark'>确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
addUmsMember,
|
||||
changeAccountStatus,
|
||||
decryptedPhone,
|
||||
delUmsMember,
|
||||
exportUmsMember,
|
||||
getUmsMember,
|
||||
listUmsMember,
|
||||
updateUmsMember,
|
||||
updateUmsMemberMark,
|
||||
viewStatistics
|
||||
} from "@/api/ums/member";
|
||||
import dateUtil from '@/utils/DateUtil';
|
||||
import {isStarRepo} from "@/utils/is-star-plugin";
|
||||
import {mapGetters} from "vuex";
|
||||
import SeeAdsComponent from "@/components/SeeAdsComponent.vue";
|
||||
|
||||
export default {
|
||||
name: "UmsMember",
|
||||
components: {SeeAdsComponent},
|
||||
data() {
|
||||
return {
|
||||
show: false,
|
||||
pickerOptions: {
|
||||
shortcuts: dateUtil.getTimeShort()
|
||||
},
|
||||
remarkModal: {
|
||||
visible: false,
|
||||
mark: null,
|
||||
memberId: null,
|
||||
},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 会员信息表格数据
|
||||
umsMemberList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
nickname: null,
|
||||
phone: null,
|
||||
status: undefined,
|
||||
hasMark: undefined
|
||||
},
|
||||
dateRange:[],
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
level: [
|
||||
{ required: true, message: "等级不能为空", trigger: "blur" }
|
||||
],
|
||||
integral: [
|
||||
{ required: true, message: "用户剩余积分不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
showMoreCondition: false,
|
||||
statisticsObj: {
|
||||
open: false,
|
||||
data: {
|
||||
cartCount: 0,
|
||||
orderCount: 0,
|
||||
orderAmount: 0.00,
|
||||
aftersaleCount: 0
|
||||
},
|
||||
title: '用户数据统计'
|
||||
}
|
||||
};
|
||||
},
|
||||
async created() {
|
||||
this.$nextTick(()=>{
|
||||
this.$refs.seeAdsComponentRef.show()
|
||||
})
|
||||
},
|
||||
computed:{
|
||||
...mapGetters(['userId']),
|
||||
},
|
||||
methods: {
|
||||
async confirmOk(success) {
|
||||
if (success) {
|
||||
const res = await isStarRepo('zccbbg', 'RuoYi-Mall', this.userId, 'https://mall.ichengle.top/member/member', 'ruoyi-mall-商城', 'https://gitee.com/zccbbg/RuoYi-Mall')
|
||||
this.show = res;
|
||||
if (res) {
|
||||
this.getList();
|
||||
}
|
||||
}
|
||||
},
|
||||
showUpdateMark(record){
|
||||
this.remarkModal = {
|
||||
visible: true,
|
||||
mark: record.mark,
|
||||
memberId: record.id
|
||||
}
|
||||
},
|
||||
updateRemark(){
|
||||
updateUmsMemberMark({id:this.remarkModal.memberId,mark:this.remarkModal.mark})
|
||||
.then(res=>{
|
||||
if (res > 0) {
|
||||
this.$message.success('修改成功');
|
||||
this.remarkModal.visible = false;
|
||||
const obj = this.umsMemberList.filter(it=>it.id === this.remarkModal.memberId)[0]
|
||||
obj.mark = this.remarkModal.mark;
|
||||
} else {
|
||||
this.$message.success('修改失败');
|
||||
}
|
||||
})
|
||||
},
|
||||
/** 查询会员信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const {pageNum, pageSize} = this.queryParams;
|
||||
let query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
||||
if (!this.dateRange || this.dateRange.length > 0){
|
||||
query = { ...this.addDateRange2(query, this.dateRange) }
|
||||
}
|
||||
listUmsMember(query, pageReq).then(response => {
|
||||
const { content, totalElements } = response
|
||||
this.umsMemberList = content;
|
||||
this.total = totalElements;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
nickname: null,
|
||||
password: null,
|
||||
phone: null,
|
||||
mark: null,
|
||||
status: 0,
|
||||
avatar: null,
|
||||
gender: null,
|
||||
city: null,
|
||||
province: null,
|
||||
country: null,
|
||||
remark: null,
|
||||
birthday: null,
|
||||
spreadUid: null,
|
||||
spreadTime: null,
|
||||
level: null,
|
||||
integral: 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
|
||||
getUmsMember(id).then(response => {
|
||||
this.form = response;
|
||||
this.open = true;
|
||||
this.title = "修改会员信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateUmsMember(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addUmsMember(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 delUmsMember(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$modal.confirm('是否确认导出所有会员信息数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportUmsMember(queryParams);
|
||||
}).then(response => {
|
||||
this.$download.download(response);
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
},
|
||||
// 更改账户状态
|
||||
changeStatus(row){
|
||||
const data = {
|
||||
memberId: row.id,
|
||||
status: row.status
|
||||
}
|
||||
changeAccountStatus(data).then(response => {
|
||||
if (response < 1){
|
||||
this.$modal.msgError('操作失败')
|
||||
this.getList()
|
||||
}
|
||||
})
|
||||
},
|
||||
goOrder(phone){
|
||||
decryptedPhone(phone).then(res => {
|
||||
this.$router.push({
|
||||
path: '/order/order',
|
||||
query: {
|
||||
phone: res
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
goCart(phone){
|
||||
decryptedPhone(phone).then(res => {
|
||||
this.$router.push({
|
||||
path: '/member/shoppingCart',
|
||||
query: {
|
||||
phone: res
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
showStatistics(memberId){
|
||||
viewStatistics(memberId).then((response) => {
|
||||
this.statisticsObj.data = response
|
||||
this.statisticsObj.open = true
|
||||
})
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1,350 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
||||
<el-form-item label="收货人姓名" prop="name">
|
||||
<el-input
|
||||
v-model="queryParams.name"
|
||||
placeholder="请输入收货人姓名"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="手机号" prop="phone">
|
||||
<el-input
|
||||
v-model="queryParams.phone"
|
||||
placeholder="请输入手机号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮政编码" prop="postCode">
|
||||
<el-input
|
||||
v-model="queryParams.postCode"
|
||||
placeholder="请输入邮政编码"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="省份/直辖市" prop="province">
|
||||
<el-input
|
||||
v-model="queryParams.province"
|
||||
placeholder="请输入省份/直辖市"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="城市" prop="city">
|
||||
<el-input
|
||||
v-model="queryParams.city"
|
||||
placeholder="请输入城市"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<template v-if="showMoreCondition">
|
||||
<el-form-item label="区" prop="district">
|
||||
<el-input
|
||||
v-model="queryParams.district"
|
||||
placeholder="请输入区"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="详细地址" prop="detailAddress">
|
||||
<el-input
|
||||
v-model="queryParams.detailAddress"
|
||||
placeholder="请输入详细地址"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item class="flex_one tr">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button :icon="showMoreCondition ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" size="mini" @click="showMoreCondition = !showMoreCondition">{{showMoreCondition ? '收起条件' : '展开条件'}}</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="['ums:memberAddress:add']"-->
|
||||
<!-- >新增</el-button>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-col>-->
|
||||
<!-- </el-row>-->
|
||||
|
||||
<el-table v-loading="loading" :data="umsMemberAddressList">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
<el-table-column label="收货人姓名" align="center" prop="name" >
|
||||
<template v-slot="scope">
|
||||
<div>{{ getHiddenName(scope.row.name) }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="手机号" align="center" prop="phoneHidden" />
|
||||
<el-table-column label="邮政编码" align="center" prop="postCode" />
|
||||
<el-table-column label="省份/直辖市" align="center" prop="province" />
|
||||
<el-table-column label="城市" align="center" prop="city" />
|
||||
<el-table-column label="区" align="center" prop="district" />
|
||||
<el-table-column label="详细地址" align="center" prop="detailAddress" width="250">
|
||||
<template v-slot="scope">
|
||||
<div>{{ getHiddenDetailAddress(scope.row.detailAddress) }}</div>
|
||||
</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="['ums:memberAddress:edit']"-->
|
||||
<!-- >修改</el-button>-->
|
||||
<!-- <el-button-->
|
||||
<!-- size="mini"-->
|
||||
<!-- type="text"-->
|
||||
<!-- icon="el-icon-delete"-->
|
||||
<!-- @click="handleDelete(scope.row)"-->
|
||||
<!-- v-hasPermi="['ums:memberAddress: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="50%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two">
|
||||
<el-form-item label="MEMBER_ID" prop="memberId">
|
||||
<el-input v-model="form.memberId" placeholder="请输入MEMBER_ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="收货人名称" prop="name">
|
||||
<el-input v-model="form.name" placeholder="请输入收货人名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="PHONE" prop="phone">
|
||||
<el-input v-model="form.phone" placeholder="请输入PHONE" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否为默认">
|
||||
<el-radio-group v-model="form.defaultStatus">
|
||||
<el-radio label="1">请选择字典生成</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="邮政编码" prop="postCode">
|
||||
<el-input v-model="form.postCode" placeholder="请输入邮政编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="省份/直辖市" prop="province">
|
||||
<el-input v-model="form.province" placeholder="请输入省份/直辖市" />
|
||||
</el-form-item>
|
||||
<el-form-item label="城市" prop="city">
|
||||
<el-input v-model="form.city" placeholder="请输入城市" />
|
||||
</el-form-item>
|
||||
<el-form-item label="区" prop="district">
|
||||
<el-input v-model="form.district" placeholder="请输入区" />
|
||||
</el-form-item>
|
||||
<el-form-item label="详细地址(街道)" prop="detailAddress">
|
||||
<el-input v-model="form.detailAddress" placeholder="请输入详细地址(街道)" />
|
||||
</el-form-item>
|
||||
<el-form-item label="是否默认" prop="isDefault">
|
||||
<el-input v-model="form.isDefault" 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 { listUmsMemberAddress, getUmsMemberAddress, delUmsMemberAddress, addUmsMemberAddress, updateUmsMemberAddress, exportUmsMemberAddress } from "@/api/ums/memberAddress";
|
||||
export default {
|
||||
name: "UmsMemberAddress",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 会员收货地址表格数据
|
||||
umsMemberAddressList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
memberId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
defaultStatus: null,
|
||||
postCode: null,
|
||||
province: null,
|
||||
city: null,
|
||||
district: null,
|
||||
detailAddress: null,
|
||||
isDefault: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
isDefault: [
|
||||
{ required: true, message: "是否默认不能为空", trigger: "blur" }
|
||||
],
|
||||
},
|
||||
showMoreCondition: false,
|
||||
chineseNumbers: ['一', '二', '三', '四', '五', '六', '七', '八', '九', '十']
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询会员收货地址列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const {pageNum, pageSize} = this.queryParams;
|
||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
||||
listUmsMemberAddress(query, pageReq).then(response => {
|
||||
const { content, totalElements } = response
|
||||
this.umsMemberAddressList = content;
|
||||
this.total = totalElements;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
memberId: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
defaultStatus: 0,
|
||||
postCode: null,
|
||||
province: null,
|
||||
city: null,
|
||||
district: null,
|
||||
detailAddress: null,
|
||||
isDefault: 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
|
||||
getUmsMemberAddress(id).then(response => {
|
||||
this.form = response;
|
||||
this.open = true;
|
||||
this.title = "修改会员收货地址";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateUmsMemberAddress(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addUmsMemberAddress(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 delUmsMemberAddress(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$modal.confirm('是否确认导出所有会员收货地址数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportUmsMemberAddress(queryParams);
|
||||
}).then(response => {
|
||||
this.$download.download(response);
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1,274 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
||||
<el-form-item label="会员手机号" prop="phone">
|
||||
<el-input
|
||||
v-model="queryParams.phone"
|
||||
placeholder="请输入会员手机号"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="登录IP地址" prop="ipaddr">
|
||||
<el-input
|
||||
v-model="queryParams.ipaddr"
|
||||
placeholder="请输入登录IP地址"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="登录地点" prop="loginLocation">
|
||||
<el-input
|
||||
v-model="queryParams.loginLocation"
|
||||
placeholder="请输入登录地点"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="浏览器类型" prop="browser">
|
||||
<el-input
|
||||
v-model="queryParams.browser"
|
||||
placeholder="请输入浏览器类型"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="操作系统" prop="os">
|
||||
<el-input
|
||||
v-model="queryParams.os"
|
||||
placeholder="请输入操作系统"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="登录时间">
|
||||
<el-date-picker
|
||||
v-model="dateRange"
|
||||
style="width: 240px"
|
||||
value-format="yyyy-MM-dd"
|
||||
type="daterange"
|
||||
:clearable="false"
|
||||
:picker-options='pickerOptions'
|
||||
range-separator="-"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item class="flex_one tr">
|
||||
<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="umsMemberLogininforList" @selection-change="handleSelectionChange" border>
|
||||
<el-table-column type="selection" width="55" align="center"/>
|
||||
<el-table-column label="会员手机号" prop="phone"/>
|
||||
<el-table-column label="会员id" prop="memberId"/>
|
||||
<el-table-column label="登录IP地址" prop="ipaddr"/>
|
||||
<el-table-column label="登录地点" prop="loginLocation"/>
|
||||
<el-table-column label="浏览器类型" prop="browser"/>
|
||||
<el-table-column label="操作系统" prop="os"/>
|
||||
<el-table-column label="登陆时间" prop="loginTime" width="180">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.loginTime, '') }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" class-name="small-padding fixed-width">
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['ums:memberLogininfor:remove']"
|
||||
>删除
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<InBody v-show="total>0">
|
||||
<pagination
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNum"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</InBody>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
addUmsMemberLogininfor,
|
||||
delUmsMemberLogininfor,
|
||||
exportUmsMemberLogininfor,
|
||||
getUmsMemberLogininfor,
|
||||
listUmsMemberLogininfor,
|
||||
updateUmsMemberLogininfor
|
||||
} from "@/api/ums/memberLogininfor";
|
||||
import dateUtil from '@/utils/DateUtil';
|
||||
|
||||
export default {
|
||||
name: "UmsMemberLogininfor",
|
||||
data() {
|
||||
return {
|
||||
dateRange: [],
|
||||
pickerOptions: {
|
||||
shortcuts: dateUtil.getTimeShort()
|
||||
},
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 会员登录记录表格数据
|
||||
umsMemberLogininforList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
phone: null,
|
||||
ipaddr: null,
|
||||
loginLocation: null,
|
||||
browser: null,
|
||||
os: null,
|
||||
loginTime: null
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询会员登录记录列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const {pageNum, pageSize} = this.queryParams;
|
||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
||||
listUmsMemberLogininfor({...this.addDateRange2(query, this.dateRange)}, pageReq).then(response => {
|
||||
const { content, totalElements } = response
|
||||
this.umsMemberLogininforList = content;
|
||||
this.total = totalElements;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
phone: null,
|
||||
memberId: null,
|
||||
ipaddr: null,
|
||||
loginLocation: null,
|
||||
browser: null,
|
||||
os: null,
|
||||
loginTime: 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
|
||||
getUmsMemberLogininfor(id).then(response => {
|
||||
this.form = response;
|
||||
this.open = true;
|
||||
this.title = "修改会员登录记录";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateUmsMemberLogininfor(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addUmsMemberLogininfor(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 delUmsMemberLogininfor(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$modal.confirm('是否确认导出所有会员登录记录数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportUmsMemberLogininfor(queryParams);
|
||||
}).then(response => {
|
||||
this.$download.download(response);
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@ -1,404 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParams" ref="queryForm" :inline="true" v-show="showSearch" label-width="100px" size="medium" class="ry_form">
|
||||
<el-form-item label="MEMBER_ID" prop="memberId">
|
||||
<el-input
|
||||
v-model="queryParams.memberId"
|
||||
placeholder="请输入MEMBER_ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段" prop="unionid">
|
||||
<el-input
|
||||
v-model="queryParams.unionid"
|
||||
placeholder="请输入只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户的标识,对当前公众号唯一" prop="openid">
|
||||
<el-input
|
||||
v-model="queryParams.openid"
|
||||
placeholder="请输入用户的标识,对当前公众号唯一"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="小程序唯一身份ID" prop="routineOpenid">
|
||||
<el-input
|
||||
v-model="queryParams.routineOpenid"
|
||||
placeholder="请输入小程序唯一身份ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户所在的分组ID" prop="groupid">
|
||||
<el-input
|
||||
v-model="queryParams.groupid"
|
||||
placeholder="请输入用户所在的分组ID"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户被打上的标签ID列表" prop="tagidList">
|
||||
<el-input
|
||||
v-model="queryParams.tagidList"
|
||||
placeholder="请输入用户被打上的标签ID列表"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="用户是否订阅该公众号标识" prop="subscribe">
|
||||
<el-input
|
||||
v-model="queryParams.subscribe"
|
||||
placeholder="请输入用户是否订阅该公众号标识"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<template v-if="showMoreCondition">
|
||||
<el-form-item label="关注公众号时间" prop="subscribeTime">
|
||||
<el-input
|
||||
v-model="queryParams.subscribeTime"
|
||||
placeholder="请输入关注公众号时间"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="小程序用户会话密匙" prop="sessionKey">
|
||||
<el-input
|
||||
v-model="queryParams.sessionKey"
|
||||
placeholder="请输入小程序用户会话密匙"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="过期时间" prop="expiresIn">
|
||||
<el-input
|
||||
v-model="queryParams.expiresIn"
|
||||
placeholder="请输入过期时间"
|
||||
clearable
|
||||
size="small"
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="过期时间" prop="expireTime">
|
||||
<el-date-picker
|
||||
clearable
|
||||
size="small"
|
||||
v-model="queryParams.expireTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-ddTHH:mm:ss"
|
||||
placeholder="选择过期时间">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<el-form-item class="flex_one tr">
|
||||
<el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
<el-button :icon="showMoreCondition ? 'el-icon-arrow-up' : 'el-icon-arrow-down'" size="mini" @click="showMoreCondition = !showMoreCondition">{{showMoreCondition ? '收起条件' : '展开条件'}}</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="['ums:memberWechat:add']"
|
||||
>新增</el-button>
|
||||
</el-col>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-table v-loading="loading" :data="umsMemberWechatList" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55" align="center" />
|
||||
<el-table-column label="MEMBER_ID" align="center" prop="memberId" />
|
||||
<el-table-column label="只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段" align="center" prop="unionid" />
|
||||
<el-table-column label="用户的标识,对当前公众号唯一" align="center" prop="openid" />
|
||||
<el-table-column label="小程序唯一身份ID" align="center" prop="routineOpenid" />
|
||||
<el-table-column label="用户所在的分组ID" align="center" prop="groupid" />
|
||||
<el-table-column label="用户被打上的标签ID列表" align="center" prop="tagidList" />
|
||||
<el-table-column label="用户是否订阅该公众号标识" align="center" prop="subscribe" />
|
||||
<el-table-column label="关注公众号时间" align="center" prop="subscribeTime" />
|
||||
<el-table-column label="小程序用户会话密匙" align="center" prop="sessionKey" />
|
||||
<el-table-column label="token" align="center" prop="accessToken" />
|
||||
<el-table-column label="过期时间" align="center" prop="expiresIn" />
|
||||
<el-table-column label="刷新token" align="center" prop="refreshToken" />
|
||||
<el-table-column label="过期时间" align="center" prop="expireTime" width="180" >
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.expireTime, '')}}</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="['ums:memberWechat:edit']"
|
||||
>修改</el-button>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
v-hasPermi="['ums:memberWechat: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="50%" append-to-body>
|
||||
<el-form ref="form" :model="form" :rules="rules" label-width="108px" inline class="dialog-form-two">
|
||||
<el-form-item label="MEMBER_ID" prop="memberId">
|
||||
<el-input v-model="form.memberId" placeholder="请输入MEMBER_ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段" prop="unionid">
|
||||
<el-input v-model="form.unionid" placeholder="请输入只有在用户将公众号绑定到微信开放平台帐号后,才会出现该字段" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户的标识,对当前公众号唯一" prop="openid">
|
||||
<el-input v-model="form.openid" placeholder="请输入用户的标识,对当前公众号唯一" />
|
||||
</el-form-item>
|
||||
<el-form-item label="小程序唯一身份ID" prop="routineOpenid">
|
||||
<el-input v-model="form.routineOpenid" placeholder="请输入小程序唯一身份ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户所在的分组ID" prop="groupid">
|
||||
<el-input v-model="form.groupid" placeholder="请输入用户所在的分组ID" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户被打上的标签ID列表" prop="tagidList">
|
||||
<el-input v-model="form.tagidList" placeholder="请输入用户被打上的标签ID列表" />
|
||||
</el-form-item>
|
||||
<el-form-item label="用户是否订阅该公众号标识" prop="subscribe">
|
||||
<el-input v-model="form.subscribe" placeholder="请输入用户是否订阅该公众号标识" />
|
||||
</el-form-item>
|
||||
<el-form-item label="关注公众号时间" prop="subscribeTime">
|
||||
<el-input v-model="form.subscribeTime" placeholder="请输入关注公众号时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="小程序用户会话密匙" prop="sessionKey">
|
||||
<el-input v-model="form.sessionKey" placeholder="请输入小程序用户会话密匙" />
|
||||
</el-form-item>
|
||||
<el-form-item label="token" prop="accessToken">
|
||||
<el-input v-model="form.accessToken" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="过期时间" prop="expiresIn">
|
||||
<el-input v-model="form.expiresIn" placeholder="请输入过期时间" />
|
||||
</el-form-item>
|
||||
<el-form-item label="刷新token" prop="refreshToken">
|
||||
<el-input v-model="form.refreshToken" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
<el-form-item label="过期时间" prop="expireTime">
|
||||
<el-date-picker clearable size="small"
|
||||
v-model="form.expireTime"
|
||||
type="datetime"
|
||||
value-format="yyyy-MM-ddTHH:mm:ss"
|
||||
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 { listUmsMemberWechat, getUmsMemberWechat, delUmsMemberWechat, addUmsMemberWechat, updateUmsMemberWechat, exportUmsMemberWechat } from "@/api/ums/memberWechat";
|
||||
|
||||
export default {
|
||||
name: "UmsMemberWechat",
|
||||
data() {
|
||||
return {
|
||||
// 遮罩层
|
||||
loading: true,
|
||||
// 导出遮罩层
|
||||
exportLoading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 用户微信信息表格数据
|
||||
umsMemberWechatList: [],
|
||||
// 弹出层标题
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
memberId: null,
|
||||
unionid: null,
|
||||
openid: null,
|
||||
routineOpenid: null,
|
||||
groupid: null,
|
||||
tagidList: null,
|
||||
subscribe: null,
|
||||
subscribeTime: null,
|
||||
sessionKey: null,
|
||||
accessToken: null,
|
||||
expiresIn: null,
|
||||
refreshToken: null,
|
||||
expireTime: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
rules: {
|
||||
},
|
||||
showMoreCondition: false
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getList();
|
||||
},
|
||||
methods: {
|
||||
/** 查询用户微信信息列表 */
|
||||
getList() {
|
||||
this.loading = true;
|
||||
const {pageNum, pageSize} = this.queryParams;
|
||||
const query = {...this.queryParams, pageNum: undefined, pageSize: undefined};
|
||||
const pageReq = {page: pageNum - 1, size: pageSize};
|
||||
listUmsMemberWechat(query, pageReq).then(response => {
|
||||
const { content, totalElements } = response
|
||||
this.umsMemberWechatList = content;
|
||||
this.total = totalElements;
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
this.reset();
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
id: null,
|
||||
memberId: null,
|
||||
unionid: null,
|
||||
openid: null,
|
||||
routineOpenid: null,
|
||||
groupid: null,
|
||||
tagidList: null,
|
||||
subscribe: null,
|
||||
subscribeTime: null,
|
||||
sessionKey: null,
|
||||
accessToken: null,
|
||||
expiresIn: null,
|
||||
refreshToken: null,
|
||||
expireTime: 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
|
||||
getUmsMemberWechat(id).then(response => {
|
||||
this.form = response;
|
||||
this.open = true;
|
||||
this.title = "修改用户微信信息";
|
||||
});
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm() {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != null) {
|
||||
updateUmsMemberWechat(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addUmsMemberWechat(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 delUmsMemberWechat(ids);
|
||||
}).then(() => {
|
||||
this.getList();
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
}).catch(() => {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$modal.confirm('是否确认导出所有用户微信信息数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return exportUmsMemberWechat(queryParams);
|
||||
}).then(response => {
|
||||
this.$download.download(response);
|
||||
this.exportLoading = false;
|
||||
}).catch(() => {});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
Loading…
Reference in new issue