jufubao-admin-library 1.1.102 → 1.1.104

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.
@@ -109,6 +109,7 @@ export default {
109
109
  },
110
110
  cookieKey: '',
111
111
  cityData:[],
112
+ marketTagsList:[],
112
113
  }
113
114
  },
114
115
  computed: {
@@ -162,6 +163,10 @@ export default {
162
163
  if (this.JfbParent.market_tag) this.JfbParent.market_tag = market_tag
163
164
  this.productTypeList = product_type
164
165
  this.channelStatus = true
166
+ let tagsOptions = await getOptions({
167
+ server: "product-public", fn: "product", path: "p1", params: { market_tag: 1 },
168
+ })
169
+ this.marketTagsList = tagsOptions.data.market_tag
165
170
  this.initSearchForm()
166
171
  },
167
172
  methods: {
@@ -368,6 +373,24 @@ export default {
368
373
  placeholder: "请选择品牌",
369
374
  multiple: false,
370
375
  },
376
+ this.channelParams&&this.channelParams.scene === 'selected'&&this.$setting.system!=='partner-gift'&&{
377
+ label: "营销标签:", //label
378
+ ele: "xd-select-list", //package 名称
379
+ valueKey: "market_tags", //form[valueKey]
380
+ value: [], //v-model
381
+ placeholder: "请选择",
382
+ multiple: true, //多选
383
+ list: this.marketTagsList,
384
+ },
385
+ this.pagesType === 'special'&&{
386
+ label: "状态:", //label
387
+ ele: "xd-select-list", //package 名称
388
+ valueKey: "site_product_status", //form[valueKey]
389
+ value: [], //v-model
390
+ placeholder: "请选择",
391
+ multiple: false, //多选
392
+ list: [{label:'已上架',value:'Y'},{label:'已下架',value:'N'}],
393
+ },
371
394
  (showSupplierIds && this.channelActiveName !== 'all') && {
372
395
  label: "按供应商:", //label
373
396
  ele: "xd-select-remote", //package 名称
@@ -23,6 +23,10 @@
23
23
  <template slot="volume" slot-scope="inScope">
24
24
  {{$xdHelper.divisionFloatNumber(inScope.row.volume, 100)}}m³
25
25
  </template>
26
+ <template slot="purchase_price" slot-scope="inScope">
27
+ <div v-if="inScope.row.purchase_price!==-1">货源:<span class="red">{{$xdHelper.divisionFloatNumber(inScope.row.purchase_price, 100)}}</span>元</div>
28
+ <div v-if="inScope.row.dist_price!==-1">平台:<span class="red">{{$xdHelper.divisionFloatNumber(inScope.row.dist_price, 100)}}</span>元</div>
29
+ </template>
26
30
  <template slot="jfb_price_ratio" slot-scope="inScope">
27
31
  <div v-if="inScope.row.purchase_div_jfb_discount_ratio">货源:<span class="red">{{$xdHelper.divisionFloatNumber(inScope.row.purchase_div_jfb_discount_ratio, 1000)}}</span>折</div>
28
32
  <div v-if="inScope.row.dist_div_jfb_discount_ratio">平台:<span class="red">{{$xdHelper.divisionFloatNumber(inScope.row.dist_div_jfb_discount_ratio, 1000)}}</span>折</div>
@@ -166,7 +170,7 @@
166
170
  },
167
171
  created(){
168
172
  if(this.productSkuList && this.productSkuList.length && this.productSkuList.length > 0) {
169
- this.isShowPurchasePrice = this.productSkuList[0].specs.purchase_price > 0;
173
+ this.isShowPurchasePrice = (this.productSkuList[0].specs.purchase_price > 0 || this.productSkuList[0].specs.dist_price > 0)?true:false;
170
174
  this.isShowJfbPriceRatio = (this.productSkuList[0].specs.purchase_div_jfb_discount_ratio || this.productSkuList[0].specs.dist_div_jfb_discount_ratio)?true:false;
171
175
  this.isShowMarketPriceRatio = (this.productSkuList[0].specs.purchase_div_market_discount_ratio || this.productSkuList[0].specs.dist_div_market_discount_ratio)?true:false;
172
176
  }
@@ -323,7 +323,7 @@ export default {
323
323
  size: "mini", //default/mini/small
324
324
  },
325
325
  {
326
- label: "按号段:", //label
326
+ label: "限制条件:", //label
327
327
  ele: "xd-radio",
328
328
  valueKey: "card_number_type", //form[valueKey]
329
329
  value: params.card_number_type || "ALL", //v-model
@@ -331,6 +331,25 @@ export default {
331
331
  list: [
332
332
  { label: "全部号段", value: "ALL" },
333
333
  { label: "自定义号段", value: "CUSTOMIZE" },
334
+ { label: "卡类型", value: "TYPE" },
335
+ ],
336
+ rules: [
337
+ {
338
+ required: true,
339
+ message: "请选择",
340
+ trigger: ["blur", "change"],
341
+ },
342
+ ],
343
+ },
344
+ params.card_number_type==='TYPE'&&{
345
+ label: "", //label
346
+ ele: "xd-radio",
347
+ valueKey: "card_model", //form[valueKey]
348
+ value: params.card_model || "d", //v-model
349
+ placeholder: "请选择",
350
+ list: [
351
+ { label: "点卡", value: "d" },
352
+ { label: "次卡", value: "c" },
334
353
  ],
335
354
  rules: [
336
355
  {
@@ -342,6 +342,7 @@ export default {
342
342
  : this.openInfoData
343
343
  ? this.openInfoData.pay_url_data
344
344
  : "",
345
+ phone_collect_url_data: copyValue.phone_collect_url_data?phone_collect_url_data:this.openInfoData?this.openInfoData.phone_collect_url_data:"",
345
346
  })
346
347
  );
347
348
  });
@@ -757,6 +758,19 @@ export default {
757
758
  if (res.data.pay_error_url_data) {
758
759
  res.data.pay_error_url_data = JSON.parse(res.data.pay_error_url_data);
759
760
  }
761
+ let keys = Object.keys(res.data);
762
+ this.openDialogForm.map(item=>{
763
+ if(keys.includes(item.valueKey)) {
764
+ if(item.ele==='xd-select-site-path') {
765
+ if(res.data[item.valueKey]) {
766
+ res.data[item.valueKey]= JSON.parse(
767
+ res.data[item.valueKey]
768
+ );
769
+ }
770
+
771
+ }
772
+ }
773
+ })
760
774
  this.initForm(res.data);
761
775
  })
762
776
  .catch((err) => {});
@@ -1248,6 +1262,89 @@ export default {
1248
1262
  // ]
1249
1263
  // },
1250
1264
  ].filter((i) => i);
1265
+ this.openDialogForm = this.openDialogForm.map(item=>{
1266
+ if(item.ele === "xd-select-site-path"){
1267
+ item = {
1268
+ label: item.label,
1269
+ ele: "xd-select-site-path",
1270
+ className: "input100",
1271
+ valueKey: item.valueKey,
1272
+ value: params[item.valueKey] || null,
1273
+ setting: {
1274
+ site_id: this.site_id,
1275
+ },
1276
+ handleCustom: ({ action, data }) => {
1277
+ if (action === "siteList") {
1278
+ this.getEditxSiteListm()
1279
+ .then((res) => {
1280
+ data.cb(
1281
+ res.data.list.map((item) => {
1282
+ return {
1283
+ ...item,
1284
+ label: item["site_name"],
1285
+ value: item["site_id"],
1286
+ };
1287
+ })
1288
+ );
1289
+ })
1290
+ .catch((res) => {
1291
+ console.error(res);
1292
+ data.cb([]);
1293
+ });
1294
+ }
1295
+
1296
+ //获取应用列表
1297
+ if (action === "appList") {
1298
+ if (data.params && data.params.value) {
1299
+ this.getSaasSiteAppListm({ site_id: data.params.value })
1300
+ .then((res) => {
1301
+ if (!res.data.items) {
1302
+ this.$message({
1303
+ message:
1304
+ "您选择的站点无应用数据,请发布应用之后在进行配置!",
1305
+ type: "error",
1306
+ });
1307
+ data.cb([]);
1308
+ return;
1309
+ }
1310
+
1311
+ //有数据
1312
+ let routerData = [];
1313
+ res.data.items.map((item) => {
1314
+ if (item["children"]) {
1315
+ routerData = routerData.concat(
1316
+ getEditPagesTreeToPathArr(
1317
+ item["children"],
1318
+ item["label"],
1319
+ item["value"],
1320
+ item["route"],
1321
+ item["aopen_app_code"]
1322
+ )
1323
+ );
1324
+ }
1325
+ });
1326
+ data.cb(routerData);
1327
+ })
1328
+ .catch((res) => {
1329
+ console.error(res);
1330
+ data.cb([]);
1331
+ });
1332
+ } else {
1333
+ data.cb([]);
1334
+ }
1335
+ }
1336
+ },
1337
+ rules: [
1338
+ {
1339
+ required: true,
1340
+ message: "请选择网站地址",
1341
+ trigger: "change",
1342
+ },
1343
+ ],
1344
+ }
1345
+ }
1346
+ return item;
1347
+ })
1251
1348
  listForm = this.insertArrayAt(listForm, 3, this.openDialogForm);
1252
1349
  listForm.map((item) => {
1253
1350
  if (item.ele === "xd-check") {
@@ -1411,6 +1508,16 @@ export default {
1411
1508
  this.listValue.pay_error_url_data
1412
1509
  );
1413
1510
  }
1511
+ let keys = Object.keys(this.listValue);
1512
+ this.openDialogForm.map(item=>{
1513
+ if(keys.includes(item.valueKey)) {
1514
+ if(item.ele==='xd-select-site-path') {
1515
+ copyListValue[item.valueKey]= JSON.stringify(
1516
+ this.listValue[item.valueKey]
1517
+ );
1518
+ }
1519
+ }
1520
+ })
1414
1521
  return copyListValue;
1415
1522
  },
1416
1523
  handleConfirmSave() {
@@ -1431,7 +1538,7 @@ export default {
1431
1538
  }
1432
1539
  )
1433
1540
  .then(() => {
1434
- this.funOpenAppEdit(copyListValue);
1541
+ this.funOpenAppEdit();
1435
1542
  })
1436
1543
  .catch(() => {
1437
1544
  //todo
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "jufubao-admin-library",
3
- "version": "1.1.102",
3
+ "version": "1.1.104",
4
4
  "description": "聚福宝福利后台管理系统公共模块",
5
5
  "author": "goashiyong <gaoshiyong1272@vip.163.com>",
6
6
  "scripts": {