achao 1 год назад
Родитель
Сommit
1bcc1fab7a

+ 2 - 2
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/huiyuan/ISalesSlipService.java

@@ -37,8 +37,8 @@ public interface ISalesSlipService{
 							@HttpParam(name = "remark2", type = HttpParamType.COMMON, description = "备注2") String remark2,
 							@HttpParam(name = "remark3", type = HttpParamType.COMMON, description = "备注3") String remark3,
 							@HttpParam(name = "deleteFlag", type = HttpParamType.COMMON, description = "0:否(默认) 1:是") Long deleteFlag,
-							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") Date gmtCreate,
-							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") Date gmtUpdate,
+							@HttpParam(name = "gmtCreate", type = HttpParamType.COMMON, description = "") String gmtCreate,
+							@HttpParam(name = "gmtUpdate", type = HttpParamType.COMMON, description = "") String gmtUpdate,
 							@HttpParam(name = "userId", type = HttpParamType.COMMON, description = "") Long userId,
 							@HttpParam(name = "adminId", type = HttpParamType.COMMON, description = "") Long adminId,
 					@HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,

+ 3 - 3
unimall-admin-api/src/main/java/com/iotechn/unimall/admin/api/huiyuan/impl/SalesSlipServiceImpl.java

@@ -41,7 +41,7 @@ public class SalesSlipServiceImpl implements ISalesSlipService {
     }
 
     @Override
-    public Page<SalesSlip> list(Long companyId, String serviceObject, String serviceType, String color, String attribute, String serviceItems, Double money, String status, String remark1, String remark2, String remark3, Long deleteFlag, Date gmtCreate, Date gmtUpdate, Long userId, Long adminId, Integer page, Integer limit) throws ServiceException {
+    public Page<SalesSlip> list(Long companyId, String serviceObject, String serviceType, String color, String attribute, String serviceItems, Double money, String status, String remark1, String remark2, String remark3, Long deleteFlag, String gmtCreate, String gmtUpdate, Long userId, Long adminId, Integer page, Integer limit) throws ServiceException {
         Wrapper<SalesSlip> wrapper = new EntityWrapper<SalesSlip>();
         if (!StringUtils.isEmpty(companyId)) {
             wrapper.eq("company_id", companyId);
@@ -80,10 +80,10 @@ public class SalesSlipServiceImpl implements ISalesSlipService {
             wrapper.eq("delete_flag", deleteFlag);
         }
         if (!StringUtils.isEmpty(gmtCreate)) {
-            wrapper.eq("gmt_create", gmtCreate);
+            wrapper.like("gmt_create", gmtCreate);
         }
         if (!StringUtils.isEmpty(gmtUpdate)) {
-            wrapper.eq("gmt_update", gmtUpdate);
+            wrapper.like("gmt_update", gmtUpdate);
         }
         if (!StringUtils.isEmpty(userId)) {
             wrapper.eq("user_id", userId);

+ 4 - 2
unimall-admin/config/dev.env.js

@@ -1,6 +1,8 @@
 module.exports = {
     NODE_ENV: '"development"',
     ENV_CONFIG: '"dev"',
-    HOST: '"http://192.168.110.82:8181"',
-    BASE_API: '"http://192.168.110.82:8181/m.api"'
+    // HOST: '"http://192.168.110.82:8181"',
+    // BASE_API: '"http://192.168.110.82:8181/m.api"'
+    HOST: '"http://192.168.110.175:8181"',
+    BASE_API: '"http://192.168.110.175:8181/m.api"'
 }

+ 67 - 2
unimall-admin/package-lock.json

@@ -80,6 +80,11 @@
         "js-tokens": "^3.0.0"
       }
     },
+    "@babel/parser": {
+      "version": "7.20.15",
+      "resolved": "https://registry.npmmirror.com/@babel/parser/-/parser-7.20.15.tgz",
+      "integrity": "sha512-DI4a1oZuf8wC+oAJA9RW6ga3Zbe8RZFt7kD9i4qAspz3I/yHet1VvC3DiSy/fsUvv5pvJuNPh0LPOdCcqinDPg=="
+    },
     "@babel/runtime": {
       "version": "7.17.9",
       "resolved": "https://registry.npmmirror.com/@babel/runtime/-/runtime-7.17.9.tgz",
@@ -218,6 +223,33 @@
       "integrity": "sha512-42zEJkBpNfMEAvWR5WlwtTH22oDzcMjFsL9gDGExwF8X8WvAiw7Vwop7hPw03QT8TKfec83LwbHj6SvpqM4ELQ==",
       "dev": true
     },
+    "@vue/compiler-sfc": {
+      "version": "2.7.14",
+      "resolved": "https://registry.npmmirror.com/@vue/compiler-sfc/-/compiler-sfc-2.7.14.tgz",
+      "integrity": "sha512-aNmNHyLPsw+sVvlQFQ2/8sjNuLtK54TC6cuKnVzAY93ks4ZBrvwQSnkkIh7bsbNhum5hJBS00wSDipQ937f5DA==",
+      "requires": {
+        "@babel/parser": "^7.18.4",
+        "postcss": "^8.4.14",
+        "source-map": "^0.6.1"
+      },
+      "dependencies": {
+        "picocolors": {
+          "version": "1.0.0",
+          "resolved": "https://registry.npmmirror.com/picocolors/-/picocolors-1.0.0.tgz",
+          "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
+        },
+        "postcss": {
+          "version": "8.4.21",
+          "resolved": "https://registry.npmmirror.com/postcss/-/postcss-8.4.21.tgz",
+          "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==",
+          "requires": {
+            "nanoid": "^3.3.4",
+            "picocolors": "^1.0.0",
+            "source-map-js": "^1.0.2"
+          }
+        }
+      }
+    },
     "@vue/component-compiler-utils": {
       "version": "2.6.0",
       "resolved": "https://registry.npmmirror.com/@vue/component-compiler-utils/-/component-compiler-utils-2.6.0.tgz",
@@ -3434,6 +3466,11 @@
         }
       }
     },
+    "csstype": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmmirror.com/csstype/-/csstype-3.1.1.tgz",
+      "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="
+    },
     "cuint": {
       "version": "0.2.2",
       "resolved": "https://registry.npmmirror.com/cuint/-/cuint-0.2.2.tgz",
@@ -7364,6 +7401,11 @@
       "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ==",
       "dev": true
     },
+    "nanoid": {
+      "version": "3.3.4",
+      "resolved": "https://registry.npmmirror.com/nanoid/-/nanoid-3.3.4.tgz",
+      "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw=="
+    },
     "nanomatch": {
       "version": "1.2.13",
       "resolved": "https://registry.npmmirror.com/nanomatch/-/nanomatch-1.2.13.tgz",
@@ -10704,8 +10746,12 @@
     "source-map": {
       "version": "0.6.1",
       "resolved": "https://registry.npmmirror.com/source-map/-/source-map-0.6.1.tgz",
-      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
-      "dev": true
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+    },
+    "source-map-js": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmmirror.com/source-map-js/-/source-map-js-1.0.2.tgz",
+      "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="
     },
     "source-map-resolve": {
       "version": "0.5.3",
@@ -12265,6 +12311,25 @@
         "vue-style-loader": "^4.1.0"
       }
     },
+    "vue-print-nb": {
+      "version": "1.7.5",
+      "resolved": "https://registry.npmmirror.com/vue-print-nb/-/vue-print-nb-1.7.5.tgz",
+      "integrity": "sha512-iNbNyUVRWz0Ha1UTiCKxMPtHLUDGgNI8e8xmD3xqm9RlXIUeX9bT7DgNAfY8vPzqyFRHqGjxLI1rycKH366ziQ==",
+      "requires": {
+        "vue": "^2.6.11"
+      },
+      "dependencies": {
+        "vue": {
+          "version": "2.7.14",
+          "resolved": "https://registry.npmmirror.com/vue/-/vue-2.7.14.tgz",
+          "integrity": "sha512-b2qkFyOM0kwqWFuQmgd4o+uHGU7T+2z3T+WQp8UBjADfEv2n4FEMffzBmCKNP0IGzOEEfYjvtcC62xaSKeQDrQ==",
+          "requires": {
+            "@vue/compiler-sfc": "2.7.14",
+            "csstype": "^3.1.0"
+          }
+        }
+      }
+    },
     "vue-router": {
       "version": "3.0.1",
       "resolved": "https://registry.npmmirror.com/vue-router/-/vue-router-3.0.1.tgz",

+ 1 - 0
unimall-admin/package.json

@@ -39,6 +39,7 @@
     "vue": "2.5.17",
     "vue-count-to": "1.0.13",
     "vue-i18n": "7.3.2",
+    "vue-print-nb": "^1.7.5",
     "vue-router": "3.0.1",
     "vuex": "3.0.1",
     "xlsx": "^0.16.9"

+ 12 - 0
unimall-admin/src/api/unimall/management.js

@@ -36,6 +36,18 @@ export function addManagement(data) {
   })
 }
 
+// 充值会员
+export function chongzhi(data) {
+  return request({
+    method: 'post',
+    params: {
+      _gp: 'admin.unimall.memberManagement',
+      _mt: 'chongzhi',
+      memberManagement: data
+    }
+  })
+}
+
 // 修改会员管理
 export function updateManagement(data) {
   return request({

+ 73 - 0
unimall-admin/src/api/unimall/moneyHis.js

@@ -0,0 +1,73 @@
+import request from '@/utils/request'
+
+// 查询充值消费记录列表
+export function listMoneyHis(query) {
+  return request({
+    method: 'get',
+    params: {
+      _gp: 'admin.unimall.moneyHis',
+      _mt: 'list',
+      ...query
+    }
+  })
+}
+
+// 查询充值消费记录详细
+export function getMoneyHis(id) {
+  return request({
+    method: 'get',
+    params: {
+      _gp: 'admin.unimall.moneyHis',
+      _mt: 'get',
+      id: id
+    }
+  })
+}
+
+// 新增充值消费记录
+export function addMoneyHis(data) {
+  return request({
+    method: 'post',
+    params: {
+      _gp: 'admin.unimall.moneyHis',
+      _mt: 'add',
+      moneyHis: data
+    }
+  })
+}
+
+// 修改充值消费记录
+export function updateMoneyHis(data) {
+  return request({
+    method: 'post',
+    params: {
+      _gp: 'admin.unimall.moneyHis',
+      _mt: 'update',
+      moneyHis: data
+    }
+  })
+}
+
+// 删除充值消费记录
+export function delMoneyHis(id) {
+  return request({
+    method: 'post',
+    params: {
+      _gp: 'admin.unimall.moneyHis',
+      _mt: 'delete',
+      id: id
+    }
+  })
+}
+
+// 导出充值消费记录
+export function exportMoneyHis(query) {
+  return request({
+    method: 'get',
+    params: {
+      _gp: 'admin.unimall.moneyHis',
+      _mt: 'export',
+      ...query
+    }
+  })
+}

+ 2 - 0
unimall-admin/src/main.js

@@ -31,6 +31,8 @@ Vue.prototype.resetForm = resetForm
 Vue.prototype.addDateRange = addDateRange
 Vue.prototype.selectDictLabel = selectDictLabel
 Vue.prototype.download = download
+import Print from 'vue-print-nb'
+Vue.use(Print)
 
 Vue.prototype.msgSuccess = function(msg) {
   this.$message({ showClose: true, message: msg, type: 'success' })

+ 143 - 127
unimall-admin/src/router/route.json

@@ -1,51 +1,49 @@
 [
-	
-	{
-		"redirect": "noredirect",
-		"path": "/sys",
-		"children": [
-			{
-				"path": "admin",
-				"meta": {
-					"noCache": true,
-					"icon": "admin",
-					"perms": [
-						"admin:admin:list",
-						"admin:admin:create",
-						"admin:admin:update",
-						"admin:admin:delete"
-					],
-					"title": "管理员"
-				},
-				"name": "admin",
-				"page": "/sys/admin"
-			},{
-				"path": "role",
-				"meta": {
-					"noCache": true,
-					"icon": "role",
-					"perms": [
-						"admin:role:list",
-						"admin:role:create",
-						"admin:role:delete",
-						"admin:role:update",
-						"admin:role:permissionList",
-						"admin:permission:list"
-					],
-					"title": "角色管理"
-				},
-				"name": "role",
-				"page": "/sys/role"
-			}
-		],
-		"meta": {
-			"icon": "sys",
-			"title": "系统管理"
-		},
-		"name": "sysManage",
-		"alwaysShow": true
-	},
-	{
+
+    {
+        "redirect": "noredirect",
+        "path": "/sys",
+        "children": [{
+            "path": "admin",
+            "meta": {
+                "noCache": true,
+                "icon": "admin",
+                "perms": [
+                    "admin:admin:list",
+                    "admin:admin:create",
+                    "admin:admin:update",
+                    "admin:admin:delete"
+                ],
+                "title": "管理员"
+            },
+            "name": "admin",
+            "page": "/sys/admin"
+        }, {
+            "path": "role",
+            "meta": {
+                "noCache": true,
+                "icon": "role",
+                "perms": [
+                    "admin:role:list",
+                    "admin:role:create",
+                    "admin:role:delete",
+                    "admin:role:update",
+                    "admin:role:permissionList",
+                    "admin:permission:list"
+                ],
+                "title": "角色管理"
+            },
+            "name": "role",
+            "page": "/sys/role"
+        }],
+        "meta": {
+            "icon": "sys",
+            "title": "系统管理"
+        },
+        "name": "sysManage",
+        "alwaysShow": true
+    },
+    {
         "redirect": "noredirect",
         "name": "sysTools",
         "path": "/tools",
@@ -54,8 +52,7 @@
             "title": "系统工具"
         },
         "alwaysShow": true,
-        "children": [
-            {
+        "children": [{
                 "path": "api",
                 "name": "api",
                 "page": "/tools/api/api",
@@ -98,82 +95,101 @@
 
         ]
     },
-	{
-		"redirect": "noredirect",
-		"name": "memberInfo",
-		"path": "/memberInfo",
-		"meta": {
-			"icon": "log",
-			"title": "会员管理"
-		},
-		"alwaysShow": true,
-		"children": [
-			{
-				"path": "memberInfo",
-				"name": "memberInfo",
-				"page": "/memberInfo",
-				"meta": {
-					"title": "会员信息",
-					"icon": "memberInfo",
-					"noCache": true,
-					"perms": [
-						"memberInfo:list",
-						"memberInfo:create",
-						"memberInfo:delete",
-						"memberInfo:update"
-					]
-				}
-			}
-		]
-	},
-	{
-		"redirect": "noredirect",
-		"name": "sysLog",
-		"path": "/log",
-		"meta": {
-			"icon": "log",
-			"title": "日志管理"
-		},
-		"alwaysShow": true,
-		"children": [
-			{
-				"path": "logininfor",
-				"name": "logininfor",
-				"page": "/log/logininfor",
-				"meta": {
-					"title": "登陆日志",
-					"icon": "logininfor",
-					"noCache": true,
-					"perms": [
-						"log:logininfor:list",
-						"log:logininfor:create",
-						"log:logininfor:delete",
-						"log:logininfor:update"
-					]
-				}
-			}
-		]
-	},
-	{
-		"redirect": "noredirect",
-		"path": "/profile",
-		"hidden": true,
-		"children": [
-			{
-				"path": "password",
-				"meta": {
-					"noCache": true,
-					"title": "修改密码"
-				},
-				"name": "password",
-				"page": "/profile/password"
-			}
-		],
-		"alwaysShow": true
-	},
-	{
-		"redirect": "/404",
-		"path": "*",
-		"hidden": true
-	}
+    {
+        "redirect": "noredirect",
+        "name": "management",
+        "path": "/management",
+        "meta": {
+            "icon": "log",
+            "title": "会员管理"
+        },
+        "alwaysShow": true,
+        "children": [{
+                "path": "management",
+                "name": "management",
+                "page": "/management",
+                "meta": {
+                    "title": "会员列表",
+                    "icon": "memberInfo",
+                    "noCache": true
+                }
+            },
+            {
+                "path": "salesSlip",
+                "name": "salesSlip",
+                "page": "/salesSlip",
+                "meta": {
+                    "title": "销售单",
+                    "icon": "memberInfo",
+                    "noCache": true
+                }
+            },
+            {
+                "path": "serviceManger",
+                "name": "serviceManger",
+                "page": "/serviceManger",
+                "meta": {
+                    "title": "服务项目",
+                    "icon": "memberInfo",
+                    "noCache": true
+                }
+            },
+            {
+                "path": "moneyHis",
+                "name": "moneyHis",
+                "page": "/moneyHis",
+                "meta": {
+                    "title": "消费记录",
+                    "icon": "memberInfo",
+                    "noCache": true
+                }
+            }
+        ]
+    },
+    {
+        "redirect": "noredirect",
+        "name": "sysLog",
+        "path": "/log",
+        "meta": {
+            "icon": "log",
+            "title": "日志管理"
+        },
+        "alwaysShow": true,
+        "children": [{
+            "path": "logininfor",
+            "name": "logininfor",
+            "page": "/log/logininfor",
+            "meta": {
+                "title": "登陆日志",
+                "icon": "logininfor",
+                "noCache": true,
+                "perms": [
+                    "log:logininfor:list",
+                    "log:logininfor:create",
+                    "log:logininfor:delete",
+                    "log:logininfor:update"
+                ]
+            }
+        }]
+    },
+    {
+        "redirect": "noredirect",
+        "path": "/profile",
+        "hidden": true,
+        "children": [{
+            "path": "password",
+            "meta": {
+                "noCache": true,
+                "title": "修改密码"
+            },
+            "name": "password",
+            "page": "/profile/password"
+        }],
+        "alwaysShow": true
+    },
+    {
+        "redirect": "/404",
+        "path": "*",
+        "hidden": true
+    }
 ]

+ 261 - 148
unimall-admin/src/views/management/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
-      <el-form-item label="" prop="companyId">
+    <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
+      <!-- <el-form-item label="" prop="companyId">
         <el-input
           v-model="queryParams.companyId"
           placeholder="请输入"
@@ -9,7 +9,7 @@
           size="small"
           @keyup.enter.native="handleQuery"
         />
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="姓名" prop="userName">
         <el-input
           v-model="queryParams.userName"
@@ -28,7 +28,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="卡名称" prop="cartName">
+      <!-- <el-form-item label="卡名称" prop="cartName">
         <el-input
           v-model="queryParams.cartName"
           placeholder="请输入卡名称"
@@ -36,7 +36,7 @@
           size="small"
           @keyup.enter.native="handleQuery"
         />
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="卡号" prop="cartNo">
         <el-input
           v-model="queryParams.cartNo"
@@ -46,13 +46,15 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="卡到期时间" prop="cartEndTime">
-        <el-date-picker clearable size="small" style="width: 200px"
+      <!-- <el-form-item label="卡到期时间" prop="cartEndTime">
+        <el-date-picker
           v-model="queryParams.cartEndTime"
+          clearable
+          size="small"
+          style="width: 200px"
           type="date"
           value-format="yyyy-MM-dd"
-          placeholder="选择卡到期时间">
-        </el-date-picker>
+          placeholder="选择卡到期时间"/>
       </el-form-item>
       <el-form-item label="金额" prop="money">
         <el-input
@@ -64,12 +66,14 @@
         />
       </el-form-item>
       <el-form-item label="日期" prop="cartTime">
-        <el-date-picker clearable size="small" style="width: 200px"
+        <el-date-picker
           v-model="queryParams.cartTime"
+          clearable
+          size="small"
+          style="width: 200px"
           type="date"
           value-format="yyyy-MM-dd"
-          placeholder="选择日期">
-        </el-date-picker>
+          placeholder="选择日期"/>
       </el-form-item>
       <el-form-item label="累计充值" prop="leiChong">
         <el-input
@@ -89,7 +93,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-        <el-form-item label="状态" prop="status">
+      <el-form-item label="状态" prop="status">
         <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
           <el-option label="请选择字典生成" value="" />
         </el-select>
@@ -102,22 +106,26 @@
           size="small"
           @keyup.enter.native="handleQuery"
         />
-      </el-form-item>
-      <el-form-item label="" prop="gmtCreate">
-        <el-date-picker clearable size="small" style="width: 200px"
+      </el-form-item> -->
+      <!-- <el-form-item label="" prop="gmtCreate">
+        <el-date-picker
           v-model="queryParams.gmtCreate"
+          clearable
+          size="small"
+          style="width: 200px"
           type="date"
           value-format="yyyy-MM-dd"
-          placeholder="选择">
-        </el-date-picker>
+          placeholder="选择"/>
       </el-form-item>
       <el-form-item label="" prop="gmtUpdate">
-        <el-date-picker clearable size="small" style="width: 200px"
+        <el-date-picker
           v-model="queryParams.gmtUpdate"
+          clearable
+          size="small"
+          style="width: 200px"
           type="date"
           value-format="yyyy-MM-dd"
-          placeholder="选择">
-        </el-date-picker>
+          placeholder="选择"/>
       </el-form-item>
       <el-form-item label="" prop="userId">
         <el-input
@@ -136,7 +144,7 @@
           size="small"
           @keyup.enter.native="handleQuery"
         />
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -146,48 +154,48 @@
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
+          v-permission="['unimall:management:add']"
           type="primary"
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-permission="['unimall:management:add']"
         >新增</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
+          v-permission="['unimall:management:edit']"
+          :disabled="single"
           type="success"
           icon="el-icon-edit"
           size="mini"
-          :disabled="single"
           @click="handleUpdate"
-          v-permission="['unimall:management:edit']"
         >修改</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
+          v-permission="['unimall:management:remove']"
+          :disabled="multiple"
           type="danger"
           icon="el-icon-delete"
           size="mini"
-          :disabled="multiple"
           @click="handleDelete"
-          v-permission="['unimall:management:remove']"
         >删除</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
+          v-permission="['unimall:management:export']"
           type="warning"
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-          v-permission="['unimall:management:export']"
         >导出</el-button>
       </el-col>
     </el-row>
 
     <el-table v-loading="loading" :data="managementList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="" align="center" prop="id" />
-      <el-table-column label="" align="center" prop="companyId" />
+      <!-- <el-table-column label="" align="center" prop="id" />
+      <el-table-column label="" align="center" prop="companyId" /> -->
       <el-table-column label="姓名" align="center" prop="userName" />
       <el-table-column label="手机号" align="center" prop="phone" />
       <el-table-column label="卡名称" align="center" prop="cartName" />
@@ -197,51 +205,67 @@
           <span>{{ parseTime(scope.row.cartEndTime) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="金额" align="center" prop="money" />
-      <el-table-column label="日期" align="center" prop="cartTime" width="180">
+      <!-- <el-table-column label="金额" align="center" prop="money" /> -->
+      <el-table-column label="余额" align="center" prop="money" />
+      <!-- <el-table-column label="日期" align="center" prop="cartTime" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.cartTime) }}</span>
         </template>
-      </el-table-column>
+      </el-table-column> -->
       <el-table-column label="累计充值" align="center" prop="leiChong" />
       <el-table-column label="累计消费" align="center" prop="leiXiao" />
       <el-table-column label="状态" align="center" prop="status" />
-      <el-table-column label="备注1" align="center" prop="remark1" />
-      <el-table-column label="备注2" align="center" prop="remark2" />
-      <el-table-column label="备注3" align="center" prop="remark3" />
-      <el-table-column label="0:否" align="center" prop="deleteFlag" />
-      <el-table-column label="" align="center" prop="gmtCreate" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.gmtCreate) }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="" align="center" prop="gmtUpdate" width="180">
+      <!--  <el-table-column label="备注2" align="center" prop="remark2" />
+      <el-table-column label="备注3" align="center" prop="remark3" /> -->
+      <!-- <el-table-column label="0:否" align="center" prop="deleteFlag" /> -->
+      <!-- <el-table-column label="" align="center" prop="gmtCreate" width="180"> -->
+      <!-- <template slot-scope="scope">
+        <span>{{ parseTime(scope.row.gmtCreate) }}</span>
+      </template>
+      </el-table-column> -->
+      <!-- <el-table-column label="" align="center" prop="gmtUpdate" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.gmtUpdate) }}</span>
         </template>
-      </el-table-column>
-      <el-table-column label="" align="center" prop="userId" />
-      <el-table-column label="" align="center" prop="adminId" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      </el-table-column> -->
+      <!-- <el-table-column label="" align="center" prop="userId" />
+      <el-table-column label="" align="center" prop="adminId" /> -->
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="400px">
         <template slot-scope="scope">
           <el-button
             size="mini"
             type="text"
             icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-permission="['unimall:management:edit']"
+            @click="handleUpdate(scope.row,1)"
           >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row,2)"
+          >充值</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate1(scope.row)"
+          >账单</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete1(scope.row)"
+          >注销</el-button>
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-permission="['unimall:management:remove']"
           >删除</el-button>
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
       v-show="total>0"
       :total="total"
@@ -249,56 +273,72 @@
       :limit.sync="queryParams.pageSize"
       @pagination="getList"
     />
-
+    <el-dialog :visible.sync="open1" title="账单" width="500px">
+      <div v-for="(item,index) in billList" :key="index">
+        <div class="row" style="margin-bottom: 10px;">
+          <span>{{ item.gmtCreate }}</span>
+          <span>{{ item.serviceObject==1?"充值":"消费" }}</span>
+          <span>{{ item.money }}</span>
+        </div>
+      </div>
+    </el-dialog>
     <!-- 添加或修改会员管理对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px">
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="" prop="companyId">
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+        <!-- <el-form-item label="" prop="companyId">
           <el-input v-model="form.companyId" placeholder="请输入" />
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="姓名" prop="userName">
-          <el-input v-model="form.userName" placeholder="请输入姓名" />
+          <el-input v-model="form.userName" :disabled="isCZ" placeholder="请输入姓名"/>
         </el-form-item>
         <el-form-item label="手机号" prop="phone">
-          <el-input v-model="form.phone" placeholder="请输入手机号" />
+          <el-input v-model="form.phone" :disabled="isCZ" placeholder="请输入手机号"/>
         </el-form-item>
         <el-form-item label="卡名称" prop="cartName">
-          <el-input v-model="form.cartName" placeholder="请输入卡名称" />
+          <el-input v-model="form.cartName" :disabled="isCZ" placeholder="请输入卡名称"/>
         </el-form-item>
         <el-form-item label="卡号" prop="cartNo">
-          <el-input v-model="form.cartNo" placeholder="请输入卡号" />
+          <el-input v-model="form.cartNo" :disabled="isCZ" placeholder="请输入卡号"/>
+        </el-form-item>
+        <el-form-item v-if="isCZ" label="余额" prop="money">
+          <el-input v-model="form.money" placeholder="请输入金额" />
         </el-form-item>
         <el-form-item label="卡到期时间" prop="cartEndTime">
-          <el-date-picker clearable size="small" style="width: 200px"
+          <el-date-picker
             v-model="form.cartEndTime"
+            :disabled="isCZ"
+            clearable
+            size="small"
+            style="width: 100%"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择卡到期时间">
-          </el-date-picker>
+            placeholder="选择卡到期时间"/>
         </el-form-item>
-        <el-form-item label="金额" prop="money">
+        <!-- <el-form-item label="金额" prop="money">
           <el-input v-model="form.money" placeholder="请输入金额" />
-        </el-form-item>
-        <el-form-item label="日期" prop="cartTime">
-          <el-date-picker clearable size="small" style="width: 200px"
+        </el-form-item> -->
+        <!-- <el-form-item label="日期" prop="cartTime">
+          <el-date-picker
             v-model="form.cartTime"
+            clearable
+            size="small"
+            style="width: 200px"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择日期">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="累计充值" prop="leiChong">
+            placeholder="选择日期"/>
+        </el-form-item> -->
+        <!-- <el-form-item label="累计充值" prop="leiChong">
           <el-input v-model="form.leiChong" placeholder="请输入累计充值" />
         </el-form-item>
         <el-form-item label="累计消费" prop="leiXiao">
           <el-input v-model="form.leiXiao" placeholder="请输入累计消费" />
-        </el-form-item>
-        <el-form-item label="状态">
+        </el-form-item> -->
+        <!-- <el-form-item label="状态">
           <el-radio-group v-model="form.status">
             <el-radio label="1">请选择字典生成</el-radio>
           </el-radio-group>
-        </el-form-item>
-        <el-form-item label="备注1" prop="remark1">
+        </el-form-item> -->
+        <!-- <el-form-item label="备注1" prop="remark1">
           <el-input v-model="form.remark1" type="textarea" placeholder="请输入内容" />
         </el-form-item>
         <el-form-item label="备注2" prop="remark2">
@@ -309,30 +349,34 @@
         </el-form-item>
         <el-form-item label="0:否" prop="deleteFlag">
           <el-input v-model="form.deleteFlag" placeholder="请输入0:否" />
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="" prop="gmtCreate">
-          <el-date-picker clearable size="small" style="width: 200px"
+        <!-- <el-date-picker
             v-model="form.gmtCreate"
+            clearable
+            size="small"
+            style="width: 200px"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择">
-          </el-date-picker>
+            placeholder="选择"/>
         </el-form-item>
         <el-form-item label="" prop="gmtUpdate">
-          <el-date-picker clearable size="small" style="width: 200px"
+          <el-date-picker
             v-model="form.gmtUpdate"
+            clearable
+            size="small"
+            style="width: 200px"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择">
-          </el-date-picker>
+            placeholder="选择"/>
         </el-form-item>
         <el-form-item label="" prop="userId">
           <el-input v-model="form.userId" placeholder="请输入" />
         </el-form-item>
         <el-form-item label="" prop="adminId">
           <el-input v-model="form.adminId" placeholder="请输入" />
-        </el-form-item>
-      </el-form>
+        </el-form-item> -->
+      </el-form-item></el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
         <el-button @click="cancel">取 消</el-button>
@@ -342,11 +386,13 @@
 </template>
 
 <script>
-import { listManagement, getManagement, delManagement, addManagement, updateManagement, exportManagement } from "@/api/unimall/management";
-
+import { listManagement, getManagement, delManagement, addManagement, updateManagement, exportManagement, chongzhi } from '@/api/unimall/management'
+import { listMoneyHis, getMoneyHis, delMoneyHis, addMoneyHis, updateMoneyHis, exportMoneyHis } from '@/api/unimall/moneyHis'
 export default {
   data() {
     return {
+      billList: [],
+      isCZ: false,
       // 遮罩层
       loading: true,
       // 选中数组
@@ -360,9 +406,10 @@ export default {
       // 会员管理表格数据
       managementList: [],
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
+      open1: false,
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -392,27 +439,27 @@ export default {
       // 表单校验
       rules: {
         deleteFlag: [
-          { required: true, message: "0:否(默认) 1:是不能为空", trigger: "blur" }
-        ],      }
-    };
+          { required: true, message: '0:否(默认) 1:是不能为空', trigger: 'blur' }
+        ] }
+    }
   },
   created() {
-    this.getList();
+    this.getList()
   },
   methods: {
     /** 查询会员管理列表 */
     getList() {
-      this.loading = true;
+      this.loading = true
       listManagement(this.queryParams).then(response => {
         this.managementList = response.data.data.items
         this.total = response.data.data.count
-        this.loading = false;
-      });
+        this.loading = false
+      })
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.reset();
+      this.open = false
+      this.reset()
     },
     // 表单重置
     reset() {
@@ -428,7 +475,7 @@ export default {
         cartTime: undefined,
         leiChong: undefined,
         leiXiao: undefined,
-        status: "0",
+        status: '0',
         remark1: undefined,
         remark2: undefined,
         remark3: undefined,
@@ -437,18 +484,18 @@ export default {
         gmtUpdate: undefined,
         userId: undefined,
         adminId: undefined
-      };
-      this.resetForm("form");
+      }
+      this.resetForm('form')
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
+      this.queryParams.pageNum = 1
+      this.getList()
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
@@ -458,75 +505,141 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加会员管理";
+      this.reset()
+      this.open = true
+      this.title = '添加会员管理'
+    },
+    // 查账单
+    handleUpdate1(row, type) {
+      const id = row.id || this.ids.join(',')
+      listMoneyHis({
+        xiaofeiId: id
+      }).then(response => { debugger
+        this.form = response.data.data
+        this.open1 = true
+        this.billList = response.data.data.items
+        for (let i = 0; i<this.billList.length; i++) {
+          this.billList[i].gmtCreate = this.parseTime(this.billList[i].gmtCreate, '{y}-{m}-{d} {h}:{i}:{s}')
+        }
+      })
     },
     /** 修改按钮操作 */
-    handleUpdate(row) {
-      this.reset();
+    handleUpdate(row, type) {
+      // 1修改2充值
+      this.reset()
       const id = row.id || this.ids.join(',')
       getManagement(id).then(response => {
         this.form = response.data.data
-        this.open = true;
-        this.title = "修改会员管理";
-      });
+        this.open = true
+        this.form.cartEndTime = this.parseTime(this.form.cartEndTime, '{y}-{m}-{d}')
+      })
+      if (type==2) {
+        this.isCZ = true
+        this.title = '充值'
+      } else {
+        this.isCZ = false
+        this.title = '修改会员管理'
+      }
     },
     /** 提交按钮 */
     submitForm: function() {
-      this.$refs["form"].validate(valid => {
+      this.$refs['form'].validate(valid => {
         if (valid) {
           if (this.form.id != undefined) {
-            updateManagement(this.form).then(response => {
-              if (response.data) {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
-              } else {
-                this.msgError(response.msg);
-              }
-            });
+            if (this.isCZ) {
+              chongzhi({
+                id: this.form.id,
+                money: this.form.money
+              }).then(response => {
+                if (response.data) {
+                  this.msgSuccess('充值成功')
+                  addMoneyHis({
+                    xiaofeiId: this.form.id,
+                    serviceObject: 1,
+                    money: this.form.money,
+                    remark1: this.form.userName,
+                    remark2: this.form.phone
+
+                  }).then(response => {
+                    if (response.data) {
+                      this.msgSuccess('充值记录添加成功')
+                      this.open = false
+                      this.getList()
+                    } else {
+                      this.msgError(response.msg)
+                    }
+                  })
+                } else {
+                  this.msgError(response.msg)
+                }
+              })
+            } else {
+              updateManagement(this.form).then(response => {
+                if (response.data) {
+                  this.msgSuccess('修改成功')
+                  this.open = false
+                  this.getList()
+                } else {
+                  this.msgError(response.msg)
+                }
+              })
+            }
           } else {
+            this.form.remark1 = this.form.money
+            this.form.status = '正常'
             addManagement(this.form).then(response => {
               if (response.data) {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
+                this.msgSuccess('新增成功')
+                this.open = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           }
         }
-      });
+      })
     },
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids.join(',')
-      this.$confirm('是否确认删除会员管理编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delManagement(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(function() {});
+      this.$confirm('是否确认删除会员管理编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delManagement(ids)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(function() {})
+    },
+    handleDelete1(row) {
+      const ids = row.id || this.ids.join(',')
+      this.$confirm('是否确认注销会员管理编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return updateManagement({ id: ids, status: '已注销' })
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('注销成功')
+      }).catch(function() {})
     },
     /** 导出按钮操作 */
     handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有会员管理数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportManagement(queryParams);
-        }).then(response => {
-          this.download(response.data.data);
-        }).catch(function() {});
+      const queryParams = this.queryParams
+      this.$confirm('是否确认导出所有会员管理数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return exportManagement(queryParams)
+      }).then(response => {
+        this.download(response.data.data)
+      }).catch(function() {})
     }
   }
-};
-</script>
+}
+</script>

+ 423 - 0
unimall-admin/src/views/managementToday/index.vue

@@ -0,0 +1,423 @@
+<template>
+  <div class="app-container">
+    <!-- <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          v-permission="['unimall:management:add']"
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+        >新增</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          v-permission="['unimall:management:edit']"
+          :disabled="single"
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          @click="handleUpdate"
+        >修改</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          v-permission="['unimall:management:remove']"
+          :disabled="multiple"
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          @click="handleDelete"
+        >删除</el-button>
+      </el-col>
+      <el-col :span="1.5">
+        <el-button
+          v-permission="['unimall:management:export']"
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+        >导出</el-button>
+      </el-col>
+    </el-row> -->
+
+    <el-table v-loading="loading" :data="managementList" :summary-method="getSummaries" show-summary @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="100" align="center" />
+      <!-- <el-table-column label="" align="center" prop="id" />
+      <el-table-column label="" align="center" prop="companyId" /> -->
+      <el-table-column label="姓名" align="center" prop="userName" />
+      <el-table-column label="手机号" align="center" prop="phone" />
+      <el-table-column label="卡名称" align="center" prop="cartName" />
+      <el-table-column label="卡号" align="center" prop="cartNo" />
+      <el-table-column label="卡到期时间" align="center" prop="cartEndTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.cartEndTime) }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="金额" align="center" prop="money" />
+      <!-- <el-table-column label="余额" align="center" prop="remark1" /> -->
+      <!-- <el-table-column label="日期" align="center" prop="cartTime" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.cartTime) }}</span>
+        </template>
+      </el-table-column> -->
+      <el-table-column label="累计充值" align="center" prop="leiChong" />
+      <!-- <el-table-column label="累计消费" align="center" prop="leiXiao" /> -->
+      <el-table-column label="状态" align="center" prop="status" />
+      <!-- <el-table-column label="备注1" align="center" prop="remark1" />
+      <el-table-column label="备注2" align="center" prop="remark2" />
+      <el-table-column label="备注3" align="center" prop="remark3" /> -->
+      <!-- <el-table-column label="0:否" align="center" prop="deleteFlag" /> -->
+      <!-- <el-table-column label="" align="center" prop="gmtCreate" width="180"> -->
+      <!-- <template slot-scope="scope">
+        <span>{{ parseTime(scope.row.gmtCreate) }}</span>
+      </template>
+      </el-table-column> -->
+      <!-- <el-table-column label="" align="center" prop="gmtUpdate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.gmtUpdate) }}</span>
+        </template>
+      </el-table-column> -->
+      <!-- <el-table-column label="" align="center" prop="userId" />
+      <el-table-column label="" align="center" prop="adminId" /> -->
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="200px">
+        <template slot-scope="scope">
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+          >修改</el-button>
+          <el-button
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改会员管理对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="100px">
+        <!-- <el-form-item label="" prop="companyId">
+          <el-input v-model="form.companyId" placeholder="请输入" />
+        </el-form-item> -->
+        <el-form-item label="姓名" prop="userName">
+          <el-input v-model="form.userName" placeholder="请输入姓名" />
+        </el-form-item>
+        <el-form-item label="手机号" prop="phone">
+          <el-input v-model="form.phone" placeholder="请输入手机号" />
+        </el-form-item>
+        <el-form-item label="卡名称" prop="cartName">
+          <el-input v-model="form.cartName" placeholder="请输入卡名称" />
+        </el-form-item>
+        <el-form-item label="卡号" prop="cartNo">
+          <el-input v-model="form.cartNo" placeholder="请输入卡号" />
+        </el-form-item>
+        <el-form-item label="卡到期时间" prop="cartEndTime">
+          <el-date-picker
+            v-model="form.cartEndTime"
+            clearable
+            size="small"
+            style="width: 100%"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择卡到期时间"/>
+        </el-form-item>
+        <el-form-item label="金额" prop="money">
+          <el-input v-model="form.money" placeholder="请输入金额" />
+        </el-form-item>
+        <!-- <el-form-item label="日期" prop="cartTime">
+          <el-date-picker
+            v-model="form.cartTime"
+            clearable
+            size="small"
+            style="width: 200px"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择日期"/>
+        </el-form-item> -->
+        <!-- <el-form-item label="累计充值" prop="leiChong">
+          <el-input v-model="form.leiChong" placeholder="请输入累计充值" />
+        </el-form-item>
+        <el-form-item label="累计消费" prop="leiXiao">
+          <el-input v-model="form.leiXiao" placeholder="请输入累计消费" />
+        </el-form-item> -->
+        <!-- <el-form-item label="状态">
+          <el-radio-group v-model="form.status">
+            <el-radio label="1">请选择字典生成</el-radio>
+          </el-radio-group>
+        </el-form-item> -->
+        <!-- <el-form-item label="备注1" prop="remark1">
+          <el-input v-model="form.remark1" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="备注2" prop="remark2">
+          <el-input v-model="form.remark2" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="备注3" prop="remark3">
+          <el-input v-model="form.remark3" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="0:否" prop="deleteFlag">
+          <el-input v-model="form.deleteFlag" placeholder="请输入0:否" />
+        </el-form-item> -->
+        <el-form-item label="" prop="gmtCreate">
+        <!-- <el-date-picker
+            v-model="form.gmtCreate"
+            clearable
+            size="small"
+            style="width: 200px"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择"/>
+        </el-form-item>
+        <el-form-item label="" prop="gmtUpdate">
+          <el-date-picker
+            v-model="form.gmtUpdate"
+            clearable
+            size="small"
+            style="width: 200px"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择"/>
+        </el-form-item>
+        <el-form-item label="" prop="userId">
+          <el-input v-model="form.userId" placeholder="请输入" />
+        </el-form-item>
+        <el-form-item label="" prop="adminId">
+          <el-input v-model="form.adminId" placeholder="请输入" />
+        </el-form-item> -->
+      </el-form-item></el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listManagement, getManagement, delManagement, addManagement, updateManagement, exportManagement } from '@/api/unimall/management'
+
+export default {
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 总条数
+      total: 0,
+      // 会员管理表格数据
+      managementList: [],
+      // 弹出层标题
+      title: '',
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        companyId: undefined,
+        userName: undefined,
+        phone: undefined,
+        cartName: undefined,
+        cartNo: undefined,
+        cartEndTime: undefined,
+        money: undefined,
+        cartTime: undefined,
+        leiChong: undefined,
+        leiXiao: undefined,
+        status: undefined,
+        remark1: undefined,
+        remark2: undefined,
+        remark3: undefined,
+        deleteFlag: undefined,
+        gmtCreate: undefined,
+        gmtUpdate: undefined,
+        userId: undefined,
+        adminId: undefined
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        deleteFlag: [
+          { required: true, message: '0:否(默认) 1:是不能为空', trigger: 'blur' }
+        ] }
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    getSummaries(param) {
+      const { columns, data } = param
+      const sums = []
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '总价'
+          return
+        } else if (index==6) {
+          const values = data.map(item => Number(item[column.property]))
+          if (!values.every(value => isNaN(value))) {
+            sums[index] = values.reduce((prev, curr) => {
+              const value = Number(curr)
+              if (!isNaN(value)) {
+                return prev + curr
+              } else {
+                return prev
+              }
+            }, 0)
+            sums[index] += ' 元'
+          } else {
+            sums[index] = 'N/A'
+          }
+        }
+      })
+
+      return sums
+    },
+    /** 查询会员管理列表 */
+    getList() {
+      this.loading = true
+      listManagement(this.queryParams).then(response => {
+        this.managementList = response.data.data.items
+        this.total = response.data.data.count
+        this.loading = false
+      })
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false
+      this.reset()
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: undefined,
+        companyId: undefined,
+        userName: undefined,
+        phone: undefined,
+        cartName: undefined,
+        cartNo: undefined,
+        cartEndTime: undefined,
+        money: undefined,
+        cartTime: undefined,
+        leiChong: undefined,
+        leiXiao: undefined,
+        status: '0',
+        remark1: undefined,
+        remark2: undefined,
+        remark3: undefined,
+        deleteFlag: undefined,
+        gmtCreate: undefined,
+        gmtUpdate: undefined,
+        userId: undefined,
+        adminId: undefined
+      }
+      this.resetForm('form')
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1
+      this.getList()
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm('queryForm')
+      this.handleQuery()
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!=1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset()
+      this.open = true
+      this.title = '添加会员管理'
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset()
+      const id = row.id || this.ids.join(',')
+      getManagement(id).then(response => {
+        this.form = response.data.data
+        this.open = true
+        this.title = '修改会员管理'
+      })
+    },
+    /** 提交按钮 */
+    submitForm: function() {
+      this.$refs['form'].validate(valid => {
+        if (valid) {
+          if (this.form.id != undefined) {
+            updateManagement(this.form).then(response => {
+              if (response.data) {
+                this.msgSuccess('修改成功')
+                this.open = false
+                this.getList()
+              } else {
+                this.msgError(response.msg)
+              }
+            })
+          } else {
+            addManagement(this.form).then(response => {
+              if (response.data) {
+                this.msgSuccess('新增成功')
+                this.open = false
+                this.getList()
+              } else {
+                this.msgError(response.msg)
+              }
+            })
+          }
+        }
+      })
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids.join(',')
+      this.$confirm('是否确认删除会员管理编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delManagement(ids)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(function() {})
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams
+      this.$confirm('是否确认导出所有会员管理数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return exportManagement(queryParams)
+      }).then(response => {
+        this.download(response.data.data)
+      }).catch(function() {})
+    }
+  }
+}
+</script>

+ 443 - 0
unimall-admin/src/views/moneyHis/index.vue

@@ -0,0 +1,443 @@
+<template>
+  <div class="app-container">
+    <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
+      <!-- <el-form-item label="" prop="xiaofeiId">
+        <el-input
+          v-model="queryParams.xiaofeiId"
+          placeholder="请输入"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="" prop="companyId">
+        <el-input
+          v-model="queryParams.companyId"
+          placeholder="请输入"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item> -->
+      <el-form-item label="充值1消费2" prop="serviceObject" label-width="100px">
+        <el-input
+          v-model="queryParams.serviceObject"
+          placeholder="请输入充值1消费2"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <!-- <el-form-item label="金额" prop="money">
+        <el-input
+          v-model="queryParams.money"
+          placeholder="请输入金额"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item> -->
+      <!-- <el-form-item label="状态" prop="status">
+        <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
+          <el-option label="请选择字典生成" value="" />
+        </el-select>
+      </el-form-item> -->
+      <!-- <el-form-item label="0:否" prop="deleteFlag">
+        <el-input
+          v-model="queryParams.deleteFlag"
+          placeholder="请输入0:否"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item> -->
+      <el-form-item label="" prop="gmtCreate">
+        <el-date-picker
+          v-model="queryParams.gmtCreate"
+          clearable
+          size="small"
+          style="width: 200px"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择时间"/>
+      </el-form-item>
+      <!-- <el-form-item label="" prop="gmtUpdate">
+        <el-date-picker
+          v-model="queryParams.gmtUpdate"
+          clearable
+          size="small"
+          style="width: 200px"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择"/>
+      </el-form-item>
+      <el-form-item label="" prop="userId">
+        <el-input
+          v-model="queryParams.userId"
+          placeholder="请输入"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="" prop="adminId">
+        <el-input
+          v-model="queryParams.adminId"
+          placeholder="请输入"
+          clearable
+          size="small"
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item> -->
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <!-- <el-col :span="1.5">
+        <el-button
+          v-permission="['unimall:moneyHis:add']"
+          type="primary"
+          icon="el-icon-plus"
+          size="mini"
+          @click="handleAdd"
+        >新增</el-button>
+      </el-col> -->
+      <!-- <el-col :span="1.5">
+        <el-button
+          v-permission="['unimall:moneyHis:edit']"
+          :disabled="single"
+          type="success"
+          icon="el-icon-edit"
+          size="mini"
+          @click="handleUpdate"
+        >修改</el-button>
+      </el-col> -->
+      <el-col :span="1.5">
+        <el-button
+          v-permission="['unimall:moneyHis:remove']"
+          :disabled="multiple"
+          type="danger"
+          icon="el-icon-delete"
+          size="mini"
+          @click="handleDelete"
+        >删除</el-button>
+      </el-col>
+      <!-- <el-col :span="1.5">
+        <el-button
+          v-permission="['unimall:moneyHis:export']"
+          type="warning"
+          icon="el-icon-download"
+          size="mini"
+          @click="handleExport"
+        >导出</el-button>
+      </el-col> -->
+    </el-row>
+
+    <el-table v-loading="loading" :data="moneyHisList" @selection-change="handleSelectionChange">
+      <el-table-column type="selection" width="55" align="center" />
+      <!-- <el-table-column label="" align="center" prop="id" />
+      <el-table-column label="" align="center" prop="xiaofeiId" />
+      <el-table-column label="" align="center" prop="companyId" /> -->
+      <el-table-column label="姓名" align="center" prop="remark1" />
+      <el-table-column label="电话" align="center" prop="remark2" />
+      <!-- <el-table-column label="消费" align="center" prop="serviceObject" /> -->
+      <el-table-column label="消费" align="center" prop="gmtCreate" width="180">
+        <template slot-scope="scope">
+          <span>{{ scope.row.serviceObject==1?'充值':"消费" }}</span>
+        </template>
+      </el-table-column>
+      <el-table-column label="金额" align="center" prop="money" />
+      <!-- <el-table-column label="状态" align="center" prop="status" />
+      <el-table-column label="备注1" align="center" prop="remark1" />
+      <el-table-column label="备注2" align="center" prop="remark2" />
+      <el-table-column label="备注3" align="center" prop="remark3" />
+      <el-table-column label="0:否" align="center" prop="deleteFlag" /> -->
+      <el-table-column label="时间" align="center" prop="gmtCreate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.gmtCreate) }}</span>
+        </template>
+      </el-table-column>
+      <!-- <el-table-column label="" align="center" prop="gmtUpdate" width="180">
+        <template slot-scope="scope">
+          <span>{{ parseTime(scope.row.gmtUpdate) }}</span>
+        </template>
+      </el-table-column> -->
+      <!-- <el-table-column label="" align="center" prop="userId" />
+      <el-table-column label="" align="center" prop="adminId" /> -->
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            v-permission="['unimall:moneyHis:edit']"
+            size="mini"
+            type="text"
+            icon="el-icon-edit"
+            @click="handleUpdate(scope.row)"
+          >修改</el-button>
+          <el-button
+            v-permission="['unimall:moneyHis:remove']"
+            size="mini"
+            type="text"
+            icon="el-icon-delete"
+            @click="handleDelete(scope.row)"
+          >删除</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <!-- 添加或修改充值消费记录对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="500px">
+      <el-form ref="form" :model="form" :rules="rules" label-width="80px">
+        <!-- <el-form-item label="" prop="xiaofeiId">
+          <el-input v-model="form.xiaofeiId" placeholder="请输入" />
+        </el-form-item> -->
+        <el-form-item label="" prop="companyId">
+          <el-input v-model="form.companyId" placeholder="请输入" />
+        </el-form-item>
+        <el-form-item label="充值1消费2" prop="serviceObject">
+          <el-input v-model="form.serviceObject" placeholder="请输入充值1消费2" />
+        </el-form-item>
+        <el-form-item label="金额" prop="money">
+          <el-input v-model="form.money" placeholder="请输入金额" />
+        </el-form-item>
+        <el-form-item label="状态">
+          <el-radio-group v-model="form.status">
+            <el-radio label="1">请选择字典生成</el-radio>
+          </el-radio-group>
+        </el-form-item>
+        <el-form-item label="备注1" prop="remark1">
+          <el-input v-model="form.remark1" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="备注2" prop="remark2">
+          <el-input v-model="form.remark2" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <el-form-item label="备注3" prop="remark3">
+          <el-input v-model="form.remark3" type="textarea" placeholder="请输入内容" />
+        </el-form-item>
+        <!-- <el-form-item label="0:否" prop="deleteFlag">
+          <el-input v-model="form.deleteFlag" placeholder="请输入0:否" />
+        </el-form-item> -->
+        <el-form-item label="" prop="gmtCreate">
+          <el-date-picker
+            v-model="form.gmtCreate"
+            clearable
+            size="small"
+            style="width: 200px"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择"/>
+        </el-form-item>
+        <el-form-item label="" prop="gmtUpdate">
+          <el-date-picker
+            v-model="form.gmtUpdate"
+            clearable
+            size="small"
+            style="width: 200px"
+            type="date"
+            value-format="yyyy-MM-dd"
+            placeholder="选择"/>
+        </el-form-item>
+        <el-form-item label="" prop="userId">
+          <el-input v-model="form.userId" placeholder="请输入" />
+        </el-form-item>
+        <el-form-item label="" prop="adminId">
+          <el-input v-model="form.adminId" placeholder="请输入" />
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { listMoneyHis, getMoneyHis, delMoneyHis, addMoneyHis, updateMoneyHis, exportMoneyHis } from '@/api/unimall/moneyHis'
+
+export default {
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 总条数
+      total: 0,
+      // 充值消费记录表格数据
+      moneyHisList: [],
+      // 弹出层标题
+      title: '',
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        xiaofeiId: undefined,
+        companyId: undefined,
+        serviceObject: undefined,
+        money: undefined,
+        status: undefined,
+        remark1: undefined,
+        remark2: undefined,
+        remark3: undefined,
+        deleteFlag: undefined,
+        gmtCreate: undefined,
+        gmtUpdate: undefined,
+        userId: undefined,
+        adminId: undefined
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        xiaofeiId: [
+          { required: true, message: '不能为空', trigger: 'blur' }
+        ], deleteFlag: [
+          { required: true, message: '0:否(默认) 1:是不能为空', trigger: 'blur' }
+        ] }
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    /** 查询充值消费记录列表 */
+    getList() {
+      this.loading = true
+      listMoneyHis(this.queryParams).then(response => {
+        this.moneyHisList = response.data.data.items
+        this.total = response.data.data.count
+        this.loading = false
+      })
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false
+      this.reset()
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: undefined,
+        xiaofeiId: undefined,
+        companyId: undefined,
+        serviceObject: undefined,
+        money: undefined,
+        status: '0',
+        remark1: undefined,
+        remark2: undefined,
+        remark3: undefined,
+        deleteFlag: undefined,
+        gmtCreate: undefined,
+        gmtUpdate: undefined,
+        userId: undefined,
+        adminId: undefined
+      }
+      this.resetForm('form')
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1
+      this.getList()
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm('queryForm')
+      this.handleQuery()
+    },
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map(item => item.id)
+      this.single = selection.length!=1
+      this.multiple = !selection.length
+    },
+    /** 新增按钮操作 */
+    handleAdd() {
+      this.reset()
+      this.open = true
+      this.title = '添加充值消费记录'
+    },
+    /** 修改按钮操作 */
+    handleUpdate(row) {
+      this.reset()
+      const id = row.id || this.ids.join(',')
+      getMoneyHis(id).then(response => {
+        this.form = response.data.data
+        this.open = true
+        this.title = '修改充值消费记录'
+      })
+    },
+    /** 提交按钮 */
+    submitForm: function() {
+      this.$refs['form'].validate(valid => {
+        if (valid) {
+          if (this.form.id != undefined) {
+            updateMoneyHis(this.form).then(response => {
+              if (response.data) {
+                this.msgSuccess('修改成功')
+                this.open = false
+                this.getList()
+              } else {
+                this.msgError(response.msg)
+              }
+            })
+          } else {
+            addMoneyHis(this.form).then(response => {
+              if (response.data) {
+                this.msgSuccess('新增成功')
+                this.open = false
+                this.getList()
+              } else {
+                this.msgError(response.msg)
+              }
+            })
+          }
+        }
+      })
+    },
+    /** 删除按钮操作 */
+    handleDelete(row) {
+      const ids = row.id || this.ids.join(',')
+      this.$confirm('是否确认删除充值消费记录编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delMoneyHis(ids)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(function() {})
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      const queryParams = this.queryParams
+      this.$confirm('是否确认导出所有充值消费记录数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return exportMoneyHis(queryParams)
+      }).then(response => {
+        this.download(response.data.data)
+      }).catch(function() {})
+    }
+  }
+}
+</script>

+ 361 - 153
unimall-admin/src/views/salesSlip/index.vue

@@ -1,16 +1,42 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
-      <el-form-item label="" prop="companyId">
-        <el-input
-          v-model="queryParams.companyId"
-          placeholder="请输入"
-          clearable
-          size="small"
-          @keyup.enter.native="handleQuery"
-        />
+    <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
+      <el-form-item>
+        <div style="display:flex">
+          <el-input
+            v-model="phone"
+            placeholder="
+            请输入手机号"
+            clearable
+            size="small"
+            style="margin-right: 20px;width: 200px;"
+            @keyup.enter.native="handleQuery" />
+          <el-button type="primary" icon="el-icon-search" size="mini" @click="getMember">提取会员</el-button>
+        </div>
+        <div>
+          <div>会员信息</div>
+          <div class="member-info">
+            <div class="row">
+              <span>姓名:</span>
+              <span>{{ memberInfo.userName }}</span>
+            </div>
+            <div class="row">
+              <span>电话:</span>
+              <span>{{ memberInfo.phone }}</span>
+            </div>
+            <div class="row">
+              <span>卡号:</span>
+              <span>{{ memberInfo.cartNo }}</span>
+            </div>
+            <div class="row">
+              <span>余额:</span>
+              <span>{{ memberInfo.money }}</span>
+            </div>
+          </div>
+
+        </div>
       </el-form-item>
-      <el-form-item label="服务对象" prop="serviceObject">
+      <!-- <el-form-item label="服务对象" prop="serviceObject">
         <el-input
           v-model="queryParams.serviceObject"
           placeholder="请输入服务对象"
@@ -19,12 +45,12 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-        <el-form-item label="服务分类" prop="serviceType">
+      <el-form-item label="服务分类" prop="serviceType">
         <el-select v-model="queryParams.serviceType" placeholder="请选择服务分类" clearable size="small">
           <el-option label="请选择字典生成" value="" />
         </el-select>
-      </el-form-item>
-      <el-form-item label="颜色" prop="color">
+      </el-form-item> -->
+      <!-- <el-form-item label="颜色" prop="color">
         <el-input
           v-model="queryParams.color"
           placeholder="请输入颜色"
@@ -32,8 +58,8 @@
           size="small"
           @keyup.enter.native="handleQuery"
         />
-      </el-form-item>
-      <el-form-item label="属性" prop="attribute">
+      </el-form-item> -->
+      <!-- <el-form-item label="属性" prop="attribute">
         <el-input
           v-model="queryParams.attribute"
           placeholder="请输入属性"
@@ -41,8 +67,8 @@
           size="small"
           @keyup.enter.native="handleQuery"
         />
-      </el-form-item>
-      <el-form-item label="服务项目" prop="serviceItems">
+      </el-form-item> -->
+      <!-- <el-form-item label="服务项目" prop="serviceItems">
         <el-input
           v-model="queryParams.serviceItems"
           placeholder="请输入服务项目"
@@ -60,7 +86,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-        <el-form-item label="状态" prop="status">
+      <el-form-item label="状态" prop="status">
         <el-select v-model="queryParams.status" placeholder="请选择状态" clearable size="small">
           <el-option label="请选择字典生成" value="" />
         </el-select>
@@ -75,20 +101,24 @@
         />
       </el-form-item>
       <el-form-item label="" prop="gmtCreate">
-        <el-date-picker clearable size="small" style="width: 200px"
+        <el-date-picker
           v-model="queryParams.gmtCreate"
+          clearable
+          size="small"
+          style="width: 200px"
           type="date"
           value-format="yyyy-MM-dd"
-          placeholder="选择">
-        </el-date-picker>
+          placeholder="选择"/>
       </el-form-item>
       <el-form-item label="" prop="gmtUpdate">
-        <el-date-picker clearable size="small" style="width: 200px"
+        <el-date-picker
           v-model="queryParams.gmtUpdate"
+          clearable
+          size="small"
+          style="width: 200px"
           type="date"
           value-format="yyyy-MM-dd"
-          placeholder="选择">
-        </el-date-picker>
+          placeholder="选择"/>
       </el-form-item>
       <el-form-item label="" prop="userId">
         <el-input
@@ -108,6 +138,20 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item> -->
+      <el-form-item label="" prop="gmtCreate">
+        <el-date-picker
+          v-model="queryParams.gmtCreate"
+          clearable
+          size="small"
+          style="width: 200px"
+          type="date"
+          value-format="yyyy-MM-dd"
+          placeholder="选择日期"/>
+      </el-form-item>
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -117,164 +161,218 @@
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
+          v-permission="['unimall:salesSlip:add']"
           type="primary"
           icon="el-icon-plus"
           size="mini"
-          @click="handleAdd"
-          v-permission="['unimall:salesSlip:add']"
-        >新增</el-button>
+          @click="handleAdd">新增服务</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
+          v-permission="['unimall:salesSlip:edit']"
+          :disabled="single"
           type="success"
           icon="el-icon-edit"
           size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-permission="['unimall:salesSlip:edit']"
-        >修改</el-button>
+          @click="handleUpdate">修改</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
+          v-permission="['unimall:salesSlip:remove']"
+          :disabled="multiple"
           type="danger"
           icon="el-icon-delete"
           size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-permission="['unimall:salesSlip:remove']"
-        >删除</el-button>
+          @click="handleDelete">删除</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
+          v-permission="['unimall:salesSlip:export']"
           type="warning"
           icon="el-icon-download"
           size="mini"
-          @click="handleExport"
-          v-permission="['unimall:salesSlip:export']"
-        >导出</el-button>
+          @click="handleExport">导出</el-button>
       </el-col>
     </el-row>
 
     <el-table v-loading="loading" :data="salesSlipList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="" align="center" prop="id" />
-      <el-table-column label="" align="center" prop="companyId" />
+      <!-- <el-table-column label="" align="center" prop="id" />
+      <el-table-column label="" align="center" prop="companyId" /> -->
+      <el-table-column label="姓名" align="center" prop="remark1" />
+      <el-table-column label="电话" align="center" prop="remark2" />
       <el-table-column label="服务对象" align="center" prop="serviceObject" />
       <el-table-column label="服务分类" align="center" prop="serviceType" />
       <el-table-column label="颜色" align="center" prop="color" />
       <el-table-column label="属性" align="center" prop="attribute" />
       <el-table-column label="服务项目" align="center" prop="serviceItems" />
       <el-table-column label="金额" align="center" prop="money" />
-      <el-table-column label="状态" align="center" prop="status" />
-      <el-table-column label="备注1" align="center" prop="remark1" />
-      <el-table-column label="备注2" align="center" prop="remark2" />
-      <el-table-column label="备注3" align="center" prop="remark3" />
-      <el-table-column label="0:否" align="center" prop="deleteFlag" />
-      <el-table-column label="" align="center" prop="gmtCreate" width="180">
+      <!-- <el-table-column label="状态" align="center" prop="status" /> -->
+
+      <!-- <el-table-column label="备注3" align="center" prop="remark3" /> -->
+      <!-- <el-table-column label="0:否" align="center" prop="deleteFlag" /> -->
+      <el-table-column label="时间" align="center" prop="gmtCreate" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.gmtCreate) }}</span>
         </template>
       </el-table-column>
-      <el-table-column label="" align="center" prop="gmtUpdate" width="180">
+      <!-- <el-table-column label="" align="center" prop="gmtUpdate" width="180">
         <template slot-scope="scope">
           <span>{{ parseTime(scope.row.gmtUpdate) }}</span>
         </template>
       </el-table-column>
       <el-table-column label="" align="center" prop="userId" />
-      <el-table-column label="" align="center" prop="adminId" />
-      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+      <el-table-column label="" align="center" prop="adminId" /> -->
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="240px">
         <template slot-scope="scope">
           <el-button
+            v-permission="['unimall:salesSlip:edit']"
             size="mini"
             type="text"
             icon="el-icon-edit"
-            @click="handleUpdate(scope.row)"
-            v-permission="['unimall:salesSlip:edit']"
-          >修改</el-button>
+            @click="handleUpdate(scope.row)">修改</el-button>
           <el-button
+            v-permission="['unimall:salesSlip:remove']"
             size="mini"
             type="text"
             icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-permission="['unimall:salesSlip:remove']"
-          >删除</el-button>
+            @click="handleDelete(scope.row)">删除</el-button>
+          <el-button size="mini" type="text" @click="print(scope.row)">打印小票</el-button>
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
-      @pagination="getList"
-    />
-
+      @pagination="getList" />
+    <el-dialog :visible.sync="isShowPrint" title="打印小票" width="400px">
+      <div id="box">
+        <div class="print-row">
+          <span>姓名:</span>
+          <span>{{ printData.remark1 }}</span>
+        </div>
+        <div class="print-row">
+          <span>电话:</span>
+          <span>{{ printData.remark2 }}</span>
+        </div>
+        <div class="print-row">
+          <span>服务对象:</span>
+          <span>{{ printData.serviceObject }}</span>
+        </div>
+        <div class="print-row">
+          <span>服务分类:</span>
+          <span>{{ printData.serviceType }}</span>
+        </div>
+        <div class="print-row">
+          <span>颜色:</span>
+          <span>{{ printData.color }}</span>
+        </div>
+        <div class="print-row">
+          <span>属性:</span>
+          <span>{{ printData.attribute }}</span>
+        </div>
+        <div class="print-row">
+          <span>服务项目:</span>
+          <span>{{ printData.serviceItems }}</span>
+        </div>
+        <div class="print-row">
+          <span>金额:</span>
+          <span>{{ printData.money }}</span>
+        </div>
+        <div class="print-row">
+          <span>时间:</span>
+          <span>{{ parseTime(printData.gmtCreate, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
+        </div>
+      </div>
+      <div slot="footer" class="dialog-footer">
+        <el-button v-print="printObj" type="primary">打印</el-button>
+        <el-button @click="isShowPrint=false">取 消</el-button>
+      </div>
+    </el-dialog>
     <!-- 添加或修改销售单对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="500px">
+    <el-dialog :title="title" :visible.sync="open" width="600px">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="" prop="companyId">
+        <!-- <el-form-item label="" prop="companyId">
           <el-input v-model="form.companyId" placeholder="请输入" />
+        </el-form-item> -->
+        <el-form-item label="姓名" prop="remark1">
+          <el-input v-model="form.remark1" placeholder="请输入姓名" disabled/>
+        </el-form-item>
+        <el-form-item label="电话" prop="remark2">
+          <el-input v-model="form.remark2" placeholder="请输入电话" disabled/>
         </el-form-item>
         <el-form-item label="服务对象" prop="serviceObject">
-          <el-input v-model="form.serviceObject" placeholder="请输入服务对象" />
+          <!-- <el-input v-model="form.serviceObject" placeholder="请输入服务对象" /> -->
+          <el-select v-model="form.serviceObject" placeholder="请选择服务对象" style="width:100%">
+            <el-option v-for="item in serviceObject" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
         </el-form-item>
         <el-form-item label="服务分类">
-          <el-select v-model="form.serviceType" placeholder="请选择服务分类">
-            <el-option label="请选择字典生成" value="" />
+          <el-select v-model="form.serviceType" placeholder="请选择服务分类" style="width:100%">
+            <el-option v-for="item in serviceType" :key="item.id" :label="item.name" :value="item.id" />
           </el-select>
         </el-form-item>
         <el-form-item label="颜色" prop="color">
-          <el-input v-model="form.color" placeholder="请输入颜色" />
+          <!-- <el-input v-model="form.color" placeholder="请输入颜色" /> -->
+          <el-select v-model="form.color" placeholder="请选择服务颜色" style="width:100%">
+            <el-option v-for="item in colorList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
         </el-form-item>
         <el-form-item label="属性" prop="attribute">
-          <el-input v-model="form.attribute" placeholder="请输入属性" />
+          <!-- <el-input v-model="form.attribute" placeholder="请输入属性" /> -->
+          <el-select v-model="form.attribute" placeholder="请选择属性" style="width:100%">
+            <el-option v-for="item in attributeList" :key="item.id" :label="item.name" :value="item.id" />
+          </el-select>
         </el-form-item>
         <el-form-item label="服务项目" prop="serviceItems">
-          <el-input v-model="form.serviceItems" placeholder="请输入服务项目" />
+          <!-- <el-input v-model="form.serviceItems" placeholder="请输入服务项目" /> -->
+          <el-checkbox-group v-model="checkList" @change="changeCheckbox">
+            <el-checkbox v-for="item in serviceList" :label="item.route" :key="item.id"/>
+          </el-checkbox-group>
         </el-form-item>
         <el-form-item label="金额" prop="money">
           <el-input v-model="form.money" placeholder="请输入金额" />
         </el-form-item>
-        <el-form-item label="状态">
+        <!-- <el-form-item label="状态">
           <el-radio-group v-model="form.status">
             <el-radio label="1">请选择字典生成</el-radio>
           </el-radio-group>
-        </el-form-item>
-        <el-form-item label="备注1" prop="remark1">
-          <el-input v-model="form.remark1" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
-        <el-form-item label="备注2" prop="remark2">
-          <el-input v-model="form.remark2" type="textarea" placeholder="请输入内容" />
-        </el-form-item>
-        <el-form-item label="备注3" prop="remark3">
+        </el-form-item> -->
+        <!-- <el-form-item label="备注3" prop="remark3">
           <el-input v-model="form.remark3" type="textarea" placeholder="请输入内容" />
         </el-form-item>
         <el-form-item label="0:否" prop="deleteFlag">
           <el-input v-model="form.deleteFlag" placeholder="请输入0:否" />
         </el-form-item>
         <el-form-item label="" prop="gmtCreate">
-          <el-date-picker clearable size="small" style="width: 200px"
+          <el-date-picker
             v-model="form.gmtCreate"
+            clearable
+            size="small"
+            style="width: 200px"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择">
-          </el-date-picker>
+            placeholder="选择" />
         </el-form-item>
         <el-form-item label="" prop="gmtUpdate">
-          <el-date-picker clearable size="small" style="width: 200px"
+          <el-date-picker
             v-model="form.gmtUpdate"
+            clearable
+            size="small"
+            style="width: 200px"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择">
-          </el-date-picker>
+            placeholder="选择" />
         </el-form-item>
         <el-form-item label="" prop="userId">
           <el-input v-model="form.userId" placeholder="请输入" />
         </el-form-item>
         <el-form-item label="" prop="adminId">
           <el-input v-model="form.adminId" placeholder="请输入" />
-        </el-form-item>
+        </el-form-item> -->
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -285,11 +383,47 @@
 </template>
 
 <script>
-import { listSalesSlip, getSalesSlip, delSalesSlip, addSalesSlip, updateSalesSlip, exportSalesSlip } from "@/api/unimall/salesSlip";
-
+import { listSalesSlip, getSalesSlip, delSalesSlip, addSalesSlip, updateSalesSlip, exportSalesSlip } from '@/api/unimall/salesSlip'
+import { listServiceManger } from '@/api/unimall/serviceManger'
+import { listManagement } from '@/api/unimall/management'
+import { listMoneyHis, getMoneyHis, delMoneyHis, addMoneyHis, updateMoneyHis, exportMoneyHis } from '@/api/unimall/moneyHis'
 export default {
   data() {
     return {
+      isShowPrint: false,
+      printData: {},
+      printObj: {
+        id: 'box'
+        // 其他配置项,
+      },
+      phone: '',
+      serviceType: [{
+        name: '鞋类清洗',
+        id: 1
+      }],
+      attributeList: [{
+        name: '男款',
+        id: 1
+      },
+      {
+        name: '女款',
+        id: 2
+      }],
+      serviceObject: [{
+        name: '鞋类',
+        id: 1
+      }],
+      colorList: [{
+        name: '黑色',
+        id: 1
+      }, {
+        name: '白色',
+        id: 2
+      }
+      ],
+      memberInfo: {},
+      checkList: [],
+      serviceList: [],
       // 遮罩层
       loading: true,
       // 选中数组
@@ -303,7 +437,7 @@ export default {
       // 销售单表格数据
       salesSlipList: [],
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -332,40 +466,77 @@ export default {
       // 表单校验
       rules: {
         deleteFlag: [
-          { required: true, message: "0:否(默认) 1:是不能为空", trigger: "blur" }
-        ],      }
-    };
+          { required: true, message: '0:否(默认) 1:是不能为空', trigger: 'blur' }
+        ]
+      }
+    }
   },
   created() {
-    this.getList();
+    this.getList()
   },
   methods: {
+    print(row) {
+      this.printData = row
+      this.isShowPrint = true
+    },
+    getMember() {
+      listManagement({
+        phone: this.phone
+      }).then(response => {
+        if (response.data.data.items.length!=0) {
+          this.memberInfo = response.data.data.items[0]
+        } else {
+          this.msgError('暂无此会员')
+          return
+        }
+      })
+    },
+    submitMember() {},
+    changeCheckbox(e) {
+      const that = this
+      this.form.money = 0
+      console.log(this.checkList)
+      debugger
+      const getPlace = function(name) {
+        for (let k = 0; k<that.serviceList.length; k++) {
+          if (name==that.serviceList[k].route) {
+            return that.serviceList[k].unitPrice
+          }
+        }
+      }
+      for (let i = 0; i<this.checkList.length; i++) {
+        this.form.money+=getPlace(this.checkList[i])
+      }
+    },
     /** 查询销售单列表 */
     getList() {
-      this.loading = true;
+      this.loading = true
       listSalesSlip(this.queryParams).then(response => {
         this.salesSlipList = response.data.data.items
         this.total = response.data.data.count
-        this.loading = false;
-      });
+        this.loading = false
+      })
+      listServiceManger().then(response => {
+        this.serviceList = response.data.data.items
+      })
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.reset();
+      this.open = false
+      this.reset()
     },
     // 表单重置
     reset() {
       this.form = {
         id: undefined,
         companyId: undefined,
-        serviceObject: undefined,
-        serviceType: undefined,
-        color: undefined,
-        attribute: undefined,
+        serviceObject: '鞋类',
+        serviceType: '鞋类清洗',
+        color: '黑色',
+        attribute: '男款',
         serviceItems: undefined,
-        money: undefined,
-        status: "0",
+        money: 0,
+        status: '正常',
         remark1: undefined,
         remark2: undefined,
         remark3: undefined,
@@ -374,96 +545,133 @@ export default {
         gmtUpdate: undefined,
         userId: undefined,
         adminId: undefined
-      };
-      this.resetForm("form");
+      }
+      this.resetForm('form')
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
+      this.queryParams.pageNum = 1
+      this.getList()
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
       this.ids = selection.map(item => item.id)
-      this.single = selection.length!=1
+      this.single = selection.length != 1
       this.multiple = !selection.length
     },
     /** 新增按钮操作 */
-    handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加销售单";
+    handleAdd() { debugger
+      if (!this.memberInfo.userName) {
+        this.msgError('请先提取会员')
+        return
+      }
+      this.reset()
+      this.open = true
+      this.title = '添加销售单'
+      this.form.remark1 = this.memberInfo.userName
+      this.form.remark2 = this.memberInfo.phone
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
+      this.reset()
       const id = row.id || this.ids.join(',')
       getSalesSlip(id).then(response => {
         this.form = response.data.data
-        this.open = true;
-        this.title = "修改销售单";
-      });
+        this.open = true
+        this.title = '修改销售单'
+      })
     },
     /** 提交按钮 */
-    submitForm: function() {
-      this.$refs["form"].validate(valid => {
+    submitForm: function () {
+      this.$refs['form'].validate(valid => {
         if (valid) {
           if (this.form.id != undefined) {
             updateSalesSlip(this.form).then(response => {
               if (response.data) {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
+                this.msgSuccess('修改成功')
+                this.open = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           } else {
+            this.form.serviceItems = this.checkList.toString()
             addSalesSlip(this.form).then(response => {
-              if (response.data) {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
+              if (response.data) { debugger
+                this.phone = ''
+                this.checkList = []
+                this.msgSuccess('新增成功')
+                this.open = false
+                console.log(this.memberInfo)
+                addMoneyHis({
+                  xiaofeiId: this.memberInfo.id,
+                  serviceObject: 2,
+                  money: this.form.money,
+                  remark1: this.memberInfo.userName,
+                  remark2: this.memberInfo.phone
+
+                }).then(response => {
+                  if (response.data) {
+                    this.memberInfo = {}
+                    this.msgSuccess('消费成功')
+                    this.open = false
+                    this.getList()
+                  } else {
+                    this.msgError(response.msg)
+                  }
+                })
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           }
         }
-      });
+      })
     },
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids.join(',')
-      this.$confirm('是否确认删除销售单编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delSalesSlip(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(function() {});
+      this.$confirm('是否确认删除销售单编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function () {
+        return delSalesSlip(ids)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(function () { })
     },
     /** 导出按钮操作 */
     handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有销售单数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportSalesSlip(queryParams);
-        }).then(response => {
-          this.download(response.data.data);
-        }).catch(function() {});
+      const queryParams = this.queryParams
+      this.$confirm('是否确认导出所有销售单数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function () {
+        return exportSalesSlip(queryParams)
+      }).then(response => {
+        this.download(response.data.data)
+      }).catch(function () { })
     }
   }
-};
-</script>
+}
+</script>
+<style scoped>
+.member-info {
+  display: flex;
+}
+.row{
+    margin-right: 40px;
+  }
+  .print-row{
+    margin-bottom: 20px;
+  }
+</style>

+ 96 - 92
unimall-admin/src/views/serviceManger/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" :inline="true" label-width="68px">
-      <el-form-item label="" prop="companyId">
+    <el-form ref="queryForm" :model="queryParams" :inline="true" label-width="68px">
+      <!-- <el-form-item label="" prop="companyId">
         <el-input
           v-model="queryParams.companyId"
           placeholder="请输入"
@@ -9,7 +9,7 @@
           size="small"
           @keyup.enter.native="handleQuery"
         />
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item label="服务项目" prop="route">
         <el-input
           v-model="queryParams.route"
@@ -19,7 +19,7 @@
           @keyup.enter.native="handleQuery"
         />
       </el-form-item>
-      <el-form-item label="价格" prop="unitPrice">
+      <!-- <el-form-item label="价格" prop="unitPrice">
         <el-input
           v-model="queryParams.unitPrice"
           placeholder="请输入价格"
@@ -70,7 +70,7 @@
           size="small"
           @keyup.enter.native="handleQuery"
         />
-      </el-form-item>
+      </el-form-item> -->
       <el-form-item>
         <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
         <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
@@ -80,51 +80,51 @@
     <el-row :gutter="10" class="mb8">
       <el-col :span="1.5">
         <el-button
+          v-permission="['unimall:serviceManger:add']"
           type="primary"
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-          v-permission="['unimall:serviceManger:add']"
         >新增</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
+          v-permission="['unimall:serviceManger:edit']"
+          :disabled="single"
           type="success"
           icon="el-icon-edit"
           size="mini"
-          :disabled="single"
           @click="handleUpdate"
-          v-permission="['unimall:serviceManger:edit']"
         >修改</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
+          v-permission="['unimall:serviceManger:remove']"
+          :disabled="multiple"
           type="danger"
           icon="el-icon-delete"
           size="mini"
-          :disabled="multiple"
           @click="handleDelete"
-          v-permission="['unimall:serviceManger:remove']"
         >删除</el-button>
       </el-col>
       <el-col :span="1.5">
         <el-button
+          v-permission="['unimall:serviceManger:export']"
           type="warning"
           icon="el-icon-download"
           size="mini"
           @click="handleExport"
-          v-permission="['unimall:serviceManger:export']"
         >导出</el-button>
       </el-col>
     </el-row>
 
     <el-table v-loading="loading" :data="serviceMangerList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
-      <el-table-column label="" align="center" prop="id" />
-      <el-table-column label="" align="center" prop="companyId" />
+      <!-- <el-table-column label="" align="center" prop="id" />
+      <el-table-column label="" align="center" prop="companyId" /> -->
       <el-table-column label="服务项目" align="center" prop="route" />
       <el-table-column label="价格" align="center" prop="unitPrice" />
-      <el-table-column label="备注1" align="center" prop="remark1" />
+      <!-- <el-table-column label="备注1" align="center" prop="remark1" />
       <el-table-column label="备注2" align="center" prop="remark2" />
       <el-table-column label="备注3" align="center" prop="remark3" />
       <el-table-column label="0:否" align="center" prop="deleteFlag" />
@@ -139,27 +139,27 @@
         </template>
       </el-table-column>
       <el-table-column label="" align="center" prop="userId" />
-      <el-table-column label="" align="center" prop="adminId" />
+      <el-table-column label="" align="center" prop="adminId" /> -->
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
+            v-permission="['unimall:serviceManger:edit']"
             size="mini"
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-            v-permission="['unimall:serviceManger:edit']"
           >修改</el-button>
           <el-button
+            v-permission="['unimall:serviceManger:remove']"
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-            v-permission="['unimall:serviceManger:remove']"
           >删除</el-button>
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
       v-show="total>0"
       :total="total"
@@ -171,16 +171,16 @@
     <!-- 添加或修改服务管理对话框 -->
     <el-dialog :title="title" :visible.sync="open" width="500px">
       <el-form ref="form" :model="form" :rules="rules" label-width="80px">
-        <el-form-item label="" prop="companyId">
+        <!-- <el-form-item label="" prop="companyId">
           <el-input v-model="form.companyId" placeholder="请输入" />
-        </el-form-item>
+        </el-form-item> -->
         <el-form-item label="服务项目" prop="route">
           <el-input v-model="form.route" placeholder="请输入服务项目" />
         </el-form-item>
         <el-form-item label="价格" prop="unitPrice">
           <el-input v-model="form.unitPrice" placeholder="请输入价格" />
         </el-form-item>
-        <el-form-item label="备注1" prop="remark1">
+        <!-- <el-form-item label="备注1" prop="remark1">
           <el-input v-model="form.remark1" type="textarea" placeholder="请输入内容" />
         </el-form-item>
         <el-form-item label="备注2" prop="remark2">
@@ -191,29 +191,33 @@
         </el-form-item>
         <el-form-item label="0:否" prop="deleteFlag">
           <el-input v-model="form.deleteFlag" placeholder="请输入0:否" />
-        </el-form-item>
-        <el-form-item label="" prop="gmtCreate">
-          <el-date-picker clearable size="small" style="width: 200px"
+        </el-form-item> -->
+        <!-- <el-form-item label="" prop="gmtCreate">
+          <el-date-picker
             v-model="form.gmtCreate"
+            clearable
+            size="small"
+            style="width: 200px"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="" prop="gmtUpdate">
-          <el-date-picker clearable size="small" style="width: 200px"
+            placeholder="选择"/>
+        </el-form-item> -->
+        <!-- <el-form-item label="" prop="gmtUpdate">
+          <el-date-picker
             v-model="form.gmtUpdate"
+            clearable
+            size="small"
+            style="width: 200px"
             type="date"
             value-format="yyyy-MM-dd"
-            placeholder="选择">
-          </el-date-picker>
-        </el-form-item>
-        <el-form-item label="" prop="userId">
+            placeholder="选择"/>
+        </el-form-item> -->
+        <!-- <el-form-item label="" prop="userId">
           <el-input v-model="form.userId" placeholder="请输入" />
         </el-form-item>
         <el-form-item label="" prop="adminId">
           <el-input v-model="form.adminId" placeholder="请输入" />
-        </el-form-item>
+        </el-form-item> -->
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button type="primary" @click="submitForm">确 定</el-button>
@@ -224,7 +228,7 @@
 </template>
 
 <script>
-import { listServiceManger, getServiceManger, delServiceManger, addServiceManger, updateServiceManger, exportServiceManger } from "@/api/unimall/serviceManger";
+import { listServiceManger, getServiceManger, delServiceManger, addServiceManger, updateServiceManger, exportServiceManger } from '@/api/unimall/serviceManger'
 
 export default {
   data() {
@@ -242,7 +246,7 @@ export default {
       // 服务管理表格数据
       serviceMangerList: [],
       // 弹出层标题
-      title: "",
+      title: '',
       // 是否显示弹出层
       open: false,
       // 查询参数
@@ -266,27 +270,27 @@ export default {
       // 表单校验
       rules: {
         deleteFlag: [
-          { required: true, message: "0:否(默认) 1:是不能为空", trigger: "blur" }
-        ],      }
-    };
+          { required: true, message: '0:否(默认) 1:是不能为空', trigger: 'blur' }
+        ] }
+    }
   },
   created() {
-    this.getList();
+    this.getList()
   },
   methods: {
     /** 查询服务管理列表 */
     getList() {
-      this.loading = true;
+      this.loading = true
       listServiceManger(this.queryParams).then(response => {
         this.serviceMangerList = response.data.data.items
         this.total = response.data.data.count
-        this.loading = false;
-      });
+        this.loading = false
+      })
     },
     // 取消按钮
     cancel() {
-      this.open = false;
-      this.reset();
+      this.open = false
+      this.reset()
     },
     // 表单重置
     reset() {
@@ -303,18 +307,18 @@ export default {
         gmtUpdate: undefined,
         userId: undefined,
         adminId: undefined
-      };
-      this.resetForm("form");
+      }
+      this.resetForm('form')
     },
     /** 搜索按钮操作 */
     handleQuery() {
-      this.queryParams.pageNum = 1;
-      this.getList();
+      this.queryParams.pageNum = 1
+      this.getList()
     },
     /** 重置按钮操作 */
     resetQuery() {
-      this.resetForm("queryForm");
-      this.handleQuery();
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
@@ -324,75 +328,75 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加服务管理";
+      this.reset()
+      this.open = true
+      this.title = '添加服务管理'
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
-      this.reset();
+      this.reset()
       const id = row.id || this.ids.join(',')
       getServiceManger(id).then(response => {
         this.form = response.data.data
-        this.open = true;
-        this.title = "修改服务管理";
-      });
+        this.open = true
+        this.title = '修改服务管理'
+      })
     },
     /** 提交按钮 */
     submitForm: function() {
-      this.$refs["form"].validate(valid => {
+      this.$refs['form'].validate(valid => {
         if (valid) {
           if (this.form.id != undefined) {
             updateServiceManger(this.form).then(response => {
               if (response.data) {
-                this.msgSuccess("修改成功");
-                this.open = false;
-                this.getList();
+                this.msgSuccess('修改成功')
+                this.open = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           } else {
             addServiceManger(this.form).then(response => {
               if (response.data) {
-                this.msgSuccess("新增成功");
-                this.open = false;
-                this.getList();
+                this.msgSuccess('新增成功')
+                this.open = false
+                this.getList()
               } else {
-                this.msgError(response.msg);
+                this.msgError(response.msg)
               }
-            });
+            })
           }
         }
-      });
+      })
     },
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids.join(',')
-      this.$confirm('是否确认删除服务管理编号为"' + ids + '"的数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return delServiceManger(ids);
-        }).then(() => {
-          this.getList();
-          this.msgSuccess("删除成功");
-        }).catch(function() {});
+      this.$confirm('是否确认删除服务管理编号为"' + ids + '"的数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return delServiceManger(ids)
+      }).then(() => {
+        this.getList()
+        this.msgSuccess('删除成功')
+      }).catch(function() {})
     },
     /** 导出按钮操作 */
     handleExport() {
-      const queryParams = this.queryParams;
-      this.$confirm('是否确认导出所有服务管理数据项?', "警告", {
-          confirmButtonText: "确定",
-          cancelButtonText: "取消",
-          type: "warning"
-        }).then(function() {
-          return exportServiceManger(queryParams);
-        }).then(response => {
-          this.download(response.data.data);
-        }).catch(function() {});
+      const queryParams = this.queryParams
+      this.$confirm('是否确认导出所有服务管理数据项?', '警告', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(function() {
+        return exportServiceManger(queryParams)
+      }).then(response => {
+        this.download(response.data.data)
+      }).catch(function() {})
     }
   }
-};
-</script>
+}
+</script>

+ 1 - 10
unimall-data/src/main/java/com/iotechn/unimall/data/domain/SalesSlip.java

@@ -10,6 +10,7 @@ import lombok.Data;
 import com.baomidou.mybatisplus.annotations.TableField;
 import com.baomidou.mybatisplus.enums.FieldFill;
 import com.iotechn.unimall.core.util.StringUtils;
+
 import java.util.Date;
 
 /**
@@ -87,16 +88,6 @@ public class SalesSlip extends SuperDO{
     @TableField("delete_flag")
     private Long deleteFlag;
 
-    /**  */
-    @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
-    @TableField("gmt_create")
-    private Date gmtCreate;
-
-    /**  */
-    @Excel(name = "", width = 30, dateFormat = "yyyy-MM-dd")
-    @TableField("gmt_update")
-    private Date gmtUpdate;
-
     /**  */
     @Excel(name = "")
     @TableField("user_id")