Sfoglia il codice sorgente

订单列表已提交查询 客服 退回

yangjunfeng 5 anni fa
parent
commit
ee7c3e7998
28 ha cambiato i file con 2772 aggiunte e 1720 eliminazioni
  1. 30 21
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceJingdong/goback.vue
  2. 59 0
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceJingdong/gobacklast.vue
  3. 151 130
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceJingdong/index.vue
  4. 30 21
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceRhyme/goback.vue
  5. 59 0
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceRhyme/gobacklast.vue
  6. 152 131
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceRhyme/index.vue
  7. 30 21
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceSF/goback.vue
  8. 59 0
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceSF/gobacklast.vue
  9. 152 130
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceSF/index.vue
  10. 30 21
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceSTO/goback.vue
  11. 59 0
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceSTO/gobacklast.vue
  12. 152 130
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceSTO/index.vue
  13. 30 21
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceShanXiSF/goback.vue
  14. 59 0
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceShanXiSF/gobacklast.vue
  15. 152 130
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceShanXiSF/index.vue
  16. 30 21
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceXinXiangSF/goback.vue
  17. 59 0
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceXinXiangSF/gobacklast.vue
  18. 155 132
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceXinXiangSF/index.vue
  19. 30 21
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceYuantong/goback.vue
  20. 59 0
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceYuantong/gobacklast.vue
  21. 152 130
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceYuantong/index.vue
  22. 30 21
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceZhongtong/goback.vue
  23. 59 0
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceZhongtong/gobacklast.vue
  24. 152 130
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceZhongtong/index.vue
  25. 21 20
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListLogistics/goback.vue
  26. 59 0
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListLogistics/gobacklast.vue
  27. 201 146
      CallCenterWeb.UI/src/views/customerServiceManagement/orderListLogistics/index.vue
  28. 561 343
      CallCenterWeb.UI/src/views/orderManagement/orderList/index.vue

+ 30 - 21
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceJingdong/goback.vue

@@ -8,13 +8,14 @@
8 8
           filterable
9 9
           clearable
10 10
           placeholder="请选择退回"
11
+          @change="selectback"
11 12
         >
12 13
           <el-option label="退回上一级" value="0" />
13 14
           <el-option label="退回销售" value="1" />
14 15
         </el-select>
15 16
       </el-form-item>
16
-      <el-form-item label="退回原因">
17
-        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"></el-input>
17
+      <el-form-item v-show="ishow" label="退回原因">
18
+        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"/>
18 19
       </el-form-item>
19 20
       <el-form-item>
20 21
         <el-button type="primary" @click="submitForm()">提交</el-button>
@@ -23,24 +24,25 @@
23 24
   </div>
24 25
 </template>
25 26
 <script>
26
-import { gobackOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService";
27
+import { gobackOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
27 28
 export default {
28 29
   props: {
29 30
     rowid: {
30 31
       type: String,
31
-      default: "",
32
+      default: ''
32 33
     },
33 34
     layerid: {
34 35
       type: String,
35
-      default: "",
36
-    },
36
+      default: ''
37
+    }
37 38
   },
38 39
   data() {
39 40
     return {
41
+      ishow: true, // 原因显隐
40 42
       ruleForm: {
41
-        orderids: "", //订单编号
42
-        remark: "", //备注
43
-        state: ""
43
+        orderids: '', // 订单编号
44
+        remark: '', // 备注
45
+        state: ''
44 46
       },
45 47
       rules: {
46 48
         state: [
@@ -49,13 +51,13 @@ export default {
49 51
             trigger: 'change',
50 52
             message: '请选择退回'
51 53
           }
52
-        ],
54
+        ]
53 55
       }
54
-    };
56
+    }
55 57
   },
56 58
   created() {
57 59
     if (this.rowid) {
58
-      this.ruleForm.orderids = this.rowid;
60
+      this.ruleForm.orderids = this.rowid
59 61
     }
60 62
   },
61 63
   methods: {
@@ -64,23 +66,30 @@ export default {
64 66
         if (valid) {
65 67
           gobackOrderCustomerService(this.ruleForm)
66 68
             .then((response) => {
67
-              if (response.state.toLowerCase() === "success") {
68
-                this.$parent.$layer.close(this.layerid);
69
-                this.$parent.getList(); // 重新加载父级数据
70
-                this.$message.success("恭喜你,订单信息退回成功!");
69
+              if (response.state.toLowerCase() === 'success') {
70
+                this.$parent.$layer.close(this.layerid)
71
+                this.$parent.getList() // 重新加载父级数据
72
+                this.$message.success('恭喜你,订单信息退回成功!')
71 73
               }
72 74
             })
73 75
             .catch(() => {
74
-              this.loading = false;
75
-            });
76
+              this.loading = false
77
+            })
76 78
         }
77 79
       })
78 80
     },
79
-  },
80
-};
81
+    selectback(e) {
82
+      if (e === '0') {
83
+        this.ishow = false
84
+      } else {
85
+        this.ishow = true
86
+      }
87
+    }
88
+  }
89
+}
81 90
 </script>
82 91
 <style lang="scss" scoped>
83 92
 .form_select {
84 93
   width: 100%
85 94
 }
86
-</style>
95
+</style>

+ 59 - 0
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceJingdong/gobacklast.vue

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

+ 151 - 130
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceJingdong/index.vue

@@ -24,17 +24,18 @@
24 24
       <el-input v-model="searchData.trackingNo" placeholder="请输入运单号" class="filter-item" />
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_bulk_submit'" type="primary" class="filter-item" @click="btn_bulk_submit">批量提交</el-button>
27
-      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回</el-button>
27
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回销售</el-button>
28
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_gobacklast">批量退回上一级</el-button>
28 29
       <el-button v-permission="'HY_import_submit'" type="primary" class="filter-item" @click="btn_import_submit">导入附件提交</el-button>
29 30
     </div>
30 31
     <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick" >
31
-      <el-tab-pane label="全部" name="3"></el-tab-pane>
32
+      <el-tab-pane label="全部" name="3"/>
32 33
     </el-tabs>
33 34
     <div>
34 35
       <span>订单数量:{{ pageParams.total }}</span>
35 36
     </div>
36
-    <el-table v-loading="loading" :data="dataLists" border stripe  @selection-change="handleSelectionChange" row-key="F_Id">
37
-      <el-table-column type="selection" :reserve-selection="true"></el-table-column>
37
+    <el-table v-loading="loading" :data="dataLists" border stripe row-key="F_Id" @selection-change="handleSelectionChange">
38
+      <el-table-column :reserve-selection="true" type="selection"/>
38 39
       <el-table-column type="index" label="编号" align="center" fixed width="80" />
39 40
       <el-table-column prop="F_Id" label="订单编号" align="center" min-width="180" >
40 41
         <template slot-scope="scope">
@@ -44,9 +45,9 @@
44 45
       <el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
45 46
       <el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
46 47
       <el-table-column label="订购商品" align="center" min-width>
47
-      <template slot-scope="scope">
48
-        {{ scope.row.OrderDetailList | judgmentOrderGoods}}
49
-      </template>
48
+        <template slot-scope="scope">
49
+          {{ scope.row.OrderDetailList | judgmentOrderGoods }}
50
+        </template>
50 51
       </el-table-column>
51 52
       <el-table-column prop="F_AddTime" label="下单日期" align="center" />
52 53
       <el-table-column label="订单状态" align="center" >
@@ -89,31 +90,31 @@
89 90
 
90 91
 <script>
91 92
 import { getDictionaryValueList } from '@/api/commonAPI'
92
-import { getOrderListCustomerService, submitOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService"
93
-import { pickerOptions, formatterContent } from "@/utils"
94
-import goback from "./goback"
95
-import importSubmit from "./importSubmit"
96
-import detail from "@/views/orderManagement/orderList/detail"
97
-import Pagination from "@/components/Pagination" // 对el-pagination 二次封装
98
-
93
+import { getOrderListCustomerService, submitOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
94
+import { pickerOptions, formatterContent } from '@/utils'
95
+import goback from './goback'
96
+import importSubmit from './importSubmit'
97
+import detail from '@/views/orderManagement/orderList/detail'
98
+import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
99
+import gobacklast from './gobacklast'
99 100
 export default {
100
-  name: "OrderListCustomerService",
101
+  name: 'OrderListCustomerService',
101 102
   components: {
102 103
     Pagination
103 104
   },
104 105
   filters: {
105 106
     judgmentStateName(status) {
106 107
       const statusMap = {
107
-        '0': "未提交",
108
-        '1': "待分仓",
109
-        '2': "已退回",
110
-        '3': "已分仓",
111
-        '4': "无货",
112
-        '5': "仓库待审核",
113
-        '6': "已发货",
114
-        '7': "付款待审核",
115
-        '8': "待分物流",
116
-        '9': "物流未通过",
108
+        '0': '未提交',
109
+        '1': '待分仓',
110
+        '2': '已退回',
111
+        '3': '已分仓',
112
+        '4': '无货',
113
+        '5': '仓库待审核',
114
+        '6': '已发货',
115
+        '7': '付款待审核',
116
+        '8': '待分物流',
117
+        '9': '物流未通过'
117 118
       }
118 119
       return statusMap[status]
119 120
     },
@@ -124,21 +125,21 @@ export default {
124 125
       }
125 126
       orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
126 127
       return orderGoodsNameQuantity
127
-    },
128
+    }
128 129
   },
129 130
   data() {
130 131
     return {
131 132
       loading: false,
132 133
       searchData: {
133
-        adFrom: '', //消息/广告媒体来源
134
-        type: '', //订单类型
135
-        id: '', //订单号
136
-        customer: '', //客户姓名
137
-        customerPhone: '', //客户手机号
138
-        trackingNo: '', //运单号
139
-        searchTime: '', //订单时间
134
+        adFrom: '', // 消息/广告媒体来源
135
+        type: '', // 订单类型
136
+        id: '', // 订单号
137
+        customer: '', // 客户姓名
138
+        customerPhone: '', // 客户手机号
139
+        trackingNo: '', // 运单号
140
+        searchTime: '' // 订单时间
140 141
       },
141
-      activeName: "3", //标签切换首页
142
+      activeName: '3', // 标签切换首页
142 143
       pickerOptions, // 日期数据
143 144
       pageParams: {
144 145
         pageindex: 1, // 当前第几页
@@ -147,57 +148,57 @@ export default {
147 148
       },
148 149
       dataLists: [], // 列表数据
149 150
       multipleSelection: [], // 选中的数据
150
-      orderType: [],//订单类型
151
-      selectOrderId: [], // 选中id
152
-    };
151
+      orderType: [], // 订单类型
152
+      selectOrderId: [] // 选中id
153
+    }
153 154
   },
154 155
   created() {
155 156
     this.getOrderType()
156 157
     this.getList()
157 158
     document.onkeyup = e => {
158 159
       if (e.keyCode === 13) {
159
-        this.getList();
160
+        this.getList()
160 161
       }
161
-    };
162
+    }
162 163
   },
163 164
   methods: {
164 165
     getList() {
165
-      this.loading = true;
166
+      this.loading = true
166 167
       return new Promise(resolve => {
167 168
         const params = {
168
-          F_State: this.activeName, //订单状态 -2全部
169
+          F_State: this.activeName, // 订单状态 -2全部
169 170
           pageindex: 1, // int 第几页
170 171
           pagesize: 1000000, // int 每页几条信息
171
-          F_ADFrom: this.searchData.adFrom, //消息/广告来源
172
-          F_Type: this.searchData.type, //订单类型
173
-          F_Id: this.searchData.id, //订单号
174
-          F_Customer: this.searchData.customer, //客户姓名
175
-          F_CustomerPhone: this.searchData.customerPhone, //客户手机号
176
-          F_TrackingNo: this.searchData.trackingNo, //运单号
177
-          SearchStartTime: this.searchData.searchTime[0], //添加开始时间
178
-          SearchEndTime: this.searchData.searchTime[1], //添加结束时间
179
-          F_IsExpress: 1, //-2全部 0客服未分配快递 1已分配
180
-          F_Express: "京东快递",
181
-        };
172
+          F_ADFrom: this.searchData.adFrom, // 消息/广告来源
173
+          F_Type: this.searchData.type, // 订单类型
174
+          F_Id: this.searchData.id, // 订单号
175
+          F_Customer: this.searchData.customer, // 客户姓名
176
+          F_CustomerPhone: this.searchData.customerPhone, // 客户手机号
177
+          F_TrackingNo: this.searchData.trackingNo, // 运单号
178
+          SearchStartTime: this.searchData.searchTime[0], // 添加开始时间
179
+          SearchEndTime: this.searchData.searchTime[1], // 添加结束时间
180
+          F_IsExpress: 1, // -2全部 0客服未分配快递 1已分配
181
+          F_Express: '京东快递'
182
+        }
182 183
         getOrderListCustomerService(params).then(response => {
183
-          this.loading = false;
184
-          if (response.state.toLowerCase() === "success") {
185
-            this.pageParams.total = response.data.Totals;
186
-            this.dataLists = response.data.Rows;
184
+          this.loading = false
185
+          if (response.state.toLowerCase() === 'success') {
186
+            this.pageParams.total = response.data.Totals
187
+            this.dataLists = response.data.Rows
187 188
           }
188
-        });
189
-        resolve();
190
-      });
189
+        })
190
+        resolve()
191
+      })
191 192
     },
192 193
     // 获取订单类型
193 194
     getOrderType() {
194
-      return new Promise(resolve=>{
195
-        const params={
196
-          isleaf:true,
197
-          code:'ORDERTYPE'
195
+      return new Promise(resolve => {
196
+        const params = {
197
+          isleaf: true,
198
+          code: 'ORDERTYPE'
198 199
         }
199
-        getDictionaryValueList(params).then(response=>{
200
-          if(response.state.toLowerCase() === 'success'){
200
+        getDictionaryValueList(params).then(response => {
201
+          if (response.state.toLowerCase() === 'success') {
201 202
             this.orderType = response.data.Rows
202 203
           }
203 204
         })
@@ -207,121 +208,141 @@ export default {
207 208
       this.getList()
208 209
     },
209 210
     btn_search() {
210
-      this.pageParams.pageindex = 1;
211
-      this.getList();
211
+      this.pageParams.pageindex = 1
212
+      this.getList()
212 213
     },
213 214
     // 提交
214 215
     btn_submit(orderId) {
215
-      this.isDisable = true;
216
+      this.isDisable = true
216 217
       setTimeout(() => {
217
-        this.$confirm("您确定提交吗?", "提示", {
218
-          confirmButtonText: "确定",
219
-          cancelButtonText: "取消",
220
-          type: "warning",
218
+        this.$confirm('您确定提交吗?', '提示', {
219
+          confirmButtonText: '确定',
220
+          cancelButtonText: '取消',
221
+          type: 'warning'
221 222
         })
222 223
           .then(() => {
223
-            this.isDisable = false;
224
+            this.isDisable = false
224 225
             const data = {
225
-              orderids: orderId,
226
-            };
226
+              orderids: orderId
227
+            }
227 228
             submitOrderCustomerService(data).then((response) => {
228
-              if (response.state.toLowerCase() === "success") {
229
-                this.getList();
230
-                this.$message.success("提交成功!");
229
+              if (response.state.toLowerCase() === 'success') {
230
+                this.getList()
231
+                this.$message.success('提交成功!')
231 232
               }
232
-            });
233
+            })
233 234
           })
234 235
           .catch(() => {
235 236
             this.$message({
236
-              type: "info",
237
-              message: "已取消提交",
238
-            });
239
-          });
240
-        this.isDisable = false;
241
-      }, 300);
237
+              type: 'info',
238
+              message: '已取消提交'
239
+            })
240
+          })
241
+        this.isDisable = false
242
+      }, 300)
242 243
     },
243 244
     // 批量退回
244
-    btn_bulk_goback () {
245
+    btn_bulk_goback() {
245 246
       if (this.selectOrderId.length < 1) {
246 247
         this.$message({
247
-          message: "请选择订单!",
248
-          type: "warning",
249
-        });
250
-        return;
248
+          message: '请选择订单!',
249
+          type: 'warning'
250
+        })
251
+        return
251 252
       }
252
-      let orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
253
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
253 254
       this.$layer.iframe({
254 255
         content: {
255 256
           content: goback, // 传递的组件对象
256 257
           parent: this, // 当前的vue对象
257 258
           data: { rowid: orderids } // props
258 259
         },
259
-        area: ["30%", "30%"],
260
-        title: "退回订单"
261
-      });
260
+        area: ['30%', '30%'],
261
+        title: '退回订单'
262
+      })
263
+    },
264
+    // 批量退回上一级
265
+    btn_bulk_gobacklast() {
266
+      if (this.selectOrderId.length < 1) {
267
+        this.$message({
268
+          message: '请选择订单!',
269
+          type: 'warning'
270
+        })
271
+        return
272
+      }
273
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
274
+      this.$layer.iframe({
275
+        content: {
276
+          content: gobacklast, // 传递的组件对象
277
+          parent: this, // 当前的vue对象
278
+          data: { rowid: orderids } // props
279
+        },
280
+        area: ['30%', '30%'],
281
+        title: '退回订单'
282
+      })
262 283
     },
263 284
     // 批量提交
264 285
     btn_bulk_submit() {
265 286
       if (this.selectOrderId.length < 1) {
266 287
         this.$message({
267
-          message: "请选择订单!",
268
-          type: "warning",
269
-        });
270
-        return;
288
+          message: '请选择订单!',
289
+          type: 'warning'
290
+        })
291
+        return
271 292
       }
272
-      this.isDisable = true;
293
+      this.isDisable = true
273 294
       setTimeout(() => {
274
-        this.$confirm("您确定提交吗?", "提示", {
275
-          confirmButtonText: "确定",
276
-          cancelButtonText: "取消",
277
-          type: "warning",
295
+        this.$confirm('您确定提交吗?', '提示', {
296
+          confirmButtonText: '确定',
297
+          cancelButtonText: '取消',
298
+          type: 'warning'
278 299
         })
279 300
           .then(() => {
280
-            this.isDisable = false;
301
+            this.isDisable = false
281 302
             const data = {
282
-              orderids: this.selectOrderId.join(',').replace(/\s+/g, ''),
283
-            };
303
+              orderids: this.selectOrderId.join(',').replace(/\s+/g, '')
304
+            }
284 305
             submitOrderCustomerService(data).then((response) => {
285
-              if (response.state.toLowerCase() === "success") {
286
-                this.getList();
287
-                this.$message.success("提交成功!");
306
+              if (response.state.toLowerCase() === 'success') {
307
+                this.getList()
308
+                this.$message.success('提交成功!')
288 309
               }
289
-            });
310
+            })
290 311
           })
291 312
           .catch(() => {
292 313
             this.$message({
293
-              type: "info",
294
-              message: "已取消提交",
295
-            });
296
-          });
297
-        this.isDisable = false;
298
-      }, 300);
314
+              type: 'info',
315
+              message: '已取消提交'
316
+            })
317
+          })
318
+        this.isDisable = false
319
+      }, 300)
299 320
     },
300 321
     // 退回订单
301
-    btn_goback (orderid) {
322
+    btn_goback(orderid) {
302 323
       this.$layer.iframe({
303 324
         content: {
304 325
           content: goback, // 传递的组件对象
305 326
           parent: this, // 当前的vue对象
306 327
           data: { rowid: orderid } // props
307 328
         },
308
-        area: ["30%", "30%"],
309
-        title: "退回订单"
310
-      });
329
+        area: ['30%', '30%'],
330
+        title: '退回订单'
331
+      })
311 332
     },
312
-    //导入附件提交
313
-    btn_import_submit () {
333
+    // 导入附件提交
334
+    btn_import_submit() {
314 335
       this.$layer.iframe({
315 336
         content: {
316 337
           content: importSubmit, // 传递的组件对象
317 338
           parent: this, // 当前的vue对象
318 339
           data: { rowid: '' } // props
319 340
         },
320
-        area: ["30%", "30%"],
321
-        title: "导入附件提交"
322
-      });
341
+        area: ['30%', '30%'],
342
+        title: '导入附件提交'
343
+      })
323 344
     },
324
-    hadndleOrderCode(ordercode){
345
+    hadndleOrderCode(ordercode) {
325 346
       this.$layer.iframe({
326 347
         content: {
327 348
           content: detail, // 传递的组件对象
@@ -332,17 +353,17 @@ export default {
332 353
         title: '订单详情'
333 354
       })
334 355
     },
335
-    //选择多个
356
+    // 选择多个
336 357
     handleSelectionChange(val) {
337 358
       const ids = []
338 359
       this.multipleSelection = val
339
-      for (let i=0; i<this.multipleSelection.length; i++) {
360
+      for (let i = 0; i < this.multipleSelection.length; i++) {
340 361
         ids.push(this.multipleSelection[i].F_Id)
341 362
       }
342 363
       this.selectOrderId = ids
343
-    }, 
364
+    }
344 365
   }
345
-};
366
+}
346 367
 </script>
347 368
 
348 369
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 30 - 21
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceRhyme/goback.vue

@@ -8,13 +8,14 @@
8 8
           filterable
9 9
           clearable
10 10
           placeholder="请选择退回"
11
+          @change="selectback"
11 12
         >
12 13
           <el-option label="退回上一级" value="0" />
13 14
           <el-option label="退回销售" value="1" />
14 15
         </el-select>
15 16
       </el-form-item>
16
-      <el-form-item label="退回原因">
17
-        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"></el-input>
17
+      <el-form-item v-show="ishow" label="退回原因">
18
+        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"/>
18 19
       </el-form-item>
19 20
       <el-form-item>
20 21
         <el-button type="primary" @click="submitForm()">提交</el-button>
@@ -23,24 +24,25 @@
23 24
   </div>
24 25
 </template>
25 26
 <script>
26
-import { gobackOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService";
27
+import { gobackOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
27 28
 export default {
28 29
   props: {
29 30
     rowid: {
30 31
       type: String,
31
-      default: "",
32
+      default: ''
32 33
     },
33 34
     layerid: {
34 35
       type: String,
35
-      default: "",
36
-    },
36
+      default: ''
37
+    }
37 38
   },
38 39
   data() {
39 40
     return {
41
+      ishow: true, // 原因显隐
40 42
       ruleForm: {
41
-        orderids: "", //订单编号
42
-        remark: "", //备注
43
-        state: ""
43
+        orderids: '', // 订单编号
44
+        remark: '', // 备注
45
+        state: ''
44 46
       },
45 47
       rules: {
46 48
         state: [
@@ -49,13 +51,13 @@ export default {
49 51
             trigger: 'change',
50 52
             message: '请选择退回'
51 53
           }
52
-        ],
54
+        ]
53 55
       }
54
-    };
56
+    }
55 57
   },
56 58
   created() {
57 59
     if (this.rowid) {
58
-      this.ruleForm.orderids = this.rowid;
60
+      this.ruleForm.orderids = this.rowid
59 61
     }
60 62
   },
61 63
   methods: {
@@ -64,23 +66,30 @@ export default {
64 66
         if (valid) {
65 67
           gobackOrderCustomerService(this.ruleForm)
66 68
             .then((response) => {
67
-              if (response.state.toLowerCase() === "success") {
68
-                this.$parent.$layer.close(this.layerid);
69
-                this.$parent.getList(); // 重新加载父级数据
70
-                this.$message.success("恭喜你,订单信息退回成功!");
69
+              if (response.state.toLowerCase() === 'success') {
70
+                this.$parent.$layer.close(this.layerid)
71
+                this.$parent.getList() // 重新加载父级数据
72
+                this.$message.success('恭喜你,订单信息退回成功!')
71 73
               }
72 74
             })
73 75
             .catch(() => {
74
-              this.loading = false;
75
-            });
76
+              this.loading = false
77
+            })
76 78
         }
77 79
       })
78 80
     },
79
-  },
80
-};
81
+    selectback(e) {
82
+      if (e === '0') {
83
+        this.ishow = false
84
+      } else {
85
+        this.ishow = true
86
+      }
87
+    }
88
+  }
89
+}
81 90
 </script>
82 91
 <style lang="scss" scoped>
83 92
 .form_select {
84 93
   width: 100%
85 94
 }
86
-</style>
95
+</style>

+ 59 - 0
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceRhyme/gobacklast.vue

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

+ 152 - 131
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceRhyme/index.vue

@@ -23,18 +23,18 @@
23 23
       <el-input v-model="searchData.customerPhone" placeholder="请输入客户手机号" class="filter-item" />
24 24
       <el-input v-model="searchData.trackingNo" placeholder="请输入运单号" class="filter-item" />
25 25
       <el-button type="primary" class="filter-item" icon="el-icon-search" @click="btn_search">搜索</el-button>
26
-      <el-button v-permission="'HY_bulk_submit'" type="primary" class="filter-item" @click="btn_bulk_submit">批量提交</el-button>
27
-      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回</el-button>
26
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回销售</el-button>
27
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_gobacklast">批量退回上一级</el-button>
28 28
       <el-button v-permission="'HY_import_submit'" type="primary" class="filter-item" @click="btn_import_submit">导入附件提交</el-button>
29 29
     </div>
30 30
     <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick" >
31
-      <el-tab-pane label="全部" name="3"></el-tab-pane>
31
+      <el-tab-pane label="全部" name="3"/>
32 32
     </el-tabs>
33 33
     <div>
34 34
       <span>订单数量:{{ pageParams.total }}</span>
35 35
     </div>
36
-    <el-table v-loading="loading" :data="dataLists" border stripe  @selection-change="handleSelectionChange" row-key="F_Id">
37
-      <el-table-column type="selection" :reserve-selection="true"></el-table-column>
36
+    <el-table v-loading="loading" :data="dataLists" border stripe row-key="F_Id" @selection-change="handleSelectionChange">
37
+      <el-table-column :reserve-selection="true" type="selection"/>
38 38
       <el-table-column type="index" label="编号" align="center" fixed width="80" />
39 39
       <el-table-column prop="F_Id" label="订单编号" align="center" min-width="180" >
40 40
         <template slot-scope="scope">
@@ -44,9 +44,9 @@
44 44
       <el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
45 45
       <el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
46 46
       <el-table-column label="订购商品" align="center" min-width>
47
-      <template slot-scope="scope">
48
-        {{ scope.row.OrderDetailList | judgmentOrderGoods}}
49
-      </template>
47
+        <template slot-scope="scope">
48
+          {{ scope.row.OrderDetailList | judgmentOrderGoods }}
49
+        </template>
50 50
       </el-table-column>
51 51
       <el-table-column prop="F_AddTime" label="下单日期" align="center" />
52 52
       <el-table-column label="订单状态" align="center" >
@@ -89,31 +89,32 @@
89 89
 
90 90
 <script>
91 91
 import { getDictionaryValueList } from '@/api/commonAPI'
92
-import { getOrderListCustomerService, submitOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService"
93
-import { pickerOptions, formatterContent } from "@/utils"
94
-import goback from "./goback"
95
-import importSubmit from "./importSubmit"
96
-import detail from "@/views/orderManagement/orderList/detail"
97
-import Pagination from "@/components/Pagination" // 对el-pagination 二次封装
92
+import { getOrderListCustomerService, submitOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
93
+import { pickerOptions, formatterContent } from '@/utils'
94
+import goback from './goback'
95
+import gobacklast from './gobacklast'
96
+import importSubmit from './importSubmit'
97
+import detail from '@/views/orderManagement/orderList/detail'
98
+import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
98 99
 
99 100
 export default {
100
-  name: "OrderListCustomerService",
101
+  name: 'OrderListCustomerService',
101 102
   components: {
102 103
     Pagination
103 104
   },
104 105
   filters: {
105 106
     judgmentStateName(status) {
106 107
       const statusMap = {
107
-        '0': "未提交",
108
-        '1': "待分仓",
109
-        '2': "已退回",
110
-        '3': "已分仓",
111
-        '4': "无货",
112
-        '5': "仓库待审核",
113
-        '6': "已发货",
114
-        '7': "付款待审核",
115
-        '8': "待分物流",
116
-        '9': "物流未通过",
108
+        '0': '未提交',
109
+        '1': '待分仓',
110
+        '2': '已退回',
111
+        '3': '已分仓',
112
+        '4': '无货',
113
+        '5': '仓库待审核',
114
+        '6': '已发货',
115
+        '7': '付款待审核',
116
+        '8': '待分物流',
117
+        '9': '物流未通过'
117 118
       }
118 119
       return statusMap[status]
119 120
     },
@@ -124,21 +125,21 @@ export default {
124 125
       }
125 126
       orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
126 127
       return orderGoodsNameQuantity
127
-    },
128
+    }
128 129
   },
129 130
   data() {
130 131
     return {
131 132
       loading: false,
132 133
       searchData: {
133
-        adFrom: '', //消息/广告媒体来源
134
-        type: '', //订单类型
135
-        id: '', //订单号
136
-        customer: '', //客户姓名
137
-        customerPhone: '', //客户手机号
138
-        trackingNo: '', //运单号
139
-        searchTime: '', //订单时间
134
+        adFrom: '', // 消息/广告媒体来源
135
+        type: '', // 订单类型
136
+        id: '', // 订单号
137
+        customer: '', // 客户姓名
138
+        customerPhone: '', // 客户手机号
139
+        trackingNo: '', // 运单号
140
+        searchTime: '' // 订单时间
140 141
       },
141
-      activeName: "3", //标签切换首页
142
+      activeName: '3', // 标签切换首页
142 143
       pickerOptions, // 日期数据
143 144
       pageParams: {
144 145
         pageindex: 1, // 当前第几页
@@ -147,58 +148,58 @@ export default {
147 148
       },
148 149
       dataLists: [], // 列表数据
149 150
       multipleSelection: [], // 选中的数据
150
-      orderType: [],//订单类型
151
-      selectOrderId: [], // 选中id
152
-    };
151
+      orderType: [], // 订单类型
152
+      selectOrderId: [] // 选中id
153
+    }
153 154
   },
154 155
   created() {
155 156
     this.getOrderType()
156 157
     this.getList()
157 158
     document.onkeyup = e => {
158 159
       if (e.keyCode === 13) {
159
-        this.getList();
160
+        this.getList()
160 161
       }
161
-    };
162
+    }
162 163
   },
163 164
   methods: {
164 165
     getList() {
165
-      this.loading = true;
166
+      this.loading = true
166 167
       return new Promise(resolve => {
167 168
         const params = {
168
-          F_State: this.activeName, //订单状态 -2全部
169
+          F_State: this.activeName, // 订单状态 -2全部
169 170
           pageindex: 1, // int 第几页
170 171
           pagesize: 1000000, // int 每页几条信息
171
-          F_ADFrom: this.searchData.adFrom, //消息/广告来源
172
-          F_Type: this.searchData.type, //订单类型
173
-          F_Id: this.searchData.id, //订单号
174
-          F_Customer: this.searchData.customer, //客户姓名
175
-          F_CustomerPhone: this.searchData.customerPhone, //客户手机号
176
-          F_TrackingNo: this.searchData.trackingNo, //运单号
177
-          SearchStartTime: this.searchData.searchTime[0], //添加开始时间
178
-          SearchEndTime: this.searchData.searchTime[1], //添加结束时间
179
-          F_IsExpress: 1, //-2全部 0客服未分配快递 1已分配
180
-          F_PayState: -2, //支付状态-2 全部0待回款 1已完成 2待退款 3已完成
181
-          F_Express: "韵达快递",
182
-        };
172
+          F_ADFrom: this.searchData.adFrom, // 消息/广告来源
173
+          F_Type: this.searchData.type, // 订单类型
174
+          F_Id: this.searchData.id, // 订单号
175
+          F_Customer: this.searchData.customer, // 客户姓名
176
+          F_CustomerPhone: this.searchData.customerPhone, // 客户手机号
177
+          F_TrackingNo: this.searchData.trackingNo, // 运单号
178
+          SearchStartTime: this.searchData.searchTime[0], // 添加开始时间
179
+          SearchEndTime: this.searchData.searchTime[1], // 添加结束时间
180
+          F_IsExpress: 1, // -2全部 0客服未分配快递 1已分配
181
+          F_PayState: -2, // 支付状态-2 全部0待回款 1已完成 2待退款 3已完成
182
+          F_Express: '韵达快递'
183
+        }
183 184
         getOrderListCustomerService(params).then(response => {
184
-          this.loading = false;
185
-          if (response.state.toLowerCase() === "success") {
186
-            this.pageParams.total = response.data.Totals;
187
-            this.dataLists = response.data.Rows;
185
+          this.loading = false
186
+          if (response.state.toLowerCase() === 'success') {
187
+            this.pageParams.total = response.data.Totals
188
+            this.dataLists = response.data.Rows
188 189
           }
189
-        });
190
-        resolve();
191
-      });
190
+        })
191
+        resolve()
192
+      })
192 193
     },
193 194
     // 获取订单类型
194 195
     getOrderType() {
195
-      return new Promise(resolve=>{
196
-        const params={
197
-          isleaf:true,
198
-          code:'ORDERTYPE'
196
+      return new Promise(resolve => {
197
+        const params = {
198
+          isleaf: true,
199
+          code: 'ORDERTYPE'
199 200
         }
200
-        getDictionaryValueList(params).then(response=>{
201
-          if(response.state.toLowerCase() === 'success'){
201
+        getDictionaryValueList(params).then(response => {
202
+          if (response.state.toLowerCase() === 'success') {
202 203
             this.orderType = response.data.Rows
203 204
           }
204 205
         })
@@ -208,121 +209,141 @@ export default {
208 209
       this.getList()
209 210
     },
210 211
     btn_search() {
211
-      this.pageParams.pageindex = 1;
212
-      this.getList();
212
+      this.pageParams.pageindex = 1
213
+      this.getList()
213 214
     },
214 215
     // 提交
215 216
     btn_submit(orderId) {
216
-      this.isDisable = true;
217
+      this.isDisable = true
217 218
       setTimeout(() => {
218
-        this.$confirm("您确定提交吗?", "提示", {
219
-          confirmButtonText: "确定",
220
-          cancelButtonText: "取消",
221
-          type: "warning",
219
+        this.$confirm('您确定提交吗?', '提示', {
220
+          confirmButtonText: '确定',
221
+          cancelButtonText: '取消',
222
+          type: 'warning'
222 223
         })
223 224
           .then(() => {
224
-            this.isDisable = false;
225
+            this.isDisable = false
225 226
             const data = {
226
-              orderids: orderId,
227
-            };
227
+              orderids: orderId
228
+            }
228 229
             submitOrderCustomerService(data).then((response) => {
229
-              if (response.state.toLowerCase() === "success") {
230
-                this.getList();
231
-                this.$message.success("提交成功!");
230
+              if (response.state.toLowerCase() === 'success') {
231
+                this.getList()
232
+                this.$message.success('提交成功!')
232 233
               }
233
-            });
234
+            })
234 235
           })
235 236
           .catch(() => {
236 237
             this.$message({
237
-              type: "info",
238
-              message: "已取消提交",
239
-            });
240
-          });
241
-        this.isDisable = false;
242
-      }, 300);
238
+              type: 'info',
239
+              message: '已取消提交'
240
+            })
241
+          })
242
+        this.isDisable = false
243
+      }, 300)
243 244
     },
244 245
     // 批量退回
245
-    btn_bulk_goback () {
246
+    btn_bulk_goback() {
246 247
       if (this.selectOrderId.length < 1) {
247 248
         this.$message({
248
-          message: "请选择订单!",
249
-          type: "warning",
250
-        });
251
-        return;
249
+          message: '请选择订单!',
250
+          type: 'warning'
251
+        })
252
+        return
252 253
       }
253
-      let orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
254
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
254 255
       this.$layer.iframe({
255 256
         content: {
256 257
           content: goback, // 传递的组件对象
257 258
           parent: this, // 当前的vue对象
258 259
           data: { rowid: orderids } // props
259 260
         },
260
-        area: ["30%", "30%"],
261
-        title: "退回订单"
262
-      });
261
+        area: ['30%', '30%'],
262
+        title: '退回订单'
263
+      })
264
+    },
265
+    // 批量退回上一级
266
+    btn_bulk_gobacklast() {
267
+      if (this.selectOrderId.length < 1) {
268
+        this.$message({
269
+          message: '请选择订单!',
270
+          type: 'warning'
271
+        })
272
+        return
273
+      }
274
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
275
+      this.$layer.iframe({
276
+        content: {
277
+          content: gobacklast, // 传递的组件对象
278
+          parent: this, // 当前的vue对象
279
+          data: { rowid: orderids } // props
280
+        },
281
+        area: ['30%', '30%'],
282
+        title: '退回订单'
283
+      })
263 284
     },
264 285
     // 批量提交
265 286
     btn_bulk_submit() {
266 287
       if (this.selectOrderId.length < 1) {
267 288
         this.$message({
268
-          message: "请选择订单!",
269
-          type: "warning",
270
-        });
271
-        return;
289
+          message: '请选择订单!',
290
+          type: 'warning'
291
+        })
292
+        return
272 293
       }
273
-      this.isDisable = true;
294
+      this.isDisable = true
274 295
       setTimeout(() => {
275
-        this.$confirm("您确定提交吗?", "提示", {
276
-          confirmButtonText: "确定",
277
-          cancelButtonText: "取消",
278
-          type: "warning",
296
+        this.$confirm('您确定提交吗?', '提示', {
297
+          confirmButtonText: '确定',
298
+          cancelButtonText: '取消',
299
+          type: 'warning'
279 300
         })
280 301
           .then(() => {
281
-            this.isDisable = false;
302
+            this.isDisable = false
282 303
             const data = {
283
-              orderids: this.selectOrderId.join(',').replace(/\s+/g, ''),
284
-            };
304
+              orderids: this.selectOrderId.join(',').replace(/\s+/g, '')
305
+            }
285 306
             submitOrderCustomerService(data).then((response) => {
286
-              if (response.state.toLowerCase() === "success") {
287
-                this.getList();
288
-                this.$message.success("提交成功!");
307
+              if (response.state.toLowerCase() === 'success') {
308
+                this.getList()
309
+                this.$message.success('提交成功!')
289 310
               }
290
-            });
311
+            })
291 312
           })
292 313
           .catch(() => {
293 314
             this.$message({
294
-              type: "info",
295
-              message: "已取消提交",
296
-            });
297
-          });
298
-        this.isDisable = false;
299
-      }, 300);
315
+              type: 'info',
316
+              message: '已取消提交'
317
+            })
318
+          })
319
+        this.isDisable = false
320
+      }, 300)
300 321
     },
301 322
     // 退回订单
302
-    btn_goback (orderid) {
323
+    btn_goback(orderid) {
303 324
       this.$layer.iframe({
304 325
         content: {
305 326
           content: goback, // 传递的组件对象
306 327
           parent: this, // 当前的vue对象
307 328
           data: { rowid: orderid } // props
308 329
         },
309
-        area: ["30%", "30%"],
310
-        title: "退回订单"
311
-      });
330
+        area: ['30%', '30%'],
331
+        title: '退回订单'
332
+      })
312 333
     },
313
-    //导入附件提交
314
-    btn_import_submit () {
334
+    // 导入附件提交
335
+    btn_import_submit() {
315 336
       this.$layer.iframe({
316 337
         content: {
317 338
           content: importSubmit, // 传递的组件对象
318 339
           parent: this, // 当前的vue对象
319 340
           data: { rowid: '' } // props
320 341
         },
321
-        area: ["30%", "30%"],
322
-        title: "导入附件提交"
323
-      });
342
+        area: ['30%', '30%'],
343
+        title: '导入附件提交'
344
+      })
324 345
     },
325
-    hadndleOrderCode(ordercode){
346
+    hadndleOrderCode(ordercode) {
326 347
       this.$layer.iframe({
327 348
         content: {
328 349
           content: detail, // 传递的组件对象
@@ -333,17 +354,17 @@ export default {
333 354
         title: '订单详情'
334 355
       })
335 356
     },
336
-    //选择多个
357
+    // 选择多个
337 358
     handleSelectionChange(val) {
338 359
       const ids = []
339 360
       this.multipleSelection = val
340
-      for (let i=0; i<this.multipleSelection.length; i++) {
361
+      for (let i = 0; i < this.multipleSelection.length; i++) {
341 362
         ids.push(this.multipleSelection[i].F_Id)
342 363
       }
343 364
       this.selectOrderId = ids
344
-    }, 
365
+    }
345 366
   }
346
-};
367
+}
347 368
 </script>
348 369
 
349 370
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 30 - 21
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceSF/goback.vue

@@ -8,13 +8,14 @@
8 8
           filterable
9 9
           clearable
10 10
           placeholder="请选择退回"
11
+          @change="selectback"
11 12
         >
12 13
           <el-option label="退回上一级" value="0" />
13 14
           <el-option label="退回销售" value="1" />
14 15
         </el-select>
15 16
       </el-form-item>
16
-      <el-form-item label="退回原因">
17
-        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"></el-input>
17
+      <el-form-item v-show="ishow" label="退回原因">
18
+        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"/>
18 19
       </el-form-item>
19 20
       <el-form-item>
20 21
         <el-button type="primary" @click="submitForm()">提交</el-button>
@@ -23,24 +24,25 @@
23 24
   </div>
24 25
 </template>
25 26
 <script>
26
-import { gobackOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService";
27
+import { gobackOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
27 28
 export default {
28 29
   props: {
29 30
     rowid: {
30 31
       type: String,
31
-      default: "",
32
+      default: ''
32 33
     },
33 34
     layerid: {
34 35
       type: String,
35
-      default: "",
36
-    },
36
+      default: ''
37
+    }
37 38
   },
38 39
   data() {
39 40
     return {
41
+      ishow: true, // 原因显隐
40 42
       ruleForm: {
41
-        orderids: "", //订单编号
42
-        remark: "", //备注
43
-        state: ""
43
+        orderids: '', // 订单编号
44
+        remark: '', // 备注
45
+        state: ''
44 46
       },
45 47
       rules: {
46 48
         state: [
@@ -49,13 +51,13 @@ export default {
49 51
             trigger: 'change',
50 52
             message: '请选择退回'
51 53
           }
52
-        ],
54
+        ]
53 55
       }
54
-    };
56
+    }
55 57
   },
56 58
   created() {
57 59
     if (this.rowid) {
58
-      this.ruleForm.orderids = this.rowid;
60
+      this.ruleForm.orderids = this.rowid
59 61
     }
60 62
   },
61 63
   methods: {
@@ -64,23 +66,30 @@ export default {
64 66
         if (valid) {
65 67
           gobackOrderCustomerService(this.ruleForm)
66 68
             .then((response) => {
67
-              if (response.state.toLowerCase() === "success") {
68
-                this.$parent.$layer.close(this.layerid);
69
-                this.$parent.getList(); // 重新加载父级数据
70
-                this.$message.success("恭喜你,订单信息退回成功!");
69
+              if (response.state.toLowerCase() === 'success') {
70
+                this.$parent.$layer.close(this.layerid)
71
+                this.$parent.getList() // 重新加载父级数据
72
+                this.$message.success('恭喜你,订单信息退回成功!')
71 73
               }
72 74
             })
73 75
             .catch(() => {
74
-              this.loading = false;
75
-            });
76
+              this.loading = false
77
+            })
76 78
         }
77 79
       })
78 80
     },
79
-  },
80
-};
81
+    selectback(e) {
82
+      if (e === '0') {
83
+        this.ishow = false
84
+      } else {
85
+        this.ishow = true
86
+      }
87
+    }
88
+  }
89
+}
81 90
 </script>
82 91
 <style lang="scss" scoped>
83 92
 .form_select {
84 93
   width: 100%
85 94
 }
86
-</style>
95
+</style>

+ 59 - 0
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceSF/gobacklast.vue

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

+ 152 - 130
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceSF/index.vue

@@ -24,17 +24,18 @@
24 24
       <el-input v-model="searchData.trackingNo" placeholder="请输入运单号" class="filter-item" />
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_bulk_submit'" type="primary" class="filter-item" @click="btn_bulk_submit">批量提交</el-button>
27
-      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回</el-button>
27
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回销售</el-button>
28
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_gobacklast">批量退回上一级</el-button>
28 29
       <el-button v-permission="'HY_import_submit'" type="primary" class="filter-item" @click="btn_import_submit">导入附件提交</el-button>
29 30
     </div>
30 31
     <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick" >
31
-      <el-tab-pane label="全部" name="3"></el-tab-pane>
32
+      <el-tab-pane label="全部" name="3"/>
32 33
     </el-tabs>
33 34
     <div>
34 35
       <span>订单数量:{{ pageParams.total }}</span>
35 36
     </div>
36
-    <el-table v-loading="loading" :data="dataLists" border stripe  @selection-change="handleSelectionChange" row-key="F_Id">
37
-      <el-table-column type="selection" :reserve-selection="true"></el-table-column>
37
+    <el-table v-loading="loading" :data="dataLists" border stripe row-key="F_Id" @selection-change="handleSelectionChange">
38
+      <el-table-column :reserve-selection="true" type="selection"/>
38 39
       <el-table-column type="index" label="编号" align="center" fixed width="80" />
39 40
       <el-table-column prop="F_Id" label="订单编号" align="center" min-width="180" >
40 41
         <template slot-scope="scope">
@@ -44,9 +45,9 @@
44 45
       <el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
45 46
       <el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
46 47
       <el-table-column label="订购商品" align="center" min-width>
47
-      <template slot-scope="scope">
48
-        {{ scope.row.OrderDetailList | judgmentOrderGoods}}
49
-      </template>
48
+        <template slot-scope="scope">
49
+          {{ scope.row.OrderDetailList | judgmentOrderGoods }}
50
+        </template>
50 51
       </el-table-column>
51 52
       <el-table-column prop="F_AddTime" label="下单日期" align="center" />
52 53
       <el-table-column label="订单状态" align="center" >
@@ -89,31 +90,32 @@
89 90
 
90 91
 <script>
91 92
 import { getDictionaryValueList } from '@/api/commonAPI'
92
-import { getOrderListCustomerService, submitOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService"
93
-import { pickerOptions, formatterContent } from "@/utils"
94
-import goback from "./goback"
95
-import importSubmit from "./importSubmit"
96
-import detail from "@/views/orderManagement/orderList/detail"
97
-import Pagination from "@/components/Pagination" // 对el-pagination 二次封装
93
+import { getOrderListCustomerService, submitOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
94
+import { pickerOptions, formatterContent } from '@/utils'
95
+import goback from './goback'
96
+import gobacklast from './gobacklast'
97
+import importSubmit from './importSubmit'
98
+import detail from '@/views/orderManagement/orderList/detail'
99
+import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
98 100
 
99 101
 export default {
100
-  name: "OrderListCustomerService",
102
+  name: 'OrderListCustomerService',
101 103
   components: {
102 104
     Pagination
103 105
   },
104 106
   filters: {
105 107
     judgmentStateName(status) {
106 108
       const statusMap = {
107
-        '0': "未提交",
108
-        '1': "待分仓",
109
-        '2': "已退回",
110
-        '3': "已分仓",
111
-        '4': "无货",
112
-        '5': "仓库待审核",
113
-        '6': "已发货",
114
-        '7': "付款待审核",
115
-        '8': "待分物流",
116
-        '9': "物流未通过",
109
+        '0': '未提交',
110
+        '1': '待分仓',
111
+        '2': '已退回',
112
+        '3': '已分仓',
113
+        '4': '无货',
114
+        '5': '仓库待审核',
115
+        '6': '已发货',
116
+        '7': '付款待审核',
117
+        '8': '待分物流',
118
+        '9': '物流未通过'
117 119
       }
118 120
       return statusMap[status]
119 121
     },
@@ -124,21 +126,21 @@ export default {
124 126
       }
125 127
       orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
126 128
       return orderGoodsNameQuantity
127
-    },
129
+    }
128 130
   },
129 131
   data() {
130 132
     return {
131 133
       loading: false,
132 134
       searchData: {
133
-        adFrom: '', //消息/广告媒体来源
134
-        type: '', //订单类型
135
-        id: '', //订单号
136
-        customer: '', //客户姓名
137
-        customerPhone: '', //客户手机号
138
-        trackingNo: '', //运单号
139
-        searchTime: '', //订单时间
135
+        adFrom: '', // 消息/广告媒体来源
136
+        type: '', // 订单类型
137
+        id: '', // 订单号
138
+        customer: '', // 客户姓名
139
+        customerPhone: '', // 客户手机号
140
+        trackingNo: '', // 运单号
141
+        searchTime: '' // 订单时间
140 142
       },
141
-      activeName: "3", //标签切换首页
143
+      activeName: '3', // 标签切换首页
142 144
       pickerOptions, // 日期数据
143 145
       pageParams: {
144 146
         pageindex: 1, // 当前第几页
@@ -147,58 +149,58 @@ export default {
147 149
       },
148 150
       dataLists: [], // 列表数据
149 151
       multipleSelection: [], // 选中的数据
150
-      orderType: [],//订单类型
151
-      selectOrderId: [], // 选中id
152
-    };
152
+      orderType: [], // 订单类型
153
+      selectOrderId: [] // 选中id
154
+    }
153 155
   },
154 156
   created() {
155 157
     this.getOrderType()
156 158
     this.getList()
157 159
     document.onkeyup = e => {
158 160
       if (e.keyCode === 13) {
159
-        this.getList();
161
+        this.getList()
160 162
       }
161
-    };
163
+    }
162 164
   },
163 165
   methods: {
164 166
     getList() {
165
-      this.loading = true;
167
+      this.loading = true
166 168
       return new Promise(resolve => {
167 169
         const params = {
168
-          F_State: this.activeName, //订单状态 -2全部
170
+          F_State: this.activeName, // 订单状态 -2全部
169 171
           pageindex: this.pageParams.pageindex, // int 第几页
170 172
           pagesize: this.pageParams.pagesize, // int 每页几条信息
171
-          F_ADFrom: this.searchData.adFrom, //消息/广告来源
172
-          F_Type: this.searchData.type, //订单类型
173
-          F_Id: this.searchData.id, //订单号
174
-          F_Customer: this.searchData.customer, //客户姓名
175
-          F_CustomerPhone: this.searchData.customerPhone, //客户手机号
176
-          F_TrackingNo: this.searchData.trackingNo, //运单号
177
-          SearchStartTime: this.searchData.searchTime[0], //添加开始时间
178
-          SearchEndTime: this.searchData.searchTime[1], //添加结束时间
179
-          F_IsExpress: 1, //-2全部 0客服未分配快递 1已分配
180
-          F_PayState: -2, //支付状态-2 全部0待回款 1已完成 2待退款 3已完成
181
-          F_Express: "顺丰快递",
182
-        };
173
+          F_ADFrom: this.searchData.adFrom, // 消息/广告来源
174
+          F_Type: this.searchData.type, // 订单类型
175
+          F_Id: this.searchData.id, // 订单号
176
+          F_Customer: this.searchData.customer, // 客户姓名
177
+          F_CustomerPhone: this.searchData.customerPhone, // 客户手机号
178
+          F_TrackingNo: this.searchData.trackingNo, // 运单号
179
+          SearchStartTime: this.searchData.searchTime[0], // 添加开始时间
180
+          SearchEndTime: this.searchData.searchTime[1], // 添加结束时间
181
+          F_IsExpress: 1, // -2全部 0客服未分配快递 1已分配
182
+          F_PayState: -2, // 支付状态-2 全部0待回款 1已完成 2待退款 3已完成
183
+          F_Express: '顺丰快递'
184
+        }
183 185
         getOrderListCustomerService(params).then(response => {
184
-          this.loading = false;
185
-          if (response.state.toLowerCase() === "success") {
186
-            this.pageParams.total = response.data.Totals;
187
-            this.dataLists = response.data.Rows;
186
+          this.loading = false
187
+          if (response.state.toLowerCase() === 'success') {
188
+            this.pageParams.total = response.data.Totals
189
+            this.dataLists = response.data.Rows
188 190
           }
189
-        });
190
-        resolve();
191
-      });
191
+        })
192
+        resolve()
193
+      })
192 194
     },
193 195
     // 获取订单类型
194 196
     getOrderType() {
195
-      return new Promise(resolve=>{
196
-        const params={
197
-          isleaf:true,
198
-          code:'ORDERTYPE'
197
+      return new Promise(resolve => {
198
+        const params = {
199
+          isleaf: true,
200
+          code: 'ORDERTYPE'
199 201
         }
200
-        getDictionaryValueList(params).then(response=>{
201
-          if(response.state.toLowerCase() === 'success'){
202
+        getDictionaryValueList(params).then(response => {
203
+          if (response.state.toLowerCase() === 'success') {
202 204
             this.orderType = response.data.Rows
203 205
           }
204 206
         })
@@ -208,121 +210,141 @@ export default {
208 210
       this.getList()
209 211
     },
210 212
     btn_search() {
211
-      this.pageParams.pageindex = 1;
212
-      this.getList();
213
+      this.pageParams.pageindex = 1
214
+      this.getList()
213 215
     },
214 216
     // 提交
215 217
     btn_submit(orderId) {
216
-      this.isDisable = true;
218
+      this.isDisable = true
217 219
       setTimeout(() => {
218
-        this.$confirm("您确定提交吗?", "提示", {
219
-          confirmButtonText: "确定",
220
-          cancelButtonText: "取消",
221
-          type: "warning",
220
+        this.$confirm('您确定提交吗?', '提示', {
221
+          confirmButtonText: '确定',
222
+          cancelButtonText: '取消',
223
+          type: 'warning'
222 224
         })
223 225
           .then(() => {
224
-            this.isDisable = false;
226
+            this.isDisable = false
225 227
             const data = {
226
-              orderids: orderId,
227
-            };
228
+              orderids: orderId
229
+            }
228 230
             submitOrderCustomerService(data).then((response) => {
229
-              if (response.state.toLowerCase() === "success") {
230
-                this.getList();
231
-                this.$message.success("提交成功!");
231
+              if (response.state.toLowerCase() === 'success') {
232
+                this.getList()
233
+                this.$message.success('提交成功!')
232 234
               }
233
-            });
235
+            })
234 236
           })
235 237
           .catch(() => {
236 238
             this.$message({
237
-              type: "info",
238
-              message: "已取消提交",
239
-            });
240
-          });
241
-        this.isDisable = false;
242
-      }, 300);
239
+              type: 'info',
240
+              message: '已取消提交'
241
+            })
242
+          })
243
+        this.isDisable = false
244
+      }, 300)
243 245
     },
244 246
     // 批量退回
245
-    btn_bulk_goback () {
247
+    btn_bulk_goback() {
246 248
       if (this.selectOrderId.length < 1) {
247 249
         this.$message({
248
-          message: "请选择订单!",
249
-          type: "warning",
250
-        });
251
-        return;
250
+          message: '请选择订单!',
251
+          type: 'warning'
252
+        })
253
+        return
252 254
       }
253
-      let orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
255
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
254 256
       this.$layer.iframe({
255 257
         content: {
256 258
           content: goback, // 传递的组件对象
257 259
           parent: this, // 当前的vue对象
258 260
           data: { rowid: orderids } // props
259 261
         },
260
-        area: ["30%", "30%"],
261
-        title: "退回订单"
262
-      });
262
+        area: ['30%', '30%'],
263
+        title: '退回订单'
264
+      })
265
+    },
266
+    // 批量退回上一级
267
+    btn_bulk_gobacklast() {
268
+      if (this.selectOrderId.length < 1) {
269
+        this.$message({
270
+          message: '请选择订单!',
271
+          type: 'warning'
272
+        })
273
+        return
274
+      }
275
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
276
+      this.$layer.iframe({
277
+        content: {
278
+          content: gobacklast, // 传递的组件对象
279
+          parent: this, // 当前的vue对象
280
+          data: { rowid: orderids } // props
281
+        },
282
+        area: ['30%', '30%'],
283
+        title: '退回订单'
284
+      })
263 285
     },
264 286
     // 批量提交
265 287
     btn_bulk_submit() {
266 288
       if (this.selectOrderId.length < 1) {
267 289
         this.$message({
268
-          message: "请选择订单!",
269
-          type: "warning",
270
-        });
271
-        return;
290
+          message: '请选择订单!',
291
+          type: 'warning'
292
+        })
293
+        return
272 294
       }
273
-      this.isDisable = true;
295
+      this.isDisable = true
274 296
       setTimeout(() => {
275
-        this.$confirm("您确定提交吗?", "提示", {
276
-          confirmButtonText: "确定",
277
-          cancelButtonText: "取消",
278
-          type: "warning",
297
+        this.$confirm('您确定提交吗?', '提示', {
298
+          confirmButtonText: '确定',
299
+          cancelButtonText: '取消',
300
+          type: 'warning'
279 301
         })
280 302
           .then(() => {
281
-            this.isDisable = false;
303
+            this.isDisable = false
282 304
             const data = {
283
-              orderids: this.selectOrderId.join(',').replace(/\s+/g, ''),
284
-            };
305
+              orderids: this.selectOrderId.join(',').replace(/\s+/g, '')
306
+            }
285 307
             submitOrderCustomerService(data).then((response) => {
286
-              if (response.state.toLowerCase() === "success") {
287
-                this.getList();
288
-                this.$message.success("提交成功!");
308
+              if (response.state.toLowerCase() === 'success') {
309
+                this.getList()
310
+                this.$message.success('提交成功!')
289 311
               }
290
-            });
312
+            })
291 313
           })
292 314
           .catch(() => {
293 315
             this.$message({
294
-              type: "info",
295
-              message: "已取消提交",
296
-            });
297
-          });
298
-        this.isDisable = false;
299
-      }, 300);
316
+              type: 'info',
317
+              message: '已取消提交'
318
+            })
319
+          })
320
+        this.isDisable = false
321
+      }, 300)
300 322
     },
301 323
     // 退回订单
302
-    btn_goback (orderid) {
324
+    btn_goback(orderid) {
303 325
       this.$layer.iframe({
304 326
         content: {
305 327
           content: goback, // 传递的组件对象
306 328
           parent: this, // 当前的vue对象
307 329
           data: { rowid: orderid } // props
308 330
         },
309
-        area: ["30%", "30%"],
310
-        title: "退回订单"
311
-      });
331
+        area: ['30%', '30%'],
332
+        title: '退回订单'
333
+      })
312 334
     },
313
-    //导入附件提交
314
-    btn_import_submit () {
335
+    // 导入附件提交
336
+    btn_import_submit() {
315 337
       this.$layer.iframe({
316 338
         content: {
317 339
           content: importSubmit, // 传递的组件对象
318 340
           parent: this, // 当前的vue对象
319 341
           data: { rowid: '' } // props
320 342
         },
321
-        area: ["30%", "30%"],
322
-        title: "导入附件提交"
323
-      });
343
+        area: ['30%', '30%'],
344
+        title: '导入附件提交'
345
+      })
324 346
     },
325
-    hadndleOrderCode(ordercode){
347
+    hadndleOrderCode(ordercode) {
326 348
       this.$layer.iframe({
327 349
         content: {
328 350
           content: detail, // 传递的组件对象
@@ -333,17 +355,17 @@ export default {
333 355
         title: '订单详情'
334 356
       })
335 357
     },
336
-    //选择多个
358
+    // 选择多个
337 359
     handleSelectionChange(val) {
338 360
       const ids = []
339 361
       this.multipleSelection = val
340
-      for (let i=0; i<this.multipleSelection.length; i++) {
362
+      for (let i = 0; i < this.multipleSelection.length; i++) {
341 363
         ids.push(this.multipleSelection[i].F_Id)
342 364
       }
343 365
       this.selectOrderId = ids
344
-    }, 
366
+    }
345 367
   }
346
-};
368
+}
347 369
 </script>
348 370
 
349 371
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 30 - 21
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceSTO/goback.vue

@@ -8,13 +8,14 @@
8 8
           filterable
9 9
           clearable
10 10
           placeholder="请选择退回"
11
+          @change="selectback"
11 12
         >
12 13
           <el-option label="退回上一级" value="0" />
13 14
           <el-option label="退回销售" value="1" />
14 15
         </el-select>
15 16
       </el-form-item>
16
-      <el-form-item label="退回原因">
17
-        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"></el-input>
17
+      <el-form-item v-show="ishow" label="退回原因">
18
+        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"/>
18 19
       </el-form-item>
19 20
       <el-form-item>
20 21
         <el-button type="primary" @click="submitForm()">提交</el-button>
@@ -23,24 +24,25 @@
23 24
   </div>
24 25
 </template>
25 26
 <script>
26
-import { gobackOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService";
27
+import { gobackOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
27 28
 export default {
28 29
   props: {
29 30
     rowid: {
30 31
       type: String,
31
-      default: "",
32
+      default: ''
32 33
     },
33 34
     layerid: {
34 35
       type: String,
35
-      default: "",
36
-    },
36
+      default: ''
37
+    }
37 38
   },
38 39
   data() {
39 40
     return {
41
+      ishow: true, // 原因显隐
40 42
       ruleForm: {
41
-        orderids: "", //订单编号
42
-        remark: "", //备注
43
-        state: ""
43
+        orderids: '', // 订单编号
44
+        remark: '', // 备注
45
+        state: ''
44 46
       },
45 47
       rules: {
46 48
         state: [
@@ -49,13 +51,13 @@ export default {
49 51
             trigger: 'change',
50 52
             message: '请选择退回'
51 53
           }
52
-        ],
54
+        ]
53 55
       }
54
-    };
56
+    }
55 57
   },
56 58
   created() {
57 59
     if (this.rowid) {
58
-      this.ruleForm.orderids = this.rowid;
60
+      this.ruleForm.orderids = this.rowid
59 61
     }
60 62
   },
61 63
   methods: {
@@ -64,23 +66,30 @@ export default {
64 66
         if (valid) {
65 67
           gobackOrderCustomerService(this.ruleForm)
66 68
             .then((response) => {
67
-              if (response.state.toLowerCase() === "success") {
68
-                this.$parent.$layer.close(this.layerid);
69
-                this.$parent.getList(); // 重新加载父级数据
70
-                this.$message.success("恭喜你,订单信息退回成功!");
69
+              if (response.state.toLowerCase() === 'success') {
70
+                this.$parent.$layer.close(this.layerid)
71
+                this.$parent.getList() // 重新加载父级数据
72
+                this.$message.success('恭喜你,订单信息退回成功!')
71 73
               }
72 74
             })
73 75
             .catch(() => {
74
-              this.loading = false;
75
-            });
76
+              this.loading = false
77
+            })
76 78
         }
77 79
       })
78 80
     },
79
-  },
80
-};
81
+    selectback(e) {
82
+      if (e === '0') {
83
+        this.ishow = false
84
+      } else {
85
+        this.ishow = true
86
+      }
87
+    }
88
+  }
89
+}
81 90
 </script>
82 91
 <style lang="scss" scoped>
83 92
 .form_select {
84 93
   width: 100%
85 94
 }
86
-</style>
95
+</style>

+ 59 - 0
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceSTO/gobacklast.vue

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

+ 152 - 130
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceSTO/index.vue

@@ -24,17 +24,18 @@
24 24
       <el-input v-model="searchData.trackingNo" placeholder="请输入运单号" class="filter-item" />
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_bulk_submit'" type="primary" class="filter-item" @click="btn_bulk_submit">批量提交</el-button>
27
-      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回</el-button>
27
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回销售</el-button>
28
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_gobacklast">批量退回上一级</el-button>
28 29
       <el-button v-permission="'HY_import_submit'" type="primary" class="filter-item" @click="btn_import_submit">导入附件提交</el-button>
29 30
     </div>
30 31
     <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick" >
31
-      <el-tab-pane label="全部" name="3"></el-tab-pane>
32
+      <el-tab-pane label="全部" name="3"/>
32 33
     </el-tabs>
33 34
     <div>
34 35
       <span>订单数量:{{ pageParams.total }}</span>
35 36
     </div>
36
-    <el-table v-loading="loading" :data="dataLists" border stripe  @selection-change="handleSelectionChange" row-key="F_Id">
37
-      <el-table-column type="selection" :reserve-selection="true"></el-table-column>
37
+    <el-table v-loading="loading" :data="dataLists" border stripe row-key="F_Id" @selection-change="handleSelectionChange">
38
+      <el-table-column :reserve-selection="true" type="selection"/>
38 39
       <el-table-column type="index" label="编号" align="center" fixed width="80" />
39 40
       <el-table-column prop="F_Id" label="订单编号" align="center" min-width="180" >
40 41
         <template slot-scope="scope">
@@ -44,9 +45,9 @@
44 45
       <el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
45 46
       <el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
46 47
       <el-table-column label="订购商品" align="center" min-width>
47
-      <template slot-scope="scope">
48
-        {{ scope.row.OrderDetailList | judgmentOrderGoods}}
49
-      </template>
48
+        <template slot-scope="scope">
49
+          {{ scope.row.OrderDetailList | judgmentOrderGoods }}
50
+        </template>
50 51
       </el-table-column>
51 52
       <el-table-column prop="F_AddTime" label="下单日期" align="center" />
52 53
       <el-table-column label="订单状态" align="center" >
@@ -89,31 +90,32 @@
89 90
 
90 91
 <script>
91 92
 import { getDictionaryValueList } from '@/api/commonAPI'
92
-import { getOrderListCustomerService, submitOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService"
93
-import { pickerOptions, formatterContent } from "@/utils"
94
-import goback from "./goback"
95
-import importSubmit from "./importSubmit"
96
-import detail from "@/views/orderManagement/orderList/detail"
97
-import Pagination from "@/components/Pagination"; // 对el-pagination 二次封装
93
+import { getOrderListCustomerService, submitOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
94
+import { pickerOptions, formatterContent } from '@/utils'
95
+import goback from './goback'
96
+import gobacklast from './gobacklast'
97
+import importSubmit from './importSubmit'
98
+import detail from '@/views/orderManagement/orderList/detail'
99
+import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
98 100
 
99 101
 export default {
100
-  name: "OrderListCustomerService",
102
+  name: 'OrderListCustomerService',
101 103
   components: {
102 104
     Pagination
103 105
   },
104 106
   filters: {
105 107
     judgmentStateName(status) {
106 108
       const statusMap = {
107
-        '0': "未提交",
108
-        '1': "待分仓",
109
-        '2': "已退回",
110
-        '3': "已分仓",
111
-        '4': "无货",
112
-        '5': "仓库待审核",
113
-        '6': "已发货",
114
-        '7': "付款待审核",
115
-        '8': "待分物流",
116
-        '9': "物流未通过",
109
+        '0': '未提交',
110
+        '1': '待分仓',
111
+        '2': '已退回',
112
+        '3': '已分仓',
113
+        '4': '无货',
114
+        '5': '仓库待审核',
115
+        '6': '已发货',
116
+        '7': '付款待审核',
117
+        '8': '待分物流',
118
+        '9': '物流未通过'
117 119
       }
118 120
       return statusMap[status]
119 121
     },
@@ -124,21 +126,21 @@ export default {
124 126
       }
125 127
       orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
126 128
       return orderGoodsNameQuantity
127
-    },
129
+    }
128 130
   },
129 131
   data() {
130 132
     return {
131 133
       loading: false,
132 134
       searchData: {
133
-        adFrom: '', //消息/广告媒体来源
134
-        type: '', //订单类型
135
-        id: '', //订单号
136
-        customer: '', //客户姓名
137
-        customerPhone: '', //客户手机号
138
-        trackingNo: '', //运单号
139
-        searchTime: '', //订单时间
135
+        adFrom: '', // 消息/广告媒体来源
136
+        type: '', // 订单类型
137
+        id: '', // 订单号
138
+        customer: '', // 客户姓名
139
+        customerPhone: '', // 客户手机号
140
+        trackingNo: '', // 运单号
141
+        searchTime: '' // 订单时间
140 142
       },
141
-      activeName: "3", //标签切换首页
143
+      activeName: '3', // 标签切换首页
142 144
       pickerOptions, // 日期数据
143 145
       pageParams: {
144 146
         pageindex: 1, // 当前第几页
@@ -147,58 +149,58 @@ export default {
147 149
       },
148 150
       dataLists: [], // 列表数据
149 151
       multipleSelection: [], // 选中的数据
150
-      orderType: [],//订单类型
151
-      selectOrderId: [], //批量物流id
152
-    };
152
+      orderType: [], // 订单类型
153
+      selectOrderId: [] // 批量物流id
154
+    }
153 155
   },
154 156
   created() {
155 157
     this.getOrderType()
156 158
     this.getList()
157 159
     document.onkeyup = e => {
158 160
       if (e.keyCode === 13) {
159
-        this.getList();
161
+        this.getList()
160 162
       }
161
-    };
163
+    }
162 164
   },
163 165
   methods: {
164 166
     getList() {
165
-      this.loading = true;
167
+      this.loading = true
166 168
       return new Promise(resolve => {
167 169
         const params = {
168
-          F_State: this.activeName, //订单状态 -2全部
170
+          F_State: this.activeName, // 订单状态 -2全部
169 171
           pageindex: 1, // int 第几页
170 172
           pagesize: 1000000, // int 每页几条信息
171
-          F_ADFrom: this.searchData.adFrom, //消息/广告来源
172
-          F_Type: this.searchData.type, //订单类型
173
-          F_Id: this.searchData.id, //订单号
174
-          F_Customer: this.searchData.customer, //客户姓名
175
-          F_CustomerPhone: this.searchData.customerPhone, //客户手机号
176
-          F_TrackingNo: this.searchData.trackingNo, //运单号
177
-          SearchStartTime: this.searchData.searchTime[0], //添加开始时间
178
-          SearchEndTime: this.searchData.searchTime[1], //添加结束时间
179
-          F_IsExpress: 1, //-2全部 0客服未分配快递 1已分配
180
-          F_PayState: -2, //支付状态-2 全部0待回款 1已完成 2待退款 3已完成
181
-          F_Express: "申通快递",
182
-        };
173
+          F_ADFrom: this.searchData.adFrom, // 消息/广告来源
174
+          F_Type: this.searchData.type, // 订单类型
175
+          F_Id: this.searchData.id, // 订单号
176
+          F_Customer: this.searchData.customer, // 客户姓名
177
+          F_CustomerPhone: this.searchData.customerPhone, // 客户手机号
178
+          F_TrackingNo: this.searchData.trackingNo, // 运单号
179
+          SearchStartTime: this.searchData.searchTime[0], // 添加开始时间
180
+          SearchEndTime: this.searchData.searchTime[1], // 添加结束时间
181
+          F_IsExpress: 1, // -2全部 0客服未分配快递 1已分配
182
+          F_PayState: -2, // 支付状态-2 全部0待回款 1已完成 2待退款 3已完成
183
+          F_Express: '申通快递'
184
+        }
183 185
         getOrderListCustomerService(params).then(response => {
184
-          this.loading = false;
185
-          if (response.state.toLowerCase() === "success") {
186
-            this.pageParams.total = response.data.Totals;
187
-            this.dataLists = response.data.Rows;
186
+          this.loading = false
187
+          if (response.state.toLowerCase() === 'success') {
188
+            this.pageParams.total = response.data.Totals
189
+            this.dataLists = response.data.Rows
188 190
           }
189
-        });
190
-        resolve();
191
-      });
191
+        })
192
+        resolve()
193
+      })
192 194
     },
193 195
     // 获取订单类型
194 196
     getOrderType() {
195
-      return new Promise(resolve=>{
196
-        const params={
197
-          isleaf:true,
198
-          code:'ORDERTYPE'
197
+      return new Promise(resolve => {
198
+        const params = {
199
+          isleaf: true,
200
+          code: 'ORDERTYPE'
199 201
         }
200
-        getDictionaryValueList(params).then(response=>{
201
-          if(response.state.toLowerCase() === 'success'){
202
+        getDictionaryValueList(params).then(response => {
203
+          if (response.state.toLowerCase() === 'success') {
202 204
             this.orderType = response.data.Rows
203 205
           }
204 206
         })
@@ -208,121 +210,141 @@ export default {
208 210
       this.getList()
209 211
     },
210 212
     btn_search() {
211
-      this.pageParams.pageindex = 1;
212
-      this.getList();
213
+      this.pageParams.pageindex = 1
214
+      this.getList()
213 215
     },
214 216
     // 提交
215 217
     btn_submit(orderId) {
216
-      this.isDisable = true;
218
+      this.isDisable = true
217 219
       setTimeout(() => {
218
-        this.$confirm("您确定提交吗?", "提示", {
219
-          confirmButtonText: "确定",
220
-          cancelButtonText: "取消",
221
-          type: "warning",
220
+        this.$confirm('您确定提交吗?', '提示', {
221
+          confirmButtonText: '确定',
222
+          cancelButtonText: '取消',
223
+          type: 'warning'
222 224
         })
223 225
           .then(() => {
224
-            this.isDisable = false;
226
+            this.isDisable = false
225 227
             const data = {
226
-              orderids: orderId,
227
-            };
228
+              orderids: orderId
229
+            }
228 230
             submitOrderCustomerService(data).then((response) => {
229
-              if (response.state.toLowerCase() === "success") {
230
-                this.getList();
231
-                this.$message.success("提交成功!");
231
+              if (response.state.toLowerCase() === 'success') {
232
+                this.getList()
233
+                this.$message.success('提交成功!')
232 234
               }
233
-            });
235
+            })
234 236
           })
235 237
           .catch(() => {
236 238
             this.$message({
237
-              type: "info",
238
-              message: "已取消提交",
239
-            });
240
-          });
241
-        this.isDisable = false;
242
-      }, 300);
239
+              type: 'info',
240
+              message: '已取消提交'
241
+            })
242
+          })
243
+        this.isDisable = false
244
+      }, 300)
243 245
     },
244 246
     // 批量退回
245
-    btn_bulk_goback () {
247
+    btn_bulk_goback() {
246 248
       if (this.selectOrderId.length < 1) {
247 249
         this.$message({
248
-          message: "请选择订单!",
249
-          type: "warning",
250
-        });
251
-        return;
250
+          message: '请选择订单!',
251
+          type: 'warning'
252
+        })
253
+        return
252 254
       }
253
-      let orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
255
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
254 256
       this.$layer.iframe({
255 257
         content: {
256 258
           content: goback, // 传递的组件对象
257 259
           parent: this, // 当前的vue对象
258 260
           data: { rowid: orderids } // props
259 261
         },
260
-        area: ["30%", "30%"],
261
-        title: "退回订单"
262
-      });
262
+        area: ['30%', '30%'],
263
+        title: '退回订单'
264
+      })
265
+    },
266
+    // 批量退回上一级
267
+    btn_bulk_gobacklast() {
268
+      if (this.selectOrderId.length < 1) {
269
+        this.$message({
270
+          message: '请选择订单!',
271
+          type: 'warning'
272
+        })
273
+        return
274
+      }
275
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
276
+      this.$layer.iframe({
277
+        content: {
278
+          content: gobacklast, // 传递的组件对象
279
+          parent: this, // 当前的vue对象
280
+          data: { rowid: orderids } // props
281
+        },
282
+        area: ['30%', '30%'],
283
+        title: '退回订单'
284
+      })
263 285
     },
264 286
     // 批量提交
265 287
     btn_bulk_submit() {
266 288
       if (this.selectOrderId.length < 1) {
267 289
         this.$message({
268
-          message: "请选择订单!",
269
-          type: "warning",
270
-        });
271
-        return;
290
+          message: '请选择订单!',
291
+          type: 'warning'
292
+        })
293
+        return
272 294
       }
273
-      this.isDisable = true;
295
+      this.isDisable = true
274 296
       setTimeout(() => {
275
-        this.$confirm("您确定提交吗?", "提示", {
276
-          confirmButtonText: "确定",
277
-          cancelButtonText: "取消",
278
-          type: "warning",
297
+        this.$confirm('您确定提交吗?', '提示', {
298
+          confirmButtonText: '确定',
299
+          cancelButtonText: '取消',
300
+          type: 'warning'
279 301
         })
280 302
           .then(() => {
281
-            this.isDisable = false;
303
+            this.isDisable = false
282 304
             const data = {
283
-              orderids: this.selectOrderId.join(',').replace(/\s+/g, ''),
284
-            };
305
+              orderids: this.selectOrderId.join(',').replace(/\s+/g, '')
306
+            }
285 307
             submitOrderCustomerService(data).then((response) => {
286
-              if (response.state.toLowerCase() === "success") {
287
-                this.getList();
288
-                this.$message.success("提交成功!");
308
+              if (response.state.toLowerCase() === 'success') {
309
+                this.getList()
310
+                this.$message.success('提交成功!')
289 311
               }
290
-            });
312
+            })
291 313
           })
292 314
           .catch(() => {
293 315
             this.$message({
294
-              type: "info",
295
-              message: "已取消提交",
296
-            });
297
-          });
298
-        this.isDisable = false;
299
-      }, 300);
316
+              type: 'info',
317
+              message: '已取消提交'
318
+            })
319
+          })
320
+        this.isDisable = false
321
+      }, 300)
300 322
     },
301 323
     // 退回订单
302
-    btn_goback (orderid) {
324
+    btn_goback(orderid) {
303 325
       this.$layer.iframe({
304 326
         content: {
305 327
           content: goback, // 传递的组件对象
306 328
           parent: this, // 当前的vue对象
307 329
           data: { rowid: orderid } // props
308 330
         },
309
-        area: ["30%", "30%"],
310
-        title: "退回订单"
311
-      });
331
+        area: ['30%', '30%'],
332
+        title: '退回订单'
333
+      })
312 334
     },
313
-    //导入附件提交
314
-    btn_import_submit () {
335
+    // 导入附件提交
336
+    btn_import_submit() {
315 337
       this.$layer.iframe({
316 338
         content: {
317 339
           content: importSubmit, // 传递的组件对象
318 340
           parent: this, // 当前的vue对象
319 341
           data: { rowid: '' } // props
320 342
         },
321
-        area: ["30%", "30%"],
322
-        title: "导入附件提交"
323
-      });
343
+        area: ['30%', '30%'],
344
+        title: '导入附件提交'
345
+      })
324 346
     },
325
-    hadndleOrderCode(ordercode){
347
+    hadndleOrderCode(ordercode) {
326 348
       this.$layer.iframe({
327 349
         content: {
328 350
           content: detail, // 传递的组件对象
@@ -333,17 +355,17 @@ export default {
333 355
         title: '订单详情'
334 356
       })
335 357
     },
336
-    //选择多个
358
+    // 选择多个
337 359
     handleSelectionChange(val) {
338 360
       const ids = []
339 361
       this.multipleSelection = val
340
-      for (let i=0; i<this.multipleSelection.length; i++) {
362
+      for (let i = 0; i < this.multipleSelection.length; i++) {
341 363
         ids.push(this.multipleSelection[i].F_Id)
342 364
       }
343 365
       this.selectOrderId = ids
344
-    }, 
366
+    }
345 367
   }
346
-};
368
+}
347 369
 </script>
348 370
 
349 371
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 30 - 21
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceShanXiSF/goback.vue

@@ -8,13 +8,14 @@
8 8
           filterable
9 9
           clearable
10 10
           placeholder="请选择退回"
11
+          @change="selectback"
11 12
         >
12 13
           <el-option label="退回上一级" value="0" />
13 14
           <el-option label="退回销售" value="1" />
14 15
         </el-select>
15 16
       </el-form-item>
16
-      <el-form-item label="退回原因">
17
-        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"></el-input>
17
+      <el-form-item v-show="ishow" label="退回原因">
18
+        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"/>
18 19
       </el-form-item>
19 20
       <el-form-item>
20 21
         <el-button type="primary" @click="submitForm()">提交</el-button>
@@ -23,24 +24,25 @@
23 24
   </div>
24 25
 </template>
25 26
 <script>
26
-import { gobackOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService";
27
+import { gobackOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
27 28
 export default {
28 29
   props: {
29 30
     rowid: {
30 31
       type: String,
31
-      default: "",
32
+      default: ''
32 33
     },
33 34
     layerid: {
34 35
       type: String,
35
-      default: "",
36
-    },
36
+      default: ''
37
+    }
37 38
   },
38 39
   data() {
39 40
     return {
41
+      ishow: true, // 原因显隐
40 42
       ruleForm: {
41
-        orderids: "", //订单编号
42
-        remark: "", //备注
43
-        state: ""
43
+        orderids: '', // 订单编号
44
+        remark: '', // 备注
45
+        state: ''
44 46
       },
45 47
       rules: {
46 48
         state: [
@@ -49,13 +51,13 @@ export default {
49 51
             trigger: 'change',
50 52
             message: '请选择退回'
51 53
           }
52
-        ],
54
+        ]
53 55
       }
54
-    };
56
+    }
55 57
   },
56 58
   created() {
57 59
     if (this.rowid) {
58
-      this.ruleForm.orderids = this.rowid;
60
+      this.ruleForm.orderids = this.rowid
59 61
     }
60 62
   },
61 63
   methods: {
@@ -64,23 +66,30 @@ export default {
64 66
         if (valid) {
65 67
           gobackOrderCustomerService(this.ruleForm)
66 68
             .then((response) => {
67
-              if (response.state.toLowerCase() === "success") {
68
-                this.$parent.$layer.close(this.layerid);
69
-                this.$parent.getList(); // 重新加载父级数据
70
-                this.$message.success("恭喜你,订单信息退回成功!");
69
+              if (response.state.toLowerCase() === 'success') {
70
+                this.$parent.$layer.close(this.layerid)
71
+                this.$parent.getList() // 重新加载父级数据
72
+                this.$message.success('恭喜你,订单信息退回成功!')
71 73
               }
72 74
             })
73 75
             .catch(() => {
74
-              this.loading = false;
75
-            });
76
+              this.loading = false
77
+            })
76 78
         }
77 79
       })
78 80
     },
79
-  },
80
-};
81
+    selectback(e) {
82
+      if (e === '0') {
83
+        this.ishow = false
84
+      } else {
85
+        this.ishow = true
86
+      }
87
+    }
88
+  }
89
+}
81 90
 </script>
82 91
 <style lang="scss" scoped>
83 92
 .form_select {
84 93
   width: 100%
85 94
 }
86
-</style>
95
+</style>

+ 59 - 0
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceShanXiSF/gobacklast.vue

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

+ 152 - 130
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceShanXiSF/index.vue

@@ -24,17 +24,18 @@
24 24
       <el-input v-model="searchData.trackingNo" placeholder="请输入运单号" class="filter-item" />
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_bulk_submit'" type="primary" class="filter-item" @click="btn_bulk_submit">批量提交</el-button>
27
-      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回</el-button>
27
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回销售</el-button>
28
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_gobacklast">批量退回上一级</el-button>
28 29
       <el-button v-permission="'HY_import_submit'" type="primary" class="filter-item" @click="btn_import_submit">导入附件提交</el-button>
29 30
     </div>
30 31
     <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick" >
31
-      <el-tab-pane label="全部" name="3"></el-tab-pane>
32
+      <el-tab-pane label="全部" name="3"/>
32 33
     </el-tabs>
33 34
     <div>
34 35
       <span>订单数量:{{ pageParams.total }}</span>
35 36
     </div>
36
-    <el-table v-loading="loading" :data="dataLists" border stripe  @selection-change="handleSelectionChange" row-key="F_Id">
37
-      <el-table-column type="selection" :reserve-selection="true"></el-table-column>
37
+    <el-table v-loading="loading" :data="dataLists" border stripe row-key="F_Id" @selection-change="handleSelectionChange">
38
+      <el-table-column :reserve-selection="true" type="selection"/>
38 39
       <el-table-column type="index" label="编号" align="center" fixed width="80" />
39 40
       <el-table-column prop="F_Id" label="订单编号" align="center" min-width="180" >
40 41
         <template slot-scope="scope">
@@ -44,9 +45,9 @@
44 45
       <el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
45 46
       <el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
46 47
       <el-table-column label="订购商品" align="center" min-width>
47
-      <template slot-scope="scope">
48
-        {{ scope.row.OrderDetailList | judgmentOrderGoods}}
49
-      </template>
48
+        <template slot-scope="scope">
49
+          {{ scope.row.OrderDetailList | judgmentOrderGoods }}
50
+        </template>
50 51
       </el-table-column>
51 52
       <el-table-column prop="F_AddTime" label="下单日期" align="center" />
52 53
       <el-table-column label="订单状态" align="center" >
@@ -89,31 +90,32 @@
89 90
 
90 91
 <script>
91 92
 import { getDictionaryValueList } from '@/api/commonAPI'
92
-import { getOrderListCustomerService, submitOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService"
93
-import { pickerOptions, formatterContent } from "@/utils"
94
-import goback from "./goback"
95
-import importSubmit from "./importSubmit"
96
-import detail from "@/views/orderManagement/orderList/detail"
97
-import Pagination from "@/components/Pagination" // 对el-pagination 二次封装
93
+import { getOrderListCustomerService, submitOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
94
+import { pickerOptions, formatterContent } from '@/utils'
95
+import goback from './goback'
96
+import gobacklast from './gobacklast'
97
+import importSubmit from './importSubmit'
98
+import detail from '@/views/orderManagement/orderList/detail'
99
+import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
98 100
 
99 101
 export default {
100
-  name: "OrderListCustomerService",
102
+  name: 'OrderListCustomerService',
101 103
   components: {
102 104
     Pagination
103 105
   },
104 106
   filters: {
105 107
     judgmentStateName(status) {
106 108
       const statusMap = {
107
-        '0': "未提交",
108
-        '1': "待分仓",
109
-        '2': "已退回",
110
-        '3': "已分仓",
111
-        '4': "无货",
112
-        '5': "仓库待审核",
113
-        '6': "已发货",
114
-        '7': "付款待审核",
115
-        '8': "待分物流",
116
-        '9': "物流未通过",
109
+        '0': '未提交',
110
+        '1': '待分仓',
111
+        '2': '已退回',
112
+        '3': '已分仓',
113
+        '4': '无货',
114
+        '5': '仓库待审核',
115
+        '6': '已发货',
116
+        '7': '付款待审核',
117
+        '8': '待分物流',
118
+        '9': '物流未通过'
117 119
       }
118 120
       return statusMap[status]
119 121
     },
@@ -124,21 +126,21 @@ export default {
124 126
       }
125 127
       orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
126 128
       return orderGoodsNameQuantity
127
-    },
129
+    }
128 130
   },
129 131
   data() {
130 132
     return {
131 133
       loading: false,
132 134
       searchData: {
133
-        adFrom: '', //消息/广告媒体来源
134
-        type: '', //订单类型
135
-        id: '', //订单号
136
-        customer: '', //客户姓名
137
-        customerPhone: '', //客户手机号
138
-        trackingNo: '', //运单号
139
-        searchTime: '', //订单时间
135
+        adFrom: '', // 消息/广告媒体来源
136
+        type: '', // 订单类型
137
+        id: '', // 订单号
138
+        customer: '', // 客户姓名
139
+        customerPhone: '', // 客户手机号
140
+        trackingNo: '', // 运单号
141
+        searchTime: '' // 订单时间
140 142
       },
141
-      activeName: "3", //标签切换首页
143
+      activeName: '3', // 标签切换首页
142 144
       pickerOptions, // 日期数据
143 145
       pageParams: {
144 146
         pageindex: 1, // 当前第几页
@@ -147,58 +149,58 @@ export default {
147 149
       },
148 150
       dataLists: [], // 列表数据
149 151
       multipleSelection: [], // 选中的数据
150
-      orderType: [],//订单类型
151
-      selectOrderId: [], // 选中id
152
-    };
152
+      orderType: [], // 订单类型
153
+      selectOrderId: [] // 选中id
154
+    }
153 155
   },
154 156
   created() {
155 157
     this.getOrderType()
156 158
     this.getList()
157 159
     document.onkeyup = e => {
158 160
       if (e.keyCode === 13) {
159
-        this.getList();
161
+        this.getList()
160 162
       }
161
-    };
163
+    }
162 164
   },
163 165
   methods: {
164 166
     getList() {
165
-      this.loading = true;
167
+      this.loading = true
166 168
       return new Promise(resolve => {
167 169
         const params = {
168
-          F_State: this.activeName, //订单状态 -2全部
170
+          F_State: this.activeName, // 订单状态 -2全部
169 171
           pageindex: this.pageParams.pageindex, // int 第几页
170 172
           pagesize: this.pageParams.pagesize, // int 每页几条信息
171
-          F_ADFrom: this.searchData.adFrom, //消息/广告来源
172
-          F_Type: this.searchData.type, //订单类型
173
-          F_Id: this.searchData.id, //订单号
174
-          F_Customer: this.searchData.customer, //客户姓名
175
-          F_CustomerPhone: this.searchData.customerPhone, //客户手机号
176
-          F_TrackingNo: this.searchData.trackingNo, //运单号
177
-          SearchStartTime: this.searchData.searchTime[0], //添加开始时间
178
-          SearchEndTime: this.searchData.searchTime[1], //添加结束时间
179
-          F_IsExpress: 1, //-2全部 0客服未分配快递 1已分配
180
-          F_PayState: -2, //支付状态-2 全部0待回款 1已完成 2待退款 3已完成
181
-          F_Express: "山西顺丰",
182
-        };
173
+          F_ADFrom: this.searchData.adFrom, // 消息/广告来源
174
+          F_Type: this.searchData.type, // 订单类型
175
+          F_Id: this.searchData.id, // 订单号
176
+          F_Customer: this.searchData.customer, // 客户姓名
177
+          F_CustomerPhone: this.searchData.customerPhone, // 客户手机号
178
+          F_TrackingNo: this.searchData.trackingNo, // 运单号
179
+          SearchStartTime: this.searchData.searchTime[0], // 添加开始时间
180
+          SearchEndTime: this.searchData.searchTime[1], // 添加结束时间
181
+          F_IsExpress: 1, // -2全部 0客服未分配快递 1已分配
182
+          F_PayState: -2, // 支付状态-2 全部0待回款 1已完成 2待退款 3已完成
183
+          F_Express: '山西顺丰'
184
+        }
183 185
         getOrderListCustomerService(params).then(response => {
184
-          this.loading = false;
185
-          if (response.state.toLowerCase() === "success") {
186
-            this.pageParams.total = response.data.Totals;
187
-            this.dataLists = response.data.Rows;
186
+          this.loading = false
187
+          if (response.state.toLowerCase() === 'success') {
188
+            this.pageParams.total = response.data.Totals
189
+            this.dataLists = response.data.Rows
188 190
           }
189
-        });
190
-        resolve();
191
-      });
191
+        })
192
+        resolve()
193
+      })
192 194
     },
193 195
     // 获取订单类型
194 196
     getOrderType() {
195
-      return new Promise(resolve=>{
196
-        const params={
197
-          isleaf:true,
198
-          code:'ORDERTYPE'
197
+      return new Promise(resolve => {
198
+        const params = {
199
+          isleaf: true,
200
+          code: 'ORDERTYPE'
199 201
         }
200
-        getDictionaryValueList(params).then(response=>{
201
-          if(response.state.toLowerCase() === 'success'){
202
+        getDictionaryValueList(params).then(response => {
203
+          if (response.state.toLowerCase() === 'success') {
202 204
             this.orderType = response.data.Rows
203 205
           }
204 206
         })
@@ -208,121 +210,141 @@ export default {
208 210
       this.getList()
209 211
     },
210 212
     btn_search() {
211
-      this.pageParams.pageindex = 1;
212
-      this.getList();
213
+      this.pageParams.pageindex = 1
214
+      this.getList()
213 215
     },
214 216
     // 提交
215 217
     btn_submit(orderId) {
216
-      this.isDisable = true;
218
+      this.isDisable = true
217 219
       setTimeout(() => {
218
-        this.$confirm("您确定提交吗?", "提示", {
219
-          confirmButtonText: "确定",
220
-          cancelButtonText: "取消",
221
-          type: "warning",
220
+        this.$confirm('您确定提交吗?', '提示', {
221
+          confirmButtonText: '确定',
222
+          cancelButtonText: '取消',
223
+          type: 'warning'
222 224
         })
223 225
           .then(() => {
224
-            this.isDisable = false;
226
+            this.isDisable = false
225 227
             const data = {
226
-              orderids: orderId,
227
-            };
228
+              orderids: orderId
229
+            }
228 230
             submitOrderCustomerService(data).then((response) => {
229
-              if (response.state.toLowerCase() === "success") {
230
-                this.getList();
231
-                this.$message.success("提交成功!");
231
+              if (response.state.toLowerCase() === 'success') {
232
+                this.getList()
233
+                this.$message.success('提交成功!')
232 234
               }
233
-            });
235
+            })
234 236
           })
235 237
           .catch(() => {
236 238
             this.$message({
237
-              type: "info",
238
-              message: "已取消提交",
239
-            });
240
-          });
241
-        this.isDisable = false;
242
-      }, 300);
239
+              type: 'info',
240
+              message: '已取消提交'
241
+            })
242
+          })
243
+        this.isDisable = false
244
+      }, 300)
243 245
     },
244 246
     // 批量退回
245
-    btn_bulk_goback () {
247
+    btn_bulk_goback() {
246 248
       if (this.selectOrderId.length < 1) {
247 249
         this.$message({
248
-          message: "请选择订单!",
249
-          type: "warning",
250
-        });
251
-        return;
250
+          message: '请选择订单!',
251
+          type: 'warning'
252
+        })
253
+        return
252 254
       }
253
-      let orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
255
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
254 256
       this.$layer.iframe({
255 257
         content: {
256 258
           content: goback, // 传递的组件对象
257 259
           parent: this, // 当前的vue对象
258 260
           data: { rowid: orderids } // props
259 261
         },
260
-        area: ["30%", "30%"],
261
-        title: "退回订单"
262
-      });
262
+        area: ['30%', '30%'],
263
+        title: '退回订单'
264
+      })
265
+    },
266
+    // 批量退回上一级
267
+    btn_bulk_gobacklast() {
268
+      if (this.selectOrderId.length < 1) {
269
+        this.$message({
270
+          message: '请选择订单!',
271
+          type: 'warning'
272
+        })
273
+        return
274
+      }
275
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
276
+      this.$layer.iframe({
277
+        content: {
278
+          content: gobacklast, // 传递的组件对象
279
+          parent: this, // 当前的vue对象
280
+          data: { rowid: orderids } // props
281
+        },
282
+        area: ['30%', '30%'],
283
+        title: '退回订单'
284
+      })
263 285
     },
264 286
     // 批量提交
265 287
     btn_bulk_submit() {
266 288
       if (this.selectOrderId.length < 1) {
267 289
         this.$message({
268
-          message: "请选择订单!",
269
-          type: "warning",
270
-        });
271
-        return;
290
+          message: '请选择订单!',
291
+          type: 'warning'
292
+        })
293
+        return
272 294
       }
273
-      this.isDisable = true;
295
+      this.isDisable = true
274 296
       setTimeout(() => {
275
-        this.$confirm("您确定提交吗?", "提示", {
276
-          confirmButtonText: "确定",
277
-          cancelButtonText: "取消",
278
-          type: "warning",
297
+        this.$confirm('您确定提交吗?', '提示', {
298
+          confirmButtonText: '确定',
299
+          cancelButtonText: '取消',
300
+          type: 'warning'
279 301
         })
280 302
           .then(() => {
281
-            this.isDisable = false;
303
+            this.isDisable = false
282 304
             const data = {
283
-              orderids: this.selectOrderId.join(',').replace(/\s+/g, ''),
284
-            };
305
+              orderids: this.selectOrderId.join(',').replace(/\s+/g, '')
306
+            }
285 307
             submitOrderCustomerService(data).then((response) => {
286
-              if (response.state.toLowerCase() === "success") {
287
-                this.getList();
288
-                this.$message.success("提交成功!");
308
+              if (response.state.toLowerCase() === 'success') {
309
+                this.getList()
310
+                this.$message.success('提交成功!')
289 311
               }
290
-            });
312
+            })
291 313
           })
292 314
           .catch(() => {
293 315
             this.$message({
294
-              type: "info",
295
-              message: "已取消提交",
296
-            });
297
-          });
298
-        this.isDisable = false;
299
-      }, 300);
316
+              type: 'info',
317
+              message: '已取消提交'
318
+            })
319
+          })
320
+        this.isDisable = false
321
+      }, 300)
300 322
     },
301 323
     // 退回订单
302
-    btn_goback (orderid) {
324
+    btn_goback(orderid) {
303 325
       this.$layer.iframe({
304 326
         content: {
305 327
           content: goback, // 传递的组件对象
306 328
           parent: this, // 当前的vue对象
307 329
           data: { rowid: orderid } // props
308 330
         },
309
-        area: ["30%", "30%"],
310
-        title: "退回订单"
311
-      });
331
+        area: ['30%', '30%'],
332
+        title: '退回订单'
333
+      })
312 334
     },
313
-    //导入附件提交
314
-    btn_import_submit () {
335
+    // 导入附件提交
336
+    btn_import_submit() {
315 337
       this.$layer.iframe({
316 338
         content: {
317 339
           content: importSubmit, // 传递的组件对象
318 340
           parent: this, // 当前的vue对象
319 341
           data: { rowid: '' } // props
320 342
         },
321
-        area: ["30%", "30%"],
322
-        title: "导入附件提交"
323
-      });
343
+        area: ['30%', '30%'],
344
+        title: '导入附件提交'
345
+      })
324 346
     },
325
-    hadndleOrderCode(ordercode){
347
+    hadndleOrderCode(ordercode) {
326 348
       this.$layer.iframe({
327 349
         content: {
328 350
           content: detail, // 传递的组件对象
@@ -333,17 +355,17 @@ export default {
333 355
         title: '订单详情'
334 356
       })
335 357
     },
336
-    //选择多个
358
+    // 选择多个
337 359
     handleSelectionChange(val) {
338 360
       const ids = []
339 361
       this.multipleSelection = val
340
-      for (let i=0; i<this.multipleSelection.length; i++) {
362
+      for (let i = 0; i < this.multipleSelection.length; i++) {
341 363
         ids.push(this.multipleSelection[i].F_Id)
342 364
       }
343 365
       this.selectOrderId = ids
344
-    }, 
366
+    }
345 367
   }
346
-};
368
+}
347 369
 </script>
348 370
 
349 371
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 30 - 21
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceXinXiangSF/goback.vue

@@ -8,13 +8,14 @@
8 8
           filterable
9 9
           clearable
10 10
           placeholder="请选择退回"
11
+          @change="selectback"
11 12
         >
12 13
           <el-option label="退回上一级" value="0" />
13 14
           <el-option label="退回销售" value="1" />
14 15
         </el-select>
15 16
       </el-form-item>
16
-      <el-form-item label="退回原因">
17
-        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"></el-input>
17
+      <el-form-item v-show="ishow" label="退回原因">
18
+        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"/>
18 19
       </el-form-item>
19 20
       <el-form-item>
20 21
         <el-button type="primary" @click="submitForm()">提交</el-button>
@@ -23,24 +24,25 @@
23 24
   </div>
24 25
 </template>
25 26
 <script>
26
-import { gobackOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService";
27
+import { gobackOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
27 28
 export default {
28 29
   props: {
29 30
     rowid: {
30 31
       type: String,
31
-      default: "",
32
+      default: ''
32 33
     },
33 34
     layerid: {
34 35
       type: String,
35
-      default: "",
36
-    },
36
+      default: ''
37
+    }
37 38
   },
38 39
   data() {
39 40
     return {
41
+      ishow: true, // 原因显隐
40 42
       ruleForm: {
41
-        orderids: "", //订单编号
42
-        remark: "", //备注
43
-        state: ""
43
+        orderids: '', // 订单编号
44
+        remark: '', // 备注
45
+        state: ''
44 46
       },
45 47
       rules: {
46 48
         state: [
@@ -49,13 +51,13 @@ export default {
49 51
             trigger: 'change',
50 52
             message: '请选择退回'
51 53
           }
52
-        ],
54
+        ]
53 55
       }
54
-    };
56
+    }
55 57
   },
56 58
   created() {
57 59
     if (this.rowid) {
58
-      this.ruleForm.orderids = this.rowid;
60
+      this.ruleForm.orderids = this.rowid
59 61
     }
60 62
   },
61 63
   methods: {
@@ -64,23 +66,30 @@ export default {
64 66
         if (valid) {
65 67
           gobackOrderCustomerService(this.ruleForm)
66 68
             .then((response) => {
67
-              if (response.state.toLowerCase() === "success") {
68
-                this.$parent.$layer.close(this.layerid);
69
-                this.$parent.getList(); // 重新加载父级数据
70
-                this.$message.success("恭喜你,订单信息退回成功!");
69
+              if (response.state.toLowerCase() === 'success') {
70
+                this.$parent.$layer.close(this.layerid)
71
+                this.$parent.getList() // 重新加载父级数据
72
+                this.$message.success('恭喜你,订单信息退回成功!')
71 73
               }
72 74
             })
73 75
             .catch(() => {
74
-              this.loading = false;
75
-            });
76
+              this.loading = false
77
+            })
76 78
         }
77 79
       })
78 80
     },
79
-  },
80
-};
81
+    selectback(e) {
82
+      if (e === '0') {
83
+        this.ishow = false
84
+      } else {
85
+        this.ishow = true
86
+      }
87
+    }
88
+  }
89
+}
81 90
 </script>
82 91
 <style lang="scss" scoped>
83 92
 .form_select {
84 93
   width: 100%
85 94
 }
86
-</style>
95
+</style>

+ 59 - 0
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceXinXiangSF/gobacklast.vue

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

+ 155 - 132
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceXinXiangSF/index.vue

@@ -24,17 +24,18 @@
24 24
       <el-input v-model="searchData.trackingNo" placeholder="请输入运单号" class="filter-item" />
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_bulk_submit'" type="primary" class="filter-item" @click="btn_bulk_submit">批量提交</el-button>
27
-      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回</el-button>
27
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回销售</el-button>
28
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_gobacklast">批量退回上一级</el-button>
28 29
       <el-button v-permission="'HY_import_submit'" type="primary" class="filter-item" @click="btn_import_submit">导入附件提交</el-button>
29 30
     </div>
30 31
     <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick" >
31
-      <el-tab-pane label="全部" name="3"></el-tab-pane>
32
+      <el-tab-pane label="全部" name="3"/>
32 33
     </el-tabs>
33 34
     <div>
34 35
       <span>订单数量:{{ pageParams.total }}</span>
35 36
     </div>
36
-    <el-table v-loading="loading" :data="dataLists" border stripe  @selection-change="handleSelectionChange" row-key="F_Id">
37
-      <el-table-column type="selection" :reserve-selection="true"></el-table-column>
37
+    <el-table v-loading="loading" :data="dataLists" border stripe row-key="F_Id" @selection-change="handleSelectionChange">
38
+      <el-table-column :reserve-selection="true" type="selection"/>
38 39
       <el-table-column type="index" label="编号" align="center" fixed width="80" />
39 40
       <el-table-column prop="F_Id" label="订单编号" align="center" min-width="180" >
40 41
         <template slot-scope="scope">
@@ -44,9 +45,9 @@
44 45
       <el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
45 46
       <el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
46 47
       <el-table-column label="订购商品" align="center" min-width>
47
-      <template slot-scope="scope">
48
-        {{ scope.row.OrderDetailList | judgmentOrderGoods}}
49
-      </template>
48
+        <template slot-scope="scope">
49
+          {{ scope.row.OrderDetailList | judgmentOrderGoods }}
50
+        </template>
50 51
       </el-table-column>
51 52
       <el-table-column prop="F_AddTime" label="下单日期" align="center" />
52 53
       <el-table-column label="订单状态" align="center" >
@@ -72,7 +73,7 @@
72 73
             v-permission="'HY_goback'"
73 74
             type="text"
74 75
             @click="btn_goback(scope.row.F_Id)"
75
-          >客服退回</el-button>
76
+          >退回</el-button>
76 77
         </template>
77 78
       </el-table-column>
78 79
     </el-table>
@@ -89,31 +90,32 @@
89 90
 
90 91
 <script>
91 92
 import { getDictionaryValueList } from '@/api/commonAPI'
92
-import { getOrderListCustomerService, submitOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService"
93
-import { pickerOptions, formatterContent } from "@/utils"
94
-import goback from "./goback"
95
-import importSubmit from "./importSubmit"
96
-import detail from "@/views/orderManagement/orderList/detail"
97
-import Pagination from "@/components/Pagination" // 对el-pagination 二次封装
93
+import { getOrderListCustomerService, submitOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
94
+import { pickerOptions, formatterContent } from '@/utils'
95
+import goback from './goback'
96
+import gobacklast from './gobacklast'
97
+import importSubmit from './importSubmit'
98
+import detail from '@/views/orderManagement/orderList/detail'
99
+import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
98 100
 
99 101
 export default {
100
-  name: "OrderListCustomerService",
102
+  name: 'OrderListCustomerService',
101 103
   components: {
102 104
     Pagination
103 105
   },
104 106
   filters: {
105 107
     judgmentStateName(status) {
106 108
       const statusMap = {
107
-        '0': "未提交",
108
-        '1': "待分仓",
109
-        '2': "已退回",
110
-        '3': "已分仓",
111
-        '4': "无货",
112
-        '5': "仓库待审核",
113
-        '6': "已发货",
114
-        '7': "付款待审核",
115
-        '8': "待分物流",
116
-        '9': "物流未通过",
109
+        '0': '未提交',
110
+        '1': '待分仓',
111
+        '2': '已退回',
112
+        '3': '已分仓',
113
+        '4': '无货',
114
+        '5': '仓库待审核',
115
+        '6': '已发货',
116
+        '7': '付款待审核',
117
+        '8': '待分物流',
118
+        '9': '物流未通过'
117 119
       }
118 120
       return statusMap[status]
119 121
     },
@@ -124,21 +126,21 @@ export default {
124 126
       }
125 127
       orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
126 128
       return orderGoodsNameQuantity
127
-    },
129
+    }
128 130
   },
129 131
   data() {
130 132
     return {
131 133
       loading: false,
132 134
       searchData: {
133
-        adFrom: '', //消息/广告媒体来源
134
-        type: '', //订单类型
135
-        id: '', //订单号
136
-        customer: '', //客户姓名
137
-        customerPhone: '', //客户手机号
138
-        trackingNo: '', //运单号
139
-        searchTime: '', //订单时间
135
+        adFrom: '', // 消息/广告媒体来源
136
+        type: '', // 订单类型
137
+        id: '', // 订单号
138
+        customer: '', // 客户姓名
139
+        customerPhone: '', // 客户手机号
140
+        trackingNo: '', // 运单号
141
+        searchTime: '' // 订单时间
140 142
       },
141
-      activeName: "3", //标签切换首页
143
+      activeName: '3', // 标签切换首页
142 144
       pickerOptions, // 日期数据
143 145
       pageParams: {
144 146
         pageindex: 1, // 当前第几页
@@ -147,58 +149,58 @@ export default {
147 149
       },
148 150
       dataLists: [], // 列表数据
149 151
       multipleSelection: [], // 选中的数据
150
-      orderType: [],//订单类型
151
-      selectOrderId: [], // 选中id
152
-    };
152
+      orderType: [], // 订单类型
153
+      selectOrderId: [] // 选中id
154
+    }
153 155
   },
154 156
   created() {
155 157
     this.getOrderType()
156 158
     this.getList()
157 159
     document.onkeyup = e => {
158 160
       if (e.keyCode === 13) {
159
-        this.getList();
161
+        this.getList()
160 162
       }
161
-    };
163
+    }
162 164
   },
163 165
   methods: {
164 166
     getList() {
165
-      this.loading = true;
167
+      this.loading = true
166 168
       return new Promise(resolve => {
167 169
         const params = {
168
-          F_State: this.activeName, //订单状态 -2全部
170
+          F_State: this.activeName, // 订单状态 -2全部
169 171
           pageindex: this.pageParams.pageindex, // int 第几页
170 172
           pagesize: this.pageParams.pagesize, // int 每页几条信息
171
-          F_ADFrom: this.searchData.adFrom, //消息/广告来源
172
-          F_Type: this.searchData.type, //订单类型
173
-          F_Id: this.searchData.id, //订单号
174
-          F_Customer: this.searchData.customer, //客户姓名
175
-          F_CustomerPhone: this.searchData.customerPhone, //客户手机号
176
-          F_TrackingNo: this.searchData.trackingNo, //运单号
177
-          SearchStartTime: this.searchData.searchTime[0], //添加开始时间
178
-          SearchEndTime: this.searchData.searchTime[1], //添加结束时间
179
-          F_IsExpress: 1, //-2全部 0客服未分配快递 1已分配
180
-          F_PayState: -2, //支付状态-2 全部0待回款 1已完成 2待退款 3已完成
181
-          F_Express: "新乡顺丰",
182
-        };
173
+          F_ADFrom: this.searchData.adFrom, // 消息/广告来源
174
+          F_Type: this.searchData.type, // 订单类型
175
+          F_Id: this.searchData.id, // 订单号
176
+          F_Customer: this.searchData.customer, // 客户姓名
177
+          F_CustomerPhone: this.searchData.customerPhone, // 客户手机号
178
+          F_TrackingNo: this.searchData.trackingNo, // 运单号
179
+          SearchStartTime: this.searchData.searchTime[0], // 添加开始时间
180
+          SearchEndTime: this.searchData.searchTime[1], // 添加结束时间
181
+          F_IsExpress: 1, // -2全部 0客服未分配快递 1已分配
182
+          F_PayState: -2, // 支付状态-2 全部0待回款 1已完成 2待退款 3已完成
183
+          F_Express: '新乡顺丰'
184
+        }
183 185
         getOrderListCustomerService(params).then(response => {
184
-          this.loading = false;
185
-          if (response.state.toLowerCase() === "success") {
186
-            this.pageParams.total = response.data.Totals;
187
-            this.dataLists = response.data.Rows;
186
+          this.loading = false
187
+          if (response.state.toLowerCase() === 'success') {
188
+            this.pageParams.total = response.data.Totals
189
+            this.dataLists = response.data.Rows
188 190
           }
189
-        });
190
-        resolve();
191
-      });
191
+        })
192
+        resolve()
193
+      })
192 194
     },
193 195
     // 获取订单类型
194 196
     getOrderType() {
195
-      return new Promise(resolve=>{
196
-        const params={
197
-          isleaf:true,
198
-          code:'ORDERTYPE'
197
+      return new Promise(resolve => {
198
+        const params = {
199
+          isleaf: true,
200
+          code: 'ORDERTYPE'
199 201
         }
200
-        getDictionaryValueList(params).then(response=>{
201
-          if(response.state.toLowerCase() === 'success'){
202
+        getDictionaryValueList(params).then(response => {
203
+          if (response.state.toLowerCase() === 'success') {
202 204
             this.orderType = response.data.Rows
203 205
           }
204 206
         })
@@ -208,121 +210,142 @@ export default {
208 210
       this.getList()
209 211
     },
210 212
     btn_search() {
211
-      this.pageParams.pageindex = 1;
212
-      this.getList();
213
+      this.pageParams.pageindex = 1
214
+      this.getList()
213 215
     },
214 216
     // 提交
215 217
     btn_submit(orderId) {
216
-      this.isDisable = true;
218
+      this.isDisable = true
217 219
       setTimeout(() => {
218
-        this.$confirm("您确定提交吗?", "提示", {
219
-          confirmButtonText: "确定",
220
-          cancelButtonText: "取消",
221
-          type: "warning",
220
+        this.$confirm('您确定提交吗?', '提示', {
221
+          confirmButtonText: '确定',
222
+          cancelButtonText: '取消',
223
+          type: 'warning'
222 224
         })
223 225
           .then(() => {
224
-            this.isDisable = false;
226
+            this.isDisable = false
225 227
             const data = {
226
-              orderids: orderId,
227
-            };
228
+              orderids: orderId
229
+            }
228 230
             submitOrderCustomerService(data).then((response) => {
229
-              if (response.state.toLowerCase() === "success") {
230
-                this.getList();
231
-                this.$message.success("提交成功!");
231
+              if (response.state.toLowerCase() === 'success') {
232
+                this.getList()
233
+                this.$message.success('提交成功!')
232 234
               }
233
-            });
235
+            })
234 236
           })
235 237
           .catch(() => {
236 238
             this.$message({
237
-              type: "info",
238
-              message: "已取消提交",
239
-            });
240
-          });
241
-        this.isDisable = false;
242
-      }, 300);
239
+              type: 'info',
240
+              message: '已取消提交'
241
+            })
242
+          })
243
+        this.isDisable = false
244
+      }, 300)
243 245
     },
244
-    // 批量退回
245
-    btn_bulk_goback () {
246
+    // 批量退回销售
247
+    btn_bulk_goback() {
246 248
       if (this.selectOrderId.length < 1) {
247 249
         this.$message({
248
-          message: "请选择订单!",
249
-          type: "warning",
250
-        });
251
-        return;
250
+          message: '请选择订单!',
251
+          type: 'warning'
252
+        })
253
+        return
252 254
       }
253
-      let orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
255
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
254 256
       this.$layer.iframe({
255 257
         content: {
256 258
           content: goback, // 传递的组件对象
257 259
           parent: this, // 当前的vue对象
258 260
           data: { rowid: orderids } // props
259 261
         },
260
-        area: ["30%", "30%"],
261
-        title: "退回订单"
262
-      });
262
+        area: ['30%', '30%'],
263
+        title: '退回订单'
264
+      })
263 265
     },
266
+    // 批量退回上一级
267
+    btn_bulk_gobacklast() {
268
+      if (this.selectOrderId.length < 1) {
269
+        this.$message({
270
+          message: '请选择订单!',
271
+          type: 'warning'
272
+        })
273
+        return
274
+      }
275
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
276
+      this.$layer.iframe({
277
+        content: {
278
+          content: gobacklast, // 传递的组件对象
279
+          parent: this, // 当前的vue对象
280
+          data: { rowid: orderids } // props
281
+        },
282
+        area: ['30%', '30%'],
283
+        title: '退回订单'
284
+      })
285
+    },
286
+
264 287
     // 批量提交
265 288
     btn_bulk_submit() {
266 289
       if (this.selectOrderId.length < 1) {
267 290
         this.$message({
268
-          message: "请选择订单!",
269
-          type: "warning",
270
-        });
271
-        return;
291
+          message: '请选择订单!',
292
+          type: 'warning'
293
+        })
294
+        return
272 295
       }
273
-      this.isDisable = true;
296
+      this.isDisable = true
274 297
       setTimeout(() => {
275
-        this.$confirm("您确定提交吗?", "提示", {
276
-          confirmButtonText: "确定",
277
-          cancelButtonText: "取消",
278
-          type: "warning",
298
+        this.$confirm('您确定提交吗?', '提示', {
299
+          confirmButtonText: '确定',
300
+          cancelButtonText: '取消',
301
+          type: 'warning'
279 302
         })
280 303
           .then(() => {
281
-            this.isDisable = false;
304
+            this.isDisable = false
282 305
             const data = {
283
-              orderids: this.selectOrderId.join(',').replace(/\s+/g, ''),
284
-            };
306
+              orderids: this.selectOrderId.join(',').replace(/\s+/g, '')
307
+            }
285 308
             submitOrderCustomerService(data).then((response) => {
286
-              if (response.state.toLowerCase() === "success") {
287
-                this.getList();
288
-                this.$message.success("提交成功!");
309
+              if (response.state.toLowerCase() === 'success') {
310
+                this.getList()
311
+                this.$message.success('提交成功!')
289 312
               }
290
-            });
313
+            })
291 314
           })
292 315
           .catch(() => {
293 316
             this.$message({
294
-              type: "info",
295
-              message: "已取消提交",
296
-            });
297
-          });
298
-        this.isDisable = false;
299
-      }, 300);
317
+              type: 'info',
318
+              message: '已取消提交'
319
+            })
320
+          })
321
+        this.isDisable = false
322
+      }, 300)
300 323
     },
301 324
     // 退回订单
302
-    btn_goback (orderid) {
325
+    btn_goback(orderid) {
303 326
       this.$layer.iframe({
304 327
         content: {
305 328
           content: goback, // 传递的组件对象
306 329
           parent: this, // 当前的vue对象
307 330
           data: { rowid: orderid } // props
308 331
         },
309
-        area: ["30%", "30%"],
310
-        title: "退回订单"
311
-      });
332
+        area: ['30%', '30%'],
333
+        title: '退回订单'
334
+      })
312 335
     },
313
-    //导入附件提交
314
-    btn_import_submit () {
336
+    // 导入附件提交
337
+    btn_import_submit() {
315 338
       this.$layer.iframe({
316 339
         content: {
317 340
           content: importSubmit, // 传递的组件对象
318 341
           parent: this, // 当前的vue对象
319 342
           data: { rowid: '' } // props
320 343
         },
321
-        area: ["30%", "30%"],
322
-        title: "导入附件提交"
323
-      });
344
+        area: ['30%', '30%'],
345
+        title: '导入附件提交'
346
+      })
324 347
     },
325
-    hadndleOrderCode(ordercode){
348
+    hadndleOrderCode(ordercode) {
326 349
       this.$layer.iframe({
327 350
         content: {
328 351
           content: detail, // 传递的组件对象
@@ -333,17 +356,17 @@ export default {
333 356
         title: '订单详情'
334 357
       })
335 358
     },
336
-    //选择多个
359
+    // 选择多个
337 360
     handleSelectionChange(val) {
338 361
       const ids = []
339 362
       this.multipleSelection = val
340
-      for (let i=0; i<this.multipleSelection.length; i++) {
363
+      for (let i = 0; i < this.multipleSelection.length; i++) {
341 364
         ids.push(this.multipleSelection[i].F_Id)
342 365
       }
343 366
       this.selectOrderId = ids
344
-    }, 
367
+    }
345 368
   }
346
-};
369
+}
347 370
 </script>
348 371
 
349 372
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 30 - 21
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceYuantong/goback.vue

@@ -8,13 +8,14 @@
8 8
           filterable
9 9
           clearable
10 10
           placeholder="请选择退回"
11
+          @change="selectback"
11 12
         >
12 13
           <el-option label="退回上一级" value="0" />
13 14
           <el-option label="退回销售" value="1" />
14 15
         </el-select>
15 16
       </el-form-item>
16
-      <el-form-item label="退回原因">
17
-        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"></el-input>
17
+      <el-form-item v-show="ishow" label="退回原因">
18
+        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"/>
18 19
       </el-form-item>
19 20
       <el-form-item>
20 21
         <el-button type="primary" @click="submitForm()">提交</el-button>
@@ -23,24 +24,25 @@
23 24
   </div>
24 25
 </template>
25 26
 <script>
26
-import { gobackOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService";
27
+import { gobackOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
27 28
 export default {
28 29
   props: {
29 30
     rowid: {
30 31
       type: String,
31
-      default: "",
32
+      default: ''
32 33
     },
33 34
     layerid: {
34 35
       type: String,
35
-      default: "",
36
-    },
36
+      default: ''
37
+    }
37 38
   },
38 39
   data() {
39 40
     return {
41
+      ishow: true, // 原因显隐
40 42
       ruleForm: {
41
-        orderids: "", //订单编号
42
-        remark: "", //备注
43
-        state: ""
43
+        orderids: '', // 订单编号
44
+        remark: '', // 备注
45
+        state: ''
44 46
       },
45 47
       rules: {
46 48
         state: [
@@ -49,13 +51,13 @@ export default {
49 51
             trigger: 'change',
50 52
             message: '请选择退回'
51 53
           }
52
-        ],
54
+        ]
53 55
       }
54
-    };
56
+    }
55 57
   },
56 58
   created() {
57 59
     if (this.rowid) {
58
-      this.ruleForm.orderids = this.rowid;
60
+      this.ruleForm.orderids = this.rowid
59 61
     }
60 62
   },
61 63
   methods: {
@@ -64,23 +66,30 @@ export default {
64 66
         if (valid) {
65 67
           gobackOrderCustomerService(this.ruleForm)
66 68
             .then((response) => {
67
-              if (response.state.toLowerCase() === "success") {
68
-                this.$parent.$layer.close(this.layerid);
69
-                this.$parent.getList(); // 重新加载父级数据
70
-                this.$message.success("恭喜你,订单信息退回成功!");
69
+              if (response.state.toLowerCase() === 'success') {
70
+                this.$parent.$layer.close(this.layerid)
71
+                this.$parent.getList() // 重新加载父级数据
72
+                this.$message.success('恭喜你,订单信息退回成功!')
71 73
               }
72 74
             })
73 75
             .catch(() => {
74
-              this.loading = false;
75
-            });
76
+              this.loading = false
77
+            })
76 78
         }
77 79
       })
78 80
     },
79
-  },
80
-};
81
+    selectback(e) {
82
+      if (e === '0') {
83
+        this.ishow = false
84
+      } else {
85
+        this.ishow = true
86
+      }
87
+    }
88
+  }
89
+}
81 90
 </script>
82 91
 <style lang="scss" scoped>
83 92
 .form_select {
84 93
   width: 100%
85 94
 }
86
-</style>
95
+</style>

+ 59 - 0
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceYuantong/gobacklast.vue

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

+ 152 - 130
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceYuantong/index.vue

@@ -24,17 +24,18 @@
24 24
       <el-input v-model="searchData.trackingNo" placeholder="请输入运单号" class="filter-item" />
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_bulk_submit'" type="primary" class="filter-item" @click="btn_bulk_submit">批量提交</el-button>
27
-      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回</el-button>
27
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回销售</el-button>
28
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_gobacklast">批量退回上一级</el-button>
28 29
       <el-button v-permission="'HY_import_submit'" type="primary" class="filter-item" @click="btn_import_submit">导入附件提交</el-button>
29 30
     </div>
30 31
     <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick" >
31
-      <el-tab-pane label="全部" name="3"></el-tab-pane>
32
+      <el-tab-pane label="全部" name="3"/>
32 33
     </el-tabs>
33 34
     <div>
34 35
       <span>订单数量:{{ pageParams.total }}</span>
35 36
     </div>
36
-    <el-table v-loading="loading" :data="dataLists" border stripe  @selection-change="handleSelectionChange" row-key="F_Id">
37
-      <el-table-column type="selection" :reserve-selection="true"></el-table-column>
37
+    <el-table v-loading="loading" :data="dataLists" border stripe row-key="F_Id" @selection-change="handleSelectionChange">
38
+      <el-table-column :reserve-selection="true" type="selection"/>
38 39
       <el-table-column type="index" label="编号" align="center" fixed width="80" />
39 40
       <el-table-column prop="F_Id" label="订单编号" align="center" min-width="180" >
40 41
         <template slot-scope="scope">
@@ -44,9 +45,9 @@
44 45
       <el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
45 46
       <el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
46 47
       <el-table-column label="订购商品" align="center" min-width>
47
-      <template slot-scope="scope">
48
-        {{ scope.row.OrderDetailList | judgmentOrderGoods}}
49
-      </template>
48
+        <template slot-scope="scope">
49
+          {{ scope.row.OrderDetailList | judgmentOrderGoods }}
50
+        </template>
50 51
       </el-table-column>
51 52
       <el-table-column prop="F_AddTime" label="下单日期" align="center" />
52 53
       <el-table-column label="订单状态" align="center" >
@@ -89,31 +90,32 @@
89 90
 
90 91
 <script>
91 92
 import { getDictionaryValueList } from '@/api/commonAPI'
92
-import { getOrderListCustomerService, submitOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService"
93
-import { pickerOptions, formatterContent } from "@/utils"
94
-import goback from "./goback"
95
-import importSubmit from "./importSubmit"
96
-import detail from "@/views/orderManagement/orderList/detail"
97
-import Pagination from "@/components/Pagination"; // 对el-pagination 二次封装
93
+import { getOrderListCustomerService, submitOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
94
+import { pickerOptions, formatterContent } from '@/utils'
95
+import goback from './goback'
96
+import gobacklast from './gobacklast'
97
+import importSubmit from './importSubmit'
98
+import detail from '@/views/orderManagement/orderList/detail'
99
+import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
98 100
 
99 101
 export default {
100
-  name: "OrderListCustomerService",
102
+  name: 'OrderListCustomerService',
101 103
   components: {
102 104
     Pagination
103 105
   },
104 106
   filters: {
105 107
     judgmentStateName(status) {
106 108
       const statusMap = {
107
-        '0': "未提交",
108
-        '1': "待分仓",
109
-        '2': "已退回",
110
-        '3': "已分仓",
111
-        '4': "无货",
112
-        '5': "仓库待审核",
113
-        '6': "已发货",
114
-        '7': "付款待审核",
115
-        '8': "待分物流",
116
-        '9': "物流未通过",
109
+        '0': '未提交',
110
+        '1': '待分仓',
111
+        '2': '已退回',
112
+        '3': '已分仓',
113
+        '4': '无货',
114
+        '5': '仓库待审核',
115
+        '6': '已发货',
116
+        '7': '付款待审核',
117
+        '8': '待分物流',
118
+        '9': '物流未通过'
117 119
       }
118 120
       return statusMap[status]
119 121
     },
@@ -124,21 +126,21 @@ export default {
124 126
       }
125 127
       orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
126 128
       return orderGoodsNameQuantity
127
-    },
129
+    }
128 130
   },
129 131
   data() {
130 132
     return {
131 133
       loading: false,
132 134
       searchData: {
133
-        adFrom: '', //消息/广告媒体来源
134
-        type: '', //订单类型
135
-        id: '', //订单号
136
-        customer: '', //客户姓名
137
-        customerPhone: '', //客户手机号
138
-        trackingNo: '', //运单号
139
-        searchTime: '', //订单时间
135
+        adFrom: '', // 消息/广告媒体来源
136
+        type: '', // 订单类型
137
+        id: '', // 订单号
138
+        customer: '', // 客户姓名
139
+        customerPhone: '', // 客户手机号
140
+        trackingNo: '', // 运单号
141
+        searchTime: '' // 订单时间
140 142
       },
141
-      activeName: "3", //标签切换首页
143
+      activeName: '3', // 标签切换首页
142 144
       pickerOptions, // 日期数据
143 145
       pageParams: {
144 146
         pageindex: 1, // 当前第几页
@@ -147,58 +149,58 @@ export default {
147 149
       },
148 150
       dataLists: [], // 列表数据
149 151
       multipleSelection: [], // 选中的数据
150
-      orderType: [],//订单类型
151
-      selectOrderId: [], //批量物流id
152
-    };
152
+      orderType: [], // 订单类型
153
+      selectOrderId: [] // 批量物流id
154
+    }
153 155
   },
154 156
   created() {
155 157
     this.getOrderType()
156 158
     this.getList()
157 159
     document.onkeyup = e => {
158 160
       if (e.keyCode === 13) {
159
-        this.getList();
161
+        this.getList()
160 162
       }
161
-    };
163
+    }
162 164
   },
163 165
   methods: {
164 166
     getList() {
165
-      this.loading = true;
167
+      this.loading = true
166 168
       return new Promise(resolve => {
167 169
         const params = {
168
-          F_State: this.activeName, //订单状态 -2全部
170
+          F_State: this.activeName, // 订单状态 -2全部
169 171
           pageindex: 1, // int 第几页
170 172
           pagesize: 1000000, // int 每页几条信息
171
-          F_ADFrom: this.searchData.adFrom, //消息/广告来源
172
-          F_Type: this.searchData.type, //订单类型
173
-          F_Id: this.searchData.id, //订单号
174
-          F_Customer: this.searchData.customer, //客户姓名
175
-          F_CustomerPhone: this.searchData.customerPhone, //客户手机号
176
-          F_TrackingNo: this.searchData.trackingNo, //运单号
177
-          SearchStartTime: this.searchData.searchTime[0], //添加开始时间
178
-          SearchEndTime: this.searchData.searchTime[1], //添加结束时间
179
-          F_IsExpress: 1, //-2全部 0客服未分配快递 1已分配
180
-          F_PayState: -2, //支付状态-2 全部0待回款 1已完成 2待退款 3已完成
181
-          F_Express: "圆通快递",
182
-        };
173
+          F_ADFrom: this.searchData.adFrom, // 消息/广告来源
174
+          F_Type: this.searchData.type, // 订单类型
175
+          F_Id: this.searchData.id, // 订单号
176
+          F_Customer: this.searchData.customer, // 客户姓名
177
+          F_CustomerPhone: this.searchData.customerPhone, // 客户手机号
178
+          F_TrackingNo: this.searchData.trackingNo, // 运单号
179
+          SearchStartTime: this.searchData.searchTime[0], // 添加开始时间
180
+          SearchEndTime: this.searchData.searchTime[1], // 添加结束时间
181
+          F_IsExpress: 1, // -2全部 0客服未分配快递 1已分配
182
+          F_PayState: -2, // 支付状态-2 全部0待回款 1已完成 2待退款 3已完成
183
+          F_Express: '圆通快递'
184
+        }
183 185
         getOrderListCustomerService(params).then(response => {
184
-          this.loading = false;
185
-          if (response.state.toLowerCase() === "success") {
186
-            this.pageParams.total = response.data.Totals;
187
-            this.dataLists = response.data.Rows;
186
+          this.loading = false
187
+          if (response.state.toLowerCase() === 'success') {
188
+            this.pageParams.total = response.data.Totals
189
+            this.dataLists = response.data.Rows
188 190
           }
189
-        });
190
-        resolve();
191
-      });
191
+        })
192
+        resolve()
193
+      })
192 194
     },
193 195
     // 获取订单类型
194 196
     getOrderType() {
195
-      return new Promise(resolve=>{
196
-        const params={
197
-          isleaf:true,
198
-          code:'ORDERTYPE'
197
+      return new Promise(resolve => {
198
+        const params = {
199
+          isleaf: true,
200
+          code: 'ORDERTYPE'
199 201
         }
200
-        getDictionaryValueList(params).then(response=>{
201
-          if(response.state.toLowerCase() === 'success'){
202
+        getDictionaryValueList(params).then(response => {
203
+          if (response.state.toLowerCase() === 'success') {
202 204
             this.orderType = response.data.Rows
203 205
           }
204 206
         })
@@ -208,121 +210,141 @@ export default {
208 210
       this.getList()
209 211
     },
210 212
     btn_search() {
211
-      this.pageParams.pageindex = 1;
212
-      this.getList();
213
+      this.pageParams.pageindex = 1
214
+      this.getList()
213 215
     },
214 216
     // 提交
215 217
     btn_submit(orderId) {
216
-      this.isDisable = true;
218
+      this.isDisable = true
217 219
       setTimeout(() => {
218
-        this.$confirm("您确定提交吗?", "提示", {
219
-          confirmButtonText: "确定",
220
-          cancelButtonText: "取消",
221
-          type: "warning",
220
+        this.$confirm('您确定提交吗?', '提示', {
221
+          confirmButtonText: '确定',
222
+          cancelButtonText: '取消',
223
+          type: 'warning'
222 224
         })
223 225
           .then(() => {
224
-            this.isDisable = false;
226
+            this.isDisable = false
225 227
             const data = {
226
-              orderids: orderId,
227
-            };
228
+              orderids: orderId
229
+            }
228 230
             submitOrderCustomerService(data).then((response) => {
229
-              if (response.state.toLowerCase() === "success") {
230
-                this.getList();
231
-                this.$message.success("提交成功!");
231
+              if (response.state.toLowerCase() === 'success') {
232
+                this.getList()
233
+                this.$message.success('提交成功!')
232 234
               }
233
-            });
235
+            })
234 236
           })
235 237
           .catch(() => {
236 238
             this.$message({
237
-              type: "info",
238
-              message: "已取消提交",
239
-            });
240
-          });
241
-        this.isDisable = false;
242
-      }, 300);
239
+              type: 'info',
240
+              message: '已取消提交'
241
+            })
242
+          })
243
+        this.isDisable = false
244
+      }, 300)
243 245
     },
244 246
     // 批量退回
245
-    btn_bulk_goback () {
247
+    btn_bulk_goback() {
246 248
       if (this.selectOrderId.length < 1) {
247 249
         this.$message({
248
-          message: "请选择订单!",
249
-          type: "warning",
250
-        });
251
-        return;
250
+          message: '请选择订单!',
251
+          type: 'warning'
252
+        })
253
+        return
252 254
       }
253
-      let orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
255
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
254 256
       this.$layer.iframe({
255 257
         content: {
256 258
           content: goback, // 传递的组件对象
257 259
           parent: this, // 当前的vue对象
258 260
           data: { rowid: orderids } // props
259 261
         },
260
-        area: ["30%", "30%"],
261
-        title: "退回订单"
262
-      });
262
+        area: ['30%', '30%'],
263
+        title: '退回订单'
264
+      })
265
+    },
266
+    // 批量退回上一级
267
+    btn_bulk_gobacklast() {
268
+      if (this.selectOrderId.length < 1) {
269
+        this.$message({
270
+          message: '请选择订单!',
271
+          type: 'warning'
272
+        })
273
+        return
274
+      }
275
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
276
+      this.$layer.iframe({
277
+        content: {
278
+          content: gobacklast, // 传递的组件对象
279
+          parent: this, // 当前的vue对象
280
+          data: { rowid: orderids } // props
281
+        },
282
+        area: ['30%', '30%'],
283
+        title: '退回订单'
284
+      })
263 285
     },
264 286
     // 批量提交
265 287
     btn_bulk_submit() {
266 288
       if (this.selectOrderId.length < 1) {
267 289
         this.$message({
268
-          message: "请选择订单!",
269
-          type: "warning",
270
-        });
271
-        return;
290
+          message: '请选择订单!',
291
+          type: 'warning'
292
+        })
293
+        return
272 294
       }
273
-      this.isDisable = true;
295
+      this.isDisable = true
274 296
       setTimeout(() => {
275
-        this.$confirm("您确定提交吗?", "提示", {
276
-          confirmButtonText: "确定",
277
-          cancelButtonText: "取消",
278
-          type: "warning",
297
+        this.$confirm('您确定提交吗?', '提示', {
298
+          confirmButtonText: '确定',
299
+          cancelButtonText: '取消',
300
+          type: 'warning'
279 301
         })
280 302
           .then(() => {
281
-            this.isDisable = false;
303
+            this.isDisable = false
282 304
             const data = {
283
-              orderids: this.selectOrderId.join(',').replace(/\s+/g, ''),
284
-            };
305
+              orderids: this.selectOrderId.join(',').replace(/\s+/g, '')
306
+            }
285 307
             submitOrderCustomerService(data).then((response) => {
286
-              if (response.state.toLowerCase() === "success") {
287
-                this.getList();
288
-                this.$message.success("提交成功!");
308
+              if (response.state.toLowerCase() === 'success') {
309
+                this.getList()
310
+                this.$message.success('提交成功!')
289 311
               }
290
-            });
312
+            })
291 313
           })
292 314
           .catch(() => {
293 315
             this.$message({
294
-              type: "info",
295
-              message: "已取消提交",
296
-            });
297
-          });
298
-        this.isDisable = false;
299
-      }, 300);
316
+              type: 'info',
317
+              message: '已取消提交'
318
+            })
319
+          })
320
+        this.isDisable = false
321
+      }, 300)
300 322
     },
301 323
     // 退回订单
302
-    btn_goback (orderid) {
324
+    btn_goback(orderid) {
303 325
       this.$layer.iframe({
304 326
         content: {
305 327
           content: goback, // 传递的组件对象
306 328
           parent: this, // 当前的vue对象
307 329
           data: { rowid: orderid } // props
308 330
         },
309
-        area: ["30%", "30%"],
310
-        title: "退回订单"
311
-      });
331
+        area: ['30%', '30%'],
332
+        title: '退回订单'
333
+      })
312 334
     },
313
-    //导入附件提交
314
-    btn_import_submit () {
335
+    // 导入附件提交
336
+    btn_import_submit() {
315 337
       this.$layer.iframe({
316 338
         content: {
317 339
           content: importSubmit, // 传递的组件对象
318 340
           parent: this, // 当前的vue对象
319 341
           data: { rowid: '' } // props
320 342
         },
321
-        area: ["30%", "30%"],
322
-        title: "导入附件提交"
323
-      });
343
+        area: ['30%', '30%'],
344
+        title: '导入附件提交'
345
+      })
324 346
     },
325
-    hadndleOrderCode(ordercode){
347
+    hadndleOrderCode(ordercode) {
326 348
       this.$layer.iframe({
327 349
         content: {
328 350
           content: detail, // 传递的组件对象
@@ -333,17 +355,17 @@ export default {
333 355
         title: '订单详情'
334 356
       })
335 357
     },
336
-    //选择多个
358
+    // 选择多个
337 359
     handleSelectionChange(val) {
338 360
       const ids = []
339 361
       this.multipleSelection = val
340
-      for (let i=0; i<this.multipleSelection.length; i++) {
362
+      for (let i = 0; i < this.multipleSelection.length; i++) {
341 363
         ids.push(this.multipleSelection[i].F_Id)
342 364
       }
343 365
       this.selectOrderId = ids
344
-    }, 
366
+    }
345 367
   }
346
-};
368
+}
347 369
 </script>
348 370
 
349 371
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 30 - 21
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceZhongtong/goback.vue

@@ -8,13 +8,14 @@
8 8
           filterable
9 9
           clearable
10 10
           placeholder="请选择退回"
11
+          @change="selectback"
11 12
         >
12 13
           <el-option label="退回上一级" value="0" />
13 14
           <el-option label="退回销售" value="1" />
14 15
         </el-select>
15 16
       </el-form-item>
16
-      <el-form-item label="退回原因">
17
-        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"></el-input>
17
+      <el-form-item v-show="ishow" label="退回原因">
18
+        <el-input v-model="ruleForm.remark" type="textarea" placeholder="退回原因"/>
18 19
       </el-form-item>
19 20
       <el-form-item>
20 21
         <el-button type="primary" @click="submitForm()">提交</el-button>
@@ -23,24 +24,25 @@
23 24
   </div>
24 25
 </template>
25 26
 <script>
26
-import { gobackOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService";
27
+import { gobackOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
27 28
 export default {
28 29
   props: {
29 30
     rowid: {
30 31
       type: String,
31
-      default: "",
32
+      default: ''
32 33
     },
33 34
     layerid: {
34 35
       type: String,
35
-      default: "",
36
-    },
36
+      default: ''
37
+    }
37 38
   },
38 39
   data() {
39 40
     return {
41
+      ishow: true, // 原因显隐
40 42
       ruleForm: {
41
-        orderids: "", //订单编号
42
-        remark: "", //备注
43
-        state: ""
43
+        orderids: '', // 订单编号
44
+        remark: '', // 备注
45
+        state: ''
44 46
       },
45 47
       rules: {
46 48
         state: [
@@ -49,13 +51,13 @@ export default {
49 51
             trigger: 'change',
50 52
             message: '请选择退回'
51 53
           }
52
-        ],
54
+        ]
53 55
       }
54
-    };
56
+    }
55 57
   },
56 58
   created() {
57 59
     if (this.rowid) {
58
-      this.ruleForm.orderids = this.rowid;
60
+      this.ruleForm.orderids = this.rowid
59 61
     }
60 62
   },
61 63
   methods: {
@@ -64,23 +66,30 @@ export default {
64 66
         if (valid) {
65 67
           gobackOrderCustomerService(this.ruleForm)
66 68
             .then((response) => {
67
-              if (response.state.toLowerCase() === "success") {
68
-                this.$parent.$layer.close(this.layerid);
69
-                this.$parent.getList(); // 重新加载父级数据
70
-                this.$message.success("恭喜你,订单信息退回成功!");
69
+              if (response.state.toLowerCase() === 'success') {
70
+                this.$parent.$layer.close(this.layerid)
71
+                this.$parent.getList() // 重新加载父级数据
72
+                this.$message.success('恭喜你,订单信息退回成功!')
71 73
               }
72 74
             })
73 75
             .catch(() => {
74
-              this.loading = false;
75
-            });
76
+              this.loading = false
77
+            })
76 78
         }
77 79
       })
78 80
     },
79
-  },
80
-};
81
+    selectback(e) {
82
+      if (e === '0') {
83
+        this.ishow = false
84
+      } else {
85
+        this.ishow = true
86
+      }
87
+    }
88
+  }
89
+}
81 90
 </script>
82 91
 <style lang="scss" scoped>
83 92
 .form_select {
84 93
   width: 100%
85 94
 }
86
-</style>
95
+</style>

+ 59 - 0
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceZhongtong/gobacklast.vue

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

+ 152 - 130
CallCenterWeb.UI/src/views/customerServiceManagement/orderListCustomerServiceZhongtong/index.vue

@@ -24,17 +24,18 @@
24 24
       <el-input v-model="searchData.trackingNo" placeholder="请输入运单号" class="filter-item" />
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_bulk_submit'" type="primary" class="filter-item" @click="btn_bulk_submit">批量提交</el-button>
27
-      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回</el-button>
27
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回销售</el-button>
28
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_gobacklast">批量退回上一级</el-button>
28 29
       <el-button v-permission="'HY_import_submit'" type="primary" class="filter-item" @click="btn_import_submit">导入附件提交</el-button>
29 30
     </div>
30 31
     <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick" >
31
-      <el-tab-pane label="全部" name="3"></el-tab-pane>
32
+      <el-tab-pane label="全部" name="3"/>
32 33
     </el-tabs>
33 34
     <div>
34 35
       <span>订单数量:{{ pageParams.total }}</span>
35 36
     </div>
36
-    <el-table v-loading="loading" :data="dataLists" border stripe  @selection-change="handleSelectionChange" row-key="F_Id">
37
-      <el-table-column type="selection" :reserve-selection="true"></el-table-column>
37
+    <el-table v-loading="loading" :data="dataLists" border stripe row-key="F_Id" @selection-change="handleSelectionChange">
38
+      <el-table-column :reserve-selection="true" type="selection"/>
38 39
       <el-table-column type="index" label="编号" align="center" fixed width="80" />
39 40
       <el-table-column prop="F_Id" label="订单编号" align="center" min-width="180" >
40 41
         <template slot-scope="scope">
@@ -44,9 +45,9 @@
44 45
       <el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
45 46
       <el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
46 47
       <el-table-column label="订购商品" align="center" min-width>
47
-      <template slot-scope="scope">
48
-        {{ scope.row.OrderDetailList | judgmentOrderGoods}}
49
-      </template>
48
+        <template slot-scope="scope">
49
+          {{ scope.row.OrderDetailList | judgmentOrderGoods }}
50
+        </template>
50 51
       </el-table-column>
51 52
       <el-table-column prop="F_AddTime" label="下单日期" align="center" />
52 53
       <el-table-column label="订单状态" align="center" >
@@ -89,31 +90,32 @@
89 90
 
90 91
 <script>
91 92
 import { getDictionaryValueList } from '@/api/commonAPI'
92
-import { getOrderListCustomerService, submitOrderCustomerService } from "@/api/customerServiceManagement/orderListCustomerService"
93
-import { pickerOptions, formatterContent } from "@/utils"
94
-import goback from "./goback"
95
-import importSubmit from "./importSubmit"
96
-import detail from "@/views/orderManagement/orderList/detail"
97
-import Pagination from "@/components/Pagination" // 对el-pagination 二次封装
93
+import { getOrderListCustomerService, submitOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
94
+import { pickerOptions, formatterContent } from '@/utils'
95
+import goback from './goback'
96
+import gobacklast from './gobacklast'
97
+import importSubmit from './importSubmit'
98
+import detail from '@/views/orderManagement/orderList/detail'
99
+import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
98 100
 
99 101
 export default {
100
-  name: "OrderListCustomerService",
102
+  name: 'OrderListCustomerService',
101 103
   components: {
102 104
     Pagination
103 105
   },
104 106
   filters: {
105 107
     judgmentStateName(status) {
106 108
       const statusMap = {
107
-        '0': "未提交",
108
-        '1': "待分仓",
109
-        '2': "已退回",
110
-        '3': "已分仓",
111
-        '4': "无货",
112
-        '5': "仓库待审核",
113
-        '6': "已发货",
114
-        '7': "付款待审核",
115
-        '8': "待分物流",
116
-        '9': "物流未通过",
109
+        '0': '未提交',
110
+        '1': '待分仓',
111
+        '2': '已退回',
112
+        '3': '已分仓',
113
+        '4': '无货',
114
+        '5': '仓库待审核',
115
+        '6': '已发货',
116
+        '7': '付款待审核',
117
+        '8': '待分物流',
118
+        '9': '物流未通过'
117 119
       }
118 120
       return statusMap[status]
119 121
     },
@@ -124,21 +126,21 @@ export default {
124 126
       }
125 127
       orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
126 128
       return orderGoodsNameQuantity
127
-    },
129
+    }
128 130
   },
129 131
   data() {
130 132
     return {
131 133
       loading: false,
132 134
       searchData: {
133
-        adFrom: '', //消息/广告媒体来源
134
-        type: '', //订单类型
135
-        id: '', //订单号
136
-        customer: '', //客户姓名
137
-        customerPhone: '', //客户手机号
138
-        trackingNo: '', //运单号
139
-        searchTime: '', //订单时间
135
+        adFrom: '', // 消息/广告媒体来源
136
+        type: '', // 订单类型
137
+        id: '', // 订单号
138
+        customer: '', // 客户姓名
139
+        customerPhone: '', // 客户手机号
140
+        trackingNo: '', // 运单号
141
+        searchTime: '' // 订单时间
140 142
       },
141
-      activeName: "3", //标签切换首页
143
+      activeName: '3', // 标签切换首页
142 144
       pickerOptions, // 日期数据
143 145
       pageParams: {
144 146
         pageindex: 1, // 当前第几页
@@ -147,58 +149,58 @@ export default {
147 149
       },
148 150
       dataLists: [], // 列表数据
149 151
       multipleSelection: [], // 选中的数据
150
-      orderType: [],//订单类型
151
-      selectOrderId: [], //批量物流id
152
-    };
152
+      orderType: [], // 订单类型
153
+      selectOrderId: [] // 批量物流id
154
+    }
153 155
   },
154 156
   created() {
155 157
     this.getOrderType()
156 158
     this.getList()
157 159
     document.onkeyup = e => {
158 160
       if (e.keyCode === 13) {
159
-        this.getList();
161
+        this.getList()
160 162
       }
161
-    };
163
+    }
162 164
   },
163 165
   methods: {
164 166
     getList() {
165
-      this.loading = true;
167
+      this.loading = true
166 168
       return new Promise(resolve => {
167 169
         const params = {
168
-          F_State: this.activeName, //订单状态 -2全部
170
+          F_State: this.activeName, // 订单状态 -2全部
169 171
           pageindex: 1, // int 第几页
170 172
           pagesize: 1000000, // int 每页几条信息
171
-          F_ADFrom: this.searchData.adFrom, //消息/广告来源
172
-          F_Type: this.searchData.type, //订单类型
173
-          F_Id: this.searchData.id, //订单号
174
-          F_Customer: this.searchData.customer, //客户姓名
175
-          F_CustomerPhone: this.searchData.customerPhone, //客户手机号
176
-          F_TrackingNo: this.searchData.trackingNo, //运单号
177
-          SearchStartTime: this.searchData.searchTime[0], //添加开始时间
178
-          SearchEndTime: this.searchData.searchTime[1], //添加结束时间
179
-          F_IsExpress: 1, //-2全部 0客服未分配快递 1已分配
180
-          F_PayState: -2, //支付状态-2 全部0待回款 1已完成 2待退款 3已完成
181
-          F_Express: "中通快递",
182
-        };
173
+          F_ADFrom: this.searchData.adFrom, // 消息/广告来源
174
+          F_Type: this.searchData.type, // 订单类型
175
+          F_Id: this.searchData.id, // 订单号
176
+          F_Customer: this.searchData.customer, // 客户姓名
177
+          F_CustomerPhone: this.searchData.customerPhone, // 客户手机号
178
+          F_TrackingNo: this.searchData.trackingNo, // 运单号
179
+          SearchStartTime: this.searchData.searchTime[0], // 添加开始时间
180
+          SearchEndTime: this.searchData.searchTime[1], // 添加结束时间
181
+          F_IsExpress: 1, // -2全部 0客服未分配快递 1已分配
182
+          F_PayState: -2, // 支付状态-2 全部0待回款 1已完成 2待退款 3已完成
183
+          F_Express: '中通快递'
184
+        }
183 185
         getOrderListCustomerService(params).then(response => {
184
-          this.loading = false;
185
-          if (response.state.toLowerCase() === "success") {
186
-            this.pageParams.total = response.data.Totals;
187
-            this.dataLists = response.data.Rows;
186
+          this.loading = false
187
+          if (response.state.toLowerCase() === 'success') {
188
+            this.pageParams.total = response.data.Totals
189
+            this.dataLists = response.data.Rows
188 190
           }
189
-        });
190
-        resolve();
191
-      });
191
+        })
192
+        resolve()
193
+      })
192 194
     },
193 195
     // 获取订单类型
194 196
     getOrderType() {
195
-      return new Promise(resolve=>{
196
-        const params={
197
-          isleaf:true,
198
-          code:'ORDERTYPE'
197
+      return new Promise(resolve => {
198
+        const params = {
199
+          isleaf: true,
200
+          code: 'ORDERTYPE'
199 201
         }
200
-        getDictionaryValueList(params).then(response=>{
201
-          if(response.state.toLowerCase() === 'success'){
202
+        getDictionaryValueList(params).then(response => {
203
+          if (response.state.toLowerCase() === 'success') {
202 204
             this.orderType = response.data.Rows
203 205
           }
204 206
         })
@@ -208,121 +210,141 @@ export default {
208 210
       this.getList()
209 211
     },
210 212
     btn_search() {
211
-      this.pageParams.pageindex = 1;
212
-      this.getList();
213
+      this.pageParams.pageindex = 1
214
+      this.getList()
213 215
     },
214 216
     // 提交
215 217
     btn_submit(orderId) {
216
-      this.isDisable = true;
218
+      this.isDisable = true
217 219
       setTimeout(() => {
218
-        this.$confirm("您确定提交吗?", "提示", {
219
-          confirmButtonText: "确定",
220
-          cancelButtonText: "取消",
221
-          type: "warning",
220
+        this.$confirm('您确定提交吗?', '提示', {
221
+          confirmButtonText: '确定',
222
+          cancelButtonText: '取消',
223
+          type: 'warning'
222 224
         })
223 225
           .then(() => {
224
-            this.isDisable = false;
226
+            this.isDisable = false
225 227
             const data = {
226
-              orderids: orderId,
227
-            };
228
+              orderids: orderId
229
+            }
228 230
             submitOrderCustomerService(data).then((response) => {
229
-              if (response.state.toLowerCase() === "success") {
230
-                this.getList();
231
-                this.$message.success("提交成功!");
231
+              if (response.state.toLowerCase() === 'success') {
232
+                this.getList()
233
+                this.$message.success('提交成功!')
232 234
               }
233
-            });
235
+            })
234 236
           })
235 237
           .catch(() => {
236 238
             this.$message({
237
-              type: "info",
238
-              message: "已取消提交",
239
-            });
240
-          });
241
-        this.isDisable = false;
242
-      }, 300);
239
+              type: 'info',
240
+              message: '已取消提交'
241
+            })
242
+          })
243
+        this.isDisable = false
244
+      }, 300)
243 245
     },
244 246
     // 批量退回
245
-    btn_bulk_goback () {
247
+    btn_bulk_goback() {
246 248
       if (this.selectOrderId.length < 1) {
247 249
         this.$message({
248
-          message: "请选择订单!",
249
-          type: "warning",
250
-        });
251
-        return;
250
+          message: '请选择订单!',
251
+          type: 'warning'
252
+        })
253
+        return
252 254
       }
253
-      let orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
255
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
254 256
       this.$layer.iframe({
255 257
         content: {
256 258
           content: goback, // 传递的组件对象
257 259
           parent: this, // 当前的vue对象
258 260
           data: { rowid: orderids } // props
259 261
         },
260
-        area: ["30%", "30%"],
261
-        title: "退回订单"
262
-      });
262
+        area: ['30%', '30%'],
263
+        title: '退回订单'
264
+      })
265
+    },
266
+    // 批量退回上一级
267
+    btn_bulk_gobacklast() {
268
+      if (this.selectOrderId.length < 1) {
269
+        this.$message({
270
+          message: '请选择订单!',
271
+          type: 'warning'
272
+        })
273
+        return
274
+      }
275
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
276
+      this.$layer.iframe({
277
+        content: {
278
+          content: gobacklast, // 传递的组件对象
279
+          parent: this, // 当前的vue对象
280
+          data: { rowid: orderids } // props
281
+        },
282
+        area: ['30%', '30%'],
283
+        title: '退回订单'
284
+      })
263 285
     },
264 286
     // 批量提交
265 287
     btn_bulk_submit() {
266 288
       if (this.selectOrderId.length < 1) {
267 289
         this.$message({
268
-          message: "请选择订单!",
269
-          type: "warning",
270
-        });
271
-        return;
290
+          message: '请选择订单!',
291
+          type: 'warning'
292
+        })
293
+        return
272 294
       }
273
-      this.isDisable = true;
295
+      this.isDisable = true
274 296
       setTimeout(() => {
275
-        this.$confirm("您确定提交吗?", "提示", {
276
-          confirmButtonText: "确定",
277
-          cancelButtonText: "取消",
278
-          type: "warning",
297
+        this.$confirm('您确定提交吗?', '提示', {
298
+          confirmButtonText: '确定',
299
+          cancelButtonText: '取消',
300
+          type: 'warning'
279 301
         })
280 302
           .then(() => {
281
-            this.isDisable = false;
303
+            this.isDisable = false
282 304
             const data = {
283
-              orderids: this.selectOrderId.join(',').replace(/\s+/g, ''),
284
-            };
305
+              orderids: this.selectOrderId.join(',').replace(/\s+/g, '')
306
+            }
285 307
             submitOrderCustomerService(data).then((response) => {
286
-              if (response.state.toLowerCase() === "success") {
287
-                this.getList();
288
-                this.$message.success("提交成功!");
308
+              if (response.state.toLowerCase() === 'success') {
309
+                this.getList()
310
+                this.$message.success('提交成功!')
289 311
               }
290
-            });
312
+            })
291 313
           })
292 314
           .catch(() => {
293 315
             this.$message({
294
-              type: "info",
295
-              message: "已取消提交",
296
-            });
297
-          });
298
-        this.isDisable = false;
299
-      }, 300);
316
+              type: 'info',
317
+              message: '已取消提交'
318
+            })
319
+          })
320
+        this.isDisable = false
321
+      }, 300)
300 322
     },
301 323
     // 退回订单
302
-    btn_goback (orderid) {
324
+    btn_goback(orderid) {
303 325
       this.$layer.iframe({
304 326
         content: {
305 327
           content: goback, // 传递的组件对象
306 328
           parent: this, // 当前的vue对象
307 329
           data: { rowid: orderid } // props
308 330
         },
309
-        area: ["30%", "30%"],
310
-        title: "退回订单"
311
-      });
331
+        area: ['30%', '30%'],
332
+        title: '退回订单'
333
+      })
312 334
     },
313
-    //导入附件提交
314
-    btn_import_submit () {
335
+    // 导入附件提交
336
+    btn_import_submit() {
315 337
       this.$layer.iframe({
316 338
         content: {
317 339
           content: importSubmit, // 传递的组件对象
318 340
           parent: this, // 当前的vue对象
319 341
           data: { rowid: '' } // props
320 342
         },
321
-        area: ["30%", "30%"],
322
-        title: "导入附件提交"
323
-      });
343
+        area: ['30%', '30%'],
344
+        title: '导入附件提交'
345
+      })
324 346
     },
325
-    hadndleOrderCode(ordercode){
347
+    hadndleOrderCode(ordercode) {
326 348
       this.$layer.iframe({
327 349
         content: {
328 350
           content: detail, // 传递的组件对象
@@ -333,17 +355,17 @@ export default {
333 355
         title: '订单详情'
334 356
       })
335 357
     },
336
-    //选择多个
358
+    // 选择多个
337 359
     handleSelectionChange(val) {
338 360
       const ids = []
339 361
       this.multipleSelection = val
340
-      for (let i=0; i<this.multipleSelection.length; i++) {
362
+      for (let i = 0; i < this.multipleSelection.length; i++) {
341 363
         ids.push(this.multipleSelection[i].F_Id)
342 364
       }
343 365
       this.selectOrderId = ids
344
-    }, 
366
+    }
345 367
   }
346
-};
368
+}
347 369
 </script>
348 370
 
349 371
 <style rel="stylesheet/scss" lang="scss" scoped>

+ 21 - 20
CallCenterWeb.UI/src/views/customerServiceManagement/orderListLogistics/goback.vue

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

+ 59 - 0
CallCenterWeb.UI/src/views/customerServiceManagement/orderListLogistics/gobacklast.vue

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

+ 201 - 146
CallCenterWeb.UI/src/views/customerServiceManagement/orderListLogistics/index.vue

@@ -13,8 +13,8 @@
13 13
         start-placeholder="开始日期"
14 14
         end-placeholder="结束日期"
15 15
       />
16
-        <!-- :clearable="false" -->
17
-        <!-- align="left" -->
16
+      <!-- :clearable="false" -->
17
+      <!-- align="left" -->
18 18
       <el-cascader
19 19
         ref="myCascader"
20 20
         v-model="searchData.provinceCity"
@@ -95,12 +95,13 @@
95 95
       >运单号导入</el-button> -->
96 96
       <!-- <el-button v-permission="'HY_merge'" type="primary" class="filter-item" @click="btn_merge">合并</el-button> -->
97 97
       <el-button v-permission="'HY_bulk_logistics'" type="primary" class="filter-item" @click="btn_bulk_logistics">批量分物流</el-button>
98
-      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回</el-button>
98
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_goback">批量退回销售</el-button>
99
+      <el-button v-permission="'HY_bulk_goback'" type="primary" class="filter-item" @click="btn_bulk_gobacklast">批量退回上一级</el-button>
99 100
       <el-button v-permission="'HY_export'" type="primary" class="filter-item" @click="btn_export">导出</el-button>
100 101
       <el-button v-permission="'HY_import_goback'" type="primary" class="filter-item" @click="btn_import_goback">导入附件退回</el-button>
101 102
     </div>
102 103
     <el-tabs v-model="activeName" type="card" @tab-click="handleTabClick">
103
-      <el-tab-pane label="待分物流" name="8"></el-tab-pane>
104
+      <el-tab-pane label="待分物流" name="8"/>
104 105
     </el-tabs>
105 106
     <div>
106 107
       <span>订单数量:{{ pageParams.total }}</span>
@@ -110,10 +111,10 @@
110 111
       :data="dataLists"
111 112
       border
112 113
       stripe
113
-      @selection-change="handleSelectionChange"
114 114
       row-key="F_Id"
115
+      @selection-change="handleSelectionChange"
115 116
     >
116
-      <el-table-column type="selection" :reserve-selection="true"></el-table-column>
117
+      <el-table-column :reserve-selection="true" type="selection"/>
117 118
       <el-table-column type="index" label="编号" align="center" fixed width="80" />
118 119
       <el-table-column prop="F_Id" label="订单编号" align="center" min-width="180">
119 120
         <template slot-scope="scope">
@@ -127,7 +128,7 @@
127 128
       <el-table-column prop="F_Customer" label="客户姓名" align="center" min-width />
128 129
       <el-table-column prop="F_CustomerPhone" label="手机号码" align="center" min-width="140" />
129 130
       <el-table-column label="订购商品" align="center" min-width>
130
-        <template slot-scope="scope">{{ scope.row.OrderDetailList | judgmentOrderGoods}}</template>
131
+        <template slot-scope="scope">{{ scope.row.OrderDetailList | judgmentOrderGoods }}</template>
131 132
       </el-table-column>
132 133
       <el-table-column prop="F_AddTime" label="下单日期" align="center" />
133 134
       <el-table-column label="订单状态" align="center">
@@ -153,7 +154,12 @@
153 154
             v-permission="'HY_goback'"
154 155
             type="text"
155 156
             @click="btn_goback(scope.row.F_Id)"
156
-          >客服退回</el-button>
157
+          >退回销售</el-button>
158
+          <el-button
159
+            v-permission="'HY_gobacklast'"
160
+            type="text"
161
+            @click="btn_gobacklast(scope.row.F_Id)"
162
+          >退回上一级</el-button>
157 163
           <!-- <el-button v-permission="'HY_label'" type="text" @click="btn_label(scope.row.F_Id)">标签</el-button> -->
158 164
         </template>
159 165
       </el-table-column>
@@ -171,36 +177,37 @@
171 177
 
172 178
 <script>
173 179
 import { getDictionaryValueList, getProviceCityById } from '@/api/commonAPI'
174
-import { getOrderListCustomerService } from "@/api/customerServiceManagement/orderListCustomerService";
175
-import { pickerOptions, formatterContent } from "@/utils";
176
-import importGoback from './importGoback';
177
-import goback from "./goback";
178
-import logistics from './logistics';
179
-import detail from "@/views/orderManagement/orderList/detail"
180
-import Pagination from "@/components/Pagination"; // 对el-pagination 二次封装
181
-
180
+import { getOrderListCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
181
+import { pickerOptions, formatterContent } from '@/utils'
182
+import importGoback from './importGoback'
183
+import goback from './goback'
184
+import gobacklast from './gobacklast'
185
+import logistics from './logistics'
186
+import detail from '@/views/orderManagement/orderList/detail'
187
+import Pagination from '@/components/Pagination' // 对el-pagination 二次封装
188
+import { gobackOrderCustomerService } from '@/api/customerServiceManagement/orderListCustomerService'
182 189
 export default {
183
-  name: "OrderListCustomerService",
190
+  name: 'OrderListCustomerService',
184 191
   components: {
185 192
     Pagination
186 193
   },
187 194
   filters: {
188
-    judgmentStateName (status) {
195
+    judgmentStateName(status) {
189 196
       const statusMap = {
190
-        '0': "未提交",
191
-        '1': "待分仓",
192
-        '2': "已退回",
193
-        '3': "已分仓",
194
-        '4': "无货",
195
-        '5': "仓库待审核",
196
-        '6': "已发货",
197
-        '7': "付款待审核",
198
-        '8': "待分物流",
199
-        '9': "物流未通过",
197
+        '0': '未提交',
198
+        '1': '待分仓',
199
+        '2': '已退回',
200
+        '3': '已分仓',
201
+        '4': '无货',
202
+        '5': '仓库待审核',
203
+        '6': '已发货',
204
+        '7': '付款待审核',
205
+        '8': '待分物流',
206
+        '9': '物流未通过'
200 207
       }
201 208
       return statusMap[status]
202 209
     },
203
-    judgmentOrderGoods (status) {
210
+    judgmentOrderGoods(status) {
204 211
       let orderGoodsNameQuantity = ''
205 212
       for (let i = 0; i < status.length; i++) {
206 213
         orderGoodsNameQuantity = `${orderGoodsNameQuantity}${status[i].F_ProductName}*${status[i].F_Count},`
@@ -208,37 +215,37 @@ export default {
208 215
       orderGoodsNameQuantity = orderGoodsNameQuantity.substring(0, orderGoodsNameQuantity.length - 1)
209 216
       return orderGoodsNameQuantity
210 217
     },
211
-    judgmentAddress (data) {
212
-      let addProvince = data.F_AddProvince === null ? '' : data.F_AddProvince //省
213
-      let addCity = data.F_AddCity === null ? '' : data.F_AddCity //市
214
-      let addArea = data.F_AddArea === null ? '' : data.F_AddArea //县/区
215
-      let addTown = data.F_AddTown === null ? '' : data.F_AddTown //乡/镇
216
-      let address = data.F_Address === null ? '' : data.F_Address //详细地址
217
-      let addressStr = addProvince + addCity + addArea + addTown + address // 地址
218
+    judgmentAddress(data) {
219
+      const addProvince = data.F_AddProvince === null ? '' : data.F_AddProvince // 
220
+      const addCity = data.F_AddCity === null ? '' : data.F_AddCity // 
221
+      const addArea = data.F_AddArea === null ? '' : data.F_AddArea // 县/区
222
+      const addTown = data.F_AddTown === null ? '' : data.F_AddTown // 乡/镇
223
+      const address = data.F_Address === null ? '' : data.F_Address // 详细地址
224
+      const addressStr = addProvince + addCity + addArea + addTown + address // 地址
218 225
       return addressStr
219 226
     }
220 227
   },
221
-  data () {
228
+  data() {
222 229
     return {
223 230
       loading: false,
224 231
       warehouseNameList: [], // 仓库名称
225 232
       logisticsStock: '', // 物流仓库
226 233
       searchData: {
227
-        adFrom: '', //消息/广告媒体来源
228
-        type: '', //订单类型
229
-        id: '', //订单号
230
-        customer: '', //客户姓名
231
-        customerPhone: '', //客户手机号
232
-        trackingNo: '', //运单号
233
-        payState: '', //交易状态
234
+        adFrom: '', // 消息/广告媒体来源
235
+        type: '', // 订单类型
236
+        id: '', // 订单号
237
+        customer: '', // 客户姓名
238
+        customerPhone: '', // 客户手机号
239
+        trackingNo: '', // 运单号
240
+        payState: '', // 交易状态
234 241
         provinceCity: [], // 省市县
235 242
         minprice: '', // 最低金额
236 243
         maxprice: '', // 最高金额
237 244
         F_AddDes: '', // 送货说明
238
-        stock: '',
245
+        stock: ''
239 246
       },
240
-      searchTime: [], //订单时间
241
-      activeName: "8", //标签切换首页
247
+      searchTime: [], // 订单时间
248
+      activeName: '8', // 标签切换首页
242 249
       provinceCityDatas: [], // 省市下拉数据
243 250
       provinceCityText: [], // 省市下拉绑定的值
244 251
       props: {
@@ -257,16 +264,16 @@ export default {
257 264
       dataLists: [], // 列表数据
258 265
       multipleSelection: [], // 选中的数据
259 266
       selectedId: [], // 选中的数据的id
260
-      orderType: [],//订单类型
261
-      selectOrderId: [], //合并订单id
262
-    };
267
+      orderType: [], // 订单类型
268
+      selectOrderId: [] // 合并订单id
269
+    }
263 270
   },
264 271
   watch: {
265 272
     searchTime(newVal, oldVal) {
266 273
       !newVal && (this.searchTime = [])
267 274
     }
268 275
   },
269
-  created () {
276
+  created() {
270 277
     if (this.$route.params.id) {
271 278
       this.activeName = this.$route.params.id
272 279
     }
@@ -278,28 +285,28 @@ export default {
278 285
     this.getwarehouseName()
279 286
     document.onkeyup = e => {
280 287
       if (e.keyCode === 13) {
281
-        this.getList();
288
+        this.getList()
282 289
       }
283
-    };
290
+    }
284 291
   },
285 292
   methods: {
286
-    getList () {
287
-      this.loading = true;
293
+    getList() {
294
+      this.loading = true
288 295
       return new Promise(resolve => {
289 296
         const params = {
290
-          F_State: this.activeName, //订单状态
297
+          F_State: this.activeName, // 订单状态
291 298
           pageindex: 1, // int 第几页
292 299
           pagesize: 1000000, // int 每页几条信息
293
-          F_ADFrom: this.searchData.adFrom, //消息/广告来源
294
-          F_Type: this.searchData.type, //订单类型
295
-          F_Id: this.searchData.id, //订单号
296
-          F_Customer: this.searchData.customer, //客户姓名
297
-          F_CustomerPhone: this.searchData.customerPhone, //客户手机号
298
-          F_TrackingNo: this.searchData.trackingNo, //运单号
299
-          SearchStartTime: this.searchTime[0] == null ? '' : this.searchTime[0], //添加开始时间
300
-          SearchEndTime: this.searchTime[1] == null ? '' : this.searchTime[1], //添加结束时间
301
-          PayState: this.searchData.payState, //交易状态
302
-          F_IsExpress: 0, //-2全部 0客服未分配快递 1已分配
300
+          F_ADFrom: this.searchData.adFrom, // 消息/广告来源
301
+          F_Type: this.searchData.type, // 订单类型
302
+          F_Id: this.searchData.id, // 订单号
303
+          F_Customer: this.searchData.customer, // 客户姓名
304
+          F_CustomerPhone: this.searchData.customerPhone, // 客户手机号
305
+          F_TrackingNo: this.searchData.trackingNo, // 运单号
306
+          SearchStartTime: this.searchTime[0] == null ? '' : this.searchTime[0], // 添加开始时间
307
+          SearchEndTime: this.searchTime[1] == null ? '' : this.searchTime[1], // 添加结束时间
308
+          PayState: this.searchData.payState, // 交易状态
309
+          F_IsExpress: 0, // -2全部 0客服未分配快递 1已分配
303 310
           state: '',
304 311
           F_AddProvince: this.provinceCityText && this.provinceCityText[0], // 省份
305 312
           F_AddCity: this.provinceCityText[1] && this.provinceCityText[1], // 市
@@ -308,32 +315,32 @@ export default {
308 315
           minprice: this.searchData.minprice, // 最低金额
309 316
           maxprice: this.searchData.maxprice, // 最高金额
310 317
           F_AddDes: this.searchData.F_AddDes, // 送货说明
311
-          F_Stock: this.searchData.stock, // 仓库
312
-        };
318
+          F_Stock: this.searchData.stock // 仓库
319
+        }
313 320
         getOrderListCustomerService(params).then(response => {
314
-          this.loading = false;
315
-          if (response.state.toLowerCase() === "success") {
316
-            this.pageParams.total = response.data.Totals;
317
-            this.dataLists = response.data.Rows;
321
+          this.loading = false
322
+          if (response.state.toLowerCase() === 'success') {
323
+            this.pageParams.total = response.data.Totals
324
+            this.dataLists = response.data.Rows
318 325
           }
319
-        });
320
-        resolve();
321
-      });
326
+        })
327
+        resolve()
328
+      })
322 329
     },
323
-    //处理默认选中当前日期
330
+    // 处理默认选中当前日期
324 331
     getNowTime() {
325
-      let now = new Date();
326
-      let year = now.getFullYear(); //得到年份
327
-      let month = now.getMonth() + 1; //得到月份
328
-      let date = now.getDate(); //得到日期
329
-      let hour =" 00:00:00"; //默认时分秒 如果传给后台的格式为年月日时分秒,就需要加这个,如若不需要,此行可忽略
330
-      month = month.toString().padStart(2, "0");
331
-      date = date.toString().padStart(2, "0");
332
-      let defaultDate = `${year}-${month}-${date}`;
332
+      const now = new Date()
333
+      const year = now.getFullYear() // 得到年份
334
+      let month = now.getMonth() + 1 // 得到月份
335
+      let date = now.getDate() // 得到日期
336
+      const hour = ' 00:00:00' // 默认时分秒 如果传给后台的格式为年月日时分秒,就需要加这个,如若不需要,此行可忽略
337
+      month = month.toString().padStart(2, '0')
338
+      date = date.toString().padStart(2, '0')
339
+      const defaultDate = `${year}-${month}-${date}`
333 340
       this.searchTime = [defaultDate, defaultDate]
334 341
     },
335 342
     // 获取仓库名称
336
-    getwarehouseName () {
343
+    getwarehouseName() {
337 344
       return new Promise(resolve => {
338 345
         const params = {
339 346
           isleaf: true,
@@ -347,7 +354,7 @@ export default {
347 354
       })
348 355
     },
349 356
     // 获取订单类型
350
-    getOrderType () {
357
+    getOrderType() {
351 358
       return new Promise(resolve => {
352 359
         const params = {
353 360
           isleaf: true,
@@ -374,27 +381,27 @@ export default {
374 381
         })
375 382
       })
376 383
     },
377
-    handleTabClick (tab, event) {
378
-      this.pageParams.pageindex=1
384
+    handleTabClick(tab, event) {
385
+      this.pageParams.pageindex = 1
379 386
       this.getList()
380 387
     },
381
-    btn_search () {
382
-      this.pageParams.pageindex = 1;
383
-      this.getList();
388
+    btn_search() {
389
+      this.pageParams.pageindex = 1
390
+      this.getList()
384 391
     },
385
-    btn_edit (editId) {
392
+    btn_edit(editId) {
386 393
       this.$layer.iframe({
387 394
         content: {
388 395
           content: edit, // 传递的组件对象
389 396
           parent: this, // 当前的vue对象
390 397
           data: { rowid: editId } // props
391 398
         },
392
-        area: ["80%", "90%"],
393
-        title: "编辑订单"
394
-      });
399
+        area: ['80%', '90%'],
400
+        title: '编辑订单'
401
+      })
395 402
     },
396
-    //导入
397
-    btn_waybill_number_import () {
403
+    // 导入
404
+    btn_waybill_number_import() {
398 405
       this.$layer.iframe({
399 406
         content: {
400 407
           content: importWaybillNumber, // 传递的组件对象
@@ -407,93 +414,141 @@ export default {
407 414
       })
408 415
     },
409 416
     // 批量分物流
410
-    btn_bulk_logistics () {
417
+    btn_bulk_logistics() {
411 418
       if (this.selectOrderId.length < 1) {
412 419
         this.$message({
413
-          message: "请选择订单!",
414
-          type: "warning",
415
-        });
416
-        return;
420
+          message: '请选择订单!',
421
+          type: 'warning'
422
+        })
423
+        return
417 424
       }
418
-      let orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
425
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
419 426
       this.$layer.iframe({
420 427
         content: {
421 428
           content: logistics, // 传递的组件对象
422 429
           parent: this, // 当前的vue对象
423 430
           data: { rowid: orderids, stock: this.logisticsStock } // props
424 431
         },
425
-        area: ["30%", "30%"],
426
-        title: "物流"
427
-      });
432
+        area: ['30%', '30%'],
433
+        title: '物流'
434
+      })
428 435
     },
429 436
     // 分物流
430
-    btn_logistics (orderid, stock) {
437
+    btn_logistics(orderid, stock) {
431 438
       this.$layer.iframe({
432 439
         content: {
433 440
           content: logistics, // 传递的组件对象
434 441
           parent: this, // 当前的vue对象
435 442
           data: { rowid: orderid, stock: stock } // props
436 443
         },
437
-        area: ["30%", "30%"],
438
-        title: "物流"
439
-      });
444
+        area: ['30%', '30%'],
445
+        title: '物流'
446
+      })
440 447
     },
441
-    // 批量退回
442
-    btn_bulk_goback () {
448
+    // 批量退回销售
449
+    btn_bulk_goback() {
443 450
       if (this.selectOrderId.length < 1) {
444 451
         this.$message({
445
-          message: "请选择订单!",
446
-          type: "warning",
447
-        });
448
-        return;
452
+          message: '请选择订单!',
453
+          type: 'warning'
454
+        })
455
+        return
449 456
       }
450
-      let orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
457
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
451 458
       this.$layer.iframe({
452 459
         content: {
453 460
           content: goback, // 传递的组件对象
454 461
           parent: this, // 当前的vue对象
455 462
           data: { rowid: orderids } // props
456 463
         },
457
-        area: ["30%", "30%"],
458
-        title: "退回订单"
459
-      });
464
+        area: ['30%', '30%'],
465
+        title: '退回订单'
466
+      })
460 467
     },
461
-    //退回订单
462
-    btn_goback (orderid) {
468
+    // 批量退回上一级
469
+    btn_bulk_gobacklast() {
470
+      if (this.selectOrderId.length < 1) {
471
+        this.$message({
472
+          message: '请选择订单!',
473
+          type: 'warning'
474
+        })
475
+        return
476
+      }
477
+      const orderids = this.selectOrderId.join(',').replace(/\s+/g, '')
478
+      this.$layer.iframe({
479
+        content: {
480
+          content: gobacklast, // 传递的组件对象
481
+          parent: this, // 当前的vue对象
482
+          data: { rowid: orderids } // props
483
+        },
484
+        area: ['30%', '30%'],
485
+        title: '退回订单'
486
+      })
487
+    },
488
+    // 退回销售
489
+    btn_goback(orderid) {
463 490
       this.$layer.iframe({
464 491
         content: {
465 492
           content: goback, // 传递的组件对象
466 493
           parent: this, // 当前的vue对象
467 494
           data: { rowid: orderid } // props
468 495
         },
469
-        area: ["30%", "30%"],
470
-        title: "退回订单"
471
-      });
496
+        area: ['30%', '30%'],
497
+        title: '退回订单'
498
+      })
472 499
     },
473
-    //导出
474
-    btn_export () {
475
-      let SearchStartTime = this.searchTime[0] == undefined ? '' : this.searchTime[0]
476
-      let SearchEndTime = this.searchTime[1] == undefined ? '' : this.searchTime[1]
477
-      let F_AddProvince = this.provinceCityText[0] == undefined ? '' : this.provinceCityText[0]
478
-      let F_AddCity = this.provinceCityText[1] == undefined ? '' : this.provinceCityText[1]
479
-      let F_AddArea = this.provinceCityText[2] == undefined ? '' : this.provinceCityText[2]
480
-      let F_AddTown = this.provinceCityText[3] == undefined ? '' : this.provinceCityText[3]
481
-      window.location.href = this.$store.getters.serverConfig.BASE_API + "api/order/getorderlistbykfpage?isdc=1" + "&F_State=" + this.activeName + "&SearchStartTime=" + SearchStartTime + "&SearchEndTime=" + SearchEndTime + "&F_AddProvince=" + F_AddProvince + "&F_AddCity=" + F_AddCity + "&F_AddArea=" + F_AddArea + "&F_AddTown=" + F_AddTown + "&minprice=" + this.searchData.minprice + "&maxprice=" + this.searchData.maxprice + "&F_AddDes=" + this.searchData.F_AddDes
500
+    // 退回上一级
501
+    btn_gobacklast(id) {
502
+      this.$confirm('是否将此订单退回上一级?', '提示', {
503
+        confirmButtonText: '确定',
504
+        cancelButtonText: '取消',
505
+        type: 'warning'
506
+      }).then(() => {
507
+        const params = {
508
+          orderids: id,
509
+          state: 0
510
+        }
511
+        gobackOrderCustomerService(params)
512
+          .then((response) => {
513
+            if (response.state.toLowerCase() === 'success') {
514
+              this.getList() // 重新加载父级数据
515
+              this.$message.success('恭喜你,订单信息退回成功!')
516
+            }
517
+          })
518
+          .catch(() => {
519
+            this.loading = false
520
+          })
521
+      }).catch(() => {
522
+        this.$message({
523
+          type: 'info',
524
+          message: '已取消删除'
525
+        })
526
+      })
482 527
     },
483
-    //导入附件退回
484
-    btn_import_goback () {
528
+    // 导出
529
+    btn_export() {
530
+      const SearchStartTime = this.searchTime[0] == undefined ? '' : this.searchTime[0]
531
+      const SearchEndTime = this.searchTime[1] == undefined ? '' : this.searchTime[1]
532
+      const F_AddProvince = this.provinceCityText[0] == undefined ? '' : this.provinceCityText[0]
533
+      const F_AddCity = this.provinceCityText[1] == undefined ? '' : this.provinceCityText[1]
534
+      const F_AddArea = this.provinceCityText[2] == undefined ? '' : this.provinceCityText[2]
535
+      const F_AddTown = this.provinceCityText[3] == undefined ? '' : this.provinceCityText[3]
536
+      window.location.href = this.$store.getters.serverConfig.BASE_API + 'api/order/getorderlistbykfpage?isdc=1' + '&F_State=' + this.activeName + '&SearchStartTime=' + SearchStartTime + '&SearchEndTime=' + SearchEndTime + '&F_AddProvince=' + F_AddProvince + '&F_AddCity=' + F_AddCity + '&F_AddArea=' + F_AddArea + '&F_AddTown=' + F_AddTown + '&minprice=' + this.searchData.minprice + '&maxprice=' + this.searchData.maxprice + '&F_AddDes=' + this.searchData.F_AddDes
537
+    },
538
+    // 导入附件退回
539
+    btn_import_goback() {
485 540
       this.$layer.iframe({
486 541
         content: {
487 542
           content: importGoback, // 传递的组件对象
488 543
           parent: this, // 当前的vue对象
489 544
           data: { rowid: '' } // props
490 545
         },
491
-        area: ["30%", "30%"],
492
-        title: "导入附件退回"
493
-      });
546
+        area: ['30%', '30%'],
547
+        title: '导入附件退回'
548
+      })
494 549
     },
495
-    //订单详情
496
-    hadndleOrderCode (ordercode) {
550
+    // 订单详情
551
+    hadndleOrderCode(ordercode) {
497 552
       this.$layer.iframe({
498 553
         content: {
499 554
           content: detail, // 传递的组件对象
@@ -504,8 +559,8 @@ export default {
504 559
         title: '订单详情'
505 560
       })
506 561
     },
507
-    //选择多个
508
-    handleSelectionChange (val) {
562
+    // 选择多个
563
+    handleSelectionChange(val) {
509 564
       const ids = []
510 565
       this.multipleSelection = val
511 566
       for (let i = 0; i < this.multipleSelection.length; i++) {
@@ -560,13 +615,13 @@ export default {
560 615
     },
561 616
     changeStock(val) {
562 617
       this.logisticsStock = val
563
-    },
618
+    }
564 619
   }
565
-};
620
+}
566 621
 </script>
567 622
 
568 623
 <style rel="stylesheet/scss" lang="scss" scoped>
569 624
 .el {
570 625
   cursor: pointer;
571 626
 }
572
-</style>
627
+</style>

File diff suppressed because it is too large
+ 561 - 343
CallCenterWeb.UI/src/views/orderManagement/orderList/index.vue