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.
- package/LICENSE +21 -0
- package/README.md +90 -0
- package/library/gulpfile.js/const.js +51 -0
- package/library/gulpfile.js/index.js +237 -0
- package/library/gulpfile.js/util.js +114 -0
- package/library/viewModules/config.js +75 -0
- package/library/viewModules/viewStat/router/supplierStat.js +33 -0
- package/library/viewModules/viewStat/schemas/supplier.stat.js +70 -0
- package/library/viewModules/viewStat/schemas.js +18 -0
- package/library/viewModules/viewStat/viewsStat/index/components/stat-all.vue +233 -0
- package/library/viewModules/viewStat/viewsStat/index/components/stat-product.vue +129 -0
- package/library/viewModules/viewStat/viewsStat/index/components/stat-supplier.vue +124 -0
- package/library/viewModules/viewStat/viewsStat/index/components/table-category.vue +309 -0
- package/library/viewModules/viewStat/viewsStat/index/components/table-product.vue +316 -0
- package/library/viewModules/viewStat/viewsStat/index/components/table-supplier.vue +276 -0
- package/library/viewModules/viewStat/viewsStat/index/index.vue +117 -0
- package/library/viewModules/viewTask/router/tasks.js +34 -0
- package/library/viewModules/viewTask/schemas/tasks.js +52 -0
- package/library/viewModules/viewTask/viewTask/list.vue +195 -0
- package/library/viewModules/viewsEnterpriseBuy/router/enterprise_buy.js +91 -0
- package/library/viewModules/viewsEnterpriseBuy/schemas/enterprise_buy.js +420 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/OrderInfoButton.vue +550 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/cardList.vue +119 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/expressCopy.vue +259 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/operateHistory.vue +164 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/send_list.vue +395 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/storeList.vue +100 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/compontents/workHistory.vue +163 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/detail.vue +503 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/list.vue +635 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/order_detail.vue +860 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/set_create.vue +219 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/set_list.vue +237 -0
- package/library/viewModules/viewsEnterpriseBuy/viewsEnterpriseBuy/table-card.vue +180 -0
- package/library/viewModules/viewsFinance/router/balance.js +75 -0
- package/library/viewModules/viewsFinance/router/finance.js +30 -0
- package/library/viewModules/viewsFinance/schemas/trade.record.js +153 -0
- package/library/viewModules/viewsFinance/schemas/wallet.js +116 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/components/listChannel.vue +220 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/components/listOpenapi.vue +260 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/components/listPartner.vue +217 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/components/listSupplier.vue +229 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/detail_channel.vue +401 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/detail_openapi.vue +364 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/detail_partner.vue +633 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/detail_supplier.vue +417 -0
- package/library/viewModules/viewsFinance/viewsFinance/balance/list.vue +75 -0
- package/library/viewModules/viewsFinance/viewsFinance/index.vue +191 -0
- package/library/viewModules/viewsLimit/router/buyLimit/buyLimit.js +31 -0
- package/library/viewModules/viewsLimit/schemas/buyLimit.js +22 -0
- package/library/viewModules/viewsLimit/viewsLimit/index.vue +211 -0
- package/package.json +114 -0
|
@@ -0,0 +1,635 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-container">
|
|
3
|
+
<template>
|
|
4
|
+
<div class="app-container__title">{{title}}</div>
|
|
5
|
+
<el-card class="app-container__search">
|
|
6
|
+
<xd-search
|
|
7
|
+
dateFilter
|
|
8
|
+
:mainFilter="tabData"
|
|
9
|
+
:timeType="true"
|
|
10
|
+
mainFilterKey="tab"
|
|
11
|
+
:mainFilterIndex="mainFilterIndex"
|
|
12
|
+
labelWidth="100px"
|
|
13
|
+
v-if="searchForm.length > 0"
|
|
14
|
+
v-model="searchParams"
|
|
15
|
+
:list="searchForm"
|
|
16
|
+
@onSearch="handleSearch"
|
|
17
|
+
@onDone="getList"
|
|
18
|
+
@onTabClick="handleSearchTabClick"
|
|
19
|
+
></xd-search>
|
|
20
|
+
</el-card>
|
|
21
|
+
<el-card class="app-container__list">
|
|
22
|
+
<div class="app-container__list-pagination">
|
|
23
|
+
<div></div>
|
|
24
|
+
<div v-if="isExport">
|
|
25
|
+
<!-- <el-button type="primary" @click="handleExport">导出</el-button> -->
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<div class="app-container__list-table">
|
|
29
|
+
<xd-table
|
|
30
|
+
:default-select="['12987122','12987126']"
|
|
31
|
+
:get-link="getLink"
|
|
32
|
+
:headers="orderHeaders"
|
|
33
|
+
:key="tableKey"
|
|
34
|
+
:list="tables"
|
|
35
|
+
:hasExpand="true"
|
|
36
|
+
:stripe="false"
|
|
37
|
+
:custom-function="handleCustom"
|
|
38
|
+
default-expand-all
|
|
39
|
+
@onClick="handleCilck"
|
|
40
|
+
@onSelect="handleSelect"
|
|
41
|
+
>
|
|
42
|
+
<template slot="expand" slot-scope="scope">
|
|
43
|
+
<xd-table
|
|
44
|
+
is-border
|
|
45
|
+
:stripe="false"
|
|
46
|
+
:show-header="false"
|
|
47
|
+
:key="childKey"
|
|
48
|
+
:get-link="getLinkChild"
|
|
49
|
+
:headers="orderHeadersIn"
|
|
50
|
+
:list="scope.row.orderInfo"
|
|
51
|
+
:custom-function="item=>handleInCustom(item,scope.row)"
|
|
52
|
+
default-expand-all
|
|
53
|
+
@onClick="(row)=>{handleCilck(row, scope.row)}"
|
|
54
|
+
@onSelect="handleSelect"
|
|
55
|
+
>
|
|
56
|
+
<template slot="status" slot-scope="scope">{{scope.row.order_status_name}}</template>
|
|
57
|
+
<template slot="operate" slot-scope="scope">
|
|
58
|
+
<order-button
|
|
59
|
+
v-if="isOperate"
|
|
60
|
+
:events="scope.row.buttons"
|
|
61
|
+
:purchase_main_order_id="scope.row.purchase_main_order_id"
|
|
62
|
+
@refresh="handeleRefresh"
|
|
63
|
+
></order-button>
|
|
64
|
+
<div style="display:flex;justify-content: center;" v-if="scope.row.jfb_main_order_id">
|
|
65
|
+
<el-button style="margin-top:10px;" v-if="isLookOrder" type="primary" size="small" @click="handleToOrder(scope.row.jfb_main_order_id)">查看订单</el-button>
|
|
66
|
+
</div>
|
|
67
|
+
</template>
|
|
68
|
+
</xd-table>
|
|
69
|
+
</template>
|
|
70
|
+
<template slot="info" slot-scope="scope">
|
|
71
|
+
<div class="order-table-info" v-html="getInfo(scope.row)"></div>
|
|
72
|
+
</template>
|
|
73
|
+
</xd-table>
|
|
74
|
+
</div>
|
|
75
|
+
<div class="app-container__list-pagination">
|
|
76
|
+
<xd-pagination-jfb
|
|
77
|
+
:key="paginationKey"
|
|
78
|
+
v-if="initPage"
|
|
79
|
+
v-model="currentPage"
|
|
80
|
+
:next-page="nextPage"
|
|
81
|
+
:get-total="getCountList"
|
|
82
|
+
@onPagination="handlePagination"
|
|
83
|
+
></xd-pagination-jfb>
|
|
84
|
+
</div>
|
|
85
|
+
</el-card>
|
|
86
|
+
</template>
|
|
87
|
+
<xd-dialog :show.sync="dialogExport" title="请输入文件名称" width="500px">
|
|
88
|
+
<el-form :model="exportFrom" :rules="exportRules" ref="exportRuleForm" label-width="80px">
|
|
89
|
+
<el-form-item label="文件名称" prop="name">
|
|
90
|
+
<el-input v-model="exportFrom.name" placeholder="请输入文件名称" />
|
|
91
|
+
</el-form-item>
|
|
92
|
+
</el-form>
|
|
93
|
+
<div slot="btn">
|
|
94
|
+
<el-button type="primary" @click="saveExportForm">确定</el-button>
|
|
95
|
+
<el-button type="default" @click="cancelExportForm">返回</el-button>
|
|
96
|
+
</div>
|
|
97
|
+
</xd-dialog>
|
|
98
|
+
</div>
|
|
99
|
+
</template>
|
|
100
|
+
|
|
101
|
+
<script>
|
|
102
|
+
import XdSearch from "@/components/XdSearch"
|
|
103
|
+
import XdTableImage from "@/components/XdTableImage"
|
|
104
|
+
import {
|
|
105
|
+
mapActions,
|
|
106
|
+
mapState,
|
|
107
|
+
} from 'vuex'
|
|
108
|
+
import { Loading } from 'element-ui'
|
|
109
|
+
import XdPagination from "@/components/XdPagination.vue"
|
|
110
|
+
import XdTable from "@/components/XdTable"
|
|
111
|
+
import XdTablePrice from "@/components/XdTablePrice"
|
|
112
|
+
import XdStoreProduct from "@/components/XdStoreProduct"
|
|
113
|
+
import { getOptions } from "@/utils/options"
|
|
114
|
+
import XdDialog from "@/components/XdDialog"
|
|
115
|
+
import XdDetail from "@/components/XdDetail"
|
|
116
|
+
import checkPermission from "@/utils/permission"
|
|
117
|
+
import permissions from "@/constant/permissions"
|
|
118
|
+
import XdPaginationJfb from "@/components/XdPaginationJfb"
|
|
119
|
+
import orderButton from "./compontents/OrderInfoButton"
|
|
120
|
+
export default {
|
|
121
|
+
name: "orderCustomList",
|
|
122
|
+
components: {
|
|
123
|
+
XdPagination,
|
|
124
|
+
XdSearch,
|
|
125
|
+
XdTableImage,
|
|
126
|
+
XdTable,
|
|
127
|
+
XdTablePrice,
|
|
128
|
+
XdStoreProduct,
|
|
129
|
+
XdDialog,
|
|
130
|
+
XdDetail,
|
|
131
|
+
XdPaginationJfb,
|
|
132
|
+
orderButton
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
// mixins: [downloadString, getChannelList],
|
|
136
|
+
|
|
137
|
+
data () {
|
|
138
|
+
return {
|
|
139
|
+
page: 1,//当前页面数量
|
|
140
|
+
hasNextPage: true,
|
|
141
|
+
limit: 20,
|
|
142
|
+
tab: '',
|
|
143
|
+
isBorder: false,
|
|
144
|
+
searchForm: [], //搜索区域模块表单
|
|
145
|
+
searchParams: null, // 搜索参数
|
|
146
|
+
tables: [],
|
|
147
|
+
multipleSelection: [],
|
|
148
|
+
multipleSelectionData: [],
|
|
149
|
+
tableRefresh: 'tableRefresh',
|
|
150
|
+
total: 0,
|
|
151
|
+
tabData: [],
|
|
152
|
+
tableKey: 'tableKey',
|
|
153
|
+
orderHeadersIn: [
|
|
154
|
+
{ type: 'normal', prop: 'user_name',sort: true, align: 'center', width: 205, label: '客户名称', rowspan: 4 },
|
|
155
|
+
{ type: 'normal', prop: 'order_type_name', align: 'center', label: '清单类型' },
|
|
156
|
+
{ type: 'normal', prop: 'product_num_total', align: 'center', label: '商品数量' },
|
|
157
|
+
{ type: 'normal', prop: 'order_status_name', align: 'center', label: '订单状态' },
|
|
158
|
+
// #ifdef admin oa-finance
|
|
159
|
+
{ type: 'price', prop: 'dist_amount', align: 'center', label: '订单金额' },
|
|
160
|
+
// #endif
|
|
161
|
+
// #ifdef partner-wholesale
|
|
162
|
+
{ type: 'price', prop: 'total_amount', align: 'center', label: '订单金额' },
|
|
163
|
+
// #endif
|
|
164
|
+
// #ifdef admin partner-wholesale
|
|
165
|
+
{ type: 'price', prop: 'user_settlement_amount', align: 'center', label: '用户实际结算金额' },
|
|
166
|
+
// #endif
|
|
167
|
+
// #ifdef oa-finance
|
|
168
|
+
{ type: 'price', prop: 'partner_actual_pay_amount', align: 'center', label: '加盟商实际支付金额' },
|
|
169
|
+
// #endif
|
|
170
|
+
// #ifdef oa-finance admin
|
|
171
|
+
{ type: 'normal', prop: 'partner_name', align: 'center', label: '加盟商' },
|
|
172
|
+
// #endif
|
|
173
|
+
{
|
|
174
|
+
type: 'operate',
|
|
175
|
+
align: 'center',
|
|
176
|
+
prop: 'operate',
|
|
177
|
+
width: 110,
|
|
178
|
+
label: '操作',
|
|
179
|
+
isCheckHide: true,
|
|
180
|
+
values: [
|
|
181
|
+
// {ui: 'text-button', target: '_blank', name: '发货', type: 'text'},
|
|
182
|
+
]
|
|
183
|
+
}
|
|
184
|
+
],
|
|
185
|
+
list: [],
|
|
186
|
+
mainFilterIndex: '',
|
|
187
|
+
priceKey: 'priceKey',
|
|
188
|
+
childKey: 'childKey',
|
|
189
|
+
paginationKey: 'paginationKey',//刷新插件key
|
|
190
|
+
initPage: false, //是否为首次加载
|
|
191
|
+
currentPage: '1', //请求访问的页面
|
|
192
|
+
nextPage: '', //下一页访问页码
|
|
193
|
+
//文件名称
|
|
194
|
+
dialogExport:false,
|
|
195
|
+
exportFrom:{
|
|
196
|
+
name:'',
|
|
197
|
+
},
|
|
198
|
+
exportRules: {
|
|
199
|
+
name: [
|
|
200
|
+
{
|
|
201
|
+
required: true,
|
|
202
|
+
message: "请输入文件名称",
|
|
203
|
+
trigger: "blur",
|
|
204
|
+
},
|
|
205
|
+
{ min: 0, max: 20, message: '文件名称长度不能超过20', trigger: 'blur' }
|
|
206
|
+
],
|
|
207
|
+
},
|
|
208
|
+
buttonData:[],
|
|
209
|
+
}
|
|
210
|
+
},
|
|
211
|
+
watch: {
|
|
212
|
+
|
|
213
|
+
},
|
|
214
|
+
computed: {
|
|
215
|
+
...mapState(['commonParams']),
|
|
216
|
+
isExport () {
|
|
217
|
+
return checkPermission([permissions.enterprise_buy.mainOrderListExport])
|
|
218
|
+
},
|
|
219
|
+
//查看集采单
|
|
220
|
+
isLook () {
|
|
221
|
+
return checkPermission([permissions.enterprise_buy.purchaseMainOrderInfo])
|
|
222
|
+
},
|
|
223
|
+
//查看订单
|
|
224
|
+
isLookOrder(){
|
|
225
|
+
return checkPermission([permissions.enterprise_buy.mainOrderDetail])
|
|
226
|
+
},
|
|
227
|
+
isOperate(){
|
|
228
|
+
return checkPermission([permissions.enterprise_buy.purchaseListOperate])
|
|
229
|
+
},
|
|
230
|
+
orderHeaders () {
|
|
231
|
+
return [
|
|
232
|
+
{ type: 'selection' },
|
|
233
|
+
{ type: 'expand', hide: true },
|
|
234
|
+
{ type: 'normal', prop: 'info', align: 'center', width: 150, label: '客户名称' },
|
|
235
|
+
{ type: 'normal', prop: 'order_type_name', align: 'center', label: '清单类型' },
|
|
236
|
+
{ type: 'normal', prop: 'product_num_total1', align: 'center', label: '商品数量' },
|
|
237
|
+
{ type: 'normal', prop: 'order_status_name', align: 'center', label: '订单状态' },
|
|
238
|
+
{ type: 'price', prop: 'total', align: 'center', label: '订单金额' },
|
|
239
|
+
// #ifdef admin partner-wholesale
|
|
240
|
+
{ type: 'price', prop: 'user_settlement_amount1', align: 'center', label: '用户实际结算金额' },
|
|
241
|
+
// #endif
|
|
242
|
+
// #ifdef oa-finance
|
|
243
|
+
{ type: 'price', prop: 'partner_actual_pay_amount1', align: 'center', label: '加盟商实际支付金额' },
|
|
244
|
+
// #endif
|
|
245
|
+
// #ifdef oa-finance admin
|
|
246
|
+
{ type: 'normal', prop: 'partner_name', align: 'center', label: '加盟商' },
|
|
247
|
+
// #endif
|
|
248
|
+
{
|
|
249
|
+
type: 'operate',
|
|
250
|
+
align: 'center',
|
|
251
|
+
prop: 'operate',
|
|
252
|
+
width: 110,
|
|
253
|
+
label: '操作',
|
|
254
|
+
values: [
|
|
255
|
+
this.isLook&&{ ui: 'text-link', target: '_self', name: '查看集采单', type: 'text' },
|
|
256
|
+
].filter(i => i)
|
|
257
|
+
}
|
|
258
|
+
]
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
async created () {
|
|
262
|
+
console.log(this.commonParams.xnamespace,'lplplplp');
|
|
263
|
+
|
|
264
|
+
this.title = this.$route.meta.title
|
|
265
|
+
let tabData = await this.tabItems()
|
|
266
|
+
this.tabData = tabData.data.items
|
|
267
|
+
this.tabData.unshift({label:'全部',value:'all'})
|
|
268
|
+
console.log(tabData,'yyyy')
|
|
269
|
+
// getOptions([{
|
|
270
|
+
// server: 'order-partner',
|
|
271
|
+
// fn: 'main-order-status',
|
|
272
|
+
// path: 'p1',
|
|
273
|
+
// }, {
|
|
274
|
+
// server: 'order-public',
|
|
275
|
+
// fn: 'order-type',
|
|
276
|
+
// path: 'p1',
|
|
277
|
+
// },])
|
|
278
|
+
// .then(res => {
|
|
279
|
+
// console.log(res, 'ttt')
|
|
280
|
+
// res[0]['data']['list'].map(item => {
|
|
281
|
+
// item.value = item.value.toString()
|
|
282
|
+
// })
|
|
283
|
+
// this.tabData = res[0]['data']['list']
|
|
284
|
+
// this.tab = Date.now()
|
|
285
|
+
// this.initSearchForm(res)
|
|
286
|
+
// })
|
|
287
|
+
// .catch(err => {
|
|
288
|
+
|
|
289
|
+
// })
|
|
290
|
+
this.initSearchForm({})
|
|
291
|
+
|
|
292
|
+
},
|
|
293
|
+
|
|
294
|
+
methods: {
|
|
295
|
+
|
|
296
|
+
...mapActions('enterprise_buy',
|
|
297
|
+
[
|
|
298
|
+
'purchaseMainOrder',
|
|
299
|
+
'tabItems'
|
|
300
|
+
]
|
|
301
|
+
),
|
|
302
|
+
getList () {
|
|
303
|
+
//请求数据
|
|
304
|
+
let params = this.handleGetSearchForm()
|
|
305
|
+
let loading = Loading.service({})
|
|
306
|
+
this.purchaseMainOrder(params).then(res => {
|
|
307
|
+
const { orders, total_size, next_page_token } = res.data
|
|
308
|
+
orders.map(item => {
|
|
309
|
+
item.confirm_time = window.getTimeFormat(item['main_order']['confirm_time'])
|
|
310
|
+
item.purchase_main_order_id = item['main_order']['purchase_main_order_id']
|
|
311
|
+
item.main_order.buttons = item.buttons
|
|
312
|
+
item.orderInfo = []
|
|
313
|
+
item.orderInfo.push(item.main_order)
|
|
314
|
+
return item
|
|
315
|
+
})
|
|
316
|
+
this.tables = orders
|
|
317
|
+
console.log(this.tables, ' this.tables,11')
|
|
318
|
+
this.total = total_size
|
|
319
|
+
this.priceKey = Date.now()
|
|
320
|
+
this.childKey = Date.now()
|
|
321
|
+
this.nextPage = next_page_token
|
|
322
|
+
if (!this.initPage) this.initPage = true
|
|
323
|
+
loading.close()
|
|
324
|
+
}).catch(e => {
|
|
325
|
+
console.log(e, 'eeee')
|
|
326
|
+
loading.close()
|
|
327
|
+
})
|
|
328
|
+
},
|
|
329
|
+
getCountList (cb) {
|
|
330
|
+
cb(this.total)
|
|
331
|
+
},
|
|
332
|
+
handleGetSearchForm() {
|
|
333
|
+
let needFilter = JSON.parse(JSON.stringify(this.searchParams))
|
|
334
|
+
if (this.searchParams.sale_account_list) {
|
|
335
|
+
needFilter.sale_account = this.searchParams.sale_account_list[0]['value']
|
|
336
|
+
}
|
|
337
|
+
return {
|
|
338
|
+
tab: this.searchParams.tab || 'all',
|
|
339
|
+
filter: this.searchParams.confirm_start_time ? { ...needFilter, } : needFilter,
|
|
340
|
+
page_token: this.currentPage.toString(),
|
|
341
|
+
page_size: this.limit
|
|
342
|
+
}
|
|
343
|
+
},
|
|
344
|
+
/**下载订单**/
|
|
345
|
+
handleExport () {
|
|
346
|
+
this.dialogExport = true
|
|
347
|
+
},
|
|
348
|
+
//导出确定
|
|
349
|
+
saveExportForm(){
|
|
350
|
+
this.$refs['exportRuleForm'].validate((valid) => {
|
|
351
|
+
if (valid) {
|
|
352
|
+
let params = {
|
|
353
|
+
...this.handleGetSearchForm(),
|
|
354
|
+
file_ext: 'xlsx',
|
|
355
|
+
file_name: this.exportFrom.name,
|
|
356
|
+
export: true,
|
|
357
|
+
}
|
|
358
|
+
let loading = Loading.service({})
|
|
359
|
+
this.getMainOrderList(params).then(res => {
|
|
360
|
+
console.log(res, 'asdasda')
|
|
361
|
+
this.$message.success('导出任务已经开始执行,请去任务管理查看下载状态')
|
|
362
|
+
this.exportFrom.name = ''
|
|
363
|
+
this.dialogExport = false
|
|
364
|
+
loading.close()
|
|
365
|
+
}).catch(err => {
|
|
366
|
+
loading.close()
|
|
367
|
+
console.log(err, 'err')
|
|
368
|
+
})
|
|
369
|
+
} else {
|
|
370
|
+
console.log('error submit!!');
|
|
371
|
+
return false;
|
|
372
|
+
}
|
|
373
|
+
});
|
|
374
|
+
},
|
|
375
|
+
//导出取消
|
|
376
|
+
cancelExportForm(){
|
|
377
|
+
this.dialogExport = false
|
|
378
|
+
this.exportFrom.name = ''
|
|
379
|
+
this.$refs['exportRuleForm'].clearValidate()
|
|
380
|
+
},
|
|
381
|
+
/**
|
|
382
|
+
* @description 初始化搜索模块
|
|
383
|
+
*/
|
|
384
|
+
initSearchForm (res) {
|
|
385
|
+
let end = new Date().getTime()
|
|
386
|
+
let start = end - 60 * 60 * 24 * 7 * 1000
|
|
387
|
+
getOptions([
|
|
388
|
+
// #ifdef admin
|
|
389
|
+
{
|
|
390
|
+
server: 'partner-admin',
|
|
391
|
+
fn: 'partner',
|
|
392
|
+
path: 'p1',
|
|
393
|
+
params:{
|
|
394
|
+
page_token:'1',
|
|
395
|
+
page_size:500
|
|
396
|
+
}
|
|
397
|
+
}
|
|
398
|
+
// #endif
|
|
399
|
+
]).then(res => {
|
|
400
|
+
let searchForm = [
|
|
401
|
+
{
|
|
402
|
+
label: '集采单ID:', //label
|
|
403
|
+
ele: 'el-input',
|
|
404
|
+
valueKey: 'purchase_main_order_id', //form[valueKey]
|
|
405
|
+
value: '', //v-model
|
|
406
|
+
placeholder: '请输入ID'
|
|
407
|
+
},
|
|
408
|
+
{
|
|
409
|
+
label: '买家账号:', //label
|
|
410
|
+
ele: 'el-input',
|
|
411
|
+
valueKey: 'user_name', //form[valueKey]
|
|
412
|
+
value: '', //v-model
|
|
413
|
+
placeholder: '请输入买家账号'
|
|
414
|
+
},
|
|
415
|
+
{
|
|
416
|
+
label: '收货人姓名:', //label
|
|
417
|
+
ele: 'el-input',
|
|
418
|
+
valueKey: 'receipt_username', //form[valueKey]
|
|
419
|
+
value: '', //v-model
|
|
420
|
+
placeholder: '请输入收货人姓名'
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
label: '收货人手机号:', //label
|
|
424
|
+
ele: 'el-input',
|
|
425
|
+
valueKey: 'receipt_phone_number', //form[valueKey]
|
|
426
|
+
value: '', //v-model
|
|
427
|
+
placeholder: '请输入收货人手机号'
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
label: '下单时间:', //label
|
|
431
|
+
ele: 'xd-date', //package 名称
|
|
432
|
+
valueKey: ['confirm_start_time', 'confirm_end_time'], //form[valueKey]
|
|
433
|
+
value: [start, end], //v-model
|
|
434
|
+
format: 'yyyy/MM/dd HH:mm:ss',//时间显示格式
|
|
435
|
+
formatValue: 'timestamp', //输出时间格式
|
|
436
|
+
placeholder: ['开始时间', '结束时间'],
|
|
437
|
+
},
|
|
438
|
+
// #ifdef admin
|
|
439
|
+
{
|
|
440
|
+
label: '加盟商:', //label
|
|
441
|
+
ele: 'xd-select-list', //package 名称
|
|
442
|
+
valueKey: 'partner_id', //form[valueKey]
|
|
443
|
+
placeholder: '请选择加盟商',
|
|
444
|
+
multiple: false,
|
|
445
|
+
collapseTags: false,
|
|
446
|
+
className:'input40',
|
|
447
|
+
list: res[0].data.list,
|
|
448
|
+
},
|
|
449
|
+
// #endif
|
|
450
|
+
// {
|
|
451
|
+
// label: '销售账号:', //label
|
|
452
|
+
// ele: 'xd-select-list', //package 名称
|
|
453
|
+
// valueKey: 'sale_account', //form[valueKey]
|
|
454
|
+
// placeholder: '请选择销售账号',
|
|
455
|
+
// multiple: false,
|
|
456
|
+
// collapseTags: false,
|
|
457
|
+
// className:'input40',
|
|
458
|
+
// list: res[0].data.list,
|
|
459
|
+
// },
|
|
460
|
+
{
|
|
461
|
+
label: '销售账号:',
|
|
462
|
+
ele: 'xd-remote-select',
|
|
463
|
+
valueKey: 'sale_account_list',
|
|
464
|
+
value: [],
|
|
465
|
+
className: 'input40',
|
|
466
|
+
placeholder: `请选择销售账号`,
|
|
467
|
+
multiple: false,
|
|
468
|
+
collapseTags: false,
|
|
469
|
+
remoteSearch: (query, resolve) => {
|
|
470
|
+
getOptions({
|
|
471
|
+
server: 'idaas-admin',
|
|
472
|
+
fn: 'users',
|
|
473
|
+
path: 'p1',
|
|
474
|
+
params: {
|
|
475
|
+
page_token: '1',
|
|
476
|
+
page_size: '500',
|
|
477
|
+
pool_id:'jufubao',
|
|
478
|
+
keyword: query
|
|
479
|
+
}
|
|
480
|
+
})
|
|
481
|
+
.then(res => {
|
|
482
|
+
resolve(res.data.list)
|
|
483
|
+
})
|
|
484
|
+
.catch()
|
|
485
|
+
},
|
|
486
|
+
},
|
|
487
|
+
].filter(i=>i)
|
|
488
|
+
this.searchForm = searchForm
|
|
489
|
+
}).catch(err=>{
|
|
490
|
+
console.log(err,'err')
|
|
491
|
+
})
|
|
492
|
+
|
|
493
|
+
},
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* @description 搜索事件
|
|
497
|
+
* @param action 动作
|
|
498
|
+
* @param form 搜索请求参数
|
|
499
|
+
*/
|
|
500
|
+
handleSearch ({ action, form }) {
|
|
501
|
+
this.paginationKey = Date.now()
|
|
502
|
+
this.initPage = false
|
|
503
|
+
this.currentPage = '1'
|
|
504
|
+
setTimeout(() => {
|
|
505
|
+
this.$nextTick(() => {
|
|
506
|
+
this.getList()
|
|
507
|
+
})
|
|
508
|
+
}, 100)
|
|
509
|
+
},
|
|
510
|
+
|
|
511
|
+
/**
|
|
512
|
+
* @description 选中
|
|
513
|
+
*/
|
|
514
|
+
handleSelect ({ value, select }) {
|
|
515
|
+
this.multipleSelection = this.$xdHelper.getListKeyForValue(select, 'main_order_id')
|
|
516
|
+
this.multipleSelectionData = select
|
|
517
|
+
this.sendKey = Date.now()
|
|
518
|
+
},
|
|
519
|
+
|
|
520
|
+
handlePagination (page) {
|
|
521
|
+
this.page = page
|
|
522
|
+
this.getList()
|
|
523
|
+
},
|
|
524
|
+
|
|
525
|
+
getLink ({ row, value, index }) {
|
|
526
|
+
return `/enterprise_buy/detail/${row.purchase_main_order_id}`
|
|
527
|
+
},
|
|
528
|
+
|
|
529
|
+
handleCustom ({ action, data }) {
|
|
530
|
+
if (action === 'merge') {
|
|
531
|
+
//这里必须启用懂下来列才能使用下来功能
|
|
532
|
+
//合并列操作 从第3列开始一共合并5列,被合并列必须返回[0,0]
|
|
533
|
+
let mergeColumn = 4
|
|
534
|
+
let startColumn = 2
|
|
535
|
+
|
|
536
|
+
//rowIndex,columnIndex的值是从0开始
|
|
537
|
+
let { row, column, rowIndex, columnIndex } = data
|
|
538
|
+
|
|
539
|
+
if (columnIndex === startColumn) {
|
|
540
|
+
return [1, mergeColumn]
|
|
541
|
+
}
|
|
542
|
+
if (columnIndex > startColumn && columnIndex < startColumn + mergeColumn) {
|
|
543
|
+
return [0, 0]
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
},
|
|
547
|
+
|
|
548
|
+
handleInCustom ({ action, data }, row) {
|
|
549
|
+
if (action === 'merge') {
|
|
550
|
+
let mergeRow = 1
|
|
551
|
+
let maxRow = 100 //需要合并的最大行数
|
|
552
|
+
let { row, column, rowIndex, columnIndex } = data
|
|
553
|
+
|
|
554
|
+
//rowIndex,columnIndex的值是从0开始
|
|
555
|
+
let mergeColumns = [2, 3, 4, 5] //第4列需要合并行,并且合并到数组最大值,
|
|
556
|
+
|
|
557
|
+
const check = (i) => {
|
|
558
|
+
return mergeColumns.filter(key => {
|
|
559
|
+
return key === i
|
|
560
|
+
}).length > 0
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
if (rowIndex === 0) {
|
|
564
|
+
if (check(columnIndex)) {
|
|
565
|
+
return [maxRow, 1]
|
|
566
|
+
} else return [1, 1]
|
|
567
|
+
} else {
|
|
568
|
+
if (check(columnIndex)) {
|
|
569
|
+
return [0, 0]
|
|
570
|
+
} else return [1, 1]
|
|
571
|
+
}
|
|
572
|
+
}
|
|
573
|
+
if (action === 'btn') {
|
|
574
|
+
if (row.order_status === 'NO_DELIVERY') {
|
|
575
|
+
return true
|
|
576
|
+
}
|
|
577
|
+
return false
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
|
|
581
|
+
getInfo (row) {
|
|
582
|
+
return `集采单编号:${row.purchase_main_order_id}<span style="padding: 0 10px"></span>下单时间:${row.confirm_time}`
|
|
583
|
+
},
|
|
584
|
+
handleCilck ({ row, value, index }, parent) {
|
|
585
|
+
console.log('handleCilck', row, value, index, parent)
|
|
586
|
+
},
|
|
587
|
+
|
|
588
|
+
getLinkChild ({ row, value, index }) {
|
|
589
|
+
return `/table/form/${row.id}`
|
|
590
|
+
},
|
|
591
|
+
/**商品信息**/
|
|
592
|
+
getProductInfo (value) {
|
|
593
|
+
return {
|
|
594
|
+
thumb: this.getImageFullPath(value.product_thumb),
|
|
595
|
+
title: value.product_name,
|
|
596
|
+
icon: value.product_type === 'good' ? '实' : value.product_type === 'virtual' ? '虚' : value.product_type === 'card' ? '卡' : value.product_type === 'network' ? '生' : value.product_type === 'settle' ? '核' : '',
|
|
597
|
+
specific: value.product_sku_name, params: { width: 150, height: 150 },
|
|
598
|
+
status: value.aftersale_status_name ? value.aftersale_method_name ? value.aftersale_method_name + '-' + value.aftersale_status_name : value.aftersale_status_name : '',
|
|
599
|
+
brand_name: value.brand_name,
|
|
600
|
+
aftersale_orderid: value.aftersale_orderid
|
|
601
|
+
}
|
|
602
|
+
},
|
|
603
|
+
|
|
604
|
+
handleSearchTabClick (n) {
|
|
605
|
+
console.log("handleSearchTabClick", n)
|
|
606
|
+
this.$router.replace({ query: this.$route.query, hash: n })
|
|
607
|
+
},
|
|
608
|
+
//查看订单
|
|
609
|
+
handleToOrder(order_id){
|
|
610
|
+
this.$router.push(`/enterprise_buy/order_detail/${order_id}`)
|
|
611
|
+
},
|
|
612
|
+
onJfbTagForReload () {
|
|
613
|
+
this.getList()
|
|
614
|
+
},
|
|
615
|
+
handeleRefresh(){
|
|
616
|
+
this.getList()
|
|
617
|
+
},
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
</script>
|
|
621
|
+
|
|
622
|
+
<style scoped lang="scss">
|
|
623
|
+
.app-container__title {
|
|
624
|
+
font-size: 16px;
|
|
625
|
+
line-height: 24px;
|
|
626
|
+
padding: 0 0 20px;
|
|
627
|
+
font-weight: bold;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
@media screen and (max-width: 768px) {
|
|
631
|
+
.app-container__title {
|
|
632
|
+
padding: 0 0 10px;
|
|
633
|
+
}
|
|
634
|
+
}
|
|
635
|
+
</style>
|