Bladeren bron

Merge branch 'master' of http://192.168.1.222:3000/zhengbingbing/ZLJ_UI_V6.0

zhengbingbing 5 jaren geleden
bovenliggende
commit
246e28ec83
45 gewijzigde bestanden met toevoegingen van 3286 en 633 verwijderingen
  1. 13 4
      CallCenterWeb.UI/src/api/afterSaleManagement/afterSaleList.js
  2. 18 0
      CallCenterWeb.UI/src/api/custodianManagement/orderListCustodian.js
  3. 53 0
      CallCenterWeb.UI/src/api/customerServiceManagement/orderListCustomerService.js
  4. 42 0
      CallCenterWeb.UI/src/api/dashboard/orderDatas.js
  5. 0 53
      CallCenterWeb.UI/src/api/orderManagement/orderList.js
  6. 83 77
      CallCenterWeb.UI/src/views/afterSaleManagement/afterSaleList/addOrEdit.vue
  7. 23 23
      CallCenterWeb.UI/src/views/afterSaleManagement/afterSaleList/index.vue
  8. 335 0
      CallCenterWeb.UI/src/views/afterSaleManagement/afterSaleOrderList/afterSale.vue
  9. 343 0
      CallCenterWeb.UI/src/views/afterSaleManagement/afterSaleOrderList/index.vue
  10. 21 17
      CallCenterWeb.UI/src/views/commodityManagement/commodityList/components/addOrEdit.vue
  11. 59 57
      CallCenterWeb.UI/src/views/orderManagement/orderListCustodian/index.vue
  12. 153 0
      CallCenterWeb.UI/src/views/customerServiceManagement/consolidateOrderListCustomerService/detail.vue
  13. 221 0
      CallCenterWeb.UI/src/views/customerServiceManagement/consolidateOrderListCustomerService/index.vue
  14. 140 11
      CallCenterWeb.UI/src/views/orderManagement/orderListCustomerService/edit.vue
  15. 1 1
      CallCenterWeb.UI/src/views/orderManagement/orderListCustomerService/goback.vue
  16. 54 10
      CallCenterWeb.UI/src/views/orderManagement/orderListCustomerService/index.vue
  17. 79 0
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerService/label.vue
  18. 142 0
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerService/merge.vue
  19. 1 6
      CallCenterWeb.UI/src/views/orderManagement/orderListCustomerService/through.vue
  20. 269 0
      CallCenterWeb.UI/src/views/dashboard/components/leftContent.vue
  21. 103 0
      CallCenterWeb.UI/src/views/dashboard/components/mediaData.vue
  22. 116 0
      CallCenterWeb.UI/src/views/dashboard/components/personalRanking.vue
  23. 113 0
      CallCenterWeb.UI/src/views/dashboard/components/salesData.vue
  24. 186 0
      CallCenterWeb.UI/src/views/dashboard/components/totalTasks.vue
  25. 115 0
      CallCenterWeb.UI/src/views/dashboard/components/traffic.vue
  26. 149 0
      CallCenterWeb.UI/src/views/dashboard/components/workCenter.vue
  27. 77 48
      CallCenterWeb.UI/src/views/dashboard/index.vue
  28. 5 3
      CallCenterWeb.UI/src/views/memberManagement/memberList/index.vue
  29. 1 0
      CallCenterWeb.UI/src/views/orderManagement/consolidateOrderList/index.vue
  30. 147 24
      CallCenterWeb.UI/src/views/orderManagement/createOrder/index.vue
  31. 53 92
      CallCenterWeb.UI/src/views/orderManagement/orderList/afterSale.vue
  32. 0 57
      CallCenterWeb.UI/src/views/orderManagement/orderList/cancel.vue
  33. 158 24
      CallCenterWeb.UI/src/views/orderManagement/orderList/edit.vue
  34. 13 2
      CallCenterWeb.UI/src/views/orderManagement/orderList/index.vue
  35. 0 62
      CallCenterWeb.UI/src/views/orderManagement/orderListCustodian/ship.vue
  36. 0 62
      CallCenterWeb.UI/src/views/orderManagement/orderListCustodian/sorting.vue
  37. BIN
      CallCenterWeb.UI/static/img/daiban.png
  38. BIN
      CallCenterWeb.UI/static/img/media.png
  39. BIN
      CallCenterWeb.UI/static/img/plan.png
  40. BIN
      CallCenterWeb.UI/static/img/ranking.png
  41. BIN
      CallCenterWeb.UI/static/img/remind.png
  42. BIN
      CallCenterWeb.UI/static/img/sales.png
  43. BIN
      CallCenterWeb.UI/static/img/taskLogo.png
  44. BIN
      CallCenterWeb.UI/static/img/workCenter.png
  45. BIN
      CallCenterWeb.UI/static/img/zhibiao.png

+ 13 - 4
CallCenterWeb.UI/src/api/afterSaleManagement/afterSaleList.js

@@ -10,11 +10,11 @@ export function getAfterSaleList(params) {
10 10
 }
11 11
 
12 12
 // 添加售后列表
13
-export function addAfterSaleList(params) {
13
+export function addAfterSaleList(data) {
14 14
   return request({
15 15
     url: 'api/AfterSale/addaftersalesh',
16 16
     method: 'POST',
17
-    params
17
+    data
18 18
   })
19 19
 }
20 20
 
@@ -39,8 +39,17 @@ export function deleteAfterSaleList(params) {
39 39
 // 获取售后订单商品列表
40 40
 export function getAfterSaleOrderCommodityList(params) {
41 41
   return request({
42
-    url: 'api/AfterSale/deleteaftersalesh',
42
+    url: 'api/AfterSale/getorderdetail',
43 43
     method: 'POST',
44 44
     params
45 45
   })
46
-}
46
+}
47
+
48
+// 售后订单列表
49
+export function getAfterSaleOrderList(params) {
50
+  return request({
51
+    url: 'api/AfterSale/getorderlistbyshpage',
52
+    method: 'POST',
53
+    params
54
+  })
55
+}

+ 18 - 0
CallCenterWeb.UI/src/api/custodianManagement/orderListCustodian.js

@@ -0,0 +1,18 @@
1
+import request from '@/utils/request'
2
+// 获取仓库订单列表
3
+export function getOrderListCustodian(data) {
4
+  return request({
5
+    url: 'api/order/getorderlistbykgpage',
6
+    method: 'post',
7
+    data
8
+  })
9
+}
10
+
11
+// 获取仓库订单列表
12
+export function checkOrderCustodian(data) {
13
+  return request({
14
+    url: 'api/order/checkorderbykg',
15
+    method: 'post',
16
+    data
17
+  })
18
+}

+ 53 - 0
CallCenterWeb.UI/src/api/customerServiceManagement/orderListCustomerService.js

@@ -0,0 +1,53 @@
1
+import request from '@/utils/request'
2
+
3
+// 获取客服订单列表
4
+export function getOrderListCustomerService(data) {
5
+  return request({
6
+    url: 'api/order/getorderlistbykfpage',
7
+    method: 'post',
8
+    data
9
+  })
10
+}
11
+
12
+// 编辑客服工单数据
13
+export function editOrderCustomerService(data) {
14
+  return request({
15
+    headers: {
16
+      'Content-Type': 'application/json'
17
+    },
18
+    transformRequest: [function(data) {
19
+      data = JSON.stringify(data)
20
+      return data
21
+    }],
22
+    url: 'api/order/editorderkf',
23
+    method: 'post',
24
+    data
25
+  })
26
+}
27
+
28
+// 客服审核
29
+export function checkOrderCustomerService(data) {
30
+  return request({
31
+    url: 'api/order/checkorderbykf',
32
+    method: 'post',
33
+    data
34
+  })
35
+}
36
+
37
+// 客服打标签
38
+export function labelOrderCustomerService(data) {
39
+  return request({
40
+    url: 'api/kforder/addordertag',
41
+    method: 'post',
42
+    data
43
+  })
44
+}
45
+
46
+// 客服获取合并订单
47
+export function getConsolidateOrderListCustomerService(params) {
48
+  return request({
49
+    url: 'api/OrderMerge/getordermergebypage',
50
+    method: 'post',
51
+    params
52
+  })
53
+}

+ 42 - 0
CallCenterWeb.UI/src/api/dashboard/orderDatas.js

@@ -53,3 +53,45 @@ export function getOrderLists(params) {
53 53
     params
54 54
   })
55 55
 }
56
+
57
+
58
+// 获取当月任务
59
+export function getTaskList(params) {
60
+  return request({
61
+    url: 'api/ManagementCenter/totaltasks',
62
+    method: 'get',
63
+    params
64
+  })
65
+}
66
+// 获取销售行为分析数据
67
+export function getSalesData(params) {
68
+  return request({
69
+    url: 'api/ManagementCenter/realtimesales',
70
+    method: 'get',
71
+    params
72
+  })
73
+}
74
+// 获取重要提醒数据数据
75
+export function getRemindData(params) {
76
+  return request({
77
+    url: 'api/ManagementCenter/reminder',
78
+    method: 'get',
79
+    params
80
+  })
81
+}
82
+// 获取排行榜数据
83
+export function getRankingData(params) {
84
+  return request({
85
+    url: 'api/ManagementCenter/rankinglist',
86
+    method: 'get',
87
+    params
88
+  })
89
+}
90
+// 获取待办事项数据
91
+export function getTodolistData(params) {
92
+  return request({
93
+    url: 'api/ManagementCenter/todolist',
94
+    method: 'get',
95
+    params
96
+  })
97
+}

+ 0 - 53
CallCenterWeb.UI/src/api/orderManagement/orderList.js

@@ -70,56 +70,3 @@ export function editOrder(data) {
70 70
     data
71 71
   })
72 72
 }
73
-
74
-// 获取客服订单列表
75
-export function getOrderListCustomerService(data) {
76
-  return request({
77
-    url: 'api/order/getorderlistbykfpage',
78
-    method: 'post',
79
-    data
80
-  })
81
-}
82
-
83
-// 编辑客服工单数据
84
-export function editOrderCustomerService(data) {
85
-  return request({
86
-    headers: {
87
-      'Content-Type': 'application/json'
88
-    },
89
-    transformRequest: [function(data) {
90
-      data = JSON.stringify(data)
91
-      return data
92
-    }],
93
-    url: 'api/order/editorderkf',
94
-    method: 'post',
95
-    data
96
-  })
97
-}
98
-
99
-// 客服审核
100
-export function checkOrderCustomerService(data) {
101
-  return request({
102
-    url: 'api/order/checkorderbykf',
103
-    method: 'post',
104
-    data
105
-  })
106
-}
107
-
108
-
109
-// 获取库管订单列表
110
-export function getOrderListCustodian(data) {
111
-  return request({
112
-    url: 'api/order/getorderlistbykgpage',
113
-    method: 'post',
114
-    data
115
-  })
116
-}
117
-
118
-// 获取库管订单列表
119
-export function checkOrderCustodian(data) {
120
-  return request({
121
-    url: 'api/order/checkorderbykg',
122
-    method: 'post',
123
-    data
124
-  })
125
-}

+ 83 - 77
CallCenterWeb.UI/src/views/afterSaleManagement/afterSaleList/addOrEdit.vue

@@ -6,12 +6,18 @@
6 6
       </el-form-item>
7 7
       <el-form-item label="售后类型" prop="F_Type" >
8 8
         <el-select v-model="ruleForm.F_Type" class="form_select" filterable clearable placeholder="请选择合并类型">
9
-          <el-option v-for="item in mergeType" :key="item.F_Value" :label="item.F_Value" :value="item.F_Value"/>
9
+          <el-option label="调换货" value="1"></el-option>
10
+          <el-option label="退货" value="2"></el-option>
11
+          <el-option label="部分退货" value="3"></el-option>
12
+          <el-option label="对发货" value="4"></el-option>
10 13
         </el-select>
11 14
       </el-form-item>
12 15
       <el-form-item label="变动金额" prop="F_Money">
13 16
         <el-input v-model="ruleForm.F_Money" placeholder="-需要退 +用户需补"/>
14 17
       </el-form-item>
18
+      <el-form-item label="已添加商品id" prop="F_DetailList">
19
+        <el-input v-model="ruleForm.F_DetailList" placeholder="已添加商品id"/>
20
+      </el-form-item>
15 21
       <el-row>
16 22
         <el-col :span='8'>
17 23
           <el-form-item label="商品分类" prop="parentids" >
@@ -25,14 +31,6 @@
25 31
               change-on-select
26 32
               @change="commodityTypeChange"
27 33
               style="width: 100%;"/>
28
-            <!-- <el-select v-model="commoditySearchData.className" placeholder="请选择商品分类" class="filter-item" clearable value-key="F_ClassId" @change="commodityTypeChange">
29
-              <el-option
30
-                v-for="item in commodityTypeLists"
31
-                :key="item.F_ClassId"
32
-                :label="item.F_ClassName"
33
-                :value="item">
34
-              </el-option>
35
-            </el-select> -->
36 34
           </el-form-item>
37 35
         </el-col>
38 36
         <el-col :span='8'>
@@ -60,7 +58,7 @@
60 58
       </el-row>
61 59
       <el-row>
62 60
         <el-col :span='24'>
63
-          <el-form-item label="已添加商品">
61
+          <el-form-item label="补发商品">
64 62
             <el-table :data="commodityTableData" stripe style="width: 100%">
65 63
               <el-table-column type="selection" width="55"></el-table-column>
66 64
               <el-table-column prop="F_ProductName" label="商品名称" align="center" ></el-table-column>
@@ -74,6 +72,17 @@
74 72
           </el-form-item>
75 73
         </el-col>
76 74
       </el-row>
75
+      <el-row>
76
+        <el-col :span='24'>
77
+          <el-form-item label="退回商品">
78
+            <el-table :data="oldCommodityTableData" stripe style="width: 100%" @selection-change="handleSelectionChange" ref="oldCommodityTable" >
79
+              <el-table-column type="selection" width="55"></el-table-column>
80
+              <el-table-column prop="F_ProductName" label="商品名称" align="center" ></el-table-column>
81
+              <el-table-column prop="F_Count" label="商品数量" align="center"></el-table-column>
82
+            </el-table>
83
+          </el-form-item>
84
+        </el-col>
85
+      </el-row>
77 86
       <el-form-item label="销售备注" prop="F_Remark">
78 87
         <el-input :autosize="{ minRows: 4}" v-model="ruleForm.F_Remark" type="textarea" placeholder="请输入销售备注"/>
79 88
       </el-form-item>
@@ -90,10 +99,10 @@ import { getDictionaryValueList } from '@/api/commonAPI'
90 99
 import { getOrder } from '@/api/orderManagement/orderList'
91 100
 import { getCommodityType } from '@/api/commodityManagement/commodityType'
92 101
 import { getCommodityList } from '@/api/commodityManagement/commodityList'
93
-import { addAfterSaleList, editAfterSaleList, getAfterSaleList } from "@/api/afterSaleManagement/afterSaleList";
102
+import { addAfterSaleList, editAfterSaleList, getAfterSaleList, getAfterSaleOrderCommodityList, } from "@/api/afterSaleManagement/afterSaleList";
94 103
 
95 104
 export default {
96
-  name: "AddOrEdit",
105
+  name: "AfterSale",
97 106
   props: {
98 107
     rowid: {
99 108
       type: String,
@@ -107,7 +116,6 @@ export default {
107 116
   data() {
108 117
     return {
109 118
       parentids: [],
110
-      mergeType: [],//订单类型
111 119
       commodityTypeLists: [], //商品分类下拉数据
112 120
       // 自定义菜单下拉数据的key值
113 121
       typeDropProps: {
@@ -122,11 +130,14 @@ export default {
122 130
         productId: '', //商品id
123 131
         num: 1, //商品数量
124 132
       },
133
+      oldCommodityTableData: [], //退回商品列表
134
+      oldDetailListSelection: [], // 退回商品选中数据
125 135
       ruleForm: {
126
-        F_Id: '',
127
-        F_OrderList: '', //合并订单
136
+        F_Id: '', //售后id
137
+        F_OrderId: '', //订单编号
138
+        F_DetailList: '', //补发产品列表
139
+        F_OldDetailList: '', //退回产品列表
128 140
         F_Type: '', //合并类型
129
-        F_Gift: '', //赠送商品
130 141
         F_Money: '', //减免金额
131 142
         F_Remark: '', //销售备注
132 143
         F_state: '', //订单状态
@@ -147,11 +158,6 @@ export default {
147 158
           trigger: 'blur',
148 159
           message: '请输入订单类型',
149 160
         }],
150
-        F_Gift: [{
151
-          required: true,
152
-          trigger: 'blur',
153
-          message: '请输入赠送商品',
154
-        }],
155 161
         F_Money: [{
156 162
           required: true,
157 163
           trigger: 'blur',
@@ -162,9 +168,7 @@ export default {
162 168
     };
163 169
   },
164 170
   created() {
165
-    this.getMergeType()
166 171
     this.getCommodityTypeSelect()
167
-    this.getOrderDetail()
168 172
     Promise.all([
169 173
     ]).then(() => {
170 174
       if (this.rowid) {
@@ -179,20 +183,6 @@ export default {
179 183
         if (valid) {
180 184
           this.loading = true;
181 185
           this.ruleForm.F_state = state
182
-          //添加
183
-          if (!this.rowid) {
184
-            addAfterSaleList(this.ruleForm).then(response => {
185
-              this.loading = false
186
-              if (response.state.toLowerCase() === 'success') {
187
-                this.$parent.$layer.close(this.layerid)
188
-                this.$parent.getList() // 重新加载父级数据
189
-                this.$message.success('恭喜你,添加成功!')
190
-              }
191
-            }).catch(() => {
192
-              this.loading = false
193
-            })
194
-            return
195
-          }
196 186
           // 编辑
197 187
           editAfterSaleList(this.ruleForm)
198 188
             .then(response => {
@@ -212,20 +202,6 @@ export default {
212 202
         }
213 203
       });
214 204
     },
215
-    // 获取合并类型
216
-    getMergeType() {
217
-      return new Promise(resolve=>{
218
-        const params={
219
-          isleaf:true,
220
-          code:'AFTERSALETYPE'
221
-        }
222
-        getDictionaryValueList(params).then(response=>{
223
-          if(response.state.toLowerCase() === 'success'){
224
-            this.mergeType = response.data.Rows
225
-          }
226
-        })
227
-      })
228
-    },
229 205
     //获取商品分类
230 206
     getCommodityTypeSelect() {
231 207
       this.loading = true
@@ -287,50 +263,80 @@ export default {
287 263
         })
288 264
         return
289 265
       }
266
+      if (this.commodityTableData.length > 0) {
267
+        for (let i=0; i < this.commodityTableData.length; i++ ) {
268
+          if (this.commodityTableData[i].F_ProductId === this.commoditySearchData.productId) {
269
+            this.commodityTableData[i].F_Count = this.commodityTableData[i].F_Count + this.commoditySearchData.num
270
+            return
271
+          }
272
+        }
273
+      }
290 274
       let data = {
291 275
         F_ProductId: this.commoditySearchData.productId,
292 276
         F_ProductName: this.commoditySearchData.productName,
293 277
         F_Count: this.commoditySearchData.num,
294 278
       }
295 279
       this.commodityTableData.push(data)
280
+      let ids = []
281
+      for (let i=0; i<this.commodityTableData.length; i++) {
282
+        ids.push(this.commodityTableData[i].F_ProductId)
283
+      }
284
+      this.ruleForm.F_DetailList = ids.join(',') //补发产品列表
296 285
     },
297 286
     //删除商品
298 287
     btn_deleteCommodity (val) {
299 288
       let index = this.commodityTableData.indexOf(val)
300 289
       this.commodityTableData.splice(index, 1)
301 290
     },
302
-    // 获取订单详情
303
-    getDetail(orderId) {
304
-      this.loading = true;
305
-      return new Promise(resolve => {
306
-        const params = {
307
-          F_State: '-2', //订单状态
308
-          f_id: orderId,
309
-        };
310
-        getAfterSaleList(params).then(response => {
311
-          this.loading = false;
312
-          if (response.state.toLowerCase() === "success") {
313
-            const res = response.data.Rows[0]
314
-            this.ruleForm.F_OrderList = res.F_OrderList //合并订单
315
-            this.ruleForm.F_Type = res.F_Type //合并类型
316
-            this.ruleForm.F_Gift = res.F_Gift //赠送商品
317
-            this.ruleForm.F_Money = res.F_Money //减免金额
318
-            this.ruleForm.F_Remark = res.F_Remark //销售备注
319
-          }
320
-        });
321
-        resolve();
322
-      });
291
+    //获取售后订单详情
292
+    getDetail(rid) {
293
+      const params = {
294
+        F_CheckStateSH: -2, //售后审核状态
295
+        F_Type: '', //售后类型
296
+        F_State: -2, //订单状态
297
+        F_Id: rid,
298
+        pageindex: 1, // int 第几页
299
+        pagesize: 100, // int 每页几条信息
300
+      }
301
+      getAfterSaleList(params).then(response => {
302
+        if (response.state.toLowerCase() === 'success') {
303
+          const res = response.data.Rows[0]
304
+          this.ruleForm.F_OrderId = res.F_OrderId //订单编号
305
+          this.ruleForm.F_DetailList = res.F_DetailList //补发产品列表
306
+          this.ruleForm.F_OldDetailList = res.F_OldDetailList //退回产品列表
307
+          this.ruleForm.F_Type = res.F_Type + '' //合并类型
308
+          this.ruleForm.F_Money = res.F_Money //减免金额
309
+          this.ruleForm.F_Remark = res.F_Remark //销售备注
310
+          this.getAfterSaleOrderCommodity(this.ruleForm.F_OrderId)
311
+        }
312
+      })
323 313
     },
324
-    // 详情
325
-    getOrderDetail(rid) {
326
-      getOrder(rid).then(response => {
314
+    // 售后订单商品列表
315
+    getAfterSaleOrderCommodity(rid) {
316
+      const params = {
317
+        orderid: rid
318
+      }
319
+      getAfterSaleOrderCommodityList(params).then(response => {
327 320
         if (response.state.toLowerCase() === 'success') {
328 321
           const res = response.data
329
-          this.orderDetailData.OrderDetailList = res.OrderDetailList //订单详情list
330
-          this.commodityTableData = res.OrderDetailList
322
+          this.oldCommodityTableData = res
323
+          this.$nextTick(()=>{
324
+            this.oldCommodityTableData.forEach((row,index)=>{
325
+              this.$refs.oldCommodityTable.toggleRowSelection(row)
326
+            })
327
+          },1)
331 328
         }
332 329
       })
333 330
     },
331
+    //选择多个
332
+    handleSelectionChange(selection) {
333
+      let ids = []
334
+      this.oldDetailListSelection = selection
335
+      for (let i=0; i<this.oldDetailListSelection.length; i++) {
336
+        ids.push(this.oldDetailListSelection[i].F_Id)
337
+      }
338
+      this.ruleForm.F_OldDetailList = ids.join(',')
339
+    }, 
334 340
   }
335 341
 };
336 342
 </script>

+ 23 - 23
CallCenterWeb.UI/src/views/afterSaleManagement/afterSaleList/index.vue

@@ -6,19 +6,26 @@
6 6
         <el-option label="已提交审核" value="1"></el-option>
7 7
       </el-select>
8 8
       <el-select v-model="searchData.type" class="filter-item" filterable clearable placeholder="请选择售后类型">
9
-        <el-option v-for="item in mergeType" :key="item.F_Value" :label="item.F_Value" :value="item.F_Value"/>
9
+          <el-option label="调换货" value="1"></el-option>
10
+          <el-option label="退货" value="2"></el-option>
11
+          <el-option label="部分退货" value="3"></el-option>
12
+          <el-option label="对发货" value="4"></el-option>
10 13
       </el-select>
11 14
       <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
12
-      <el-button v-permission="'HY_add'" type="primary" class="filter-item" @click="btn_add">添加</el-button>
15
+      <!-- <el-button v-permission="'HY_add'" type="primary" class="filter-item" @click="btn_add">添加</el-button> -->
13 16
     </div>
14 17
     <el-table v-loading="loading" :data="dataLists" border stripe  @selection-change="handleSelectionChange">
15 18
       <el-table-column type="selection"></el-table-column>
16 19
       <el-table-column type="index" label="编号" align="center" fixed width="80" />
17
-      <el-table-column prop="F_OrderList" label="合并订单" align="center" />
18
-      <el-table-column prop="F_Type" label="合并类型" align="center" />
19
-      <el-table-column prop="F_Gift" label="赠送商品" align="center" />
20
+      <el-table-column prop="F_OrderId" label="订单编号" align="center" />
21
+      <el-table-column label="售后类型" align="center">
22
+        <template slot-scope="scope">
23
+          {{ scope.row.F_Type | judgmentStateName }}
24
+        </template>
25
+      </el-table-column>
26
+      <el-table-column prop="F_Money" label="变动金额" align="center" />
27
+      <el-table-column prop="F_Remark" label="售后备注" align="center" />
20 28
       <el-table-column prop="F_AddTime" label="下单日期" align="center" />
21
-      <el-table-column prop="F_AddUserName" label="下单员工" align="center" />
22 29
       <el-table-column label="操作" width="240" align="center" class-name="oparate_btn" fixed="right">
23 30
         <template slot-scope="scope">
24 31
           <el-button v-permission="'HY_detail'" type="text" @click="btn_detail(scope.row.F_Id)">详情</el-button>
@@ -52,6 +59,15 @@ export default {
52 59
     Pagination
53 60
   },
54 61
   filters: {
62
+    judgmentStateName(status) {
63
+      const statusMap = {
64
+        '1': '调换货',
65
+        '2': '退货',
66
+        '3': '部门退货',
67
+        '4': '对发货',
68
+      }
69
+      return statusMap[status]
70
+    },
55 71
   },
56 72
   data() {
57 73
     return {
@@ -69,11 +85,9 @@ export default {
69 85
       dataLists: [], // 列表数据
70 86
       multipleSelection: [], // 选中的数据
71 87
       selectedId: [], // 选中的数据的id
72
-      mergeType: [],//合并类型
73 88
     };
74 89
   },
75 90
   created() {
76
-    this.getOrderType()
77 91
     this.getList()
78 92
     document.onkeyup = e => {
79 93
       if (e.keyCode === 13) {
@@ -103,20 +117,6 @@ export default {
103 117
         resolve();
104 118
       });
105 119
     },
106
-    // 获取合并类型
107
-    getOrderType() {
108
-      return new Promise(resolve=>{
109
-        const params={
110
-          isleaf:true,
111
-          code:'AFTERSALETYPE'
112
-        }
113
-        getDictionaryValueList(params).then(response=>{
114
-          if(response.state.toLowerCase() === 'success'){
115
-            this.mergeType = response.data.Rows
116
-          }
117
-        })
118
-      })
119
-    },
120 120
     //添加
121 121
     btn_add () {
122 122
       this.$layer.iframe({
@@ -150,7 +150,7 @@ export default {
150 150
           data: { rowid: editId } // props
151 151
         },
152 152
         area: ["80%", "90%"],
153
-        title: "编辑订单"
153
+        title: "编辑售后"
154 154
       });
155 155
     },
156 156
     btn_delete(id) {

+ 335 - 0
CallCenterWeb.UI/src/views/afterSaleManagement/afterSaleOrderList/afterSale.vue

@@ -0,0 +1,335 @@
1
+<template>
2
+  <div v-loading="loading">
3
+    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="150px" class="order_form">
4
+      <el-form-item label="订单编号" prop="F_OrderId" >
5
+        <el-input v-model="ruleForm.F_OrderId" disabled="false" />
6
+      </el-form-item>
7
+      <el-form-item label="售后类型" prop="F_Type" >
8
+        <el-select v-model="ruleForm.F_Type" class="form_select" filterable clearable placeholder="请选择合并类型">
9
+          <el-option label="调换货" value="1"></el-option>
10
+          <el-option label="退货" value="2"></el-option>
11
+          <el-option label="部分退货" value="3"></el-option>
12
+          <el-option label="对发货" value="4"></el-option>
13
+        </el-select>
14
+      </el-form-item>
15
+      <el-form-item label="变动金额" prop="F_Money">
16
+        <el-input v-model="ruleForm.F_Money" placeholder="-需要退 +用户需补"/>
17
+      </el-form-item>
18
+      <el-row>
19
+        <el-col :span='8'>
20
+          <el-form-item label="商品分类" prop="parentids" >
21
+            <el-cascader
22
+              v-model="parentids"
23
+              :options="commodityTypeLists"
24
+              :props="typeDropProps"
25
+              placeholder="请选择商品分类"
26
+              clearable
27
+              filterable
28
+              change-on-select
29
+              @change="commodityTypeChange"
30
+              style="width: 100%;"/>
31
+          </el-form-item>
32
+        </el-col>
33
+        <el-col :span='8'>
34
+          <el-form-item label="商品" prop="productName" >
35
+            <el-select v-model="commoditySearchData.productName" class="filter-item" value-key="F_ProductId" clearable placeholder="请选择订单类型" @change="commodityListChange">
36
+              <el-option
37
+                v-for="item in commodityListLists"
38
+                :key="item.F_ProductId"
39
+                :label="item.F_ProductName"
40
+                :value="item">
41
+              </el-option>
42
+            </el-select>
43
+          </el-form-item>
44
+        </el-col>
45
+        <el-col :span='8'>
46
+          <el-form-item label="商品数量" prop="num" >
47
+            <el-input-number v-model="commoditySearchData.num" :min="1" label="描述文字"></el-input-number>
48
+          </el-form-item>
49
+        </el-col>
50
+      </el-row>
51
+      <el-row>
52
+        <el-form-item>
53
+          <el-button type="primary" @click="addCommodity">添加商品</el-button>
54
+        </el-form-item>
55
+      </el-row>
56
+      <el-row>
57
+        <el-col :span='24'>
58
+          <el-form-item label="补发商品">
59
+            <el-table :data="commodityTableData" stripe style="width: 100%">
60
+              <el-table-column type="selection" width="55"></el-table-column>
61
+              <el-table-column prop="F_ProductName" label="商品名称" align="center" ></el-table-column>
62
+              <el-table-column prop="F_Count" label="商品数量" align="center"></el-table-column>
63
+              <el-table-column label="操作" align="center">
64
+                <template slot-scope="scope">
65
+                  <el-button type="text" @click="btn_deleteCommodity(scope.row)">删除</el-button>
66
+                </template>
67
+              </el-table-column>
68
+            </el-table>
69
+          </el-form-item>
70
+        </el-col>
71
+      </el-row>
72
+      <el-row>
73
+        <el-col :span='24'>
74
+          <el-form-item label="退回商品">
75
+            <el-table :data="oldCommodityTableData" stripe style="width: 100%" @selection-change="handleSelectionChange" ref="oldCommodityTable" >
76
+              <el-table-column type="selection" width="55"></el-table-column>
77
+              <el-table-column prop="F_ProductName" label="商品名称" align="center" ></el-table-column>
78
+              <el-table-column prop="F_Count" label="商品数量" align="center"></el-table-column>
79
+            </el-table>
80
+          </el-form-item>
81
+        </el-col>
82
+      </el-row>
83
+      <el-form-item label="销售备注" prop="F_Remark">
84
+        <el-input :autosize="{ minRows: 4}" v-model="ruleForm.F_Remark" type="textarea" placeholder="请输入销售备注"/>
85
+      </el-form-item>
86
+      <el-form-item>
87
+        <el-button type="primary" @click="submitForm(0)">保存</el-button>
88
+        <el-button type="primary" @click="submitForm(1)">提交</el-button>
89
+      </el-form-item>
90
+    </el-form>
91
+  </div>
92
+</template>
93
+
94
+<script>
95
+import { getDictionaryValueList } from '@/api/commonAPI'
96
+import { getOrder } from '@/api/orderManagement/orderList'
97
+import { getCommodityType } from '@/api/commodityManagement/commodityType'
98
+import { getCommodityList } from '@/api/commodityManagement/commodityList'
99
+import { addAfterSaleList, editAfterSaleList, getAfterSaleList, getAfterSaleOrderCommodityList } from "@/api/afterSaleManagement/afterSaleList";
100
+
101
+export default {
102
+  name: "AfterSale",
103
+  props: {
104
+    rowid: {
105
+      type: String,
106
+      default: ""
107
+    },
108
+    layerid: {
109
+      type: String,
110
+      default: ""
111
+    }
112
+  },
113
+  data() {
114
+    return {
115
+      parentids: [],
116
+      commodityTypeLists: [], //商品分类下拉数据
117
+      // 自定义菜单下拉数据的key值
118
+      typeDropProps: {
119
+        value: 'id',
120
+        label: 'text'
121
+      },
122
+      commodityTableData: [], //添加商品
123
+      commoditySearchData: { //商品搜索数据
124
+        classId: '', // 商品分类id
125
+        className: '', // 商品分类名称
126
+        productName: '', //商品名称
127
+        productId: '', //商品id
128
+        num: 1, //商品数量
129
+      },
130
+      oldCommodityTableData: [], //退回商品列表
131
+      oldDetailListSelection: [], // 退回商品选中数据
132
+      ruleForm: {
133
+        F_OrderId: '', //订单编号
134
+        F_DetailList: '', //补发产品列表
135
+        F_OldDetailList: '', //退回产品列表
136
+        F_Type: '', //合并类型
137
+        F_Money: '', //减免金额
138
+        F_Remark: '', //销售备注
139
+        F_state: '', //订单状态
140
+      },
141
+      rules: {
142
+        order1: [{
143
+          required: true,
144
+          trigger: 'blur',
145
+          message: '请输入订单编号1',
146
+        }],
147
+        order2: [{
148
+          required: true,
149
+          trigger: 'blur',
150
+          message: '请输入订单编号2',
151
+        }],
152
+        F_Type: [{
153
+          required: true,
154
+          trigger: 'blur',
155
+          message: '请输入订单类型',
156
+        }],
157
+        F_Money: [{
158
+          required: true,
159
+          trigger: 'blur',
160
+          message: '请输入减免金额',
161
+        }],
162
+      },
163
+      loading: false
164
+    };
165
+  },
166
+  created() {
167
+    this.getCommodityTypeSelect()
168
+    Promise.all([
169
+    ]).then(() => {
170
+      if (this.rowid) {
171
+        this.ruleForm.F_OrderId = this.rowid
172
+        this.getAfterSaleOrderCommodity(this.rowid)
173
+      }
174
+    });
175
+  },
176
+  methods: {
177
+    submitForm(state) {
178
+      this.$refs.ruleForm.validate(valid => {
179
+        if (valid) {
180
+          this.loading = true;
181
+          this.ruleForm.F_state = state
182
+          //添加
183
+          // if (!this.rowid) {
184
+            addAfterSaleList(this.ruleForm).then(response => {
185
+              this.loading = false
186
+              if (response.state.toLowerCase() === 'success') {
187
+                this.$parent.$layer.close(this.layerid)
188
+                this.$parent.getList() // 重新加载父级数据
189
+                this.$message.success('恭喜你,添加成功!')
190
+              }
191
+            }).catch(() => {
192
+              this.loading = false
193
+            })
194
+            return
195
+          // }
196
+          // 编辑
197
+          // editAfterSaleList(this.ruleForm)
198
+          //   .then(response => {
199
+          //     this.loading = false;
200
+          //     if (response.state.toLowerCase() === "success") {
201
+          //       this.$parent.$layer.close(this.layerid);
202
+          //       this.$parent.getList(); // 重新加载父级数据
203
+          //       this.$message.success("恭喜你,编辑成功!");
204
+          //     }
205
+          //   })
206
+          //   .catch(() => {
207
+          //     this.loading = false;
208
+          //   });
209
+        } else {
210
+          this.$message.error("请输入有效的必填项信息!");
211
+          return false;
212
+        }
213
+      });
214
+    },
215
+    //获取商品分类
216
+    getCommodityTypeSelect() {
217
+      this.loading = true
218
+      return new Promise(resolve => {
219
+        const data = {
220
+          pageindex: 1, // int 第几页
221
+          pagesize: 300, // int 每页几条信息
222
+          ParentId: 0,
223
+        }
224
+        getCommodityType(data).then(response => {
225
+          this.loading = false
226
+          if (response.state.toLowerCase() === 'success') {
227
+            this.commodityTypeLists = response.data
228
+          }
229
+        })
230
+        resolve()
231
+      })
232
+    },
233
+
234
+    commodityTypeChange(item) {
235
+      this.commoditySearchData.classId = this.parentids[this.parentids.length - 1]
236
+      this.getCommodityListSelect()
237
+    },
238
+    commodityListChange(item) {
239
+      this.commoditySearchData.productId = item.F_ProductId
240
+      this.commoditySearchData.productName = item.F_ProductName
241
+    },
242
+    //获取商品
243
+    getCommodityListSelect() {
244
+      this.loading = true
245
+      return new Promise(resolve => {
246
+        const params = {
247
+          pageindex: 1, // int 第几页,
248
+          pagesize: 300, // int 每页几条信息,
249
+          ProductId: '',
250
+          ClassId: this.commoditySearchData.classId === '' ? 0 : this.commoditySearchData.classId,
251
+          ClassName: '',
252
+          ProductName: '',
253
+          PinyinShort: '',
254
+          ProductNumber: '',
255
+          ProductShortName: '',
256
+          tag: '',
257
+          issale: 1,
258
+        }
259
+        getCommodityList(params).then(response => {
260
+          this.loading = false
261
+          if (response.state.toLowerCase() === 'success') {
262
+            this.commodityListLists = response.data.Rows
263
+          }
264
+        })
265
+        resolve()
266
+      })
267
+    },
268
+    addCommodity() {
269
+      if (this.commoditySearchData.productName === ''){
270
+        this.$message({
271
+          message: '请选择商品!',
272
+          type: 'warning'
273
+        })
274
+        return
275
+      }
276
+      if (this.commodityTableData.length > 0) {
277
+        for (let i=0; i < this.commodityTableData.length; i++ ) {
278
+          if (this.commodityTableData[i].F_ProductId === this.commoditySearchData.productId) {
279
+            this.commodityTableData[i].F_Count = this.commodityTableData[i].F_Count + this.commoditySearchData.num
280
+            return
281
+          }
282
+        }
283
+      }
284
+      let data = {
285
+        F_ProductId: this.commoditySearchData.productId,
286
+        F_ProductName: this.commoditySearchData.productName,
287
+        F_Count: this.commoditySearchData.num,
288
+      }
289
+      this.commodityTableData.push(data)
290
+      let ids = []
291
+      for (let i=0; i<this.commodityTableData.length; i++) {
292
+        ids.push(this.commodityTableData[i].F_ProductId)
293
+      }
294
+      this.ruleForm.F_DetailList = ids.join(',') //补发产品列表
295
+    },
296
+    //删除商品
297
+    btn_deleteCommodity (val) {
298
+      let index = this.commodityTableData.indexOf(val)
299
+      this.commodityTableData.splice(index, 1)
300
+    },
301
+    // 售后订单商品列表
302
+    getAfterSaleOrderCommodity(rid) {
303
+      const params = {
304
+        orderid: rid
305
+      }
306
+      getAfterSaleOrderCommodityList(params).then(response => {
307
+        if (response.state.toLowerCase() === 'success') {
308
+          const res = response.data
309
+          this.oldCommodityTableData = res
310
+          this.$nextTick(()=>{
311
+            this.oldCommodityTableData.forEach((row,index)=>{
312
+              this.$refs.oldCommodityTable.toggleRowSelection(row)
313
+            })
314
+          },1)
315
+        }
316
+      })
317
+    },
318
+    //选择多个
319
+    handleSelectionChange(selection) {
320
+      let ids = []
321
+      this.oldDetailListSelection = selection
322
+      for (let i=0; i<this.oldDetailListSelection.length; i++) {
323
+        ids.push(this.oldDetailListSelection[i].F_Id)
324
+      }
325
+      this.ruleForm.F_OldDetailList = ids.join(',')
326
+    }, 
327
+  }
328
+};
329
+</script>
330
+
331
+<style rel="stylesheet/scss" lang="scss">
332
+.order_form .form_select {
333
+  width: 100%;
334
+}
335
+</style>

+ 343 - 0
CallCenterWeb.UI/src/views/afterSaleManagement/afterSaleOrderList/index.vue

@@ -0,0 +1,343 @@
1
+<template>
2
+  <div class="app-container">
3
+    <div class="filter-container">
4
+      <el-date-picker
5
+        v-model="searchData.searchTime"
6
+        :picker-options="pickerOptions"
7
+        class="filter-item"
8
+        type="daterange"
9
+        format="yyyy年MM月dd日"
10
+        value-format="yyyy-MM-dd"
11
+        align="left"
12
+        unlink-panels
13
+        range-separator="至"
14
+        start-placeholder="开始日期"
15
+        end-placeholder="结束日期"
16
+      />
17
+      <el-input v-model="searchData.adFrom" placeholder="请输入消息/广告媒体来源" class="filter-item" />
18
+      <el-select v-model="searchData.type" class="filter-item" filterable clearable placeholder="请选择订单类型">
19
+        <el-option v-for="item in orderType" :key="item.F_Value" :label="item.F_Value" :value="item.F_Value"/>
20
+      </el-select>
21
+      <el-input v-model="searchData.id" placeholder="请输入订单号" class="filter-item" />
22
+      <el-input v-model="searchData.customer" placeholder="请输入客户姓名" class="filter-item" />
23
+      <el-input v-model="searchData.customerPhone" placeholder="请输入客户手机号" class="filter-item" />
24
+      <el-input v-model="searchData.trackingNo" placeholder="请输入运单号" class="filter-item" />
25
+      <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
26
+      <el-button v-permission="'HY_export'" type="primary" class="filter-item" icon="el-icon-upload2" @click="btn_export">导出</el-button>
27
+      <el-button v-permission="'HY_import'" type="primary" class="filter-item" icon="el-icon-download" @click="btn_import">导入</el-button>
28
+      <el-button v-permission="'HY_merge'" type="primary" class="filter-item" @click="btn_merge">合并</el-button>
29
+      <el-button v-permission="'HY_split'" type="primary" class="filter-item" @click="btn_split">拆分</el-button>
30
+    </div>
31
+    <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick" >
32
+      <el-tab-pane label="全部" name="-2"></el-tab-pane>
33
+      <el-tab-pane label="无效" name="-1"></el-tab-pane>
34
+      <el-tab-pane label="暂存" name="0"></el-tab-pane>
35
+      <el-tab-pane label="提交" name="1"></el-tab-pane>
36
+      <el-tab-pane label="退回" name="2"></el-tab-pane>
37
+      <el-tab-pane label="通过" name="3"></el-tab-pane>
38
+      <el-tab-pane label="无货" name="4"></el-tab-pane>
39
+      <el-tab-pane label="已分拣" name="5"></el-tab-pane>
40
+      <el-tab-pane label="已发货" name="6"></el-tab-pane>
41
+    </el-tabs>
42
+    <el-table v-loading="loading" :data="dataLists" border stripe  @selection-change="handleSelectionChange" row-key="F_Id">
43
+      <el-table-column type="selection" :reserve-selection="true"></el-table-column>
44
+      <el-table-column type="index" label="编号" align="center" fixed width="80" />
45
+      <el-table-column prop="F_Id" label="订单编号" align="center" min-width="150" />
46
+      <el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
47
+      <el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
48
+      <el-table-column label="订购商品" align="center" min-width>
49
+        <template slot-scope="scope">
50
+          {{ scope.row.OrderDetailList | judgmentOrderGoods}}
51
+        </template>
52
+      </el-table-column>
53
+      <el-table-column prop="F_AddTime" label="下单日期" align="center" />
54
+      <el-table-column label="订单状态" align="center" >
55
+        <template slot-scope="scope">
56
+          {{ scope.row.F_State | judgmentStateName }}
57
+        </template>
58
+      </el-table-column>
59
+      <el-table-column prop="F_AddUserName" label="下单员工" align="center" />
60
+      <el-table-column prop="F_BelongName" label="归属员工" align="center" />
61
+      <el-table-column prop="F_Type" label="订单类型" align="center" />
62
+      <el-table-column prop="F_Express" label="快递公司" align="center" />
63
+      <el-table-column label="操作" width="240" align="center" class-name="oparate_btn" fixed="right">
64
+        <template slot-scope="scope">
65
+          <el-button v-permission="'HY_detail'" type="text" @click="btn_detail(scope.row.F_Id)">详情</el-button>
66
+          <el-button v-permission="'HY_apply'" type="text" @click="btn_apply(scope.row.F_Id)">申请</el-button>
67
+          <el-button v-permission="'HY_edit'" type="text" @click="btn_edit(scope.row.F_Id)">编辑</el-button>
68
+          <el-button v-permission="'HY_cancel'" type="text" @click="btn_cancel(scope.row.F_Id)">撤销</el-button>
69
+          <el-button v-permission="'HY_afterSale'" type="text" @click="btn_afterSale(scope.row.F_Id)">售后</el-button>
70
+        </template>
71
+      </el-table-column>
72
+    </el-table>
73
+    <pagination
74
+      v-show="pageParams.total > 0"
75
+      :total="pageParams.total"
76
+      :pageindex.sync="pageParams.pageindex"
77
+      :pagesize.sync="pageParams.pagesize"
78
+      class="pagination"
79
+      @pagination="getList"
80
+    />
81
+  </div>
82
+</template>
83
+
84
+<script>
85
+import { getDictionaryValueList } from '@/api/commonAPI'
86
+import { getAfterSaleOrderList } from "@/api/afterSaleManagement/afterSaleList";
87
+import { pickerOptions, formatterContent } from "@/utils";
88
+// import edit from "./edit";
89
+// import cancel from './cancel';
90
+// import detail from './detail';
91
+// import merge from './merge';
92
+// import apply from './apply';
93
+// import importAuth from './importAuth';
94
+import afterSale from './afterSale';
95
+import Pagination from "@/components/Pagination"; // 对el-pagination 二次封装
96
+
97
+export default {
98
+  name: "orderList",
99
+  components: {
100
+    Pagination
101
+  },
102
+  filters: {
103
+    judgmentStateName(status) {
104
+      const statusMap = {
105
+        '-1': '无效',
106
+        '0': '暂存',
107
+        '1': '提交',
108
+        '2': '退回',
109
+        '3': '通过',
110
+        '4': '无货',
111
+        '5': '已分拣',
112
+        '6': '已发货'
113
+      }
114
+      return statusMap[status]
115
+    },
116
+    judgmentOrderGoods(status) {
117
+      let orderGoodsNameQuantity = ''
118
+      for (let i = 0; i < status.length; i++) {
119
+        orderGoodsNameQuantity = `${orderGoodsNameQuantity}${status[i].F_ProductName}*${status[i].F_Count},`
120
+      }
121
+      orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
122
+      return orderGoodsNameQuantity
123
+    },
124
+  },
125
+  data() {
126
+    return {
127
+      loading: false,
128
+      searchData: {
129
+        adFrom: '', //消息/广告媒体来源
130
+        type: '', //订单类型
131
+        id: '', //订单号
132
+        customer: '', //客户姓名
133
+        customerPhone: '', //客户手机号
134
+        trackingNo: '', //运单号
135
+        searchTime: '', //订单时间
136
+      },
137
+      activeName: "-2", //标签切换首页
138
+      pickerOptions, // 日期数据
139
+      pageParams: {
140
+        pageindex: 1, // 当前第几页
141
+        pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
142
+        total: 0 // 总共多少数据
143
+      },
144
+      dataLists: [], // 列表数据
145
+      multipleSelection: [], // 选中的数据
146
+      selectedId: [], // 选中的数据的id
147
+      orderType: [],//订单类型
148
+      mergeOrderId: [], //合并订单id
149
+    };
150
+  },
151
+  created() {
152
+    this.getOrderType()
153
+    this.getList()
154
+    document.onkeyup = e => {
155
+      if (e.keyCode === 13) {
156
+        this.getList();
157
+      }
158
+    };
159
+  },
160
+  methods: {
161
+    getList() {
162
+      this.loading = true;
163
+      return new Promise(resolve => {
164
+        const params = {
165
+          F_State: this.activeName, //订单状态
166
+          pageindex: this.pageParams.pageindex, // int 第几页
167
+          pagesize: this.pageParams.pagesize, // int 每页几条信息
168
+          F_ADFrom: this.searchData.adFrom, //消息/广告来源
169
+          F_Type: this.searchData.type, //订单类型
170
+          F_Id: this.searchData.id, //订单号
171
+          F_Customer: this.searchData.customer, //客户姓名
172
+          F_CustomerPhone: this.searchData.customerPhone, //客户手机号
173
+          F_TrackingNo: this.searchData.trackingNo, //运单号
174
+          SearchStartTime: this.searchData.searchTime[0], //添加开始时间
175
+          SearchEndTime: this.searchData.searchTime[1], //添加结束时间
176
+        };
177
+        getAfterSaleOrderList(params).then(response => {
178
+          this.loading = false;
179
+          if (response.state.toLowerCase() === "success") {
180
+            this.pageParams.total = response.data.Totals;
181
+            this.dataLists = response.data.Rows;
182
+          }
183
+        });
184
+        resolve();
185
+      });
186
+    },
187
+    // 获取订单类型
188
+    getOrderType() {
189
+      return new Promise(resolve=>{
190
+        const params={
191
+          isleaf:true,
192
+          code:'ORDERTYPE'
193
+        }
194
+        getDictionaryValueList(params).then(response=>{
195
+          if(response.state.toLowerCase() === 'success'){
196
+            this.orderType = response.data.Rows
197
+          }
198
+        })
199
+      })
200
+    },
201
+    handleTabClick(tab, event) {
202
+      this.getList()
203
+    },
204
+    handle(ordercode){
205
+       this.$layer.iframe({
206
+        content: {
207
+          content: detail, // 传递的组件对象
208
+          parent: this, // 当前的vue对象
209
+          data: { 'rowid': ordercode }// props
210
+        },
211
+        area: ['80%', '90%'],
212
+        title: '订单详情'
213
+      })
214
+    },
215
+    btn_detail(ordercode){
216
+       this.$layer.iframe({
217
+        content: {
218
+          content: detail, // 传递的组件对象
219
+          parent: this, // 当前的vue对象
220
+          data: { 'rowid': ordercode }// props
221
+        },
222
+        area: ['80%', '90%'],
223
+        title: '订单详情'
224
+      })
225
+    },
226
+
227
+    btn_search() {
228
+      this.pageParams.pageindex = 1;
229
+      this.getList();
230
+    },
231
+    btn_edit(editId) {
232
+      this.$layer.iframe({
233
+        content: {
234
+          content: edit, // 传递的组件对象
235
+          parent: this, // 当前的vue对象
236
+          data: { rowid: editId } // props
237
+        },
238
+        area: ["80%", "90%"],
239
+        title: "编辑订单"
240
+      });
241
+    },
242
+    //导出
243
+    btn_export() {},
244
+    //导入
245
+    btn_import(){
246
+      this.$layer.iframe({
247
+        content: {
248
+          content: importAuth, // 传递的组件对象
249
+          parent: this, // 当前的vue对象
250
+          data: { 'rowid': '' }// props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
251
+        },
252
+        area: ['40%', '380px'],
253
+        shadeClose: false,
254
+        title: '导入订单信息'
255
+      })
256
+    },
257
+    //申请
258
+    btn_apply(applyId) {
259
+       this.$layer.iframe({
260
+        content: {
261
+          content: apply, // 传递的组件对象
262
+          parent: this, // 当前的vue对象
263
+          data: { rowid: applyId } // props
264
+        },
265
+        area: ["30%", "40%"],
266
+        title: "申请内容"
267
+      });
268
+    },
269
+    //撤销
270
+    btn_cancel(orderId) {
271
+      this.$confirm('您确定要将此工单撤销吗?', '提示', {
272
+          confirmButtonText: '确定',
273
+          cancelButtonText: '取消',
274
+          type: 'warning'
275
+        }).then(() => {
276
+          const data = {
277
+            orderid: orderId,
278
+            state: 0, //撤销 0
279
+          }
280
+          cancelOrder(data).then(response => {
281
+            if (response.state.toLowerCase() === 'success') {
282
+              this.getList()
283
+              this.$message.success('撤销成功!')
284
+            }
285
+          })
286
+        }).catch(() => {
287
+          this.$message({
288
+            type: 'info',
289
+            message: '已取消撤销'
290
+          });          
291
+      });
292
+    },
293
+    //售后
294
+    btn_afterSale(afterSalesId) {
295
+      this.$layer.iframe({
296
+        content: {
297
+          content: afterSale, // 传递的组件对象
298
+          parent: this, // 当前的vue对象
299
+          data: { rowid: afterSalesId } // props
300
+        },
301
+        area: ["80%", "80%"],
302
+        title: "售后内容"
303
+      });
304
+    },
305
+    //合并
306
+    btn_merge() {
307
+      if (this.mergeOrderId.length < 2) {
308
+        this.$message({
309
+          message: '最少选择两条订单!',
310
+          type: 'warning'
311
+        });
312
+        return
313
+      }
314
+      this.$layer.iframe({
315
+        content: {
316
+          content: merge, // 传递的组件对象
317
+          parent: this, // 当前的vue对象
318
+          data: { rowid: this.mergeOrderId } // props
319
+        },
320
+        area: ["80%", "90%"],
321
+        title: "合并订单"
322
+      });
323
+    },
324
+    //拆分
325
+    btn_split() {},
326
+    //选择多个
327
+    handleSelectionChange(val) {
328
+      const ids = []
329
+      this.multipleSelection = val
330
+      for (let i=0; i<this.multipleSelection.length; i++) {
331
+        ids.push(this.multipleSelection[i].F_Id)
332
+      }
333
+      this.mergeOrderId = ids
334
+    }, 
335
+  }
336
+};
337
+</script>
338
+
339
+<style rel="stylesheet/scss" lang="scss" scoped>
340
+.el{
341
+  cursor: pointer;
342
+}
343
+</style>

+ 21 - 17
CallCenterWeb.UI/src/views/commodityManagement/commodityList/components/addOrEdit.vue

@@ -8,15 +8,18 @@
8 8
           </el-form-item>
9 9
         </el-col>
10 10
         <el-col :md="12">
11
-          <el-form-item label="商品类型" prop="ClassName">
12
-            <el-select v-model="ruleForm.ClassName" placeholder="请选择商品类型" class="form_select" clearable value-key="F_ClassId" @change="commodityTypeChange">
13
-              <el-option
14
-                v-for="item in commodityTypeLists"
15
-                :key="item.F_ClassId"
16
-                :label="item.F_ClassName"
17
-                :value="item">
18
-              </el-option>
19
-            </el-select>
11
+          <el-form-item label="商品分类" prop="className">
12
+            <el-cascader
13
+              v-model="parentids"
14
+              :options="commodityTypeLists"
15
+              :props="typeDropProps"
16
+              placeholder="请选择商品分类"
17
+              clearable
18
+              filterable
19
+              change-on-select
20
+              @change="commodityTypeChange"
21
+              ref="myCascader"
22
+              style="width: 100%;"/>
20 23
           </el-form-item>
21 24
         </el-col>
22 25
       </el-row>
@@ -158,12 +161,13 @@ export default {
158 161
   },
159 162
   data() {
160 163
     return {
161
-      props: { // 自定义省市下拉数据的key值
162
-        value: 'code',
163
-        label: 'name',
164
-        children: 'entityJson'
165
-      },
164
+      parentids:[],
166 165
       commodityTypeLists: [], //商品类型下拉
166
+      // 自定义菜单下拉数据的key值
167
+      typeDropProps: {
168
+        value: 'id',
169
+        label: 'text'
170
+      },
167 171
       commodityLabelLists: [], //商品标签下拉
168 172
       ruleForm: {
169 173
         ProductId: '', //商品id
@@ -336,7 +340,7 @@ export default {
336 340
         getCommodityType(data).then(response => {
337 341
           this.loading = false
338 342
           if (response.state.toLowerCase() === 'success') {
339
-            this.commodityTypeLists = response.data.Rows
343
+            this.commodityTypeLists = response.data
340 344
           }
341 345
         })
342 346
         resolve()
@@ -359,8 +363,8 @@ export default {
359 363
       })
360 364
     },
361 365
     commodityTypeChange(item) {
362
-      this.ruleForm.ClassId = item.F_ClassId
363
-      this.ruleForm.ClassName = item.F_ClassName
366
+      this.ruleForm.ClassId = this.parentids[this.parentids.length - 1]
367
+      this.ruleForm.ClassName = this.$refs['myCascader'].currentLabels[this.parentids.length - 1]
364 368
     },
365 369
   }
366 370
 }

+ 59 - 57
CallCenterWeb.UI/src/views/orderManagement/orderListCustodian/index.vue

@@ -1,19 +1,7 @@
1 1
 <template>
2 2
   <div class="app-container">
3 3
     <div class="filter-container">
4
-      <el-date-picker
5
-        v-model="searchData.searchTime"
6
-        :picker-options="pickerOptions"
7
-        class="filter-item"
8
-        type="daterange"
9
-        format="yyyy年MM月dd日"
10
-        value-format="yyyy-MM-dd"
11
-        align="left"
12
-        unlink-panels
13
-        range-separator="至"
14
-        start-placeholder="开始日期"
15
-        end-placeholder="结束日期"
16
-      />
4
+      <el-date-picker v-model="searchData.searchTime" :picker-options="pickerOptions" class="filter-item" type="daterange" format="yyyy年MM月dd日" value-format="yyyy-MM-dd" align="left" unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" />
17 5
       <el-input v-model="searchData.adFrom" placeholder="请输入消息/广告媒体来源" class="filter-item" />
18 6
       <el-select v-model="searchData.type" class="filter-item" filterable clearable placeholder="请选择订单类型">
19 7
         <el-option v-for="item in orderType" :key="item.F_Value" :label="item.F_Value" :value="item.F_Value"/>
@@ -23,10 +11,8 @@
23 11
       <el-input v-model="searchData.customerPhone" placeholder="请输入客户手机号" class="filter-item" />
24 12
       <el-input v-model="searchData.trackingNo" placeholder="请输入运单号" class="filter-item" />
25 13
       <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
26
-      <el-button v-permission="'HY_export'" type="primary" class="filter-item" icon="el-icon-upload2" @click="btn_export">导出</el-button>
27
-      <el-button v-permission="'HY_import'" type="primary" class="filter-item" icon="el-icon-download" @click="btn_import">导入</el-button>
28
-      <el-button v-permission="'HY_merge'" type="primary" @click="btn_merge">合并</el-button>
29
-      <el-button v-permission="'HY_split'" type="primary" @click="btn_split">拆分</el-button>
14
+      <el-button v-permission="'HY_sorting'" type="primary" class="filter-item" @click="btn_export">批量分拣</el-button>
15
+      <el-button v-permission="'HY_ship'" type="primary" class="filter-item" @click="btn_export">批量发货</el-button>
30 16
     </div>
31 17
     <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick" >
32 18
       <el-tab-pane label="全部" name="-2"></el-tab-pane>
@@ -45,7 +31,11 @@
45 31
       <el-table-column prop="F_Id" label="订单编号" align="center" min-width="150" />
46 32
       <el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
47 33
       <el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
48
-      <el-table-column prop="typename" label="订购商品" align="center" min-width />
34
+      <el-table-column label="订购商品" align="center" min-width>
35
+        <template slot-scope="scope">
36
+          {{ scope.row.OrderDetailList | judgmentOrderGoods}}
37
+        </template>
38
+      </el-table-column>
49 39
       <el-table-column prop="F_AddTime" label="下单日期" align="center" />
50 40
       <el-table-column label="订单状态" align="center" >
51 41
         <template slot-scope="scope">
@@ -79,12 +69,9 @@
79 69
 
80 70
 <script>
81 71
 import { getDictionaryValueList } from '@/api/commonAPI'
82
-import { getOrderListCustodian, cancelOrder } from "@/api/orderManagement/orderList";
72
+import { getOrderListCustodian, checkOrderCustodian } from "@/api/custodianManagement/orderListCustodian";
83 73
 import { pickerOptions, formatterContent } from "@/utils";
84
-import sorting from "./sorting";
85
-import ship from "./ship";
86 74
 // import detail from './detail';
87
-// import importAuth from './importAuth';
88 75
 // import afterSales from './afterSales';
89 76
 import Pagination from "@/components/Pagination"; // 对el-pagination 二次封装
90 77
 
@@ -107,6 +94,14 @@ export default {
107 94
       }
108 95
       return statusMap[status]
109 96
     },
97
+    judgmentOrderGoods(status) {
98
+      let orderGoodsNameQuantity = ''
99
+      for (let i = 0; i < status.length; i++) {
100
+        orderGoodsNameQuantity = `${orderGoodsNameQuantity}${status[i].F_ProductName}*${status[i].F_Count},`
101
+      }
102
+      orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
103
+      return orderGoodsNameQuantity
104
+    },
110 105
   },
111 106
   data() {
112 107
     return {
@@ -213,21 +208,6 @@ export default {
213 208
         title: "编辑订单"
214 209
       });
215 210
     },
216
-    //导出
217
-    btn_export() {},
218
-    //导入
219
-    btn_import(){
220
-      this.$layer.iframe({
221
-        content: {
222
-          content: importAuth, // 传递的组件对象
223
-          parent: this, // 当前的vue对象
224
-          data: { 'rowid': '' }// props//该方法会自动添加一个key为layerid的值, 该值为创建层的id, 可以直接使用
225
-        },
226
-        area: ['40%', '380px'],
227
-        shadeClose: false,
228
-        title: '导入订单信息'
229
-      })
230
-    },
231 211
     //售后
232 212
     btn_afterSales(afterSalesId) {
233 213
       this.$layer.iframe({
@@ -242,32 +222,54 @@ export default {
242 222
     },
243 223
     //分拣
244 224
     btn_sorting(orderid) {
245
-      this.$layer.iframe({
246
-        content: {
247
-          content: sorting, // 传递的组件对象
248
-          parent: this, // 当前的vue对象
249
-          data: { rowid: orderid } // props
250
-        },
251
-        area: ["30%", "30%"],
252
-        title: "分拣"
225
+      this.$confirm('您确定要分拣吗?', '提示', {
226
+          confirmButtonText: '确定',
227
+          cancelButtonText: '取消',
228
+          type: 'warning'
229
+        }).then(() => {
230
+          const data = {
231
+            orderid: orderid,
232
+            state: 5, //订单状态 —— 5 分拣
233
+            remark: '', //备注
234
+          }
235
+          checkOrderCustodian(data).then(response => {
236
+            if (response.state.toLowerCase() === 'success') {
237
+              this.getList()
238
+              this.$message.success('分拣成功!')
239
+            }
240
+          })
241
+        }).catch(() => {
242
+          this.$message({
243
+            type: 'info',
244
+            message: '已取消分拣'
245
+          });          
253 246
       });
254 247
     },
255 248
     //发货
256 249
     btn_ship(orderid) {
257
-      this.$layer.iframe({
258
-        content: {
259
-          content: ship, // 传递的组件对象
260
-          parent: this, // 当前的vue对象
261
-          data: { rowid: orderid } // props
262
-        },
263
-        area: ["30%", "30%"],
264
-        title: "发货"
250
+      this.$confirm('您确定要发货吗?', '提示', {
251
+          confirmButtonText: '确定',
252
+          cancelButtonText: '取消',
253
+          type: 'warning'
254
+        }).then(() => {
255
+          const data = {
256
+            orderid: orderid,
257
+            state: 6, //订单状态 —— 6 发货
258
+            remark: '', //备注
259
+          }
260
+          checkOrderCustodian(data).then(response => {
261
+            if (response.state.toLowerCase() === 'success') {
262
+              this.getList()
263
+              this.$message.success('发货成功!')
264
+            }
265
+          })
266
+        }).catch(() => {
267
+          this.$message({
268
+            type: 'info',
269
+            message: '已取消发货'
270
+          });          
265 271
       });
266 272
     },
267
-    //合并
268
-    btn_merge() {},
269
-    //拆分
270
-    btn_split() {},
271 273
     //选择多个
272 274
     handleSelectionChange(val) {
273 275
       const ids = []

+ 153 - 0
CallCenterWeb.UI/src/views/customerServiceManagement/consolidateOrderListCustomerService/detail.vue

@@ -0,0 +1,153 @@
1
+<template>
2
+  <div class="order_detail">
3
+    <el-row :gutter="20">
4
+      <el-col :md="24" class="order_detail_body">
5
+        <el-card shadow="hover">
6
+          <el-col :md="21">
7
+            <h1 class="title"><svg-icon class="title_icon" icon-class="hongqi" />订单编号:{{ detailData.F_Id }}</h1>
8
+            <p class="title_sub"><span class="green">{{ name }}</span> 	河南足力健老人鞋 {{ createtime }}</p>
9
+          </el-col>
10
+          <el-col :md="24" class="order_detail_content">
11
+            <el-col :md="24" class="order_detail_item">
12
+              合并订单:{{ detailData.F_OrderList }}
13
+            </el-col>
14
+            <el-col :md="6" class="order_detail_item">
15
+              合并类型:{{ detailData.F_Type }}
16
+            </el-col>
17
+            <el-col :md="6" class="order_detail_item">
18
+              赠送商品:{{ detailData.F_Gift }}
19
+            </el-col>
20
+            <el-col :md="6" class="order_detail_item">
21
+              减免金额:{{ detailData.F_Money }}
22
+            </el-col>
23
+            <el-col :md="6" class="order_detail_item">
24
+              销售备注:{{ detailData.F_Remark }}
25
+            </el-col>
26
+            <!-- <el-col :md="8" :offset="16"> -->
27
+              <!-- <el-button type="primary" size="mini" plain @click="edit()">编辑</el-button> -->
28
+            <!-- </el-col> -->
29
+          </el-col>
30
+        </el-card>
31
+      </el-col>
32
+    </el-row>
33
+  </div>
34
+</template>
35
+
36
+<script>
37
+import { getConsolidateOrderList } from '@/api/orderManagement/consolidateOrderList'
38
+
39
+export default {
40
+  name: 'Detail',
41
+  props: {
42
+    rowid: {
43
+      type: String,
44
+      default: ''
45
+    },
46
+    layerid: {
47
+      type: String,
48
+      default: ''
49
+    }
50
+  },
51
+  data() {
52
+    return {
53
+      detailData: {
54
+        F_Id: '',
55
+        F_OrderList: '', //合并订单
56
+        F_Type: '', //合并类型
57
+        F_Gift: '', //赠送商品
58
+        F_Money: '', //减免金额
59
+        F_Remark: '', //销售备注
60
+      },
61
+    }
62
+  },
63
+  computed: {
64
+  },
65
+  created() {
66
+    if (this.rowid) {
67
+      this.getDetail(this.rowid)
68
+    }
69
+  },
70
+  methods: {
71
+    handleClick(tab, event) {
72
+    },
73
+    // 获取订单详情
74
+    getDetail(orderId) {
75
+      this.loading = true;
76
+      return new Promise(resolve => {
77
+        const params = {
78
+          F_State: '-2', //订单状态
79
+          f_id: orderId,
80
+        };
81
+        getConsolidateOrderList(params).then(response => {
82
+          this.loading = false;
83
+          if (response.state.toLowerCase() === "success") {
84
+            const res = response.data.Rows[0]
85
+            this.detailData.F_OrderList = res.F_OrderList //合并订单
86
+            this.detailData.F_Type = res.F_Type //合并类型
87
+            this.detailData.F_Gift = res.F_Gift //赠送商品
88
+            this.detailData.F_Money = res.F_Money //减免金额
89
+            this.detailData.F_Remark = res.F_Remark //销售备注
90
+          }
91
+        });
92
+        resolve();
93
+      });
94
+    },
95
+    // edit(){
96
+    //   this.$router.push({path:'/edit',query:{id:this.ordercode}})
97
+    // }
98
+  }
99
+}
100
+</script>
101
+
102
+<style rel="stylesheet/scss" lang="scss" scoped>
103
+	.order_detail{
104
+    .el-col{
105
+			margin-bottom: 20px;
106
+		}
107
+		.el-icon-time{
108
+			color: #d81e06;
109
+		}
110
+		.order_detail_body{
111
+			margin-bottom: 20px;
112
+			.title{
113
+				font-size: 20px;
114
+				.title_icon{
115
+					color: #d81e06;
116
+					font-size: 16px;
117
+					margin-right: 20px;
118
+				}
119
+			}
120
+			.title_sub{
121
+				font-size: 14px;
122
+				color: #666666;
123
+			}
124
+			.order_detail_content{
125
+				background-color: #F5F5F6;
126
+				padding-top: 20px;
127
+				color: #4c4c4c;
128
+				font-size: 14px;
129
+				.order_detail_item{
130
+					margin-bottom: 10px;
131
+					.order_content{
132
+						margin-top: 10px;
133
+					}
134
+				}
135
+			}
136
+		}
137
+		.green {
138
+			color: #00c1de;
139
+		}
140
+		.done {
141
+			color: #198120;
142
+		}
143
+		.red {
144
+			color: #d81e06;
145
+		}
146
+		.yellow{
147
+			color: #e6a23c;
148
+		}
149
+		.tab_body{
150
+			padding: 0 20px 20px 20px;
151
+		}
152
+	}
153
+</style>

+ 221 - 0
CallCenterWeb.UI/src/views/customerServiceManagement/consolidateOrderListCustomerService/index.vue

@@ -0,0 +1,221 @@
1
+<template>
2
+  <div class="app-container">
3
+    <div class="filter-container">
4
+      <el-input v-model="searchData.id" placeholder="请输入关联订单号" class="filter-item" />
5
+      <el-select v-model="searchData.type" class="filter-item" filterable clearable placeholder="请选择合并类型">
6
+        <el-option v-for="item in mergeType" :key="item.F_Value" :label="item.F_Value" :value="item.F_Value"/>
7
+      </el-select>
8
+      <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
9
+    </div>
10
+    <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick" >
11
+      <el-tab-pane label="全部" name="-2"></el-tab-pane>
12
+      <el-tab-pane label="无效" name="-1"></el-tab-pane>
13
+      <el-tab-pane label="暂存" name="0"></el-tab-pane>
14
+      <el-tab-pane label="提交" name="1"></el-tab-pane>
15
+      <el-tab-pane label="退回" name="2"></el-tab-pane>
16
+      <el-tab-pane label="通过" name="3"></el-tab-pane>
17
+    </el-tabs>
18
+    <el-table v-loading="loading" :data="dataLists" border stripe  @selection-change="handleSelectionChange">
19
+      <el-table-column type="selection"></el-table-column>
20
+      <el-table-column type="index" label="编号" align="center" fixed width="80" />
21
+      <el-table-column prop="F_OrderList" label="合并订单" align="center" />
22
+      <el-table-column prop="F_Type" label="合并类型" align="center" />
23
+      <el-table-column prop="F_Gift" label="赠送商品" align="center" />
24
+      <el-table-column prop="F_AddTime" label="下单日期" align="center" />
25
+      <el-table-column label="订单状态" align="center" >
26
+        <template slot-scope="scope">
27
+          {{ scope.row.F_State | judgmentStateName }}
28
+        </template>
29
+      </el-table-column>
30
+      <el-table-column prop="F_AddUserName" label="下单员工" align="center" />
31
+      <el-table-column label="操作" width="240" align="center" class-name="oparate_btn" fixed="right">
32
+        <template slot-scope="scope">
33
+          <el-button v-permission="'HY_detail'" type="text" @click="btn_detail(scope.row.F_Id)">详情</el-button>
34
+          <el-button v-permission="'HY_audit'" type="text" @click="btn_audit(scope.row.F_Id)">审核</el-button>
35
+        </template>
36
+      </el-table-column>
37
+    </el-table>
38
+    <pagination
39
+      v-show="pageParams.total > 0"
40
+      :total="pageParams.total"
41
+      :pageindex.sync="pageParams.pageindex"
42
+      :pagesize.sync="pageParams.pagesize"
43
+      class="pagination"
44
+      @pagination="getList"
45
+    />
46
+  </div>
47
+</template>
48
+
49
+<script>
50
+import { getDictionaryValueList } from '@/api/commonAPI'
51
+import { getConsolidateOrderList, deleteConsolidateOrderList } from "@/api/orderManagement/consolidateOrderList";
52
+import { getConsolidateOrderListCustomerService } from "@/api/customerServiceManagement/orderListCustomerService";
53
+import { pickerOptions, formatterContent } from "@/utils";
54
+import Pagination from "@/components/Pagination"; // 对el-pagination 二次封装
55
+import detail from "./detail"
56
+
57
+export default {
58
+  name: "ConsolidateOrderListCustomerService",
59
+  components: {
60
+    Pagination
61
+  },
62
+  filters: {
63
+    judgmentStateName(status) {
64
+      const statusMap = {
65
+        '-1': '无效',
66
+        '0': '暂存',
67
+        '1': '提交',
68
+        '2': '退回',
69
+        '3': '通过',
70
+        '4': '无货',
71
+        '5': '已分拣',
72
+        '6': '已发货'
73
+      }
74
+      return statusMap[status]
75
+    },
76
+  },
77
+  data() {
78
+    return {
79
+      loading: false,
80
+      searchData: {
81
+        adFrom: '', //消息/广告媒体来源
82
+        type: '', //订单类型
83
+        id: '', //订单号
84
+      },
85
+      activeName: "-2", //标签切换首页
86
+      pickerOptions, // 日期数据
87
+      pageParams: {
88
+        pageindex: 1, // 当前第几页
89
+        pagesize: Number(this.$store.getters.serverConfig.PAGESIZE), // 每页几条数据
90
+        total: 0 // 总共多少数据
91
+      },
92
+      dataLists: [], // 列表数据
93
+      multipleSelection: [], // 选中的数据
94
+      selectedId: [], // 选中的数据的id
95
+      mergeType: [],//合并类型
96
+    };
97
+  },
98
+  created() {
99
+    this.getOrderType()
100
+    this.getList()
101
+    document.onkeyup = e => {
102
+      if (e.keyCode === 13) {
103
+        this.getList();
104
+      }
105
+    };
106
+  },
107
+  methods: {
108
+    getList() {
109
+      this.loading = true;
110
+      return new Promise(resolve => {
111
+        const params = {
112
+          F_State: this.activeName, //订单状态
113
+          pageindex: this.pageParams.pageindex, // int 第几页
114
+          pagesize: this.pageParams.pagesize, // int 每页几条信息
115
+          F_OrderList: this.searchData.id,
116
+          F_Type: this.searchData.type
117
+        };
118
+        getConsolidateOrderListCustomerService(params).then(response => {
119
+          this.loading = false;
120
+          if (response.state.toLowerCase() === "success") {
121
+            this.pageParams.total = response.data.Totals;
122
+            this.dataLists = response.data.Rows;
123
+          }
124
+        });
125
+        resolve();
126
+      });
127
+    },
128
+    // 获取合并类型
129
+    getOrderType() {
130
+      return new Promise(resolve=>{
131
+        const params={
132
+          isleaf:true,
133
+          code:'MERGETYPE'
134
+        }
135
+        getDictionaryValueList(params).then(response=>{
136
+          if(response.state.toLowerCase() === 'success'){
137
+            this.mergeType = response.data.Rows
138
+          }
139
+        })
140
+      })
141
+    },
142
+    handleTabClick(tab, event) {
143
+      this.getList()
144
+    },
145
+    //添加
146
+    btn_add () {
147
+      this.$layer.iframe({
148
+        content: {
149
+          content: addOrEdit, // 传递的组件对象
150
+          parent: this, // 当前的vue对象
151
+          data: { 'rowid': '' }// props
152
+        },
153
+        area: ['80%', '90%'],
154
+        title: '添加'
155
+      })
156
+    },
157
+    //详情
158
+    btn_detail(detailId) {
159
+      this.$layer.iframe({
160
+        content: {
161
+          content: detail, // 传递的组件对象
162
+          parent: this, // 当前的vue对象
163
+          data: { rowid: detailId } // props
164
+        },
165
+        area: ["80%", "90%"],
166
+        title: "订单详情"
167
+      });
168
+    },
169
+    //编辑
170
+    btn_edit(editId) {
171
+      this.$layer.iframe({
172
+        content: {
173
+          content: addOrEdit, // 传递的组件对象
174
+          parent: this, // 当前的vue对象
175
+          data: { rowid: editId } // props
176
+        },
177
+        area: ["80%", "90%"],
178
+        title: "编辑订单"
179
+      });
180
+    },
181
+    btn_delete(id) {
182
+      this.$confirm('您确定要将此工单删除吗?', '提示', {
183
+        confirmButtonText: '确定',
184
+        cancelButtonText: '取消',
185
+        type: 'warning'
186
+      }).then(() => {
187
+        const data = {
188
+          ids: id
189
+        }
190
+        deleteConsolidateOrderList(data).then(response => {
191
+          if (response.state.toLowerCase() === 'success') {
192
+            this.getList()
193
+            this.$message.success('删除成功!')
194
+          }
195
+        })
196
+      }).catch(() => {
197
+        this.$message.info('已取消删除')
198
+      })
199
+    },
200
+    btn_search() {
201
+      this.pageParams.pageindex = 1;
202
+      this.getList();
203
+    },
204
+    //选择多个
205
+    handleSelectionChange(val) {
206
+      const ids = []
207
+      this.multipleSelection = val
208
+      for (let i=0; i<this.multipleSelection.length; i++) {
209
+        ids.push(this.multipleSelection[i].id)
210
+      }
211
+      this.selectedPhone = ids;
212
+    }, 
213
+  }
214
+};
215
+</script>
216
+
217
+<style rel="stylesheet/scss" lang="scss" scoped>
218
+.el{
219
+  cursor: pointer;
220
+}
221
+</style>

+ 140 - 11
CallCenterWeb.UI/src/views/orderManagement/orderListCustomerService/edit.vue

@@ -114,12 +114,17 @@
114 114
         </el-col>
115 115
         <el-col :span='12'>
116 116
           <el-form-item label="运费" prop="F_ExpressFee" >
117
-            <el-input v-model="ruleForm.F_ExpressFee" placeholder="请输入运费"/>
117
+            <el-select v-model="ruleForm.F_ExpressFee" placeholder="请选择运费" class="form_select" clearable>
118
+              <el-option label="10" value="10"></el-option>
119
+              <el-option label="28" value="28"></el-option>
120
+            </el-select>
118 121
           </el-form-item>
119 122
         </el-col>
120 123
         <el-col :span="12">
121 124
           <el-form-item label="支付方式" >
122
-            <el-input v-model="ruleForm.F_PayType" placeholder="请输入支付方式"/>
125
+            <el-select v-model="ruleForm.F_PayType" placeholder="请选择支付方式" class="form_select" clearable>
126
+              <el-option v-for="item in payTypeList" :key="item.F_Value" :label="item.F_Value" :value="item.F_Value"></el-option>
127
+            </el-select>
123 128
           </el-form-item>
124 129
         </el-col>
125 130
         <el-col :span="12">
@@ -133,8 +138,17 @@
133 138
           </el-form-item>
134 139
         </el-col>
135 140
         <el-col :span="12">
136
-          <el-form-item label="关联会员ID" >
137
-            <el-input v-model="ruleForm.F_VipId" placeholder="请输入关联会员ID"/>
141
+          <el-form-item label="推荐人" prop="F_RecommendName" >
142
+            <el-select v-model="ruleForm.F_RecommendName" class="form_select" filterable remote reserve-keyword clearable value-key="F_ID" placeholder="请输入电话号码" :remote-method="remoteMethodRecommend" :loading="loading" @change="recommendChangeSelect">
143
+              <el-option v-for="item in recommendListOptions" :key="item.F_ID" :label="item.F_Name" :value="item"></el-option>
144
+            </el-select>
145
+          </el-form-item>
146
+        </el-col>
147
+        <el-col :span="12">
148
+          <el-form-item label="归属人" prop="F_BelongName" >
149
+            <el-select v-model="ruleForm.F_BelongName" class="form_select" filterable remote reserve-keyword clearable value-key="F_UserId" placeholder="请输入归属人" :remote-method="remoteMethodBelong" :loading="loading" @change="belongChangeSelect">
150
+              <el-option v-for="item in belongListOptions" :key="item.F_UserId" :label="item.F_UserName" :value="item"></el-option>
151
+            </el-select>
138 152
           </el-form-item>
139 153
         </el-col>
140 154
       </el-row>
@@ -208,14 +222,15 @@
208 222
 
209 223
 <script>
210 224
 import { getProviceCity, getDictionaryValueList } from '@/api/commonAPI'
211
-import { getOrder, editOrderCustomerService, getActivityAccount } from "@/api/orderManagement/orderList";
225
+import { getOrder, getActivityAccount } from "@/api/orderManagement/orderList";
226
+import { editOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService";
212 227
 import { validateTel } from '@/utils/validate'
213 228
 import { delFiles, filterContent, pickerOptions } from '@/utils'
214 229
 import { getCommodityType } from '@/api/commodityManagement/commodityType'
215 230
 import { getCommodityList } from '@/api/commodityManagement/commodityList'
216 231
 import { getAreaTreeChildNode } from '@/api/systemSetup/roleSetting/areaManagement'
217
-
218
-
232
+import { getOrderLists } from '@/api/memberManagement/memberList'
233
+import { getUserAccountLists } from '@/api/systemSetup/roleSetting/userManage'
219 234
 
220 235
 const validateTelRule = (rule, value, callback) => {
221 236
   if (!validateTel(value)) {
@@ -257,6 +272,11 @@ export default {
257 272
       townDatas: [], //乡镇/下拉数据
258 273
       stockList: [], //出库货仓下拉数据
259 274
       expressList: [], //快递
275
+      payTypeList: [], //支付方式
276
+      recommendList: [], //会员列表数据
277
+      recommendListOptions: [], //会员列表数据
278
+      belongList: [], //归属人列表数据
279
+      belongListOptions: [], //归属人列表数据
260 280
       commodityTypeLists: [], //商品分类下拉数据
261 281
       commodityListLists: [], //商品下拉数据
262 282
       commoditySearchData: { //商品搜索数据
@@ -291,12 +311,15 @@ export default {
291 311
         F_Address: '', //否 string 详细地址
292 312
         F_PostalCode: '', //否 string 邮编
293 313
         F_Express: '', //否 string 选择的快递
294
-        F_ExpressFee: '', //否 number 运费
314
+        F_ExpressFee: '10', //否 number 运费
295 315
         F_PayType: '', //否 string  支付方式
296 316
         F_Stock: '', //否 string 出货仓库
297 317
         F_RealPrice: '', //否 number 实收金额
298
-        F_VipId: '', //否 number 关联会员id
299 318
         F_Score: '', //否 number  使用积分
319
+        F_RecommendId: '',// 否 number 推荐人id
320
+        F_RecommendName: '', //否 string 推荐人名称
321
+        F_Belong: 0, //否 number 归属人id
322
+        F_BelongName: '', //否 string 归属人名称
300 323
       },
301 324
       rules: {
302 325
         F_Customer: [{
@@ -329,10 +352,13 @@ export default {
329 352
     };
330 353
   },
331 354
   created() {
355
+    this.getRecommendList()
356
+    this.getBelongList()
332 357
     this.getCommodityTypeSelect()
333 358
     this.getStock()
334 359
     this.getOrderType()
335 360
     this.getExpress()
361
+    this.getPayType()
336 362
     this.getProvince()
337 363
     Promise.all([
338 364
     ]).then(() => {
@@ -351,7 +377,6 @@ export default {
351 377
           this.ruleForm.UseActList = []
352 378
           this.ruleForm.F_ExpressFee = this.ruleForm.F_ExpressFee == '' ? 0 : this.ruleForm.F_ExpressFee
353 379
           this.ruleForm.F_RealPrice = this.ruleForm.F_RealPrice == '' ? 0 : this.ruleForm.F_RealPrice
354
-          this.ruleForm.F_VipId = this.ruleForm.F_VipId == '' ? 0 : this.ruleForm.F_VipId
355 380
           this.ruleForm.F_Score = this.ruleForm.F_Score == '' ? 0 : this.ruleForm.F_Score
356 381
           // 编辑
357 382
           editOrderCustomerService(this.ruleForm)
@@ -477,6 +502,20 @@ export default {
477 502
         })
478 503
       })
479 504
     },
505
+    // 获取支付方式
506
+    getPayType() {
507
+      return new Promise(resolve=>{
508
+        const params={
509
+          isleaf:true,
510
+          code:'PayType'
511
+        }
512
+        getDictionaryValueList(params).then(response=>{
513
+          if(response.state.toLowerCase() === 'success'){
514
+            this.payTypeList = response.data.Rows
515
+          }
516
+        })
517
+      })
518
+    },
480 519
     //获取商品分类
481 520
     getCommodityTypeSelect() {
482 521
       this.loading = true
@@ -495,6 +534,93 @@ export default {
495 534
         resolve()
496 535
       })
497 536
     },
537
+    //获取推荐人列表
538
+    getRecommendList() {
539
+      this.loading = true
540
+      return new Promise(resolve => {
541
+        const params = {
542
+          pageindex: '', // int 第几页
543
+          pagesize: '', // int 每页几条信息
544
+          name: '', //客户姓名
545
+          phone: '', //手机号码
546
+          type: '', //会员类型
547
+          province: '', //省份
548
+          city: '', //市
549
+          area: '', //县区
550
+          town: '', //乡镇
551
+          address: '', //详细地址
552
+          birthday: '', //会员生日
553
+          recommender: '', //推荐人
554
+          saleperson: '', //销售负责人
555
+          contact: '', //联系频次
556
+        }
557
+        getOrderLists(params).then(response => {
558
+          this.loading = false
559
+          if (response.state.toLowerCase() === 'success') {
560
+            this.recommendList = response.rows.Rows
561
+          }
562
+        })
563
+        resolve()
564
+      })
565
+    },
566
+    //获取推荐人
567
+    remoteMethodRecommend(query) {
568
+      if (query !== '') {
569
+        this.loading = true;
570
+        setTimeout(() => {
571
+          this.loading = false;
572
+          this.recommendListOptions = this.recommendList.filter(item => {
573
+            return (item.F_Phone).toLowerCase()
574
+              .indexOf(query.toLowerCase()) > -1;
575
+          });
576
+        }, 200);
577
+      } else {
578
+        this.recommendListOptions = [];
579
+      }
580
+    },
581
+    recommendChangeSelect(item) {
582
+      this.ruleForm.F_RecommendId = item.F_ID
583
+      this.ruleForm.F_RecommendName = item.F_Name
584
+    },
585
+    //获取归属人列表
586
+    getBelongList() {
587
+      this.loading = true
588
+      return new Promise(resolve => {
589
+        const params = {
590
+          pageindex: '', // 第几页
591
+          pagesize: '', // 每页几条信息
592
+          keyword: '', // 否	string	模糊查询
593
+          roleid: '', // 否	string	角色id
594
+          deptid: '', // array  部门id 
595
+        }
596
+        getUserAccountLists(params).then(response => {
597
+          this.loading = false
598
+          if (response.state.toLowerCase() === 'success') {
599
+            this.belongList = response.data.Rows
600
+          }
601
+        })
602
+        resolve()
603
+      })
604
+    },
605
+    //获取归属人
606
+    remoteMethodBelong(query) {
607
+      if (query !== '') {
608
+        this.loading = true;
609
+        setTimeout(() => {
610
+          this.loading = false;
611
+          this.belongListOptions = this.belongList.filter(item => {
612
+            return (item.F_UserName).toLowerCase()
613
+              .indexOf(query.toLowerCase()) > -1;
614
+          });
615
+        }, 200);
616
+      } else {
617
+        this.belongListOptions = [];
618
+      }
619
+    },
620
+    belongChangeSelect(item) {
621
+      this.ruleForm.F_Belong = item.F_UserId
622
+      this.ruleForm.F_BelongName = item.F_UserName
623
+    },
498 624
     //获取商品
499 625
     getCommodityListSelect() {
500 626
       this.loading = true
@@ -600,8 +726,11 @@ export default {
600 726
           this.ruleForm.F_PayType = res.F_PayType //支付方式
601 727
           this.ruleForm.F_Stock = res.F_Stock //出货仓库
602 728
           this.ruleForm.F_RealPrice = res.F_RealPrice == 0 ? '' : res.F_RealPrice //实收金额
603
-          this.ruleForm.F_VipId = res.F_VipId == 0 ? '' : res.F_VipId //关联会员id
604 729
           this.ruleForm.F_Score = res.F_Score ==0 ? '' : res.F_Score //使用积分
730
+          this.ruleForm.F_RecommendId = res.F_RecommendId//推荐人id
731
+          this.ruleForm.F_RecommendName = res.F_RecommendName//推荐人名称
732
+          this.ruleForm.F_Belong = res.F_Belong //归属人id
733
+          this.ruleForm.F_BelongName = res.F_BelongName //归属人名称
605 734
         }
606 735
       });
607 736
     },

+ 1 - 1
CallCenterWeb.UI/src/views/orderManagement/orderListCustomerService/goback.vue

@@ -12,7 +12,7 @@
12 12
 </template>
13 13
 <script>
14 14
 
15
-import { checkOrderCustomerService } from '@/api/orderManagement/orderList'
15
+import { checkOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
16 16
 export default {
17 17
     props: {
18 18
         rowid: {

+ 54 - 10
CallCenterWeb.UI/src/views/orderManagement/orderListCustomerService/index.vue

@@ -25,8 +25,8 @@
25 25
       <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
26 26
       <el-button v-permission="'HY_export'" type="primary" class="filter-item" icon="el-icon-upload2" @click="btn_export">导出</el-button>
27 27
       <el-button v-permission="'HY_import'" type="primary" class="filter-item" icon="el-icon-download" @click="btn_import">导入</el-button>
28
-      <el-button v-permission="'HY_merge'" type="primary" @click="btn_merge">合并</el-button>
29
-      <el-button v-permission="'HY_split'" type="primary" @click="btn_split">拆分</el-button>
28
+      <el-button v-permission="'HY_merge'" type="primary" class="filter-item" @click="btn_merge">合并</el-button>
29
+      <el-button v-permission="'HY_split'" type="primary" class="filter-item" @click="btn_split">拆分</el-button>
30 30
     </div>
31 31
     <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick" >
32 32
       <el-tab-pane label="全部" name="-2"></el-tab-pane>
@@ -39,13 +39,17 @@
39 39
       <el-tab-pane label="已分拣" name="5"></el-tab-pane>
40 40
       <el-tab-pane label="已发货" name="6"></el-tab-pane>
41 41
     </el-tabs>
42
-    <el-table v-loading="loading" :data="dataLists" border stripe  @selection-change="handleSelectionChange">
43
-      <el-table-column type="selection"></el-table-column>
42
+    <el-table v-loading="loading" :data="dataLists" border stripe  @selection-change="handleSelectionChange" row-key="F_Id">
43
+      <el-table-column type="selection" :reserve-selection="true"></el-table-column>
44 44
       <el-table-column type="index" label="编号" align="center" fixed width="80" />
45 45
       <el-table-column prop="F_Id" label="订单编号" align="center" min-width="150" />
46 46
       <el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
47 47
       <el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
48
-      <el-table-column prop="typename" label="订购商品" align="center" min-width />
48
+      <el-table-column label="订购商品" align="center" min-width>
49
+      <template slot-scope="scope">
50
+        {{ scope.row.OrderDetailList | judgmentOrderGoods}}
51
+      </template>
52
+      </el-table-column>
49 53
       <el-table-column prop="F_AddTime" label="下单日期" align="center" />
50 54
       <el-table-column label="订单状态" align="center" >
51 55
         <template slot-scope="scope">
@@ -61,6 +65,7 @@
61 65
           <el-button v-permission="'HY_edit'" type="text" @click="btn_edit(scope.row.F_Id)">编辑</el-button>
62 66
           <el-button v-permission="'HY_return'" type="text" @click="btn_goback(scope.row.F_Id)">退回</el-button>
63 67
           <el-button v-permission="'HY_through'" type="text" @click="btn_through(scope.row.F_Id)">通过</el-button>
68
+          <el-button v-permission="'HY_label'" type="text" @click="btn_label(scope.row.F_Id)">标签</el-button>
64 69
           <!-- <el-button v-permission="'HY_detail'" type="text" @click="btn_detail(scope.row.F_Id)">详情</el-button> -->
65 70
         </template>
66 71
       </el-table-column>
@@ -78,11 +83,13 @@
78 83
 
79 84
 <script>
80 85
 import { getDictionaryValueList } from '@/api/commonAPI'
81
-import { getOrderListCustomerService, cancelOrder } from "@/api/orderManagement/orderList";
86
+import { getOrderListCustomerService } from "@/api/customerServiceManagement/orderListCustomerService";
82 87
 import { pickerOptions, formatterContent } from "@/utils";
83 88
 import goback from "./goback";
84 89
 import through from "./through";
90
+import label from "./label";
85 91
 import edit from "./edit";
92
+import merge from './merge';
86 93
 // import detail from './detail';
87 94
 // import importAuth from './importAuth';
88 95
 import Pagination from "@/components/Pagination"; // 对el-pagination 二次封装
@@ -106,6 +113,14 @@ export default {
106 113
       }
107 114
       return statusMap[status]
108 115
     },
116
+    judgmentOrderGoods(status) {
117
+      let orderGoodsNameQuantity = ''
118
+      for (let i = 0; i < status.length; i++) {
119
+        orderGoodsNameQuantity = `${orderGoodsNameQuantity}${status[i].F_ProductName}*${status[i].F_Count},`
120
+      }
121
+      orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
122
+      return orderGoodsNameQuantity
123
+    },
109 124
   },
110 125
   data() {
111 126
     return {
@@ -130,6 +145,7 @@ export default {
130 145
       multipleSelection: [], // 选中的数据
131 146
       selectedId: [], // 选中的数据的id
132 147
       orderType: [],//订单类型
148
+      mergeOrderId: [], //合并订单id
133 149
     };
134 150
   },
135 151
   created() {
@@ -250,9 +266,37 @@ export default {
250 266
         title: "通过订单"
251 267
       });
252 268
     },
253
-
269
+    //标签订单
270
+    btn_label(orderid) {
271
+      this.$layer.iframe({
272
+        content: {
273
+          content: label, // 传递的组件对象
274
+          parent: this, // 当前的vue对象
275
+          data: { rowid: orderid } // props
276
+        },
277
+        area: ["30%", "30%"],
278
+        title: "标签"
279
+      });
280
+    },
254 281
     //合并
255
-    btn_merge() {},
282
+    btn_merge() {
283
+      if (this.mergeOrderId.length < 2) {
284
+        this.$message({
285
+          message: '最少选择两条订单!',
286
+          type: 'warning'
287
+        });
288
+        return
289
+      }
290
+      this.$layer.iframe({
291
+        content: {
292
+          content: merge, // 传递的组件对象
293
+          parent: this, // 当前的vue对象
294
+          data: { rowid: this.mergeOrderId } // props
295
+        },
296
+        area: ["80%", "90%"],
297
+        title: "合并订单"
298
+      });
299
+    },
256 300
     //拆分
257 301
     btn_split() {},
258 302
     //选择多个
@@ -260,9 +304,9 @@ export default {
260 304
       const ids = []
261 305
       this.multipleSelection = val
262 306
       for (let i=0; i<this.multipleSelection.length; i++) {
263
-        ids.push(this.multipleSelection[i].id)
307
+        ids.push(this.multipleSelection[i].F_Id)
264 308
       }
265
-      this.selectedPhone = ids;
309
+      this.mergeOrderId = ids
266 310
     }, 
267 311
   }
268 312
 };

+ 79 - 0
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerService/label.vue

@@ -0,0 +1,79 @@
1
+<template>
2
+  <div>
3
+    <el-form ref="form" :model="form" label-width="80px">
4
+      <el-form-item label="订单类型" prop="tags">
5
+        <el-select v-model="ruleForm.tags" class="form_select" multiple filterable clearable placeholder="请选择订单类型">
6
+          <el-option v-for="item in orderTag" :key="item.F_Value" :label="item.F_Value" :value="item.F_Value"/>
7
+        </el-select>
8
+      </el-form-item>
9
+      <el-form-item>
10
+          <el-button type="primary" @click="submitForm()">提交</el-button>
11
+      </el-form-item>
12
+    </el-form>
13
+  </div>
14
+</template>
15
+<script>
16
+
17
+import { labelOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
18
+import { getDictionaryValueList } from '@/api/commonAPI'
19
+export default {
20
+    props: {
21
+      rowid: {
22
+        type: String,
23
+        default: ''
24
+      },
25
+      layerid: {
26
+        type: String,
27
+        default: ""
28
+      }
29
+    },
30
+    data(){
31
+      return{
32
+        ruleForm: {
33
+          orderids: '', //订单编号
34
+          tags: '', //标签内容
35
+        },
36
+        orderTag: [],// 标签
37
+      }
38
+    },
39
+    created() {
40
+      this.getOrderTag()
41
+      if (this.rowid) {
42
+          this.ruleForm.orderids = this.rowid
43
+      }
44
+    },
45
+    methods: {
46
+      submitForm(){
47
+        this.ruleForm.tags = this.ruleForm.tags.join(',')
48
+        labelOrderCustomerService(this.ruleForm).then(response => {
49
+          if (response.state.toLowerCase() === 'success') {
50
+            this.$parent.$layer.close(this.layerid);
51
+            this.$parent.getList(); // 重新加载父级数据
52
+            this.$message.success('恭喜你,工单信息审核成功!')
53
+          }
54
+        }).catch(() => {
55
+          this.loading = false
56
+        })
57
+      },
58
+      // 获取订单类型
59
+      getOrderTag() {
60
+        return new Promise(resolve=>{
61
+          const params={
62
+            isleaf:true,
63
+            code:'OrderTag'
64
+          }
65
+          getDictionaryValueList(params).then(response=>{
66
+            if(response.state.toLowerCase() === 'success'){
67
+              this.orderTag = response.data.Rows
68
+            }
69
+          })
70
+        })
71
+      },
72
+    },
73
+}
74
+</script>
75
+<style lang="scss" scoped>
76
+.form_select{
77
+  width: 100%
78
+}
79
+</style>

+ 142 - 0
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerService/merge.vue

@@ -0,0 +1,142 @@
1
+<template>
2
+  <div v-loading="loading">
3
+    <el-form ref="ruleForm" :model="ruleForm" :rules="rules" label-width="150px" class="order_form">
4
+      <el-form-item label="订单编号" prop="F_OrderList" >
5
+        <el-input v-model="ruleForm.F_OrderList" placeholder="请输入订单编号" disabled="false" />
6
+      </el-form-item>
7
+      <el-form-item label="合并类型" prop="F_Type" >
8
+        <el-select v-model="ruleForm.F_Type" class="form_select" filterable clearable placeholder="请选择合并类型">
9
+          <el-option v-for="item in mergeType" :key="item.F_Value" :label="item.F_Value" :value="item.F_Value"/>
10
+        </el-select>
11
+      </el-form-item>
12
+      <el-form-item label="赠送商品" prop="F_Gift">
13
+        <el-input v-model="ruleForm.F_Gift" placeholder="请输入赠送商品"/>
14
+      </el-form-item>
15
+      <el-form-item label="减免金额" prop="F_Money">
16
+        <el-input v-model="ruleForm.F_Money" placeholder="请输入减免金额"/>
17
+      </el-form-item>
18
+      <el-form-item label="销售备注" prop="F_Remark">
19
+        <el-input :autosize="{ minRows: 4}" v-model="ruleForm.F_Remark" type="textarea" placeholder="请输入销售备注"/>
20
+      </el-form-item>
21
+      <el-form-item>
22
+        <el-button type="primary" @click="submitForm(0)">保存</el-button>
23
+        <el-button type="primary" @click="submitForm(1)">提交</el-button>
24
+      </el-form-item>
25
+    </el-form>
26
+  </div>
27
+</template>
28
+
29
+<script>
30
+import { getDictionaryValueList } from '@/api/commonAPI'
31
+import { addConsolidateOrderList } from "@/api/orderManagement/consolidateOrderList";
32
+
33
+export default {
34
+  name: "Merge",
35
+  props: {
36
+    rowid: {
37
+      type: Array,
38
+      default: []
39
+    },
40
+    layerid: {
41
+      type: String,
42
+      default: ""
43
+    }
44
+  },
45
+  data() {
46
+    return {
47
+      mergeType: [],//订单类型
48
+      ruleForm: {
49
+        F_Id: '',
50
+        F_OrderList: '', //合并订单
51
+        F_Type: '', //合并类型
52
+        F_Gift: '', //赠送商品
53
+        F_Money: '', //减免金额
54
+        F_Remark: '', //销售备注
55
+        F_state: '', //订单状态
56
+      },
57
+      rules: {
58
+        order1: [{
59
+          required: true,
60
+          trigger: 'blur',
61
+          message: '请输入订单编号1',
62
+        }],
63
+        order2: [{
64
+          required: true,
65
+          trigger: 'blur',
66
+          message: '请输入订单编号2',
67
+        }],
68
+        F_Type: [{
69
+          required: true,
70
+          trigger: 'blur',
71
+          message: '请输入订单类型',
72
+        }],
73
+        F_Gift: [{
74
+          required: true,
75
+          trigger: 'blur',
76
+          message: '请输入赠送商品',
77
+        }],
78
+        F_Money: [{
79
+          required: true,
80
+          trigger: 'blur',
81
+          message: '请输入减免金额',
82
+        }],
83
+      },
84
+      loading: false
85
+    };
86
+  },
87
+  created() {
88
+    this.getMergeType()
89
+    Promise.all([
90
+    ]).then(() => {
91
+      if (this.rowid) {
92
+        this.ruleForm.F_OrderList = this.rowid.join(',').replace(/\s+/g, '')
93
+      }
94
+    });
95
+  },
96
+  methods: {
97
+    submitForm(state) {
98
+      this.$refs.ruleForm.validate(valid => {
99
+        if (valid) {
100
+          this.loading = true;
101
+          this.ruleForm.F_state = state
102
+          //添加
103
+          addConsolidateOrderList(this.ruleForm).then(response => {
104
+            this.loading = false
105
+            if (response.state.toLowerCase() === 'success') {
106
+              this.$parent.$layer.close(this.layerid)
107
+              this.$parent.getList() // 重新加载父级数据
108
+              this.$message.success('恭喜你,添加成功!')
109
+            }
110
+          }).catch(() => {
111
+            this.loading = false
112
+          })
113
+          return
114
+        } else {
115
+          this.$message.error("请输入有效的必填项信息!");
116
+          return false;
117
+        }
118
+      });
119
+    },
120
+    // 获取合并类型
121
+    getMergeType() {
122
+      return new Promise(resolve=>{
123
+        const params={
124
+          isleaf:true,
125
+          code:'MERGETYPE'
126
+        }
127
+        getDictionaryValueList(params).then(response=>{
128
+          if(response.state.toLowerCase() === 'success'){
129
+            this.mergeType = response.data.Rows
130
+          }
131
+        })
132
+      })
133
+    },
134
+  }
135
+};
136
+</script>
137
+
138
+<style rel="stylesheet/scss" lang="scss">
139
+.order_form .form_select {
140
+  width: 100%;
141
+}
142
+</style>

+ 1 - 6
CallCenterWeb.UI/src/views/orderManagement/orderListCustomerService/through.vue

@@ -1,11 +1,6 @@
1 1
 <template>
2 2
     <div>
3 3
         <el-form ref="form" :model="form" label-width="80px">
4
-            <!-- <el-form-item label="订单编号">
5
-                <el-col :span='12'>
6
-                    <span>{{ ruleForm.orderid }}</span>
7
-                </el-col>
8
-            </el-form-item> -->
9 4
             <el-form-item label="备注">
10 5
                 <el-input v-model="ruleForm.remark" type="textarea" placeholder="备注"></el-input>
11 6
             </el-form-item>
@@ -17,7 +12,7 @@
17 12
 </template>
18 13
 <script>
19 14
 
20
-import { checkOrderCustomerService } from '@/api/orderManagement/orderList'
15
+import { checkOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
21 16
 export default {
22 17
     props: {
23 18
         rowid: {

+ 269 - 0
CallCenterWeb.UI/src/views/dashboard/components/leftContent.vue

@@ -0,0 +1,269 @@
1
+<template>
2
+  <el-card class="content" :style="{height:height}">
3
+    <div class="remind">
4
+      <div class="remindHeader topLine">
5
+        <img src="/static/img/remind.png" alt srcset />
6
+        <span>重要提醒</span>
7
+        <span >{{nowDate}}</span>
8
+      </div>
9
+      <div class="toadyAd">
10
+        <div>
11
+          <span>今日广告量</span>
12
+          <span class="line"></span>
13
+          <span>{{advertisement}}</span>
14
+        </div>
15
+        <div>
16
+          <span>营销活动量</span>
17
+          <span class="line"></span>
18
+          <span>{{marketing}}</span>
19
+        </div>
20
+      </div>
21
+    </div>
22
+    <div class="remind">
23
+      <div class="remindHeader">
24
+        <img src="/static/img/plan.png" alt srcset />
25
+        <span>计划相关</span>
26
+        <router-link class="inlineBlock" to="/notice/manage">查看更多>></router-link>
27
+      </div>
28
+      <ul class="plan">
29
+        <li v-for="(item,index) in planData" :key="index">
30
+          <el-checkbox :checked="item.value==0?false:true" disabled></el-checkbox>{{item.key}}
31
+        </li>
32
+      </ul>
33
+    </div>
34
+    <div class="remind">
35
+      <div class="remindHeader">
36
+        <img src="/static/img/daiban.png" alt srcset />
37
+        <span>待办事项</span>
38
+      </div>
39
+      <div class="order">
40
+        <div>订单相关</div>
41
+        <ul class="clearfix">
42
+          <li>
43
+            <router-link to="/notice/manage">待审核订单:{{tobeexamine}}</router-link>
44
+          </li>
45
+          <li>待分配物流订单:{{tobedistribution}}</li>
46
+          <li>待回款订单:{{tobecollected}}</li>
47
+          <li>待理赔订单:{{pendingclaims}}</li>
48
+          <li>审核退回订单:{{reviewreturn}}</li>
49
+          <li>售后订单:{{aftersale}}</li>
50
+          <li>待退回订单:{{toberefunded}}</li>
51
+        </ul>
52
+      </div>
53
+      <div class="order">
54
+        <div>客户相关</div>
55
+        <ul>
56
+          <li>
57
+            <router-link to="/notice/manage">待联系客户:{{tobecontacted}}</router-link>
58
+          </li>
59
+        </ul>
60
+      </div>
61
+    </div>
62
+  </el-card>
63
+</template>
64
+<script>
65
+import { getRemindData,getTodolistData } from '@/api/dashboard/orderDatas'
66
+export default {
67
+  props: {
68
+    height: {
69
+      type: String,
70
+      default: "1000px"
71
+    },
72
+    nowDate: {
73
+      type: String,
74
+      default: ""
75
+    },
76
+  },
77
+  created() {
78
+      this.getRemindList();
79
+      this.getTodokist();
80
+  },
81
+  data() {
82
+    return {
83
+      marketing:'',//营销活动
84
+      advertisement:'',//广告量
85
+      tobeexamine:'',//待审核
86
+      reviewreturn:'',//审核退回
87
+      tobedistribution:'',//待分配
88
+      aftersale:'',//售后
89
+      tobecollected:'',//待回款
90
+      toberefunded:'',//待退款
91
+      pendingclaims:'',//待理赔
92
+      tobecontacted:'',//待联系客户
93
+      planData:[
94
+          {
95
+              key:'备选项1',
96
+              value:0
97
+          },
98
+          {
99
+              key:'备选项2',
100
+              value:1
101
+          },
102
+          {
103
+              key:'备选项2',
104
+              value:1
105
+          },
106
+          {
107
+              key:'备选项2',
108
+              value:1
109
+          },
110
+          {
111
+              key:'备选项2',
112
+              value:1
113
+          },
114
+          {
115
+              key:'备选项2',
116
+              value:1
117
+          },
118
+          {
119
+              key:'备选项2',
120
+              value:1
121
+          },
122
+      ],//计划相关数据
123
+    };
124
+  },
125
+  methods: {
126
+      getRemindList(){
127
+          return new Promise(resolve=>{
128
+              const params={
129
+                  time:this.nowDate
130
+              }
131
+              getRemindData(params).then(response=>{
132
+                  if(response.state=='success'){
133
+                      this.advertisement=response.advertisement
134
+                      this.marketing=response.marketing
135
+                  }
136
+              }).catch(resolve=>{
137
+                  console.log(resolve)
138
+              })
139
+          })
140
+      },
141
+      //获取待办事项数据
142
+      getTodokist(){
143
+          return new Promise(resolve=>{
144
+              const params={
145
+                  time:this.nowDate
146
+              }
147
+              getTodolistData(params).then(response=>{
148
+                  if(response.state=='success'){
149
+                      this.tobeexamine=response.tobeexamine;//待审核
150
+                      this.reviewreturn=response.reviewreturn;//审核退回
151
+                      this.tobedistribution=response.tobedistribution;//待分配
152
+                      this.aftersale=response.aftersale;//售后
153
+                      this.tobecollected=response.tobecollected;//待回款
154
+                      this.toberefunded=response.toberefunded;//待退款
155
+                      this.pendingclaims=response.pendingclaims;//待理赔
156
+                      this.tobecontacted=response.tobecontacted;//待联系客户
157
+                  }
158
+              })
159
+          })
160
+      },
161
+  },
162
+};
163
+</script>
164
+<style lang="scss" scoped>
165
+ul {
166
+  li {
167
+    margin: 0;
168
+    padding: 0;
169
+    list-style: none;
170
+  }
171
+}
172
+.clearfix:after {
173
+  /*伪元素是行内元素 正常浏览器清除浮动方法*/
174
+  content: "";
175
+  display: block;
176
+  height: 0;
177
+  clear: both;
178
+  visibility: hidden;
179
+}
180
+.clearfix {
181
+  *zoom: 1; /*ie6清除浮动的方式 *号只有IE6-IE7执行,其他浏览器不执行*/
182
+}
183
+.content {
184
+  margin-left: 12px;
185
+  padding: 0 28px;
186
+  .remind {
187
+    padding-bottom: 22px;
188
+    .remindHeader {
189
+      height: 60px;
190
+      line-height: 60px;
191
+      border-bottom: 1px solid #ccc;
192
+      border-top: 1px solid #ccc;
193
+      img {
194
+        vertical-align: middle;
195
+      }
196
+      span:nth-child(3){
197
+          font-size: 15px;
198
+          color: #939393;
199
+          float: right;
200
+      }
201
+      .inlineBlock {
202
+        float: right;
203
+        font-size: 12px;
204
+        color: #4cb9ff;
205
+      }
206
+    }
207
+    .plan{
208
+        height: 200px;
209
+        overflow: hidden;
210
+    }
211
+    .topLine {
212
+      border-top: none;
213
+    }
214
+    ul {
215
+      padding: 0;
216
+      li {
217
+        width: 100%;
218
+        height: 40px;
219
+        line-height: 40px;
220
+        margin: 10px 0;
221
+        background-color: #ebebeb;
222
+        .el-checkbox {
223
+          padding: 0 5px;
224
+        }
225
+      }
226
+    }
227
+    .order {
228
+      margin-top: 24px;
229
+      div {
230
+        font-size: 18px;
231
+        color: #000a12;
232
+        font-weight: 700;
233
+      }
234
+      ul {
235
+        padding: 0;
236
+        li {
237
+          float: left;
238
+          width: 50%;
239
+          background-color: #fff;
240
+          font-size: 14px;
241
+          color: #4e8bc6;
242
+        }
243
+      }
244
+    }
245
+  }
246
+  .toadyAd {
247
+    width: 100%;
248
+    div {
249
+      width: 100%;
250
+      height: 36px;
251
+      border: 1px solid #ccc;
252
+      margin-top: 16px;
253
+      font-size: 20px;
254
+      color: #858585;
255
+      border-radius: 7px;
256
+      line-height: 36px;
257
+      padding-left: 17px;
258
+      .line {
259
+        border-top-right-radius: 7px;
260
+        border-bottom-right-radius: 7px;
261
+        display: inline-block;
262
+        width: 40%;
263
+        height: 12px;
264
+        background-image: linear-gradient(to right, #5a8bf6, #4cb9ff);
265
+      }
266
+    }
267
+  }
268
+}
269
+</style>

+ 103 - 0
CallCenterWeb.UI/src/views/dashboard/components/mediaData.vue

@@ -0,0 +1,103 @@
1
+<template>
2
+  <el-card class="header" :style="{height:height}">
3
+    <div class="remindHeader topLine">
4
+      <img src="/static/img/media.png" alt srcset />
5
+      <span>媒体进线量排名</span>
6
+    </div>
7
+    <!-- 折线图 -->
8
+    <div ref="pieChart" class="chart" :style="{height:'310px'}" />
9
+  </el-card>
10
+</template>
11
+<script>
12
+import echarts from "echarts";
13
+export default {
14
+  props: {
15
+    height: {
16
+      type: String,
17
+      default: "350px"
18
+    }
19
+  },
20
+  data() {
21
+    return {
22
+      option: {
23
+        title: {
24
+          text: ""
25
+        },
26
+        tooltip: {
27
+          trigger: "axis",
28
+          axisPointer: {
29
+            type: "cross",
30
+            label: {
31
+              backgroundColor: "#6a7985"
32
+            }
33
+          }
34
+        },
35
+        legend: {
36
+          data: [
37
+            "进线量接通量",
38
+            "进线未接通量"
39
+          ]
40
+        },
41
+        grid: {
42
+          left: "3%",
43
+          right: "4%",
44
+          bottom: "3%",
45
+          containLabel: true
46
+        },
47
+        xAxis: [
48
+          {
49
+            type: "category",
50
+            boundaryGap: false,
51
+            data: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"]
52
+          }
53
+        ],
54
+        yAxis: [
55
+          {
56
+            type: "value"
57
+          }
58
+        ],
59
+        series: [
60
+          {
61
+            name: "进线量接通量",
62
+            type: "line",
63
+            stack: "总量",
64
+            areaStyle: {},
65
+            data: [120, 132, 101, 134, 460, 230, 210]
66
+          },
67
+          {
68
+            name: "进线未接通量",
69
+            type: "line",
70
+            stack: "总量",
71
+            areaStyle: {},
72
+            data: [220, 182, 191, 234, 290, 330, 310]
73
+          },
74
+        ]
75
+      }
76
+    };
77
+  },
78
+  mounted() {
79
+    this.initChart();
80
+  },
81
+  methods: {
82
+    // 初始化数据
83
+    initChart() {
84
+      this.chart = echarts.init(this.$refs.pieChart, "macarons");
85
+      this.chart.clear();
86
+      this.chart.setOption(this.option);
87
+    }
88
+  }
89
+};
90
+</script>
91
+<style lang="scss" scoped>
92
+.header {
93
+  margin-top: 20px;
94
+  span {
95
+    font-size: 16px;
96
+    font-weight: 700;
97
+  }
98
+  img {
99
+    vertical-align: middle;
100
+    margin-right: 7px;
101
+  }
102
+}
103
+</style>

+ 116 - 0
CallCenterWeb.UI/src/views/dashboard/components/personalRanking.vue

@@ -0,0 +1,116 @@
1
+<template>
2
+     <el-card  :style="{height:height}" shadow="hover" class="header">
3
+         <div class="remindHeader topLine">
4
+            <img src="/static/img/ranking.png" alt="" srcset="">
5
+            <span>个人排行榜</span>
6
+        </div>
7
+        <span>
8
+          <el-select v-model="typeValue" placeholder="请选择" @change="hadleType">
9
+                <el-option
10
+                v-for="item in typeData"
11
+                :key="item.value"
12
+                :label="item.label"
13
+                :value="item.value">
14
+                </el-option>
15
+            </el-select>
16
+      </span>
17
+         <el-button type="text" class="btn_more" @click="btn_more">查看更多</el-button>
18
+    <el-tabs>
19
+          <el-table  :data="personalData" stripe style="width: 100%">
20
+            <el-table-column width="80" align="center" label="编号">
21
+              <template slot-scope="scope">
22
+                <span  class="sort">{{ scope.row.Serialnumber }}</span>
23
+              </template>
24
+            </el-table-column>
25
+            <el-table-column label="名字" align="left" width="">
26
+              <template slot-scope="scope">
27
+                <span>{{ scope.row.name }}</span>
28
+              </template>
29
+            </el-table-column>
30
+            <el-table-column label="订单量" align="left" width="">
31
+              <template slot-scope="scope">
32
+                <span>{{ scope.row.Orderquantity }}</span>
33
+              </template>
34
+            </el-table-column>
35
+            <el-table-column label="销售额" align="left">
36
+              <template slot-scope="scope">
37
+                <span>{{ scope.row.Totalsales }}</span>
38
+              </template>
39
+            </el-table-column>
40
+          </el-table>
41
+    </el-tabs>
42
+  </el-card>
43
+</template>
44
+<script>
45
+import router from '@/router'
46
+import { getRankingData } from '@/api/dashboard/orderDatas'
47
+export default {
48
+    props: {
49
+        height: {
50
+        type: String,
51
+        default: "350px"
52
+        }
53
+    },
54
+    data() {
55
+        return {
56
+            personalData: [],
57
+            typeValue:0,
58
+            typeData:[
59
+            {
60
+            value:0,
61
+            label:'本月'
62
+        },{
63
+            value:1,
64
+            label:'本日'
65
+        },
66
+        ],
67
+        }
68
+    },
69
+    created() {
70
+      this.getPersonalList()
71
+    },
72
+    methods: {
73
+         btn_more() {
74
+            router.push({ name: 'callRecord' })
75
+        },
76
+        getPersonalList(){
77
+          return new Promise(resolve=>{
78
+            const params={
79
+              type:this.typeValue,
80
+            }
81
+            getRankingData(params).then(response=>{
82
+              if(response.state='success'){
83
+                this.personalData=response.personalrankings
84
+              }
85
+            })
86
+          })
87
+        },
88
+        //选择
89
+    hadleType(val){
90
+        this.typeValue=val;
91
+        this.getPersonalList()
92
+    },
93
+    },
94
+}
95
+</script>
96
+<style lang="scss" scoped>
97
+.header{
98
+    margin: 20px 0 0 10px;
99
+    position: relative;
100
+    img{
101
+        vertical-align: middle;
102
+    }
103
+    .el-select{
104
+        width: 90px;
105
+        height: 33px;
106
+        position: absolute;
107
+        top: 20px;
108
+        right: 70px;
109
+    }
110
+}
111
+.btn_more {
112
+    position: absolute;
113
+    top: 20px;
114
+    right: 10px;
115
+}
116
+</style>

+ 113 - 0
CallCenterWeb.UI/src/views/dashboard/components/salesData.vue

@@ -0,0 +1,113 @@
1
+<template>
2
+  <el-card shadow="always" :style="{height:height}">
3
+    <div class='header'>
4
+      <img src="/static/img/sales.png" alt srcset />
5
+      <span class="header1">实时销售行为分析</span>
6
+      <span class="header2">更新时间:{{nowDate}}</span>
7
+    </div>
8
+    <div>
9
+      <ul style="width:20%;">
10
+        <li class="top" style="border-top-left-radius: 10px;border-bottom-left-radius: 10px;">新增客户</li>
11
+        <li>{{newcustomer}}</li>
12
+        <li>昨日:{{oldcustomer}}</li>
13
+      </ul>
14
+      <ul style="width:20%;">
15
+        <li class="top">新增订单量</li>
16
+        <li>0</li>
17
+        <li>昨日:</li>
18
+      </ul>
19
+      <ul style="width:20%;">
20
+        <li class="top">售后订单量</li>
21
+        <li>{{newaftersale}}</li>
22
+        <li>昨日:{{oldaftersale}}</li>
23
+      </ul>
24
+      <ul style="width:20%;">
25
+        <li class="top">新客户下单量</li>
26
+        <li>{{newcustomers}}</li>
27
+        <li>昨日:{{oldcustomers}}</li>
28
+      </ul>
29
+      <ul style="width:20%;">
30
+        <li class="top" style="border-top-right-radius: 10px;border-bottom-right-radius: 10px;">老客户下单量</li>
31
+        <li>{{newcustomerorder}}</li>
32
+        <li>昨日:{{oldcustomerorder}}</li>
33
+      </ul>
34
+    </div>
35
+  </el-card>
36
+</template>
37
+<script>
38
+import { getSalesData } from '@/api/dashboard/orderDatas'
39
+export default {
40
+    props: {
41
+        height: {
42
+        type: String,
43
+        default: ''
44
+        },
45
+        nowDate: {
46
+        type: String,
47
+        default: ''
48
+        },
49
+    },
50
+  data() {
51
+    return {
52
+        newcustomer:'',
53
+        oldcustomer:'',
54
+        newaftersale:'',
55
+        oldaftersale:'',
56
+        newcustomers:'',
57
+        oldcustomers:'',
58
+        newcustomerorder:'',
59
+        oldcustomerorder:'',
60
+    };
61
+  },
62
+  created() {
63
+      this.getDataList()
64
+  },
65
+  methods: {
66
+      getDataList(){
67
+          return new Promise(resolve=>{
68
+              const params={
69
+                  time:this.nowDate
70
+              }
71
+              getSalesData(params).then(response=>{
72
+                if(response.state=='success'){
73
+                    this.newcustomer=response.newcustomer;//新增客户
74
+                    this.oldcustomer=response.oldcustomer;//昨日新增客户
75
+                    this.newaftersale=response.newaftersale;//售后订单量
76
+                    this.oldaftersale=response.oldaftersale;//昨日订单量
77
+                    this.newcustomers=response.newcustomers;//新客户下单量
78
+                    this.oldcustomers=response.oldcustomers;//昨日新客户下单量
79
+                    this.newcustomerorder=response.newcustomerorder;//老客户下单量
80
+                    this.oldcustomerorder=response.oldcustomerorder;//昨日老客户下单量
81
+                }
82
+            })
83
+          })
84
+      }
85
+  },
86
+};
87
+</script>
88
+<style lang="scss" scoped>
89
+ul{
90
+    float: left;
91
+    padding: 0px;
92
+  li{
93
+    padding: 0;
94
+    margin: 0;
95
+    list-style: none;
96
+    padding: 4px 0px;
97
+    text-align: center;
98
+  }
99
+}
100
+.header{
101
+    .header1{
102
+            font-size: 17px;
103
+            color: #666666;
104
+        }
105
+    .header2{
106
+            font-size: 15px;
107
+            color: #939393;
108
+        }
109
+}
110
+.top{
111
+    background-color: #e4effb;
112
+}
113
+</style>

+ 186 - 0
CallCenterWeb.UI/src/views/dashboard/components/totalTasks.vue

@@ -0,0 +1,186 @@
1
+<template>
2
+  <el-card class="header" :style="{height:height}">
3
+    <el-col :lg="12">
4
+      <el-col :lg='6'>
5
+        <img src="/static/img/taskLogo.png" alt srcset />
6
+      </el-col>
7
+      <el-col :lg='18'>
8
+        <span class="taskNum">
9
+        <div class="mouthTask">当月任务总量</div>
10
+        <div>
11
+          <div>{{tasktotal}}</div>
12
+        </div>
13
+        <div>已完成:{{taskcurrent}}</div>
14
+      </span>
15
+      </el-col>
16
+    </el-col>
17
+    <el-col :lg="12">
18
+      <!-- 环形图 -->
19
+      <div  ref="pieChart" class="chart"  :style="{height:height}"/>
20
+    </el-col>
21
+  </el-card>
22
+</template>
23
+<script>
24
+import echarts from 'echarts'
25
+require('echarts/theme/macarons') // echarts theme
26
+import { debounce } from '@/utils'
27
+import { getTaskList } from '@/api/dashboard/orderDatas'
28
+export default {
29
+  props: {
30
+    height: {
31
+      type: String,
32
+      default: "150px"
33
+    },
34
+    nowDate: {
35
+      type: String,
36
+      default: ""
37
+    },
38
+  },
39
+  data() {
40
+    return {
41
+      taskcurrent:'',//当前任务量
42
+      tasktotal:'',//任务总量
43
+      loading: false,
44
+      chart: null,
45
+      search_date: "1",
46
+      option: {
47
+        tooltip: {
48
+          trigger: 'item',
49
+          formatter: '{a} <br/>{b} : {c} ({d}%)'
50
+        },
51
+        legend: {
52
+          left: 'center',
53
+          bottom: '0',
54
+          data: [] // 图例数据
55
+        },
56
+         textStyle: {         
57
+            fontSize: 14,
58
+            fontFamily: "Microsoft YaHei",
59
+
60
+        },
61
+        graphic:{       //图形中间文字
62
+            type:"text",
63
+            left:"center",
64
+            top:"center",
65
+            style:{
66
+                text:"66",
67
+                textAlign:"center",
68
+                fill:"#fff",
69
+                fontSize:12,
70
+                color: "#4d4f5c",
71
+                fontFamily: "Microsoft YaHei"
72
+            }
73
+        },
74
+        calculable: true,
75
+        series: [{
76
+          name: '',
77
+          type: 'pie',
78
+          radius: [30, 50],
79
+          center: ['50%', '45%'],
80
+          labelLine: {
81
+                show: false
82
+          },
83
+          label: {
84
+                show: false,
85
+                position: 'center'
86
+          },
87
+          data: [
88
+            {
89
+              value: 0,
90
+              name: '已完成'
91
+            },
92
+            {
93
+              value: 0,
94
+              name: '剩余'
95
+            },
96
+          ], // 数据
97
+          animationEasing: 'cubicInOut',
98
+          animationDuration: 2600
99
+        }]
100
+      }
101
+    };
102
+  },
103
+  created() {
104
+      this.getTaskData()
105
+  },
106
+  mounted() {
107
+    this.initChart();
108
+    this.__resizeHandler = debounce(() => {
109
+      if (this.chart) {
110
+        this.chart.resize();
111
+      }
112
+    }, 100);
113
+    window.addEventListener("resize", this.__resizeHandler);
114
+  },
115
+  methods: {
116
+      getTaskData(){
117
+          this.loading = true
118
+          return new Promise(resolve=>{
119
+              const params={
120
+                  time:this.nowDate
121
+              }
122
+               getTaskList(params).then(response=>{
123
+                if(response.state=='success'){
124
+                  this.taskcurrent=response.taskcurrent;
125
+                  this.tasktotal=response.tasktotal;
126
+                    const sData = []
127
+                    sData.push({
128
+                        value:response.taskcurrent,
129
+                        name:'已完成'
130
+                    },{
131
+                        value:response.tasktotal-response.taskcurrent,
132
+                        name:'剩余'
133
+                    })
134
+                    this.option.series[0].data = sData
135
+                    this.initChart()
136
+                }
137
+            })
138
+          })
139
+      },
140
+      // 初始化数据
141
+    initChart() {
142
+      this.chart = echarts.init(this.$refs.pieChart, 'macarons')
143
+      this.chart.clear()
144
+      this.chart.setOption(this.option)
145
+    },
146
+  },
147
+};
148
+</script>
149
+<style lang="scss" scoped>
150
+.header {
151
+  margin-left: 10px;
152
+  img {
153
+    // float: left;
154
+    padding-right: 12px;
155
+    padding-top: 3px;
156
+  }
157
+  .taskNum {
158
+    float: left;
159
+    div {
160
+      margin: 8px 0;
161
+      div {
162
+        height: 52px;
163
+        width: 114px;
164
+        background-color: #468cde;
165
+        line-height: 52px;
166
+        text-align: center;
167
+        border-radius: 10px;
168
+        color: #fff;
169
+        font-size: 30px;
170
+      }
171
+    }
172
+  }
173
+  .mouthTask {
174
+    font-size: 17px;
175
+    color: #666666;
176
+  }
177
+  .taskNum :nth-child(2) {
178
+    font-size: 20px;
179
+    color: #fff;
180
+  }
181
+  .taskNum :nth-child(3) {
182
+    font-size: 15px;
183
+    color: #939393;
184
+  }
185
+}
186
+</style>

+ 115 - 0
CallCenterWeb.UI/src/views/dashboard/components/traffic.vue

@@ -0,0 +1,115 @@
1
+<template>
2
+  <el-card class="header" :style="{height:height}">
3
+    <div class="remindHeader topLine">
4
+      <img src="/static/img/zhibiao.png" alt srcset />
5
+      <span>话务指标</span>
6
+      <span>
7
+        <el-select v-model="typeValue" placeholder="请选择" @change="hadleType">
8
+          <el-option
9
+            v-for="item in typeData"
10
+            :key="item.value"
11
+            :label="item.label"
12
+            :value="item.value"
13
+          ></el-option>
14
+        </el-select>
15
+      </span>
16
+    </div>
17
+    <!-- 柱状图 -->
18
+    <div ref="pieChart" class="chart" :style="{height:'400px'}" />
19
+  </el-card>
20
+</template>
21
+<script>
22
+import echarts from "echarts";
23
+export default {
24
+  props: {
25
+    height: {
26
+      type: String,
27
+      default: "470px"
28
+    }
29
+  },
30
+  data() {
31
+    return {
32
+      typeData: [
33
+        {
34
+          value: 0,
35
+          label: "本月"
36
+        },
37
+        {
38
+          value: 1,
39
+          label: "本日"
40
+        }
41
+      ],
42
+      typeValue: 0,
43
+      option :{
44
+    tooltip: {
45
+        trigger: 'axis',
46
+        axisPointer: {            // 坐标轴指示器,坐标轴触发有效
47
+            type: 'shadow'        // 默认为直线,可选为:'line' | 'shadow'
48
+        }
49
+    },
50
+    legend: {
51
+        data: []
52
+    },
53
+    grid: {
54
+        left: '3%',
55
+        right: '4%',
56
+        bottom: '3%',
57
+        containLabel: true
58
+    },
59
+    xAxis: [
60
+        {
61
+            type: 'category',
62
+            data: ['进线暂存量', '新客户进线量', '老客户进线量', '回访量', '短信进线量']
63
+        }
64
+    ],
65
+    yAxis: [
66
+        {
67
+            type: 'value'
68
+        }
69
+    ],
70
+    series: [
71
+        {
72
+            name: '数量',
73
+            type: 'bar',
74
+            barWidth: 30,
75
+            data: [620, 732, 701, 734, 1090]
76
+        },
77
+    ]
78
+}
79
+    };
80
+  },
81
+  mounted() {
82
+      this.initChart()
83
+  },
84
+  methods: {
85
+    //选择
86
+    hadleType(val) {
87
+      this.typeValue = val;
88
+    },
89
+    // 初始化数据
90
+    initChart() {
91
+      this.chart = echarts.init(this.$refs.pieChart, "macarons");
92
+      this.chart.clear();
93
+      this.chart.setOption(this.option);
94
+    },
95
+  }
96
+};
97
+</script>
98
+<style lang="scss" scoped>
99
+.header {
100
+  margin: 20px 0 0 20px;
101
+  span {
102
+    font-size: 16px;
103
+    font-weight: 700;
104
+    .el-select {
105
+      width: 90px;
106
+      height: 33px;
107
+      float: right;
108
+    }
109
+  }
110
+  img {
111
+    vertical-align: middle;
112
+    margin-right: 7px;
113
+  }
114
+}
115
+</style>

+ 149 - 0
CallCenterWeb.UI/src/views/dashboard/components/workCenter.vue

@@ -0,0 +1,149 @@
1
+<template>
2
+  <el-card class="header" :style="{height:height}">
3
+    <div class="remindHeader topLine">
4
+      <img src="/static/img/workCenter.png" alt srcset />
5
+      <span>中心工作排行</span>
6
+      <span>
7
+        <el-select v-model="typeValue" placeholder="请选择" @change="hadleType">
8
+          <el-option
9
+            v-for="item in typeData"
10
+            :key="item.value"
11
+            :label="item.label"
12
+            :value="item.value"
13
+          ></el-option>
14
+        </el-select>
15
+      </span>
16
+    </div>
17
+    <div ref="pieChart" class="chart" :style="{height:height}" />
18
+  </el-card>
19
+</template>
20
+<script>
21
+import echarts from "echarts";
22
+require("echarts/theme/macarons"); // echarts theme
23
+import { debounce } from "@/utils";
24
+import { getRankingData } from "@/api/dashboard/orderDatas";
25
+export default {
26
+  props: {
27
+    height: {
28
+      type: String,
29
+      default: "470px"
30
+    }
31
+  },
32
+  data() {
33
+    return {
34
+      typeData: [
35
+        {
36
+          value: 0,
37
+          label: "本月"
38
+        },
39
+        {
40
+          value: 1,
41
+          label: "本日"
42
+        }
43
+      ],
44
+      typeValue: 0,
45
+      loading: false,
46
+      chart: null,
47
+      search_date: "1",
48
+      option: {
49
+        tooltip: {
50
+          trigger: "item",
51
+          formatter: "{a} <br/>{b} : {c} ({d}%)"
52
+        },
53
+        legend: {
54
+          orient: "vertical",
55
+          left: "left",
56
+          bottom: "0",
57
+          data: [] // 图例数据
58
+        },
59
+        calculable: true,
60
+        series: [
61
+          {
62
+            name: "",
63
+            type: "pie",
64
+            radius: "55%",
65
+            center: ["50%", "45%"],
66
+            data: [
67
+              {
68
+                value: 0,
69
+                name: "无数据"
70
+              }
71
+            ], // 数据
72
+            animationEasing: "cubicInOut",
73
+            animationDuration: 2600
74
+          }
75
+        ]
76
+      }
77
+    };
78
+  },
79
+  created() {
80
+    this.getDatas();
81
+  },
82
+  mounted() {
83
+    this.initChart();
84
+    this.__resizeHandler = debounce(() => {
85
+      if (this.chart) {
86
+        this.chart.resize();
87
+      }
88
+    }, 100);
89
+    window.addEventListener("resize", this.__resizeHandler);
90
+  },
91
+  methods: {
92
+    //获取数据
93
+    getDatas() {
94
+      return new Promise(resolve => {
95
+        const params = {
96
+          type: this.typeValue
97
+        };
98
+        getRankingData(params).then(response => {
99
+          if (response.state.toLowerCase() === "success") {
100
+            const res = response.totask;
101
+            if (res && res.length > 0) {
102
+              const sData = [];
103
+              res.forEach((v, i) => {
104
+                sData.push({
105
+                  value: v.F_RealPrice,
106
+                  name: v.key
107
+                });
108
+              });
109
+              this.option.series[0].data = sData;
110
+
111
+              this.initChart();
112
+            }
113
+          }
114
+        });
115
+        resolve();
116
+      });
117
+    },
118
+    // 初始化数据
119
+    initChart() {
120
+      this.chart = echarts.init(this.$refs.pieChart, "macarons");
121
+      this.chart.clear();
122
+      this.chart.setOption(this.option);
123
+    },
124
+    //选择
125
+    hadleType(val) {
126
+      this.typeValue = val;
127
+      this.getDatas();
128
+    }
129
+  }
130
+};
131
+</script>
132
+<style lang="scss" scoped>
133
+.header {
134
+  margin-top: 20px;
135
+  span {
136
+    font-size: 16px;
137
+    font-weight: 700;
138
+    .el-select {
139
+      width: 90px;
140
+      height: 33px;
141
+      float: right;
142
+    }
143
+  }
144
+  img {
145
+    vertical-align: middle;
146
+    margin-right: 7px;
147
+  }
148
+}
149
+</style>

+ 77 - 48
CallCenterWeb.UI/src/views/dashboard/index.vue

@@ -2,6 +2,31 @@
2 2
   <!-- 首页 -->
3 3
   <div class="dashboard">
4 4
     <el-row :gutter="7.5">
5
+      <el-col :lg="18">
6
+        <el-col :lg="16" class="mb">
7
+          <el-col :lg="24">
8
+            <salesData ref='salesData' :height="height1" :nowDate="nowDate"/>
9
+          </el-col>
10
+        </el-col>
11
+        <el-col :lg="8" class="mb">
12
+          <totalTasks ref="totalTasks" :height="height1" :nowDate="nowDate"/>
13
+        </el-col>
14
+        <el-col :lg="16" class="mb">
15
+          <mediaData ref="mediaData" :height='height3' />
16
+        </el-col>
17
+        <el-col :lg="8" class="mb">
18
+          <personalRanking ref="personalRanking" :height="height3" />
19
+        </el-col>
20
+        <el-col :lg="8" class="mb">
21
+          <workCenter ref="workCenter" :height='height4' />
22
+        </el-col>
23
+        <el-col :lg="16" class="mb">
24
+          <traffic ref="traffic" :height="height4" />
25
+        </el-col>
26
+      </el-col>
27
+      <el-col :lg="6" class="mb" >
28
+        <leftContent ref="leftContent" :height="height2" :nowDate="nowDate"/>
29
+      </el-col>
5 30
       <el-col :lg="18" class="mb">
6 31
         <!-- 数据统计 -->
7 32
         <el-col :lg="24" class="mb">
@@ -54,9 +79,24 @@ import allNotice from './components/allNotice'
54 79
 import ranking from './components/ranking'
55 80
 import appAds from './components/appAds'
56 81
 
82
+import salesData from './components/salesData'
83
+import totalTasks from './components/totalTasks'
84
+import leftContent from './components/leftContent'
85
+import mediaData from './components/mediaData'
86
+import personalRanking from './components/personalRanking'
87
+import workCenter from './components/workCenter'
88
+import traffic from './components/traffic'
89
+
57 90
 export default {
58 91
   name: 'Dashboard',
59 92
   components: {
93
+    salesData,
94
+    totalTasks,
95
+    leftContent,
96
+    personalRanking,
97
+    workCenter,
98
+    traffic,
99
+    mediaData,
60 100
     dataStatistics,
61 101
     pieChart,
62 102
     circularChart,
@@ -68,11 +108,14 @@ export default {
68 108
   },
69 109
   data() {
70 110
     return {
71
-      height1: '170px',
72
-      height2: '300px',
111
+      height1:'150px',
112
+      height2: '1000px',
73 113
       height3: '350px',
114
+      height4: '470px',
74 115
       homeTimer: null, // 定时器
75
-      isStartTimer: false // 定会器是否开启
116
+      isStartTimer: false, // 定会器是否开启
117
+      nowDate: "",    // 当前日期
118
+      nowTime: "",    // 当前时间
76 119
     }
77 120
   },
78 121
   computed: {
@@ -82,69 +125,55 @@ export default {
82 125
     // this.refreshDatas(process.env.homeRefreshInterval) // 刷新 首页数据
83 126
     // this.refreshDatas(Number(this.$store.getters.serverConfig.homeRefreshInterval)) // 刷新 首页数据
84 127
     this.isStartTimer = true
128
+    this.getDate()
85 129
   },
86 130
   beforeDestroy() {
87 131
     clearInterval(this.homeTimer) // 停止刷新数据
88 132
     this.isStartTimer = false
133
+     if (this.getDate) {
134
+          console.log("销毁定时器")
135
+          clearInterval(this.getDate); // 在Vue实例销毁前,清除时间定时器
136
+      }
89 137
   },
90 138
   methods: {
91
-    /**
92
-     * 刷新 数据
93
-     * @mTime 刷新间隔
94
-     * */
95
-    refreshDatas(mTime) {
96
-      const _self = this
97
-      const objTime = {
98
-        init: 0,
99
-        time: function() {
100
-          objTime.init += 1000
101
-          // 当页面没有click、keydown、mousewheel 时;每间隔  mTime 刷新数据;
102
-          if (objTime.init === mTime) {
103
-            // console.count();
104
-            _self.$refs.dataStatic.getDatas()
105
-            _self.$refs.pieChart.getDatas(
106
-              Number(_self.$refs.pieChart.search_date)
107
-            )
108
-            _self.$refs.circularChart.getDatas(
109
-              Number(_self.$refs.circularChart.search_date)
110
-            )
111
-            _self.$refs.lineChart.getDatas(
112
-              Number(_self.$refs.lineChart.search_date)
113
-            )
114
-            _self.$refs.ranking.refreshData(_self.$refs.ranking.activeName)
115
-
116
-            objTime.init = 0
117
-          }
139
+    currentTime() {
140
+            setInterval(this.getDate, 600000);
118 141
         },
119
-        eventFun: function() {
120
-          clearInterval(_self.homeTimer)
121
-          objTime.init = 0
122
-          if (_self.isStartTimer) {
123
-            _self.homeTimer = setInterval(objTime.time, 1000)
124
-          }
142
+        getDate: function() {
143
+            var _this = this;
144
+            let yy = new Date().getFullYear();
145
+            let mm = new Date().getMonth() + 1;
146
+            let dd = new Date().getDate();
147
+            let hh = new Date().getHours();
148
+            let mf =
149
+                new Date().getMinutes() < 10
150
+                    ? "0" + new Date().getMinutes()
151
+                    : new Date().getMinutes();
152
+            let ss =
153
+                new Date().getSeconds() < 10
154
+                    ? "0" + new Date().getSeconds()
155
+                    : new Date().getSeconds();
156
+            mm = mm < 10 ? "0" + mm : mm;
157
+            dd = dd < 10 ? "0" + dd : dd;
158
+            hh = hh < 10 ? "0" + hh : hh;
159
+            _this.nowTime = hh + ":" + mf+':'+ss;
160
+            _this.nowDate = yy + "-" + mm + "-" + dd;
125 161
         }
126
-      }
127
-      this.homeTimer = setInterval(objTime.time, 1000)
128
-      const body = document.querySelector('html')
129
-      body.addEventListener('click', objTime.eventFun)
130
-      body.addEventListener('keydown', objTime.eventFun)
131
-      body.addEventListener('mousewheel', objTime.eventFun)
132
-    
133
-    
134
-    }
135
-  
136
-  }
162
+  },
163
+  mounted() {
164
+     this.currentTime();
165
+  },
137 166
 }
138 167
 </script>
139 168
 
140 169
 <style rel="stylesheet/scss" lang="scss" scoped>
141 170
 .dashboard {
142 171
   padding: 15px 10px;
172
+  background-color: #eaedf1;
143 173
   .mb {
144 174
     margin-bottom: 6px;
145 175
   }
146 176
 }
147
-
148 177
 @media only screen and (min-width: 992px) {
149 178
 }
150 179
 </style>

+ 5 - 3
CallCenterWeb.UI/src/views/memberManagement/memberList/index.vue

@@ -150,14 +150,16 @@ export default {
150 150
 					'&phone=' + this.searchDatas.phoneNumber + //手机号码
151 151
 					// '&stime=' + this.searchDatas.searchDate && this.searchDatas.searchDate[0] +
152 152
 					// '&etime=' + this.searchDatas.searchDate && this.searchDatas.searchDate[1] +
153
-					// '&province=' + this.searchDatas.provinceCity && this.searchDatas.provinceCity[0] +
154
-					// '&city=' + this.searchDatas.provinceCity && this.searchDatas.provinceCity[1] +
153
+					'&province=' + this.searchDatas.provinceCityText && this.searchDatas.provinceCityText[0] +
154
+					'&city=' + this.searchDatas.provinceCityText[1] && this.searchDatas.provinceCityText[1] +
155
+					'&area=' + this.searchDatas.provinceCityText[2] && this.searchDatas.provinceCityText[2] +
156
+					'&town=' + this.searchDatas.provinceCityText[3] && this.searchDatas.provinceCityText[3] +
155 157
 					'&type=' + this.searchDatas.memberType + //会员类型
156 158
 					'&address=' + this.searchDatas.address + //地址
157 159
 					'&recommender=' + this.searchDatas.referrer + //推荐人
158 160
 					'&saleperson=' + this.searchDatas.saleperson + //销售负责人
159 161
 					'&contact=' + this.searchDatas.contactFrequency + //联系频次
160
-					// '&token=' + this.token + //联系频次
162
+					// '&token=' + this.token + 
161 163
 					'&birthday=' + this.searchDatas.birthday
162 164
     },
163 165
     btn_detail(editId) {

+ 1 - 0
CallCenterWeb.UI/src/views/orderManagement/consolidateOrderList/index.vue

@@ -115,6 +115,7 @@ export default {
115 115
           pageindex: this.pageParams.pageindex, // int 第几页
116 116
           pagesize: this.pageParams.pagesize, // int 每页几条信息
117 117
           F_OrderList: this.searchData.id,
118
+          F_Type: this.searchData.type
118 119
         };
119 120
         getConsolidateOrderList(params).then(response => {
120 121
           this.loading = false;

+ 147 - 24
CallCenterWeb.UI/src/views/orderManagement/createOrder/index.vue

@@ -122,25 +122,25 @@
122 122
               <el-col :span='12'>
123 123
                 <el-form-item label="快递" prop="F_Express" >
124 124
                   <el-select v-model="ruleForm.F_Express" placeholder="请选择快递" class="form_select" clearable>
125
-                    <el-option
126
-                      v-for="item in expressList"
127
-                      :key="item.F_Value"
128
-                      :label="item.F_Value"
129
-                      :value="item.F_Value">
130
-                    </el-option>
125
+                    <el-option v-for="item in expressList" :key="item.F_Value" :label="item.F_Value" :value="item.F_Value"></el-option>
131 126
                   </el-select>
132 127
                 </el-form-item>
133 128
               </el-col>
134 129
               <el-col :span='12'>
135 130
                 <el-form-item label="运费" prop="F_ExpressFee" >
136
-                  <el-input v-model="ruleForm.F_ExpressFee" placeholder="请输入运费"/>
131
+                  <el-select v-model="ruleForm.F_ExpressFee" placeholder="请选择运费" class="form_select" clearable>
132
+                    <el-option label="10" value="10"></el-option>
133
+                    <el-option label="28" value="28"></el-option>
134
+                  </el-select>
137 135
                 </el-form-item>
138 136
               </el-col>
139 137
             </el-row>
140 138
             <el-row>
141 139
               <el-col :span='12'>
142 140
                 <el-form-item label="支付方式" prop="F_PayType" >
143
-                  <el-input v-model="ruleForm.F_PayType" placeholder="请输入支付方式"/>
141
+                  <el-select v-model="ruleForm.F_PayType" placeholder="请选择支付方式" class="form_select" clearable>
142
+                    <el-option v-for="item in payTypeList" :key="item.F_Value" :label="item.F_Value" :value="item.F_Value"></el-option>
143
+                  </el-select>
144 144
                 </el-form-item>
145 145
               </el-col>
146 146
               <el-col :span='12'>
@@ -156,14 +156,25 @@
156 156
                 </el-form-item>
157 157
               </el-col>
158 158
               <el-col :span='12'>
159
-                <el-form-item label="关联会员ID" prop="F_VipId" >
160
-                  <el-input v-model="ruleForm.F_VipId" placeholder="请输入关联会员ID"/>
159
+                <el-form-item label="推荐人" prop="F_RecommendName" >
160
+                  <el-select v-model="ruleForm.F_RecommendName" class="form_select" filterable remote reserve-keyword clearable value-key="F_ID" placeholder="请输入电话号码" :remote-method="remoteMethodRecommend" :loading="loading" @change="recommendChangeSelect">
161
+                    <el-option v-for="item in recommendListOptions" :key="item.F_ID" :label="item.F_Name" :value="item"></el-option>
162
+                  </el-select>
163
+                </el-form-item>
164
+              </el-col>
165
+            </el-row>
166
+            <el-row>
167
+              <el-col :span='12'>
168
+                <el-form-item label="归属人" prop="F_BelongName" >
169
+                  <el-select v-model="ruleForm.F_BelongName" class="form_select" filterable remote reserve-keyword clearable value-key="F_UserId" placeholder="请输入归属人" :remote-method="remoteMethodBelong" :loading="loading" @change="belongChangeSelect">
170
+                    <el-option v-for="item in belongListOptions" :key="item.F_UserId" :label="item.F_UserName" :value="item"></el-option>
171
+                  </el-select>
161 172
                 </el-form-item>
162 173
               </el-col>
163 174
             </el-row>
164 175
             <el-row>
165 176
               <el-col :span='8'>
166
-                <el-form-item label="商品分类" prop="className" >
177
+                <el-form-item label="商品分类" prop="className">
167 178
                   <el-cascader
168 179
                     v-model="parentids"
169 180
                     :options="commodityTypeLists"
@@ -204,9 +215,9 @@
204 215
               <el-col :span='24'>
205 216
                 <el-form-item label="商品">
206 217
                   <el-table :data="commodityTableData" stripe style="width: 100%">
207
-                    <el-table-column prop="F_ProductName" label="商品名称" width="180"></el-table-column>
208
-                    <el-table-column prop="F_Count" label="商品数量" width="180"></el-table-column>
209
-                    <el-table-column label="操作">
218
+                    <el-table-column prop="F_ProductName" label="商品名称" align="center" ></el-table-column>
219
+                    <el-table-column prop="F_Count" label="商品数量" align="center" ></el-table-column>
220
+                    <el-table-column label="操作" align="center">
210 221
                       <template slot-scope="scope">
211 222
                         <el-button type="text" @click="btn_deleteCommodity(scope.row)">删除</el-button>
212 223
                       </template>
@@ -222,13 +233,13 @@
222 233
                 <el-form-item label="优惠">
223 234
                   <el-table :data="activityAccountData" stripe style="width: 100%" @selection-change="activityAccountSelectionChange">
224 235
                     <el-table-column type="selection" width="55"></el-table-column>
225
-                    <el-table-column label="活动类型" width="180">
236
+                    <el-table-column label="活动类型" align="center">
226 237
                       <template slot-scope="scope">
227 238
                         {{ scope.row.type | activityAccountTypeFilter }}
228 239
                       </template>
229 240
                     </el-table-column>
230
-                    <el-table-column prop="money" label="优惠金额" width="180"></el-table-column>
231
-                    <el-table-column prop="gift" label="赠品"></el-table-column>
241
+                    <el-table-column prop="money" label="优惠金额" align="center"></el-table-column>
242
+                    <el-table-column prop="gift" label="赠品" align="center"></el-table-column>
232 243
                   </el-table>
233 244
                 </el-form-item>
234 245
               </el-col>
@@ -256,7 +267,8 @@ import { delFiles, filterContent, pickerOptions } from '@/utils'
256 267
 import { getCommodityType } from '@/api/commodityManagement/commodityType'
257 268
 import { getCommodityList } from '@/api/commodityManagement/commodityList'
258 269
 import { getAreaTreeChildNode } from '@/api/systemSetup/roleSetting/areaManagement'
259
-
270
+import { getOrderLists } from '@/api/memberManagement/memberList'
271
+import { getUserAccountLists } from '@/api/systemSetup/roleSetting/userManage'
260 272
 
261 273
 const validateTelRule = (rule, value, callback) => {
262 274
   if (!validateTel(value)) {
@@ -281,12 +293,18 @@ export default {
281 293
   },
282 294
   data() {
283 295
     return {
296
+      parentids: [], 
284 297
       provinceDatas: [], // 省下拉数据
285 298
       cityDatas: [], //市下拉数据
286 299
       areaDatas: [], //区/县下拉数据
287 300
       townDatas: [], //乡镇/下拉数据
288 301
       stockList: [], //出库货仓下拉数据
289 302
       expressList: [], //快递
303
+      payTypeList: [], //支付方式
304
+      recommendList: [], //会员列表数据
305
+      recommendListOptions: [], //会员列表数据
306
+      belongList: [], //归属人列表数据
307
+      belongListOptions: [], //归属人列表数据
290 308
       commodityTypeLists: [], //商品分类下拉数据
291 309
       // 自定义菜单下拉数据的key值
292 310
       typeDropProps: {
@@ -311,8 +329,8 @@ export default {
311 329
         F_ADFrom: '', //是 string 消息来源
312 330
         F_Type: '', //是 sring  订单类型
313 331
         F_Id: '', //是 string 订单号
314
-        OrderDetailList: '', //订单详情list
315
-        UseActList: '', //活动详情list
332
+        OrderDetailList: [], //订单详情list
333
+        UseActList: [], //活动详情list
316 334
         F_State: '', //是 string 订单状态
317 335
         F_TrackingNo: '', //否 string 快递单号
318 336
         F_Addressee: '', //否 string 收件人
@@ -325,12 +343,15 @@ export default {
325 343
         F_Address: '', //否 string 详细地址
326 344
         F_PostalCode: '', //否 string 邮编
327 345
         F_Express: '', //否 string 选择的快递
328
-        F_ExpressFee: '', //否 number 运费
346
+        F_ExpressFee: '10', //否 number 运费
329 347
         F_PayType: '', //否 string  支付方式
330 348
         F_Stock: '', //否 string 出货仓库
331 349
         F_RealPrice: '', //否 number 实收金额
332
-        F_VipId: '', //否 number 关联会员id
333 350
         F_Score: '', //否 number  使用积分
351
+        F_RecommendId: 0, //否 number 推荐人id
352
+        F_RecommendName: '', //否 string 推荐人名称
353
+        F_Belong: 0, //否 number 归属人id
354
+        F_BelongName: '', //否 string 归属人名称
334 355
       },
335 356
       rules: {
336 357
         F_Customer: [{
@@ -364,10 +385,13 @@ export default {
364 385
     }
365 386
   },
366 387
   created() {
388
+    this.getRecommendList()
389
+    this.getBelongList()
367 390
     this.getCommodityTypeSelect()
368 391
     this.getStock()
369 392
     this.getOrderType()
370 393
     this.getExpress()
394
+    this.getPayType()
371 395
     this.getProvince()
372 396
     this.generateId()
373 397
   },
@@ -379,7 +403,6 @@ export default {
379 403
           this.ruleForm.OrderDetailList = this.commodityTableData
380 404
           this.ruleForm.F_ExpressFee = this.ruleForm.F_ExpressFee == '' ? 0 : this.ruleForm.F_ExpressFee
381 405
           this.ruleForm.F_RealPrice = this.ruleForm.F_RealPrice == '' ? 0 : this.ruleForm.F_RealPrice
382
-          this.ruleForm.F_VipId = this.ruleForm.F_VipId == '' ? 0 : this.ruleForm.F_VipId
383 406
           this.ruleForm.F_Score = this.ruleForm.F_Score == '' ? 0 : this.ruleForm.F_Score
384 407
           this.loading = true
385 408
           addOrder(this.ruleForm).then(response => {
@@ -499,7 +522,6 @@ export default {
499 522
         })
500 523
       })
501 524
     },
502
-
503 525
     // 获取快递
504 526
     getExpress() {
505 527
       return new Promise(resolve=>{
@@ -514,6 +536,20 @@ export default {
514 536
         })
515 537
       })
516 538
     },
539
+    // 获取支付方式
540
+    getPayType() {
541
+      return new Promise(resolve=>{
542
+        const params={
543
+          isleaf:true,
544
+          code:'PayType'
545
+        }
546
+        getDictionaryValueList(params).then(response=>{
547
+          if(response.state.toLowerCase() === 'success'){
548
+            this.payTypeList = response.data.Rows
549
+          }
550
+        })
551
+      })
552
+    },
517 553
     generateId() {
518 554
       let timestamp = new Date().getTime()
519 555
       this.ruleForm.F_Id = 'BJ' + this.staffNumber + 'T' + timestamp
@@ -536,6 +572,93 @@ export default {
536 572
         resolve()
537 573
       })
538 574
     },
575
+    //获取推荐人列表
576
+    getRecommendList() {
577
+      this.loading = true
578
+      return new Promise(resolve => {
579
+        const params = {
580
+          pageindex: '', // int 第几页
581
+          pagesize: '', // int 每页几条信息
582
+          name: '', //客户姓名
583
+          phone: '', //手机号码
584
+          type: '', //会员类型
585
+          province: '', //省份
586
+          city: '', //市
587
+          area: '', //县区
588
+          town: '', //乡镇
589
+          address: '', //详细地址
590
+          birthday: '', //会员生日
591
+          recommender: '', //推荐人
592
+          saleperson: '', //销售负责人
593
+          contact: '', //联系频次
594
+        }
595
+        getOrderLists(params).then(response => {
596
+          this.loading = false
597
+          if (response.state.toLowerCase() === 'success') {
598
+            this.recommendList = response.rows.Rows
599
+          }
600
+        })
601
+        resolve()
602
+      })
603
+    },
604
+    //获取推荐人
605
+    remoteMethodRecommend(query) {
606
+      if (query !== '') {
607
+        this.loading = true;
608
+        setTimeout(() => {
609
+          this.loading = false;
610
+          this.recommendListOptions = this.recommendList.filter(item => {
611
+            return (item.F_Phone).toLowerCase()
612
+              .indexOf(query.toLowerCase()) > -1;
613
+          });
614
+        }, 200);
615
+      } else {
616
+        this.recommendListOptions = [];
617
+      }
618
+    },
619
+    recommendChangeSelect(item) {
620
+      this.ruleForm.F_RecommendId = item.F_ID
621
+      this.ruleForm.F_RecommendName = item.F_Name
622
+    },
623
+    //获取归属人列表
624
+    getBelongList() {
625
+      this.loading = true
626
+      return new Promise(resolve => {
627
+        const params = {
628
+          pageindex: '', // 第几页
629
+          pagesize: '', // 每页几条信息
630
+          keyword: '', // 否	string	模糊查询
631
+          roleid: '', // 否	string	角色id
632
+          deptid: '', // array  部门id 
633
+        }
634
+        getUserAccountLists(params).then(response => {
635
+          this.loading = false
636
+          if (response.state.toLowerCase() === 'success') {
637
+            this.belongList = response.data.Rows
638
+          }
639
+        })
640
+        resolve()
641
+      })
642
+    },
643
+    //获取归属人
644
+    remoteMethodBelong(query) {
645
+      if (query !== '') {
646
+        this.loading = true;
647
+        setTimeout(() => {
648
+          this.loading = false;
649
+          this.belongListOptions = this.belongList.filter(item => {
650
+            return (item.F_UserName).toLowerCase()
651
+              .indexOf(query.toLowerCase()) > -1;
652
+          });
653
+        }, 200);
654
+      } else {
655
+        this.belongListOptions = [];
656
+      }
657
+    },
658
+    belongChangeSelect(item) {
659
+      this.ruleForm.F_Belong = item.F_UserId
660
+      this.ruleForm.F_BelongName = item.F_UserName
661
+    },
539 662
     //获取商品
540 663
     getCommodityListSelect() {
541 664
       this.loading = true

+ 53 - 92
CallCenterWeb.UI/src/views/orderManagement/orderList/afterSale.vue

@@ -6,7 +6,10 @@
6 6
       </el-form-item>
7 7
       <el-form-item label="售后类型" prop="F_Type" >
8 8
         <el-select v-model="ruleForm.F_Type" class="form_select" filterable clearable placeholder="请选择合并类型">
9
-          <el-option v-for="item in mergeType" :key="item.F_Value" :label="item.F_Value" :value="item.F_Value"/>
9
+          <el-option label="调换货" value="1"></el-option>
10
+          <el-option label="退货" value="2"></el-option>
11
+          <el-option label="部分退货" value="3"></el-option>
12
+          <el-option label="对发货" value="4"></el-option>
10 13
         </el-select>
11 14
       </el-form-item>
12 15
       <el-form-item label="变动金额" prop="F_Money">
@@ -69,15 +72,10 @@
69 72
       <el-row>
70 73
         <el-col :span='24'>
71 74
           <el-form-item label="退回商品">
72
-            <el-table :data="oldCommodityTableData" stripe style="width: 100%" @selection-change="handleSelectionChange" >
75
+            <el-table :data="oldCommodityTableData" stripe style="width: 100%" @selection-change="handleSelectionChange" ref="oldCommodityTable" >
73 76
               <el-table-column type="selection" width="55"></el-table-column>
74 77
               <el-table-column prop="F_ProductName" label="商品名称" align="center" ></el-table-column>
75 78
               <el-table-column prop="F_Count" label="商品数量" align="center"></el-table-column>
76
-              <el-table-column label="操作" align="center">
77
-                <template slot-scope="scope">
78
-                  <el-button type="text" @click="btn_deleteCommodity(scope.row)">删除</el-button>
79
-                </template>
80
-              </el-table-column>
81 79
             </el-table>
82 80
           </el-form-item>
83 81
         </el-col>
@@ -101,7 +99,7 @@ import { getCommodityList } from '@/api/commodityManagement/commodityList'
101 99
 import { addAfterSaleList, editAfterSaleList, getAfterSaleList, getAfterSaleOrderCommodityList } from "@/api/afterSaleManagement/afterSaleList";
102 100
 
103 101
 export default {
104
-  name: "AddOrEdit",
102
+  name: "AfterSale",
105 103
   props: {
106 104
     rowid: {
107 105
       type: String,
@@ -115,7 +113,6 @@ export default {
115 113
   data() {
116 114
     return {
117 115
       parentids: [],
118
-      mergeType: [],//订单类型
119 116
       commodityTypeLists: [], //商品分类下拉数据
120 117
       // 自定义菜单下拉数据的key值
121 118
       typeDropProps: {
@@ -131,12 +128,12 @@ export default {
131 128
         num: 1, //商品数量
132 129
       },
133 130
       oldCommodityTableData: [], //退回商品列表
131
+      oldDetailListSelection: [], // 退回商品选中数据
134 132
       ruleForm: {
135 133
         F_OrderId: '', //订单编号
136
-        F_OrderList: '', //补发产品列表
134
+        F_DetailList: '', //补发产品列表
137 135
         F_OldDetailList: '', //退回产品列表
138 136
         F_Type: '', //合并类型
139
-        F_Gift: '', //赠送商品
140 137
         F_Money: '', //减免金额
141 138
         F_Remark: '', //销售备注
142 139
         F_state: '', //订单状态
@@ -157,11 +154,6 @@ export default {
157 154
           trigger: 'blur',
158 155
           message: '请输入订单类型',
159 156
         }],
160
-        F_Gift: [{
161
-          required: true,
162
-          trigger: 'blur',
163
-          message: '请输入赠送商品',
164
-        }],
165 157
         F_Money: [{
166 158
           required: true,
167 159
           trigger: 'blur',
@@ -172,29 +164,23 @@ export default {
172 164
     };
173 165
   },
174 166
   created() {
175
-    this.getMergeType()
176 167
     this.getCommodityTypeSelect()
177 168
     Promise.all([
178 169
     ]).then(() => {
179 170
       if (this.rowid) {
180 171
         this.ruleForm.F_OrderId = this.rowid
181
-        this.getDetail(this.rowid)
182 172
         this.getAfterSaleOrderCommodity(this.rowid)
183 173
       }
184 174
     });
185 175
   },
186
-  mounted() {
187
-    this.automaticallyCheck()
188
-  },
189 176
   methods: {
190 177
     submitForm(state) {
191 178
       this.$refs.ruleForm.validate(valid => {
192 179
         if (valid) {
193 180
           this.loading = true;
194 181
           this.ruleForm.F_state = state
195
-          this.ruleForm.F_OrderList = this.commodityTableData //补发产品列表
196 182
           //添加
197
-          if (!this.rowid) {
183
+          // if (!this.rowid) {
198 184
             addAfterSaleList(this.ruleForm).then(response => {
199 185
               this.loading = false
200 186
               if (response.state.toLowerCase() === 'success') {
@@ -206,40 +192,26 @@ export default {
206 192
               this.loading = false
207 193
             })
208 194
             return
209
-          }
195
+          // }
210 196
           // 编辑
211
-          editAfterSaleList(this.ruleForm)
212
-            .then(response => {
213
-              this.loading = false;
214
-              if (response.state.toLowerCase() === "success") {
215
-                this.$parent.$layer.close(this.layerid);
216
-                this.$parent.getList(); // 重新加载父级数据
217
-                this.$message.success("恭喜你,编辑成功!");
218
-              }
219
-            })
220
-            .catch(() => {
221
-              this.loading = false;
222
-            });
197
+          // editAfterSaleList(this.ruleForm)
198
+          //   .then(response => {
199
+          //     this.loading = false;
200
+          //     if (response.state.toLowerCase() === "success") {
201
+          //       this.$parent.$layer.close(this.layerid);
202
+          //       this.$parent.getList(); // 重新加载父级数据
203
+          //       this.$message.success("恭喜你,编辑成功!");
204
+          //     }
205
+          //   })
206
+          //   .catch(() => {
207
+          //     this.loading = false;
208
+          //   });
223 209
         } else {
224 210
           this.$message.error("请输入有效的必填项信息!");
225 211
           return false;
226 212
         }
227 213
       });
228 214
     },
229
-    // 获取合并类型
230
-    getMergeType() {
231
-      return new Promise(resolve=>{
232
-        const params={
233
-          isleaf:true,
234
-          code:'AFTERSALETYPE'
235
-        }
236
-        getDictionaryValueList(params).then(response=>{
237
-          if(response.state.toLowerCase() === 'success'){
238
-            this.mergeType = response.data.Rows
239
-          }
240
-        })
241
-      })
242
-    },
243 215
     //获取商品分类
244 216
     getCommodityTypeSelect() {
245 217
       this.loading = true
@@ -301,67 +273,56 @@ export default {
301 273
         })
302 274
         return
303 275
       }
304
-      for (let i; i < this.commodityTableData.length; i++ ) {
305
-        if (this.commodityTableData[i].F_ProductId = this.commoditySearchData.F_ProductId) {
306
-          this.commodityTableData[i].num = this.commodityTableData[i].num + this.commoditySearchData.num
307
-        } else {
308
-          let data = {
309
-            F_ProductId: this.commoditySearchData.productId,
310
-            F_ProductName: this.commoditySearchData.productName,
311
-            F_Count: this.commoditySearchData.num,
276
+      if (this.commodityTableData.length > 0) {
277
+        for (let i=0; i < this.commodityTableData.length; i++ ) {
278
+          if (this.commodityTableData[i].F_ProductId === this.commoditySearchData.productId) {
279
+            this.commodityTableData[i].F_Count = this.commodityTableData[i].F_Count + this.commoditySearchData.num
280
+            return
312 281
           }
313
-          this.commodityTableData.push(data)
314 282
         }
315 283
       }
284
+      let data = {
285
+        F_ProductId: this.commoditySearchData.productId,
286
+        F_ProductName: this.commoditySearchData.productName,
287
+        F_Count: this.commoditySearchData.num,
288
+      }
289
+      this.commodityTableData.push(data)
290
+      let ids = []
291
+      for (let i=0; i<this.commodityTableData.length; i++) {
292
+        ids.push(this.commodityTableData[i].F_ProductId)
293
+      }
294
+      this.ruleForm.F_DetailList = ids.join(',') //补发产品列表
316 295
     },
317 296
     //删除商品
318 297
     btn_deleteCommodity (val) {
319 298
       let index = this.commodityTableData.indexOf(val)
320 299
       this.commodityTableData.splice(index, 1)
321 300
     },
322
-    // 获取订单详情
323
-    getDetail(orderId) {
324
-      this.loading = true;
325
-      return new Promise(resolve => {
326
-        const params = {
327
-          F_State: '-2', //订单状态
328
-          f_id: orderId,
329
-        };
330
-        getAfterSaleList(params).then(response => {
331
-          this.loading = false;
332
-          if (response.state.toLowerCase() === "success") {
333
-            const res = response.data.Rows[0]
334
-            this.ruleForm.F_OrderList = res.F_OrderList //合并订单
335
-            this.ruleForm.F_Type = res.F_Type //合并类型
336
-            this.ruleForm.F_Gift = res.F_Gift //赠送商品
337
-            this.ruleForm.F_Money = res.F_Money //减免金额
338
-            this.ruleForm.F_Remark = res.F_Remark //销售备注
339
-          }
340
-        });
341
-        resolve();
342
-      });
343
-    },
344 301
     // 售后订单商品列表
345 302
     getAfterSaleOrderCommodity(rid) {
346
-      getAfterSaleOrderCommodityList(rid).then(response => {
303
+      const params = {
304
+        orderid: rid
305
+      }
306
+      getAfterSaleOrderCommodityList(params).then(response => {
347 307
         if (response.state.toLowerCase() === 'success') {
348 308
           const res = response.data
349 309
           this.oldCommodityTableData = res
310
+          this.$nextTick(()=>{
311
+            this.oldCommodityTableData.forEach((row,index)=>{
312
+              this.$refs.oldCommodityTable.toggleRowSelection(row)
313
+            })
314
+          },1)
350 315
         }
351 316
       })
352 317
     },
353
-    // 列表自动勾选
354
-    automaticallyCheck() {
355
-      this.oldCommodityTableData.forEach((row,index)=>{
356
-        this.$nextTick(()=>{  
357
-          this.batchIds.push(row.id)
358
-          this.$refs.multipleTable.toggleRowSelection(this.tableDataEdit[index])
359
-        },1)
360
-      })
361
-    },
362 318
     //选择多个
363 319
     handleSelectionChange(selection) {
364
-      this.ruleForm.F_OldDetailList = selection
320
+      let ids = []
321
+      this.oldDetailListSelection = selection
322
+      for (let i=0; i<this.oldDetailListSelection.length; i++) {
323
+        ids.push(this.oldDetailListSelection[i].F_Id)
324
+      }
325
+      this.ruleForm.F_OldDetailList = ids.join(',')
365 326
     }, 
366 327
   }
367 328
 };

+ 0 - 57
CallCenterWeb.UI/src/views/orderManagement/orderList/cancel.vue

@@ -1,57 +0,0 @@
1
-<template>
2
-    <div>
3
-        <el-form ref="form" :model="form" label-width="80px">
4
-            <el-form-item label="备注">
5
-                <el-input v-model="ruleForm.remark" type="textarea" placeholder="备注"></el-input>
6
-            </el-form-item>
7
-            <el-form-item>
8
-                <el-button type="primary" @click="submitForm()">提交</el-button>
9
-            </el-form-item>
10
-        </el-form>
11
-    </div>
12
-</template>
13
-<script>
14
-
15
-import { checkOrderCustodian } from '@/api/orderManagement/orderList'
16
-export default {
17
-    props: {
18
-        rowid: {
19
-            type: String,
20
-            default: ''
21
-        },
22
-        layerid: {
23
-            type: String,
24
-            default: ""
25
-        }
26
-    },
27
-    data(){
28
-        return{
29
-            ruleForm: {
30
-                orderid: '', //订单编号
31
-                state: 0, //订单状态 —— 0 撤回
32
-                remark: '', //备注
33
-            },
34
-        }
35
-    },
36
-    created() {
37
-        if (this.rowid) {
38
-            this.ruleForm.orderid = this.rowid
39
-        }
40
-    },
41
-    methods: {
42
-        submitForm(){
43
-            checkOrderCustodian(this.ruleForm).then(response => {
44
-                if (response.state.toLowerCase() === 'success') {
45
-                    this.$parent.$layer.close(this.layerid);
46
-                    this.$parent.getList(); // 重新加载父级数据
47
-                    this.$message.success('恭喜你,撤销订单成功!')
48
-                }
49
-            }).catch(() => {
50
-                this.loading = false
51
-            })
52
-        },
53
-    },
54
-}
55
-</script>
56
-<style lang="scss" scoped>
57
-</style>

+ 158 - 24
CallCenterWeb.UI/src/views/orderManagement/orderList/edit.vue

@@ -114,12 +114,17 @@
114 114
         </el-col>
115 115
         <el-col :span='12'>
116 116
           <el-form-item label="运费" prop="F_ExpressFee" >
117
-            <el-input v-model="ruleForm.F_ExpressFee" placeholder="请输入运费"/>
117
+            <el-select v-model="ruleForm.F_ExpressFee" placeholder="请选择运费" class="form_select" clearable>
118
+              <el-option label="10" value="10"></el-option>
119
+              <el-option label="28" value="28"></el-option>
120
+            </el-select>
118 121
           </el-form-item>
119 122
         </el-col>
120 123
         <el-col :span="12">
121 124
           <el-form-item label="支付方式" >
122
-            <el-input v-model="ruleForm.F_PayType" placeholder="请输入支付方式"/>
125
+            <el-select v-model="ruleForm.F_PayType" placeholder="请选择支付方式" class="form_select" clearable>
126
+              <el-option v-for="item in payTypeList" :key="item.F_Value" :label="item.F_Value" :value="item.F_Value"></el-option>
127
+            </el-select>
123 128
           </el-form-item>
124 129
         </el-col>
125 130
         <el-col :span="12">
@@ -133,22 +138,33 @@
133 138
           </el-form-item>
134 139
         </el-col>
135 140
         <el-col :span="12">
136
-          <el-form-item label="关联会员ID" >
137
-            <el-input v-model="ruleForm.F_VipId" placeholder="请输入关联会员ID"/>
141
+          <el-form-item label="推荐人" prop="F_RecommendName" >
142
+            <el-select v-model="ruleForm.F_RecommendName" class="form_select" filterable remote reserve-keyword clearable value-key="F_ID" placeholder="请输入电话号码" :remote-method="remoteMethodRecommend" :loading="loading" @change="recommendChangeSelect">
143
+              <el-option v-for="item in recommendListOptions" :key="item.F_ID" :label="item.F_Name" :value="item"></el-option>
144
+            </el-select>
145
+          </el-form-item>
146
+        </el-col>
147
+        <el-col :span="12">
148
+          <el-form-item label="归属人" prop="F_BelongName" >
149
+            <el-select v-model="ruleForm.F_BelongName" class="form_select" filterable remote reserve-keyword clearable value-key="F_UserId" placeholder="请输入归属人" :remote-method="remoteMethodBelong" :loading="loading" @change="belongChangeSelect">
150
+              <el-option v-for="item in belongListOptions" :key="item.F_UserId" :label="item.F_UserName" :value="item"></el-option>
151
+            </el-select>
138 152
           </el-form-item>
139 153
         </el-col>
140 154
       </el-row>
141 155
       <el-row>
142 156
         <el-col :span='8'>
143
-          <el-form-item label="商品分类" >
144
-            <el-select v-model="commoditySearchData.className" placeholder="请选择商品分类" class="filter-item" clearable value-key="F_ClassId" @change="commodityTypeChange">
145
-              <el-option
146
-                v-for="item in commodityTypeLists"
147
-                :key="item.F_ClassId"
148
-                :label="item.F_ClassName"
149
-                :value="item">
150
-              </el-option>
151
-            </el-select>
157
+          <el-form-item label="商品分类" prop="className">
158
+            <el-cascader
159
+              v-model="parentids"
160
+              :options="commodityTypeLists"
161
+              :props="typeDropProps"
162
+              placeholder="请选择商品分类"
163
+              clearable
164
+              filterable
165
+              change-on-select
166
+              @change="commodityTypeChange"
167
+              style="width: 100%;"/>
152 168
           </el-form-item>
153 169
         </el-col>
154 170
         <el-col :span='8'>
@@ -215,8 +231,8 @@ import { delFiles, filterContent, pickerOptions } from '@/utils'
215 231
 import { getCommodityType } from '@/api/commodityManagement/commodityType'
216 232
 import { getCommodityList } from '@/api/commodityManagement/commodityList'
217 233
 import { getAreaTreeChildNode } from '@/api/systemSetup/roleSetting/areaManagement'
218
-
219
-
234
+import { getOrderLists } from '@/api/memberManagement/memberList'
235
+import { getUserAccountLists } from '@/api/systemSetup/roleSetting/userManage'
220 236
 
221 237
 const validateTelRule = (rule, value, callback) => {
222 238
   if (!validateTel(value)) {
@@ -226,7 +242,6 @@ const validateTelRule = (rule, value, callback) => {
226 242
   }
227 243
 }
228 244
 
229
-
230 245
 export default {
231 246
   name: "AddOrEdit",
232 247
   props: {
@@ -252,13 +267,24 @@ export default {
252 267
   },
253 268
   data() {
254 269
     return {
270
+      parentids:[],
255 271
       provinceDatas: [], // 省下拉数据
256 272
       cityDatas: [], //市下拉数据
257 273
       areaDatas: [], //区/县下拉数据
258 274
       townDatas: [], //乡镇/下拉数据
259 275
       stockList: [], //出库货仓下拉数据
260 276
       expressList: [], //快递
277
+      payTypeList: [], //支付方式
278
+      recommendList: [], //会员列表数据
279
+      recommendListOptions: [], //会员列表数据
280
+      belongList: [], //归属人列表数据
281
+      belongListOptions: [], //归属人列表数据
261 282
       commodityTypeLists: [], //商品分类下拉数据
283
+      // 自定义菜单下拉数据的key值
284
+      typeDropProps: {
285
+        value: 'id',
286
+        label: 'text'
287
+      },
262 288
       commodityListLists: [], //商品下拉数据
263 289
       commoditySearchData: { //商品搜索数据
264 290
         classId: '', // 商品分类id
@@ -292,12 +318,15 @@ export default {
292 318
         F_Address: '', //否 string 详细地址
293 319
         F_PostalCode: '', //否 string 邮编
294 320
         F_Express: '', //否 string 选择的快递
295
-        F_ExpressFee: '', //否 number 运费
321
+        F_ExpressFee: '10', //否 number 运费
296 322
         F_PayType: '', //否 string  支付方式
297 323
         F_Stock: '', //否 string 出货仓库
298 324
         F_RealPrice: '', //否 number 实收金额
299
-        F_VipId: '', //否 number 关联会员id
300 325
         F_Score: '', //否 number  使用积分
326
+        F_RecommendId: '',// 否 number 推荐人id
327
+        F_RecommendName: '', //否 string 推荐人名称
328
+        F_Belong: 0, //否 number 归属人id
329
+        F_BelongName: '', //否 string 归属人名称
301 330
       },
302 331
       rules: {
303 332
         F_Customer: [{
@@ -330,10 +359,13 @@ export default {
330 359
     };
331 360
   },
332 361
   created() {
362
+    this.getRecommendList()
363
+    this.getBelongList()
333 364
     this.getCommodityTypeSelect()
334 365
     this.getStock()
335 366
     this.getOrderType()
336 367
     this.getExpress()
368
+    this.getPayType()
337 369
     this.getProvince()
338 370
     Promise.all([
339 371
     ]).then(() => {
@@ -351,7 +383,6 @@ export default {
351 383
           this.ruleForm.OrderDetailList = JSON.stringify(this.ruleForm.OrderDetailList) == JSON.stringify(this.commodityTableData) ? [] : this.commodityTableData
352 384
           this.ruleForm.F_ExpressFee = this.ruleForm.F_ExpressFee == '' ? 0 : this.ruleForm.F_ExpressFee
353 385
           this.ruleForm.F_RealPrice = this.ruleForm.F_RealPrice == '' ? 0 : this.ruleForm.F_RealPrice
354
-          this.ruleForm.F_VipId = this.ruleForm.F_VipId == '' ? 0 : this.ruleForm.F_VipId
355 386
           this.ruleForm.F_Score = this.ruleForm.F_Score == '' ? 0 : this.ruleForm.F_Score
356 387
           // 编辑
357 388
           editOrder(this.ruleForm)
@@ -477,6 +508,20 @@ export default {
477 508
         })
478 509
       })
479 510
     },
511
+    // 获取支付方式
512
+    getPayType() {
513
+      return new Promise(resolve=>{
514
+        const params={
515
+          isleaf:true,
516
+          code:'PayType'
517
+        }
518
+        getDictionaryValueList(params).then(response=>{
519
+          if(response.state.toLowerCase() === 'success'){
520
+            this.payTypeList = response.data.Rows
521
+          }
522
+        })
523
+      })
524
+    },
480 525
     //获取商品分类
481 526
     getCommodityTypeSelect() {
482 527
       this.loading = true
@@ -489,12 +534,99 @@ export default {
489 534
         getCommodityType(data).then(response => {
490 535
           this.loading = false
491 536
           if (response.state.toLowerCase() === 'success') {
492
-            this.commodityTypeLists = response.data.Rows
537
+            this.commodityTypeLists = response.data
493 538
           }
494 539
         })
495 540
         resolve()
496 541
       })
497 542
     },
543
+    //获取推荐人列表
544
+    getRecommendList() {
545
+      this.loading = true
546
+      return new Promise(resolve => {
547
+        const params = {
548
+          pageindex: '', // int 第几页
549
+          pagesize: '', // int 每页几条信息
550
+          name: '', //客户姓名
551
+          phone: '', //手机号码
552
+          type: '', //会员类型
553
+          province: '', //省份
554
+          city: '', //市
555
+          area: '', //县区
556
+          town: '', //乡镇
557
+          address: '', //详细地址
558
+          birthday: '', //会员生日
559
+          recommender: '', //推荐人
560
+          saleperson: '', //销售负责人
561
+          contact: '', //联系频次
562
+        }
563
+        getOrderLists(params).then(response => {
564
+          this.loading = false
565
+          if (response.state.toLowerCase() === 'success') {
566
+            this.recommendList = response.rows.Rows
567
+          }
568
+        })
569
+        resolve()
570
+      })
571
+    },
572
+    //获取推荐人
573
+    remoteMethodRecommend(query) {
574
+      if (query !== '') {
575
+        this.loading = true;
576
+        setTimeout(() => {
577
+          this.loading = false;
578
+          this.recommendListOptions = this.recommendList.filter(item => {
579
+            return (item.F_Phone).toLowerCase()
580
+              .indexOf(query.toLowerCase()) > -1;
581
+          });
582
+        }, 200);
583
+      } else {
584
+        this.recommendListOptions = [];
585
+      }
586
+    },
587
+    recommendChangeSelect(item) {
588
+      this.ruleForm.F_RecommendId = item.F_ID
589
+      this.ruleForm.F_RecommendName = item.F_Name
590
+    },
591
+    //获取归属人列表
592
+    getBelongList() {
593
+      this.loading = true
594
+      return new Promise(resolve => {
595
+        const params = {
596
+          pageindex: '', // 第几页
597
+          pagesize: '', // 每页几条信息
598
+          keyword: '', // 否	string	模糊查询
599
+          roleid: '', // 否	string	角色id
600
+          deptid: '', // array  部门id 
601
+        }
602
+        getUserAccountLists(params).then(response => {
603
+          this.loading = false
604
+          if (response.state.toLowerCase() === 'success') {
605
+            this.belongList = response.data.Rows
606
+          }
607
+        })
608
+        resolve()
609
+      })
610
+    },
611
+    //获取归属人
612
+    remoteMethodBelong(query) {
613
+      if (query !== '') {
614
+        this.loading = true;
615
+        setTimeout(() => {
616
+          this.loading = false;
617
+          this.belongListOptions = this.belongList.filter(item => {
618
+            return (item.F_UserName).toLowerCase()
619
+              .indexOf(query.toLowerCase()) > -1;
620
+          });
621
+        }, 200);
622
+      } else {
623
+        this.belongListOptions = [];
624
+      }
625
+    },
626
+    belongChangeSelect(item) {
627
+      this.ruleForm.F_Belong = item.F_UserId
628
+      this.ruleForm.F_BelongName = item.F_UserName
629
+    },
498 630
     //获取商品
499 631
     getCommodityListSelect() {
500 632
       this.loading = true
@@ -504,7 +636,7 @@ export default {
504 636
           pagesize: 300, // int 每页几条信息,
505 637
           ProductId: '',
506 638
           ClassId: this.commoditySearchData.classId === '' ? 0 : this.commoditySearchData.classId,
507
-          ClassName: this.commoditySearchData.className,
639
+          ClassName: '',
508 640
           ProductName: '',
509 641
           PinyinShort: '',
510 642
           ProductNumber: '',
@@ -522,8 +654,7 @@ export default {
522 654
       })
523 655
     },
524 656
     commodityTypeChange(item) {
525
-      this.commoditySearchData.classId = item.F_ClassId
526
-      this.commoditySearchData.className = item.F_ClassName
657
+      this.commoditySearchData.classId = this.parentids[this.parentids.length - 1]
527 658
       this.getCommodityListSelect()
528 659
     },
529 660
     commodityListChange(item) {
@@ -603,8 +734,11 @@ export default {
603 734
           this.ruleForm.F_PayType = res.F_PayType //支付方式
604 735
           this.ruleForm.F_Stock = res.F_Stock //出货仓库
605 736
           this.ruleForm.F_RealPrice = res.F_RealPrice == 0 ? '' : res.F_RealPrice //实收金额
606
-          this.ruleForm.F_VipId = res.F_VipId == 0 ? '' : res.F_VipId //关联会员id
607 737
           this.ruleForm.F_Score = res.F_Score ==0 ? '' : res.F_Score //使用积分
738
+          this.ruleForm.F_RecommendId = res.F_RecommendId//推荐人id
739
+          this.ruleForm.F_RecommendName = res.F_RecommendName//推荐人名称
740
+          this.ruleForm.F_Belong = res.F_Belong //归属人id
741
+          this.ruleForm.F_BelongName = res.F_BelongName //归属人名称
608 742
         }
609 743
       });
610 744
     },

+ 13 - 2
CallCenterWeb.UI/src/views/orderManagement/orderList/index.vue

@@ -45,7 +45,11 @@
45 45
       <el-table-column prop="F_Id" label="订单编号" align="center" min-width="150" />
46 46
       <el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
47 47
       <el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
48
-      <el-table-column prop="typename" label="订购商品" align="center" min-width />
48
+      <el-table-column label="订购商品" align="center" min-width>
49
+      <template slot-scope="scope">
50
+        {{ scope.row.OrderDetailList | judgmentOrderGoods}}
51
+      </template>
52
+      </el-table-column>
49 53
       <el-table-column prop="F_AddTime" label="下单日期" align="center" />
50 54
       <el-table-column label="订单状态" align="center" >
51 55
         <template slot-scope="scope">
@@ -82,7 +86,6 @@ import { getDictionaryValueList } from '@/api/commonAPI'
82 86
 import { getOrderLists, cancelOrder } from "@/api/orderManagement/orderList";
83 87
 import { pickerOptions, formatterContent } from "@/utils";
84 88
 import edit from "./edit";
85
-import cancel from './cancel';
86 89
 import detail from './detail';
87 90
 import merge from './merge';
88 91
 import apply from './apply';
@@ -109,6 +112,14 @@ export default {
109 112
       }
110 113
       return statusMap[status]
111 114
     },
115
+    judgmentOrderGoods(status) {
116
+      let orderGoodsNameQuantity = ''
117
+      for (let i = 0; i < status.length; i++) {
118
+        orderGoodsNameQuantity = `${orderGoodsNameQuantity}${status[i].F_ProductName}*${status[i].F_Count},`
119
+      }
120
+      orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
121
+      return orderGoodsNameQuantity
122
+    },
112 123
   },
113 124
   data() {
114 125
     return {

+ 0 - 62
CallCenterWeb.UI/src/views/orderManagement/orderListCustodian/ship.vue

@@ -1,62 +0,0 @@
1
-<template>
2
-    <div>
3
-        <el-form ref="form" :model="form" label-width="80px">
4
-            <!-- <el-form-item label="订单编号">
5
-                <el-col :span='12'>
6
-                    <span>{{ ruleForm.orderid }}</span>
7
-                </el-col>
8
-            </el-form-item> -->
9
-            <el-form-item label="备注">
10
-                <el-input v-model="ruleForm.remark" type="textarea" placeholder="备注"></el-input>
11
-            </el-form-item>
12
-            <el-form-item>
13
-                <el-button type="primary" @click="submitForm()">提交</el-button>
14
-            </el-form-item>
15
-        </el-form>
16
-    </div>
17
-</template>
18
-<script>
19
-
20
-import { checkOrderCustodian } from '@/api/orderManagement/orderList'
21
-export default {
22
-    props: {
23
-        rowid: {
24
-            type: String,
25
-            default: ''
26
-        },
27
-        layerid: {
28
-            type: String,
29
-            default: ""
30
-        }
31
-    },
32
-    data(){
33
-        return{
34
-            ruleForm: {
35
-                orderid: '', //订单编号
36
-                state: 6, //订单状态 —— 6 发货
37
-                remark: '', //备注
38
-            },
39
-        }
40
-    },
41
-    created() {
42
-        if (this.rowid) {
43
-            this.ruleForm.orderid = this.rowid
44
-        }
45
-    },
46
-    methods: {
47
-        submitForm(){
48
-            checkOrderCustodian(this.ruleForm).then(response => {
49
-                if (response.state.toLowerCase() === 'success') {
50
-                    this.$parent.$layer.close(this.layerid);
51
-                    this.$parent.getList(); // 重新加载父级数据
52
-                    this.$message.success('恭喜你,工单信息审核成功!')
53
-                }
54
-            }).catch(() => {
55
-                this.loading = false
56
-            })
57
-        },
58
-    },
59
-}
60
-</script>
61
-<style lang="scss" scoped>
62
-</style>

+ 0 - 62
CallCenterWeb.UI/src/views/orderManagement/orderListCustodian/sorting.vue

@@ -1,62 +0,0 @@
1
-<template>
2
-    <div>
3
-        <el-form ref="form" :model="form" label-width="80px">
4
-            <!-- <el-form-item label="订单编号">
5
-                <el-col :span='12'>
6
-                    <span>{{ ruleForm.orderid }}</span>
7
-                </el-col>
8
-            </el-form-item> -->
9
-            <el-form-item label="备注">
10
-                <el-input v-model="ruleForm.remark" type="textarea" placeholder="备注"></el-input>
11
-            </el-form-item>
12
-            <el-form-item>
13
-                <el-button type="primary" @click="submitForm()">提交</el-button>
14
-            </el-form-item>
15
-        </el-form>
16
-    </div>
17
-</template>
18
-<script>
19
-
20
-import { checkOrderCustodian } from '@/api/orderManagement/orderList'
21
-export default {
22
-    props: {
23
-        rowid: {
24
-            type: String,
25
-            default: ''
26
-        },
27
-        layerid: {
28
-            type: String,
29
-            default: ""
30
-        }
31
-    },
32
-    data(){
33
-        return{
34
-            ruleForm: {
35
-                orderid: '', //订单编号
36
-                state: 5, //订单状态 —— 5 分拣
37
-                remark: '', //备注
38
-            },
39
-        }
40
-    },
41
-    created() {
42
-        if (this.rowid) {
43
-            this.ruleForm.orderid = this.rowid
44
-        }
45
-    },
46
-    methods: {
47
-        submitForm(){
48
-            checkOrderCustodian(this.ruleForm).then(response => {
49
-                if (response.state.toLowerCase() === 'success') {
50
-                    this.$parent.$layer.close(this.layerid);
51
-                    this.$parent.getList(); // 重新加载父级数据
52
-                    this.$message.success('恭喜你,工单信息审核成功!')
53
-                }
54
-            }).catch(() => {
55
-                this.loading = false
56
-            })
57
-        },
58
-    },
59
-}
60
-</script>
61
-<style lang="scss" scoped>
62
-</style>

BIN
CallCenterWeb.UI/static/img/daiban.png


BIN
CallCenterWeb.UI/static/img/media.png


BIN
CallCenterWeb.UI/static/img/plan.png


BIN
CallCenterWeb.UI/static/img/ranking.png


BIN
CallCenterWeb.UI/static/img/remind.png


BIN
CallCenterWeb.UI/static/img/sales.png


BIN
CallCenterWeb.UI/static/img/taskLogo.png


BIN
CallCenterWeb.UI/static/img/workCenter.png


BIN
CallCenterWeb.UI/static/img/zhibiao.png