jufubao-admin-library 1.1.91 → 1.1.92
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.
|
@@ -119,5 +119,23 @@ module.exports = {
|
|
|
119
119
|
},
|
|
120
120
|
disabled: true,
|
|
121
121
|
},
|
|
122
|
+
{
|
|
123
|
+
title: "商品列表 - 已选品数量(计算的是前台es)",
|
|
124
|
+
mapFn: "selectedProductCount",
|
|
125
|
+
path: "/product-partner/v1/:xsiteid/:xnamespace/selected-products/count",
|
|
126
|
+
isRule: false,
|
|
127
|
+
data: {
|
|
128
|
+
xsiteid: ['站点Id', 'String', '必填'],
|
|
129
|
+
xnamespace: ['命名空间', 'String', '必填'],
|
|
130
|
+
filters: {
|
|
131
|
+
discount_ratio: {
|
|
132
|
+
type: ['类型 purchase_div_sale=货源进货价/售价, dist_div_sale=平台进货价/售价, real_div_sale=平台进货价/市场价', '必填'],
|
|
133
|
+
min: ['最小值', 'Number', ''],
|
|
134
|
+
max: ['最大值', 'Number', ''],
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
},
|
|
138
|
+
disabled: true,
|
|
139
|
+
},
|
|
122
140
|
],
|
|
123
141
|
}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
@onGetParamsAndHeader="handleGetParamsAndHeader"
|
|
15
15
|
>
|
|
16
16
|
<template slot-scope="scope" slot="custom">
|
|
17
|
-
<el-form ref="form"
|
|
17
|
+
<el-form ref="form" label-width="80px">
|
|
18
18
|
<el-form-item
|
|
19
19
|
class="custom-form-item"
|
|
20
20
|
v-for="(item, index) in customForm"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
v-model="item.discount_ratio"
|
|
35
35
|
placeholder="请填写"
|
|
36
36
|
></el-input>
|
|
37
|
-
<span style="margin-left: 10px"
|
|
37
|
+
<span style="margin-left: 10px">%以内的商品</span>
|
|
38
38
|
<div style="margin-left: 10px" class="">
|
|
39
39
|
<el-link
|
|
40
40
|
:underline="false"
|
|
@@ -53,6 +53,10 @@
|
|
|
53
53
|
v-if="customForm.length > 1"
|
|
54
54
|
></el-link>
|
|
55
55
|
</div>
|
|
56
|
+
<span v-if="item.count" style="margin: 0 4px;color: red;">{{ item.count }}款商品</span>
|
|
57
|
+
<el-button type="primary" :loading="item.loading" @click="handleGetCount(item)" style="margin-left: 8px;">
|
|
58
|
+
{{item.count === undefined ? '计算数量':'重新计算'}}
|
|
59
|
+
</el-button>
|
|
56
60
|
</el-form-item>
|
|
57
61
|
</el-form>
|
|
58
62
|
</template>
|
|
@@ -147,7 +151,22 @@ export default {
|
|
|
147
151
|
"cycleDetail",
|
|
148
152
|
"cycleUpdate",
|
|
149
153
|
"cycleLogDetail",
|
|
154
|
+
"selectedProductCount",
|
|
150
155
|
]),
|
|
156
|
+
handleGetCount(item){
|
|
157
|
+
let discount_ratio = {
|
|
158
|
+
type: "real_div_sale",
|
|
159
|
+
max: item.discount_ratio * 100,
|
|
160
|
+
min: 0,
|
|
161
|
+
}
|
|
162
|
+
this.$set(item, 'loading', true);
|
|
163
|
+
this.selectedProductCount({filters: {discount_ratio}}).then(res => {
|
|
164
|
+
this.$set(item, 'count', res.data.total);
|
|
165
|
+
this.$set(item, 'loading', false)
|
|
166
|
+
}).catch(err => {
|
|
167
|
+
this.$set(item, 'loading', false)
|
|
168
|
+
})
|
|
169
|
+
},
|
|
151
170
|
initFormList(params, isWitch) {
|
|
152
171
|
console.log(params, "params");
|
|
153
172
|
let formList = [
|