jufubao-admin-library 1.1.91 → 1.1.93

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" :model="customForm" label-width="80px">
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">折以内的商品</span>
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 = [
@@ -408,7 +408,7 @@ export default {
408
408
  label: "服务费设置:",
409
409
  ele: "xd-input-unit",
410
410
  valueKey: "fee_value",
411
- value: params.fee_value || "",
411
+ value: params.fee_value==0||params.fee_value?params.fee_value : "",
412
412
  isNumber: true,
413
413
  useCustomRules: false,
414
414
  notice: "仅支持正数,按商品总额x比例值计算(遇小数自动进位)",
@@ -430,9 +430,9 @@ export default {
430
430
  return;
431
431
  }
432
432
  if (flag) {
433
- if (value <= 0) {
433
+ if (value < 0) {
434
434
  flag = false;
435
- callback("服务费必须为正数");
435
+ callback("服务费不能小于0");
436
436
  return;
437
437
  }
438
438
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.91",
3
+ "version": "1.1.93",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {