Browse Source

新增营收管理模块

yuhao 1 year ago
parent
commit
2d604aa811

+ 14 - 19
src/components/common/layout/leftMenu.vue

@@ -78,13 +78,6 @@ export default {
78 78
             "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/uncoupon.png",
79 79
           icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/coupon.png",
80 80
         },
81
-        // {
82
-        //   name: "历史订单",
83
-        //   path: "/historicalOrder",
84
-        //   unicon:
85
-        //     "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unhistory.png",
86
-        //   icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/history.png",
87
-        // },
88 81
         {
89 82
           name: "订单中心",
90 83
           path: "/orderCenter",
@@ -99,32 +92,33 @@ export default {
99 92
             "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unconfirmOrder.png",
100 93
           icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/confirmOrder.png",
101 94
         },
102
-        //  {
103
-        //   name: "门店检测",
104
-        //   path: "/storeDetection",
105
-        //   icon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/testing.png',
106
-        //   unicon: 'https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/untesting.png'
107
-        // },
108 95
         {
109 96
           name: "客户管理",
110 97
           path: "/customerMan",
111 98
           unicon:
112
-            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png",
113
-          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png",
99
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E7%94%A8%E6%88%B7%E7%B1%BB.png",
100
+          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E7%94%A8%E6%88%B7%E7%B1%BB%20%281%29.png",
114 101
         },
115 102
         {
116 103
           name: "付费客户",
117 104
           path: "/payUser",
118 105
           unicon:
119
-            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png",
120
-          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png",
106
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E6%96%B0%E5%A2%9E%E4%BB%98%E8%B4%B9%E4%BA%BA%E6%95%B0%20%281%29.png",
107
+          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E6%96%B0%E5%A2%9E%E4%BB%98%E8%B4%B9%E4%BA%BA%E6%95%B0.png",
121 108
         },
122 109
         {
123 110
           name: "店铺排班",
124 111
           path: "/schedulingDetail",
125 112
           unicon:
126
-            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/unskin.png",
127
-          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/Skin.png",
113
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E6%8E%92%E7%8F%AD%E6%A8%A1%E5%9D%97%20%281%29.png",
114
+          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E6%8E%92%E7%8F%AD%E6%A8%A1%E5%9D%97.png",
115
+        },
116
+        {
117
+          name: "营收管理",
118
+          path: "/revenueManage",
119
+          unicon:
120
+            "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E8%B5%84%E4%BA%A7%E6%B8%85%E5%8D%95%20%281%29.png",
121
+          icon: "https://we-spa.oss-cn-shenzhen.aliyuncs.com/pad_clerk/icon/slices/%E8%B5%84%E4%BA%A7%E6%B8%85%E5%8D%95.png",
128 122
         },
129 123
       ],
130 124
       nowIndex: 0,
@@ -204,6 +198,7 @@ export default {
204 198
   img {
205 199
     width: 20px;
206 200
     height: 20px;
201
+    margin-right: 2px;
207 202
   }
208 203
 }
209 204
 

+ 2 - 0
src/pages/coupon/index.vue

@@ -127,6 +127,8 @@ export default {
127 127
       for (let i = 0; i < this.multipleSelection.length; i++) {
128 128
         selectIds = selectIds + "," + this.multipleSelection[i].id;
129 129
       }
130
+      console.log(this.coupon);
131
+      return
130 132
       let params = {
131 133
         id: this.coupon,
132 134
         user_ids: selectIds.substring(1, selectIds.length),

+ 683 - 0
src/pages/revenueManage/createOrder/index.vue

@@ -0,0 +1,683 @@
1
+<template>
2
+  <div class="mine">
3
+    <div class="box">
4
+      <div class="headline">
5
+        <h2>创建订单</h2>
6
+        <div class="saveOrder" @click="save">保存</div>
7
+      </div>
8
+      <!-- 选择客户信息 -->
9
+      <div class="titleBox">
10
+        <div class="title">
11
+          <span class="notice">*</span>
12
+          选择客户
13
+          <el-select
14
+            clearable
15
+            :filter-method="filterName"
16
+            filterable
17
+            size="mini"
18
+            v-model="user_id"
19
+            placeholder="请选择"
20
+          >
21
+            <el-option
22
+              v-for="item in userList"
23
+              :key="item.id"
24
+              :label="item.nickname"
25
+              :value="item.id"
26
+            ></el-option>
27
+          </el-select>
28
+        </div>
29
+        <div class="title">
30
+          客户标签
31
+          <el-select clearable size="mini" v-model="user_tag" placeholder="请选择">
32
+            <el-option v-for="item in labelList" :key="item" :label="item" :value="item"></el-option>
33
+          </el-select>
34
+        </div>
35
+        <div class="clientSource">客户来源</div>
36
+        <div class="title">
37
+          线上
38
+          <el-select clearable size="mini" v-model="source_online" placeholder="请选择">
39
+            <el-option v-for="item in onlineList" :key="item" :label="item" :value="item"></el-option>
40
+          </el-select>
41
+        </div>
42
+        <div class="title">
43
+          线下
44
+          <el-select clearable size="mini" v-model="source_offline" placeholder="请选择">
45
+            <el-option v-for="item in offlineList" :key="item" :label="item" :value="item"></el-option>
46
+          </el-select>
47
+        </div>
48
+      </div>
49
+      <el-divider></el-divider>
50
+      <!-- 服务项目/销售类别 -->
51
+      <div class="center">
52
+        <el-radio-group size="medium" v-model="order_type">
53
+          <el-radio-button label="1">服务项目</el-radio-button>
54
+          <el-radio-button label="2">销售类别</el-radio-button>
55
+        </el-radio-group>
56
+        <!-- 服务项目 -->
57
+        <div class="centerBox1" v-if="order_type=='1'">
58
+          <div class="centerBox1-box">
59
+            <div class="centerBox1-productBox">
60
+              <div class="productBox" v-for="(item,index) in selectProject" :key="index">
61
+                <div class="title">
62
+                  选择项目
63
+                  <el-select
64
+                    clearable
65
+                    :filter-method="filterProject"
66
+                    filterable
67
+                    size="mini"
68
+                    v-model="item.project"
69
+                    placeholder="请选择"
70
+                  >
71
+                    <el-option
72
+                      v-for="item in projectList"
73
+                      :key="item.id"
74
+                      :label="item.project_name"
75
+                      :value="{value:item.id,name:item.project_name}"
76
+                    ></el-option>
77
+                  </el-select>
78
+                </div>
79
+                <div class="title">
80
+                  项目分类
81
+                  <el-select clearable size="mini" v-model="item.category_name" placeholder="请选择">
82
+                    <el-option
83
+                      v-for="item in project_category_list"
84
+                      :key="item"
85
+                      :label="item"
86
+                      :value="item"
87
+                    ></el-option>
88
+                  </el-select>
89
+                </div>
90
+                <i v-if="index!=0" @click="deletes('project',index)" class="el-icon-circle-close"></i>
91
+              </div>
92
+            </div>
93
+            <div class="add" @click="add('project')">新增</div>
94
+          </div>
95
+          <div class="isAlone">
96
+            单买 (预买未体验)
97
+            <el-radio v-model="is_single" label="1">是</el-radio>
98
+            <el-radio v-model="is_single" label="0">否</el-radio>
99
+          </div>
100
+          <div class="titleBox">
101
+            <div class="title">
102
+              消耗金额 (卡扣)
103
+              <el-input class="input" v-model="card_expend_price" size="mini" placeholder="请输入内容"></el-input>
104
+            </div>
105
+            <div class="title">
106
+              单买体验额
107
+              <el-input class="input" v-model="single_price" size="mini" placeholder="请输入内容"></el-input>
108
+            </div>
109
+            <div class="title">
110
+              减免原由
111
+              <el-input class="input" v-model="reduce_reason" size="mini" placeholder="请输入内容"></el-input>
112
+            </div>
113
+          </div>
114
+        </div>
115
+        <!-- 销售类别 -->
116
+        <div v-else class="centerBox2">
117
+          <div class="cardBox">
118
+            <div class="cardBox1">
119
+              <div class="titleBox" v-for="(item,index) in selectCard" :key="index">
120
+                <div class="title">
121
+                  选择卡项
122
+                  <el-select
123
+                    clearable
124
+                    filterable
125
+                    :filter-method="filterCard"
126
+                    size="mini"
127
+                    v-model="item.card"
128
+                    placeholder="请选择"
129
+                    @change="(val) => seleted(val, index,'card')"
130
+                  >
131
+                    <el-option
132
+                      v-for="item in cardList"
133
+                      :key="item.id"
134
+                      :label="item.card_name"
135
+                      :value="{value:item.id,label:item.category_name,name:item.card_name}"
136
+                    ></el-option>
137
+                  </el-select>
138
+                </div>
139
+                <div class="word">{{item.type}}</div>
140
+                <i v-if="index!=0" @click="deletes('card',index)" class="el-icon-circle-close"></i>
141
+              </div>
142
+            </div>
143
+            <div class="add" @click="add('card')">新增</div>
144
+          </div>
145
+          <div class="cardBox">
146
+            <div class="cardBox1">
147
+              <div class="titleBox" v-for="(item,index) in selectGoods" :key="index">
148
+                <div class="title">
149
+                  选择产品
150
+                  <el-select
151
+                    clearable
152
+                    filterable
153
+                    :filter-method="filterGoods"
154
+                    size="mini"
155
+                    v-model="item.goods"
156
+                    placeholder="请选择"
157
+                    @change="(val) => seleted(val, index,'goods')"
158
+                  >
159
+                    <el-option
160
+                      v-for="item in goodsList"
161
+                      :key="item.id"
162
+                      :label="item.goods_name"
163
+                      :value="{value:item.id,label:item.category_name,name:item.goods_name}"
164
+                    ></el-option>
165
+                  </el-select>
166
+                </div>
167
+                <div class="word">{{item.type}}</div>
168
+                <div class="title">
169
+                  数量
170
+                  <el-input class="input" v-model="item.num" size="mini" placeholder="请输入内容"></el-input>
171
+                </div>
172
+                <i v-if="index!=0" @click="deletes('goods',index)" class="el-icon-circle-close"></i>
173
+              </div>
174
+            </div>
175
+            <div class="add" @click="add('goods')">新增</div>
176
+          </div>
177
+          <div class="titleBox">
178
+            <div class="title">
179
+              储值金额
180
+              <el-input class="moneyInput" v-model="recharge_price" size="mini" placeholder="请输入内容"></el-input>
181
+            </div>
182
+          </div>
183
+        </div>
184
+      </div>
185
+      <el-divider></el-divider>
186
+      <!-- 底部销售信息 -->
187
+      <div class="bottom">
188
+        <div class="titleBox">
189
+          <div class="title">
190
+            销售总额
191
+            <el-input class="input" v-model="total_price" size="mini" placeholder="请输入内容"></el-input>
192
+          </div>
193
+          <div class="title">
194
+            实收金额
195
+            <el-input class="input" v-model="payer_price" size="mini" placeholder="请输入内容"></el-input>
196
+          </div>
197
+          <div class="title">
198
+            收款方式
199
+            <el-select clearable size="mini" v-model="pay_way" placeholder="请选择">
200
+              <el-option v-for="item in payList" :key="item" :label="item" :value="item"></el-option>
201
+            </el-select>
202
+          </div>
203
+        </div>
204
+        <div class="titleBox">
205
+          <div class="title">
206
+            成交配赠
207
+            <el-input class="input" v-model="grant" size="mini" placeholder="请输入内容"></el-input>
208
+          </div>
209
+          <div class="title">
210
+            新客转化
211
+            <el-input class="input" v-model="conver" size="mini" placeholder="请输入内容"></el-input>
212
+          </div>
213
+          <div class="title">
214
+            选择美容师
215
+            <el-select multiple size="mini" v-model="suser_list" placeholder="请选择">
216
+              <el-option
217
+                v-for="item in suserList"
218
+                :key="item.id"
219
+                :label="item.realname"
220
+                :value="{value:item.id,name:item.realname}"
221
+              ></el-option>
222
+            </el-select>
223
+          </div>
224
+          <div class="titleBox">
225
+            <div class="title">
226
+              备注
227
+              <el-input class="input" v-model="remark" size="mini" placeholder="请输入内容"></el-input>
228
+            </div>
229
+          </div>
230
+        </div>
231
+      </div>
232
+    </div>
233
+  </div>
234
+</template>
235
+
236
+<script>
237
+import api from "../../../server/home";
238
+export default {
239
+  data() {
240
+    return {
241
+      userList: [], //选择客户列表
242
+      user_id: "", //客户名称
243
+      labelList: [
244
+        "新客",
245
+        "老客",
246
+        "普通会员",
247
+        "卡项会员",
248
+        "产品会员",
249
+        "充值会员"
250
+      ], //客户标签列表
251
+      user_tag: "", //客户标签
252
+      onlineList: ["联联", "美团", "大众", "抖音", "小程序", "企微"], //线上列表
253
+      offlineList: ["老带新/转介绍", "内拓卡", "拼团拓", "外拓卡", "自然进店"], //线下列表
254
+      source_online: "", //来源-线上
255
+      source_offline: "", //来源-线下
256
+      order_type: "1", //订单类型,1服务项目,2销售类型
257
+      selectProject: [
258
+        {
259
+          project: "",
260
+          category_name: ""
261
+        }
262
+      ], //选择项目列表
263
+      selectCard: [
264
+        {
265
+          card: "",
266
+          type: ""
267
+        }
268
+      ], //选择次卡列表
269
+      selectGoods: [
270
+        {
271
+          goods: "",
272
+          type: "",
273
+          num: ""
274
+        }
275
+      ], //选择美妆产品列表
276
+      projectList: [], //项目列表
277
+      categoryList: [], //项目分类列表
278
+      project_list: [], //提交的项目ID列表
279
+      project_category_list: ["医美类", "生美类"], //提交的项目分类列表
280
+      is_single: "0", //是否单买,1是,0否
281
+      card_expend_price: "", //消耗金额(卡扣)
282
+      single_price: "", //单买体验额
283
+      reduce_reason: "", //减免原因
284
+      cardList: [], //次卡列表
285
+      goodsList: [], //商品列表
286
+      recharge_price: "", //充值金额
287
+      total_price: "", //销售总额
288
+      payer_price: "", //实收总额
289
+      payList: [
290
+        "小程序",
291
+        "erp刷卡",
292
+        "扫码微信",
293
+        "扫码支付宝",
294
+        "手动卡扣",
295
+        "手动扣储值",
296
+        "美团",
297
+        "大众",
298
+        "抖音",
299
+        "联联"
300
+      ], //支付方式列表
301
+      pay_way: "", //支付方式
302
+      grant: "", //成效配额
303
+      conver: "", //新客转化
304
+      remark: "", //备注
305
+      suserList: [], //美容师列表
306
+      suser_list: [] //选择的美容师ID列表
307
+    };
308
+  },
309
+  methods: {
310
+    // 选择次卡和美妆后的事件
311
+    seleted(e, index, type) {
312
+      if (type == "card") {
313
+        this.$set(this.selectCard[index], "type", e.label);
314
+      } else {
315
+        this.$set(this.selectGoods[index], "type", e.label);
316
+      }
317
+    },
318
+    // 新增项目选项
319
+    add(type) {
320
+      switch (type) {
321
+        case "project":
322
+          this.selectProject.push({ project: "", category_name: "" });
323
+          break;
324
+        case "card":
325
+          this.selectCard.push({ card: "" });
326
+          break;
327
+        case "goods":
328
+          this.selectGoods.push({
329
+            goods: "",
330
+            num: ""
331
+          });
332
+          break;
333
+      }
334
+    },
335
+    // 删除项目选项
336
+    deletes(type, index) {
337
+      switch (type) {
338
+        case "project":
339
+          this.selectProject.splice(index, 1);
340
+          break;
341
+        case "card":
342
+          this.selectCard.splice(index, 1);
343
+          break;
344
+        case "goods":
345
+          this.selectGoods.splice(index, 1);
346
+          break;
347
+      }
348
+    },
349
+    // 获取客户列表
350
+    getUserList(e) {
351
+      api
352
+        .tradeUserList({
353
+          keyword: e || "",
354
+          page: 1,
355
+          limit: 20
356
+        })
357
+        .then(res => {
358
+          if (res.code == 200) {
359
+            this.userList = res.data.list;
360
+          }
361
+        });
362
+    },
363
+    // 获取项目列表
364
+    getProjectList(e) {
365
+      api
366
+        .tradeProjectList({
367
+          keyword: e || "",
368
+          page: 1,
369
+          limit: 20
370
+        })
371
+        .then(res => {
372
+          if (res.code == 200) {
373
+            this.projectList = res.data.list;
374
+          }
375
+        });
376
+    },
377
+    // 获取卡项列表
378
+    getCardList(e) {
379
+      api
380
+        .tradeCardList({
381
+          keyword: e || "",
382
+          page: 1,
383
+          limit: 20
384
+        })
385
+        .then(res => {
386
+          if (res.code == 200) {
387
+            this.cardList = res.data.list;
388
+          }
389
+        });
390
+    },
391
+    // 获取项目列表
392
+    getGoodsList(e) {
393
+      api
394
+        .tradeGoodsList({
395
+          keyword: e || "",
396
+          page: 1,
397
+          limit: 20
398
+        })
399
+        .then(res => {
400
+          if (res.code == 200) {
401
+            this.goodsList = res.data.list;
402
+          }
403
+        });
404
+    },
405
+    // 获取美容师列表
406
+    getSuserList() {
407
+      api
408
+        .tradeSuserList({
409
+          page: 1,
410
+          limit: 30
411
+        })
412
+        .then(res => {
413
+          if (res.code == 200) {
414
+            this.suserList = res.data.list;
415
+          }
416
+        });
417
+    },
418
+    // 输入搜索客户列表
419
+    filterName(e) {
420
+      this.getUserList(e);
421
+    },
422
+    // 输入搜索项目列表
423
+    filterProject(e) {
424
+      this.getProjectList(e);
425
+    },
426
+    // 输入搜索次卡列表
427
+    filterCard(e) {
428
+      this.getCardList(e);
429
+    },
430
+    // 输入搜索美妆产品列表
431
+    filterGoods(e) {
432
+      this.getGoodsList(e);
433
+    },
434
+    // 保存表单
435
+    save() {
436
+      // 验证
437
+      if (!this.user_id) {
438
+        this.$message.error("请选择客户");
439
+        return;
440
+      }
441
+      // console.log(this.suser_list);
442
+      // 产品列表
443
+      let project_list = [];
444
+      this.selectProject.forEach(item => {
445
+        let list = {};
446
+        list.id = item.project ? item.project.value : "";
447
+        list.name = item.project ? item.project.name : "";
448
+        list.category_name = item.category_name;
449
+        project_list.push(list);
450
+      });
451
+      // 次卡ID列表
452
+      let card_list = [];
453
+      this.selectCard.forEach(item => {
454
+        let list = {};
455
+        list.id = item.card ? item.card.value : "";
456
+        list.name = item.card ? item.card.name : "";
457
+        list.category_name = item.type;
458
+        card_list.push(list);
459
+      });
460
+      // 商品列表
461
+      let goods_list = [];
462
+      this.selectGoods.forEach(item => {
463
+        let list = {};
464
+        list.id = item.goods ? item.goods.value : "";
465
+        list.name = item.goods ? item.goods.name : "";
466
+        list.num = item.num;
467
+        list.category_name = item.type;
468
+        goods_list.push(list);
469
+      });
470
+      // 美容师列表
471
+      let suser_list = [];
472
+      this.suser_list.forEach(item => {
473
+        let list = {};
474
+        list.id = item.value;
475
+        list.name = item.name;
476
+        suser_list.push(list);
477
+      });
478
+      let params = {
479
+        user_id: this.user_id,
480
+        user_tag: this.user_tag,
481
+        source_online: this.source_online,
482
+        source_offline: this.source_offline,
483
+        order_type: this.order_type,
484
+        project_list,
485
+        is_single: this.is_single,
486
+        card_expend_price: this.card_expend_price,
487
+        single_price: this.single_price,
488
+        reduce_reason: this.reduce_reason,
489
+        card_list,
490
+        goods_list,
491
+        recharge_price: this.recharge_price,
492
+        total_price: this.total_price,
493
+        payer_price: this.payer_price,
494
+        pay_way: this.pay_way,
495
+        grant: this.grant,
496
+        conver: this.conver,
497
+        remark: this.remark,
498
+        suser_list
499
+      };
500
+      console.log(params);
501
+      api.tradeListAdd(params).then(res => {
502
+        if (res.code == 200) {
503
+          this.$message.success("添加成功");
504
+          setTimeout(() => {
505
+            this.$router.push("/revenueManage");
506
+          }, 1000);
507
+        }
508
+      });
509
+    }
510
+  },
511
+  created() {
512
+    // 获取客户列表
513
+    this.getUserList();
514
+    // 获取项目列表
515
+    this.getProjectList();
516
+    // 获取次卡列表
517
+    this.getCardList();
518
+    // 获取美妆产品列表
519
+    this.getGoodsList();
520
+    // 获取美容师列表
521
+    this.getSuserList();
522
+  }
523
+};
524
+</script>
525
+
526
+<style scoped lang='less'>
527
+.box {
528
+  width: 857px;
529
+  background-color: #fff;
530
+  border-radius: 10px;
531
+  padding: 14px;
532
+  box-sizing: border-box;
533
+  padding-bottom: 40px;
534
+  .notice {
535
+    color: red;
536
+  }
537
+  .headline {
538
+    display: flex;
539
+    justify-content: space-between;
540
+    align-items: center;
541
+    margin-bottom: 20px;
542
+    .saveOrder {
543
+      width: 70px;
544
+      height: 35px;
545
+      background: #fa7d22;
546
+      border-radius: 4px;
547
+      line-height: 35px;
548
+      text-align: center;
549
+      color: #fff;
550
+    }
551
+  }
552
+  // 选择客户消息
553
+  .titleBox {
554
+    display: flex;
555
+    align-items: center;
556
+    margin-top: 20px;
557
+    flex-wrap: wrap;
558
+    .title {
559
+      display: flex;
560
+      font-weight: 700;
561
+      align-items: center;
562
+      font-size: 12px;
563
+      /deep/ .el-select {
564
+        margin: 0 10px;
565
+        width: 150px;
566
+      }
567
+      .input {
568
+        width: 160px;
569
+        margin: 0 20px;
570
+      }
571
+      /deep/.el-input__inner:focus {
572
+        border: #fa7d22 1px solid;
573
+      }
574
+    }
575
+    .word {
576
+      margin-right: 10px;
577
+      font-size: 12px;
578
+    }
579
+    .clientSource {
580
+      font-weight: 700;
581
+      margin: 0 20px 0 30px;
582
+    }
583
+    .add {
584
+      width: 40px;
585
+      height: 20px;
586
+      background: #fa7d22;
587
+      border-radius: 4px;
588
+      line-height: 20px;
589
+      text-align: center;
590
+      color: #fff;
591
+      font-weight: 400;
592
+      font-size: 12px;
593
+      margin-right: 20px;
594
+      font-size: 12px;
595
+      display: inline-block;
596
+    }
597
+  }
598
+  /deep/ .el-divider.el-divider--horizontal {
599
+    margin: 34px 0;
600
+  }
601
+  // 中间功能样式
602
+  .center {
603
+    /deep/ .el-radio-button__orig-radio:checked + .el-radio-button__inner {
604
+      background-color: #fa7d22 !important;
605
+      border-color: #fa7d22 !important;
606
+      box-shadow: -1px 0 0 0 #fa7d22 !important;
607
+    }
608
+    .clientSource {
609
+      font-weight: 700;
610
+      margin: 0 20px 0 30px;
611
+    }
612
+    .centerBox1-box {
613
+      display: flex;
614
+      .centerBox1-productBox {
615
+        .productBox {
616
+          display: flex;
617
+          flex-wrap: wrap;
618
+          margin-top: 20px;
619
+          align-items: center;
620
+          .title {
621
+            font-weight: 700;
622
+            display: flex;
623
+            align-items: center;
624
+            font-size: 12px;
625
+            /deep/ .el-select {
626
+              margin: 0 10px;
627
+              width: 150px;
628
+            }
629
+          }
630
+          .el-icon-circle-close {
631
+            font-size: 20px;
632
+            // line-height: 32px;
633
+          }
634
+        }
635
+      }
636
+      .add {
637
+        width: 40px;
638
+        height: 20px;
639
+        background: #fa7d22;
640
+        border-radius: 4px;
641
+        line-height: 20px;
642
+        text-align: center;
643
+        color: #fff;
644
+        font-weight: 400;
645
+        font-size: 12px;
646
+        margin-right: 20px;
647
+        font-size: 12px;
648
+        margin-top: 22px;
649
+      }
650
+    }
651
+    .cardBox {
652
+      display: flex;
653
+      .add {
654
+        width: 40px;
655
+        height: 20px;
656
+        background: #fa7d22;
657
+        border-radius: 4px;
658
+        line-height: 20px;
659
+        text-align: center;
660
+        color: #fff;
661
+        font-weight: 400;
662
+        font-size: 12px;
663
+        margin-right: 20px;
664
+        font-size: 12px;
665
+        margin-top: 22px;
666
+        margin-left: 6px;
667
+      }
668
+    }
669
+    .isAlone {
670
+      font-weight: 700;
671
+      margin-top: 20px;
672
+      font-size: 12px;
673
+      /deep/ .el-radio:first-child {
674
+        margin-left: 20px;
675
+      }
676
+    }
677
+    /deep/ .moneyInput {
678
+      margin: 0 10px;
679
+      width: 160px;
680
+    }
681
+  }
682
+}
683
+</style>

+ 244 - 0
src/pages/revenueManage/details/index.vue

@@ -0,0 +1,244 @@
1
+<template>
2
+  <div class="mine">
3
+    <div class="box">
4
+      <h2>订单详情</h2>
5
+      <div class="content">
6
+        <!-- 客户信息 -->
7
+        <el-card>
8
+          <div class="orderInfo">
9
+            <h3>客户信息</h3>
10
+            <div class="orderInfoBOx">
11
+              <div class="title">
12
+                客户姓名:
13
+                <span>{{orderDetail.nickname}}</span>
14
+              </div>
15
+              <div class="title">
16
+                客户ID:
17
+                <span>{{orderDetail.user_id}}</span>
18
+              </div>
19
+              <div class="title">
20
+                客户标签:
21
+                <span>{{orderDetail.user_tag}}</span>
22
+              </div>
23
+              <div class="title">
24
+                客户来源:
25
+                <span>{{orderDetail.source_offline?orderDetail.source_offline:orderDetail.source_online}}</span>
26
+              </div>
27
+            </div>
28
+          </div>
29
+        </el-card>
30
+        <!-- 服务项目 -->
31
+        <el-card>
32
+          <div class="orderInfo">
33
+            <h3>服务项目</h3>
34
+            <div class="orderInfoBOx">
35
+              <div class="productBox" v-for="(item) in orderDetail.goods" :key="item.id">
36
+                <template v-if="item.type==1">
37
+                  <div class="productName">
38
+                    项目名称:
39
+                    <span>{{item.name}}</span>
40
+                  </div>
41
+                  <div class="title">
42
+                    项目分类:
43
+                    <span>{{item.category_name}}</span>
44
+                  </div>
45
+                  <!-- <div class="title">
46
+              项目价格:
47
+              <span></span>
48
+                  </div>-->
49
+                </template>
50
+              </div>
51
+              <div class="titleBox">
52
+                <div class="title">
53
+                  单买(预买未体验):
54
+                  <span>{{orderDetail.is_single==1?'是':'否'}}</span>
55
+                </div>
56
+                <div class="title">
57
+                  单买体验额:
58
+                  <span>{{orderDetail.single_price}}</span>
59
+                </div>
60
+                <div class="title">
61
+                  减免原由:
62
+                  <span>{{orderDetail.reduce_reason}}</span>
63
+                </div>
64
+              </div>
65
+            </div>
66
+          </div>
67
+        </el-card>
68
+        <!-- 当日销售类别 -->
69
+        <el-card>
70
+          <div class="orderInfo">
71
+            <h3>当日销售类别</h3>
72
+            <div class="orderInfoBOx">
73
+              <div class="productBox" v-for="(item) in orderDetail.goods" :key="item.id+'card'">
74
+                <template v-if="item.type==3">
75
+                  <div class="productName">
76
+                    卡项名称:
77
+                    <span>{{item.name}}</span>
78
+                  </div>
79
+                  <div class="title">
80
+                    多次卡分类:
81
+                    <span>{{item.category_name}}</span>
82
+                  </div>
83
+                </template>
84
+              </div>
85
+              <div class="titleBox" v-for="(item) in orderDetail.goods" :key="item.id+'pro'">
86
+                <template v-if="item.type==2">
87
+                  <div class="productName">
88
+                    产品名称:
89
+                    <span>{{item.name}}</span>
90
+                  </div>
91
+                  <div class="title">
92
+                    产品品牌:
93
+                    <span>{{item.category_name}}</span>
94
+                  </div>
95
+                  <div class="title">
96
+                    数量:
97
+                    <span>{{item.num}}</span>
98
+                  </div>
99
+                </template>
100
+              </div>
101
+              <div class="titleBox" v-for="(item) in orderDetail.goods" :key="item.id+'money'">
102
+                <template v-if="item.type==4">
103
+                  <div class="title">
104
+                    储值金额:
105
+                    <span>{{item.recharge_price}}</span>
106
+                  </div>
107
+                  <div class="title">
108
+                    实收金额:
109
+                    <span>{{orderDetail.payer_price}}</span>
110
+                  </div>
111
+                  <div class="title">
112
+                    销售总额:
113
+                    <span>{{orderDetail.total_price}}</span>
114
+                  </div>
115
+                  <div class="title">
116
+                    收款方式:
117
+                    <span>{{orderDetail.pay_way}}</span>
118
+                  </div>
119
+                </template>
120
+              </div>
121
+            </div>
122
+          </div>
123
+        </el-card>
124
+        <!-- 补充信息 -->
125
+        <el-card>
126
+          <div class="orderInfo">
127
+            <h3>补充信息</h3>
128
+            <div class="orderInfoBOx">
129
+              <div class="title">
130
+                美容师:
131
+                <span>{{orderDetail.suser_names}}</span>
132
+              </div>
133
+              <div class="title">
134
+                成交配赠:
135
+                <span>{{orderDetail.grant}}</span>
136
+              </div>
137
+              <div class="title">
138
+                新客转化:
139
+                <span>{{orderDetail.conver}}</span>
140
+              </div>
141
+              <div class="remark">
142
+                备注内容:
143
+                <span>{{orderDetail.remark}}</span>
144
+              </div>
145
+            </div>
146
+          </div>
147
+        </el-card>
148
+      </div>
149
+    </div>
150
+  </div>
151
+</template>
152
+
153
+<script>
154
+import api from "../../../server/home";
155
+export default {
156
+  data() {
157
+    return {
158
+      id: "", //订单id
159
+      orderDetail: "" //订单详情
160
+    };
161
+  },
162
+  methods: {
163
+    // 获取订单详情
164
+    getOrderDetail() {
165
+      api.tradeInfo({ id: this.id }).then(res => {
166
+        if (res.code == 200) {
167
+          this.orderDetail = res.data;
168
+        }
169
+      });
170
+    }
171
+  },
172
+  created() {
173
+    // 获取订单详情ID
174
+    this.id = this.$route.query.id;
175
+    // 获取订单详情
176
+    this.getOrderDetail();
177
+  }
178
+};
179
+</script>
180
+
181
+<style scoped lang='less'>
182
+.box {
183
+  width: 857px;
184
+  background-color: #fff;
185
+  border-radius: 10px;
186
+  padding: 14px;
187
+  box-sizing: border-box;
188
+  /deep/ .el-card {
189
+    margin-top: 16px;
190
+  }
191
+  .content {
192
+    margin-left: 10px;
193
+    .orderInfo {
194
+      // margin-top: 30px;
195
+      h3 {
196
+        margin-bottom: 10px;
197
+      }
198
+      .orderInfoBOx {
199
+        display: flex;
200
+        flex-wrap: wrap;
201
+        margin-left: 10px;
202
+        .title {
203
+          margin-top: 16px;
204
+          font-weight: 700;
205
+          font-size: 12px;
206
+          span {
207
+            font-weight: 400;
208
+            margin: 0 30px;
209
+          }
210
+        }
211
+        .productBox {
212
+          display: flex;
213
+        }
214
+        .productName {
215
+          width: 400px;
216
+          font-weight: 700;
217
+          overflow: hidden;
218
+          white-space: nowrap;
219
+          text-overflow: ellipsis;
220
+          margin-top: 16px;
221
+          font-size: 12px;
222
+          span {
223
+            font-weight: 400;
224
+            margin: 0 30px;
225
+          }
226
+        }
227
+        .titleBox {
228
+          display: flex;
229
+        }
230
+        .remark {
231
+          width: 100%;
232
+          margin-top: 16px;
233
+          font-weight: 700;
234
+          font-size: 12px;
235
+          span {
236
+            font-weight: 400;
237
+            margin: 0 30px;
238
+          }
239
+        }
240
+      }
241
+    }
242
+  }
243
+}
244
+</style>

+ 223 - 0
src/pages/revenueManage/index.vue

@@ -0,0 +1,223 @@
1
+<template>
2
+  <div class="mine">
3
+    <!-- 头部今日数据 -->
4
+    <div class="topBox">
5
+      <div class="title">
6
+        <h2>今日数据</h2>
7
+        <div class="date">{{dataTotal.date}}</div>
8
+      </div>
9
+      <div class="redact">
10
+        <div class="amountData">
11
+          <el-card>
12
+            <div class="titleBox">
13
+              <div class="title">销售金额:</div>
14
+              <div class="money">¥{{dataTotal.total_price}}</div>
15
+            </div>
16
+          </el-card>
17
+          <el-card>
18
+            <div class="titleBox">
19
+              <div class="title">消耗金额:</div>
20
+              <div class="money">¥{{dataTotal.card_expend_price}}</div>
21
+            </div>
22
+          </el-card>
23
+          <el-card>
24
+            <div class="titleBox">
25
+              <div class="title">实收金额:</div>
26
+              <div class="money">¥{{dataTotal.payer_price}}</div>
27
+            </div>
28
+          </el-card>
29
+        </div>
30
+        <!-- 创建订单 -->
31
+        <div class="createOrder" @click="createOrder">创建订单</div>
32
+      </div>
33
+    </div>
34
+    <!-- 订单列表 -->
35
+    <div class="orderList">
36
+      <el-table
37
+        ref="multipleTable"
38
+        :data="tableData"
39
+        tooltip-effect="dark"
40
+        height="500"
41
+        style="width: 100%; border-radius: 8px"
42
+        @row-click="goOrderDetail"
43
+      >
44
+        <el-table-column prop="create_at"  label="订单时间"></el-table-column>
45
+        <el-table-column prop="nickname"  label="用户姓名"></el-table-column>
46
+        <el-table-column prop="order_type"  label="订单类型">
47
+          <template slot-scope="scope">
48
+            <div>{{scope.row.order_type==1?'服务项目':'销售类型'}}</div>
49
+          </template>
50
+        </el-table-column>
51
+        <el-table-column prop="payer_price"  label="实收金额"></el-table-column>
52
+        <el-table-column prop="pay_way"  label="支付方式"></el-table-column>
53
+        <el-table-column prop="suser_names"  label="美容师"></el-table-column>
54
+        <el-table-column label="操作">
55
+          <template slot-scope="scope">
56
+            <div class="checkBtn" @click.stop="checkOrder(scope.row.id)">查看</div>
57
+          </template>
58
+        </el-table-column>
59
+      </el-table>
60
+      <div class="pagin">
61
+        <el-pagination
62
+          background
63
+          layout="prev, pager, next"
64
+          @current-change="handleCurrentChange"
65
+          :current-page.sync="currentPage"
66
+          :total="total"
67
+        ></el-pagination>
68
+      </div>
69
+    </div>
70
+  </div>
71
+</template>
72
+
73
+<script>
74
+import api from "../../server/home";
75
+export default {
76
+  data() {
77
+    return {
78
+      tableData: [], //订单列表数据
79
+      dataTotal: "", //管理订单统计
80
+      total: 0, //列表总条数
81
+      currentPage: 1 //页数
82
+    };
83
+  },
84
+  methods: {
85
+    //创建订单
86
+    createOrder() {
87
+      this.$router.push("/revenueManage/createOrder");
88
+    },
89
+    // 进入订单详情
90
+    checkOrder(e) {
91
+      this.$router.push(`/revenueManage/details?id=${e}`);
92
+    },
93
+    // 进入订单详情
94
+    goOrderDetail(e) {
95
+      let id = e.id;
96
+      this.$router.push(`/revenueManage/details?id=${id}`);
97
+    },
98
+    // 获取订单列表
99
+    getOrderList() {
100
+      api
101
+        .tradeList({
102
+          page: this.currentPage,
103
+          limit: 10
104
+        })
105
+        .then(res => {
106
+          if (res.code == 200) {
107
+            this.tableData = res.data.list;
108
+            this.total = res.data.total;
109
+          }
110
+        });
111
+    },
112
+    // 获取营收管理订单统计
113
+    getDataTotal() {
114
+      api.tradeDataTotal().then(res => {
115
+        if (res.code == 200) {
116
+          this.dataTotal = res.data;
117
+        }
118
+      });
119
+    },
120
+    handleCurrentChange(e) {
121
+      this.currentPage = e
122
+      this.getOrderList()
123
+    }
124
+  },
125
+  created() {
126
+    // 获取订单列表
127
+    this.getOrderList();
128
+    // 获取营收管理订单统计
129
+    this.getDataTotal();
130
+  }
131
+};
132
+</script>
133
+
134
+<style scoped lang='less'>
135
+.mine {
136
+  // 头部今日数据
137
+  .topBox {
138
+    width: 857px;
139
+    height: 100px;
140
+    background-color: #fff;
141
+    border-radius: 10px;
142
+    padding: 14px;
143
+    box-sizing: border-box;
144
+    .title {
145
+      display: flex;
146
+      align-items: center;
147
+      h2 {
148
+        margin-right: 20px;
149
+      }
150
+      .date {
151
+        font-weight: 700;
152
+      }
153
+    }
154
+    .redact {
155
+      display: flex;
156
+      width: 100%;
157
+      justify-content: space-between;
158
+      .amountData {
159
+        margin-top: 6px;
160
+        display: flex;
161
+        /deep/ .el-card {
162
+          margin-right: 16px;
163
+        }
164
+        .titleBox {
165
+          display: flex;
166
+          margin-right: 20px;
167
+          .title {
168
+            font-weight: 700;
169
+            margin-right: 5px;
170
+          }
171
+        }
172
+      }
173
+      .createOrder {
174
+        width: 90px;
175
+        height: 30px;
176
+        border-radius: 4px;
177
+        background-color: #fa7d22;
178
+        color: #fff;
179
+        text-align: center;
180
+        line-height: 30px;
181
+      }
182
+    }
183
+  }
184
+  // 订单列表
185
+  .orderList {
186
+    margin-top: 18px;
187
+    padding: 0 12px;
188
+    width: 857px;
189
+    background: #ffffff;
190
+    box-shadow: 0px 2px 4px 0px rgba(184, 191, 198, 0.2);
191
+    border-radius: 8px;
192
+    .checkBtn {
193
+      width: 50px;
194
+      height: 25px;
195
+      background: #fa7d22;
196
+      border-radius: 2px;
197
+      line-height: 25px;
198
+      text-align: center;
199
+      color: #fff;
200
+    }
201
+    .pagin {
202
+      padding: 20px 0;
203
+      .el-pagination {
204
+        text-align: center;
205
+      }
206
+    }
207
+    /deep/ .el-table tbody tr:hover > td {
208
+      background-color: transparent !important;
209
+    }
210
+    /deep/ .el-table th > .cell {
211
+      font-size: 14px !important;
212
+      font-family: PingFangSC-Regular, PingFang SC;
213
+      font-weight: 400;
214
+      color: #999999;
215
+      line-height: 20px;
216
+    }
217
+    /deep/ .el-table td,
218
+    .el-table th.is-leaf {
219
+      border-bottom: none;
220
+    }
221
+  }
222
+}
223
+</style>

+ 21 - 0
src/router/map/home.js

@@ -28,6 +28,9 @@ import productOrderDetails from '@/pages/productOrder/details/index'
28 28
 import cardOrderDetails from '@/pages/cardOrder/details/index'
29 29
 import cardOrder from '@/pages/cardOrder/index'
30 30
 import rechargeOrder from '@/pages/rechargeOrder/index'
31
+import revenueManage from '@/pages/revenueManage/index'
32
+import revenueManageDetail from '@/pages/revenueManage/details'
33
+import revenueManageCreateOrder from '@/pages/revenueManage/createOrder'
31 34
 export default {
32 35
   path: '/layout',
33 36
   name: '首页',
@@ -189,5 +192,23 @@ export default {
189 192
       isback: true,
190 193
     },
191 194
   },
195
+  {
196
+    path: '/revenueManage',
197
+    component: revenueManage,
198
+  },
199
+  {
200
+    path: '/revenueManage/details',
201
+    component: revenueManageDetail,
202
+    meta: {
203
+      isback: true,
204
+    },
205
+  },
206
+  {
207
+    path: '/revenueManage/createOrder',
208
+    component: revenueManageCreateOrder,
209
+    meta: {
210
+      isback: true,
211
+    },
212
+  },
192 213
   ]
193 214
 }

+ 35 - 3
src/server/home.js

@@ -309,8 +309,40 @@ export default class Home {
309 309
   static syncErpOrder(params) {
310 310
     return $http.post(url.syncErpOrder, params)
311 311
   }
312
-  // 同步erp订单
313
-  static checkCard(params) {
314
-    return $http.post(url.checkCard, params)
312
+  // 手动录入用户列表
313
+  static tradeUserList(params) {
314
+    return $http.get(url.tradeUserList, params)
315
+  }
316
+  // 手动录入项目列表
317
+  static tradeProjectList(params) {
318
+    return $http.get(url.tradeProjectList, params)
319
+  }
320
+  // 手动录入美妆列表
321
+  static tradeGoodsList(params) {
322
+    return $http.get(url.tradeGoodsList, params)
323
+  }
324
+  // 手动录入次卡列表
325
+  static tradeCardList(params) {
326
+    return $http.get(url.tradeCardList, params)
327
+  }
328
+  // 手动录入美容师列表
329
+  static tradeSuserList(params) {
330
+    return $http.get(url.tradeSuserList, params)
331
+  }
332
+  // 手动录入订单列表
333
+  static tradeListAdd(params) {
334
+    return $http.post(url.tradeListAdd, params)
335
+  }
336
+  // 营收管理列表
337
+  static tradeList(params) {
338
+    return $http.get(url.tradeList, params)
339
+  }
340
+  // 营收管理详情
341
+  static tradeInfo(params) {
342
+    return $http.get(url.tradeInfo, params)
343
+  }
344
+  // 营收管理订单统计
345
+  static tradeDataTotal(params) {
346
+    return $http.get(url.tradeDataTotal, params)
315 347
   }
316 348
 }

+ 28 - 1
src/server/urls.js

@@ -203,5 +203,32 @@ export default {
203 203
   syncErpOrder:'/v2/pad/order/sync_erp_order',
204 204
 
205 205
   // 核销次卡
206
-  checkCard:'/v2/pad/card/logoff'
206
+  checkCard:'/v2/pad/card/logoff',
207
+
208
+  // 手动录入用户列表
209
+  tradeUserList:'/v2/pad/trade_log/user_list',
210
+
211
+  // 手动录入项目列表
212
+  tradeProjectList:'/v2/pad/trade_log/project_list',
213
+
214
+  // 手动录入美妆列表
215
+  tradeGoodsList:'/v2/pad/trade_log/goods_list',
216
+
217
+  // 手动录入次卡列表
218
+  tradeCardList:'/v2/pad/trade_log/card_list',
219
+
220
+  // 手动录入美容师列表
221
+  tradeSuserList:'/v2/pad/trade_log/suser_list',
222
+
223
+  // 手动录入订单列表
224
+  tradeListAdd:'/v2/pad/trade_log/add',
225
+
226
+  // 营收管理列表
227
+  tradeList:'/v2/pad/trade_log/list',
228
+
229
+  // 营收管理详情
230
+  tradeInfo:'/v2/pad/trade_log/info',
231
+
232
+  // 营收管理订单统计
233
+  tradeDataTotal:'/v2/pad/trade_log/total',
207 234
 }