许成详 6 years ago
parent
commit
3da0b825d9

+ 1
- 1
config/index.js View File

@@ -12,7 +12,7 @@ module.exports = {
12 12
     proxyTable: {
13 13
       '/api': {
14 14
         // target: 'https://dp.huiju360.com.cn/hj_operations',
15
-        target: 'http://192.168.0.62:8080', //wf
15
+        target: 'http://localhost:8080', //wf
16 16
         // target: 'http://192.168.0.11:8088', //zys
17 17
         changeOrigin: true, // 如果接口跨域,需要进行这个参数配置
18 18
         // pathRewrite: {

BIN
dist/static/fonts/element-icons.6f0a763.ttf View File


+ 0
- 2
dist/static/js/manifest.3ad1d5771e9b13dbdad2.js View File

@@ -1,2 +0,0 @@
1
-!function(r){var n=window.webpackJsonp;window.webpackJsonp=function(e,u,c){for(var f,i,p,a=0,l=[];a<e.length;a++)i=e[a],o[i]&&l.push(o[i][0]),o[i]=0;for(f in u)Object.prototype.hasOwnProperty.call(u,f)&&(r[f]=u[f]);for(n&&n(e,u,c);l.length;)l.shift()();if(c)for(a=0;a<c.length;a++)p=t(t.s=c[a]);return p};var e={},o={2:0};function t(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return r[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}t.m=r,t.c=e,t.d=function(r,n,e){t.o(r,n)||Object.defineProperty(r,n,{configurable:!1,enumerable:!0,get:e})},t.n=function(r){var n=r&&r.__esModule?function(){return r.default}:function(){return r};return t.d(n,"a",n),n},t.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},t.p="./",t.oe=function(r){throw console.error(r),r}}([]);
2
-//# sourceMappingURL=manifest.3ad1d5771e9b13dbdad2.js.map

+ 4
- 4
src/pages/system/cardAndCouponManager/vipManager/edit.vue View File

@@ -23,7 +23,7 @@
23 23
             <div style="width:50%">
24 24
               <el-input
25 25
                 placeholder="请输入VIP卡数量"
26
-                v-model="postData.CardNum"
26
+                v-model="postData.TotalCount"
27 27
                 clearable>
28 28
               </el-input>
29 29
             </div>
@@ -35,7 +35,7 @@
35 35
             <div style="width:50%">
36 36
               <el-input
37 37
                 placeholder="请输入价格"
38
-                v-model="postData.Price"
38
+                v-model="postData.CardAmount"
39 39
                 clearable>
40 40
               </el-input>
41 41
             </div>
@@ -57,8 +57,8 @@ export default {
57 57
   data () {
58 58
     return {
59 59
       postData: {
60
-        CardNum: '', // 卡数量
61
-        Price: '', // 价格
60
+        TotalCount: '', // 卡数量
61
+        CardAmount: '', // 价格
62 62
         CaseId: '', // 案场id
63 63
       }
64 64
     }

+ 12
- 12
src/pages/system/cardAndCouponManager/vipManager/index.vue View File

@@ -53,7 +53,7 @@
53 53
     </div>
54 54
     <div class="system-table-box">
55 55
       <el-table
56
-        :data="currentList"
56
+        :data="vips.list"
57 57
         stripe
58 58
         style="width: 100%">
59 59
         <el-table-column
@@ -101,7 +101,9 @@
101 101
 </template>
102 102
 
103 103
 <script>
104
-import { mapState } from 'vuex'
104
+import { createNamespacedHelpers, mapState } from 'vuex'
105
+
106
+const { mapState: mapVipState, mapActions: mapVipActions } = createNamespacedHelpers('vip')
105 107
 
106 108
 export default {
107 109
   name: '',
@@ -116,16 +118,6 @@ export default {
116 118
         sellerName: '', // 销售姓名
117 119
         userName: '', // 用户名
118 120
       },
119
-      currentList: [{
120
-        CardNo: 'xxx',
121
-        Price: 'xxx',
122
-        Status: 'xxx',
123
-        SellerName: 'xxx',
124
-        CaseName: 'xxx',
125
-        UserName: 'xxx',
126
-        ActivationTime: 'xxx',
127
-        CreatTime: 'xxx',
128
-      }]
129 121
     }
130 122
   },
131 123
   mounted () {
@@ -134,6 +126,9 @@ export default {
134 126
     })
135 127
   },
136 128
   computed: {
129
+    ...mapVipState({
130
+      vips: x => x.vipList,
131
+    }),
137 132
     ...mapState({
138 133
       cases: x => x.app.cases.list,
139 134
       defaultCaseId: x => x.app.cases.default
@@ -148,14 +143,19 @@ export default {
148 143
     }
149 144
   },
150 145
   methods: {
146
+    ...mapVipActions([
147
+      'GetVipList',
148
+    ]),
151 149
     search () { // 搜索
152 150
       this.postData.page = 1
153 151
       this.currentList = []
154 152
       this.getList()
155 153
     },
156 154
     getList () { // 获取列表
155
+      this.GetVipList({...this.postData, caseid: this.CaseId})
157 156
     },
158 157
     handleCurrentChange (val) { // 跳转到分页
158
+      this.postData.page = val
159 159
       this.getList()
160 160
     },
161 161
     addVIP () {

+ 12
- 3
src/pages/system/cmsManager/majorProjects/edit.vue View File

@@ -126,7 +126,7 @@
126 126
               </template>
127 127
             </el-table-column>
128 128
           </el-table>
129
-            <el-button type="primary" size="mini" @click="addCourse">新增</el-button>
129
+            <el-button type="primary" size="mini" @click="coursesShow">新增</el-button>
130 130
         </li>
131 131
         <li class="flex-h">
132 132
           <span>是否前台展示:</span>
@@ -203,6 +203,7 @@ export default {
203 203
       imgs: null,
204 204
       detailimgs: null,
205 205
       selCourseVisible: false,
206
+      selCourseList: [],
206 207
     }
207 208
   },
208 209
   components: {},
@@ -224,6 +225,7 @@ export default {
224 225
       },
225 226
       set (val) {
226 227
         this.UpdateInfo({...this.detail, CaseId: val})
228
+        this.getCourse()
227 229
       }
228 230
     },
229 231
     imgsArr: {
@@ -324,6 +326,9 @@ export default {
324 326
     getDetail () {
325 327
       this.GetCaseInfo({id: this.id})
326 328
     },
329
+    getCourse () {
330
+      this.GetCourseList({caseid: this.CaseId, page: 1, pagesize: 100})
331
+    },
327 332
     toggleSelection (rows) {
328 333
       if (rows) {
329 334
         rows.forEach(row => {
@@ -344,15 +349,18 @@ export default {
344 349
       this.GetCourseList({caseid: this.CaseId, page: 1, pagesize: 100, callback: this.coursesShow})
345 350
     },
346 351
     coursesShow () {
352
+      this.selCourseList = this.detail.Courses || []
347 353
       this.selCourseVisible = true
348 354
       setTimeout(() => {
349
-        this.toggleSelection(this.coursesList.filter(x => (this.detail.Courses || []).filter(y => y.CourseId === x.CourseId).length > 0))
355
+        this.toggleSelection(this.coursesList.filter(x => (this.selCourseList || []).filter(y => y.CourseId === x.CourseId).length > 0))
350 356
       }, 30)
351 357
     },
352 358
     handleSelectionChange (val) {
353
-      this.UpdateInfo({...this.detail, Courses: val})
359
+      this.selCourseList = val
360
+      // this.UpdateInfo({...this.detail, Courses: val})
354 361
     },
355 362
     addCourseOk () {
363
+      this.UpdateInfo({...this.detail, Courses: this.selCourseList})
356 364
       this.selCourseVisible = false
357 365
     },
358 366
     deleteItem (row) {
@@ -360,6 +368,7 @@ export default {
360 368
     }
361 369
   },
362 370
   mounted () {
371
+    this.getCourse()
363 372
     const { id } = this.$route.query
364 373
     this.id = id
365 374
     if (id && id !== '') {

+ 16
- 1
src/pages/system/goodsManager/goodsTypeManager/add.vue View File

@@ -9,13 +9,27 @@
9 9
               <el-input
10 10
                 placeholder="请输入商品种类"
11 11
                 v-model="postData.TypeName"
12
+                maxlength="10"
12 13
                 clearable>
13 14
               </el-input>
14 15
             </div>
15 16
           </div>
16 17
         </li>
17 18
         <li class="flex-h">
18
-          <!-- <span>选择案场:</span> -->
19
+          <span>种类英文:</span>
20
+          <div class="flex-item">
21
+            <div style="width:50%">
22
+              <el-input
23
+                placeholder="请输入种类英文"
24
+                v-model="postData.EnglishName"
25
+                maxlength="10"
26
+                clearable>
27
+              </el-input>
28
+            </div>
29
+          </div>
30
+        </li>
31
+        <li class="flex-h">
32
+          <span>选择案场:</span>
19 33
           <div class="flex-item">
20 34
             <div style="width:50%">
21 35
               <el-select v-model="CaseId" placeholder="请选择">
@@ -52,6 +66,7 @@ export default {
52 66
         CreatUser: '', // 创建者(传空值)
53 67
         CreatTime: '', // 创建时间(传空值)
54 68
         Status: '', // 状态(传空值)
69
+        EnglishName: '',
55 70
       },
56 71
       caseAreaList: [
57 72
         {

+ 17
- 2
src/pages/system/goodsManager/goodsTypeManager/edit.vue View File

@@ -9,13 +9,27 @@
9 9
               <el-input
10 10
                 placeholder="请输入商品种类"
11 11
                 v-model="postData.TypeName"
12
+                maxlength="10"
12 13
                 clearable>
13 14
               </el-input>
14 15
             </div>
15 16
           </div>
16 17
         </li>
17 18
         <li class="flex-h">
18
-          <!-- <span>选择案场:</span> -->
19
+          <span>种类英文:</span>
20
+          <div class="flex-item">
21
+            <div style="width:50%">
22
+              <el-input
23
+                placeholder="请输入种类英文"
24
+                v-model="postData.EnglishName"
25
+                maxlength="10"
26
+                clearable>
27
+              </el-input>
28
+            </div>
29
+          </div>
30
+        </li>
31
+        <li class="flex-h">
32
+          <span>选择案场:</span>
19 33
           <div class="flex-item">
20 34
             <div style="width:50%">
21 35
               <el-select v-model="CaseId" placeholder="请选择">
@@ -49,7 +63,8 @@ export default {
49 63
         TypeName: '',
50 64
         Status: '',
51 65
         OrgId: '',
52
-        CaseId: ''
66
+        CaseId: '',
67
+        EnglishName: '',
53 68
       },
54 69
     }
55 70
   },

+ 221
- 0
src/pages/system/newOrder/caseRecord/index.vue View File

@@ -0,0 +1,221 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <div class="flex-item flex-h">
6
+          <el-button size="mini" type="success" @click='addVisible = true'>新增</el-button>
7
+        </div>
8
+        <ul>
9
+          <li>
10
+            <!-- <span>选择案场:</span> -->
11
+            <el-select v-model="CaseId" placeholder="请选择">
12
+              <el-option
13
+                v-for="item in cases"
14
+                :key="item.CaseId"
15
+                :label="item.CaseName"
16
+                :value="item.CaseId">
17
+              </el-option>
18
+            </el-select>
19
+          </li>
20
+        </ul>
21
+        <el-button
22
+          size="mini"
23
+          type="primary" @click="search">搜索</el-button>
24
+      </div>
25
+      <div class="moreFilter"></div>
26
+    </div>
27
+    <div class="system-table-box">
28
+      <el-table :data="records.list" stripe style="width: 100%">
29
+        <el-table-column prop="CaseId" label="案场">
30
+          <template slot-scope="scope">
31
+            {{getCaseName(scope.row.CaseId)}}
32
+          </template>
33
+        </el-table-column>
34
+        <el-table-column prop="Month" label="月份">
35
+        </el-table-column>
36
+        <el-table-column prop="Num" label="规定次数">
37
+        </el-table-column>
38
+        <el-table-column prop="ActrualNum" label="实际次数">
39
+        </el-table-column>
40
+        <el-table-column prop="OverNum" label="超出次数">
41
+        </el-table-column>
42
+        <el-table-column prop="LeftNum" label="剩余次数">
43
+        </el-table-column>
44
+        <el-table-column fixed='right' label="操作" width="300">
45
+          <template slot-scope="scope">
46
+            <el-button size="mini" type="warning" @click="handleReport(scope.row)">导出Excel</el-button>
47
+          </template>
48
+        </el-table-column>
49
+      </el-table>
50
+      <el-pagination
51
+        @current-change="handleCurrentChange"
52
+        :current-page.sync="postData.page"
53
+        :page-size="postData.pagesize"
54
+        layout="prev, pager, next, jumper"
55
+        :total="records.pagenum">
56
+      </el-pagination>
57
+    </div>
58
+    <el-dialog
59
+      title="新增月记录"
60
+      :visible.sync="addVisible"
61
+      width="500px"
62
+      center>
63
+      <div>
64
+        <form class="mainForm">
65
+          <ul>
66
+            <li class="flex-h">
67
+              <span>对应案场:</span>
68
+              <div class="flex-item">
69
+                <div style="width:50%">
70
+                  <el-select v-model="detail.CaseId" placeholder="请选择">
71
+                    <el-option
72
+                      v-for="item in cases"
73
+                      :key="item.CaseId"
74
+                      :label="item.CaseName"
75
+                      :value="item.CaseId">
76
+                    </el-option>
77
+                  </el-select>
78
+                </div>
79
+              </div>
80
+            </li>
81
+            <li class="flex-h">
82
+              <span>月份:</span>
83
+              <div class="flex-item">
84
+                <div style="width:50%">
85
+                  <el-date-picker
86
+                    v-model="detail.Month"
87
+                    type="month"
88
+                    placeholder="选择月">
89
+                  </el-date-picker>
90
+                </div>
91
+              </div>
92
+            </li>
93
+            <li class="flex-h">
94
+              <span>规定次数:</span>
95
+              <div class="flex-item">
96
+                <div style="width:50%">
97
+                  <el-input v-model="detail.Num" placeholder="请输入规定次数"></el-input>
98
+                </div>
99
+              </div>
100
+            </li>
101
+          </ul>
102
+        </form>
103
+      </div>
104
+      <span slot="footer" class="dialog-footer">
105
+        <el-button @click="addVisible = false">取 消</el-button>
106
+        <el-button type="primary" @click="submit">保 存</el-button>
107
+      </span>
108
+    </el-dialog>
109
+  </div>
110
+</template>
111
+
112
+<script>
113
+import { createNamespacedHelpers, mapState } from 'vuex'
114
+
115
+const { mapState: mapRecordState, mapActions: mapRecordActions } = createNamespacedHelpers('caserecord')
116
+const { mapState: mapOrdersState, mapActions: mapOrdersActions } = createNamespacedHelpers('goodsorder')
117
+
118
+export default {
119
+  name: '',
120
+  data () {
121
+    return {
122
+      addVisible: false,
123
+      excelData: [],
124
+      detail: {
125
+        CaseId: '',
126
+        Month: '',
127
+        Num: 0,
128
+      },
129
+      postData: {
130
+        caseid: '',
131
+        page: 1,
132
+        pagesize: 10,
133
+      }
134
+    }
135
+  },
136
+  computed: {
137
+    ...mapState({
138
+      cases: x => x.app.cases.list,
139
+      defaultCaseId: x => x.app.cases.default
140
+    }),
141
+    ...mapRecordState({
142
+      records: x => x.recordList,
143
+    }),
144
+    ...mapOrdersState({
145
+      orders: x => x.recordOrders,
146
+    }),
147
+    CaseId: {
148
+      get () {
149
+        return this.postData.caseid || this.defaultCaseId
150
+      },
151
+      set (val) {
152
+        this.postData.caseid = val
153
+      }
154
+    },
155
+  },
156
+  methods: {
157
+    ...mapRecordActions([
158
+      'GetRecordList',
159
+      'AddRecord',
160
+    ]),
161
+    ...mapOrdersActions([
162
+      'GetOrdersByRecord',
163
+    ]),
164
+    getCaseName (caseid) {
165
+      return ((this.cases.filter(x => x.CaseId === caseid) || [])[0] || {}).CaseName
166
+    },
167
+    search () {
168
+      this.getList()
169
+    },
170
+    submit () {
171
+      if (this.detail.CaseId === '') {
172
+        this.$message({
173
+          type: 'error',
174
+          message: '请先选择对应案场!'
175
+        })
176
+        return
177
+      }
178
+      if (this.detail.Month === '') {
179
+        this.$message({
180
+          type: 'error',
181
+          message: '请先选择月份!'
182
+        })
183
+        return
184
+      }
185
+      if (this.detail.Num <= 0) {
186
+        this.$message({
187
+          type: 'error',
188
+          message: '请输入规定次数!'
189
+        })
190
+        return
191
+      }
192
+      this.AddRecord({...this.detail, callback: this.afterSave, Month: this.toolClass.dateFormat(this.detail.Month, 'yyyy-MM')})
193
+    },
194
+    afterSave () {
195
+      this.$message({
196
+        type: 'success',
197
+        message: '保存成功!'
198
+      })
199
+      this.addVisible = false
200
+      this.getList()
201
+    },
202
+    getList () {
203
+      this.GetRecordList({...this.postData, caseid: this.CaseId})
204
+    },
205
+    handleCurrentChange (val) { // 跳转到分页
206
+      this.postData.page = val
207
+      this.getList()
208
+    },
209
+    handleReport (row) {
210
+      this.GetOrdersByRecord({id: row.RecordId, callback: this.ordersExport})
211
+    },
212
+  },
213
+  mounted () {
214
+    this.getList()
215
+  }
216
+}
217
+</script>
218
+
219
+<!-- Add "scoped" attribute to limit CSS to this component only -->
220
+<style lang="scss" scoped>
221
+</style>

+ 216
- 0
src/pages/system/newOrder/monthOrder/index.vue View File

@@ -0,0 +1,216 @@
1
+<template>
2
+  <div class="subPage">
3
+    <div class="system-table-search">
4
+      <div class="flex-h">
5
+        <div class="flex-item flex-h">
6
+          <el-button size="mini" type="success" @click='addMajorProjects'>新增</el-button>
7
+        </div>
8
+        <ul>
9
+          <li>
10
+            <span>选择案场:</span>
11
+            <el-select v-model="tableSearch.caseId" placeholder="请选择">
12
+              <el-option
13
+              value=""
14
+              >
15
+              </el-option>
16
+              <el-option
17
+                v-for="item in caseList"
18
+                :key="item.CaseId"
19
+                :label="item.CaseName"
20
+                :value="item.CaseId">
21
+              </el-option>
22
+            </el-select>
23
+          </li>
24
+        </ul>
25
+        <el-button
26
+          size="mini"
27
+          type="primary" @click="search">搜索</el-button>
28
+      </div>
29
+      <div class="moreFilter"></div>
30
+    </div>
31
+    <div class="system-table-box">
32
+      <el-table
33
+        :data="tableData"
34
+        stripe
35
+        style="width: 100%">
36
+        <el-table-column
37
+          prop="Name"
38
+          label="案场">
39
+        </el-table-column>
40
+        <el-table-column
41
+          prop="Title"
42
+          label="月份">
43
+        </el-table-column>
44
+        <el-table-column
45
+          prop="CaseName"
46
+          label="规定次数">
47
+        </el-table-column>
48
+        <el-table-column
49
+          prop="CreateDate"
50
+          label="实际次数">
51
+        </el-table-column>
52
+        <el-table-column
53
+          prop="CreateDate"
54
+          label="超出次数">
55
+        </el-table-column>
56
+        <el-table-column
57
+          prop="CreateDate"
58
+          label="剩余次数">
59
+        </el-table-column>
60
+        <el-table-column label="操作" width="450">
61
+          <template slot-scope="scope">
62
+            <el-button
63
+              size="mini"
64
+              type="primary"
65
+              @click="deleteItem(scope.$index, scope.row)">导出Excel</el-button>
66
+          </template>
67
+        </el-table-column>
68
+      </el-table>
69
+    </div>
70
+    <el-pagination
71
+      @current-change="handleCurrentChange"
72
+      :current-page.sync="postData.currentPage"
73
+      :page-size="postData.pageSize"
74
+      layout="prev, pager, next, jumper"
75
+      :total="postData.total">
76
+    </el-pagination>
77
+  </div>
78
+</template>
79
+
80
+<script>
81
+import { mapState, mapActions } from 'vuex'
82
+
83
+export default {
84
+  name: '',
85
+  data () {
86
+    return {
87
+      postData: {
88
+        currentPage: 1, // 当前页码
89
+        pageSize: 10,
90
+        total: 0,
91
+      },
92
+      tableSearch: { // 表格搜索条件
93
+        key: '', // 搜索关键字
94
+        caseId: '', // 案场id
95
+      },
96
+      tableData: []
97
+    }
98
+  },
99
+  computed: {
100
+    ...mapState({
101
+      OrgId: x => x.app.user.OrgId,
102
+      caseList: x => x.app.cases.list,
103
+      defaultCaseId: x => x.app.cases.default
104
+    })
105
+  },
106
+  components: {
107
+    // tableSearch,
108
+  },
109
+  created () {
110
+    this.updateSystemInfo().then(() => {
111
+      // this.tableSearch.caseId = this.defaultCaseId
112
+      this.getList()
113
+    })
114
+  },
115
+  methods: {
116
+    ...mapActions(['updateSystemInfo']),
117
+    handleCurrentChange (val) {
118
+      this.postData.currentPage = val
119
+      this.getList()
120
+    },
121
+    showItem (index, row) { // 前台显示
122
+      this.editIsAllCourse(row)
123
+    },
124
+    editItem (index, row) { // 编辑
125
+      console.log(index, row)
126
+      this.$router.push({ name: 'editIndexCase', query: { id: row.CmsCaseId } })
127
+    },
128
+    // copyItemUrl (index, row) { // 复制专题链接
129
+    //   console.log(index, row)
130
+    //   window.clipboardData.setData('Text', row.Title)
131
+    // },
132
+    deleteItem (index, row) { // 删除
133
+      console.log(index, row)
134
+      this.$confirm('确认删除此项目专题?', '提示', {
135
+        confirmButtonText: '确定',
136
+        cancelButtonText: '取消',
137
+        type: 'warning'
138
+      }).then(() => {
139
+        this.deleteInfo(row.CmsCaseId)
140
+      }).catch(() => {
141
+        this.$message({
142
+          type: 'info',
143
+          message: '已取消删除'
144
+        })
145
+      })
146
+    },
147
+    searchList (key) { // 搜索列表
148
+      this.tableSearch.key = key
149
+      this.getList()
150
+    },
151
+    addMajorProjects () {
152
+      this.$router.push({ name: 'addIndexCase' })
153
+    },
154
+    getList () {
155
+      this.tableData = []
156
+      this.$ajax(this.$api.cms.case.url, {
157
+        method: this.$api.cms.case.method,
158
+        queryData: {
159
+          page: this.postData.currentPage,
160
+          pagesize: this.postData.pageSize,
161
+          caseid: this.tableSearch.caseId,
162
+          name: this.tableSearch.key
163
+        }
164
+      }).then(res => {
165
+        for (let i = 0; i < res.list.length; i++) {
166
+          res.list[i].CreateDate = this.toolClass.dateFormat(res.list[i].CreateDate)
167
+        }
168
+        this.tableData = res.list
169
+        this.postData.total = res.pagenum
170
+        this.postData.currentPage = res.page
171
+      }).catch(msg => {
172
+
173
+      })
174
+    },
175
+    deleteInfo (id) {
176
+      this.$ajax(this.$api.cms.deleteCase.url, {
177
+        method: this.$api.cms.deleteCase.method,
178
+        urlData: {
179
+          id: id
180
+        }
181
+      }).then(res => {
182
+        this.$message({
183
+          type: 'success',
184
+          message: '删除成功!'
185
+        })
186
+        this.getList()
187
+      }).catch(msg => {
188
+
189
+      })
190
+    },
191
+    editIsAllCourse (data) {
192
+      console.log(data)
193
+      let api = data.Status === 1 ? this.$api.cms.caseHide : this.$api.cms.caseShow
194
+      this.$ajax(api.url, {
195
+        method: api.method,
196
+        urlData: {
197
+          id: data.CmsCaseId
198
+        }
199
+      }).then(res => {
200
+        this.$message({
201
+          message: '编辑成功',
202
+          type: 'success',
203
+          duration: 1000
204
+        })
205
+        this.getList()
206
+      }).catch(msg => {
207
+
208
+      })
209
+    },
210
+  }
211
+}
212
+</script>
213
+
214
+<!-- Add "scoped" attribute to limit CSS to this component only -->
215
+<style lang="scss" scoped>
216
+</style>

+ 45
- 49
src/pages/system/newOrder/newOrderList/index.vue View File

@@ -9,8 +9,8 @@
9 9
       <div class="moreFilter"></div>
10 10
     </div>
11 11
     <div class="order-list-box">
12
-      <div v-for="(item,index) in list" :key="index">
13
-        <div class="print-area" :class="'item' + index">
12
+      <div style='position:relative;' v-for="(item,index) in list" :key="index">
13
+        <div>
14 14
           <div style="padding:25px 20px 5px;border-bottom:2px solid #cccccc;">
15 15
             <i class="iconfont icon-yinchenglogo" style="font-size:70px;color:red;position: relative;bottom: 20px;margin-right:10px;"></i>
16 16
             <div style="display:inline-block;">
@@ -30,37 +30,27 @@
30 30
               <span style="display:inline-block;width:20%;text-align:right">x 2</span>
31 31
             </div>
32 32
           </div>
33
-          <div style="padding:10px 20px 5px;border-bottom:1px solid #cccccc;">
34
-            <div>卡布奇诺</div>
35
-            <div style="margin-top:8px;">
36
-              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">热</span>
37
-              <span style="display:inline-block;width:20%;text-align:right">x 1</span>
38
-            </div>
39
-            <div style="margin-top:8px;">
40
-              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">冷</span>
41
-              <span style="display:inline-block;width:20%;text-align:right">x 2</span>
42
-            </div>
43
-          </div>
44
-          <div style="padding:10px 20px 5px;border-bottom:1px solid #cccccc;">
45
-            <div>卡布奇诺</div>
46
-            <div style="margin-top:8px;">
47
-              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">热</span>
48
-              <span style="display:inline-block;width:20%;text-align:right">x 1</span>
49
-            </div>
50
-            <div style="margin-top:8px;">
51
-              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">冷</span>
52
-              <span style="display:inline-block;width:20%;text-align:right">x 2</span>
33
+          <div style="padding:10px 20px;border-bottom:1px solid #cccccc">备注:请赶快制作</div>
34
+          <div style="padding:10px 20px;">下单人:xxxxx</div>
35
+        </div>
36
+        <div class="print-area" :class="'item' + index" style="width:180px;">
37
+          <div style="padding:25px 20px 5px;border-bottom:2px solid #cccccc;">
38
+            <div style="display:inline-block;">
39
+              <img class="topIcon" style="display:block;width:60%;margin:0 0 20px 10px;" src="http://jingcheng-resourceplat.oss-cn-shanghai.aliyuncs.com/upload/111101940020.png" alt="">
40
+              <span style="display:block;font-size:20px;font-weight:700;"> <img width='25px' height="25px" src="http://jingcheng-resourceplat.oss-cn-shanghai.aliyuncs.com/upload/111101940020.png" alt=""> A区域1号桌</span>
41
+              <span style="display:block;margin-top:10px;font-size:12px;">下单时间:21:30:39</span>
42
+              <span style="display:block;margin-top:10px;font-size:12px;">已等待:<span style="color:red;font-weight:700;">30:29</span></span>
53 43
             </div>
54 44
           </div>
55 45
           <div style="padding:10px 20px 5px;border-bottom:1px solid #cccccc;">
56 46
             <div>卡布奇诺</div>
57 47
             <div style="margin-top:8px;">
58
-              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">热</span>
59
-              <span style="display:inline-block;width:20%;text-align:right">x 1</span>
48
+              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc;font-size:12px;">热</span>
49
+              <span style="display:inline-block;width:20%;text-align:right;font-size:12px;">x 1</span>
60 50
             </div>
61 51
             <div style="margin-top:8px;">
62
-              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc">冷</span>
63
-              <span style="display:inline-block;width:20%;text-align:right">x 2</span>
52
+              <span style="display:inline-block;width:75%;text-align:left;color:#cccccc;font-size:12px;">冷</span>
53
+              <span style="display:inline-block;width:20%;text-align:right;font-size:12px;">x 2</span>
64 54
             </div>
65 55
           </div>
66 56
           <div style="padding:10px 20px;border-bottom:1px solid #cccccc">备注:请赶快制作</div>
@@ -95,7 +85,7 @@ export default {
95 85
         pagesize: 10, // 请求数据量
96 86
       },
97 87
       currentList: [],
98
-      list: [1, 2, 3, 4, 5]
88
+      list: [1]
99 89
     }
100 90
   },
101 91
   components: {
@@ -115,21 +105,43 @@ export default {
115 105
       'GetOrdersList',
116 106
     ]),
117 107
     submit (cl) {
118
-      this.printPdf(cl)
108
+      this.$confirm('确定完成此饮品?', '提示', {
109
+        confirmButtonText: '确定',
110
+        cancelButtonText: '取消',
111
+        type: 'warning'
112
+      }).then((res) => {
113
+        // this.printPdf(cl)
114
+      }).catch((res) => {
115
+        this.$message({
116
+          type: 'info',
117
+          message: '已取消'
118
+        })
119
+      })
119 120
     },
120 121
     printPdf (cl) {
121 122
       this.CreateOneFormPage(cl)
122
-      //        LODOP.PRINT();
123
-      LODOP.PREVIEW()
123
+      LODOP.PRINT()
124
+      // LODOP.PREVIEW()
124 125
     },
125 126
     CreateOneFormPage (cl) {
126 127
       LODOP = getLodop()
127 128
       LODOP.PRINT_INIT('订单')
128
-      LODOP.SET_PRINT_PAGESIZE(0, document.getElementsByClassName(cl)[0].offsetWidth * 10 / 4 + 100, document.getElementsByClassName(cl)[0].offsetHeight * 10 / 4 + 120, 'CreateCustomPage')
129
+      LODOP.SET_PRINT_PAGESIZE(3, 480, 40, '')
129 130
       LODOP.ADD_PRINT_HTM(0, 0, document.getElementsByClassName(cl)[0].offsetWidth, document.getElementsByClassName(cl)[0].offsetHeight, document.getElementsByClassName(cl)[0].innerHTML)
130 131
     },
131 132
     cancel () {
132
-
133
+      this.$confirm('确定取消此饮品?', '提示', {
134
+        confirmButtonText: '确定',
135
+        cancelButtonText: '取消',
136
+        type: 'warning'
137
+      }).then((res) => {
138
+        // this.cancel()
139
+      }).catch((res) => {
140
+        this.$message({
141
+          type: 'info',
142
+          message: '已取消'
143
+        })
144
+      })
133 145
     },
134 146
     initWebSocket (code) {
135 147
       const wsuri = `${baseUrl}/websocket/${code}`
@@ -142,23 +154,7 @@ export default {
142 154
       this.websock.onclose = this.websocketclose
143 155
     },
144 156
     websocketonmessage (e) {
145
-      const redata = JSON.parse(e.data)
146
-      if (redata.code === '1') {
147
-        this.$toast({
148
-          message: '核销成功',
149
-          position: 'center',
150
-          duration: 1000
151
-        })
152
-        setTimeout(() => {
153
-          this.$router.go(-1)
154
-        }, 1000)
155
-      } else {
156
-        // this.$toast({
157
-        //   message: redata.message,
158
-        //   position: 'center',
159
-        //   duration: 1000
160
-        // })
161
-      }
157
+      // const redata = JSON.parse(e.data)
162 158
     }
163 159
   }
164 160
 }

+ 6
- 0
src/pages/system/newOrder/newOrderList/page.scss View File

@@ -14,6 +14,12 @@
14 14
     box-shadow: 0px 2px 10px 0px rgba(193, 204, 217, 0.5);
15 15
     padding-bottom: 10px;
16 16
   }
17
+  .print-area{
18
+    position: absolute;
19
+    z-index: -1;
20
+    top: 0;
21
+    left: 0;
22
+  }
17 23
   .btns{
18 24
     display: flex;
19 25
     justify-content: center;

+ 7
- 0
src/pages/system/page.js View File

@@ -89,6 +89,8 @@ import vipList from './cardAndCouponManager/vipManager/index' // vip列表
89 89
 import editVip from './cardAndCouponManager/vipManager/edit' // 编辑vip
90 90
 import activateVip from './cardAndCouponManager/vipManager/activateVip' // 激活vip
91 91
 
92
+import caseRecord from './newOrder/caseRecord/index' // 月记录
93
+
92 94
 export default {
93 95
   router: [
94 96
     {
@@ -429,6 +431,11 @@ export default {
429 431
           name: 'newOrderList',
430 432
           component: newOrderList,
431 433
           children: []
434
+        }, { // 月记录
435
+          path: 'caseRecord',
436
+          name: 'caseRecord',
437
+          component: caseRecord,
438
+          children: []
432 439
         }]
433 440
       }, { // 数据统计
434 441
         path: 'dataStatistics',

+ 41
- 0
src/store/card/vip.js View File

@@ -0,0 +1,41 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    vipList: [],
8
+  },
9
+  mutations: {
10
+    updateList (state, payload) {
11
+      state.vipList = payload || []
12
+    },
13
+  },
14
+  actions: {
15
+    GetVipList ({ commit }, payload) {
16
+      return new Promise((resolve, reject) => {
17
+        ajax(api.cardManager.viplist.url, {
18
+          method: api.cardManager.viplist.method,
19
+          queryData: {
20
+            ...payload,
21
+          }
22
+        }).then(res => {
23
+          commit('updateList', res)
24
+          resolve(res)
25
+        }).catch(reject)
26
+      })
27
+    },
28
+    AddVip ({ commit }, payload) {
29
+      return new Promise((resolve, reject) => {
30
+        ajax(api.cardManager.vipadd.url, {
31
+          method: api.cardManager.vipadd.method,
32
+          data: {
33
+            ...payload,
34
+          }
35
+        }).then(res => {
36
+          resolve(res)
37
+        }).catch(reject)
38
+      })
39
+    }
40
+  }
41
+}

+ 41
- 0
src/store/case/record.js View File

@@ -0,0 +1,41 @@
1
+import ajax from '../../util/ajax'
2
+import api from '../../util/api'
3
+
4
+export default {
5
+  namespaced: true,
6
+  state: {
7
+    recordList: [],
8
+  },
9
+  mutations: {
10
+    updateList (state, payload) {
11
+      state.recordList = payload || []
12
+    },
13
+  },
14
+  actions: {
15
+    GetRecordList ({ commit }, payload) {
16
+      ajax(api.caseManager.getRecordList.url, {
17
+        method: api.caseManager.getRecordList.method,
18
+        queryData: {
19
+          ...payload,
20
+        }
21
+      }).then(res => {
22
+        commit('updateList', res)
23
+        if (payload.callback) {
24
+          payload.callback()
25
+        }
26
+      })
27
+    },
28
+    AddRecord ({ commit }, payload) {
29
+      ajax(api.caseManager.addRecord.url, {
30
+        method: api.caseManager.addRecord.method,
31
+        data: {
32
+          ...payload,
33
+        }
34
+      }).then(res => {
35
+        if (payload.callback) {
36
+          payload.callback()
37
+        }
38
+      })
39
+    },
40
+  }
41
+}

+ 17
- 0
src/store/goods/order.js View File

@@ -5,11 +5,15 @@ export default {
5 5
   namespaced: true,
6 6
   state: {
7 7
     ordersList: [],
8
+    recordOrders: [],
8 9
   },
9 10
   mutations: {
10 11
     updateList (state, payload) {
11 12
       state.ordersList = payload || []
12 13
     },
14
+    updateRecordList (state, payload) {
15
+      state.recordOrders = payload || []
16
+    },
13 17
   },
14 18
   actions: {
15 19
     GetOrdersList ({ commit }, payload) {
@@ -22,5 +26,18 @@ export default {
22 26
         commit('updateList', res)
23 27
       })
24 28
     },
29
+    GetOrdersByRecord ({ commit }, { id, callback }) {
30
+      ajax(api.goodsOrder.getOrdersByRecord.url, {
31
+        method: api.goodsOrder.getOrdersByRecord.method,
32
+        urlData: {
33
+          id
34
+        }
35
+      }).then(res => {
36
+        commit('updateRecordList', res)
37
+        if (callback) {
38
+          callback()
39
+        }
40
+      })
41
+    }
25 42
   }
26 43
 }

+ 2
- 0
src/store/index.js View File

@@ -24,6 +24,8 @@ export const modules = {
24 24
   verification: () => require('./verification/verification').default,
25 25
   goodsorder: () => require('./goods/order').default,
26 26
   cmscase: () => require('./cms/case').default,
27
+  caserecord: () => require('./case/record').default,
28
+  vip: () => require('./card/vip').default,
27 29
 }
28 30
 
29 31
 Object.keys(modules).forEach((modKey) => {

+ 27
- 1
src/util/api.js View File

@@ -1,4 +1,4 @@
1
-const baseUrl = '/api'
1
+const baseUrl = '/api-v2'
2 2
 const common = '/common/:org'
3 3
 const guest = '/guest/:org'
4 4
 
@@ -196,6 +196,14 @@ const $api = {
196 196
       method: 'get',
197 197
       url: `${baseUrl}${common}/usertype`
198 198
     },
199
+    getRecordList: {
200
+      method: 'get',
201
+      url: `${baseUrl}${common}/case/record`
202
+    },
203
+    addRecord: {
204
+      method: 'post',
205
+      url: `${baseUrl}${common}/case/record`
206
+    },
199 207
   },
200 208
   goodsManager: {
201 209
     getGoodsSpecList: { // 商品规格列表
@@ -530,6 +538,24 @@ const $api = {
530 538
       method: 'get',
531 539
       url: `${baseUrl}${common}/order/online/goods`
532 540
     },
541
+    getOrdersByRecord: {
542
+      method: 'get',
543
+      url: `${baseUrl}${common}/order/goods/record/:id`
544
+    },
545
+  },
546
+  cardManager: {
547
+    viplist: {
548
+      method: 'get',
549
+      url: `${baseUrl}${common}/vipcard`
550
+    },
551
+    vipadd: {
552
+      method: 'post',
553
+      url: `${baseUrl}${common}/vipcard`
554
+    },
555
+    vipcharge: {
556
+      method: 'put',
557
+      url: `${baseUrl}${common}/vipcard/:code`
558
+    },
533 559
   },
534 560
 }
535 561
 export default $api