lhl hace 4 días
padre
commit
fdd1f804f4

+ 47 - 0
src/api/system/points.js

@@ -0,0 +1,47 @@
+import request from '@/plugins/request/system';
+export function getPointsBill(params) {
+  return request({
+    url: '/systemv1/member/scoreDetail',
+    method: 'get',
+    params: params,
+  })
+}
+
+export function getCzBill(params) {
+  return request({
+    url: '/systemv1/recharge/orderList',
+    method: 'get',
+    params: params,
+  })
+}
+
+/**
+ * 订单列表
+ * @param {Object} params 
+ * @param {Number} params.pageNum 页码
+ * @param {Number} params.pageSize 每页数量
+ */
+export function getOrderList(params) {
+  return request({
+    url: '/systemv1/shop/list',
+    method: 'get',
+    params: params,
+  })
+}
+
+
+/**
+ * 发货
+ * @param {Object} data 
+ * @param {String} data.id 订单ID
+ * @param {String} data.express_type 快递公司
+ * @param {String} data.express_code 快递公司编码
+ * @param {String} data.express_num 快递单号
+ */
+export function fahuo(data) {
+  return request({
+    url: '/systemv1/shop/fahuo',
+    method: 'post',
+    data
+  })
+}

+ 9 - 0
src/api/system/signing.js

@@ -92,4 +92,13 @@ export function getDetail(data) {
     method: 'get',
     params: data
   });
+}
+
+
+export function endComment(data) {
+	return request({
+	  url: '/systemv1/contract/endComment',
+	  method: 'post',
+	  data
+	});
 }

+ 12 - 0
src/api/system/user.js

@@ -55,6 +55,18 @@ export function  SystemUserMoneyDetailSave(data = {}) {
   });
 }
 
+/**
+ * 积分明细补扣
+ * @param data
+ * @constructor
+ */
+export function  SystemUserScoreDetailSave(data = {}) {
+  return request({
+    url: '/systemv1/member/scoreDetailSave',
+    method: 'post',
+    data : data
+  });
+}
 
 
 

+ 250 - 0
src/components/system/chat/index.vue

@@ -0,0 +1,250 @@
+<template>
+    <div style="padding-top: 10px;">
+		<i-page-header :title="pageTitle"></i-page-header>
+        <Card :bordered="false" dis-hover class="ivu-mt">
+            <!-- <Form ref="orderData" :model="orderData">
+                <Row :gutter="24" type="flex">
+					<Col>
+					    <FormItem label="UID:" label-for="uid">
+					        <Input placeholder="用户UID" v-model="orderData.uid"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="绑定手机:" label-for="mobile">
+					        <Input placeholder="绑定手机号码" v-model="orderData.mobile"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="购买时间:">
+					        <DatePicker v-model="orderData.time" format="yyyy/MM/dd HH:mm:ss" type="datetimerange" placement="bottom-start" placeholder="自定义时间" style="width: 300px;" class="mr20" :options="options"></DatePicker>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <Button label="default" type="primary" icon="ios-search"  class="mr15" style="margin-top: 32px;" @click="orderSearch()">搜索</Button>
+					</Col>
+                </Row>
+            </Form> -->
+            <!-- <Col>
+                <Button class="export" icon="ios-share-outline" @click="exports">导出</Button>
+            </Col> -->
+			
+
+            <Table :columns="columns"  :data="orderList" ref="table" :loading="loading" highlight-row no-data-text="暂无数据" no-filtered-data-text="暂无筛选结果"  class="orderData mt25">
+                <template slot-scope="{ row, index }" slot="order_id">
+                    <span v-text="row.order_id" style="display: block;"></span>
+                </template>
+				<template slot-scope="{ row, index }" slot="uid">
+					<div>{{row.nickname || '微信用户'}}[UID:{{row.uid}}]</div>
+					<div>{{row.mobile || '未绑定手机号'}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="imgs">
+					<img v-if="row.imgs.length>0" v-lazy="row.imgs[0]" :src="row.imgs[0]" v-image-preview style="width: 60px;cursor: pointer"/>
+				</template>
+				
+				<template slot-scope="{ row, index }" slot="is_default">
+					<el-tag type="success" size="mini" v-if="row.is_default == 1">默认模板</el-tag>
+				</template>
+				
+				
+				
+            </Table>
+            <div class="acea-row row-right page">
+                <Page :total="page.count" show-elevator show-total @on-change="tapPage" :page-size="page.pageSize"/>
+            </div>
+        </Card>
+       
+    </div>
+</template>
+<script>
+    import IPageHeader from "../../../layouts/system/page-header/index";
+    import {SystemShowTemplateList} from "../../../api/system/user";
+
+    export default {
+        name: "chatList",
+        components: {SystemShowTemplateList,IPageHeader},
+        computed: {},
+        data() {
+            return {
+				pageTitle:"聊天记录",
+                options: {
+                    shortcuts: [
+                        {
+                            text: '今天',
+                            value() {
+                                const end = new Date();
+                                const start = new Date();
+                                start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()));
+                                return [start, end];
+                            }
+                        },
+                        {
+                            text: '昨天',
+                            value() {
+                                const end = new Date();
+                                const start = new Date();
+                                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)));
+                                end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())));
+                                return [start, end];
+                            }
+                        },
+                        {
+                            text: '最近7天',
+                            value() {
+                                const end = new Date();
+                                const start = new Date();
+                                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 6)));
+                                return [start, end];
+                            }
+                        },
+                        {
+                            text: '最近30天',
+                            value() {
+                                const end = new Date();
+                                const start = new Date();
+                                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 29)));
+                                return [start, end];
+                            }
+                        },
+                        {
+                            text: '本月',
+                            value() {
+                                const end = new Date();
+                                const start = new Date();
+                                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)));
+                                return [start, end];
+                            }
+                        },
+                        {
+                            text: '本年',
+                            value() {
+                                const end = new Date();
+                                const start = new Date();
+                                start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+                                return [start, end];
+                            }
+                        }
+                    ]
+                },
+
+                orderData: {
+					uid             : "",
+                    status          : "all",
+                    time            : [],
+					mobile          : "",
+					show_template_id:"",
+                },
+                columns: [
+					{
+					    title: 'ID',
+					    align: 'center',
+					    key: 'id',
+					    align:'center'
+					},
+                    {
+                        title: '发送人',
+						slot: 'uid',
+                        align:'center'
+                    },
+					{
+					    title: '接收人',
+						slot: 'to_uid',
+					    align:'center'
+					},
+					{
+					    title: '聊天图片',
+					    align: 'center',
+					    slot: 'imgs',
+					    align:'center'
+					},
+					{
+					    title: '内容',
+					    align: 'center',
+					    key: 'content',
+					    align:'left'
+					},
+					{
+					    title: '时间',
+					    align: 'center',
+					    key: 'add_time',
+					    align:'left'
+					},
+                ],
+                loading:false,
+                orderList:[],
+                orderDatalist:{},
+                orderId : 0,
+                page: {
+                    total: 0, // 总条数
+                    page: 1, // 当前页
+                    pageSize: 10 // 每页显示条数
+                },
+            }
+        },
+
+        created() {
+			if(this.$route.query.title){
+				this.pageTitle = this.$route.query.title;
+			}
+			if(this.$route.query.uid){
+				this.orderData.uid = parseInt(this.$route.query.uid);
+			}
+			if(this.$route.query.show_template_id){
+				this.orderData.show_template_id = parseInt(this.$route.query.show_template_id);
+			}
+            this.initView();
+        },
+        methods: {
+            /**
+             * 基本数据
+             */
+            initView: function () {
+                this.getData();
+            },
+			tabsHandleClick:function(tab, event){
+				this.page.page = 1;
+				this.getData();
+			},
+            orderSearch:function(){
+                this.page.page = 1;
+                this.getData();
+            },
+            /**
+             * 分页
+             */
+            tapPage:function(index){
+                this.page.page = index;
+                this.getData();
+            },
+            /**
+             * 获取数据
+             */
+            getData:function () {
+				var that =this;
+                // this.loading = true;
+                var data = {
+                    page :that.page.page,
+                    ...that.orderData
+                };
+                // SystemShowTemplateList(data)
+                //     .then(res=>{
+                //         that.loading = false;
+                //         if(res.code == 200) {
+                //             that.orderList = res.data.list;
+                //             that.page.pageSize = res.data.pageSize;
+                //             that.page.count = res.data.pageCount;
+                //         } else {
+                //             that.$alert(res.msg);
+                //         }
+                //     })
+                //     .catch(err=>{
+                //         that.loading = false;
+                //         that.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+                //     });
+            },
+
+        }
+    }
+</script>
+<style scoped>
+
+</style>

+ 8 - 0
src/components/system/forum/index.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 361 - 0
src/components/system/forum/list.vue

@@ -0,0 +1,361 @@
+<template>
+	<div style="padding-top: 10px;">
+		<i-page-header :title="pageTitle"></i-page-header>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- <Form ref="orderData" :model="orderData">
+                <Row :gutter="24" type="flex">
+					<Col>
+					    <FormItem label="UID:" label-for="uid">
+					        <Input placeholder="用户UID" v-model="orderData.uid"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="绑定手机:" label-for="mobile">
+					        <Input placeholder="绑定手机号码" v-model="orderData.mobile"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="购买时间:">
+					        <DatePicker v-model="orderData.time" format="yyyy/MM/dd HH:mm:ss" type="datetimerange" placement="bottom-start" placeholder="自定义时间" style="width: 300px;" class="mr20" :options="options"></DatePicker>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <Button label="default" type="primary" icon="ios-search"  class="mr15" style="margin-top: 32px;" @click="orderSearch()">搜索</Button>
+					</Col>
+                </Row>
+            </Form> -->
+			<Col>
+			<Button type="primary" class="export" icon="ios-share-outline" @click="sendOpen">发布贴子</Button>
+			</Col>
+			<Table :columns="columns" :data="orderList" ref="table" :loading="loading" highlight-row no-data-text="暂无数据"
+				no-filtered-data-text="暂无筛选结果" class="orderData mt25">
+				<template slot-scope="{ row, index }" slot="order_id">
+					<span v-text="row.order_id" style="display: block;"></span>
+				</template>
+				<template slot-scope="{ row, index }" slot="uid">
+					<div>{{row.nickname || '微信用户'}}[UID:{{row.uid}}]</div>
+					<div>{{row.mobile || '未绑定手机号'}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="imgs">
+					<div v-if="row.imgs.length>0" style="display: flex;">
+						<img v-for="item in row.imgs" v-lazy="item" :src="item" v-image-preview
+							style="width: 60px;cursor: pointer" />
+					</div>
+				</template>
+
+				<template slot-scope="{ row, index }" slot="handle">
+					<div><el-button plain size="mini" @click="">查看评论</el-button></div>
+					<br />
+					<div><el-button plain size="mini" @click="">删除</el-button></div>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="page.count" show-elevator show-total @on-change="tapPage" :page-size="page.pageSize" />
+			</div>
+		</Card>
+
+		<Modal v-model="sendModel" title="发布贴子" @on-ok="sendOk('sendFormValidate')" @on-cancel="sendCancel" width="800">
+			<Form :model="sendData" :label-width="labelWidth" :rules="ruleValidate" ref="sendFormValidate">
+				<FormItem label="贴子文本" prop="content">
+					<Input v-model="sendData.content" type="textarea" :autosize="{minRows: 5,maxRows: 5}"
+						placeholder="请输入贴子内容"></Input>
+				</FormItem>
+				<FormItem label="图片">
+					<div class="clearfix">
+						<div class="upimg-item fx-r fx-bc fx-ac" style="" v-for="(item,index) in sendData.imgs"
+							:key="index">
+							<img v-lazy="item" :src="item" v-image-preview />
+							<i class="el-icon-error img-remove-btn" @click="removeImgs(index)"></i>
+						</div>
+						<ui-upload style="float: left;" :upUrl="upUrl" fileName="上传图片" :headers="upHeaders"
+							:updata="{isz:0,code:'goods'}" @onUpload="onUpload"
+							v-if="sendData.imgs.length<6"></ui-upload>
+					</div>
+				</FormItem>
+			</Form>
+			<div slot="footer">
+				<Button  size="large"  :loading="modal_loading" @click="sendCancel">取消</Button>
+			            <Button type="primary" size="large"  :loading="modal_loading" @click="sendOk('sendFormValidate')">提交</Button>
+			        </div>
+		</Modal>
+	</div>
+</template>
+<script>
+	import IPageHeader from "../../../layouts/system/page-header/index";
+	import {
+		SystemShowTemplateList
+	} from "../../../api/system/user";
+	import Setting from '@/setting';
+	import UiUpload from "@/ui/upload/index";
+
+	export default {
+		name: "forumList",
+		components: {
+			SystemShowTemplateList,
+			IPageHeader,
+			UiUpload
+		},
+		computed: {},
+		data() {
+			return {
+				modal_loading: false,
+				ruleValidate: {
+					content: [{
+						required: true,
+						message: '请输入贴子内容',
+						trigger: 'blur'
+					}],
+
+				},
+				labelWidth: 120,
+				upHeaders: {},
+				upUrl: '',
+				sendData: {
+					content: '',
+					imgs: []
+				},
+				sendModel: false,
+				pageTitle: "贴子记录",
+				options: {
+					shortcuts: [{
+							text: '今天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date()
+									.getDate()));
+								return [start, end];
+							}
+						},
+						{
+							text: '昨天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 1)));
+								end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate())));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近7天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 6)));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近30天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 29)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本月',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									1)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本年',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+								return [start, end];
+							}
+						}
+					]
+				},
+
+				orderData: {
+					uid: "",
+					status: "all",
+					time: [],
+					mobile: "",
+					show_template_id: "",
+				},
+				columns: [{
+						title: 'ID',
+						align: 'center',
+						key: 'id',
+						align: 'center'
+					},
+					{
+						title: '发布者',
+						slot: 'uid',
+						align: 'center'
+					},
+					{
+						title: '帖子内容',
+						align: 'center',
+						key: 'content',
+						align: 'left'
+					},
+					{
+						title: '帖子图片',
+						align: 'center',
+						slot: 'imgs',
+						align: 'center'
+					},
+					{
+						title: '时间',
+						align: 'center',
+						key: 'add_time',
+						align: 'left'
+					},
+					{
+						title: '操作',
+						align: 'center',
+						slot: 'handle',
+						align: 'left'
+					},
+				],
+				loading: false,
+				orderList: [],
+				orderDatalist: {},
+				orderId: 0,
+				page: {
+					total: 0, // 总条数
+					page: 1, // 当前页
+					pageSize: 10 // 每页显示条数
+				},
+			}
+		},
+
+		created() {
+			if (this.$route.query.title) {
+				this.pageTitle = this.$route.query.title;
+			}
+			if (this.$route.query.uid) {
+				this.orderData.uid = parseInt(this.$route.query.uid);
+			}
+			if (this.$route.query.show_template_id) {
+				this.orderData.show_template_id = parseInt(this.$route.query.show_template_id);
+			}
+			this.initView();
+		},
+		methods: {
+			initView: function() {
+				var upHeaders = {};
+				this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
+				const token = this.$utils.util.cookies.get('system_token');
+				if (token) {
+					upHeaders['SYSTEM-ACC-TOKEN'] = token;
+				}
+				this.upHeaders = upHeaders;
+			},
+			onUpload: function(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
+				} else {
+					this.sendData.imgs.push(res.data.img);
+				}
+			},
+			removeImgs: function(index) {
+				this.$delete(this.sendData.imgs, index);
+			},
+			sendOpen() {
+				this.sendModel = true
+			},
+			sendCancel() {
+				this.sendModel = false
+				this.sendData = {
+					content: '',
+					imgs: []
+				}
+				console.log('sendCancel');
+			},
+			sendOk(name) {
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						this.sendCancel()
+						this.$Message.success('发布成功!');
+					} else {
+					}
+				})
+			},
+			tabsHandleClick: function(tab, event) {
+				this.page.page = 1;
+				this.getData();
+			},
+			orderSearch: function() {
+				this.page.page = 1;
+				this.getData();
+			},
+			/**
+			 * 分页
+			 */
+			tapPage: function(index) {
+				this.page.page = index;
+				this.getData();
+			},
+			/**
+			 * 获取数据
+			 */
+			getData: function() {
+				var that = this;
+				// this.loading = true;
+				var data = {
+					page: that.page.page,
+					...that.orderData
+				};
+				// SystemShowTemplateList(data)
+				//     .then(res=>{
+				//         that.loading = false;
+				//         if(res.code == 200) {
+				//             that.orderList = res.data.list;
+				//             that.page.pageSize = res.data.pageSize;
+				//             that.page.count = res.data.pageCount;
+				//         } else {
+				//             that.$alert(res.msg);
+				//         }
+				//     })
+				//     .catch(err=>{
+				//         that.loading = false;
+				//         that.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+				//     });
+			},
+
+		}
+	}
+</script>
+<style scoped>
+	.upimg-item {
+		width: 82px;
+		height: 82px;
+		margin-right: 5px;
+		overflow: hidden;
+		float: left;
+		margin-bottom: 5px;
+		position: relative;
+	}
+
+	.upimg-item img {
+		width: 82px;
+		cursor: pointer;
+	}
+
+	.img-remove-btn {
+		position: absolute;
+		top: 0px;
+		right: 0px;
+		font-size: 24px;
+	}
+</style>

+ 262 - 0
src/components/system/points/bill.vue

@@ -0,0 +1,262 @@
+<template>
+  <div style="padding-top: 10px;">
+    <i-page-header :title="pageTitle"></i-page-header>
+    <Card :bordered="false" dis-hover class="ivu-mt">
+      <Form ref="orderData" :model="orderData" label-width="200px">
+        <Row :gutter="24" type="flex">
+          <Col>
+          <FormItem label="UID:" label-for="uid">
+            <Input placeholder="用户UID" v-model="orderData.uid" />
+          </FormItem>
+          </Col>
+          <!-- <Col>
+					    <FormItem label="绑定手机:" label-for="mobile">
+					        <Input placeholder="绑定手机号码" v-model="orderData.mobile"/>
+					    </FormItem>
+					</Col> -->
+          <!-- <Col>
+          <FormItem label="状态:" label-for="status">
+            <Select v-model="orderData.type" placeholder="请选择状态">
+              <Option value="all">全部</Option>
+              <Option value="1">收入</Option>
+              <Option value="0">支出</Option>
+            </Select>
+          </FormItem>
+          </Col> -->
+          <Col>
+          <FormItem label="时间:">
+            <DatePicker v-model="orderData.time" format="yyyy/MM/dd HH:mm:ss" type="datetimerange"
+              placement="bottom-start" placeholder="自定义时间" style="width: 300px;" class="mr20" :options="options">
+            </DatePicker>
+          </FormItem>
+          </Col>
+          <Col>
+          <Button label="default" type="primary" icon="ios-search" class="mr15" style="margin-top: 32px;"
+            @click="orderSearch()">搜索</Button>
+          </Col>
+        </Row>
+      </Form>
+      <!-- <Col>
+                <Button class="export" icon="ios-share-outline" @click="exports">导出</Button>
+            </Col> -->
+
+
+      <Table :columns="columns" :data="orderList" ref="table" :loading="loading" highlight-row no-data-text="暂无数据"
+        no-filtered-data-text="暂无筛选结果" class="orderData mt25">
+        <template slot-scope="{ row, index }" slot="order_id">
+          <span v-text="row.order_id" style="display: block;"></span>
+        </template>
+        <template slot-scope="{ row, index }" slot="uid">
+          <div>UID:{{ row.uid }}</div>
+          <div>{{ row.mobile || '未绑定手机号' }}</div>
+        </template>
+        <template slot-scope="{ row, index }" slot="imgs">
+          <img v-if="row.imgs.length > 0" v-lazy="row.imgs[0]" :src="row.imgs[0]" v-image-preview
+            style="width: 60px;cursor: pointer" />
+        </template>
+
+        <template slot-scope="{ row, index }" slot="into">
+          <el-tag type="success" size="mini" v-if="row.type == 1">+ {{ row.into }}</el-tag>
+          <el-tag type="danger" size="mini" v-else>{{ '- ' + row.into }}</el-tag>
+        </template>
+
+
+
+      </Table>
+      <div class="acea-row row-right page">
+        <Page :total="page.count" show-elevator show-total @on-change="tapPage" :page-size="page.pageSize" />
+      </div>
+    </Card>
+
+  </div>
+</template>
+<script>
+import IPageHeader from "../../../layouts/system/page-header/index";
+import { SystemShowTemplateList } from "../../../api/system/user";
+import { getPointsBill } from "../../../api/system/points";
+
+export default {
+  name: "pointsBill",
+  components: { SystemShowTemplateList, IPageHeader },
+  computed: {},
+  data() {
+    return {
+      pageTitle: "积分流水",
+      options: {
+        shortcuts: [
+          {
+            text: '今天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()));
+              return [start, end];
+            }
+          },
+          {
+            text: '昨天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)));
+              end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())));
+              return [start, end];
+            }
+          },
+          {
+            text: '最近7天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 6)));
+              return [start, end];
+            }
+          },
+          {
+            text: '最近30天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 29)));
+              return [start, end];
+            }
+          },
+          {
+            text: '本月',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)));
+              return [start, end];
+            }
+          },
+          {
+            text: '本年',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+              return [start, end];
+            }
+          }
+        ]
+      },
+
+      orderData: {
+        uid: "",
+        type: "all",
+        time: [],
+        mobile: "",
+        show_template_id: "",
+      },
+      columns: [
+        {
+          title: 'ID',
+          align: 'center',
+          key: 'id',
+          align: 'center'
+        },
+        {
+          title: '用户',
+          slot: 'uid',
+          align: 'center'
+        },
+        {
+          title: '金额',
+          slot: 'into',
+          align: 'center'
+        },
+        {
+          title: '详情',
+          key: 'content',
+          align: 'center'
+        },
+        {
+          title: '剩余积分',
+          key: 'money',
+          align: 'center'
+        },
+        {
+          title: '时间',
+          align: 'center',
+          key: 'time',
+          align: 'left'
+        },
+      ],
+      loading: false,
+      orderList: [],
+      orderDatalist: {},
+      orderId: 0,
+      page: {
+        total: 0, // 总条数
+        page: 1, // 当前页
+        pageSize: 10 // 每页显示条数
+      },
+    }
+  },
+
+  created() {
+    if (this.$route.query.title) {
+      this.pageTitle = this.$route.query.title;
+    }
+    // if (this.$route.query.uid) {
+    //   this.orderData.uid = parseInt(this.$route.query.uid);
+    // }
+    // if (this.$route.query.show_template_id) {
+    //   this.orderData.show_template_id = parseInt(this.$route.query.show_template_id);
+    // }
+    this.initView();
+  },
+  methods: {
+    /**
+     * 基本数据
+     */
+    initView: function () {
+      this.getData();
+    },
+    tabsHandleClick: function (tab, event) {
+      this.page.page = 1;
+      this.getData();
+    },
+    orderSearch: function () {
+      this.page.page = 1;
+      this.getData();
+    },
+    /**
+     * 分页
+     */
+    tapPage: function (index) {
+      this.page.page = index;
+      this.getData();
+    },
+    /**
+     * 获取数据
+     */
+    getData: function () {
+      var that = this;
+      // this.loading = true;
+      var data = {
+        page: that.page.page,
+        ...that.orderData
+      };
+      getPointsBill(data)
+        .then(res => {
+          that.loading = false;
+          if (res.code == 200) {
+            that.orderList = res.data.list;
+            that.page.pageSize = res.data.pageSize;
+            that.page.count = res.data.pageCount;
+          } else {
+            that.$alert(res.msg);
+          }
+        })
+        .catch(err => {
+          that.loading = false;
+          that.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+        });
+    },
+
+  }
+}
+</script>
+<style scoped></style>

+ 286 - 0
src/components/system/points/czList.vue

@@ -0,0 +1,286 @@
+<template>
+  <div style="padding-top: 10px;">
+    <i-page-header :title="pageTitle"></i-page-header>
+    <Card :bordered="false" dis-hover class="ivu-mt">
+      <Form ref="orderData" :model="orderData" label-width="200px">
+        <Row :gutter="24" type="flex">
+          <Col>
+          <FormItem label="UID:" label-for="uid">
+            <Input placeholder="用户UID" v-model="orderData.uid" />
+          </FormItem>
+          </Col>
+          <!-- <Col>
+					    <FormItem label="绑定手机:" label-for="mobile">
+					        <Input placeholder="绑定手机号码" v-model="orderData.mobile"/>
+					    </FormItem>
+					</Col> -->
+          <!-- <Col>
+          <FormItem label="状态:" label-for="status">
+            <Select v-model="orderData.type" placeholder="请选择状态">
+              <Option value="all">全部</Option>
+              <Option value="1">收入</Option>
+              <Option value="0">支出</Option>
+            </Select>
+          </FormItem>
+          </Col> -->
+          <Col>
+          <FormItem label="时间:">
+            <DatePicker v-model="orderData.time" format="yyyy/MM/dd HH:mm:ss" type="datetimerange"
+              placement="bottom-start" placeholder="自定义时间" style="width: 300px;" class="mr20" :options="options">
+            </DatePicker>
+          </FormItem>
+          </Col>
+          <Col>
+          <Button label="default" type="primary" icon="ios-search" class="mr15" style="margin-top: 32px;"
+            @click="orderSearch()">搜索</Button>
+          </Col>
+        </Row>
+      </Form>
+      <!-- <Col>
+                <Button class="export" icon="ios-share-outline" @click="exports">导出</Button>
+            </Col> -->
+
+
+      <Table :columns="columns" :data="orderList" ref="table" :loading="loading" highlight-row no-data-text="暂无数据"
+        no-filtered-data-text="暂无筛选结果" class="orderData mt25">
+        <template slot-scope="{ row, index }" slot="order_id">
+          <span v-text="row.order_id" style="display: block;"></span>
+        </template>
+        <template slot-scope="{ row, index }" slot="uid">
+          <div>昵称:{{ row.nickname || '微信用户' }}( UID:{{ row.uid }})</div>
+          <div>{{ row.mobile || '未绑定手机号' }}</div>
+        </template>
+        <template slot-scope="{ row, index }" slot="imgs">
+          <img v-if="row.imgs.length > 0" v-lazy="row.imgs[0]" :src="row.imgs[0]" v-image-preview
+            style="width: 60px;cursor: pointer" />
+        </template>
+        <template slot-scope="{ row, index }" slot="pay_type">
+          <div v-if="row.pay_type == 'wxpay'">微信</div>
+          <div v-if="row.pay_type == 'system'">系统</div>
+          <div v-if="row.pay_type == 'alipay'">支付宝</div>
+        </template>
+        <template slot-scope="{ row, index }" slot="paid">
+          <el-tag type="success" v-if="row.paid == 1">已支付</el-tag>
+          <el-tag type="danger" v-if="row.paid == 0">未支付</el-tag>  
+        </template>
+        <template slot-scope="{ row, index }" slot="into">
+          <div>{{ row.price }}</div>
+        </template>
+        <template slot-scope="{ row, index }" slot="time">
+          <div>{{ showTime(row.add_time) }}</div>
+        </template>
+
+
+      </Table>
+      <div class="acea-row row-right page">
+        <Page :total="page.count" show-elevator show-total @on-change="tapPage" :page-size="page.pageSize" />
+      </div>
+    </Card>
+
+  </div>
+</template>
+<script>
+import IPageHeader from "../../../layouts/system/page-header/index";
+import { SystemShowTemplateList } from "../../../api/system/user";
+import { getPointsBill,getCzBill } from "../../../api/system/points";
+
+export default {
+  name: "SystemPointsCzList",
+  components: { SystemShowTemplateList, IPageHeader },
+  computed: {},
+  data() {
+    return {
+      pageTitle: "充值记录",
+      options: {
+        shortcuts: [
+          {
+            text: '今天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()));
+              return [start, end];
+            }
+          },
+          {
+            text: '昨天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)));
+              end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())));
+              return [start, end];
+            }
+          },
+          {
+            text: '最近7天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 6)));
+              return [start, end];
+            }
+          },
+          {
+            text: '最近30天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 29)));
+              return [start, end];
+            }
+          },
+          {
+            text: '本月',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)));
+              return [start, end];
+            }
+          },
+          {
+            text: '本年',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+              return [start, end];
+            }
+          }
+        ]
+      },
+
+      orderData: {
+        uid: "",
+        type: "all",
+        time: [],
+        mobile: "",
+        show_template_id: "",
+      },
+      columns: [
+        {
+          title: 'ID',
+          align: 'center',
+          key: 'id',
+          align: 'center'
+        },
+        {
+          title: '用户',
+          slot: 'uid',
+          align: 'center'
+        },
+        {
+          title: '充值金额',
+          slot: 'into',
+          align: 'center'
+        },
+        {
+          title: '支付方式',
+          slot: 'pay_type',
+          align: 'center'
+        },
+        // paid 
+        {
+          title: '是否支付',
+          slot: 'paid',
+          align: 'center'
+        },
+        {
+          title: '应得积分',
+          key: 'integral',
+          align: 'center'
+        },
+        // {
+        //   title: '总获得积分',
+        //   key: 'total_integral',
+        //   align: 'center'
+        // },
+        {
+          title: '时间',
+          align: 'center',
+          slot: 'time',
+          align: 'left'
+        },
+      ],
+      loading: false,
+      orderList: [],
+      orderDatalist: {},
+      orderId: 0,
+      page: {
+        total: 0, // 总条数
+        page: 1, // 当前页
+        pageSize: 10 // 每页显示条数
+      },
+    }
+  },
+
+  created() {
+    if (this.$route.query.title) {
+      this.pageTitle = this.$route.query.title;
+    }
+    // if (this.$route.query.uid) {
+    //   this.orderData.uid = parseInt(this.$route.query.uid);
+    // }
+    // if (this.$route.query.show_template_id) {
+    //   this.orderData.show_template_id = parseInt(this.$route.query.show_template_id);
+    // }
+    this.initView();
+  },
+  methods: {
+    showTime(time) {
+      let times = new Date(time * 1000);
+      return times.toLocaleString();
+    },
+    /**
+     * 基本数据
+     */
+    initView: function () {
+      this.getData();
+    },
+    tabsHandleClick: function (tab, event) {
+      this.page.page = 1;
+      this.getData();
+    },
+    orderSearch: function () {
+      this.page.page = 1;
+      this.getData();
+    },
+    /**
+     * 分页
+     */
+    tapPage: function (index) {
+      this.page.page = index;
+      this.getData();
+    },
+    /**
+     * 获取数据
+     */
+    getData: function () {
+      var that = this;
+      // this.loading = true;
+      var data = {
+        page: that.page.page,
+        ...that.orderData
+      };
+      getCzBill(data)
+        .then(res => {
+          that.loading = false;
+          if (res.code == 200) {
+            that.orderList = res.data.list;
+            that.page.pageSize = res.data.pageSize;
+            that.page.count = res.data.total;
+          } else {
+            that.$alert(res.msg);
+          }
+        })
+        .catch(err => {
+          that.loading = false;
+          that.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+        });
+    },
+
+  }
+}
+</script>
+<style scoped></style>

+ 505 - 0
src/components/system/points/list.vue

@@ -0,0 +1,505 @@
+<template>
+	<div style="padding-top: 10px;">
+		<i-page-header :title="pageTitle"></i-page-header>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- <Form ref="orderData" :model="orderData">
+                <Row :gutter="24" type="flex">
+					<Col>
+					    <FormItem label="UID:" label-for="uid">
+					        <Input placeholder="用户UID" v-model="orderData.uid"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="绑定手机:" label-for="mobile">
+					        <Input placeholder="绑定手机号码" v-model="orderData.mobile"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="购买时间:">
+					        <DatePicker v-model="orderData.time" format="yyyy/MM/dd HH:mm:ss" type="datetimerange" placement="bottom-start" placeholder="自定义时间" style="width: 300px;" class="mr20" :options="options"></DatePicker>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <Button label="default" type="primary" icon="ios-search"  class="mr15" style="margin-top: 32px;" @click="orderSearch()">搜索</Button>
+					</Col>
+                </Row>
+            </Form> -->
+			<Col>
+			<Button type="primary" class="export" icon="ios-share-outline" @click="sendOpen">添加商品</Button>
+			</Col>
+			<Table :columns="columns" :data="orderList" ref="table" :loading="loading" highlight-row no-data-text="暂无数据"
+				no-filtered-data-text="暂无筛选结果" class="orderData mt25">
+				<template slot-scope="{ row, index }" slot="order_id">
+					<span v-text="row.order_id" style="display: block;"></span>
+				</template>
+				<template slot-scope="{ row, index }" slot="uid">
+					<div>{{row.nickname || '微信用户'}}[UID:{{row.uid}}]</div>
+					<div>{{row.mobile || '未绑定手机号'}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="imgs">
+					<div v-if="row.imgs.length>0" style="display: flex;">
+						<img v-for="item in row.imgs" v-lazy="item" :src="item" v-image-preview
+							style="width: 60px;cursor: pointer" />
+					</div>
+				</template>
+
+				<template slot-scope="{ row, index }" slot="handle">
+					<div><el-button plain size="mini" @click="">查看评论</el-button></div>
+					<br />
+					<div><el-button plain size="mini" @click="">删除</el-button></div>
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="page.count" show-elevator show-total @on-change="tapPage" :page-size="page.pageSize" />
+			</div>
+		</Card>
+
+		<Modal v-model="sendModel" title="添加商品" @on-ok="sendOk('sendFormValidate')" @on-cancel="sendCancel" width="900">
+			<Form :model="sendData" :label-width="labelWidth" :rules="ruleValidate" ref="sendFormValidate">
+				<FormItem label="商品名称" prop="name">
+					<Input v-model="sendData.name" type="text" placeholder="请输入商品名称"></Input>
+				</FormItem>
+				<FormItem label="兑换积分" prop="points">
+					<Input v-model="sendData.name" type="number" placeholder="请输入兑换积分"></Input>
+				</FormItem>
+				<FormItem label="商品库存" prop="stock">
+					<Input v-model="sendData.stock" type="number" placeholder="请输入商品库存"></Input>
+				</FormItem>
+				<FormItem label="封面图片" prop="image">
+					<div class="clearfix">
+						<div class="upimg-item fx-r fx-bc fx-ac" style="" v-if="sendData.image">
+							<img v-lazy="sendData.image" :src="sendData.image" v-image-preview />
+							<i class="el-icon-error img-remove-btn" @click="removeImg(index)"></i>
+						</div>
+						<ui-upload style="float: left;" :upUrl="upUrl" fileName="上传图片" :headers="upHeaders"
+							:updata="{isz:0,code:'goods'}" @onUpload="onUpload" v-if="sendData.image == ''"></ui-upload>
+					</div>
+				</FormItem>
+				<FormItem label="图片" prop="imgs">
+					<div class="clearfix">
+						<div class="upimg-item fx-r fx-bc fx-ac" style="" v-for="(item,index) in sendData.imgs"
+							:key="index">
+							<img v-lazy="item" :src="item" v-image-preview />
+							<i class="el-icon-error img-remove-btn" @click="removeImgs(index)"></i>
+						</div>
+						<ui-upload style="float: left;" :upUrl="upUrl" fileName="上传图片" :headers="upHeaders"
+							:updata="{isz:0,code:'goods'}" @onUpload="onUploads"
+							v-if="sendData.imgs.length<6"></ui-upload>
+					</div>
+				</FormItem>
+				<FormItem label="商品详情" prop="content">
+					<Toolbar style="border: 1px solid #ccc" :editor="editor" :defaultConfig="toolbarConfig" />
+					<!-- 编辑器 -->
+					<Editor style="height: 400px; overflow-y: hidden;border: 1px solid #ccc;"
+						:defaultConfig="editorConfig" v-model="sendData.content" @onChange="onChange"
+						@onCreated="onCreated" />
+				</FormItem>
+			</Form>
+			<div slot="footer">
+				<Button size="large" :loading="modal_loading" @click="sendCancel">取消</Button>
+				<Button type="primary" size="large" :loading="modal_loading"
+					@click="sendOk('sendFormValidate')">提交</Button>
+			</div>
+		</Modal>
+	</div>
+</template>
+<script>
+	import axios from 'axios'
+	import {
+		DomEditor
+	} from '@wangeditor/editor'
+	import {
+		Editor,
+		Toolbar
+	} from '@wangeditor/editor-for-vue'
+	import IPageHeader from "../../../layouts/system/page-header/index";
+	import {
+		SystemShowTemplateList
+	} from "../../../api/system/user";
+	import Setting from '@/setting';
+	import UiUpload from "@/ui/upload/index";
+	import {
+		upLoad
+	} from '../../../api/system/sys'
+
+	export default {
+		name: "pointsList",
+		components: {
+			SystemShowTemplateList,
+			IPageHeader,
+			UiUpload,
+			Editor,
+			Toolbar
+		},
+		computed: {},
+		data() {
+			return {
+				editor: null,
+				toolbarConfig: {
+					// toolbarKeys: [ /* 显示哪些菜单,如何排序、分组 */ ],
+					excludeKeys: ['group-video', 'emotion', 'fullScreen'],
+				},
+				editorConfig: {
+					placeholder: "请输入内容...",
+					// autoFocus: false,
+
+					// 所有的菜单配置,都要在 MENU_CONF 属性下
+					MENU_CONF: {
+						uploadImage: {
+
+						},
+					},
+				},
+				modal_loading: false,
+				ruleValidate: {
+					name: [{
+						required: true,
+						message: '请输入商品名称',
+						trigger: 'blur'
+					}],
+					content: [{
+						required: true,
+						message: '请输入商品详情',
+						trigger: 'blur'
+					}],
+					stock: [{
+						required: true,
+						message: '请输入商品库存',
+						trigger: 'blur'
+					}],
+					image: [{
+						required: true,
+						message: '请上传封面图片'
+					}],
+					imgs: [{
+						required: true,
+						message: '请上传轮播图片'
+					}],
+					points: [{
+						required: true,
+						message: '请输入兑换积分',
+						trigger: 'blur'
+					}],
+				},
+				labelWidth: 120,
+				upHeaders: {},
+				upUrl: '',
+				sendData: {
+					points: '',
+					stock: '',
+					name: '',
+					content: '',
+					image: '',
+					imgs: []
+				},
+				sendModel: false,
+				pageTitle: "积分商品",
+				options: {
+					shortcuts: [{
+							text: '今天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date()
+									.getDate()));
+								return [start, end];
+							}
+						},
+						{
+							text: '昨天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 1)));
+								end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate())));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近7天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 6)));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近30天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 29)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本月',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									1)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本年',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+								return [start, end];
+							}
+						}
+					]
+				},
+
+				orderData: {
+					uid: "",
+					status: "all",
+					time: [],
+					mobile: "",
+					show_template_id: "",
+				},
+				columns: [{
+						title: 'ID',
+						align: 'center',
+						key: 'id',
+						align: 'center'
+					},
+					{
+						title: '商品封面',
+						align: 'center',
+						slot: 'imgs',
+						align: 'center'
+					},
+					{
+						title: '商品名',
+						key: 'name',
+						align: 'center'
+					},
+					{
+						title: '积分',
+						align: 'center',
+						key: 'points',
+						align: 'left'
+					},
+
+					{
+						title: '时间',
+						align: 'center',
+						key: 'add_time',
+						align: 'left'
+					},
+					{
+						title: '操作',
+						align: 'center',
+						slot: 'handle',
+						align: 'left'
+					},
+				],
+				loading: false,
+				orderList: [],
+				orderDatalist: {},
+				orderId: 0,
+				page: {
+					total: 0, // 总条数
+					page: 1, // 当前页
+					pageSize: 10 // 每页显示条数
+				},
+			}
+		},
+
+		created() {
+			if (this.$route.query.title) {
+				this.pageTitle = this.$route.query.title;
+			}
+			if (this.$route.query.uid) {
+				this.orderData.uid = parseInt(this.$route.query.uid);
+			}
+			if (this.$route.query.show_template_id) {
+				this.orderData.show_template_id = parseInt(this.$route.query.show_template_id);
+			}
+			this.initView();
+		},
+		methods: {
+			onCreated(editor) {
+				this.editor = Object.seal(editor); // 【注意】一定要用 Object.seal() 否则会报错
+				console.log(this.editor.getMenuConfig());
+
+			},
+			onChange(editor) {
+				console.log("onChange", editor.getHtml()); // onChange 时获取编辑器最新内容
+			},
+			getEditorText() {
+				const editor = this.editor;
+				if (editor == null) return;
+
+				console.log(editor.getText()); // 执行 editor API
+			},
+			printEditorHtml() {
+				const editor = this.editor;
+				if (editor == null) return;
+
+				console.log(editor.getHtml()); // 执行 editor API
+			},
+			initView: function() {
+				let that = this
+				var upHeaders = {};
+				this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
+				const token = this.$utils.util.cookies.get('system_token');
+				if (token) {
+					upHeaders['SYSTEM-ACC-TOKEN'] = token;
+				}
+				this.upHeaders = upHeaders;
+
+				this.editorConfig.MENU_CONF['uploadImage'] = {
+					async customUpload(file, insertFn) {
+						const formData = new FormData()
+						formData.append('file', file)
+						formData.append('code', 'good')
+						formData.append('isz', '0')
+						// formData.append('sign', this.generateSign(file.name)) // 自定义签名
+
+						try {
+							// const response = await axios.post(that.upUrl, formData, {
+							// 	headers: {
+							// 		'SYSTEM-ACC-TOKEN': token
+							// 	}
+							// })
+							upLoad(formData).then(res => {
+								insertFn(res.data.img)
+							})
+							
+							// if (response.data.success) {
+							// 	 // 插入图片到编辑器
+							// }
+						} catch (error) {
+							console.error('上传失败:', error)
+						}
+					}
+				}
+			},
+			onUpload: function(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
+				} else {
+					this.sendData.image = res.data.img;
+				}
+			},
+			onUploads: function(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
+				} else {
+					this.sendData.imgs.push(res.data.img);
+				}
+			},
+			removeImgs: function(index) {
+				// this.$delete(this.sendData.imgs, index);
+			},
+			removeImg: function(index) {
+				// this.$delete(this.sendData.imgs, index);
+				this.sendData.image = ''
+			},
+			sendOpen() {
+				this.sendModel = true
+			},
+			sendCancel() {
+				this.sendModel = false
+				this.sendData = {
+					content: '',
+					imgs: []
+				}
+				console.log('sendCancel');
+			},
+			sendOk(name) {
+				console.log(this.sendData.content);
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						this.sendCancel()
+						this.$Message.success('发布成功!');
+					} else {}
+				})
+			},
+			tabsHandleClick: function(tab, event) {
+				this.page.page = 1;
+				this.getData();
+			},
+			orderSearch: function() {
+				this.page.page = 1;
+				this.getData();
+			},
+			/**
+			 * 分页
+			 */
+			tapPage: function(index) {
+				this.page.page = index;
+				this.getData();
+			},
+			/**
+			 * 获取数据
+			 */
+			getData: function() {
+				var that = this;
+				// this.loading = true;
+				var data = {
+					page: that.page.page,
+					...that.orderData
+				};
+				// SystemShowTemplateList(data)
+				//     .then(res=>{
+				//         that.loading = false;
+				//         if(res.code == 200) {
+				//             that.orderList = res.data.list;
+				//             that.page.pageSize = res.data.pageSize;
+				//             that.page.count = res.data.pageCount;
+				//         } else {
+				//             that.$alert(res.msg);
+				//         }
+				//     })
+				//     .catch(err=>{
+				//         that.loading = false;
+				//         that.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+				//     });
+			},
+
+		}
+	}
+</script>
+<style src="@wangeditor/editor/dist/css/style.css"></style>
+<style scoped>
+	@import "~vue2-editor/dist/vue2-editor.css";
+
+	.upimg-item {
+		width: 82px;
+		height: 82px;
+		margin-right: 5px;
+		overflow: hidden;
+		float: left;
+		margin-bottom: 5px;
+		position: relative;
+	}
+
+	.upimg-item img {
+		width: 82px;
+		cursor: pointer;
+	}
+
+	.img-remove-btn {
+		position: absolute;
+		top: 0px;
+		right: 0px;
+		font-size: 24px;
+	}
+</style>

+ 510 - 0
src/components/system/points/order.vue

@@ -0,0 +1,510 @@
+<template>
+	<div style="padding-top: 10px;">
+		<i-page-header :title="pageTitle"></i-page-header>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<!-- <Form ref="orderData" :model="orderData">
+                <Row :gutter="24" type="flex">
+					<Col>
+					    <FormItem label="UID:" label-for="uid">
+					        <Input placeholder="用户UID" v-model="orderData.uid"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="绑定手机:" label-for="mobile">
+					        <Input placeholder="绑定手机号码" v-model="orderData.mobile"/>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <FormItem label="购买时间:">
+					        <DatePicker v-model="orderData.time" format="yyyy/MM/dd HH:mm:ss" type="datetimerange" placement="bottom-start" placeholder="自定义时间" style="width: 300px;" class="mr20" :options="options"></DatePicker>
+					    </FormItem>
+					</Col>
+					<Col>
+					    <Button label="default" type="primary" icon="ios-search"  class="mr15" style="margin-top: 32px;" @click="orderSearch()">搜索</Button>
+					</Col>
+                </Row>
+            </Form> -->
+			<Col>
+			<!-- <Button type="primary" class="export" icon="ios-share-outline" @click="sendOpen">添加商品</Button> -->
+			</Col>
+			<Table :columns="columns" :data="orderList" ref="table" :loading="loading" highlight-row no-data-text="暂无数据"
+				no-filtered-data-text="暂无筛选结果" class="orderData mt25">
+				<template slot-scope="{ row, index }" slot="order_id">
+					<span v-text="row.order_id" style="display: block;"></span>
+				</template>
+				<template slot-scope="{ row, index }" slot="uid">
+					<div>{{row.nickname || '微信用户'}}[UID:{{row.uid}}]</div>
+					<div>{{row.mobile || '未绑定手机号'}}</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="product">
+					<div v-for="item in row.cart_info">
+						<div>
+							{{item.product_name + ' -- '}}<el-button
+								type="text">x{{item.cart_num}}</el-button>--<el-button
+								type="text">{{item.total_price}}积分</el-button>
+						</div>
+					</div>
+				</template>
+				<template slot-scope="{ row, index }" slot="info">
+					<div>收货人:{{row.address.real_name}}</div>
+					<div>联系方式:{{row.address.phone}}</div>
+					<div>
+						地址:{{row.address.province + '-' + row.address.city + '-' + row.address.district + ' ' + row.address.detail}}
+					</div>
+				</template>
+				<!-- status -->
+				<template slot-scope="{ row, index }" slot="status">
+					<!-- -1订单取消,0待发货,1待发货,2待收货,3已完成 -->
+					<el-link type="success" v-if="row.status == 3">已完成</el-link>
+					<el-link type="primary" v-if="row.status == 2">待收货</el-link>
+					<el-link type="warning" v-if="row.status == 1">待发货</el-link>
+					<el-link type="danger" v-if="row.status == 0">未支付</el-link>
+					<el-link type="info" v-if="row.status == -1">已取消</el-link>
+				</template>
+				<template slot-scope="{ row, index }" slot="imgs">
+					<div v-if="row.imgs.length>0" style="display: flex;">
+						<img v-for="item in row.imgs" v-lazy="item" :src="item" v-image-preview
+							style="width: 60px;cursor: pointer" />
+					</div>
+				</template>
+
+				<template slot-scope="{ row, index }" slot="handle">
+					<div><el-button plain size="mini" @click="sendOpen(row)" v-if="row.status == 1">发货</el-button></div>
+					<!--<br />
+					<div><el-button plain size="mini" @click="">删除</el-button></div> -->
+				</template>
+			</Table>
+			<div class="acea-row row-right page">
+				<Page :total="page.count" show-elevator show-total @on-change="tapPage" :page-size="page.pageSize" />
+			</div>
+		</Card>
+
+		<Modal v-model="sendModel" title="发货" @on-ok="sendOk('sendFormValidate')" @on-cancel="sendCancel" width="800">
+			<Form :model="sendData" :label-width="labelWidth" :rules="ruleValidate" ref="sendFormValidate">
+				<FormItem label="快递公司名称" prop="express_code">
+					<el-select v-model="sendData.express_code" placeholder="请选择" @change="selectKd">
+						<el-option v-for="item in kdList" :key="item.value" :label="item.lab" :value="item.val">
+						</el-option>
+					</el-select>
+				</FormItem>
+				<FormItem label="快递单号" prop="express_num">
+					<el-input v-model="sendData.express_num" placeholder="请输入快递单号 "></el-input>
+				</FormItem>
+			</Form>
+			<div slot="footer">
+				<Button size="large" :loading="modal_loading" @click="sendCancel">取消</Button>
+				<Button type="primary" size="large" :loading="modal_loading"
+					@click="sendOk('sendFormValidate')">提交</Button>
+			</div>
+		</Modal>
+	</div>
+</template>
+<script>
+	import IPageHeader from "../../../layouts/system/page-header/index";
+	import {
+		SystemShowTemplateList
+	} from "../../../api/system/user";
+	import Setting from '@/setting';
+	import UiUpload from "@/ui/upload/index";
+	import {
+		getOrderList,
+		fahuo
+	} from '../../../api/system/points.js'
+	export default {
+		name: "pointsList",
+		components: {
+			SystemShowTemplateList,
+			IPageHeader,
+			UiUpload
+		},
+		computed: {},
+		data() {
+			return {
+				kdList: [{
+						val: 'ZTO',
+						lab: '中通快递'
+					},
+					{
+						val: 'YTO',
+						lab: '圆通速递'
+					},
+					{
+						val: 'STO',
+						lab: '申通快递'
+					},
+					{
+						val: 'SF',
+						lab: '顺丰速运'
+					},
+					{
+						val: 'YD',
+						lab: '韵达速递'
+					},
+					{
+						val: 'YZPY',
+						lab: '邮政小包'
+					},
+					{
+						val: 'EMS',
+						lab: 'EMS快递'
+					},
+					{
+						val: 'HTKY',
+						lab: '百世快递'
+					},
+					{
+						val: 'JTSD',
+						lab: '极兔速递'
+					},
+					{
+						val: 'DBL',
+						lab: '德邦快递'
+					},
+					{
+						val: 'JD',
+						lab: '京东快递'
+					},
+					{
+						val: 'YDKY',
+						lab: '韵达快运'
+					},
+					{
+						val: 'YZBK',
+						lab: '邮政国内标快'
+					},
+					{
+						val: 'ZTOKY',
+						lab: '中通快运'
+					},
+					{
+						val: 'XFEX',
+						lab: '信丰物流'
+					},
+					{
+						val: 'UC',
+						lab: '优速快递'
+					},
+					{
+						val: 'BTWL',
+						lab: '百世快运'
+					},
+					{
+						val: 'ANE',
+						lab: '安能物流'
+					},
+					{
+						val: 'YMDD',
+						lab: '壹米滴答'
+					},
+					{
+						val: 'SURE',
+						lab: '速尔快递'
+					},
+				],
+				modal_loading: false,
+				ruleValidate: {
+					express_code: [{
+						required: true,
+						message: '请选择快递公司'
+					}],
+					express_num: [{
+						required: true,
+						message: '请输入快递单号',
+						trigger: 'blur'
+					}],
+				},
+				labelWidth: 120,
+				upHeaders: {},
+				upUrl: '',
+				sendData: {
+					express_type: '',
+					express_code: '',
+					express_num: '',
+					id: ''
+				},
+				sendModel: false,
+				pageTitle: "积分订单",
+				options: {
+					shortcuts: [{
+							text: '今天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date()
+									.getDate()));
+								return [start, end];
+							}
+						},
+						{
+							text: '昨天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 1)));
+								end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate())));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近7天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 6)));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近30天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 29)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本月',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									1)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本年',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+								return [start, end];
+							}
+						}
+					]
+				},
+
+				orderData: {
+					pageSize: 20
+					// uid: "",
+					// status: "all",
+					// time: [],
+					// mobile: "",
+					// show_template_id: "",
+				},
+				columns: [{
+						title: 'ID',
+						align: 'center',
+						key: 'id',
+						align: 'center'
+					},
+					{
+						title: '订单ID',
+						align: 'center',
+						key: 'order_id',
+						align: 'center'
+					},
+					{
+						title: '用户',
+						align: 'center',
+						slot: 'uid',
+						align: 'center'
+					},
+					{
+						title: '商品名',
+						slot: 'product',
+						align: 'center'
+					},
+					{
+						title: '支付积分',
+						align: 'center',
+						key: 'pay_price',
+						align: 'left'
+					},
+					{
+						title: '收货信息',
+						align: 'center',
+						slot: 'info',
+						align: 'left'
+					},
+					{
+						title: '状态',
+						align: 'center',
+						slot: 'status',
+						align: 'left'
+					},
+					{
+						title: '时间',
+						align: 'center',
+						key: 'create_time',
+						align: 'left'
+					},
+					{
+						title: '操作',
+						align: 'center',
+						slot: 'handle',
+						align: 'left'
+					},
+				],
+				loading: false,
+				orderList: [],
+				orderDatalist: {},
+				orderId: 0,
+				page: {
+					total: 0, // 总条数
+					page: 1, // 当前页
+					pageSize: 10 // 每页显示条数
+				},
+			}
+		},
+
+		created() {
+			if (this.$route.query.title) {
+				this.pageTitle = this.$route.query.title;
+			}
+			if (this.$route.query.uid) {
+				this.orderData.uid = parseInt(this.$route.query.uid);
+			}
+			if (this.$route.query.show_template_id) {
+				this.orderData.show_template_id = parseInt(this.$route.query.show_template_id);
+			}
+			this.initView();
+		},
+		methods: {
+			selectKd(e) {
+				let kd = this.kdList.find(item => item.val == e)
+				this.sendData.express_type = kd.lab
+			},
+			initView: function() {
+				var upHeaders = {};
+				this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
+				const token = this.$utils.util.cookies.get('system_token');
+				if (token) {
+					upHeaders['SYSTEM-ACC-TOKEN'] = token;
+				}
+				this.upHeaders = upHeaders;
+				this.getData();
+			},
+			onUpload: function(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
+				} else {
+					this.sendData.imgs.push(res.data.img);
+				}
+			},
+			removeImgs: function(index) {
+				this.$delete(this.sendData.imgs, index);
+			},
+			sendOpen(row) {
+				this.sendData = {
+					express_type: '',
+					express_code: '',
+					express_num: '',
+					id: row.id
+				}
+				this.sendModel = true
+			},
+			sendCancel() {
+				this.sendModel = false
+				this.sendData = {
+					express_type: '',
+					express_code: '',
+					express_num: '',
+					id: ''
+				}
+			},
+			sendOk(name) {
+				let that = this
+				this.$refs[name].validate((valid) => {
+					if (valid) {
+						fahuo(that.sendData).then(res => {
+							if(res.code == 200) {
+								this.sendCancel()
+								this.$Message.success('发货成功!');
+								this.getData()
+							}else {
+								this.$Message.error(res.msg);
+							}
+						}).catch(err => {
+							this.$Message.error(err.msg);
+						})
+						
+					} else {}
+				})
+			},
+			tabsHandleClick: function(tab, event) {
+				this.page.page = 1;
+				this.getData();
+			},
+			orderSearch: function() {
+				this.page.page = 1;
+				this.getData();
+			},
+			/**
+			 * 分页
+			 */
+			tapPage: function(index) {
+				this.page.page = index;
+				this.getData();
+			},
+			/**
+			 * 获取数据
+			 */
+			getData: function() {
+				var that = this;
+				// this.loading = true;
+				var data = {
+					page: that.page.page,
+					...that.orderData
+				};
+				getOrderList(data)
+					.then(res => {
+						that.loading = false;
+						if (res.code == 200) {
+							that.orderList = res.data.list;
+							that.page.pageSize = res.data.pageSize;
+							that.page.count = res.data.pageCount;
+						} else {
+							that.$alert(res.msg);
+						}
+					})
+					.catch(err => {
+						that.loading = false;
+						that.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+					});
+			},
+
+		}
+	}
+</script>
+<style scoped>
+	.upimg-item {
+		width: 82px;
+		height: 82px;
+		margin-right: 5px;
+		overflow: hidden;
+		float: left;
+		margin-bottom: 5px;
+		position: relative;
+	}
+
+	.upimg-item img {
+		width: 82px;
+		cursor: pointer;
+	}
+
+	.img-remove-btn {
+		position: absolute;
+		top: 0px;
+		right: 0px;
+		font-size: 24px;
+	}
+</style>

+ 348 - 311
src/components/system/setting/sys/index.vue

@@ -2,175 +2,198 @@
   <div>
     <i-page-header class="product_tabs" title="基本设置"></i-page-header>
     <Card :bordered="false" dis-hover class="ivu-mt">
-      <el-tabs v-model="activeName"  @tab-click="handleClick">
+      <el-tabs v-model="activeName" @tab-click="handleClick">
         <el-tab-pane label="基本配置" style="background: #fff;" name="sys">
-          <el-form ref="form" :model="form" label-width="150px" >
+          <el-form ref="form" :model="form" label-width="150px">
             <el-divider content-position="left">基本数据</el-divider>
             <Row :gutter="24">
               <Col span="12">
-                <el-form-item label="平台名称">
-                  <el-input v-model="form.title"></el-input>
-                </el-form-item>
+              <el-form-item label="平台名称">
+                <el-input v-model="form.title"></el-input>
+              </el-form-item>
+              </Col>
+            </Row>
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="资源域名">
+                <el-input v-model="form.system_url"></el-input>
+              </el-form-item>
+              </Col>
+            </Row>
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="平台名称">
+                <el-input v-model="form.title"></el-input>
+              </el-form-item>
               </Col>
             </Row>
-			<Row :gutter="24">
-			  <Col  span="12">
-			    <el-form-item label="资源域名">
-			      <el-input v-model="form.system_url"></el-input>
-			    </el-form-item>
-			  </Col>
-			</Row>
             <el-divider content-position="left">系统信息</el-divider>
             <el-form-item label="平台说明">
-              <el-input type="textarea"
-                        placeholder="请输入平台说明信息"
-                        :autosize="{ minRows: 6, maxRows: 30}"
-                        v-model="form.tag"></el-input>
+              <el-input type="textarea" placeholder="请输入平台说明信息" :autosize="{ minRows: 6, maxRows: 30 }"
+                v-model="form.tag"></el-input>
             </el-form-item>
-			
-			<el-form-item label="客服电话">
-			  <el-input placeholder="请输入客服电话" v-model="form.custom_tel" style="width: 200px;"></el-input>
-			</el-form-item>
-			
-			<!-- <el-divider content-position="left">商城设置</el-divider>
+
+            <el-form-item label="客服电话">
+              <el-input placeholder="请输入客服电话" v-model="form.custom_tel" style="width: 200px;"></el-input>
+            </el-form-item>
+            <!-- <el-divider content-position="left">商城设置</el-divider>
 			<Row :gutter="24">
 			  <Col  span="12">
 			    <el-form-item label="IP商品收益百分比">
 			      <el-input v-model="form.ip_income_per" style="width: 200px;"><template slot="append">%</template></el-input>
-			    </el-form-item>
-			  </Col>
-			  
-			  <Col  span="12">
-			    <el-form-item label="推广用户收益百分比">
-			      <el-input v-model="form.tree_income_per" style="width: 200px;"><template slot="append">%</template></el-input>
-			    </el-form-item>
-			  </Col>
-			</Row>
-			<Row :gutter="24">
-			  
-			  <Col  span="12">
-			    <el-form-item label="消费转积分百分比">
-			      <el-input v-model="form.money_to_score_per" style="width: 200px;"><template slot="append">%</template></el-input>
-			    </el-form-item>
-			  </Col>
-			  <Col  span="12">
-			    <el-form-item label="二级推广收益百分比">
-			      <el-input v-model="form.tree_income_per_two" style="width: 200px;"><template slot="append">%</template></el-input>
-			    </el-form-item>
-			  </Col>
-			</Row>
-			<el-divider content-position="left">提现配置</el-divider>
-			<Row :gutter="24">
-			  <Col span="12">
-			    <el-form-item label="提现最低限额">
-					<el-input placeholder="单位:元"  type="number" v-model="form.tx_limit_money"><template slot="append">元</template></el-input>
-					<div>提现最低限额,满额提现</div>
-			    </el-form-item>
-			  </Col>
-			  <Col span="12">
-			    <el-form-item label="提现手续费">
-			  		<el-input placeholder="单位:%"  type="number" v-model="form.tx_process_per"><template slot="append">%</template></el-input>
-			  		<div>提现手续费用比例</div>
-			    </el-form-item>
-			  </Col>
-			</Row>
-			<Row :gutter="24">
-			  <Col span="12">
-			    <el-form-item label="提现手续费上限">
-					<el-input placeholder="单位:元"  type="number" v-model="form.tx_process_max"><template slot="append">元</template></el-input>
-					<div>提现手续费上限</div>
-			    </el-form-item>
-			  </Col>
-			</Row> -->
-			
+</el-form-item>
+</Col>
+
+<Col span="12">
+<el-form-item label="推广用户收益百分比">
+  <el-input v-model="form.tree_income_per" style="width: 200px;"><template slot="append">%</template></el-input>
+</el-form-item>
+</Col>
+</Row>
+<Row :gutter="24">
+
+  <Col span="12">
+  <el-form-item label="消费转积分百分比">
+    <el-input v-model="form.money_to_score_per" style="width: 200px;"><template slot="append">%</template></el-input>
+  </el-form-item>
+  </Col>
+  <Col span="12">
+  <el-form-item label="二级推广收益百分比">
+    <el-input v-model="form.tree_income_per_two" style="width: 200px;"><template slot="append">%</template></el-input>
+  </el-form-item>
+  </Col>
+</Row>
+<el-divider content-position="left">提现配置</el-divider>
+<Row :gutter="24">
+  <Col span="12">
+  <el-form-item label="提现最低限额">
+    <el-input placeholder="单位:元" type="number" v-model="form.tx_limit_money"><template
+        slot="append">元</template></el-input>
+    <div>提现最低限额,满额提现</div>
+  </el-form-item>
+  </Col>
+  <Col span="12">
+  <el-form-item label="提现手续费">
+    <el-input placeholder="单位:%" type="number" v-model="form.tx_process_per"><template
+        slot="append">%</template></el-input>
+    <div>提现手续费用比例</div>
+  </el-form-item>
+  </Col>
+</Row>
+<Row :gutter="24">
+  <Col span="12">
+  <el-form-item label="提现手续费上限">
+    <el-input placeholder="单位:元" type="number" v-model="form.tx_process_max"><template
+        slot="append">元</template></el-input>
+    <div>提现手续费上限</div>
+  </el-form-item>
+  </Col>
+</Row> -->
+
             <el-form-item>
               <el-button type="primary" @click="onSubmit">立即修改</el-button>
               <el-button>取消</el-button>
             </el-form-item>
           </el-form>
         </el-tab-pane>
-		<el-tab-pane label="分享配置" style="background: #fff;" name="share">
-			<el-form ref="shareForm" :model="shareForm" label-width="150px" >
-				<el-divider content-position="left">分享信息</el-divider>
-				<Row :gutter="24">
-					<Col span="12">
-						<el-form-item label="分享标题">
-							<el-input v-model="shareForm.title" placeholder="请输入分享标题"></el-input>
-						</el-form-item>
-					</Col>
-				</Row>
-				
-				<Row :gutter="24">
-					<Col span="12">
-						<el-form-item label="分享图片">
-							
-							<div class="fx-r fx-bc">
-								<div class="fx-r fx-bc fx-ac" v-if="shareForm.img" style="border: 1px dashed #d9d9d9;width: 82px;height: 82px;margin-right:12px;border-radius: 6px;cursor: pointer;overflow: hidden;">
-									<img  v-lazy="shareForm.img" :src="shareForm.img" v-image-preview style="display: block;height: 100%;"/>
-								</div>
-								<ui-upload
-								  :upUrl="upUrl"
-								  :fileName="'上传'"
-								  :headers="upHeaders"
-								  :updata="{isz:0,code:'share'}"
-								  @onUpload="onUpload"
-								>
-								</ui-upload>
-							</div>
-							
-						</el-form-item>
-					</Col>
-				</Row>
-				<Row :gutter="24">
-					<Col span="12">
-						<el-form-item label="分享描述">
-							<el-input type="textarea" placeholder="请输入描述信息" :autosize="{ minRows: 2, maxRows: 2}" v-model="shareForm.content"></el-input>
-						</el-form-item>
-					</Col>
-				</Row>
-				<Row :gutter="24">
-					<Col span="12">
-						<el-form-item label="分享路径">
-							<el-input v-model="shareForm.query" placeholder="请输入分享路径"></el-input>
-						</el-form-item>
-					</Col>
-				</Row>
-			  <el-form-item>
-			    <el-button type="primary" @click="onSubmit">立即修改</el-button>
-			    <el-button>取消</el-button>
-			  </el-form-item>
-			</el-form>
-		</el-tab-pane>
-		<el-tab-pane label="邀请配置" style="background: #fff;" name="invite">
-			<el-form ref="inviteForm" :model="inviteForm" label-width="150px" >
-				<el-divider content-position="left">邀请信息</el-divider>
-				
-				<Row :gutter="24">
-					<Col span="12">
-						<el-form-item label="邀请海报">
-							<div class="fx-r fx-bc">
-								<div class="fx-r fx-bc fx-ac" v-if="inviteForm.img" style="border: 1px dashed #d9d9d9;width: 82px;height: 82px;margin-right:12px;border-radius: 6px;cursor: pointer;overflow: hidden;">
-									<img  v-lazy="inviteForm.img" :src="inviteForm.img" v-image-preview style="display: block;height: 100%;"/>
-								</div>
-								<ui-upload
-								  :upUrl="upUrl"
-								  :fileName="'上传'"
-								  :headers="upHeaders"
-								  :updata="{isz:0,code:'invite'}"
-								  @onUpload="onUpload"
-								>
-								</ui-upload>
-							</div>
-						</el-form-item>
-					</Col>
-				</Row>
-			  <el-form-item>
-			    <el-button type="primary" @click="onSubmit">立即修改</el-button>
-			    <el-button>取消</el-button>
-			  </el-form-item>
-			</el-form>
-		</el-tab-pane>
-<!-- 		<el-tab-pane label="微信配置" style="background: #fff;" name="weixin">
+        <el-tab-pane label="分享配置" style="background: #fff;" name="share">
+          <el-form ref="shareForm" :model="shareForm" label-width="150px">
+            <el-divider content-position="left">分享信息</el-divider>
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="分享标题">
+                <el-input v-model="shareForm.title" placeholder="请输入分享标题"></el-input>
+              </el-form-item>
+              </Col>
+            </Row>
+
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="分享图片">
+
+                <div class="fx-r fx-bc">
+                  <div class="fx-r fx-bc fx-ac" v-if="shareForm.img"
+                    style="border: 1px dashed #d9d9d9;width: 82px;height: 82px;margin-right:12px;border-radius: 6px;cursor: pointer;overflow: hidden;">
+                    <img v-lazy="shareForm.img" :src="shareForm.img" v-image-preview
+                      style="display: block;height: 100%;" />
+                  </div>
+                  <ui-upload :upUrl="upUrl" :fileName="'上传'" :headers="upHeaders" :updata="{ isz: 0, code: 'share' }"
+                    @onUpload="onUpload">
+                  </ui-upload>
+                </div>
+
+              </el-form-item>
+              </Col>
+            </Row>
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="分享描述">
+                <el-input type="textarea" placeholder="请输入描述信息" :autosize="{ minRows: 2, maxRows: 2 }"
+                  v-model="shareForm.content"></el-input>
+              </el-form-item>
+              </Col>
+            </Row>
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="分享路径">
+                <el-input v-model="shareForm.query" placeholder="请输入分享路径"></el-input>
+              </el-form-item>
+              </Col>
+            </Row>
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit">立即修改</el-button>
+              <el-button>取消</el-button>
+            </el-form-item>
+          </el-form>
+        </el-tab-pane>
+        <el-tab-pane label="邀请配置" style="background: #fff;" name="invite">
+          <el-form ref="inviteForm" :model="inviteForm" label-width="150px">
+            <el-divider content-position="left">邀请信息</el-divider>
+
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="邀请海报">
+                <div class="fx-r fx-bc">
+                  <div class="fx-r fx-bc fx-ac" v-if="inviteForm.img"
+                    style="border: 1px dashed #d9d9d9;width: 82px;height: 82px;margin-right:12px;border-radius: 6px;cursor: pointer;overflow: hidden;">
+                    <img v-lazy="inviteForm.img" :src="inviteForm.img" v-image-preview
+                      style="display: block;height: 100%;" />
+                  </div>
+                  <ui-upload :upUrl="upUrl" :fileName="'上传'" :headers="upHeaders" :updata="{ isz: 0, code: 'invite' }"
+                    @onUpload="onUpload">
+                  </ui-upload>
+                </div>
+              </el-form-item>
+              </Col>
+            </Row>
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit">立即修改</el-button>
+              <el-button>取消</el-button>
+            </el-form-item>
+          </el-form>
+        </el-tab-pane>
+        <el-tab-pane label="积分设置" style="background: #fff;" name="score">
+          <el-form ref="scoreForm" :model="scoreForm" label-width="150px">
+            <el-divider content-position="left">积分信息</el-divider>
+            <Row :gutter="24">
+              <Col span="12">
+              <el-form-item label="积分比例"> 
+                <el-input v-model="scoreForm.points_transformation" placeholder="请输入积分比例"></el-input>
+              <div>即充值1元获得{{ scoreForm.points_transformation }}积分</div>
+
+              </el-form-item>
+              <el-form-item label="分享赠送积分"> 
+                <el-input v-model="scoreForm.points_share" placeholder="请输入分享赠送积分"></el-input>
+              </el-form-item>
+              </Col>
+            </Row>
+            <el-form-item>
+              <el-button type="primary" @click="onSubmit">立即修改</el-button>
+              <el-button>取消</el-button>
+            </el-form-item>
+          </el-form>
+        </el-tab-pane>
+        <!-- 		<el-tab-pane label="微信配置" style="background: #fff;" name="weixin">
 			<el-form ref="weixinForm" :model="weixinForm" label-width="150px" >
 				<el-divider content-position="left">分享信息</el-divider>
 				<Row :gutter="24">
@@ -248,177 +271,191 @@
 			</el-form>
 			
 		</el-tab-pane> -->
-	  </el-tabs>
+      </el-tabs>
     </Card>
   </div>
 
 </template>
 <script>
-    import UiUpload from "../../../../ui/upload/index";
-    import Setting from "../../../../setting";
-    import {SystemSave, SystemSys} from "../../../../api/system/sys";
-    import util from "../../../../libs/util";
-    import IPageHeader from "../../../../layouts/system/page-header/index";
-    export default {
-        name: "index",
-        components: {IPageHeader, UiUpload},
-        computed: {},
-        data() {
-            return {
-                upHeaders:{},
-                upUrl  :"",
-				certUrl:"",
-				activeName:"sys",
-				shareForm:{
-					title:"",
-					content:"",
-					img:"",
-					query:""
-				},
-				weixinForm:{
-					appid:"",
-					secret:"",
-					mchid:"",
-					apiv2key:"",
-					apiclient_key:"",
-					apiclient_cert:"",
-					notify_url:""
-				},
-				inviteForm:{
-					img:"",
-				},
-                form  : {
-                    title     : "",
-                    system_url       : "",
-                    tag       : "",
-					custom_tel:"",
-					// ip_income_per:"",
-					// tree_income_per:"",
-					// tree_income_per_two:"",
-					// money_to_score_per: "",
-					// tx_limit_money:"",
-					// tx_process_per:"",
-					// tx_process_max:"",
-                }
-            }
-        },
+import UiUpload from "../../../../ui/upload/index";
+import Setting from "../../../../setting";
+import { SystemSave, SystemSys } from "../../../../api/system/sys";
+import util from "../../../../libs/util";
+import IPageHeader from "../../../../layouts/system/page-header/index";
+export default {
+  name: "index",
+  components: { IPageHeader, UiUpload },
+  computed: {},
+  data() {
+    return {
+      upHeaders: {},
+      upUrl: "",
+      certUrl: "",
+      activeName: "sys",
+      shareForm: {
+        title: "",
+        content: "",
+        img: "",
+        query: ""
+      },
+      weixinForm: {
+        appid: "",
+        secret: "",
+        mchid: "",
+        apiv2key: "",
+        apiclient_key: "",
+        apiclient_cert: "",
+        notify_url: ""
+      },
+      inviteForm: {
+        img: "",
+      },
+      form: {
+        title: "",
+        system_url: "",
+        tag: "",
+        custom_tel: "",
+        // ip_income_per:"",
+        // tree_income_per:"",
+        // tree_income_per_two:"",
+        // money_to_score_per: "",
+        // tx_limit_money:"",
+        // tx_process_per:"",
+        // tx_process_max:"",
+      },
+      scoreForm: {
+        points_transformation: "",
+        points_share: "",
+      },
+    }
+  },
 
-        created() {
-            var upHeaders = {};
-            //上传路径
-            this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
-			this.certUrl = Setting.apiBaseURL + "/systemv1/upload/uploadCertFile"
-            //上传header数据
-            const token = util.cookies.get('system_token');
-            if (token) {
-                upHeaders['SYSTEM-ACC-TOKEN'] = token;
-            }
-            this.upHeaders = upHeaders;
-        },
+  created() {
+    var upHeaders = {};
+    //上传路径
+    this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
+    this.certUrl = Setting.apiBaseURL + "/systemv1/upload/uploadCertFile"
+    //上传header数据
+    const token = util.cookies.get('system_token');
+    if (token) {
+      upHeaders['SYSTEM-ACC-TOKEN'] = token;
+    }
+    this.upHeaders = upHeaders;
+  },
 
-        mounted(){
-            this.$utils.loading(this,"loading..");
-            SystemSys()
-                .then(res=>{
-                    this.$utils.loadingClose();
-                    if(res.code == 200) {
-                        this.form = res.data;
-						this.weixinForm = res.data.wxconfig;
-						this.shareForm = res.data.shareconfig;
-						this.inviteForm = res.data.inviteconfig;
-                    } else {
-                        this.$alert(res.msg);
-                    }
-                })
-                .catch(err=>{
-                    this.$utils.loadingClose();
-                    this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
-                });
-        },
+  mounted() {
+    this.$utils.loading(this, "loading..");
+    SystemSys()
+      .then(res => {
+        this.$utils.loadingClose();
+        if (res.code == 200) {
+          this.form = res.data;
+          this.weixinForm = res.data.wxconfig;
+          this.shareForm = res.data.shareconfig;
+          this.inviteForm = res.data.inviteconfig;
+          this.scoreForm = {
+            points_transformation: res.data.points_transformation,
+            points_share: res.data.points_share,
+          }
+        } else {
+          this.$alert(res.msg);
+        }
+      })
+      .catch(err => {
+        this.$utils.loadingClose();
+        this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+      });
+  },
 
-        methods: {
-			handleClick(tab, event) {},
-            /**
-             * 提交数据
-             */
-            onSubmit:function () {
-				let post = null;
-				if(this.activeName=="sys"){
-					post = this.form;
-					post.saveType = "sys";
-				}
-				if(this.activeName=="weixin"){
-					post = this.weixinForm;
-					post.saveType = "weixin";
-				}
-				if(this.activeName=="share"){
-					post = this.shareForm;
-					post.saveType = "share";
-				}
-				if(this.activeName=="invite"){
-					post = this.inviteForm;
-					post.saveType = "invite";
-				}
-				if(post==null) return;
-				this.$utils.loading(this,"加载中...");
-                SystemSave(post).then(res=>{
-                    this.$utils.loadingClose();
-                    if(res.code == 200) {
-                        this.$message({message: '恭喜你,修改成功',type: 'success'});
-                    } else {
-                        this.$alert(res.msg);
-                    }
-                }).catch(err=>{
-                    this.$utils.loadingClose();
-                    this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
-                });
-            },
-			onUpload:function (res) {
-			    if(res.code == -1) {
-			        Notice.error({ title : "系统提示", content:res.msg});
-			    } else {
-					if(this.activeName=='share') this.shareForm.img = res.data.img;
-					if(this.activeName=='invite') this.inviteForm.img = res.data.img;
-			    }
-			},
-			onPreview:function(res){
-				console.log(res)
-			},
-			//key文件
-			handleUploadSuccessKey(res, file){
-				this.$utils.loadingClose();
-				if(res.code==-1){
-					Notice.error({ title : "系统提示", content:res.msg});
-				}else{
-					this.weixinForm.apiclient_key = res.data.cert;
-				}
-			},
-			//Cert文件
-			handleUploadSuccessCert(res, file){
-				this.$utils.loadingClose();
-				if(res.code==-1){
-					Notice.error({ title : "系统提示", content:res.msg});
-				}else{
-					this.weixinForm.apiclient_cert = res.data.cert;
-				}
-			},
-			
-			
-			beforeUploadUpload(file) {
-			    this.$utils.loading(this,"上传中..");
-			},
-			handleUploadSuccess(res, file) {
-			    this.$utils.loadingClose();
-			    
-			},
-			handleUploadError:function (err, file, fileList) {
-			    this.$utils.loadingClose();
-			  //  this.$message.error(err);
-			    console.log(err);
-			}
+  methods: {
+    handleClick(tab, event) { },
+    /**
+     * 提交数据
+     */
+    onSubmit: function () {
+      let post = null;
+      if (this.activeName == "sys") {
+        post = this.form;
+        post.saveType = "sys";
+      }
+      if (this.activeName == "weixin") {
+        post = this.weixinForm;
+        post.saveType = "weixin";
+      }
+      if (this.activeName == "share") {
+        post = this.shareForm;
+        post.saveType = "share";
+      }
+      if (this.activeName == "invite") {
+        post = this.inviteForm;
+        post.saveType = "invite";
+      }
+      if (this.activeName == "score") {
+        post = this.scoreForm;
+        post.saveType = "score";
+      }
+      if (post == null) return;
+      this.$utils.loading(this, "加载中...");
+      SystemSave(post).then(res => {
+        this.$utils.loadingClose();
+        if (res.code == 200) {
+          this.$message({ message: '恭喜你,修改成功', type: 'success' });
+        } else {
+          this.$alert(res.msg);
         }
+      }).catch(err => {
+        this.$utils.loadingClose();
+        this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+      });
+    },
+    onUpload: function (res) {
+      if (res.code == -1) {
+        Notice.error({ title: "系统提示", content: res.msg });
+      } else {
+        if (this.activeName == 'share') this.shareForm.img = res.data.img;
+        if (this.activeName == 'invite') this.inviteForm.img = res.data.img;
+      }
+    },
+    onPreview: function (res) {
+      console.log(res)
+    },
+    //key文件
+    handleUploadSuccessKey(res, file) {
+      this.$utils.loadingClose();
+      if (res.code == -1) {
+        Notice.error({ title: "系统提示", content: res.msg });
+      } else {
+        this.weixinForm.apiclient_key = res.data.cert;
+      }
+    },
+    //Cert文件
+    handleUploadSuccessCert(res, file) {
+      this.$utils.loadingClose();
+      if (res.code == -1) {
+        Notice.error({ title: "系统提示", content: res.msg });
+      } else {
+        this.weixinForm.apiclient_cert = res.data.cert;
+      }
+    },
+
+
+    beforeUploadUpload(file) {
+      this.$utils.loading(this, "上传中..");
+    },
+    handleUploadSuccess(res, file) {
+      this.$utils.loadingClose();
+
+    },
+    handleUploadError: function (err, file, fileList) {
+      this.$utils.loadingClose();
+      //  this.$message.error(err);
+      console.log(err);
     }
+  }
+}
 </script>
 <style scoped>
-	.el-upload{width: 100%;}
+.el-upload {
+  width: 100%;
+}
 </style>

+ 395 - 327
src/components/system/showTemplate/list.vue

@@ -1,33 +1,35 @@
 <template>
-    <div>
-        <i-page-header :title="pageTitle"></i-page-header>
-        <Card :bordered="false" dis-hover class="ivu-mt">
-            <div style="padding: 20px 0;">
+	<div>
+		<i-page-header :title="pageTitle"></i-page-header>
+		<Card :bordered="false" dis-hover class="ivu-mt">
+			<div style="padding: 20px 0;">
 				<el-select v-model="detial.is_hot" placeholder="是否热门" style="margin:0px 10px 10px 0px;width: 140px;">
 					<el-option label="选择是否热门" value=""></el-option>
-				    <el-option label="热门" value="1"></el-option>
+					<el-option label="热门" value="1"></el-option>
 					<el-option label="常规" value="0"></el-option>
 				</el-select>
-				<el-select v-model="detial.is_recommend" placeholder="是否推荐" style="margin:0px 10px 10px 0px;width: 140px;">
+				<el-select v-model="detial.is_recommend" placeholder="是否推荐"
+					style="margin:0px 10px 10px 0px;width: 140px;">
 					<el-option label="选择是否推荐" value=""></el-option>
-				    <el-option label="推荐" value="1"></el-option>
+					<el-option label="推荐" value="1"></el-option>
 					<el-option label="常规" value="0"></el-option>
 				</el-select>
-				<Input placeholder="请输入标题"  style="width:140px;" class="mr10" v-model="detial.title"/>
-				<DatePicker style="width: 250px" format="yyyy-MM-dd HH:mm:ss" v-model="detial.time" type="datetimerange" placement="bottom-start" placeholder="更新时间范围" :options="options"></DatePicker>
+				<Input placeholder="请输入标题" style="width:140px;" class="mr10" v-model="detial.title" />
+				<DatePicker style="width: 250px" format="yyyy-MM-dd HH:mm:ss" v-model="detial.time" type="datetimerange"
+					placement="bottom-start" placeholder="更新时间范围" :options="options"></DatePicker>
 				<el-button type="primary" style="margin-left: 6px;" @click="tapSeach">查询</el-button>
-                <el-button type="danger" style="margin-top: 10px;" @click="tapAdd">添加模板</el-button>
-            </div>
-			
+				<el-button type="danger" style="margin-top: 10px;" @click="tapAdd">添加模板</el-button>
+			</div>
+
 			<div class="muser-tab-continer">
-			    <a class="muser-tab-a" :class="detial.status==''   ? 'active':''" @click="statusChange('')">全部</a>
-			    <a class="muser-tab-a" :class="detial.status=='1'  ? 'active':''" @click="statusChange('1')">上线</a>
-			    <a class="muser-tab-a" :class="detial.status=='0'  ? 'active':''" @click="statusChange('0')">下架</a>
+				<a class="muser-tab-a" :class="detial.status==''   ? 'active':''" @click="statusChange('')">全部</a>
+				<a class="muser-tab-a" :class="detial.status=='1'  ? 'active':''" @click="statusChange('1')">上线</a>
+				<a class="muser-tab-a" :class="detial.status=='0'  ? 'active':''" @click="statusChange('0')">下架</a>
 			</div>
-            <el-table :data="detial.data" v-loading="detial.loading" :stripe="true" :border="true" >
-                <el-table-column prop="id"    label="ID"  width="80" align="center"></el-table-column>
+			<el-table :data="detial.data" v-loading="detial.loading" :stripe="true" :border="true">
+				<el-table-column prop="id" label="ID" width="80" align="center"></el-table-column>
 				<el-table-column prop="title" label="标题" width="200"></el-table-column>
-				<el-table-column prop="code"  label="CODE" width="100"></el-table-column>
+				<el-table-column prop="code" label="CODE" width="100"></el-table-column>
 				<el-table-column prop="price" label="价格" width="150">
 					<template slot-scope="scope">
 						<div>销售价:{{scope.row.price}}</div>
@@ -36,84 +38,91 @@
 				</el-table-column>
 				<!-- <el-table-column prop="give_score" label="赠送积分" width="100"></el-table-column> -->
 				<!-- <el-table-column prop="describe" label="描述" width="200"></el-table-column> -->
-				<el-table-column prop="imgs"     label="主图" min-width="160" align="left">
-				     <template slot-scope="scope">
-						 <img v-for="(item,index) in scope.row.imgs" :key="index" v-lazy="item" :src="item" v-image-preview style="width: 60px;cursor: pointer;margin-right: 5px;"/>
-				     </template>
-				 </el-table-column>
-				 <!-- <el-table-column prop="descs" label="详情图" width="160" align="left">
+				<el-table-column prop="imgs" label="主图" min-width="160" align="left">
+					<template slot-scope="scope">
+						<img v-for="(item,index) in scope.row.imgs" :key="index" v-lazy="item" :src="item"
+							v-image-preview style="width: 60px;cursor: pointer;margin-right: 5px;" />
+					</template>
+				</el-table-column>
+				<!-- <el-table-column prop="descs" label="详情图" width="160" align="left">
 				      <template slot-scope="scope">
 				 		 <img v-for="(item,index) in scope.row.descs" :key="index" v-lazy="item" :src="item" v-image-preview style="width: 60px;cursor: pointer;margin-right: 5px;"/>
 				      </template>
 				</el-table-column> -->
 				<el-table-column prop="total" label="状态" width="100" align="left">
-				     <template slot-scope="scope">
+					<template slot-scope="scope">
 						<div>状态:
-						<el-tag type="danger" size="mini" v-if="scope.row.status == 1">上架</el-tag>
-						<el-tag type="info" size="mini" v-if="scope.row.status == 0">下架</el-tag>
+							<el-tag type="danger" size="mini" v-if="scope.row.status == 1">上架</el-tag>
+							<el-tag type="info" size="mini" v-if="scope.row.status == 0">下架</el-tag>
 						</div>
 						<div>热门:
-						<el-tag type="danger" size="mini" v-if="scope.row.is_hot == 1">热门</el-tag>
-						<el-tag type="info" size="mini" v-if="scope.row.is_hot == 0">常规</el-tag>
+							<el-tag type="danger" size="mini" v-if="scope.row.is_hot == 1">热门</el-tag>
+							<el-tag type="info" size="mini" v-if="scope.row.is_hot == 0">常规</el-tag>
 						</div>
 						<div>推荐:
-						<el-tag type="danger" size="mini" v-if="scope.row.is_recommend == 1">推荐</el-tag>
-						<el-tag type="info" size="mini" v-if="scope.row.is_recommend == 0">常规</el-tag>
+							<el-tag type="danger" size="mini" v-if="scope.row.is_recommend == 1">推荐</el-tag>
+							<el-tag type="info" size="mini" v-if="scope.row.is_recommend == 0">常规</el-tag>
 						</div>
-						
+
 						<div>初始:
-						<el-tag type="danger" size="mini" v-if="scope.row.is_init == 1">初始</el-tag>
-						<el-tag type="info" size="mini" v-if="scope.row.is_init == 0">常规</el-tag>
+							<el-tag type="danger" size="mini" v-if="scope.row.is_init == 1">初始</el-tag>
+							<el-tag type="info" size="mini" v-if="scope.row.is_init == 0">常规</el-tag>
 						</div>
-				     </template>
+					</template>
 				</el-table-column>
 				<el-table-column prop="admin_time" label="更新时间" width="150"></el-table-column>
-				<el-table-column prop="time"       label="添加时间" width="150"></el-table-column>
-				<el-table-column prop="handle"     label="操作"     width="150" align="center">
-				    <template slot-scope="scope">
+				<el-table-column prop="time" label="添加时间" width="150"></el-table-column>
+				<el-table-column prop="handle" label="操作" width="150" align="center">
+					<template slot-scope="scope">
 						<div><el-button plain size="mini" @click="tapEdit(scope.row)">编辑</el-button></div>
-				    </template>
+					</template>
 				</el-table-column>
-            </el-table>
-            <div class="acea-row row-right page">
-                <Page :total="detial.pageCount" show-elevator show-total @on-change="tapPage" :page-size="detial.pageSize"/>
-            </div>
-        </Card>
-		
-	<Modal v-model="dialogVisible" :title="title" @on-cancel="editClose" width="800">
-		<div>
-			<el-form ref="form" :model="form" label-width="120px">
-				<el-tabs v-model="formActiveName">
-				    <el-tab-pane label="基础信息" name="tab_base">
-						<el-form-item label="模板标题" prop="title" :rules="[{ required: true, message: '请输入模板标题'}]">
-							<el-input placeholder="请输入模板标题" autocomplete="off" v-model="form.title"></el-input>
-						</el-form-item>
-						<el-form-item label="模板CODE" prop="code" :rules="[{ required: true, message: '请输入模板CODE'}]">
-							<el-input placeholder="请输入模板CODE" autocomplete="off" v-model="form.code" :disabled="(form.id && form.id>0)?true:false"></el-input>
-						</el-form-item>
-						<!-- <el-form-item label="模板描述" prop="describe">
+			</el-table>
+			<div class="acea-row row-right page">
+				<Page :total="detial.pageCount" show-elevator show-total @on-change="tapPage"
+					:page-size="detial.pageSize" />
+			</div>
+		</Card>
+
+		<Modal v-model="dialogVisible" :title="title" @on-cancel="editClose" width="800">
+			<div>
+				<el-form ref="form" :model="form" label-width="120px">
+					<el-tabs v-model="formActiveName">
+						<el-tab-pane label="基础信息" name="tab_base">
+							<el-form-item label="模板标题" prop="title" :rules="[{ required: true, message: '请输入模板标题'}]">
+								<el-input placeholder="请输入模板标题" autocomplete="off" v-model="form.title"></el-input>
+							</el-form-item>
+							<el-form-item label="模板CODE" prop="code" :rules="[{ required: true, message: '请输入模板CODE'}]">
+								<el-input placeholder="请输入模板CODE" autocomplete="off" v-model="form.code"
+									:disabled="(form.id && form.id>0)?true:false"></el-input>
+							</el-form-item>
+							<!-- <el-form-item label="模板描述" prop="describe">
 							<el-input placeholder="请输入模板描述" autocomplete="off" v-model="form.describe" type="textarea"></el-input>
 						</el-form-item> -->
-						<el-form-item label="模板售价" prop="price" :rules="[{ required: true, message: '请输入模板售价'}]">
-							<el-input placeholder="请输入模板售价" autocomplete="off" v-model="form.price"></el-input>
-						</el-form-item>
-						<el-form-item label="模板划线价" prop="old_price" :rules="[{ required: true, message: '请输入模板划线价'}]">
-							<el-input placeholder="请输入模板划线价" autocomplete="off" v-model="form.old_price"></el-input>
-						</el-form-item>
-						<!-- <el-form-item label="虚拟销量" prop="unreal_sales">
+							<el-form-item label="模板售价" prop="price" :rules="[{ required: true, message: '请输入模板售价'}]">
+								<el-input placeholder="请输入模板售价" autocomplete="off" v-model="form.price"></el-input>
+							</el-form-item>
+							<el-form-item label="模板划线价" prop="old_price"
+								:rules="[{ required: true, message: '请输入模板划线价'}]">
+								<el-input placeholder="请输入模板划线价" autocomplete="off" v-model="form.old_price"></el-input>
+							</el-form-item>
+							<!-- <el-form-item label="虚拟销量" prop="unreal_sales">
 							<el-input placeholder="请输入虚拟销量" autocomplete="off" v-model="form.unreal_sales"></el-input>
 						</el-form-item> -->
-						
-						<el-form-item label="主图" prop="imgs">
-							<div class="clearfix" style="width: 100%;">
-								<div class="upimg-item fx-r fx-bc fx-ac" style="" v-for="(item,index) in form.imgs" :key="index">
-									<img v-lazy="item" :src="item" v-image-preview/>
-									<i class="el-icon-error img-remove-btn" @click="removeImgs(index)"></i>
+
+							<el-form-item label="主图" prop="imgs">
+								<div class="clearfix" style="width: 100%;">
+									<div class="upimg-item fx-r fx-bc fx-ac" style="" v-for="(item,index) in form.imgs"
+										:key="index">
+										<img v-lazy="item" :src="item" v-image-preview />
+										<i class="el-icon-error img-remove-btn" @click="removeImgs(index)"></i>
+									</div>
+									<ui-upload style="float: left;" :upUrl="upUrl" fileName="上传图片" :headers="upHeaders"
+										:updata="{isz:0,code:'goods'}" @onUpload="onUpload"
+										v-if="form.imgs.length<5"></ui-upload>
 								</div>
-								<ui-upload style="float: left;" :upUrl="upUrl"  fileName="上传图片" :headers="upHeaders" :updata="{isz:0,code:'goods'}" @onUpload="onUpload" v-if="form.imgs.length<5"></ui-upload>
-							</div>
-						</el-form-item>
-						<!-- <el-form-item label="详情图" prop="descs" :rules="[{ required: true, message: '请上传详情图'}]">
+							</el-form-item>
+							<!-- <el-form-item label="详情图" prop="descs" :rules="[{ required: true, message: '请上传详情图'}]">
 							<div class="clearfix" style="width: 100%;">
 								<div class="upimg-item fx-r fx-bc fx-ac" style="" v-for="(item,index) in form.descs" :key="index">
 									<img v-lazy="item" :src="item" v-image-preview/>
@@ -122,199 +131,210 @@
 								<ui-upload style="float: left;" :upUrl="upUrl"  fileName="上传图片" :headers="upHeaders" :updata="{isz:0,code:'goods'}" @onUpload="onUploadDescs" v-if="form.descs.length<5"></ui-upload>
 							</div>
 						</el-form-item> -->
-						<!-- <el-form-item label="赠送积分" prop="give_score">
+							<!-- <el-form-item label="赠送积分" prop="give_score">
 							<el-input placeholder="请输入赠送积分数" autocomplete="off" v-model="form.give_score" type="number"></el-input>
 						</el-form-item> -->
-						<el-form-item label="是否热门" style="margin-bottom: 0;">
-							<el-radio-group v-model="form.is_hot">
-								<el-radio :label="1">热门</el-radio>
-								<el-radio :label="0">常规</el-radio>
-							</el-radio-group>
-						</el-form-item>
-						<el-form-item label="是否推荐" style="margin-bottom: 0;">
-							<el-radio-group v-model="form.is_recommend">
-								<el-radio :label="1">推荐</el-radio>
-								<el-radio :label="0">常规</el-radio>
-							</el-radio-group>
-						</el-form-item>
-						<el-form-item label="是否上架" style="margin-bottom: 0;">
-							<el-radio-group v-model="form.status">
-								<el-radio :label="1">上架</el-radio>
-								<el-radio :label="0">下架</el-radio>
-							</el-radio-group>
-						</el-form-item>
-						<el-form-item label="初始模板" style="margin-bottom: 0;">
-							<el-radio-group v-model="form.is_init">
-								<el-radio :label="1">初始</el-radio>
-								<el-radio :label="0">常规</el-radio>
-							</el-radio-group>
-						</el-form-item>
-					</el-tab-pane>
-				</el-tabs>
-			</el-form>
-			
-		</div>
-		<span slot="footer" class="dialog-footer">
-			<el-button @click="dialogVisible = false">取 消</el-button>
-			<el-button type="primary" @click="subAdmin">确 定</el-button>
-        </span>
-    </Modal>
-		
-    </div>
+							<el-form-item label="是否热门" style="margin-bottom: 0;">
+								<el-radio-group v-model="form.is_hot">
+									<el-radio :label="1">热门</el-radio>
+									<el-radio :label="0">常规</el-radio>
+								</el-radio-group>
+							</el-form-item>
+							<el-form-item label="是否推荐" style="margin-bottom: 0;">
+								<el-radio-group v-model="form.is_recommend">
+									<el-radio :label="1">推荐</el-radio>
+									<el-radio :label="0">常规</el-radio>
+								</el-radio-group>
+							</el-form-item>
+							<el-form-item label="是否上架" style="margin-bottom: 0;">
+								<el-radio-group v-model="form.status">
+									<el-radio :label="1">上架</el-radio>
+									<el-radio :label="0">下架</el-radio>
+								</el-radio-group>
+							</el-form-item>
+							<el-form-item label="初始模板" style="margin-bottom: 0;">
+								<el-radio-group v-model="form.is_init">
+									<el-radio :label="1">初始</el-radio>
+									<el-radio :label="0">常规</el-radio>
+								</el-radio-group>
+							</el-form-item>
+						</el-tab-pane>
+					</el-tabs>
+				</el-form>
+
+			</div>
+			<span slot="footer" class="dialog-footer">
+				<el-button @click="dialogVisible = false">取 消</el-button>
+				<el-button type="primary" @click="subAdmin">确 定</el-button>
+			</span>
+		</Modal>
+
+	</div>
 </template>
 <script>
-    import {SystemShowTemplateList,SystemShowTemplateAdd} from "../../../api/system/showTemplate";
-	
-    import IPageHeader from "../../../layouts/system/page-header/index";
+	import {
+		SystemShowTemplateList,
+		SystemShowTemplateAdd
+	} from "../../../api/system/showTemplate";
+
+	import IPageHeader from "../../../layouts/system/page-header/index";
 	import UiUpload from "@/ui/upload/index";
 	import Setting from '@/setting';
-    export default {
-        name: "system_showTemplate_list",
-        components: {UiUpload,IPageHeader},
-        computed: {},
-        data() {
-            return {
-				pageTitle:'模板列表',
-				upHeaders:{},
-				upUrl:"",
-				cateData:[],
-                detial: {
-					is_hot       : "",
-					is_recommend : "",
-					title        : "",
-					time         : "",
-					status       : "",
-					
-					data         : [],
-                    page        : 1,
-					loading     : true,
-                    pageSize    : 0,
-                    pageCount   : 0,
-                },
-				
+	export default {
+		name: "system_showTemplate_list",
+		components: {
+			UiUpload,
+			IPageHeader
+		},
+		computed: {},
+		data() {
+			return {
+				pageTitle: '模板列表',
+				upHeaders: {},
+				upUrl: "",
+				cateData: [],
+				detial: {
+					is_hot: "",
+					is_recommend: "",
+					title: "",
+					time: "",
+					status: "",
+
+					data: [],
+					page: 1,
+					loading: true,
+					pageSize: 0,
+					pageCount: 0,
+				},
+
 				options: {
-				    shortcuts: [
-				        {
-				            text: '今天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '昨天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)));
-				                end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '最近7天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 6)));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '最近30天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 29)));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '本月',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '本年',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
-				                return [start, end];
-				            }
-				        }
-				    ]
+					shortcuts: [{
+							text: '今天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date()
+									.getDate()));
+								return [start, end];
+							}
+						},
+						{
+							text: '昨天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 1)));
+								end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate())));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近7天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 6)));
+								return [start, end];
+							}
+						},
+						{
+							text: '最近30天',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									new Date().getDate() - 29)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本月',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(),
+									1)));
+								return [start, end];
+							}
+						},
+						{
+							text: '本年',
+							value() {
+								const end = new Date();
+								const start = new Date();
+								start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+								return [start, end];
+							}
+						}
+					]
 				},
-				dialogVisible:false,
-				title:"",
-				add_parms_name:"",
-				formActiveName:"tab_base",
-				form:{
-					id             : "",
-				    imgs           : [],
+				dialogVisible: false,
+				title: "",
+				add_parms_name: "",
+				formActiveName: "tab_base",
+				form: {
+					id: "",
+					imgs: [],
 					// descs          : [],
-				    status         : 1,
-					is_hot         : 0,
-					is_recommend   : 0,
-					is_init        : 0,
-					data           : [],
+					status: 1,
+					is_hot: 0,
+					is_recommend: 0,
+					is_init: 0,
+					data: [],
 				},
-				defaultParms:[],
-            }
-        },
-        created() {
-            this.initView();
-        },
-        methods: {
+				defaultParms: [],
+			}
+		},
+		created() {
+			this.initView();
+		},
+		methods: {
 			/**
 			 * 添加
 			 */
-			tapAdd:function(sassid){
+			tapAdd: function(sassid) {
 				var that = this;
-			    this.dialogVisible = true;
-				that.add_parms_name="",
-				that.formActiveName="tab_base",
-			    this.$refs['form'].resetFields();
-			    this.form = this.$utils.resetFields(this.form, {
-				    imgs           : [],
+				this.dialogVisible = true;
+				that.add_parms_name = "",
+					that.formActiveName = "tab_base",
+					this.$refs['form'].resetFields();
+				this.form = this.$utils.resetFields(this.form, {
+					imgs: [],
 					// descs          : [],
-				    status         : 1,
-					is_hot         : 0,
-					is_recommend   : 0,
-					data           : JSON.parse(JSON.stringify(that.defaultParms)),
+					status: 1,
+					is_hot: 0,
+					is_recommend: 0,
+					data: JSON.parse(JSON.stringify(that.defaultParms)),
 				});
-				
+
 			},
-            initView:function(){
+			initView: function() {
 				var upHeaders = {};
 				this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
 				const token = this.$utils.util.cookies.get('system_token');
 				if (token) {
-				    upHeaders['SYSTEM-ACC-TOKEN'] = token;
+					upHeaders['SYSTEM-ACC-TOKEN'] = token;
 				}
 				this.upHeaders = upHeaders;
-                this.getData();
-            },
-			removeParms:function(index){
-				this.$delete(this.form.data,index);
+				this.getData();
+			},
+			removeParms: function(index) {
+				this.$delete(this.form.data, index);
 			},
-			addParms:function(){
+			addParms: function() {
 				var name = this.add_parms_name;
-				if(this.add_parms_name){
+				if (this.add_parms_name) {
 					this.form.data.push({
-						title:name,
-						content:"",
+						title: name,
+						content: "",
 					})
-					this.add_parms_name="";
+					this.add_parms_name = "";
 				}
 			},
-			statusChange:function(status){
+			statusChange: function(status) {
 				this.detial.status = status;
 				this.detial.page = 1
 				this.getData()
@@ -323,113 +343,161 @@
 			 * 上传文件
 			 * @param res
 			 */
-			onUpload:function (res) {
-			    if(res.code == -1) {
-			        Notice.error({ title : "系统提示", content:res.msg});
-			    } else {
-			        this.form.imgs.push(res.data.img);
-			    }
+			onUpload: function(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
+				} else {
+					this.form.imgs.push(res.data.img);
+				}
 			},
-			onUploadDescs:function(res){
-				if(res.code == -1) {
-				    Notice.error({ title : "系统提示", content:res.msg});
+			onUploadDescs: function(res) {
+				if (res.code == -1) {
+					Notice.error({
+						title: "系统提示",
+						content: res.msg
+					});
 				} else {
-				    this.form.descs.push(res.data.img);
+					this.form.descs.push(res.data.img);
 				}
 			},
-			tapEdit:function(row){
-				this.formActiveName="tab_base";
+			tapEdit: function(row) {
+				this.formActiveName = "tab_base";
 				this.form = JSON.parse(JSON.stringify(row));
 				this.dialogVisible = true;
 				this.title = "编辑模板";
 			},
 			//关闭
-			editClose:function(){
-			    this.dialogVisible = false;
+			editClose: function() {
+				this.dialogVisible = false;
 			},
-			removeImgs:function(index){
-				this.$delete(this.form.imgs,index);
+			removeImgs: function(index) {
+				this.$delete(this.form.imgs, index);
 			},
-			removeDescs:function(index){
-				this.$delete(this.form.descs,index);
+			removeDescs: function(index) {
+				this.$delete(this.form.descs, index);
 			},
 			/**
 			 * 修改数据
 			 */
-			subAdmin:function(e){
-			    this.$refs['form'].validate((valid) => {
-			        if (valid) {
-			            let loading = this.$loading("提交数据中...");
-			            var data = {};
-			            for(var i in this.form) {
-			                data[i] = this.form[i];
-			            }
-			            SystemShowTemplateAdd(data)
-			                .then(res => {
-			                    loading.close();
-			                    if (res.code == 200) {
-			                        this.dialogVisible = false;
-			                        this.$Message.success("操作成功");
-			                        this.getData();
-			                    } else {
-			                        this.$alert(res.msg, '系统提示');
-			                    }
-			                })
-			                .catch(err => {
-			                    loading.close();
-			                    this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
-			                });
-			        }
-			    });
+			subAdmin: function(e) {
+				this.$refs['form'].validate((valid) => {
+					if (valid) {
+						let loading = this.$loading("提交数据中...");
+						var data = {};
+						for (var i in this.form) {
+							data[i] = this.form[i];
+						}
+						SystemShowTemplateAdd(data)
+							.then(res => {
+								loading.close();
+								if (res.code == 200) {
+									this.dialogVisible = false;
+									this.$Message.success("操作成功");
+									this.getData();
+								} else {
+									this.$alert(res.msg, '系统提示');
+								}
+							})
+							.catch(err => {
+								loading.close();
+								this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+							});
+					}
+				});
+			},
+
+
+			//搜索栏目
+			tapSeach: function() {
+				this.detial.page = 1;
+				this.getData();
 			},
-			
-			
-            //搜索栏目
-            tapSeach:function () {
-                this.detial.page = 1;
-                this.getData();
-            },
-            //分页
-            tapPage:function (page) {
-                this.detial.page = page;
-                this.getData();
-            },
-            getData: function () {
-                var data = {};
+			//分页
+			tapPage: function(page) {
+				this.detial.page = page;
+				this.getData();
+			},
+			getData: function() {
+				var data = {};
 				var that = this;
-                this.detial.loading = true;
-				data.page        = this.detial.page;
-				data.status      = this.detial.status;
-				data.is_hot      = this.detial.is_hot;
+				this.detial.loading = true;
+				data.page = this.detial.page;
+				data.status = this.detial.status;
+				data.is_hot = this.detial.is_hot;
 				data.is_recommend = this.detial.is_recommend;
-				data.title       = this.detial.title;
-				data.time        = this.detial.time;
-                SystemShowTemplateList(data).then(res => {
-                    this.detial.loading   = false;
-                    this.detial.data      = res.data.list;
-                    this.detial.pageSize  = res.data.pageSize;
-                    this.detial.pageCount = res.data.pageCount;
-						// if(that.defaultParms.length<=0 && res.data.defaultParms){
-						// 	that.defaultParms = res.data.defaultParms;
-						// }
-                }).catch(err => {
-                    this.detial.loading = false;
-                    this.$alert('网络繁忙,加载失败,请稍等片刻在尝试!', '系统提示');
-                });
-            },
-        }
-    }
+				data.title = this.detial.title;
+				data.time = this.detial.time;
+				SystemShowTemplateList(data).then(res => {
+					this.detial.loading = false;
+					this.detial.data = res.data.list;
+					this.detial.pageSize = res.data.pageSize;
+					this.detial.pageCount = res.data.pageCount;
+					// if(that.defaultParms.length<=0 && res.data.defaultParms){
+					// 	that.defaultParms = res.data.defaultParms;
+					// }
+				}).catch(err => {
+					this.detial.loading = false;
+					this.$alert('网络繁忙,加载失败,请稍等片刻在尝试!', '系统提示');
+				});
+			},
+		}
+	}
 </script>
 <style scoped>
-iframe.videoIframe{border: 0px;padding: 0px;}
-.el-dialog__body{padding: 0px;}
-.el-dialog__body iframe body{padding: 0px;}
+	iframe.videoIframe {
+		border: 0px;
+		padding: 0px;
+	}
+
+	.el-dialog__body {
+		padding: 0px;
+	}
+
+	.el-dialog__body iframe body {
+		padding: 0px;
+	}
+
+	.muser-tab-continer {
+		border: 1px solid #EEEEEE
+	}
+
+	a.muser-tab-a {
+		display: inline-block;
+		padding: 0px 28px;
+		height: 42px;
+		line-height: 42px;
+		border-bottom: 3px solid transparent;
+		font-size: 17px;
+		color: #595959;
+	}
+
+	a.muser-tab-a.active {
+		border-bottom: 3px solid #EA312B;
+		color: #EA312B
+	}
+
+	.upimg-item {
+		width: 82px;
+		height: 82px;
+		margin-right: 5px;
+		overflow: hidden;
+		float: left;
+		margin-bottom: 5px;
+		position: relative;
+	}
+
+	.upimg-item img {
+		width: 82px;
+		cursor: pointer;
+	}
 
-	.muser-tab-continer{border:1px solid #EEEEEE}
-    a.muser-tab-a{display: inline-block;padding: 0px 28px;height:42px;line-height: 42px;border-bottom:3px solid transparent;font-size: 17px;color:#595959;}
-    a.muser-tab-a.active{border-bottom:3px solid #EA312B;color:#EA312B}
-	
-	.upimg-item{width: 82px;height: 82px;margin-right: 5px;overflow: hidden;float: left;margin-bottom: 5px;position: relative;}
-	.upimg-item img{width: 82px;cursor: pointer;}
-	.img-remove-btn{position: absolute;top: 0px;right: 0px;font-size: 24px;}
-</style>
+	.img-remove-btn {
+		position: absolute;
+		top: 0px;
+		right: 0px;
+		font-size: 24px;
+	}
+</style>

+ 56 - 1
src/components/system/signing/list.vue

@@ -109,10 +109,14 @@
       </el-table-column> -->
 				
 				<el-table-column prop="mark" label="附加条款" width="150"></el-table-column>
+				<el-table-column prop="reason" label="终止原因" width="200"></el-table-column>
 				<el-table-column prop="handle" label="操作" width="150" align="center">
 					<template slot-scope="scope">
 						<div><el-button plain size="mini" @click="tapDk(scope.row)">查看打卡</el-button></div>
+						<br />
 						<div><el-button plain size="mini" @click="tapPj(scope.row)">查看评价</el-button></div>
+						<br />
+						<div><el-button plain size="mini" v-if="scope.row.status == 1" @click="tapZz(scope.row)">终止合同</el-button></div>
 					</template>
 				</el-table-column>
 			</el-table>
@@ -130,6 +134,21 @@
 				</div>
 			</div>
 		</Modal>
+    <!-- 终止合同 模态框 -->
+		<Modal v-model="zzdialogVisibles" :title="title" @on-cancel="editClose" width="800" >
+			<div style="padding: 20px;">
+				<el-form :model="form" label-width="100px">
+					<el-form-item label="终止原因">
+						<el-input type="textarea" v-model="reason" placeholder="请输入终止合同的原因" rows="4"></el-input>
+					</el-form-item>
+				</el-form>
+				
+			</div>
+			<span slot="footer" class="dialog-footer">
+			    <el-button @click="zzdialogVisibles = false">取 消</el-button>
+			    <el-button type="primary" @click="confirmEndContract">确 定</el-button>
+			  </span>
+		</Modal>
 		<Modal v-model="dialogVisibles" :title="title" @on-cancel="editCloses" width="800">
 			<div>
 				{{content || '暂无评价'}}
@@ -149,7 +168,8 @@
 	import {
 		getSigningList,
 		getDkList,
-		getPjList
+		getPjList,
+		endComment
 	} from '@/api/system/signing.js'
 	export default {
 		name: "system_showTemplate_list",
@@ -160,6 +180,11 @@
 		computed: {},
 		data() {
 			return {
+				checkItem: {
+					id: 0
+				},
+				zzdialogVisibles: false,
+				reason: '',//终止原因
 				dialogVisibles: false,
 				pageTitle: '预约列表',
 				upHeaders: {},
@@ -400,6 +425,11 @@
 				// this.dk.contract_id = item.id
 				this.getDk()
 			},
+			tapZz(item) {
+				this.checkItem = item
+				this.zzdialogVisibles = true;
+				this.title = "终止合同";
+			},
 			tapPj(item) {
 				this.dialogVisibles = true;
 				this.title = "用户评价";
@@ -411,10 +441,35 @@
 			//关闭
 			editClose: function() {
 				this.dialogVisible = false;
+				this.zzdialogVisibles = false;
 			},
 			editCloses: function() {
 				this.dialogVisibles = false;
 			},
+			// 确认终止合同
+			confirmEndContract: function() {
+				if (!this.reason) {
+					this.$alert('请输入终止合同的原因', '系统提示');
+					return;
+				}
+				let loading = this.$loading("提交数据中...");
+				endComment({
+					id: this.checkItem.id,
+					reason: this.reason
+				}).then(res => {
+					loading.close();
+					if (res.code == 200) {
+						this.zzdialogVisibles = false;
+						this.$Message.success("操作成功");
+						this.getData();
+					} else {
+						this.$alert(res.msg, '系统提示');
+					}
+				}).catch(err => {
+					loading.close();
+					this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+				});
+			},
 			removeImgs: function(index) {
 				this.$delete(this.form.imgs, index);
 			},

+ 448 - 392
src/components/system/user/list.vue

@@ -1,45 +1,36 @@
 <template>
-    <div>
-        <i-page-header :title="pageTitle"></i-page-header>
-        <Card :bordered="false" dis-hover class="ivu-mt">
-            <div class="fx-r" style="padding: 20px 0;">
-				<Input placeholder="绑定的手机号"  style="width:120px" class="mr10" v-model="detial.mobile"/>
-				<Input placeholder="用户昵称"      style="width:120px" class="mr10" v-model="detial.nickname"/>
-				<Input placeholder="用户UID"       style="width:120px" class="mr10" v-model="detial.uid"/>
-				<Input placeholder="父级用户UID"    style="width:120px" class="mr10" v-model="detial.parent_uid"/>
-				<DatePicker style="width: 250px" format="yyyy-MM-dd HH:mm:ss" v-model="detial.time" type="datetimerange" placement="bottom-start" placeholder="注册时间范围" :options="options"></DatePicker>
-                <el-button type="primary" style="margin-left: 6px;" @click="tapSeach">查询</el-button>
-				<div class="fx-g1"></div>
-            </div>
-			
-			<div class="muser-tab-continer">
-			    <a class="muser-tab-a" :class="detial.status==''   ? 'active':''" @click="statusChange('')">全部</a>
-			    <a class="muser-tab-a" :class="detial.status=='-1'  ? 'active':''" @click="statusChange('-1')">禁用</a>
-			    <a class="muser-tab-a" :class="detial.status=='1'  ? 'active':''" @click="statusChange('1')">使用</a>
-			</div>
-            <el-table :data="detial.data" v-loading="detial.loading" :stripe="true" :border="true" >
-                <el-table-column
-                        prop="uid"
-                        label="UID"
-						width="80"
-                        align="center">
-                </el-table-column>
-				<el-table-column
-				         prop="avatar"
-				         label="头像"
-						 width="80"
-				         align="left">
-				     <template slot-scope="scope">
-						 <img  v-lazy="scope.row.avatar" :src="scope.row.avatar" v-image-preview style="width: 60px;cursor: pointer;"/>
-				     </template>
-				 </el-table-column>
+  <div>
+    <i-page-header :title="pageTitle"></i-page-header>
+    <Card :bordered="false" dis-hover class="ivu-mt">
+      <div class="fx-r" style="padding: 20px 0;">
+        <Input placeholder="绑定的手机号" style="width:120px" class="mr10" v-model="detial.mobile" />
+        <Input placeholder="用户昵称" style="width:120px" class="mr10" v-model="detial.nickname" />
+        <Input placeholder="用户UID" style="width:120px" class="mr10" v-model="detial.uid" />
+        <Input placeholder="父级用户UID" style="width:120px" class="mr10" v-model="detial.parent_uid" />
+        <DatePicker style="width: 250px" format="yyyy-MM-dd HH:mm:ss" v-model="detial.time" type="datetimerange"
+          placement="bottom-start" placeholder="注册时间范围" :options="options"></DatePicker>
+        <el-button type="primary" style="margin-left: 6px;" @click="tapSeach">查询</el-button>
+        <div class="fx-g1"></div>
+      </div>
+
+      <div class="muser-tab-continer">
+        <a class="muser-tab-a" :class="detial.status == '' ? 'active' : ''" @click="statusChange('')">全部</a>
+        <a class="muser-tab-a" :class="detial.status == '-1' ? 'active' : ''" @click="statusChange('-1')">禁用</a>
+        <a class="muser-tab-a" :class="detial.status == '1' ? 'active' : ''" @click="statusChange('1')">使用</a>
+      </div>
+      <el-table :data="detial.data" v-loading="detial.loading" :stripe="true" :border="true">
+        <el-table-column prop="uid" label="UID" width="80" align="center">
+        </el-table-column>
+        <el-table-column prop="avatar" label="头像" width="80" align="left">
+          <template slot-scope="scope">
+            <img v-lazy="scope.row.avatar" :src="scope.row.avatar" v-image-preview
+              style="width: 60px;cursor: pointer;" />
+          </template>
+        </el-table-column>
 
-				<el-table-column
-				        prop="mobile"
-						width="100"
-				        label="绑定手机">
-				</el-table-column>
-				<!-- <el-table-column
+        <el-table-column prop="mobile" width="100" label="绑定手机">
+        </el-table-column>
+        <!-- <el-table-column
 				        prop="parent_uid"
 				        label="上级用户">
 						<template slot-scope="scope">
@@ -49,7 +40,7 @@
 							</div>
 						</template>
 				</el-table-column> -->
-				<!-- <el-table-column
+        <!-- <el-table-column
 				        prop="branchCount"
 						align="center"
 				        label="推广人数">
@@ -57,78 +48,55 @@
 							{{scope.row.branchCount}}
 						</template>
 				</el-table-column> -->
-				<el-table-column
-				        prop="nickname"
-				        label="昵称">
-				</el-table-column>
-				<el-table-column
-				        prop="name"
-				        label="姓名">
-				</el-table-column>
-				<el-table-column
-				        prop="money"
-				        label="余额">
-				</el-table-column>
-				<el-table-column
-				         prop="parent_uid"
-						 width="100"
-				         label="邀请人">
-						 <template slot-scope="scope">
-							 <div @click="tapUserSeach(scope.row.parent_uid)">
-							 	<div style="text-align: center;">{{scope.row.p_nickname}}</div>
-								<div style="text-align: center;">{{scope.row.p_mobile}}</div>
-							 </div>
-						 </template>
-				 </el-table-column>
-				<el-table-column
-				         prop="showTempCount"
-				         label="名片模板">
-						 <template slot-scope="scope">
-							 <i-link :to="'/system/user/showTemplateList?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的模板' ">
-							 	({{scope.row.showTempCount}}) 查看
-							 </i-link>
-						 </template>
-				 </el-table-column>
-				<el-table-column
-				         prop="is_info_audit"
-				         label="资料审核"
-						 width="80"
-				         align="left">
-				     <template slot-scope="scope">
-						<el-tag type="success" size="mini" v-if="scope.row.is_info_audit == 1">已审核</el-tag>
-						<el-tag type="danger" size="mini" v-if="scope.row.is_info_audit == 0">未审核</el-tag>
-				     </template>
-				 </el-table-column>
-				 
-				 <el-table-column prop="work_type_id" align="center" label="职业名称" width="100">
-				     <template slot-scope="scope">
-				         <div v-if="scope.row.work_type_id == 0" style="color: #9B9B9B">普通用户</div>
-				         <div v-if="scope.row.work_type_id>0" style="color: #00ac1c">{{scope.row.work_type_title}}</div>
-				     </template>
-				 </el-table-column>
-				 
-				 
-				<el-table-column
-				         prop="is_type_audit"
-				         label="平台认证"
-						 width="80"
-				         align="left">
-				     <template slot-scope="scope">
-						<el-tag type="success" size="mini" v-if="scope.row.is_type_audit == 1">已认证</el-tag>
-						<el-tag type="danger" size="mini" v-if="scope.row.is_type_audit == 0">未认证</el-tag>
-				     </template>
-				 </el-table-column>
-				<el-table-column
-				         prop="status"
-				         label="是否禁用"
-						 width="80"
-				         align="left">
-				     <template slot-scope="scope">
-						<el-tag type="success" size="mini" v-if="scope.row.status == 1">使用</el-tag>
-						<el-tag type="danger" size="mini" v-if="scope.row.status == -1">禁用</el-tag>
-				     </template>
-				 </el-table-column>
-				<!-- <el-table-column
+        <el-table-column prop="nickname" label="昵称">
+        </el-table-column>
+        <el-table-column prop="name" label="姓名">
+        </el-table-column>
+        <el-table-column prop="score" label="积分">
+        </el-table-column>
+        <el-table-column prop="parent_uid" width="100" label="邀请人">
+          <template slot-scope="scope">
+            <div @click="tapUserSeach(scope.row.parent_uid)">
+              <div style="text-align: center;">{{ scope.row.p_nickname }}</div>
+              <div style="text-align: center;">{{ scope.row.p_mobile }}</div>
+            </div>
+          </template>
+        </el-table-column>
+        <el-table-column prop="showTempCount" label="名片模板">
+          <template slot-scope="scope">
+            <i-link :to="'/system/user/showTemplateList?uid=' + scope.row.uid + '&title=' + scope.row.nickname + '的模板'">
+              ({{ scope.row.showTempCount }}) 查看
+            </i-link>
+          </template>
+        </el-table-column>
+        <el-table-column prop="is_info_audit" label="资料审核" width="80" align="left">
+          <template slot-scope="scope">
+            <el-tag type="success" size="mini" v-if="scope.row.is_info_audit == 1">已审核</el-tag>
+            <el-tag type="danger" size="mini" v-if="scope.row.is_info_audit == 0">未审核</el-tag>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="work_type_id" align="center" label="职业名称" width="100">
+          <template slot-scope="scope">
+            <div v-if="scope.row.work_type_id == 0" style="color: #9B9B9B">普通用户</div>
+            <div v-if="scope.row.work_type_id > 0" style="color: #00ac1c">{{ scope.row.work_type_title }}</div>
+          </template>
+        </el-table-column>
+
+
+        <el-table-column prop="is_type_audit" label="平台认证" width="80" align="left">
+          <template slot-scope="scope">
+            <el-tag type="success" size="mini" v-if="scope.row.is_type_audit == 1">已认证</el-tag>
+            <el-tag type="danger" size="mini" v-if="scope.row.is_type_audit == 0">未认证</el-tag>
+          </template>
+        </el-table-column>
+        <el-table-column prop="status" label="是否禁用" width="80" align="left">
+          <template slot-scope="scope">
+            <el-tag type="success" size="mini" v-if="scope.row.status == 1">使用</el-tag>
+            <el-tag type="danger" size="mini" v-if="scope.row.status == -1">禁用</el-tag>
+          </template>
+        </el-table-column>
+        <!-- <el-table-column
 				          prop="ercode"
 				          label="推广码"
 				 		 width="80"
@@ -137,306 +105,394 @@
 				 		 <img  v-lazy="scope.row.ercode" :src="scope.row.ercode" v-image-preview style="width: 60px;cursor: pointer;"/>
 				      </template>
 				  </el-table-column> -->
-				<el-table-column
-				        prop="regtime"
-				        label="注册时间"
-						width="150">
-				</el-table-column>
-				<el-table-column  align="center" label="操作"     prop="handle" width="200" fixed="right">
-				    <template slot-scope="scope">
-						<div>
-							<el-button plain size="mini" @click="tapEdit(scope.row)">编辑</el-button>
-							<!-- <Divider type="vertical"/>
+        <el-table-column prop="regtime" label="注册时间" width="150">
+        </el-table-column>
+        <el-table-column align="center" label="操作" prop="handle" width="200" fixed="right">
+          <template slot-scope="scope">
+            <div>
+              <el-button plain size="mini" @click="tapEdit(scope.row)">编辑</el-button>
+              <el-button plain size="mini" @click="tapScoreEdit(scope.row)">积分补扣</el-button>
+
+              <!-- <Divider type="vertical"/>
 							<i-link :to="'/system/order/index?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的订单列表' ">
 								<el-button plain size="mini" >订单</el-button>
 							</i-link> -->
-						</div>
-						<div style="margin-top: 10px;">
-							<!-- <i-link :to="'/system/circle/list?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的动态列表' ">
+            </div>
+            <div style="margin-top: 10px;">
+              <!-- <i-link :to="'/system/circle/list?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的动态列表' ">
 								<el-button plain size="mini" >圈子</el-button>
 							</i-link>
 							<Divider type="vertical"/> -->
-							<!-- <i-link :to="'/system/user/moneyDetail?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的余额明细' ">
+              <!-- <i-link :to="'/system/user/moneyDetail?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的余额明细' ">
 								<el-button plain size="mini" >余额</el-button>
 							</i-link> -->
-<!-- 							<Divider type="vertical"/>
+              <!-- 							<Divider type="vertical"/>
 							<i-link :to="'/system/user/scoreDetail?uid=' + scope.row.uid + '&title=' +scope.row.nickname+ '的积分明细' ">
 								<el-button plain size="mini" >积分</el-button>
 							</i-link> -->
-						</div>
-				    </template>
-				</el-table-column>
-            </el-table>
-            <div class="acea-row row-right page">
-                <Page :total="detial.pageCount" show-elevator show-total @on-change="tapPage" :page-size="detial.pageSize"/>
             </div>
-        </Card>
-		
-	<Modal v-model="dialogVisible" :title="title" @on-cancel="editClose">
-		<el-form ref="form" :model="form" label-width="120px">
-			<el-divider content-position="left">用户信息</el-divider>
-			<el-form-item label="用户昵称" >
-			    <el-input placeholder="请输用户昵称!" v-model="form.nickname"></el-input>
-			</el-form-item>
-			<el-form-item label="用户姓名">
-			    <el-input placeholder="请输入用户姓名!" v-model="form.name"></el-input>
-			</el-form-item>
-			<el-form-item label="是否禁用">
-				<el-radio-group v-model="form.status">
-					<el-radio :label="1">使用</el-radio>
-					<el-radio :label="-1">禁用</el-radio>
-				</el-radio-group>
-			</el-form-item>
+          </template>
+        </el-table-column>
+      </el-table>
+      <div class="acea-row row-right page">
+        <Page :total="detial.pageCount" show-elevator show-total @on-change="tapPage" :page-size="detial.pageSize" />
+      </div>
+    </Card>
 
-		</el-form>
-		<span slot="footer" class="dialog-footer">
-			<el-button @click="dialogVisible = false">取 消</el-button>
-			<el-button type="primary" @click="subAdmin">确 定</el-button>
-        </span>
+    <Modal v-model="dialogVisible" :title="title" @on-cancel="editClose">
+      <el-form ref="form" :model="form" label-width="120px">
+        <el-divider content-position="left">用户信息</el-divider>
+        <el-form-item label="用户昵称">
+          <el-input placeholder="请输用户昵称!" v-model="form.nickname"></el-input>
+        </el-form-item>
+        <el-form-item label="用户姓名">
+          <el-input placeholder="请输入用户姓名!" v-model="form.name"></el-input>
+        </el-form-item>
+        <el-form-item label="是否禁用">
+          <el-radio-group v-model="form.status">
+            <el-radio :label="1">使用</el-radio>
+            <el-radio :label="-1">禁用</el-radio>
+          </el-radio-group>
+        </el-form-item>
+
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="subAdmin">确 定</el-button>
+      </span>
+    </Modal>
+    <Modal v-model="scoreDialogVisible" title="积分明细补扣" @on-cancel="editClose">
+      <el-form ref="form" :model="scoreform" label-width="120px">
+        <el-form-item label="增减积分 ">
+          <el-radio-group v-model="scoreform.type">
+            <el-radio :label="1">增加</el-radio>
+            <el-radio :label="-1">减少</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="数量">
+          <el-input placeholder="请输入积分数量" v-model="scoreform.into"></el-input>
+        </el-form-item>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="scoreDialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="subAdminscore">确 定</el-button>
+      </span>
     </Modal>
-		
-    </div>
+  </div>
 </template>
 <script>
-    import {SystemUserList,SystemUserSave} from "../../../api/system/user";
-	
-    import IPageHeader from "../../../layouts/system/page-header/index";
-	import UiUpload from "@/ui/upload/index";
-	import Setting from '@/setting';
-    export default {
-        name: "SystemUserList",
-        components: {UiUpload,IPageHeader},
-        computed: {},
-        data() {
-            return {
-				pageTitle:'用户列表',
-				upHeaders:{},
-				upUrl:"",
-				labelsData:[],
-                detial: {
-					data      : [],
-					time      : "",
-					nickname  : "",
-					mobile    : "",
-					status    : "",
-					uid       : "",
-					parent_uid: "",
-					
-                    page      : 1,
-					loading   : true,
-                    pageSize  : 0,
-                    pageCount : 0,
-                },
-				
-				options: {
-				    shortcuts: [
-				        {
-				            text: '今天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '昨天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)));
-				                end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '最近7天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 6)));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '最近30天',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 29)));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '本月',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)));
-				                return [start, end];
-				            }
-				        },
-				        {
-				            text: '本年',
-				            value() {
-				                const end = new Date();
-				                const start = new Date();
-				                start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
-				                return [start, end];
-				            }
-				        }
-				    ]
-				},
-				
-				dialogVisible:false,
-				title:"",
-				form:{
-					status:1,
-					name:"",
-					nickname:""
-				},
+import { SystemUserList, SystemUserSave, SystemUserScoreDetailSave } from "../../../api/system/user";
+
+import IPageHeader from "../../../layouts/system/page-header/index";
+import UiUpload from "@/ui/upload/index";
+import Setting from '@/setting';
+export default {
+  name: "SystemUserList",
+  components: { UiUpload, IPageHeader },
+  computed: {},
+  data() {
+    return {
+      scoreDialogVisible: false,
+      scoreform: {
+        uid: '',
+        type: 1,//1:增加 -1:减少
+        into: '',
+      },
+      pageTitle: '用户列表',
+      upHeaders: {},
+      upUrl: "",
+      labelsData: [],
+      detial: {
+        data: [],
+        time: "",
+        nickname: "",
+        mobile: "",
+        status: "",
+        uid: "",
+        parent_uid: "",
+
+        page: 1,
+        loading: true,
+        pageSize: 0,
+        pageCount: 0,
+      },
+
+      options: {
+        shortcuts: [
+          {
+            text: '今天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate()));
+              return [start, end];
+            }
+          },
+          {
+            text: '昨天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 1)));
+              end.setTime(end.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate())));
+              return [start, end];
+            }
+          },
+          {
+            text: '最近7天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 6)));
+              return [start, end];
             }
-        },
+          },
+          {
+            text: '最近30天',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), new Date().getDate() - 29)));
+              return [start, end];
+            }
+          },
+          {
+            text: '本月',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), new Date().getMonth(), 1)));
+              return [start, end];
+            }
+          },
+          {
+            text: '本年',
+            value() {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.setTime(new Date(new Date().getFullYear(), 0, 1)));
+              return [start, end];
+            }
+          }
+        ]
+      },
 
-        created() {
-			if(this.$route.query.title){
-				this.pageTitle = this.$route.query.title;
-			}
-			if(this.$route.query.uid){
-				this.detial.uid = parseInt(this.$route.query.uid);
-			}
-			if(this.$route.query.parent_uid){
-				this.detial.parent_uid = parseInt(this.$route.query.parent_uid);
-			}
-            this.initView();
-        },
-        methods: {
-			/**
-			 * 添加
-			 */
-			tapAdd:function(sassid){
-			    this.dialogVisible = true;
-			    this.$refs['form'].resetFields();
-			    this.form = this.$utils.resetFields(this.form, {status:1});
-			},
-            initView:function(){
-				var upHeaders = {};
-				this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
-				const token = this.$utils.util.cookies.get('system_token');
-				if (token) {
-				    upHeaders['SYSTEM-ACC-TOKEN'] = token;
-				}
-				this.upHeaders = upHeaders;
-                this.getData();
-            },
-			statusChange:function(status){
-				this.detial.status = status;
-				this.detial.page = 1
-				this.getData()
-			},
-			/**
-			 * 上传文件
-			 * @param res
-			 */
-			onUpload:function (res) {
-			    if(res.code == -1) {
-			        Notice.error({ title : "系统提示", content:res.msg});
-			    } else {
-			        this.form.imgs.push(res.data.img);
-			    }
-			},
-			tapEdit:function(row){
-				this.form = JSON.parse(JSON.stringify(row));
-				this.dialogVisible = true;
-				this.title = "编辑";
-			},
-			//关闭
-			editClose:function(){
-			    this.dialogVisible = false;
-			},
-			/**
-			 * 修改数据
-			 */
-			subAdmin:function(e){
-			    this.$refs['form'].validate((valid) => {
-			        if (valid) {
-			            let loading = this.$loading("提交数据中...");
-			            var data = {};
-			            for(var i in this.form) {
-			                data[i] = this.form[i];
-			            }
-			            SystemUserSave(data)
-			                .then(res => {
-			                    loading.close();
-			                    if (res.code == 200) {
-			                        this.dialogVisible = false;
-			                        this.$Message.success("操作成功");
-			                        this.getData();
-			                    } else {
-			                        this.$alert(res.msg, '系统提示');
-			                    }
-			                })
-			                .catch(err => {
-			                    loading.close();
-			                    this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
-			                });
-			        }
-			    });
-			},
-			
-			
-            //搜索栏目
-            tapSeach:function () {
-                this.detial.page = 1;
-                this.getData();
-            },
-			tapUserSeach:function (uid) {
-			    this.detial.page = 1;
-				this.detial.uid = uid;
-			    this.getData();
-			},
-            //分页
-            tapPage:function (page) {
-                this.detial.page = page;
-                this.getData();
-            },
-            getData: function () {
-                var data = {};
-                this.detial.loading = true;
-				data.page      = this.detial.page;
-				data.status    = this.detial.status;
-				data.uid       = this.detial.uid;
-				data.nickname  = this.detial.nickname;
-				data.time      = this.detial.time;
-				data.mobile    = this.detial.mobile;
-				data.parent_uid= this.detial.parent_uid;
-                SystemUserList(data)
-                    .then(res => {
-                        this.detial.loading   = false;
-                        this.detial.data      = res.data.list;
-                        this.detial.pageSize  = res.data.pageSize;
-                        this.detial.pageCount = res.data.pageCount;
-						this.detial.waitCount = res.data.waitCount;
-                    })
-                    .catch(err => {
-                        this.detial.loading = false;
-                        this.$alert('网络繁忙,加载失败,请稍等片刻在尝试!', '系统提示');
-                    });
-            },
+      dialogVisible: false,
+      title: "",
+      form: {
+        status: 1,
+        name: "",
+        nickname: ""
+      },
+    }
+  },
 
-        }
+  created() {
+    if (this.$route.query.title) {
+      this.pageTitle = this.$route.query.title;
+    }
+    if (this.$route.query.uid) {
+      this.detial.uid = parseInt(this.$route.query.uid);
+    }
+    if (this.$route.query.parent_uid) {
+      this.detial.parent_uid = parseInt(this.$route.query.parent_uid);
     }
+    this.initView();
+  },
+  methods: {
+    subAdminscore() {
+      if (this.scoreform.into == '') {
+        this.$message.error('请输入积分数量!');
+        return;
+      }
+      SystemUserScoreDetailSave(this.scoreform).then(res => {
+
+        if (res.code == 200) {
+          this.scoreDialogVisible = false;
+          this.$message.success(res.msg);
+          this.getData();
+        } else {
+          this.$message.error(res.msg);
+        }
+      })
+    },
+    tapScoreEdit: function (row) {
+      let rows = JSON.parse(JSON.stringify(row));
+      this.scoreform = {
+        uid: rows.uid,
+        type: 1,//1:增加 -1:减少
+        into: '',
+      }
+      this.scoreDialogVisible = true;
+    },
+    /**
+     * 添加
+     */
+    tapAdd: function (sassid) {
+      this.dialogVisible = true;
+      this.$refs['form'].resetFields();
+      this.form = this.$utils.resetFields(this.form, { status: 1 });
+    },
+    initView: function () {
+      var upHeaders = {};
+      this.upUrl = Setting.apiBaseURL + "/systemv1/upload/index";
+      const token = this.$utils.util.cookies.get('system_token');
+      if (token) {
+        upHeaders['SYSTEM-ACC-TOKEN'] = token;
+      }
+      this.upHeaders = upHeaders;
+      this.getData();
+    },
+    statusChange: function (status) {
+      this.detial.status = status;
+      this.detial.page = 1
+      this.getData()
+    },
+    /**
+     * 上传文件
+     * @param res
+     */
+    onUpload: function (res) {
+      if (res.code == -1) {
+        Notice.error({ title: "系统提示", content: res.msg });
+      } else {
+        this.form.imgs.push(res.data.img);
+      }
+    },
+    tapEdit: function (row) {
+      this.form = JSON.parse(JSON.stringify(row));
+      this.dialogVisible = true;
+      this.title = "编辑";
+    },
+    //关闭
+    editClose: function () {
+      this.dialogVisible = false;
+    },
+    /**
+     * 修改数据
+     */
+    subAdmin: function (e) {
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          let loading = this.$loading("提交数据中...");
+          var data = {};
+          for (var i in this.form) {
+            data[i] = this.form[i];
+          }
+          SystemUserSave(data)
+            .then(res => {
+              loading.close();
+              if (res.code == 200) {
+                this.dialogVisible = false;
+                this.$Message.success("操作成功");
+                this.getData();
+              } else {
+                this.$alert(res.msg, '系统提示');
+              }
+            })
+            .catch(err => {
+              loading.close();
+              this.$alert("网络繁忙,加载失败,请稍等片刻在尝试!", '系统提示');
+            });
+        }
+      });
+    },
+
+
+    //搜索栏目
+    tapSeach: function () {
+      this.detial.page = 1;
+      this.getData();
+    },
+    tapUserSeach: function (uid) {
+      this.detial.page = 1;
+      this.detial.uid = uid;
+      this.getData();
+    },
+    //分页
+    tapPage: function (page) {
+      this.detial.page = page;
+      this.getData();
+    },
+    getData: function () {
+      var data = {};
+      this.detial.loading = true;
+      data.page = this.detial.page;
+      data.status = this.detial.status;
+      data.uid = this.detial.uid;
+      data.nickname = this.detial.nickname;
+      data.time = this.detial.time;
+      data.mobile = this.detial.mobile;
+      data.parent_uid = this.detial.parent_uid;
+      SystemUserList(data)
+        .then(res => {
+          this.detial.loading = false;
+          this.detial.data = res.data.list;
+          this.detial.pageSize = res.data.pageSize;
+          this.detial.pageCount = res.data.pageCount;
+          this.detial.waitCount = res.data.waitCount;
+        })
+        .catch(err => {
+          this.detial.loading = false;
+          this.$alert('网络繁忙,加载失败,请稍等片刻在尝试!', '系统提示');
+        });
+    },
+
+  }
+}
 </script>
 <style scoped>
-iframe.videoIframe{border: 0px;padding: 0px;}
-.el-dialog__body{padding: 0px;}
-.el-dialog__body iframe body{padding: 0px;}
+iframe.videoIframe {
+  border: 0px;
+  padding: 0px;
+}
+
+.el-dialog__body {
+  padding: 0px;
+}
+
+.el-dialog__body iframe body {
+  padding: 0px;
+}
+
+.muser-tab-continer {
+  border: 1px solid #EEEEEE
+}
+
+a.muser-tab-a {
+  display: inline-block;
+  padding: 0px 28px;
+  height: 42px;
+  line-height: 42px;
+  border-bottom: 3px solid transparent;
+  font-size: 17px;
+  color: #595959;
+}
+
+a.muser-tab-a.active {
+  border-bottom: 3px solid #EA312B;
+  color: #EA312B
+}
+
+.upimg-item {
+  width: 82px;
+  height: 82px;
+  margin-right: 5px;
+  overflow: hidden;
+  float: left;
+  margin-bottom: 5px;
+  position: relative;
+}
+
+.upimg-item img {
+  width: 82px;
+  cursor: pointer;
+}
 
-	.muser-tab-continer{border:1px solid #EEEEEE}
-    a.muser-tab-a{display: inline-block;padding: 0px 28px;height:42px;line-height: 42px;border-bottom:3px solid transparent;font-size: 17px;color:#595959;}
-    a.muser-tab-a.active{border-bottom:3px solid #EA312B;color:#EA312B}
-	
-	.upimg-item{width: 82px;height: 82px;margin-right: 5px;overflow: hidden;float: left;margin-bottom: 5px;position: relative;}
-	.upimg-item img{width: 82px;cursor: pointer;}
-	.img-remove-btn{position: absolute;top: 0px;right: 0px;font-size: 24px;}
+.img-remove-btn {
+  position: absolute;
+  top: 0px;
+  right: 0px;
+  font-size: 24px;
+}
 </style>

+ 64 - 1
src/router/routes.js

@@ -393,7 +393,70 @@ const system = [{
 					auth: true
 				},
 				component: () => import('@/components/system/signing/createContract')
-			}
+			},
+			{
+				path: '/system/chat/index',
+				name: 'system_chat_index',
+				meta: {
+					title: '聊天记录',
+					auth: true
+				},
+				component: () => import('@/components/system/chat/index')
+			},
+			{
+				path: '/system/forum/index',
+				name: 'system_forum_index',
+				meta: {
+					title: '发布者',
+					auth: true
+				},
+				component: () => import('@/components/system/forum/index')
+			},
+			{
+				path: '/system/forum/list',
+				name: 'system_forum_list',
+				meta: {
+					title: '贴子管理',
+					auth: true
+				},
+				component: () => import('@/components/system/forum/list')
+			},
+			{
+				path: '/system/points/list',
+				name: 'system_points_list',
+				meta: {
+					title: '积分商品',
+					auth: true
+				},
+				component: () => import('@/components/system/points/list')
+      },
+      {
+				path: '/system/points/czlist',
+				name: 'system_points_czlist',
+				meta: {
+					title: '充值记录',
+					auth: true
+				},
+				component: () => import('@/components/system/points/czList')
+			},
+			{
+				path: '/system/points/order',
+				name: 'system_points_order',
+				meta: {
+					title: '积分订单',
+					auth: true
+				},
+				component: () => import('@/components/system/points/order')
+			},
+			{
+				path: '/system/points/bill',
+				name: 'system_points_bill',
+				meta: {
+					title: '积分流水',
+					auth: true
+				},
+				component: () => import('@/components/system/points/bill')
+			},
 		]
 	},