jufubao-admin-library 1.1.170 → 1.1.172
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/library/viewModules/viewStore/router/store_selection.js +105 -0
- package/library/viewModules/viewStore/schemas/store_selection.js +98 -0
- package/library/viewModules/viewStore/viewStore/market/list.vue +2 -1
- package/library/viewModules/viewStore/viewStore/product_rule/create.vue +427 -0
- package/library/viewModules/viewStore/viewStore/product_rule/list.vue +239 -0
- package/library/viewModules/viewStore/viewStore/product_rule/log.vue +161 -0
- package/library/viewModules/viewStore/viewStore/rule/create.vue +2 -2
- package/library/viewModules/viewStore/viewStore/selected/list.vue +1 -1
- package/library/viewModules/viewsMaterial/viewsMaterial/components/CusUpload.vue +10 -4
- package/library/viewModules/viewsMaterial/viewsMaterial/components/uploadForm.vue +39 -3
- package/library/viewModules/viewsMaterial/viewsMaterial/dialogMaterial.vue +2 -1
- package/library/viewModules/viewsMaterial/viewsMaterial/material.vue +2 -0
- package/package.json +1 -1
|
@@ -112,6 +112,111 @@ const storeRouter = {
|
|
|
112
112
|
// roles:[store_selection.updateCacheDetail]
|
|
113
113
|
// }
|
|
114
114
|
// },
|
|
115
|
+
// #ifdef partner-mall
|
|
116
|
+
{
|
|
117
|
+
path: 'product_rule_list',
|
|
118
|
+
name: 'StoreProductRuleList',
|
|
119
|
+
component: () => import('@/viewStore/product_rule/list'),
|
|
120
|
+
meta: {
|
|
121
|
+
title: '门店商品选品规则',
|
|
122
|
+
icon: 'xdicon_rizhiguanli',
|
|
123
|
+
roles:[store_selection.selectPolicesleQuery]
|
|
124
|
+
}
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
path: 'product_rule_create',
|
|
128
|
+
name: 'StoreProductRuleCreate',
|
|
129
|
+
hidden:true,
|
|
130
|
+
component: () => import('@/viewStore/product_rule/create'),
|
|
131
|
+
meta: {
|
|
132
|
+
title: '创建门店商品选品规则',
|
|
133
|
+
activeMenu: '/store/product_rule_list',
|
|
134
|
+
roles:[store_selection.addSelectPolices]
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
{
|
|
138
|
+
path: 'product_rule_edit/:id',
|
|
139
|
+
name: 'StoreProductRuleEdit',
|
|
140
|
+
hidden:true,
|
|
141
|
+
component: () => import('@/viewStore/product_rule/create'),
|
|
142
|
+
meta: {
|
|
143
|
+
title: '编辑选店规则',
|
|
144
|
+
activeMenu: '/store/product_rule_list',
|
|
145
|
+
roles:[store_selection.editSelectPolices,store_selection.getSelectEditLogDetail]
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
path: 'product_rule_log/:id',
|
|
150
|
+
name: 'StoreProductRuleLog',
|
|
151
|
+
hidden:true,
|
|
152
|
+
component: () => import('@/viewStore/product_rule/log'),
|
|
153
|
+
meta: {
|
|
154
|
+
title: '修改记录',
|
|
155
|
+
activeMenu: '/store/product_rule_list',
|
|
156
|
+
roles:[store_selection.selectPolicesEditLog]
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
path: 'travel',
|
|
161
|
+
name: 'travelPricesNumberList',
|
|
162
|
+
component: () => import('@/views/prices/travel/list'),
|
|
163
|
+
meta: {
|
|
164
|
+
title: '门店商品调价规则',
|
|
165
|
+
icon: 'xdicon_rizhiguanli',
|
|
166
|
+
roles: ['ROLE_MARKET_TRAVEL_RULE_LIST','ROLE_MARKET_TRAVEL_RULE_MA_LIST']
|
|
167
|
+
}
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
path: 'travel_create',
|
|
171
|
+
name: 'travelPricesNumberCreate',
|
|
172
|
+
component: () => import('@/views/prices/travel/create'),
|
|
173
|
+
hidden: true,
|
|
174
|
+
meta: {
|
|
175
|
+
title: '创建调价规则',
|
|
176
|
+
activeMenu: '/store/travel'
|
|
177
|
+
}
|
|
178
|
+
},
|
|
179
|
+
{
|
|
180
|
+
path: 'travel_edit/:id',
|
|
181
|
+
name: 'travelPricesNumberEdit',
|
|
182
|
+
hidden: true,
|
|
183
|
+
component: () => import('@/views/prices/travel/edit'),
|
|
184
|
+
meta: {
|
|
185
|
+
title: '编辑调价规则',
|
|
186
|
+
activeMenu: '/store/travel'
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
path: 'mall_create',
|
|
191
|
+
name: 'ProductPricesMallCreate',
|
|
192
|
+
component: () => import('@/views/prices/travel/mall_create'),
|
|
193
|
+
hidden: true,
|
|
194
|
+
meta: {
|
|
195
|
+
title: '创建调价规则',
|
|
196
|
+
activeMenu: '/store/travel'
|
|
197
|
+
}
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
path: 'mall_edit/:id',
|
|
201
|
+
name: 'ProductPricesMallCreate',
|
|
202
|
+
hidden: true,
|
|
203
|
+
component: () => import('@/views/prices/travel/mall_create'),
|
|
204
|
+
meta: {
|
|
205
|
+
title: '编辑调价规则',
|
|
206
|
+
activeMenu: '/store/travel'
|
|
207
|
+
}
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
path: 'log/:id',
|
|
211
|
+
name: 'StoreRuleLog',
|
|
212
|
+
hidden: true,
|
|
213
|
+
component: () => import('@/views/prices/travel/log'),
|
|
214
|
+
meta: {
|
|
215
|
+
title: '操作记录',
|
|
216
|
+
activeMenu: '/store/travel'
|
|
217
|
+
}
|
|
218
|
+
},
|
|
219
|
+
// #endif
|
|
115
220
|
]
|
|
116
221
|
}
|
|
117
222
|
|
|
@@ -472,6 +472,104 @@ module.exports = {
|
|
|
472
472
|
disabled: true,
|
|
473
473
|
role: '@@@@.@@@.SELECT_SHOP_TASK_LIST_UPDATE',
|
|
474
474
|
},
|
|
475
|
+
{
|
|
476
|
+
title: "加盟商后台 商品选品规则列表",
|
|
477
|
+
mapFn: "selectPolicesleQuery",
|
|
478
|
+
isPublic: true,
|
|
479
|
+
path: '/hourdash-partner/v1/:xsiteid/:xnamespace/select-polices/query',
|
|
480
|
+
isRule: false,
|
|
481
|
+
data: {
|
|
482
|
+
xsiteid: ['站点Id', 'String', '必填'],
|
|
483
|
+
xnamespace: ['命名空间', 'String', '必填'],
|
|
484
|
+
},
|
|
485
|
+
disabled: true,
|
|
486
|
+
role: 'ROLE_MARKET_STORE_PRODUCT_RULE_LIST',
|
|
487
|
+
},
|
|
488
|
+
{
|
|
489
|
+
title: "加盟商后台 商品选品规则详情",
|
|
490
|
+
mapFn: "getSelectPolices",
|
|
491
|
+
isPublic: true,
|
|
492
|
+
path: '/hourdash-partner/v1/:xsiteid/:xnamespace/select-polices/:id',
|
|
493
|
+
isRule: false,
|
|
494
|
+
params: {
|
|
495
|
+
xsiteid: ['站点Id', 'String', '必填'],
|
|
496
|
+
xnamespace: ['命名空间', 'String', '必填'],
|
|
497
|
+
},
|
|
498
|
+
disabled: true,
|
|
499
|
+
role: '',
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
title: "加盟商后台 商品选品规则删除",
|
|
503
|
+
mapFn: "deleteSelectPolices",
|
|
504
|
+
isPublic: true,
|
|
505
|
+
path: '/hourdash-partner/v1/:xsiteid/:xnamespace/select-polices/:id',
|
|
506
|
+
isRule: false,
|
|
507
|
+
data: {
|
|
508
|
+
xsiteid: ['站点Id', 'String', '必填'],
|
|
509
|
+
xnamespace: ['命名空间', 'String', '必填'],
|
|
510
|
+
},
|
|
511
|
+
method:'delete',
|
|
512
|
+
disabled: true,
|
|
513
|
+
role: 'ROLE_MARKET_STORE_PRODUCT_RULE_DELETE',
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
title: "加盟商后台 商品选品规则增加",
|
|
517
|
+
mapFn: "addSelectPolices",
|
|
518
|
+
isPublic: true,
|
|
519
|
+
path: '/hourdash-partner/v1/:xsiteid/:xnamespace/select-polices',
|
|
520
|
+
isRule: false,
|
|
521
|
+
data: {
|
|
522
|
+
xsiteid: ['站点Id', 'String', '必填'],
|
|
523
|
+
xnamespace: ['命名空间', 'String', '必填'],
|
|
524
|
+
item: ['item', 'Object', '必填'],
|
|
525
|
+
},
|
|
526
|
+
disabled: true,
|
|
527
|
+
role: 'ROLE_MARKET_STORE_PRODUCT_RULE_ADD',
|
|
528
|
+
},
|
|
529
|
+
{
|
|
530
|
+
title: "加盟商后台 商品选品规则编辑",
|
|
531
|
+
mapFn: "editSelectPolices",
|
|
532
|
+
isPublic: true,
|
|
533
|
+
path: '/hourdash-partner/v1/:xsiteid/:xnamespace/select-polices/:id',
|
|
534
|
+
isRule: false,
|
|
535
|
+
data: {
|
|
536
|
+
xsiteid: ['站点Id', 'String', '必填'],
|
|
537
|
+
xnamespace: ['命名空间', 'String', '必填'],
|
|
538
|
+
id: ['id', 'Number', '必填'],
|
|
539
|
+
item: ['item', 'Object', '必填'],
|
|
540
|
+
},
|
|
541
|
+
disabled: true,
|
|
542
|
+
method:'put',
|
|
543
|
+
role: 'ROLE_MARKET_STORE_PRODUCT_RULE_EDIT',
|
|
544
|
+
},
|
|
545
|
+
{
|
|
546
|
+
title: "加盟商后台 商品选品规则修改记录列表",
|
|
547
|
+
mapFn: "selectPolicesEditLog",
|
|
548
|
+
isPublic: true,
|
|
549
|
+
path: '/hourdash-partner/v1/:xsiteid/:xnamespace/select-polices-edit-log/:id',
|
|
550
|
+
isRule: false,
|
|
551
|
+
params: {
|
|
552
|
+
xsiteid: ['站点Id', 'String', '必填'],
|
|
553
|
+
xnamespace: ['命名空间', 'String', '必填'],
|
|
554
|
+
id: ['id', 'String', '必填'],
|
|
555
|
+
},
|
|
556
|
+
disabled: true,
|
|
557
|
+
role: 'ROLE_MARKET_STORE_PRODUCT_RULE_LOG',
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
title: "加盟商后台 商品选品规则详情",
|
|
561
|
+
mapFn: "getSelectEditLogDetail",
|
|
562
|
+
isPublic: true,
|
|
563
|
+
path: '/hourdash-partner/v1/:xsiteid/:xnamespace/select-polices-get-edit/:logid',
|
|
564
|
+
isRule: false,
|
|
565
|
+
params: {
|
|
566
|
+
xsiteid: ['站点Id', 'String', '必填'],
|
|
567
|
+
xnamespace: ['命名空间', 'String', '必填'],
|
|
568
|
+
logid: ['logid', 'String', '必填'],
|
|
569
|
+
},
|
|
570
|
+
disabled: true,
|
|
571
|
+
role: 'ROLE_MARKET_STORE_PRODUCT_RULE_LOG_DETAIL',
|
|
572
|
+
},
|
|
475
573
|
],
|
|
476
574
|
}
|
|
477
575
|
|
|
@@ -200,8 +200,9 @@ export default {
|
|
|
200
200
|
activeName:'offline_market',
|
|
201
201
|
storeType:'SELL',
|
|
202
202
|
storeTypeTabList:[
|
|
203
|
-
{label:'
|
|
203
|
+
{label:'核销门店集市',value:'SELL'},
|
|
204
204
|
{label:'旅游门店集市',value:'TRAVEL'},
|
|
205
|
+
{label:'小时达到店门店集市',value:'HDSELF'},
|
|
205
206
|
]
|
|
206
207
|
}
|
|
207
208
|
},
|
|
@@ -0,0 +1,427 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-container">
|
|
3
|
+
<el-card class="app-container__list">
|
|
4
|
+
<xd-base-dynamic-field
|
|
5
|
+
v-if="formList!==null"
|
|
6
|
+
ref="form"
|
|
7
|
+
v-model="formParams"
|
|
8
|
+
label-width="150px"
|
|
9
|
+
:list="formList"
|
|
10
|
+
:key="renderFormKey"
|
|
11
|
+
size="medium"
|
|
12
|
+
@success="handleSuccess"
|
|
13
|
+
@onApiSuccessUrl="handleApiSuccessUrl"
|
|
14
|
+
@onGetParamsAndHeader="handleGetParamsAndHeader"
|
|
15
|
+
></xd-base-dynamic-field>
|
|
16
|
+
<div style="padding-left: 150px" v-if="!isView&&!isLook">
|
|
17
|
+
<el-button @click="goBack" type="primary">返回</el-button>
|
|
18
|
+
<el-button @click="handleConfirm" type="primary">保存</el-button>
|
|
19
|
+
</div>
|
|
20
|
+
<div style="padding-left: 150px" v-else>
|
|
21
|
+
<el-button type="primary" @click="goLogBack">返回</el-button>
|
|
22
|
+
</div>
|
|
23
|
+
</el-card>
|
|
24
|
+
</div>
|
|
25
|
+
</template>
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
<script>
|
|
29
|
+
import XdBaseDynamicField from "@/components/XdBaseDynamicField"
|
|
30
|
+
import { getOptions } from "@/utils/options"
|
|
31
|
+
import { Loading } from 'element-ui'
|
|
32
|
+
import checkPermission from "@/utils/permission"
|
|
33
|
+
import {
|
|
34
|
+
mapActions,
|
|
35
|
+
mapState,
|
|
36
|
+
} from 'vuex'
|
|
37
|
+
|
|
38
|
+
export default {
|
|
39
|
+
name: "StoreProductRuleCreate",
|
|
40
|
+
components: {
|
|
41
|
+
XdBaseDynamicField,
|
|
42
|
+
},
|
|
43
|
+
watch: {
|
|
44
|
+
'formParams.brand_range':{
|
|
45
|
+
handler(n,o){
|
|
46
|
+
if(n&&n!==o){
|
|
47
|
+
this.initFormList(this.formParams)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
computed: {
|
|
53
|
+
isView() {
|
|
54
|
+
return this.$route.query.isView;
|
|
55
|
+
},
|
|
56
|
+
isLook() {
|
|
57
|
+
return this.$route.query.isLook;
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
data () {
|
|
61
|
+
return {
|
|
62
|
+
formList: null,
|
|
63
|
+
formParams: {},
|
|
64
|
+
id: null,
|
|
65
|
+
renderFormKey: Date.now(),
|
|
66
|
+
customForm: {
|
|
67
|
+
company_id: '',
|
|
68
|
+
department_id: '',
|
|
69
|
+
},
|
|
70
|
+
customRules: {},
|
|
71
|
+
isMain:true,
|
|
72
|
+
brand_type:'',
|
|
73
|
+
consumeModesData:[],
|
|
74
|
+
}
|
|
75
|
+
},
|
|
76
|
+
async created () {
|
|
77
|
+
this.id = this.$route.params.id
|
|
78
|
+
this.isLook = this.$route.query.isLook
|
|
79
|
+
console.log(this.isLook,'ooooo')
|
|
80
|
+
await getOptions({
|
|
81
|
+
server: "hourdash-partner",
|
|
82
|
+
fn: "public",
|
|
83
|
+
path: "p1",
|
|
84
|
+
}).then((res) => {
|
|
85
|
+
this.consumeModesData = res.data.consume_modes;
|
|
86
|
+
})
|
|
87
|
+
if(!this.id){
|
|
88
|
+
this.initFormList({})
|
|
89
|
+
}else{
|
|
90
|
+
if(this.isView){
|
|
91
|
+
let params = {
|
|
92
|
+
logid: this.id
|
|
93
|
+
}
|
|
94
|
+
this.getSelectEditLogDetail(params).then(res => {
|
|
95
|
+
this.brand_type = res.data.brand_type;
|
|
96
|
+
if(res.data.start_discount&&res.data.end_discount){
|
|
97
|
+
res.data.discount = {
|
|
98
|
+
min:this.$xdHelper.divisionFloatNumber(res.data.start_discount, 100),
|
|
99
|
+
max:this.$xdHelper.divisionFloatNumber(res.data.end_discount, 100),
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if(res.data.brand_range==='CU'){
|
|
103
|
+
if(res.data.brand_ids_name&&res.data.brand_ids_name.length){
|
|
104
|
+
res.data.brand_ids = res.data.brand_ids_name
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
this.initFormList(res.data)
|
|
108
|
+
}).catch(err => {
|
|
109
|
+
console.log(err, 'err')
|
|
110
|
+
})
|
|
111
|
+
}else{
|
|
112
|
+
let params = {
|
|
113
|
+
id: this.id
|
|
114
|
+
}
|
|
115
|
+
this.getSelectPolices(params).then(res => {
|
|
116
|
+
this.brand_type = res.data.brand_type;
|
|
117
|
+
if(res.data.start_discount&&res.data.end_discount){
|
|
118
|
+
res.data.discount = {
|
|
119
|
+
min:this.$xdHelper.divisionFloatNumber(res.data.start_discount, 100),
|
|
120
|
+
max:this.$xdHelper.divisionFloatNumber(res.data.end_discount, 100),
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
if(res.data.brand_range==='CU'){
|
|
124
|
+
if(res.data.brand_ids_name&&res.data.brand_ids_name.length){
|
|
125
|
+
res.data.brand_ids = res.data.brand_ids_name
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
this.initFormList(res.data)
|
|
129
|
+
}).catch(err => {
|
|
130
|
+
console.log(err, 'err')
|
|
131
|
+
})
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
methods: {
|
|
137
|
+
...mapActions('store_selection', [
|
|
138
|
+
'getSelectPolices',
|
|
139
|
+
'addSelectPolices',
|
|
140
|
+
'editSelectPolices',
|
|
141
|
+
'getSelectEditLogDetail',
|
|
142
|
+
]),
|
|
143
|
+
|
|
144
|
+
initFormList (params) {
|
|
145
|
+
let formList = [
|
|
146
|
+
{
|
|
147
|
+
label: '基础信息',
|
|
148
|
+
ele: 'title',
|
|
149
|
+
size: 'small',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
label: '名称:',
|
|
153
|
+
ele: 'el-input',
|
|
154
|
+
type: 'text',
|
|
155
|
+
valueKey: 'rule_name',
|
|
156
|
+
value: params.rule_name || '',
|
|
157
|
+
placeholder: '请输入名称',
|
|
158
|
+
className: 'input40',
|
|
159
|
+
rules: [
|
|
160
|
+
{ required: true, message: '请输入名称', trigger: 'blur' },
|
|
161
|
+
{
|
|
162
|
+
validator: (rule, value, callback) => {
|
|
163
|
+
console.log(value.length)
|
|
164
|
+
value = value.trim()
|
|
165
|
+
if (value.length < 2) {
|
|
166
|
+
callback('输入名称字符串数量大于等于2')
|
|
167
|
+
} else callback()
|
|
168
|
+
},
|
|
169
|
+
trigger: 'blur'
|
|
170
|
+
}
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
label: '描述:',
|
|
175
|
+
ele: 'el-input',
|
|
176
|
+
type: 'textarea',
|
|
177
|
+
valueKey: 'rule_desc',
|
|
178
|
+
value: params.rule_desc || '',
|
|
179
|
+
placeholder: '请输入描述',
|
|
180
|
+
className: 'input40',
|
|
181
|
+
rules: [
|
|
182
|
+
{ required: true, message: '请输入描述', trigger: 'blur' },
|
|
183
|
+
{
|
|
184
|
+
validator: (rule, value, callback) => {
|
|
185
|
+
value = value.trim()
|
|
186
|
+
if (value.length < 2) {
|
|
187
|
+
callback('请输入描述字符串数量大于等于2')
|
|
188
|
+
} else callback()
|
|
189
|
+
},
|
|
190
|
+
trigger: 'blur'
|
|
191
|
+
}
|
|
192
|
+
]
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
label: '启用:',
|
|
196
|
+
ele: 'xd-radio',
|
|
197
|
+
valueKey: 'status',
|
|
198
|
+
value: params.status||'Y',
|
|
199
|
+
list: [
|
|
200
|
+
{ "label": "启用", "value": 'Y' },
|
|
201
|
+
{ "label": "关闭", "value": 'N' }
|
|
202
|
+
],
|
|
203
|
+
inline: false,
|
|
204
|
+
rules: [
|
|
205
|
+
{ required: true, message: '请选择是否启用规则', trigger: 'change' },
|
|
206
|
+
],
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
label: '权重设置:',
|
|
210
|
+
ele: 'el-input',
|
|
211
|
+
type: 'number',
|
|
212
|
+
valueKey: 'sort',
|
|
213
|
+
value: params.sort !== undefined ? params.sort : '',
|
|
214
|
+
placeholder: '请输入权重值',
|
|
215
|
+
className: 'input20',
|
|
216
|
+
rules: [{ required: true, message: '请输入权重值', trigger: 'blur' }],
|
|
217
|
+
notice: '按倒叙排列,数值越大越靠前',
|
|
218
|
+
inline: true
|
|
219
|
+
},
|
|
220
|
+
{
|
|
221
|
+
label: ' 选品规则条件',
|
|
222
|
+
ele: 'title',
|
|
223
|
+
size: 'small',
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
label: '按门店类型:',
|
|
227
|
+
ele: 'xd-radio',
|
|
228
|
+
valueKey: 'brand_type',
|
|
229
|
+
value:'MA',
|
|
230
|
+
list:[{value:'MA',label:'商城'}],
|
|
231
|
+
rules: [
|
|
232
|
+
{ required: true, message: '请选择', trigger: 'change' },
|
|
233
|
+
],
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
label: "门店品牌",
|
|
237
|
+
ele: "xd-radio",
|
|
238
|
+
valueKey: "brand_range",
|
|
239
|
+
value: params.brand_range || 'AL',
|
|
240
|
+
list: [
|
|
241
|
+
{
|
|
242
|
+
label: '全部品牌',
|
|
243
|
+
value: 'AL'
|
|
244
|
+
}, {
|
|
245
|
+
label: '指定品牌',
|
|
246
|
+
value: 'CU'
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
rules: [
|
|
250
|
+
{ required: true, message: '请选择门店品牌', trigger: 'change' },
|
|
251
|
+
],
|
|
252
|
+
},
|
|
253
|
+
params.brand_range === 'CU'&&{
|
|
254
|
+
label: "",
|
|
255
|
+
ele: 'xd-remote-select',
|
|
256
|
+
value: params.brand_ids || [],
|
|
257
|
+
valueKey: "brand_ids",
|
|
258
|
+
multiple: true,
|
|
259
|
+
className: "input40",
|
|
260
|
+
remoteSearch: this.handleRemoteBrandSearch,
|
|
261
|
+
rules: [
|
|
262
|
+
{ required: true, message: '请选择', trigger: 'change' },
|
|
263
|
+
],
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
label: '门店服务类型:',
|
|
267
|
+
ele: 'xd-radio',
|
|
268
|
+
valueKey: 'consume_mode',
|
|
269
|
+
value: params.consume_mode || '',
|
|
270
|
+
list: this.consumeModesData,
|
|
271
|
+
rules: [
|
|
272
|
+
{ required: true, message: '请选择门店服务', trigger: 'change' },
|
|
273
|
+
],
|
|
274
|
+
},
|
|
275
|
+
{
|
|
276
|
+
label: '按商品折扣:',
|
|
277
|
+
ele: 'xd-input-range',
|
|
278
|
+
valueKey: 'discount',
|
|
279
|
+
className: "input20",
|
|
280
|
+
value: {
|
|
281
|
+
min: params.discount && params.discount.min,
|
|
282
|
+
max: params.discount && params.discount.max,
|
|
283
|
+
},
|
|
284
|
+
disabled: false,
|
|
285
|
+
setting: {
|
|
286
|
+
isRequire:false,
|
|
287
|
+
unit: '%',
|
|
288
|
+
selectWidth: '220px',
|
|
289
|
+
selectMultiple: false,
|
|
290
|
+
},
|
|
291
|
+
maps: {
|
|
292
|
+
start: 'min',
|
|
293
|
+
end: 'max',
|
|
294
|
+
select: 'type'
|
|
295
|
+
},
|
|
296
|
+
placeholder: {
|
|
297
|
+
SPlaceholder: '最低折扣值',
|
|
298
|
+
EPlaceholder: '最高折扣值',
|
|
299
|
+
},
|
|
300
|
+
inline:false,
|
|
301
|
+
notice:'将按进货价/市场价的折扣选取门店商品',
|
|
302
|
+
},
|
|
303
|
+
].filter(i=>i)
|
|
304
|
+
console.log(formList, params, 'params', this.id)
|
|
305
|
+
this.formList = formList.filter(i => i)
|
|
306
|
+
this.renderFormKey = Date.now()
|
|
307
|
+
},
|
|
308
|
+
|
|
309
|
+
handleConfirm () {
|
|
310
|
+
this.$refs.form.submit().then(res => {
|
|
311
|
+
let formParamsCopy = this.$xdHelper.cloneDeep(this.formParams)
|
|
312
|
+
|
|
313
|
+
if(this.formParams['brand_ids']&&this.formParams['brand_ids'].length){
|
|
314
|
+
let data = []
|
|
315
|
+
this.formParams['brand_ids'].map(item=>{
|
|
316
|
+
data.push(item.value)
|
|
317
|
+
})
|
|
318
|
+
formParamsCopy.brand_ids = data
|
|
319
|
+
}
|
|
320
|
+
if(this.formParams['discount']){
|
|
321
|
+
if (this.formParams['discount']['min']||this.formParams['discount']['max']){
|
|
322
|
+
if((this.formParams['discount']['min']&&this.formParams['discount']['min']!=='')&&(!this.formParams['discount']['max']||this.formParams['discount']['max']==='')
|
|
323
|
+
||(this.formParams['discount']['max']||this.formParams['discount']['max']!=='')&&(!this.formParams['discount']['min']||this.formParams['discount']['min']==='')
|
|
324
|
+
){
|
|
325
|
+
this.$message.error('请输入完整的开始和结束折扣')
|
|
326
|
+
return
|
|
327
|
+
}
|
|
328
|
+
formParamsCopy.start_discount = this.formParams['discount']['min']*100
|
|
329
|
+
formParamsCopy.end_discount = this.formParams['discount']['max']*100
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
console.log(formParamsCopy,'formParamsCopy')
|
|
333
|
+
// return
|
|
334
|
+
if(this.id){
|
|
335
|
+
let params = {
|
|
336
|
+
id:this.id,
|
|
337
|
+
item:{
|
|
338
|
+
...formParamsCopy
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
this.editSelectPolices(params).then(res => {
|
|
342
|
+
this.$message({
|
|
343
|
+
type: "success",
|
|
344
|
+
message: "编辑成功"
|
|
345
|
+
})
|
|
346
|
+
this.$bus.$emit('delTags', this.$route, {}, "StoreProductRuleList")
|
|
347
|
+
}).catch(err => {
|
|
348
|
+
console.log(err, 'err')
|
|
349
|
+
})
|
|
350
|
+
}else{
|
|
351
|
+
let params = {
|
|
352
|
+
item:{
|
|
353
|
+
...formParamsCopy
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
this.addSelectPolices(params).then(res => {
|
|
357
|
+
this.$message({
|
|
358
|
+
type: "success",
|
|
359
|
+
message: "新增成功"
|
|
360
|
+
})
|
|
361
|
+
this.$bus.$emit('delTags', this.$route, {}, "StoreProductRuleList")
|
|
362
|
+
}).catch(err => {
|
|
363
|
+
console.log(err, 'err')
|
|
364
|
+
})
|
|
365
|
+
}
|
|
366
|
+
})
|
|
367
|
+
},
|
|
368
|
+
goBack () {
|
|
369
|
+
this.$bus.$emit('delTags', this.$route, {}, "StoreRuleList")
|
|
370
|
+
},
|
|
371
|
+
|
|
372
|
+
goLogBack(){
|
|
373
|
+
this.$bus.$emit('delTags', this.$route, {}, "StoreRuleLog")
|
|
374
|
+
},
|
|
375
|
+
/**
|
|
376
|
+
* @description 远程搜索品牌
|
|
377
|
+
* xd-remote-select
|
|
378
|
+
*/
|
|
379
|
+
async handleRemoteBrandSearch (query, resolve) {
|
|
380
|
+
let res = await getOptions(
|
|
381
|
+
{
|
|
382
|
+
server: "supplier-partner",
|
|
383
|
+
fn: "brand",
|
|
384
|
+
path: "p1",
|
|
385
|
+
params: {
|
|
386
|
+
keyword: query,
|
|
387
|
+
brand_type:this.formParams.brand_type
|
|
388
|
+
}
|
|
389
|
+
}
|
|
390
|
+
)
|
|
391
|
+
resolve(res.data.list)
|
|
392
|
+
},
|
|
393
|
+
|
|
394
|
+
handleTabClick(){
|
|
395
|
+
this.getRuleOptions()
|
|
396
|
+
},
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
|
|
400
|
+
</script>
|
|
401
|
+
|
|
402
|
+
<style scoped lang="scss">
|
|
403
|
+
.app-container {
|
|
404
|
+
&__link {
|
|
405
|
+
display: flex;
|
|
406
|
+
|
|
407
|
+
&-use {
|
|
408
|
+
display: flex;
|
|
409
|
+
flex-direction: column;
|
|
410
|
+
width: 150px;
|
|
411
|
+
padding: 20px;
|
|
412
|
+
background: #f7f7f7;
|
|
413
|
+
margin-right: 20px;
|
|
414
|
+
|
|
415
|
+
.el-button + .el-button {
|
|
416
|
+
margin-left: 0px;
|
|
417
|
+
margin-top: 30px;
|
|
418
|
+
}
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
&-tabs {
|
|
422
|
+
flex: 1;
|
|
423
|
+
}
|
|
424
|
+
}
|
|
425
|
+
}
|
|
426
|
+
</style>
|
|
427
|
+
|
|
@@ -0,0 +1,239 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-container">
|
|
3
|
+
<div class="app-container__title">选店规则管理</div>
|
|
4
|
+
<el-card class="app-container__list">
|
|
5
|
+
<div class="app-container__list-custom" style="text-align: right">
|
|
6
|
+
<el-button type="primary" size="small" icon="el-icon-circle-plus-outline" @click="handleCreate()" v-if="isAdd">创建选品规则</el-button>
|
|
7
|
+
</div>
|
|
8
|
+
<div class="app-container__list-table">
|
|
9
|
+
<xd-table
|
|
10
|
+
:get-link="getLink"
|
|
11
|
+
:headers="headers"
|
|
12
|
+
:list="tables"
|
|
13
|
+
is-border
|
|
14
|
+
@onClick="handleClick"
|
|
15
|
+
>
|
|
16
|
+
<template slot="operate" slot-scope="scope">
|
|
17
|
+
<div
|
|
18
|
+
class="app-container__list-table-option"
|
|
19
|
+
>
|
|
20
|
+
<el-button v-if="isUpdate" @click="handleTableClick('edit',scope.row)" type="text">编辑</el-button>
|
|
21
|
+
<el-button v-if="isDelete" @click="handleTableClick('delete',scope.row)" type="text">删除</el-button>
|
|
22
|
+
<el-button v-if="isLog" @click="handleTableClick('log',scope.row)" type="text">修改记录</el-button>
|
|
23
|
+
</div>
|
|
24
|
+
</template>
|
|
25
|
+
</xd-table>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="app-container__list-pagination">
|
|
28
|
+
<xd-pagination
|
|
29
|
+
:total="total"
|
|
30
|
+
:limit.sync="limit"
|
|
31
|
+
:page="pageSize"
|
|
32
|
+
:auto-scroll="false"
|
|
33
|
+
@onPagination="handlePagination"
|
|
34
|
+
></xd-pagination>
|
|
35
|
+
</div>
|
|
36
|
+
</el-card>
|
|
37
|
+
</div>
|
|
38
|
+
</template>
|
|
39
|
+
|
|
40
|
+
<script>
|
|
41
|
+
import XdSearch from "@/components/XdSearch"
|
|
42
|
+
import XdTableStatus from "@/components/XdTableStatus"
|
|
43
|
+
import { baseJsDateToTime } from '@/utils/xd.base'
|
|
44
|
+
import { mapActions } from 'vuex'
|
|
45
|
+
import { Loading } from 'element-ui'
|
|
46
|
+
import XdPagination from "@/components/XdPagination.vue"
|
|
47
|
+
import XdTable from "@/components/XdTable"
|
|
48
|
+
import checkPermission from "@/utils/permission"
|
|
49
|
+
import permissions from "@/constant/permissions"
|
|
50
|
+
|
|
51
|
+
export default {
|
|
52
|
+
name: "StoreProductRuleList",
|
|
53
|
+
components: {
|
|
54
|
+
XdPagination,
|
|
55
|
+
XdSearch,
|
|
56
|
+
XdTableStatus,
|
|
57
|
+
XdTable
|
|
58
|
+
},
|
|
59
|
+
|
|
60
|
+
data () {
|
|
61
|
+
return {
|
|
62
|
+
pageSize: 1,//当前页面数量
|
|
63
|
+
hasNextPage: true,
|
|
64
|
+
limit: 20,
|
|
65
|
+
|
|
66
|
+
searchForm: [], //搜索区域模块表单
|
|
67
|
+
searchParams: null, // 搜索参数
|
|
68
|
+
tables: [],
|
|
69
|
+
total: 0,
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
computed:{
|
|
73
|
+
isAdd () {
|
|
74
|
+
return checkPermission([permissions.store_selection.addSelectPolices])
|
|
75
|
+
},
|
|
76
|
+
isUpdate () {
|
|
77
|
+
return checkPermission([permissions.store_selection.editSelectPolices])
|
|
78
|
+
},
|
|
79
|
+
isLog() {
|
|
80
|
+
return checkPermission([permissions.store_selection.selectPolicesEditLog])
|
|
81
|
+
},
|
|
82
|
+
isDelete () {
|
|
83
|
+
return checkPermission([permissions.store_selection.deleteSelectPolices])
|
|
84
|
+
},
|
|
85
|
+
headers(){
|
|
86
|
+
return [
|
|
87
|
+
{ "type": "normal", "prop": "id", "align": "center", "label": "ID" },
|
|
88
|
+
{ "type": "normal", "prop": "rule_name", "align": "center", "label": "规则名称" },
|
|
89
|
+
{ "type": "normal", "prop": "rule_desc", "align": "center", "label": "规则描述" },
|
|
90
|
+
{ "type": "status", "prop": "status", "align": "center", "label": "启用状态",message:['已启用','禁用'] },
|
|
91
|
+
{ "type": "normal", "prop": "created_time", "align": "center", "label": "创建时间" },
|
|
92
|
+
{ "type": "normal", "prop": "updated_time", "align": "center", "label": "修改时间" },
|
|
93
|
+
{
|
|
94
|
+
"type": "operate",
|
|
95
|
+
prop:"operate",
|
|
96
|
+
"align": "center",
|
|
97
|
+
"width": 200,
|
|
98
|
+
"label": "操作",
|
|
99
|
+
"values": [
|
|
100
|
+
this.isDelete&&{ "ui": "text-button", "name": "删除", "type": "text" ,event:'delete'},
|
|
101
|
+
this.isUpdate&&{ "ui": "text-button", "name": "编辑", "type": "text" ,event:'edit'},
|
|
102
|
+
this.isLog&&{ "ui": "text-button", "name": "修改记录", "type": "text" ,event:'log'},
|
|
103
|
+
].filter(i=>i)
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
created () {
|
|
109
|
+
this.getList()
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
methods: {
|
|
113
|
+
|
|
114
|
+
...mapActions('store_selection', [
|
|
115
|
+
'selectPolicesleQuery',
|
|
116
|
+
'selectShopRuleExecTask',
|
|
117
|
+
'deleteSelectPolices'
|
|
118
|
+
]),
|
|
119
|
+
|
|
120
|
+
onJfbTagForReload () {
|
|
121
|
+
this.getList()
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
getList () {
|
|
125
|
+
const { searchParams } = this
|
|
126
|
+
let params = { ...searchParams, page_token: this.pageSize.toString(),page_size: this.limit}
|
|
127
|
+
let loading = Loading.service({})
|
|
128
|
+
this.selectPolicesleQuery(params)
|
|
129
|
+
.then(list => {
|
|
130
|
+
this.tables = list.data.list
|
|
131
|
+
this.tables.map(item => {
|
|
132
|
+
item.created_time = window.getTimeFormat(item.created_time)
|
|
133
|
+
item.updated_time = window.getTimeFormat(item.updated_time)
|
|
134
|
+
})
|
|
135
|
+
this.total = list.data.total_size
|
|
136
|
+
loading.close()
|
|
137
|
+
})
|
|
138
|
+
.catch(err => {
|
|
139
|
+
console.error(err)
|
|
140
|
+
loading.close()
|
|
141
|
+
})
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
parseTime (time) {
|
|
145
|
+
return baseJsDateToTime(time)
|
|
146
|
+
},
|
|
147
|
+
/**
|
|
148
|
+
* @description 翻页处理方法
|
|
149
|
+
* @param page {Number} 访问页面页码数
|
|
150
|
+
*/
|
|
151
|
+
handlePagination (page) {
|
|
152
|
+
this.pageSize = page
|
|
153
|
+
this.getList()
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
/**编辑**/
|
|
157
|
+
getLink ({ row, value, index }) {
|
|
158
|
+
return ``
|
|
159
|
+
},
|
|
160
|
+
|
|
161
|
+
/**操作按钮**/
|
|
162
|
+
handleClick ({ row, value, index }) {
|
|
163
|
+
console.log('handleClick', row, value, index)
|
|
164
|
+
if (value.event === "delete") {
|
|
165
|
+
this.$confirm('是否删除?', '删除', {
|
|
166
|
+
confirmButtonText: '确定',
|
|
167
|
+
cancelButtonText: '取消'
|
|
168
|
+
}).then(() => {
|
|
169
|
+
this.deleteSelectPolices({id:row.id})
|
|
170
|
+
.then(res=>{
|
|
171
|
+
this.$message.success('删除成功')
|
|
172
|
+
this.getList()
|
|
173
|
+
})
|
|
174
|
+
.catch(err=>{
|
|
175
|
+
console.log(err,'err')
|
|
176
|
+
})
|
|
177
|
+
|
|
178
|
+
})
|
|
179
|
+
}else if(value.event === "edit") {
|
|
180
|
+
this.$router.push(`/store/product_rule_edit/${row.id}`)
|
|
181
|
+
}else if(value.event==='log'){
|
|
182
|
+
this.$router.push(`/store/product_rule_log/${row.id}`)
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
|
|
186
|
+
handleTableClick(type,row){
|
|
187
|
+
if (type === "delete") {
|
|
188
|
+
this.$confirm('是否删除?', '删除', {
|
|
189
|
+
confirmButtonText: '确定',
|
|
190
|
+
cancelButtonText: '取消'
|
|
191
|
+
}).then(() => {
|
|
192
|
+
this.deleteSelectPolices({id:row.id})
|
|
193
|
+
.then(res=>{
|
|
194
|
+
this.$message.success('删除成功')
|
|
195
|
+
this.getList()
|
|
196
|
+
})
|
|
197
|
+
.catch(err=>{
|
|
198
|
+
console.log(err,'err')
|
|
199
|
+
})
|
|
200
|
+
|
|
201
|
+
})
|
|
202
|
+
}else if(type === "edit") {
|
|
203
|
+
this.$router.push(`/store/product_rule_edit/${row.id}`)
|
|
204
|
+
}else if(type==='log'){
|
|
205
|
+
this.$router.push(`/store/product_rule_log/${row.id}`)
|
|
206
|
+
}else if(type === "look") {
|
|
207
|
+
this.$router.push({path:`/store/product_rule_edit/${row.id}`,query: {
|
|
208
|
+
isLook: true,
|
|
209
|
+
},})
|
|
210
|
+
}
|
|
211
|
+
},
|
|
212
|
+
//创建
|
|
213
|
+
handleCreate(){
|
|
214
|
+
this.$router.push('/store/product_rule_create')
|
|
215
|
+
},
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
</script>
|
|
219
|
+
|
|
220
|
+
<style scoped lang="scss">
|
|
221
|
+
.app-container__title {
|
|
222
|
+
font-size: 16px;
|
|
223
|
+
line-height: 24px;
|
|
224
|
+
padding: 0 0 20px;
|
|
225
|
+
font-weight: bold;
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
@media screen and (max-width: 768px) {
|
|
229
|
+
.app-container__title {
|
|
230
|
+
padding: 0 0 10px;
|
|
231
|
+
}
|
|
232
|
+
}
|
|
233
|
+
.button_box{
|
|
234
|
+
display: flex;
|
|
235
|
+
&>div{
|
|
236
|
+
margin: 0 2px;
|
|
237
|
+
}
|
|
238
|
+
}
|
|
239
|
+
</style>
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="app-container">
|
|
3
|
+
<el-card class="app-container__list">
|
|
4
|
+
<div class="app-container__list-table">
|
|
5
|
+
<xd-table
|
|
6
|
+
@onClick="handleClick"
|
|
7
|
+
:headers="headers"
|
|
8
|
+
:list="tables"
|
|
9
|
+
is-border
|
|
10
|
+
></xd-table>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="app-container__list-pagination">
|
|
13
|
+
<xd-pagination
|
|
14
|
+
:total="total"
|
|
15
|
+
:limit.sync="limit"
|
|
16
|
+
:page="pageSize"
|
|
17
|
+
:auto-scroll="false"
|
|
18
|
+
@onPagination="handlePagination"
|
|
19
|
+
></xd-pagination>
|
|
20
|
+
</div>
|
|
21
|
+
</el-card>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
<script>
|
|
27
|
+
import XdPagination from "@/components/XdPagination.vue";
|
|
28
|
+
import XdTable from "@/components/XdTable";
|
|
29
|
+
import { Loading } from "element-ui";
|
|
30
|
+
import { mapActions, mapState } from "vuex";
|
|
31
|
+
import checkPermission from "@/utils/permission"
|
|
32
|
+
import permissions from "@/constant/permissions"
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* @description 用户管理 - 用户列表
|
|
36
|
+
* @author coder
|
|
37
|
+
* @module @/pages/users/list.vue
|
|
38
|
+
*/
|
|
39
|
+
export default {
|
|
40
|
+
name: "StoreProductRuleLog",
|
|
41
|
+
components: {
|
|
42
|
+
XdPagination, //翻译插件
|
|
43
|
+
XdTable,
|
|
44
|
+
},
|
|
45
|
+
|
|
46
|
+
data() {
|
|
47
|
+
return {
|
|
48
|
+
//分页参数
|
|
49
|
+
pageSize: 1, //当前页面数量
|
|
50
|
+
hasNextPage: true, //是否有下一页
|
|
51
|
+
limit: 20, //搜索参数
|
|
52
|
+
total: 0,
|
|
53
|
+
type: "",
|
|
54
|
+
//列表对象
|
|
55
|
+
tables: [],
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
computed: {
|
|
59
|
+
id() {
|
|
60
|
+
return this.$route.params.id;
|
|
61
|
+
},
|
|
62
|
+
isDetail () {
|
|
63
|
+
return checkPermission([permissions.store_selection.getSelectEditLogDetail])
|
|
64
|
+
},
|
|
65
|
+
headers(){
|
|
66
|
+
return [
|
|
67
|
+
{
|
|
68
|
+
type: "normal",
|
|
69
|
+
prop: "id",
|
|
70
|
+
align: "center",
|
|
71
|
+
label: "记录ID",
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
type: "normal",
|
|
75
|
+
prop: "updated_time",
|
|
76
|
+
align: "center",
|
|
77
|
+
label: "修改时间",
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
type: "normal",
|
|
81
|
+
prop: "op_user_name",
|
|
82
|
+
align: "center",
|
|
83
|
+
label: "修改用户",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
type: "operate",
|
|
87
|
+
align: "center",
|
|
88
|
+
prop: "operate",
|
|
89
|
+
width: 200,
|
|
90
|
+
label: "操作",
|
|
91
|
+
values: [
|
|
92
|
+
this.isDetail&&{
|
|
93
|
+
ui: "text-button",
|
|
94
|
+
name: "查看",
|
|
95
|
+
type: "primary",
|
|
96
|
+
event: "view",
|
|
97
|
+
},
|
|
98
|
+
].filter(i=>i),
|
|
99
|
+
},
|
|
100
|
+
]
|
|
101
|
+
}
|
|
102
|
+
},
|
|
103
|
+
created() {
|
|
104
|
+
this.type = this.$route.query.type;
|
|
105
|
+
this.getList();
|
|
106
|
+
},
|
|
107
|
+
|
|
108
|
+
methods: {
|
|
109
|
+
...mapActions('store_selection', [
|
|
110
|
+
'selectPolicesEditLog',
|
|
111
|
+
]),
|
|
112
|
+
onJfbTagForReload () {
|
|
113
|
+
this.getList()
|
|
114
|
+
},
|
|
115
|
+
/**
|
|
116
|
+
* @description 获取数据列表
|
|
117
|
+
*/
|
|
118
|
+
getList() {
|
|
119
|
+
//请求数据
|
|
120
|
+
let params = {
|
|
121
|
+
page_token: this.pageSize,
|
|
122
|
+
page_size: this.limit,
|
|
123
|
+
id: this.id,
|
|
124
|
+
};
|
|
125
|
+
let loading = Loading.service({});
|
|
126
|
+
this.selectPolicesEditLog(params)
|
|
127
|
+
.then((res) => {
|
|
128
|
+
const { list, total_size } = res.data;
|
|
129
|
+
console.log(list, "asawassasasa");
|
|
130
|
+
this.tables = list.map((item) => {
|
|
131
|
+
item.updated_time = window.getTimeFormat(item.updated_time)
|
|
132
|
+
return item;
|
|
133
|
+
});
|
|
134
|
+
this.total = total_size;
|
|
135
|
+
loading.close();
|
|
136
|
+
})
|
|
137
|
+
.catch((e) => loading.close());
|
|
138
|
+
},
|
|
139
|
+
handleClick({ row, value, index }) {
|
|
140
|
+
this.$router.push({
|
|
141
|
+
path: `/store/product_rule_edit/${row.id}`,
|
|
142
|
+
query: {
|
|
143
|
+
isView: true,
|
|
144
|
+
},
|
|
145
|
+
});
|
|
146
|
+
},
|
|
147
|
+
/**
|
|
148
|
+
* @description 翻页处理方法
|
|
149
|
+
* @param page {Number} 访问页面页码数
|
|
150
|
+
*/
|
|
151
|
+
handlePagination(page) {
|
|
152
|
+
this.pageSize = page;
|
|
153
|
+
this.getList();
|
|
154
|
+
},
|
|
155
|
+
},
|
|
156
|
+
};
|
|
157
|
+
</script>
|
|
158
|
+
|
|
159
|
+
<style scoped lang="scss">
|
|
160
|
+
</style>
|
|
161
|
+
|
|
@@ -199,7 +199,7 @@ export default {
|
|
|
199
199
|
]),
|
|
200
200
|
getRuleOptions(detail){
|
|
201
201
|
console.log(detail,'ddddd')
|
|
202
|
-
this.selectShopRuleChannelRule({channel_code:this.channelActive,brand_type:this.brand_type,consume_mode:this.consume_mode
|
|
202
|
+
this.selectShopRuleChannelRule({channel_code:this.channelActive,brand_type:this.brand_type,consume_mode:this.consume_mode})
|
|
203
203
|
.then(res=>{
|
|
204
204
|
console.log(res,'ddd')
|
|
205
205
|
this.ruleOptions = res.data;
|
|
@@ -576,7 +576,7 @@ export default {
|
|
|
576
576
|
.catch((err) => { console.error(err) })
|
|
577
577
|
},
|
|
578
578
|
handleTabClick(){
|
|
579
|
-
this.getRuleOptions()
|
|
579
|
+
this.getRuleOptions({})
|
|
580
580
|
},
|
|
581
581
|
}
|
|
582
582
|
}
|
|
@@ -279,7 +279,7 @@ export default {
|
|
|
279
279
|
storeTypeTabList:[{label:'已选核销门店',value:'SELL'},{label:'已选选座门店',value:'SEAT'},{label:'已选商品门店',value:'PRODUCT'},{label:'展示门店',value:'AGG'},],
|
|
280
280
|
// #endif
|
|
281
281
|
// #ifdef partner-mall
|
|
282
|
-
storeTypeTabList:[{label:'已选核销门店',value:'SELL'},{label:'已选旅游门店',value:'TRAVEL'},{label:'已选商品门店',value:'PRODUCT'},{label:'展示门店',value:'AGG'},],
|
|
282
|
+
storeTypeTabList:[{label:'已选核销门店',value:'SELL'},{label:'已选旅游门店',value:'TRAVEL'},{label:'已选商品门店',value:'PRODUCT'},{label:'已选小时达到店门店',value:'HDSELF'},{label:'展示门店',value:'AGG'},],
|
|
283
283
|
// #endif
|
|
284
284
|
dialogStore:false,
|
|
285
285
|
storeTableKey:'storeTableKey',
|
|
@@ -56,8 +56,11 @@
|
|
|
56
56
|
<span>{{item.name|fitersName}}</span>
|
|
57
57
|
</div>
|
|
58
58
|
</draggable>
|
|
59
|
-
<div
|
|
59
|
+
<div>
|
|
60
|
+
<div style="margin-bottom: 10px"><span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div>
|
|
61
|
+
<el-button
|
|
60
62
|
type="primary"
|
|
63
|
+
size="small"
|
|
61
64
|
:disabled="isBtnMaterialMore || disabled"
|
|
62
65
|
@click="isDialogShow=true"
|
|
63
66
|
>{{materialBtnName}}</el-button></div>
|
|
@@ -249,8 +252,9 @@
|
|
|
249
252
|
:limit="limit"
|
|
250
253
|
multiple
|
|
251
254
|
>
|
|
252
|
-
|
|
255
|
+
<div class="xd-upload__list-btn" style="text-align: left;">
|
|
253
256
|
<slot>
|
|
257
|
+
<div style="margin-bottom: 10px"><span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div>
|
|
254
258
|
<el-button :disabled="!(showList.length < limit ) || disabled" size="small" type="primary">{{uploadName}}</el-button>
|
|
255
259
|
</slot>
|
|
256
260
|
<div class="xd-upload__disabled" v-if="disabled"></div>
|
|
@@ -327,7 +331,7 @@
|
|
|
327
331
|
* @slot tip插槽:提示文案插槽(one,list,'')
|
|
328
332
|
*
|
|
329
333
|
*/
|
|
330
|
-
import dialogMaterial from "@/viewsMaterial/dialogMaterial.vue";
|
|
334
|
+
// import dialogMaterial from "@/viewsMaterial/dialogMaterial.vue";
|
|
331
335
|
import XdFontIcon from "@/components/XdFontIcon.vue";
|
|
332
336
|
import {Loading} from 'element-ui';
|
|
333
337
|
import draggable from 'vuedraggable';
|
|
@@ -341,7 +345,7 @@
|
|
|
341
345
|
components: {
|
|
342
346
|
XdItemImage,
|
|
343
347
|
draggable,
|
|
344
|
-
dialogMaterial,
|
|
348
|
+
// dialogMaterial,
|
|
345
349
|
XdFontIcon
|
|
346
350
|
},
|
|
347
351
|
props: {
|
|
@@ -567,6 +571,7 @@
|
|
|
567
571
|
url: temp['url'] || temp['file_src'],
|
|
568
572
|
name: temp['name'] || temp['file_name'],
|
|
569
573
|
uid: temp['uid'] || temp['file_id'],
|
|
574
|
+
file_id: temp['file_id'] || '',
|
|
570
575
|
}
|
|
571
576
|
this.update(this.oneItem);
|
|
572
577
|
}
|
|
@@ -578,6 +583,7 @@
|
|
|
578
583
|
url: item['url'] || item['file_src'],
|
|
579
584
|
name: item['name'] || item['file_name'],
|
|
580
585
|
uid: item['uid'] || item['file_id'],
|
|
586
|
+
file_id: item['file_id'] || '',
|
|
581
587
|
}
|
|
582
588
|
});
|
|
583
589
|
this.showList = this.$xdHelper.cloneDeep(this.showList).concat(list).map((item)=>{
|
|
@@ -3,7 +3,18 @@
|
|
|
3
3
|
<div class="form-wrap">
|
|
4
4
|
<div class="form-input">
|
|
5
5
|
<div>
|
|
6
|
-
<div style="margin-bottom: 10px">添加素材:<span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div>
|
|
6
|
+
<!-- <div style="margin-bottom: 10px">添加素材:<span style="color:#999999;font-size:12px">(上传文件格式:JPG/PNG/JPEG/GIF,不超过5MB)</span></div> -->
|
|
7
|
+
<el-form ref="radioForm" :model="radioForm" label-width="65px">
|
|
8
|
+
<el-form-item label="上传方式">
|
|
9
|
+
<el-radio-group v-model="radioForm.method" @change="handleRaidoMethodChange">
|
|
10
|
+
<el-radio
|
|
11
|
+
v-for="item in radioOptions"
|
|
12
|
+
:key="item.value"
|
|
13
|
+
:label="item.value"
|
|
14
|
+
>{{ item.label }}</el-radio>
|
|
15
|
+
</el-radio-group>
|
|
16
|
+
</el-form-item>
|
|
17
|
+
</el-form>
|
|
7
18
|
<cus-upload
|
|
8
19
|
v-model="form.file_info"
|
|
9
20
|
action="action"
|
|
@@ -12,9 +23,11 @@
|
|
|
12
23
|
tipsformet="上传文件格式:@imageType@,不超过@size@MB."
|
|
13
24
|
styleType="list"
|
|
14
25
|
uploadType="aliyun"
|
|
15
|
-
:is-material="false"
|
|
26
|
+
:is-material="radioForm.method==='local'?false:true"
|
|
16
27
|
:isHideFileName="true"
|
|
28
|
+
:materialBtnName="'上传'"
|
|
17
29
|
:sort="true"
|
|
30
|
+
:key="cusUploadKey"
|
|
18
31
|
:showtype="false"
|
|
19
32
|
listSize="100*100"
|
|
20
33
|
:maxlen="100"
|
|
@@ -66,7 +79,7 @@ import XdUpload from "@/components/XdUpload.vue";
|
|
|
66
79
|
import handleUpdate from "@/mixins/handleUpdate";
|
|
67
80
|
import CusUpload from "./CusUpload.vue";
|
|
68
81
|
export default {
|
|
69
|
-
name: "
|
|
82
|
+
name: "UploadForm",
|
|
70
83
|
components: {
|
|
71
84
|
XdUpload,
|
|
72
85
|
CusUpload,
|
|
@@ -100,6 +113,19 @@ export default {
|
|
|
100
113
|
status: "",
|
|
101
114
|
file_info: [],
|
|
102
115
|
},
|
|
116
|
+
radioForm:{
|
|
117
|
+
method: 'local',
|
|
118
|
+
},
|
|
119
|
+
radioOptions:[
|
|
120
|
+
{
|
|
121
|
+
label:'直接上传',
|
|
122
|
+
value:'local'
|
|
123
|
+
},{
|
|
124
|
+
label:'选择素材',
|
|
125
|
+
value:'material'
|
|
126
|
+
}
|
|
127
|
+
],
|
|
128
|
+
cusUploadKey:'cusUploadKey',
|
|
103
129
|
};
|
|
104
130
|
},
|
|
105
131
|
created() {
|
|
@@ -167,6 +193,9 @@ export default {
|
|
|
167
193
|
});
|
|
168
194
|
}
|
|
169
195
|
},
|
|
196
|
+
handleRaidoMethodChange(){
|
|
197
|
+
this.cusUploadKey = Date.now();
|
|
198
|
+
},
|
|
170
199
|
},
|
|
171
200
|
};
|
|
172
201
|
</script>
|
|
@@ -226,4 +255,11 @@ export default {
|
|
|
226
255
|
color: #409eff;
|
|
227
256
|
background: #ecf5ff;
|
|
228
257
|
}
|
|
258
|
+
::v-deep .form-input .el-form-item__label{
|
|
259
|
+
width: 65px !important;
|
|
260
|
+
text-align: left !important;
|
|
261
|
+
padding: 0 !important;
|
|
262
|
+
color: #333333!important;
|
|
263
|
+
font-weight: 400!important;
|
|
264
|
+
}
|
|
229
265
|
</style>
|
|
@@ -75,7 +75,7 @@ import company from "./dialog/component/company.vue";
|
|
|
75
75
|
import share from "./dialog/component/share.vue";
|
|
76
76
|
|
|
77
77
|
export default {
|
|
78
|
-
name: "
|
|
78
|
+
name: "DialogMaterial",
|
|
79
79
|
props: {
|
|
80
80
|
setting: {
|
|
81
81
|
type: Object,
|
|
@@ -197,6 +197,7 @@ export default {
|
|
|
197
197
|
url: item.file_url,
|
|
198
198
|
name: item.file_name,
|
|
199
199
|
uid: item.file_uid,
|
|
200
|
+
file_id: item.file_id||'',
|
|
200
201
|
};
|
|
201
202
|
})
|
|
202
203
|
|
|
@@ -125,6 +125,7 @@ import uploadForm from "./components/uploadForm";
|
|
|
125
125
|
import { mapActions } from "vuex";
|
|
126
126
|
import axios from "axios";
|
|
127
127
|
export default {
|
|
128
|
+
name: "Material",
|
|
128
129
|
components: {
|
|
129
130
|
XdPagination,
|
|
130
131
|
XdDialog,
|
|
@@ -361,6 +362,7 @@ export default {
|
|
|
361
362
|
this.addMaterial(data)
|
|
362
363
|
.then((res) => {
|
|
363
364
|
this.uploadVisible = false;
|
|
365
|
+
this.materialForm = {};
|
|
364
366
|
this.getList(this.searchParams);
|
|
365
367
|
})
|
|
366
368
|
.catch((err) => {
|