jufubao-admin-library 1.0.0-beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +90 -0
  3. package/library/gulpfile.js/const.js +51 -0
  4. package/library/gulpfile.js/index.js +237 -0
  5. package/library/gulpfile.js/util.js +114 -0
  6. package/library/viewModules/config.js +75 -0
  7. package/library/viewModules/viewStat/router/supplierStat.js +33 -0
  8. package/library/viewModules/viewStat/schemas/supplier.stat.js +70 -0
  9. package/library/viewModules/viewStat/schemas.js +18 -0
  10. package/library/viewModules/viewStat/viewsStat/index/components/stat-all.vue +233 -0
  11. package/library/viewModules/viewStat/viewsStat/index/components/stat-product.vue +129 -0
  12. package/library/viewModules/viewStat/viewsStat/index/components/stat-supplier.vue +124 -0
  13. package/library/viewModules/viewStat/viewsStat/index/components/table-category.vue +309 -0
  14. package/library/viewModules/viewStat/viewsStat/index/components/table-product.vue +316 -0
  15. package/library/viewModules/viewStat/viewsStat/index/components/table-supplier.vue +276 -0
  16. package/library/viewModules/viewStat/viewsStat/index/index.vue +117 -0
  17. package/library/viewModules/viewTask/router/tasks.js +34 -0
  18. package/library/viewModules/viewTask/schemas/tasks.js +52 -0
  19. package/library/viewModules/viewTask/viewTask/list.vue +195 -0
  20. package/library/viewModules/viewsEnterpriseBuy/router/enterprise_buy.js +91 -0
  21. package/library/viewModules/viewsEnterpriseBuy/schemas/enterprise_buy.js +420 -0
  22. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/OrderInfoButton.vue +550 -0
  23. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/cardList.vue +119 -0
  24. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/expressCopy.vue +259 -0
  25. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/operateHistory.vue +164 -0
  26. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/send_list.vue +395 -0
  27. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/storeList.vue +100 -0
  28. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/workHistory.vue +163 -0
  29. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/detail.vue +503 -0
  30. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/list.vue +635 -0
  31. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/order_detail.vue +860 -0
  32. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/set_create.vue +219 -0
  33. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/set_list.vue +237 -0
  34. package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/table-card.vue +180 -0
  35. package/library/viewModules/viewsFinance/router/balance.js +75 -0
  36. package/library/viewModules/viewsFinance/router/finance.js +30 -0
  37. package/library/viewModules/viewsFinance/schemas/trade.record.js +153 -0
  38. package/library/viewModules/viewsFinance/schemas/wallet.js +116 -0
  39. package/library/viewModules/viewsFinance/viewsFinance/balance/components/listChannel.vue +220 -0
  40. package/library/viewModules/viewsFinance/viewsFinance/balance/components/listOpenapi.vue +260 -0
  41. package/library/viewModules/viewsFinance/viewsFinance/balance/components/listPartner.vue +217 -0
  42. package/library/viewModules/viewsFinance/viewsFinance/balance/components/listSupplier.vue +229 -0
  43. package/library/viewModules/viewsFinance/viewsFinance/balance/detail_channel.vue +401 -0
  44. package/library/viewModules/viewsFinance/viewsFinance/balance/detail_openapi.vue +364 -0
  45. package/library/viewModules/viewsFinance/viewsFinance/balance/detail_partner.vue +633 -0
  46. package/library/viewModules/viewsFinance/viewsFinance/balance/detail_supplier.vue +417 -0
  47. package/library/viewModules/viewsFinance/viewsFinance/balance/list.vue +75 -0
  48. package/library/viewModules/viewsFinance/viewsFinance/index.vue +191 -0
  49. package/library/viewModules/viewsLimit/router/buyLimit/buyLimit.js +31 -0
  50. package/library/viewModules/viewsLimit/schemas/buyLimit.js +22 -0
  51. package/library/viewModules/viewsLimit/viewsLimit/index.vue +211 -0
  52. package/package.json +114 -0
@@ -0,0 +1,860 @@
1
+ <template>
2
+ <div class="app-container">
3
+ <div class="app-container__title">
4
+ <div style="display:flex">
5
+ 订单详情
6
+ <span v-if="baseInfoData">({{baseInfoData['main_order_id']}})</span>
7
+ <i
8
+ style="cursor: pointer"
9
+ class="el-icon-copy-document"
10
+ @click="copyOrderId(baseInfoData['main_order_id'])"
11
+ ></i>
12
+ <div style="margin-left:30px" v-if="baseInfoData">订单来源:{{baseInfoData['source_from_name']}}</div>
13
+ </div>
14
+ </div>
15
+ <div v-if="progressData.length>0" class="app-container__step" style="margin-bottom: 10px">
16
+ <el-card>
17
+ <el-steps :active="activiedNum" finish-status="success">
18
+ <el-step
19
+ v-for="(item,index) in progressData"
20
+ :key="index"
21
+ :title="item.name"
22
+ :description="item.time"
23
+ ></el-step>
24
+ </el-steps>
25
+ </el-card>
26
+ </div>
27
+ <div class="app-container__base" style="margin-bottom: 10px">
28
+ <el-card>
29
+ <div slot="header" class="clearfix">
30
+ <div style="display: flex;justify-content: space-between">
31
+ <div>订单信息</div>
32
+ <el-button v-if="isLookUser" type="primary" size="small" @click="handleLookUser">查看用户信息</el-button>
33
+ </div>
34
+ </div>
35
+ <xd-detail
36
+ label-width="120"
37
+ :is-border="isBorder"
38
+ :list="baseList"
39
+ :key="mainKey"
40
+ size
41
+ @onCustom="handleCustom"
42
+ ></xd-detail>
43
+ </el-card>
44
+ </div>
45
+ <div class="app-container__pack" style="margin-bottom: 10px" v-if="packsData.length>0">
46
+ <el-card>
47
+ <div slot="header" class="clearfix">
48
+ <span>物流信息</span>
49
+ </div>
50
+ <div class="app-container__pack-title">
51
+ <div class="app-container__pack-title-wrap" style="font-size: 18px">
52
+ <div class="app-container__pack-title-tab">
53
+ <div
54
+ v-for="(item,index) in packsData"
55
+ :key="index"
56
+ :style="{color:index===tabIndex?'#409EFF':'#333'}"
57
+ @click="changeTab(index)"
58
+ >包裹{{index+1}}</div>
59
+ </div>
60
+ <!-- <order-button
61
+ :events="againButtonData"
62
+ :main_order_id="main_order_id"
63
+ :sub_order_id="sub_order_id"
64
+ @refresh="handeleRefresh"
65
+ ></order-button> -->
66
+ </div>
67
+ </div>
68
+ <div class="logist_box">
69
+ <xd-detail
70
+ label-width="150"
71
+ :is-border="isBorder"
72
+ :list="packsRowTest"
73
+ :key="detailKey"
74
+ size
75
+ >
76
+ <template slot="images" slot-scope="scope">
77
+ <div class="image_list" v-for="(item,index) in imagesData" :key="index">
78
+ <img :src="item.url" />
79
+ </div>
80
+ <div>共{{getNum}}件商品</div>
81
+ </template>
82
+ <template slot="tips" slot-scope="scope">
83
+ <div style="color:#A6A6A6 ">买家6天23小时29分内未确认收货,系统将自动确认收货</div>
84
+ </template>
85
+ </xd-detail>
86
+ <div>
87
+ <el-button v-if="isDel&&(subStatus==='REC'||subStatus==='DEING')" type="text" @click="handleDelete" size="small">删除包裹</el-button>
88
+ </div>
89
+ </div>
90
+ <div class="logist_box_button" v-if="packsData.length>0&&packsRowData.logistics_company_code">
91
+ <div>
92
+ <el-button v-if="isAwait&&showStep" type="primary" @click="handleUpdate" size="small">同步物流信息</el-button>
93
+ </div>
94
+ <div>
95
+ <el-button
96
+ v-if="showStep"
97
+ type="primary"
98
+ size="small"
99
+ @click="handeleSelfPacks"
100
+ >自定义物流信息</el-button>
101
+ </div>
102
+ <div>
103
+ <el-button
104
+ v-if="packsData.length>0&&!showStep&&isLookLogist&&packsRowData.logistics_company_code"
105
+ type="primary"
106
+ @click="handleShowStep"
107
+ size="small"
108
+ >查看物流</el-button>
109
+ </div>
110
+ </div>
111
+ <div style="display: flex;border-top: 1px solid #e6ebf5;" v-if="packsData.length>0&&showStep&&packsRowData.logistics_company_code">
112
+ <div
113
+ style="height: 100%;max-height: 290px;overflow-y: auto;min-width:100%;margin-top: 25px;"
114
+ v-if="logistLine.length!==0"
115
+ >
116
+ <el-steps direction="vertical" finish-status="success">
117
+ <div
118
+ style="display: flex;justify-content: space-between;width: 100%;"
119
+ v-for="(item,index) in logistLine"
120
+ :key="index">
121
+ <el-step
122
+ style="flex: 1"
123
+ class="step"
124
+ :title="item.content"
125
+ :description="item.time"
126
+ >
127
+ </el-step>
128
+ <!-- <div style="display: flex;">
129
+ <el-button v-if="!item.read_only" @click="handleDeleteSelfPacks(item)" type="text" icon="el-icon-delete"></el-button>
130
+ <el-button v-if="!item.read_only" @click="handeleEditSelfPacks(item)" type="text" icon="el-icon-edit-outline"></el-button>
131
+ </div> -->
132
+ </div>
133
+ </el-steps>
134
+ </div>
135
+ <div style="margin-top: 25px;" v-if="logistLine.length===0">暂无数据</div>
136
+ </div>
137
+ </el-card>
138
+ </div>
139
+ <!-- 拆单信息-->
140
+ <div style="margin-bottom: 10px">
141
+ <div v-for="(item,index) in subOrderData" :key="index" style="margin-bottom: 10px;">
142
+ <el-card>
143
+ <div slot="header" class="clearfix">
144
+ <div style="display: flex;justify-content: space-between">
145
+ <div>
146
+ 拆单号: {{item['detail']['sub_order_id']}}
147
+ <i
148
+ style="cursor: pointer"
149
+ class="el-icon-copy-document"
150
+ @click="copyOrderId(item['detail']['sub_order_id'])"
151
+ ></i>
152
+ </div>
153
+ <div>
154
+ <el-button
155
+ v-if="baseInfoData&&(baseInfoData['order_type']==='virtual'||baseInfoData['order_type']==='card')&&isLookCode"
156
+ type="primary"
157
+ size="small"
158
+ @click="handleGetCodes(item['detail']['sub_order_id'])"
159
+ >查看电子码信息</el-button>
160
+ </div>
161
+ <!-- <div v-if="isLookSub">
162
+ <el-tooltip effect="dark" content="查看拆单信息" placement="top">
163
+ <router-link target="_target" :to="toLink(item['detail']['sub_order_id'])">
164
+ <el-button type="primary" size="small">查看拆单信息</el-button>
165
+ </router-link>
166
+ </el-tooltip>
167
+ </div> -->
168
+ </div>
169
+ </div>
170
+ <xd-table
171
+ :headers="childHeaders"
172
+ :list="item['products']"
173
+ is-border
174
+ :get-link="getLinkSub"
175
+ :custom-function="handleCustom"
176
+ >
177
+ <template slot="base" slot-scope="scope">
178
+ <xd-store-product
179
+ :list="getProductInfo(scope.row)"
180
+ @onClick="handleSaleDetail"
181
+ width="60"
182
+ height="60"
183
+ ></xd-store-product>
184
+ </template>
185
+ <template slot="out" slot-scope="scope">
186
+ <div v-if="scope.row.product_form_data">
187
+ <div
188
+ v-for="(item,index) in scope.row.product_form_data"
189
+ :key="index"
190
+ >{{item.label}} : {{item.value}}</div>
191
+ </div>
192
+ </template>
193
+ </xd-table>
194
+ <xd-detail
195
+ label-width="120"
196
+ :is-border="isBorder"
197
+ :list="item['detail']['containers']"
198
+ size
199
+ ></xd-detail>
200
+ </el-card>
201
+ </div>
202
+ </div>
203
+ <!-- 拆单信息-->
204
+ <!-- 卡消费信息-->
205
+ <!-- <card-list :data="cardData" :key="cardKey"></card-list> -->
206
+ <!-- 卡消费信息-->
207
+ <!-- 工单记录-->
208
+ <!-- <work-history :main_order_id="main_order_id" :sub_order_id="sub_order_id"></work-history> -->
209
+ <!-- 工单记录-->
210
+ <!-- 操作记录-->
211
+ <operate-history :main_order_id="main_order_id" :sub_order_id="sub_order_id"></operate-history>
212
+ <!-- 操作记录-->
213
+ <xd-dialog
214
+ title="快递内容添加"
215
+ :show.sync="selfDialog"
216
+ width="50%"
217
+ @onConfirm="handleSelf"
218
+ @onClose="handleCloseSelf"
219
+ @onCancel="handleCloseSelf"
220
+ >
221
+ <el-form style="margin-top: 10px" :model="selfForm" label-width="100px">
222
+ <el-form-item label="时间">
223
+ <el-date-picker
224
+ v-model="selfForm.time"
225
+ type="datetime"
226
+ value-format="timestamp"
227
+ placeholder="选择日期时间"
228
+ ></el-date-picker>
229
+ </el-form-item>
230
+ <el-form-item label="备注">
231
+ <el-input ref="price" type="textarea" v-model="selfForm.content" placeholder="请输入备注" />
232
+ </el-form-item>
233
+ </el-form>
234
+ </xd-dialog>
235
+ <xd-dialog
236
+ title="查看用户信息"
237
+ :show.sync="userDialog"
238
+ width="40%"
239
+ @onConfirm="userDialog=false"
240
+ @onClose="userDialog=false"
241
+ @onCancel="userDialog=false"
242
+ >
243
+ <el-form style="margin-top: 10px" :model="userForm" label-width="120px">
244
+ <el-form-item label="用户联系手机号" v-if="userForm.phone">
245
+ <el-input style="width:80%" type="text" disabled v-model="userForm.phone" />
246
+ </el-form-item>
247
+ <el-form-item label="下单填写手机号" v-if="userForm.buy_phone_number">
248
+ <el-input style="width:80%" type="text" disabled v-model="userForm.buy_phone_number" />
249
+ </el-form-item>
250
+ <el-form-item label="收货手机号" v-if="userForm.receipt_phone">
251
+ <el-input style="width:80%" type="text" disabled v-model="userForm.receipt_phone" />
252
+ </el-form-item>
253
+ </el-form>
254
+ </xd-dialog>
255
+ <xd-dialog
256
+ :show.sync="dialogShow"
257
+ v-if="dialogShow"
258
+ :title="title"
259
+ width="600px"
260
+ @onClose="dialogShow=false"
261
+ @onCancel="dialogShow=false"
262
+ @onConfirm="dialogShow=false"
263
+ >
264
+ <div v-if="codeData.length===0">暂无信息</div>
265
+ <div class="code_box" v-for="(item,index) in codeData" :key="index">
266
+ <div v-if="item.code_type==='str'">
267
+ <div class="items">
268
+ <div></div>
269
+ <div>{{item.can_read_code}}</div>
270
+ <i
271
+ style="cursor: pointer;margin-left:10px"
272
+ class="el-icon-copy-document"
273
+ @click="copy(item.code)"
274
+ ></i>
275
+ </div>
276
+ </div>
277
+ <div v-if="item.code_type==='url'">
278
+ <div class="items">
279
+ <div>电子码地址:</div>
280
+ <el-input v-model="item.code"></el-input>
281
+ <i
282
+ style="cursor: pointer;margin-left:10px"
283
+ class="el-icon-copy-document"
284
+ @click="copy(item.code)"
285
+ ></i>
286
+ </div>
287
+ </div>
288
+ <div v-if="item.code_type==='card-pass'">
289
+ <div class="items">
290
+ <div>兑换账号:</div>
291
+ <el-input v-model="item.code"></el-input>
292
+ <i
293
+ style="cursor: pointer;margin-left:10px"
294
+ class="el-icon-copy-document"
295
+ @click="copy(item.code)"
296
+ ></i>
297
+ </div>
298
+ <div class="items">
299
+ <div>兑换密码:</div>
300
+ <el-input v-model="item.password"></el-input>
301
+ <i
302
+ style="cursor: pointer;margin-left:10px"
303
+ class="el-icon-copy-document"
304
+ @click="copy(item.password)"
305
+ ></i>
306
+ </div>
307
+ </div>
308
+ <div v-if="item.code_end_time">
309
+ <div class="items">
310
+ <div></div>
311
+ <div>{{ item.code_end_time }}</div>
312
+ </div>
313
+ </div>
314
+ </div>
315
+ </xd-dialog>
316
+ </div>
317
+ </template>
318
+
319
+ <script>
320
+ import XdContentInfo from "@/components/XdContentInfo"
321
+ import XdDialog from "@/components/XdDialog"
322
+ import { mapActions,mapState } from 'vuex'
323
+ import XdTableImage from "@/components/XdTableImage"
324
+ import { Loading } from 'element-ui'
325
+ import XdDetail from "@/components/XdDetail"
326
+ import XdTable from "@/components/XdTable"
327
+ import XdPagination from "@/components/XdPagination.vue"
328
+ import XdStoreProduct from "@/components/XdStoreProduct"
329
+ import workHistory from "./compontents/workHistory"
330
+ // import cardList from "./compontents/cardList"
331
+ import operateHistory from "./compontents/operateHistory"
332
+ import { getOptions } from "@/utils/options"
333
+ import checkPermission from "@/utils/permission"
334
+ import permissions from "@/constant/permissions"
335
+
336
+ export default {
337
+ name: "enterprise_buy_order_detail",
338
+ components: {
339
+ XdContentInfo,
340
+ XdDialog,
341
+ XdTableImage,
342
+ XdDetail,
343
+ XdTable,
344
+ XdPagination,
345
+ XdStoreProduct,
346
+ workHistory,
347
+ // cardList,
348
+ operateHistory
349
+ },
350
+
351
+
352
+ data () {
353
+ return {
354
+ progressData: [],
355
+ activiedNum: 0,
356
+ cardData: [],
357
+ cardKey: 'cardKey',
358
+ contactData: null,
359
+ list: [],
360
+ sub_order_number: null, //订单id
361
+ tabIndex: 0,
362
+ multipleSelection: [], //选择列表对象
363
+ value: null,
364
+ packsData: [],
365
+ packsRowData: [],
366
+ tableRefresh: 'tableRefresh',
367
+ childHeaders: [
368
+ { "type": "normal", "prop": "product_id", "align": "center", "label": "商品ID" },
369
+ { "type": "normal", "prop": "base", "align": "center", "label": "商品信息" },
370
+ {
371
+ type: 'priceNumber',
372
+ prop: "priceNumber",
373
+ align: 'center',
374
+ label: '售价&数量',
375
+ message: ['sale_price', 'product_num']
376
+ },
377
+ { "type": "normal", "prop": "brand_name", "align": "center", "label": "品牌名城" },
378
+ { "type": "normal", "prop": "out", "align": "center", "label": "扩展信息" },
379
+ // {"type": "status", "prop": "status", "align": "center", "label": "扩展信息"},
380
+ ],
381
+ baseList: [{
382
+ title: '',
383
+ items: [],
384
+ },],
385
+ subContentData: [{
386
+ title: '',
387
+ items: [],
388
+ },],
389
+ packsRowTest: [{
390
+ title: '',
391
+ items: [],
392
+ },],
393
+ detailKey: 'detailKey',
394
+ isBorder: false,
395
+ imagesData: [],
396
+ againButtonData: [
397
+ {
398
+ action: "send_good",
399
+ text: "发货",
400
+ }
401
+ ],
402
+ selfForm: {
403
+ time: '',
404
+ content: ''
405
+ },
406
+ selfDialog: false,
407
+ pageSize: 1, //当前页面数量
408
+ hasNextPage: true, //是否有下一页
409
+ limit: 20, //搜索参数
410
+ total: 0,
411
+ showStep: false,
412
+ main_order_id: null,
413
+ sub_order_id: null,
414
+ baseInfoData: null,
415
+ subOrderData: [],
416
+ logistLine: [],
417
+ userForm: {
418
+ phone: '',
419
+ buy_phone_number: '',
420
+ receipt_phone: ''
421
+ },
422
+ userDialog: false,
423
+ mainKey: 'mainKey',
424
+ codeData: [],
425
+ dialogShow: false,
426
+ title: '电子码信息',
427
+ }
428
+ },
429
+ computed: {
430
+ isAwait () {
431
+ return checkPermission([permissions.enterprise_buy.syncPackageTrackWh])
432
+ },
433
+ isLookUser () {
434
+ return checkPermission([permissions.enterprise_buy.mainOrderContactWh])
435
+ },
436
+ isLookLogist () {
437
+ return checkPermission([permissions.enterprise_buy.logisticsMainOrderPackageTrackWh])
438
+ },
439
+ isLookCode () {
440
+ return checkPermission([permissions.corders.getSubOrderCodes])
441
+ },
442
+ ...mapState(['commonParams']),
443
+ },
444
+ created () {
445
+ console.log(this.commonParams,'aaaa');
446
+ this.main_order_id = this.$route.params['id']
447
+ this.business_code = this.$route.params['code']
448
+ this.getDetail()
449
+ },
450
+ methods: {
451
+ ...mapActions('enterprise_buy', ['mainOrderDetail','mainOrderContactWh','logisticsMainOrderPackageTrackWh', 'recordPackageTrackWh', 'syncPackageTrackWh', 'getSubOrderCodes']),
452
+
453
+ getDetail () {
454
+ let data = {
455
+ main_order_id: this.main_order_id,
456
+ }
457
+ this.mainOrderDetail(data).then(res => {
458
+ console.log(res,'aaaaaa')
459
+ // return
460
+ this.baseInfoData = res.data.detail_plus
461
+ this.subOrderData = res.data.sub_order_list
462
+ this.progressData = res.data.progress
463
+ if (res.data.card_list && res.data.card_list.length > 0) {
464
+ this.cardData = res.data.card_list
465
+ }
466
+ // this.contactData = res.data.contact
467
+ this.packsData = res['data']['package_list']
468
+ this.cardKey = Date.now()
469
+ if (this.packsData.length > 0) {
470
+ this.packsData.map(item => {
471
+ item.logistics_send_time = getTimeFormat(item.logistics_send_time)
472
+ })
473
+ this.packsRowData = this.packsData[0]
474
+ this.packsRowTest = [{
475
+ title: '',
476
+ items: [
477
+ { label: '发货状态', value: this.packsData[0]['logistics_status_name'], type: 'normal', field: 'status' },
478
+ { label: '发货时间', value: this.packsData[0]['logistics_send_time'], type: 'normal', field: 'time' },
479
+ { label: '快递公司', value: this.packsData[0]['logistics_company'], type: 'normal', field: 'logistics_company' },
480
+ { label: '渠道拆单号', value: this.packsData[0]['channel_package_id'], type: 'normal', field: 'channel_package_id' },
481
+ { label: '快递单号', value: this.packsData[0]['logistics_number'], type: 'normal', field: 'logistics_number' },
482
+ { label: '商品信息', value: '', type: 'normal', field: 'images' },
483
+ ],
484
+ },]
485
+ this.detailKey = Date.now()
486
+ let imgData = []
487
+ let num = 0
488
+ this.packsData[0]['products'].map(item => {
489
+ imgData.push(
490
+ {
491
+ url: this.getImageFullPath(item.product_thumb),
492
+ num: item.product_num
493
+ }
494
+ )
495
+ })
496
+ this.imagesData = imgData
497
+ }
498
+ this.progressData.map((item, index) => {
499
+ item.time = getTimeFormat(item.time)
500
+ if (item.is_finish === true) {
501
+ this.activiedNum = index + 1
502
+ }
503
+ })
504
+ res.data.sub_order_list.map(item => {
505
+ item.products.map(i => {
506
+ if (i.product_form_data) {
507
+ i.product_form_data = JSON.parse(i.product_form_data)
508
+ }
509
+ })
510
+
511
+ })
512
+ this.baseList = res['data']['detail_plus']['containers']
513
+ this.mainKey = Date.now()
514
+ })
515
+ .catch(err => {
516
+ console.log(err)
517
+ })
518
+ },
519
+ /**
520
+ * @description 拆单详情
521
+ * @param item 列表对象
522
+ */
523
+ toLink (item) {
524
+ return `/corders/sub_detail/${item}?p=${this.$route.query.p}`
525
+ },
526
+ changeTab (index) {
527
+ this.tabIndex = index
528
+ this.packsRowData = this.packsData[index]
529
+ let imgData = []
530
+ let num = 0
531
+ this.packsData[index]['products'].map(item => {
532
+ imgData.push(
533
+ {
534
+ url: this.getImageFullPath(item.product_thumb),
535
+ num: item.product_num
536
+ }
537
+ )
538
+ })
539
+ this.imagesData = imgData
540
+ this.packsRowTest = [{
541
+ title: '',
542
+ items: [
543
+ { label: '发货状态', value: this.packsData[index]['logistics_status_name'], type: 'normal', field: 'status' },
544
+ { label: '发货时间', value: this.packsData[index]['logistics_send_time'], type: 'normal', field: 'time' },
545
+ { label: '快递公司', value: this.packsData[index]['logistics_company'], type: 'normal', field: 'logistics_company' },
546
+ { label: '渠道拆单号', value: this.packsData[index]['channel_package_id'], type: 'normal', field: 'channel_package_id' },
547
+ { label: '快递单号', value: this.packsData[index]['logistics_number'], type: 'normal', field: 'logistics_number' },
548
+ { label: '商品信息', value: '', type: 'normal', field: 'images' },
549
+ ],
550
+ },]
551
+ this.detailKey = Date.now()
552
+ if (this.showStep === true) {
553
+ this.handleShowStep()
554
+ }
555
+ },
556
+ handleChange () {
557
+ console.log(this.multipleSelection, 'eee')
558
+ },
559
+
560
+ copyOrderId (order_id) {
561
+ this.copy(order_id)
562
+ },
563
+ copy (data) {
564
+ let url = data
565
+ let oInput = document.createElement('input')
566
+ oInput.value = url
567
+ document.body.appendChild(oInput)
568
+ oInput.select() // 选择对象
569
+ document.execCommand("Copy") // 执行浏览器复制命令
570
+ this.$message({
571
+ message: '复制成功',
572
+ type: 'success'
573
+ })
574
+ oInput.remove()
575
+ },
576
+ handleCustom ({ row, btn }) {
577
+ // console.log(row, btn)
578
+ },
579
+ /**自定义物流信息**/
580
+ handeleSelfPacks () {
581
+ this.selfDialog = true
582
+ },
583
+ /**自定义物流信息确定**/
584
+ handleSelf () {
585
+ this.selfForm.time = this.$xdHelper.divisionFloatNumber(this.selfForm.time, 1000)
586
+ this.recordPackageTrackWh({ ...this.selfForm, package_id: this.packsRowData['package_id'] })
587
+ .then(res => {
588
+ this.$message.success('操作成功')
589
+ this.selfForm = {}
590
+ this.selfDialog = false
591
+ }).catch(err => {
592
+ console.log(err, 'err')
593
+ })
594
+ },
595
+ /**自定义物流信息取消**/
596
+ handleCloseSelf () {
597
+ this.selfDialog = false
598
+ },
599
+
600
+ /**
601
+ * @description 翻页处理方法
602
+ * @param page {Number} 访问页面页码数
603
+ */
604
+ handlePagination (page) {
605
+ this.pageSize = page
606
+ // this.getList();
607
+ }, //todo
608
+ /**查看物流**/
609
+ handleShowStep () {
610
+ console.log(this.packsRowData, 'this.packsRowData ')
611
+ this.logisticsMainOrderPackageTrackWh({
612
+ main_order_id: this.main_order_id,
613
+ package_id: this.packsRowData['package_id']
614
+ }).then(res => {
615
+ res.data.data.map(item => {
616
+ item.time = getTimeFormat(item.time)
617
+ })
618
+ this.logistLine = res.data.data
619
+ this.showStep = true
620
+ }).catch(err => {
621
+ console.log(err, 'err')
622
+ })
623
+
624
+ },
625
+ getLinkSub () {
626
+ return '111'
627
+ },
628
+ getProductInfo (value) {
629
+ return {
630
+ id: value.product_id,
631
+ thumb: this.getImageFullPath(value.product_thumb),
632
+ title: value.product_name,
633
+ icon: value.type === 'good' ? '实' : value.type === 'virtual' ? '虚' : value.type === 'card' ? '卡' : value.type === 'network' ? '生' : value.type === 'settle' ? '核' : '',
634
+ specific: value.product_sku_name, params: { width: 150, height: 150 },
635
+ status: value.aftersale_status_name ? value.aftersale_method_name ? value.aftersale_method_name + '-' + value.aftersale_status_name : value.aftersale_status_name : '',
636
+ aftersale_orderid: value.aftersale_orderid
637
+ }
638
+ },
639
+ /**查看用户信息**/
640
+ handleLookUser () {
641
+ this.mainOrderContactWh({ main_order_id: this.main_order_id })
642
+ .then(res => {
643
+ if (res.data.contact.buy_phone_number) {
644
+ this.userForm.buy_phone_number = res.data.contact.buy_phone_number
645
+ }
646
+ if (res.data.contact.buyer) {
647
+ this.userForm.phone = res.data.contact.buyer.phone_number
648
+ }
649
+ if (res.data.contact.receipt_info) {
650
+ this.userForm.receipt_phone = res.data.contact.receipt_info.phone_number
651
+ }
652
+ this.userDialog = true
653
+ }).catch(err => {
654
+ console.log(err, 'err')
655
+ })
656
+ },
657
+ /**同步物流信息**/
658
+ handleUpdate () {
659
+ if (!this.packsRowData['logistics_number'] || !this.packsRowData['logistics_company_code']) {
660
+ this.$message.error('缺少物流信息,不能同步物流信息')
661
+ return
662
+ }
663
+ let loading = Loading.service({})
664
+ this.syncPackageTrackWh({
665
+ order_package_id: this.packsRowData['package_id'],
666
+ express_number: this.packsRowData['logistics_number'],
667
+ express_code: this.packsRowData['logistics_company_code'],
668
+ main_order_id:this.main_order_id
669
+ }).then(res => {
670
+ if (this.showStep === true) {
671
+ setTimeout(item => {
672
+ this.handleShowStep()
673
+ this.$message.success('同步成功')
674
+ loading.close()
675
+ }, 3000)
676
+ } else {
677
+ this.$message.success('同步成功')
678
+ loading.close()
679
+ }
680
+ console.log(res, 'sss')
681
+ }).catch(err => {
682
+ console.log(err, 'err')
683
+ loading.close()
684
+ })
685
+ },
686
+ //电子码可点击查看
687
+ handleGetCodes (id) {
688
+ this.getSubOrderCodes({ sub_order_id: id })
689
+ .then(res => {
690
+ console.log(res, 'res')
691
+ this.codeData = res['data']['codes']
692
+ this.dialogShow = true
693
+ }).catch(err => {
694
+ console.log(err, 'err')
695
+ })
696
+ },
697
+ handleSaleDetail (e) {
698
+ if (e.aftersale_orderid) {
699
+ window.open(`/corders/service_detail/${e.aftersale_orderid}`,'_blank')
700
+ }
701
+ },
702
+ }
703
+ }
704
+ </script>
705
+
706
+ <style scoped lang="scss">
707
+ .app-container {
708
+ font-size: 14px;
709
+ color: #606266;
710
+ }
711
+
712
+ .app-container__title {
713
+ font-size: 16px;
714
+ line-height: 24px;
715
+ padding: 0 0 10px;
716
+ font-weight: bold;
717
+ }
718
+
719
+ @media screen and (max-width: 768px) {
720
+ .app-container__title {
721
+ padding: 0 0 10px;
722
+ }
723
+ }
724
+
725
+ .list {
726
+ div {
727
+ margin: 10px 0;
728
+ }
729
+ }
730
+
731
+ image {
732
+ width: 100px;
733
+ height: 80px;
734
+ }
735
+
736
+ .app-container__base {
737
+ /*padding: 10px;*/
738
+
739
+ &-title {
740
+ font-size: 20px;
741
+ }
742
+
743
+ &-ul {
744
+ width: 100%;
745
+ }
746
+
747
+ &-li {
748
+ margin: 10px;
749
+ display: inline-block;
750
+ width: 30%;
751
+ }
752
+ }
753
+
754
+ .step ::v-deep .el-step__main {
755
+ }
756
+
757
+ .step ::v-deep .el-step__icon-inner {
758
+ display: none;
759
+ }
760
+ .app-container__list-table {
761
+ padding: 5px 0;
762
+
763
+ &-title {
764
+ margin: 10px 0;
765
+ }
766
+
767
+ &-wish {
768
+ margin: 5px 0;
769
+ }
770
+ }
771
+
772
+ .app-container__pack {
773
+ &-title {
774
+ font-size: 20px;
775
+ margin: 10px 0;
776
+ display: flex;
777
+ justify-content: space-between;
778
+ padding-bottom: 5px;
779
+ border-bottom: 1px solid #333333;
780
+
781
+ &-tab {
782
+ display: flex;
783
+
784
+ & > div {
785
+ margin-right: 10px;
786
+ cursor: pointer;
787
+ }
788
+ }
789
+ }
790
+
791
+ &-base {
792
+ display: flex;
793
+
794
+ & > div {
795
+ margin-right: 30px;
796
+ margin-bottom: 10px;
797
+ }
798
+ }
799
+ }
800
+
801
+ .app-container__pay {
802
+ &-title {
803
+ font-size: 20px;
804
+ margin: 10px 0;
805
+ }
806
+ }
807
+
808
+ .image_list {
809
+ width: 50px;
810
+ height: 50px;
811
+ display: inline-block;
812
+ margin-right: 10px;
813
+
814
+ img {
815
+ width: 100%;
816
+ height: 100%;
817
+ }
818
+ }
819
+
820
+ .app-container__pack-title {
821
+ border-bottom: none !important;
822
+ }
823
+ .code_box {
824
+ margin-bottom: 20px;
825
+
826
+ & > div:first-child {
827
+ }
828
+ .items {
829
+ display: flex;
830
+ margin: 5px;
831
+ align-items: center;
832
+ & > div:first-child {
833
+ flex-shrink: 0;
834
+ width: 100px;
835
+ color: #333333;
836
+ }
837
+ }
838
+ }
839
+ .el-steps--vertical {
840
+ height: auto;
841
+ }
842
+ .logist_box{
843
+ display: flex;
844
+ justify-content: space-between;
845
+ &>div{
846
+ margin-right: 10px;
847
+ }
848
+ &_button{
849
+ &>div{
850
+ display: block;
851
+ margin-bottom: 10px;
852
+ }
853
+ }
854
+ }
855
+ @media screen and (max-width: 768px) {
856
+ .logist_box{
857
+ display: block;
858
+ }
859
+ }
860
+ </style>