ts-glitter 13.4.7 → 13.5.0
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/lowcode/Entry.js +1 -1
- package/lowcode/Entry.ts +1 -2
- package/lowcode/backend-manager/bg-blog.js +573 -590
- package/lowcode/backend-manager/bg-blog.ts +884 -915
- package/lowcode/backend-manager/bg-graph-api.js +3 -3
- package/lowcode/backend-manager/bg-graph-api.ts +3 -5
- package/lowcode/backend-manager/bg-guide.js +69 -24
- package/lowcode/backend-manager/bg-guide.ts +82 -27
- package/lowcode/backend-manager/bg-line.js +18 -18
- package/lowcode/backend-manager/bg-line.ts +18 -35
- package/lowcode/backend-manager/bg-notify.js +18 -18
- package/lowcode/backend-manager/bg-notify.ts +18 -34
- package/lowcode/backend-manager/bg-project.js +11 -11
- package/lowcode/backend-manager/bg-project.ts +11 -20
- package/lowcode/backend-manager/bg-recommend.js +656 -652
- package/lowcode/backend-manager/bg-recommend.ts +31 -40
- package/lowcode/backend-manager/bg-seo.js +25 -20
- package/lowcode/backend-manager/bg-seo.ts +121 -105
- package/lowcode/backend-manager/bg-shopping.js +14 -14
- package/lowcode/backend-manager/bg-shopping.ts +14 -25
- package/lowcode/backend-manager/bg-sns.js +18 -18
- package/lowcode/backend-manager/bg-sns.ts +18 -34
- package/lowcode/backend-manager/bg-wallet.js +5 -5
- package/lowcode/backend-manager/bg-wallet.ts +5 -7
- package/lowcode/backend-manager/bg-widget.js +25 -14
- package/lowcode/backend-manager/bg-widget.ts +43 -17
- package/lowcode/cms-plugin/ai-points-list.js +54 -57
- package/lowcode/cms-plugin/ai-points-list.ts +55 -63
- package/lowcode/cms-plugin/ai-points.js +2 -2
- package/lowcode/cms-plugin/ai-points.ts +2 -4
- package/lowcode/cms-plugin/app-release.js +45 -46
- package/lowcode/cms-plugin/app-release.ts +221 -209
- package/lowcode/cms-plugin/auto-reply.js +3 -3
- package/lowcode/cms-plugin/auto-reply.ts +3 -5
- package/lowcode/cms-plugin/form-setting.js +6 -6
- package/lowcode/cms-plugin/form-setting.ts +6 -10
- package/lowcode/cms-plugin/line-auto-reply.js +3 -3
- package/lowcode/cms-plugin/line-auto-reply.ts +3 -5
- package/lowcode/cms-plugin/member-group-list.js +2 -2
- package/lowcode/cms-plugin/member-group-list.ts +2 -3
- package/lowcode/cms-plugin/member-setting.js +75 -88
- package/lowcode/cms-plugin/member-setting.ts +143 -157
- package/lowcode/cms-plugin/member-type-list.js +243 -240
- package/lowcode/cms-plugin/member-type-list.ts +14 -19
- package/lowcode/cms-plugin/menus-setting.js +2 -2
- package/lowcode/cms-plugin/menus-setting.ts +2 -4
- package/lowcode/cms-plugin/permission-setting.js +17 -18
- package/lowcode/cms-plugin/permission-setting.ts +145 -147
- package/lowcode/cms-plugin/pos-checkout-setting.js +7 -10
- package/lowcode/cms-plugin/pos-checkout-setting.ts +174 -179
- package/lowcode/cms-plugin/shopping-collections.js +224 -218
- package/lowcode/cms-plugin/shopping-collections.ts +152 -153
- package/lowcode/cms-plugin/shopping-discount-setting.js +855 -852
- package/lowcode/cms-plugin/shopping-discount-setting.ts +14 -18
- package/lowcode/cms-plugin/shopping-finance-setting.js +259 -265
- package/lowcode/cms-plugin/shopping-finance-setting.ts +273 -284
- package/lowcode/cms-plugin/shopping-order-manager.js +520 -497
- package/lowcode/cms-plugin/shopping-order-manager.ts +347 -325
- package/lowcode/cms-plugin/shopping-order-return.js +10 -9
- package/lowcode/cms-plugin/shopping-order-return.ts +23 -27
- package/lowcode/cms-plugin/shopping-product-setting.js +1079 -1055
- package/lowcode/cms-plugin/shopping-product-setting.ts +348 -337
- package/lowcode/cms-plugin/shopping-product-stock.js +2 -2
- package/lowcode/cms-plugin/shopping-product-stock.ts +2 -3
- package/lowcode/cms-plugin/shopping-product-text.js +32 -36
- package/lowcode/cms-plugin/shopping-product-text.ts +78 -81
- package/lowcode/cms-plugin/shopping-rebate-setting.js +321 -316
- package/lowcode/cms-plugin/shopping-rebate-setting.ts +15 -17
- package/lowcode/cms-plugin/shopping-rebate.js +102 -59
- package/lowcode/cms-plugin/shopping-rebate.ts +110 -71
- package/lowcode/cms-plugin/shopping-shipment-setting.js +382 -426
- package/lowcode/cms-plugin/shopping-shipment-setting.ts +489 -531
- package/lowcode/cms-plugin/sms-points.js +2 -2
- package/lowcode/cms-plugin/sms-points.ts +2 -4
- package/lowcode/cms-plugin/sns-auto-reply.js +3 -3
- package/lowcode/cms-plugin/sns-auto-reply.ts +3 -5
- package/lowcode/cms-plugin/third-party-apple.js +22 -28
- package/lowcode/cms-plugin/third-party-apple.ts +189 -191
- package/lowcode/cms-plugin/third-party-facebook.js +31 -32
- package/lowcode/cms-plugin/third-party-facebook.ts +240 -234
- package/lowcode/cms-plugin/third-party-google.js +33 -29
- package/lowcode/cms-plugin/third-party-google.ts +216 -202
- package/lowcode/cms-plugin/third-party-line.js +19 -22
- package/lowcode/cms-plugin/third-party-line.ts +166 -162
- package/lowcode/cms-plugin/user-list.js +449 -441
- package/lowcode/cms-plugin/user-list.ts +63 -65
- package/lowcode/cms-plugin/user-login-setting.js +2 -2
- package/lowcode/cms-plugin/user-login-setting.ts +2 -5
- package/lowcode/cms-plugin/wallet-list.js +5 -5
- package/lowcode/cms-plugin/wallet-list.ts +5 -7
- package/lowcode/cms-plugin/web-config-setting.js +5 -5
- package/lowcode/cms-plugin/web-config-setting.ts +5 -8
- package/lowcode/cms-plugin/widget-manager.js +1 -1
- package/lowcode/cms-plugin/widget-manager.ts +1 -2
- package/lowcode/css/editor.css +12 -1
- package/lowcode/form-view/editor/array-items.js +1 -1
- package/lowcode/form-view/editor/array-items.ts +1 -1
- package/lowcode/form-view/editor/color-selector.ts +1 -1
- package/lowcode/glitter-base/route/shopping.js +17 -0
- package/lowcode/glitter-base/route/shopping.ts +17 -0
- package/lowcode/glitter-base/route/user.js +2 -2
- package/lowcode/glitter-base/route/user.ts +26 -27
- package/lowcode/glitterBundle/Glitter.js +10 -3
- package/lowcode/glitterBundle/Glitter.ts +10 -3
- package/lowcode/jspage/editor.js +16 -10
- package/lowcode/jspage/editor.ts +17 -11
- package/lowcode/jspage/function-page/server-editor/router/api-manager.js +4 -4
- package/lowcode/jspage/function-page/server-editor/router/api-manager.ts +4 -6
- package/lowcode/jspage/function-page/server-editor/router/database.js +8 -8
- package/lowcode/jspage/function-page/server-editor/router/database.ts +53 -48
- package/lowcode/jspage/function-page/server-editor/router/domain-manager.js +2 -2
- package/lowcode/jspage/function-page/server-editor/router/domain-manager.ts +2 -3
- package/lowcode/jspage/function-page/server-editor/router/server-status.js +50 -38
- package/lowcode/jspage/function-page/server-editor/router/server-status.ts +93 -76
- package/lowcode/jspage/main.js +61 -29
- package/lowcode/jspage/main.ts +99 -56
- package/lowcode/official_view_component/official/form.js +110 -78
- package/lowcode/official_view_component/official/form.ts +238 -192
- package/lowcode/view-model/saas-view-model.js +454 -285
- package/lowcode/view-model/saas-view-model.ts +917 -722
- package/package.json +1 -1
- package/src/api-public/controllers/ai-points.js.map +1 -1
- package/src/api-public/controllers/article.js +3 -0
- package/src/api-public/controllers/article.js.map +1 -1
- package/src/api-public/controllers/article.ts +3 -0
- package/src/api-public/controllers/chat.js.map +1 -1
- package/src/api-public/controllers/delivery.js.map +1 -1
- package/src/api-public/controllers/fb-message.js.map +1 -1
- package/src/api-public/controllers/index.js.map +1 -1
- package/src/api-public/controllers/invoice.js.map +1 -1
- package/src/api-public/controllers/line-message.js.map +1 -1
- package/src/api-public/controllers/oauth.js.map +1 -1
- package/src/api-public/controllers/rebate.js.map +1 -1
- package/src/api-public/controllers/recommend.js.map +1 -1
- package/src/api-public/controllers/sms-points.js.map +1 -1
- package/src/api-public/controllers/wallet.js.map +1 -1
- package/src/api-public/services/EcInvoice.js.map +1 -1
- package/src/api-public/services/ai-pointes.js.map +1 -1
- package/src/api-public/services/article.js.map +1 -1
- package/src/api-public/services/auto-send-email.js.map +1 -1
- package/src/api-public/services/delivery.js.map +1 -1
- package/src/api-public/services/ezpay/tool.d.ts +0 -1
- package/src/api-public/services/ezpay/tool.js.map +1 -1
- package/src/api-public/services/fake-data-model/fake-product.js.map +1 -1
- package/src/api-public/services/fb-message.js.map +1 -5
- package/src/api-public/services/filter-protect-data.js.map +1 -1
- package/src/api-public/services/financial-service.js.map +1 -1
- package/src/api-public/services/graph-api.js.map +1 -1
- package/src/api-public/services/invoice.js.map +1 -1
- package/src/api-public/services/monitor.d.ts +0 -1
- package/src/api-public/services/monitor.js.map +1 -1
- package/src/api-public/services/public-table-check.js.map +1 -1
- package/src/api-public/services/rebate.js.map +1 -1
- package/src/api-public/services/recommend.js.map +1 -1
- package/src/api-public/services/share-permission.js.map +1 -1
- package/src/api-public/services/shopping.d.ts +1 -1
- package/src/api-public/services/shopping.js +44 -36
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +184 -183
- package/src/api-public/services/sms-pointes.js.map +1 -1
- package/src/api-public/services/sms.js.map +1 -1
- package/src/api-public/services/wallet.js.map +1 -1
- package/src/api-public/services/workers.d.ts +1 -1
- package/src/api-public/utils/ut-database.js.map +1 -1
- package/src/app-project/serverless/src/controllers/index.js.map +1 -1
- package/src/app-project/serverless/src/controllers/sample.js.map +1 -1
- package/src/app-project/serverless/src/modules/database.d.ts +1 -2
- package/src/app-project/serverless/src/modules/database.js.map +1 -1
- package/src/app-project/serverless/src/modules/exception.js.map +1 -1
- package/src/app-project/serverless/src/modules/hooks.js.map +1 -1
- package/src/app-project/serverless/src/modules/logger.js.map +1 -1
- package/src/app-project/serverless/src/modules/redis.d.ts +1 -1
- package/src/app-project/serverless/src/modules/redis.js.map +1 -1
- package/src/app-project/serverless/src/modules/response.js.map +1 -1
- package/src/app-project/serverless/src/modules/ssh.js.map +1 -1
- package/src/config.js.map +1 -5
- package/src/controllers/ai.js.map +1 -1
- package/src/controllers/global-event.js.map +1 -1
- package/src/controllers/page.js.map +1 -1
- package/src/controllers/private_config.js.map +1 -1
- package/src/export/export-test.js.map +1 -1
- package/src/firebase/message.js +1 -2
- package/src/firebase/message.js.map +1 -1
- package/src/helper/app_creater.js +1 -2
- package/src/helper/app_creater.js.map +1 -1
- package/src/helper/glitter-util.d.ts +0 -1
- package/src/helper/glitter-util.js.map +1 -1
- package/src/lambda/interface.d.ts +1 -1
- package/src/lambda/interface.js +2 -2
- package/src/lambda/interface.js.map +1 -1
- package/src/modules/exception.js.map +1 -1
- package/src/modules/hooks.js.map +1 -1
- package/src/modules/response.js.map +1 -1
- package/src/modules/ssh.js.map +1 -1
- package/src/services/ses.js +1 -2
- package/src/services/ses.js.map +1 -1
- package/src/services/system-schedule.js.map +1 -1
- package/g1b90plcfb.csv +0 -1289
|
@@ -41,7 +41,7 @@ export class BgRecommend {
|
|
|
41
41
|
}
|
|
42
42
|
if (vm.type === 'list') {
|
|
43
43
|
return BgWidget.container(html `
|
|
44
|
-
<div class="
|
|
44
|
+
<div class="title-container">
|
|
45
45
|
${BgWidget.title('分銷連結')}
|
|
46
46
|
<div class="flex-fill"></div>
|
|
47
47
|
${BgWidget.darkButton('新增', gvc.event(() => {
|
|
@@ -57,7 +57,7 @@ export class BgRecommend {
|
|
|
57
57
|
vm.type = 'replace';
|
|
58
58
|
},
|
|
59
59
|
})))}
|
|
60
|
-
|
|
60
|
+
`);
|
|
61
61
|
}
|
|
62
62
|
else if (vm.type === 'add') {
|
|
63
63
|
return this.editorLink({
|
|
@@ -314,7 +314,7 @@ export class BgRecommend {
|
|
|
314
314
|
view: () => {
|
|
315
315
|
if (vm.type === 'list') {
|
|
316
316
|
return BgWidget.container(html `
|
|
317
|
-
<div class="
|
|
317
|
+
<div class="title-container">
|
|
318
318
|
${BgWidget.title('推薦人列表')}
|
|
319
319
|
<div class="flex-fill"></div>
|
|
320
320
|
${BgWidget.darkButton('新增', gvc.event(() => {
|
|
@@ -435,7 +435,7 @@ export class BgRecommend {
|
|
|
435
435
|
},
|
|
436
436
|
}),
|
|
437
437
|
].join('')))}
|
|
438
|
-
|
|
438
|
+
`);
|
|
439
439
|
}
|
|
440
440
|
else if (vm.type === 'add') {
|
|
441
441
|
return this.editorUser({
|
|
@@ -519,65 +519,67 @@ export class BgRecommend {
|
|
|
519
519
|
return BgWidget.spinner({ text: { visible: false } });
|
|
520
520
|
}
|
|
521
521
|
return BgWidget.container([
|
|
522
|
-
html ` <div class="
|
|
522
|
+
html ` <div class="title-container">
|
|
523
523
|
${BgWidget.goBack(gvc.event(() => {
|
|
524
524
|
cf.callback();
|
|
525
525
|
}))}
|
|
526
526
|
${BgWidget.title(vm.data.title || '新增分銷連結')}
|
|
527
527
|
<div class="flex-fill"></div>
|
|
528
528
|
</div>`,
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
529
|
+
BgWidget.container1x2({
|
|
530
|
+
html: gvc.bindView(() => {
|
|
531
|
+
const id = glitter.getUUID();
|
|
532
|
+
return {
|
|
533
|
+
bind: id,
|
|
534
|
+
view: () => {
|
|
535
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
|
|
536
|
+
const inputStyle = 'font-size: 16px; height:40px; width:200px;';
|
|
537
|
+
let map = [
|
|
538
|
+
BgWidget.mainCard([
|
|
539
|
+
html ` <div class="tx_700">連結網址</div>`,
|
|
540
|
+
html ` <div class="tx_normal">分銷代碼</div>
|
|
541
541
|
<div style="margin: 4px 0 8px;">${BgWidget.grayNote('是一段唯一的識別碼,用於系統追蹤和記錄通過該代碼完成的銷售')}</div>
|
|
542
542
|
${EditorElem.editeInput({
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
543
|
+
gvc: gvc,
|
|
544
|
+
title: '',
|
|
545
|
+
default: (_a = vm.data.code) !== null && _a !== void 0 ? _a : '',
|
|
546
|
+
placeHolder: '請輸入分銷代碼',
|
|
547
|
+
callback: (text) => {
|
|
548
|
+
vm.data.code = text;
|
|
549
|
+
},
|
|
550
|
+
readonly: vm.readonly,
|
|
551
|
+
})}`,
|
|
552
|
+
html ` <div class="tx_normal">導向網頁</div>
|
|
553
553
|
${BgWidget.linkList({
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
554
|
+
gvc: gvc,
|
|
555
|
+
title: '',
|
|
556
|
+
default: (_b = vm.data.redirect) !== null && _b !== void 0 ? _b : '',
|
|
557
|
+
placeHolder: '選擇或貼上外部連結',
|
|
558
|
+
callback: (text) => {
|
|
559
|
+
vm.data.redirect = text;
|
|
560
|
+
gvc.notifyDataChange(vm.previewId);
|
|
561
|
+
},
|
|
562
|
+
filter: {
|
|
563
|
+
page: ['一頁商店', '隱形賣場'],
|
|
564
|
+
},
|
|
565
|
+
})}`,
|
|
566
|
+
gvc.bindView({
|
|
567
|
+
bind: vm.previewId,
|
|
568
|
+
view: () => {
|
|
569
|
+
var _a;
|
|
570
|
+
const prefixURL = `https://${window.parent.glitter.share.editorViewModel.domain}/distribution/`;
|
|
571
|
+
return [
|
|
572
|
+
html `<div class="tx_normal fw-normal mb-2">自訂網址</div>`,
|
|
573
|
+
html ` <div
|
|
574
574
|
style=" justify-content: flex-start; align-items: center; display: inline-flex;border:1px solid #EAEAEA;border-radius: 10px;overflow: hidden; ${document
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
575
|
+
.body.clientWidth > 768
|
|
576
|
+
? 'gap: 18px; '
|
|
577
|
+
: 'flex-direction: column; gap: 0px; '}"
|
|
578
578
|
class="w-100"
|
|
579
579
|
>
|
|
580
|
-
<div
|
|
580
|
+
<div
|
|
581
|
+
style="width:100%;padding: 9px 18px;background: #EAEAEA; justify-content: flex-start; align-items: center; gap: 5px; display: flex"
|
|
582
|
+
>
|
|
581
583
|
<div
|
|
582
584
|
style="text-align: right; color: #393939; font-size: 16px; font-family: Noto Sans; font-weight: 400; word-wrap: break-word"
|
|
583
585
|
>
|
|
@@ -587,178 +589,178 @@ export class BgRecommend {
|
|
|
587
589
|
<input
|
|
588
590
|
class="flex-fill"
|
|
589
591
|
style="border:none;background:none;text-align: start; color: #393939; font-size: 16px; font-family: Noto Sans; font-weight: 400; word-wrap: break-word; ${document
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
592
|
+
.body.clientWidth > 768
|
|
593
|
+
? ''
|
|
594
|
+
: 'padding: 9px 18px;'}"
|
|
593
595
|
value="${vm.data.link || ''}"
|
|
594
596
|
onchange="${gvc.event((e) => {
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
597
|
+
let text = e.value;
|
|
598
|
+
if (!CheckInput.isEnglishNumberHyphen(text)) {
|
|
599
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
600
|
+
dialog.infoMessage({ text: '僅能輸入英文或數字與連接號' });
|
|
601
|
+
gvc.notifyDataChange(id);
|
|
602
|
+
}
|
|
603
|
+
else {
|
|
604
|
+
vm.data.link = text;
|
|
605
|
+
gvc.notifyDataChange(id);
|
|
606
|
+
}
|
|
607
|
+
})}"
|
|
606
608
|
/>
|
|
607
609
|
</div>`,
|
|
608
|
-
|
|
610
|
+
html ` <div class="mt-2 mb-1">
|
|
609
611
|
<span class="tx_normal me-2">網址預覽</span>${BgWidget.greenNote(prefixURL + ((_a = vm.data.link) !== null && _a !== void 0 ? _a : ''))}
|
|
610
612
|
</div>`,
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
613
|
+
].join('');
|
|
614
|
+
},
|
|
615
|
+
}),
|
|
616
|
+
html ` <div class="tx_700">基本設定</div>`,
|
|
617
|
+
html ` <div class="tx_normal">分銷連結名稱</div>
|
|
616
618
|
${BgWidget.mbContainer(8)}
|
|
617
619
|
${EditorElem.editeInput({
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
620
|
+
gvc: gvc,
|
|
621
|
+
title: '',
|
|
622
|
+
default: (_c = vm.data.title) !== null && _c !== void 0 ? _c : '',
|
|
623
|
+
placeHolder: '請輸入分銷連結名稱',
|
|
624
|
+
callback: (text) => {
|
|
625
|
+
vm.data.title = text;
|
|
626
|
+
},
|
|
627
|
+
})}`,
|
|
628
|
+
].join(BgWidget.mbContainer(18))),
|
|
629
|
+
BgWidget.mainCard([
|
|
630
|
+
html ` <div class="tx_700">分潤條件</div>`,
|
|
631
|
+
html ` <div class="tx_700">訂單滿額</div>
|
|
630
632
|
${BgWidget.mbContainer(8)}
|
|
631
633
|
${EditorElem.numberInput({
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
634
|
+
gvc: gvc,
|
|
635
|
+
title: '',
|
|
636
|
+
default: (_d = vm.data.condition) !== null && _d !== void 0 ? _d : 0,
|
|
637
|
+
placeHolder: '請輸入分銷代碼',
|
|
638
|
+
callback: (text) => {
|
|
639
|
+
vm.data.condition = text;
|
|
640
|
+
},
|
|
641
|
+
min: 0,
|
|
642
|
+
unit: '元',
|
|
643
|
+
readonly: vm.readonly,
|
|
644
|
+
})}`,
|
|
645
|
+
BgWidget.horizontalLine(),
|
|
646
|
+
html ` <div class="tx_700">分潤類型</div>
|
|
645
647
|
${BgWidget.mbContainer(8)}
|
|
646
648
|
${BgWidget.multiCheckboxContainer(gvc, [
|
|
647
|
-
|
|
648
|
-
|
|
649
|
-
|
|
650
|
-
|
|
651
|
-
|
|
649
|
+
{ key: 'none', name: '沒有分潤' },
|
|
650
|
+
{
|
|
651
|
+
key: 'fix',
|
|
652
|
+
name: '固定金額',
|
|
653
|
+
innerHtml: html `<div style="margin: 4px 0 8px;">${BgWidget.grayNote('每筆訂單分潤固定金額')}</div>
|
|
652
654
|
${EditorElem.numberInput({
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
|
|
667
|
-
|
|
668
|
-
|
|
655
|
+
gvc: gvc,
|
|
656
|
+
title: '',
|
|
657
|
+
default: (_e = vm.data.share_value) !== null && _e !== void 0 ? _e : 0,
|
|
658
|
+
placeHolder: '請輸入數值',
|
|
659
|
+
callback: (text) => {
|
|
660
|
+
vm.data.share_value = text;
|
|
661
|
+
gvc.notifyDataChange(id);
|
|
662
|
+
},
|
|
663
|
+
min: 0,
|
|
664
|
+
unit: '元',
|
|
665
|
+
})}`,
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
key: 'percent',
|
|
669
|
+
name: '百分比',
|
|
670
|
+
innerHtml: html `<div style="margin: 4px 0 8px;">
|
|
669
671
|
${BgWidget.grayNote('分潤計算方式為: (訂單結算金額 - 運費)*分潤百分比')}
|
|
670
672
|
</div>
|
|
671
673
|
${EditorElem.numberInput({
|
|
672
|
-
|
|
673
|
-
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
674
|
+
gvc: gvc,
|
|
675
|
+
title: '',
|
|
676
|
+
default: (_f = vm.data.share_value) !== null && _f !== void 0 ? _f : 0,
|
|
677
|
+
placeHolder: '請輸入數值',
|
|
678
|
+
callback: (text) => {
|
|
679
|
+
vm.data.share_value = text;
|
|
680
|
+
gvc.notifyDataChange(id);
|
|
681
|
+
},
|
|
682
|
+
max: 100,
|
|
683
|
+
min: 0,
|
|
684
|
+
unit: '%',
|
|
685
|
+
})}`,
|
|
686
|
+
},
|
|
687
|
+
], [(_g = vm.data.share_type) !== null && _g !== void 0 ? _g : ''], (data) => {
|
|
688
|
+
vm.data.share_type = data[0];
|
|
689
|
+
}, { single: true, readonly: vm.readonly })}`,
|
|
690
|
+
].join(BgWidget.mbContainer(18))),
|
|
691
|
+
BgWidget.mainCard((() => {
|
|
692
|
+
const id = gvc.glitter.getUUID();
|
|
693
|
+
return gvc.bindView({
|
|
694
|
+
bind: id,
|
|
695
|
+
view: () => {
|
|
696
|
+
var _a;
|
|
697
|
+
return html `<div class="tx_700">分銷專屬折扣</div>
|
|
696
698
|
${BgWidget.mbContainer(8)}
|
|
697
699
|
${BgWidget.multiCheckboxContainer(gvc, [
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
700
|
+
{ key: 'no', name: '不套用折扣' },
|
|
701
|
+
{
|
|
702
|
+
key: 'yes',
|
|
703
|
+
name: '套用折扣',
|
|
704
|
+
innerHtml: html `<div style="margin: 4px 0 8px;">
|
|
703
705
|
${BgWidget.grayNote('請至「優惠促銷」新增折扣,折扣方式必須勾選「供分銷連結使用」')}
|
|
704
706
|
</div>
|
|
705
707
|
${BgWidget.select({
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
708
|
+
gvc: gvc,
|
|
709
|
+
callback: (text) => {
|
|
710
|
+
vm.data.voucher = parseInt(text, 10);
|
|
711
|
+
gvc.notifyDataChange(id);
|
|
712
|
+
},
|
|
713
|
+
default: vm.data.voucher ? `${vm.data.voucher}` : '',
|
|
714
|
+
options: [{ key: '', value: '(請選擇優惠券)' }].concat(vm.voucherList.map((item) => {
|
|
715
|
+
return { key: `${item.id}`, value: item.content.title };
|
|
716
|
+
})),
|
|
717
|
+
})}
|
|
716
718
|
${[
|
|
717
|
-
|
|
719
|
+
BgWidget.title(html `折扣商品
|
|
718
720
|
<div class="badge ms-2 mt-3" style="background:#eaeaea;color:#393939;">
|
|
719
721
|
僅以下設定的商品會套用折扣
|
|
720
722
|
</div>`, 'font-size: 16px;'),
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
758
|
-
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
|
|
723
|
+
html `<div style="height: 10px;"></div>`,
|
|
724
|
+
gvc.bindView((() => {
|
|
725
|
+
const id = glitter.getUUID();
|
|
726
|
+
return {
|
|
727
|
+
bind: id,
|
|
728
|
+
view: () => {
|
|
729
|
+
var _a, _b;
|
|
730
|
+
vm.data.relative = (_a = vm.data.relative) !== null && _a !== void 0 ? _a : 'all';
|
|
731
|
+
vm.data.relative_data = (_b = vm.data.relative_data) !== null && _b !== void 0 ? _b : [];
|
|
732
|
+
return [
|
|
733
|
+
EditorElem.radio({
|
|
734
|
+
gvc: gvc,
|
|
735
|
+
title: '',
|
|
736
|
+
def: vm.data.relative,
|
|
737
|
+
array: [
|
|
738
|
+
{ title: '所有商品', value: 'all' },
|
|
739
|
+
{ title: '商品系列', value: 'collection' },
|
|
740
|
+
{ title: '單一商品', value: 'product' },
|
|
741
|
+
],
|
|
742
|
+
callback: (text) => {
|
|
743
|
+
vm.data.relative = text;
|
|
744
|
+
gvc.notifyDataChange(id);
|
|
745
|
+
},
|
|
746
|
+
oneLine: true,
|
|
747
|
+
}),
|
|
748
|
+
(() => {
|
|
749
|
+
switch (vm.data.relative) {
|
|
750
|
+
case 'collection':
|
|
751
|
+
return gvc.bindView(() => {
|
|
752
|
+
const subVM = {
|
|
753
|
+
id: gvc.glitter.getUUID(),
|
|
754
|
+
loading: true,
|
|
755
|
+
dataList: [],
|
|
756
|
+
};
|
|
757
|
+
return {
|
|
758
|
+
bind: subVM.id,
|
|
759
|
+
view: () => {
|
|
760
|
+
if (subVM.loading) {
|
|
761
|
+
return BgWidget.spinner();
|
|
762
|
+
}
|
|
763
|
+
return html `
|
|
762
764
|
<div class="d-flex flex-column p-2" style="gap: 18px;">
|
|
763
765
|
<div
|
|
764
766
|
class="d-flex align-items-center gray-bottom-line-18"
|
|
@@ -768,75 +770,75 @@ export class BgRecommend {
|
|
|
768
770
|
<div class="tx_normal">系列列表</div>
|
|
769
771
|
</div>
|
|
770
772
|
${BgWidget.grayButton('選擇系列', gvc.event(() => {
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
773
|
+
BgProduct.collectionsDialog({
|
|
774
|
+
gvc: gvc,
|
|
775
|
+
default: vm.data
|
|
776
|
+
.relative_data,
|
|
777
|
+
callback: (value) => __awaiter(this, void 0, void 0, function* () {
|
|
778
|
+
vm.data.relative_data = value;
|
|
779
|
+
subVM.dataList =
|
|
780
|
+
yield BgProduct.getCollectiosOpts(value);
|
|
781
|
+
subVM.loading = true;
|
|
782
|
+
gvc.notifyDataChange(subVM.id);
|
|
783
|
+
}),
|
|
784
|
+
});
|
|
785
|
+
}), { textStyle: 'font-weight: 400;' })}
|
|
784
786
|
</div>
|
|
785
787
|
${gvc.map(subVM.dataList.map((opt, index) => {
|
|
786
|
-
|
|
788
|
+
return html ` <div
|
|
787
789
|
class="d-flex align-items-center form-check-label c_updown_label gap-3"
|
|
788
790
|
>
|
|
789
791
|
<span class="tx_normal"
|
|
790
792
|
>${index + 1} . ${opt.value}</span
|
|
791
793
|
>
|
|
792
794
|
${opt.note
|
|
793
|
-
|
|
795
|
+
? html `
|
|
794
796
|
<span class="tx_gray_12 ms-2"
|
|
795
797
|
>${opt.note}</span
|
|
796
798
|
>
|
|
797
799
|
`
|
|
798
|
-
|
|
800
|
+
: ''}
|
|
799
801
|
</div>`;
|
|
800
|
-
|
|
802
|
+
}))}
|
|
801
803
|
</div>
|
|
802
804
|
`;
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
805
|
+
},
|
|
806
|
+
onCreate: () => {
|
|
807
|
+
if (subVM.loading) {
|
|
808
|
+
if (vm.data.relative_data.length === 0) {
|
|
809
|
+
setTimeout(() => {
|
|
810
|
+
subVM.dataList = [];
|
|
811
|
+
subVM.loading = false;
|
|
812
|
+
gvc.notifyDataChange(subVM.id);
|
|
813
|
+
}, 300);
|
|
814
|
+
}
|
|
815
|
+
else {
|
|
816
|
+
new Promise((resolve) => {
|
|
817
|
+
resolve(BgProduct.getCollectiosOpts(vm.data.relative_data));
|
|
818
|
+
}).then((data) => {
|
|
819
|
+
subVM.dataList = data;
|
|
820
|
+
subVM.loading = false;
|
|
821
|
+
gvc.notifyDataChange(subVM.id);
|
|
822
|
+
});
|
|
823
|
+
}
|
|
812
824
|
}
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
825
|
+
},
|
|
826
|
+
};
|
|
827
|
+
});
|
|
828
|
+
case 'product':
|
|
829
|
+
return gvc.bindView(() => {
|
|
830
|
+
const subVM = {
|
|
831
|
+
id: gvc.glitter.getUUID(),
|
|
832
|
+
loading: true,
|
|
833
|
+
dataList: [],
|
|
834
|
+
};
|
|
835
|
+
return {
|
|
836
|
+
bind: subVM.id,
|
|
837
|
+
view: () => {
|
|
838
|
+
if (subVM.loading) {
|
|
839
|
+
return BgWidget.spinner();
|
|
821
840
|
}
|
|
822
|
-
|
|
823
|
-
},
|
|
824
|
-
};
|
|
825
|
-
});
|
|
826
|
-
case 'product':
|
|
827
|
-
return gvc.bindView(() => {
|
|
828
|
-
const subVM = {
|
|
829
|
-
id: gvc.glitter.getUUID(),
|
|
830
|
-
loading: true,
|
|
831
|
-
dataList: [],
|
|
832
|
-
};
|
|
833
|
-
return {
|
|
834
|
-
bind: subVM.id,
|
|
835
|
-
view: () => {
|
|
836
|
-
if (subVM.loading) {
|
|
837
|
-
return BgWidget.spinner();
|
|
838
|
-
}
|
|
839
|
-
return html `
|
|
841
|
+
return html `
|
|
840
842
|
<div class="d-flex flex-column p-2" style="gap: 18px;">
|
|
841
843
|
<div
|
|
842
844
|
class="d-flex align-items-center gray-bottom-line-18 "
|
|
@@ -846,25 +848,25 @@ export class BgRecommend {
|
|
|
846
848
|
<div class="tx_normal">產品列表</div>
|
|
847
849
|
</div>
|
|
848
850
|
${BgWidget.grayButton('選擇商品', gvc.event(() => {
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
851
|
+
var _a;
|
|
852
|
+
BgProduct.productsDialog({
|
|
853
|
+
gvc: gvc,
|
|
854
|
+
default: (_a = vm.data
|
|
855
|
+
.relative_data) !== null && _a !== void 0 ? _a : [],
|
|
856
|
+
callback: (value) => __awaiter(this, void 0, void 0, function* () {
|
|
857
|
+
vm.data.relative_data = value;
|
|
858
|
+
subVM.dataList =
|
|
859
|
+
yield BgProduct.getProductOpts(vm.data
|
|
860
|
+
.relative_data);
|
|
861
|
+
subVM.loading = true;
|
|
862
|
+
gvc.notifyDataChange(subVM.id);
|
|
863
|
+
}),
|
|
864
|
+
});
|
|
865
|
+
}), { textStyle: 'font-weight: 400;' })}
|
|
864
866
|
</div>
|
|
865
867
|
${subVM.dataList
|
|
866
|
-
|
|
867
|
-
|
|
868
|
+
.map((opt, index) => {
|
|
869
|
+
return html ` <div
|
|
868
870
|
class="d-flex align-items-center form-check-label c_updown_label gap-3"
|
|
869
871
|
>
|
|
870
872
|
<span
|
|
@@ -873,419 +875,422 @@ export class BgRecommend {
|
|
|
873
875
|
>${index + 1} .</span
|
|
874
876
|
>
|
|
875
877
|
${BgWidget.validImageBox({
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
878
|
+
gvc: gvc,
|
|
879
|
+
image: opt.image,
|
|
880
|
+
width: 40,
|
|
881
|
+
})}
|
|
880
882
|
<div
|
|
881
883
|
class="tx_normal ${opt.note
|
|
882
|
-
|
|
883
|
-
|
|
884
|
+
? 'mb-1'
|
|
885
|
+
: ''}"
|
|
884
886
|
>
|
|
885
887
|
${opt.value}
|
|
886
888
|
</div>
|
|
887
889
|
${opt.note
|
|
888
|
-
|
|
890
|
+
? html `
|
|
889
891
|
<div class="tx_gray_12">
|
|
890
892
|
${opt.note}
|
|
891
893
|
</div>
|
|
892
894
|
`
|
|
893
|
-
|
|
895
|
+
: ''}
|
|
894
896
|
</div>`;
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
897
|
+
})
|
|
898
|
+
.join('') ||
|
|
899
|
+
html `<div
|
|
898
900
|
class="w-100 d-flex align-content-center justify-content-center"
|
|
899
901
|
>
|
|
900
902
|
尚未加入任何賣場商品
|
|
901
903
|
</div>`}
|
|
902
904
|
</div>
|
|
903
905
|
`;
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
906
|
+
},
|
|
907
|
+
onCreate: () => {
|
|
908
|
+
if (subVM.loading) {
|
|
909
|
+
if (vm.data.relative_data.length === 0) {
|
|
910
|
+
setTimeout(() => {
|
|
911
|
+
subVM.dataList = [];
|
|
912
|
+
subVM.loading = false;
|
|
913
|
+
gvc.notifyDataChange(subVM.id);
|
|
914
|
+
}, 300);
|
|
915
|
+
}
|
|
916
|
+
else {
|
|
917
|
+
new Promise((resolve) => {
|
|
918
|
+
resolve(BgProduct.getProductOpts(vm.data.relative_data));
|
|
919
|
+
}).then((data) => {
|
|
920
|
+
subVM.dataList = data;
|
|
921
|
+
subVM.loading = false;
|
|
922
|
+
gvc.notifyDataChange(subVM.id);
|
|
923
|
+
});
|
|
924
|
+
}
|
|
922
925
|
}
|
|
923
|
-
}
|
|
924
|
-
}
|
|
925
|
-
};
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
}
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
}
|
|
934
|
-
}
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
}, { single: true })}
|
|
926
|
+
},
|
|
927
|
+
};
|
|
928
|
+
});
|
|
929
|
+
case 'all':
|
|
930
|
+
default:
|
|
931
|
+
return '';
|
|
932
|
+
}
|
|
933
|
+
})(),
|
|
934
|
+
].join('');
|
|
935
|
+
},
|
|
936
|
+
};
|
|
937
|
+
})()),
|
|
938
|
+
].join('')} `,
|
|
939
|
+
},
|
|
940
|
+
], [(_a = vm.data.voucher_status) !== null && _a !== void 0 ? _a : ''], (data) => {
|
|
941
|
+
vm.data.voucher_status = data[0];
|
|
942
|
+
}, { single: true })}
|
|
941
943
|
${(() => {
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
944
|
+
const voucherData = vm.voucherList.find((item) => item.id === vm.data.voucher);
|
|
945
|
+
if (!voucherData) {
|
|
946
|
+
return '';
|
|
947
|
+
}
|
|
948
|
+
const vou = voucherData.content;
|
|
949
|
+
return [
|
|
950
|
+
BgWidget.horizontalLine(),
|
|
951
|
+
html `<div class="tx_700">優惠概覽</div>`,
|
|
952
|
+
BgWidget.summaryHTML([
|
|
953
|
+
[
|
|
954
|
+
`優惠活動名稱: ${vou.title}`,
|
|
955
|
+
`適用顧客範圍: ${(() => {
|
|
956
|
+
switch (vou.target) {
|
|
957
|
+
case 'customer':
|
|
958
|
+
return '特定顧客';
|
|
959
|
+
case 'levels':
|
|
960
|
+
return '會員等級';
|
|
961
|
+
case 'group':
|
|
962
|
+
return '顧客分群';
|
|
963
|
+
case 'all':
|
|
964
|
+
default:
|
|
965
|
+
return '所有顧客';
|
|
966
|
+
}
|
|
967
|
+
})()}`,
|
|
968
|
+
`將此優惠套用至: ${(() => {
|
|
969
|
+
switch (vou.for) {
|
|
970
|
+
case 'collection':
|
|
971
|
+
return `指定 ${vou.forKey.length} 種商品分類`;
|
|
972
|
+
case 'product':
|
|
973
|
+
return `指定 ${vou.forKey.length} 個商品`;
|
|
974
|
+
case 'all':
|
|
975
|
+
default:
|
|
976
|
+
return '所有商品';
|
|
977
|
+
}
|
|
978
|
+
})()}`,
|
|
979
|
+
`消費條件: ${(() => {
|
|
980
|
+
if (vou.rule === 'min_price')
|
|
981
|
+
return `最少消費金額 ${vou.ruleValue} 元`;
|
|
982
|
+
if (vou.rule === 'min_count')
|
|
983
|
+
return `最少購買數量 ${vou.ruleValue} 個`;
|
|
984
|
+
return '';
|
|
985
|
+
})()}`,
|
|
986
|
+
`折扣優惠: ${(() => {
|
|
987
|
+
switch (vou.reBackType) {
|
|
988
|
+
case 'rebate':
|
|
989
|
+
return vou.method === 'fixed' ? `${vou.value} 點購物金` : `訂單總額的 ${vou.value} %作為購物金`;
|
|
990
|
+
case 'discount':
|
|
991
|
+
return vou.method === 'fixed' ? `折扣 ${vou.value} 元` : `訂單總額折扣 ${vou.value} %`;
|
|
992
|
+
case 'shipment_free':
|
|
993
|
+
return '免運費';
|
|
994
|
+
default:
|
|
995
|
+
return '';
|
|
996
|
+
}
|
|
997
|
+
})()}`,
|
|
998
|
+
],
|
|
999
|
+
]),
|
|
1000
|
+
].join(BgWidget.mbContainer(18));
|
|
1001
|
+
})()}`;
|
|
1002
|
+
},
|
|
1003
|
+
});
|
|
1004
|
+
})()),
|
|
1005
|
+
BgWidget.mainCard([
|
|
1006
|
+
html ` <div class="tx_700">推薦人帳號</div>
|
|
1005
1007
|
${BgWidget.mbContainer(8)}
|
|
1006
1008
|
${BgWidget.multiCheckboxContainer(gvc, [
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1009
|
+
{
|
|
1010
|
+
key: 'old',
|
|
1011
|
+
name: '現有推薦人',
|
|
1012
|
+
innerHtml: (() => {
|
|
1013
|
+
const id = glitter.getUUID();
|
|
1014
|
+
return gvc.bindView({
|
|
1015
|
+
bind: id,
|
|
1016
|
+
view: () => {
|
|
1017
|
+
var _a;
|
|
1018
|
+
const user = vm.users.find((user) => user.id === vm.data.recommend_user.id);
|
|
1019
|
+
return html `<div>
|
|
1018
1020
|
${BgWidget.select({
|
|
1021
|
+
gvc: gvc,
|
|
1022
|
+
callback: (text) => {
|
|
1023
|
+
vm.data.recommend_user.id = parseInt(text, 10);
|
|
1024
|
+
gvc.notifyDataChange(id);
|
|
1025
|
+
gvc.notifyDataChange(vm.noteId);
|
|
1026
|
+
},
|
|
1027
|
+
default: `${(_a = vm.data.recommend_user.id) !== null && _a !== void 0 ? _a : 0}`,
|
|
1028
|
+
options: [{ key: '', value: '(請選擇推薦人)' }].concat(vm.users.map((item) => {
|
|
1029
|
+
return { key: `${item.id}`, value: `${item.content.name}(${item.email})` };
|
|
1030
|
+
})),
|
|
1031
|
+
readonly: vm.readonly,
|
|
1032
|
+
})}
|
|
1033
|
+
${user && vm.data.recommend_user.id !== 0
|
|
1034
|
+
? [
|
|
1035
|
+
'',
|
|
1036
|
+
html `<div class="tx_normal">名字</div>`,
|
|
1037
|
+
EditorElem.editeInput({
|
|
1038
|
+
gvc: gvc,
|
|
1039
|
+
title: '',
|
|
1040
|
+
default: user.content.name,
|
|
1041
|
+
placeHolder: '請輸入名字',
|
|
1042
|
+
callback: () => { },
|
|
1043
|
+
readonly: true,
|
|
1044
|
+
}),
|
|
1045
|
+
html ` <div class="tx_normal">電子信箱</div>
|
|
1046
|
+
${BgWidget.grayNote('將作為登入帳號,系統會寄送隨機密碼至此信箱')}`,
|
|
1047
|
+
EditorElem.editeInput({
|
|
1048
|
+
gvc: gvc,
|
|
1049
|
+
title: '',
|
|
1050
|
+
default: user.email,
|
|
1051
|
+
placeHolder: '',
|
|
1052
|
+
callback: () => { },
|
|
1053
|
+
readonly: true,
|
|
1054
|
+
}),
|
|
1055
|
+
html `<div class="tx_normal">電話</div>`,
|
|
1056
|
+
EditorElem.editeInput({
|
|
1057
|
+
gvc: gvc,
|
|
1058
|
+
title: '',
|
|
1059
|
+
default: user.content.phone,
|
|
1060
|
+
placeHolder: '',
|
|
1061
|
+
callback: () => { },
|
|
1062
|
+
readonly: true,
|
|
1063
|
+
}),
|
|
1064
|
+
].join(BgWidget.mbContainer(8))
|
|
1065
|
+
: ''}
|
|
1066
|
+
</div>`;
|
|
1067
|
+
},
|
|
1068
|
+
});
|
|
1069
|
+
})(),
|
|
1070
|
+
},
|
|
1071
|
+
{
|
|
1072
|
+
key: 'new',
|
|
1073
|
+
name: '添加新推薦人',
|
|
1074
|
+
innerHtml: (() => {
|
|
1075
|
+
var _a, _b;
|
|
1076
|
+
const user = vm.users.find((user) => user.id === vm.data.recommend_user.id);
|
|
1077
|
+
return html `<div>
|
|
1078
|
+
${[
|
|
1079
|
+
html `<div class="tx_normal">名字</div>`,
|
|
1080
|
+
EditorElem.editeInput({
|
|
1019
1081
|
gvc: gvc,
|
|
1082
|
+
title: '',
|
|
1083
|
+
default: user ? user.content.name : (_a = vm.data.recommend_user.name) !== null && _a !== void 0 ? _a : '',
|
|
1084
|
+
placeHolder: '請輸入名字',
|
|
1020
1085
|
callback: (text) => {
|
|
1021
|
-
vm.data.recommend_user.
|
|
1022
|
-
gvc.notifyDataChange(id);
|
|
1086
|
+
vm.data.recommend_user.name = text;
|
|
1023
1087
|
gvc.notifyDataChange(vm.noteId);
|
|
1024
1088
|
},
|
|
1025
|
-
default: `${(_a = vm.data.recommend_user.id) !== null && _a !== void 0 ? _a : 0}`,
|
|
1026
|
-
options: [{ key: '', value: '(請選擇推薦人)' }].concat(vm.users.map((item) => {
|
|
1027
|
-
return { key: `${item.id}`, value: `${item.content.name}(${item.email})` };
|
|
1028
|
-
})),
|
|
1029
1089
|
readonly: vm.readonly,
|
|
1030
|
-
})
|
|
1031
|
-
|
|
1032
|
-
? [
|
|
1033
|
-
'',
|
|
1034
|
-
html `<div class="tx_normal">名字</div>`,
|
|
1035
|
-
EditorElem.editeInput({
|
|
1036
|
-
gvc: gvc,
|
|
1037
|
-
title: '',
|
|
1038
|
-
default: user.content.name,
|
|
1039
|
-
placeHolder: '請輸入名字',
|
|
1040
|
-
callback: () => { },
|
|
1041
|
-
readonly: true,
|
|
1042
|
-
}),
|
|
1043
|
-
html ` <div class="tx_normal">電子信箱</div>
|
|
1044
|
-
${BgWidget.grayNote('將作為登入帳號,系統會寄送隨機密碼至此信箱')}`,
|
|
1045
|
-
EditorElem.editeInput({
|
|
1046
|
-
gvc: gvc,
|
|
1047
|
-
title: '',
|
|
1048
|
-
default: user.email,
|
|
1049
|
-
placeHolder: '',
|
|
1050
|
-
callback: () => { },
|
|
1051
|
-
readonly: true,
|
|
1052
|
-
}),
|
|
1053
|
-
html `<div class="tx_normal">電話</div>`,
|
|
1054
|
-
EditorElem.editeInput({
|
|
1055
|
-
gvc: gvc,
|
|
1056
|
-
title: '',
|
|
1057
|
-
default: user.content.phone,
|
|
1058
|
-
placeHolder: '',
|
|
1059
|
-
callback: () => { },
|
|
1060
|
-
readonly: true,
|
|
1061
|
-
}),
|
|
1062
|
-
].join(BgWidget.mbContainer(8))
|
|
1063
|
-
: ''}
|
|
1064
|
-
</div>`;
|
|
1065
|
-
},
|
|
1066
|
-
});
|
|
1067
|
-
})(),
|
|
1068
|
-
},
|
|
1069
|
-
{
|
|
1070
|
-
key: 'new',
|
|
1071
|
-
name: '添加新推薦人',
|
|
1072
|
-
innerHtml: (() => {
|
|
1073
|
-
var _a, _b;
|
|
1074
|
-
const user = vm.users.find((user) => user.id === vm.data.recommend_user.id);
|
|
1075
|
-
return html `<div>
|
|
1076
|
-
${[
|
|
1077
|
-
html `<div class="tx_normal">名字</div>`,
|
|
1078
|
-
EditorElem.editeInput({
|
|
1079
|
-
gvc: gvc,
|
|
1080
|
-
title: '',
|
|
1081
|
-
default: user ? user.content.name : (_a = vm.data.recommend_user.name) !== null && _a !== void 0 ? _a : '',
|
|
1082
|
-
placeHolder: '請輸入名字',
|
|
1083
|
-
callback: (text) => {
|
|
1084
|
-
vm.data.recommend_user.name = text;
|
|
1085
|
-
gvc.notifyDataChange(vm.noteId);
|
|
1086
|
-
},
|
|
1087
|
-
readonly: vm.readonly,
|
|
1088
|
-
}),
|
|
1089
|
-
html ` <div class="tx_normal">電子信箱</div>
|
|
1090
|
+
}),
|
|
1091
|
+
html ` <div class="tx_normal">電子信箱</div>
|
|
1090
1092
|
${BgWidget.grayNote('將作為登入帳號,系統會寄送隨機密碼至此信箱')}`,
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1093
|
+
gvc.bindView((() => {
|
|
1094
|
+
const id = glitter.getUUID();
|
|
1095
|
+
return {
|
|
1096
|
+
bind: id,
|
|
1097
|
+
view: () => {
|
|
1098
|
+
var _a;
|
|
1099
|
+
return EditorElem.editeInput({
|
|
1100
|
+
gvc: gvc,
|
|
1101
|
+
title: '',
|
|
1102
|
+
default: user ? user.content.email : (_a = vm.data.recommend_user.email) !== null && _a !== void 0 ? _a : '',
|
|
1103
|
+
placeHolder: '請輸入電子信箱',
|
|
1104
|
+
callback: (text) => {
|
|
1105
|
+
if (vm.users.find((user) => user.email === text)) {
|
|
1106
|
+
dialog.infoMessage({ text: '此推薦人信箱已建立<br />請更換其他信箱' });
|
|
1107
|
+
gvc.notifyDataChange(id);
|
|
1108
|
+
}
|
|
1109
|
+
else {
|
|
1110
|
+
vm.data.recommend_user.email = text;
|
|
1111
|
+
}
|
|
1112
|
+
},
|
|
1113
|
+
readonly: vm.readonly,
|
|
1114
|
+
});
|
|
1115
|
+
},
|
|
1116
|
+
};
|
|
1117
|
+
})()),
|
|
1118
|
+
html `<div class="tx_normal">電話</div>`,
|
|
1119
|
+
EditorElem.editeInput({
|
|
1120
|
+
gvc: gvc,
|
|
1121
|
+
title: '',
|
|
1122
|
+
default: user ? user.content.phone : (_b = vm.data.recommend_user.phone) !== null && _b !== void 0 ? _b : '',
|
|
1123
|
+
placeHolder: '請輸入電話',
|
|
1124
|
+
callback: (text) => {
|
|
1125
|
+
vm.data.recommend_user.phone = text;
|
|
1113
1126
|
},
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
EditorElem.editeInput({
|
|
1118
|
-
gvc: gvc,
|
|
1119
|
-
title: '',
|
|
1120
|
-
default: user ? user.content.phone : (_b = vm.data.recommend_user.phone) !== null && _b !== void 0 ? _b : '',
|
|
1121
|
-
placeHolder: '請輸入電話',
|
|
1122
|
-
callback: (text) => {
|
|
1123
|
-
vm.data.recommend_user.phone = text;
|
|
1124
|
-
},
|
|
1125
|
-
readonly: vm.readonly,
|
|
1126
|
-
}),
|
|
1127
|
-
].join(BgWidget.mbContainer(8))}
|
|
1127
|
+
readonly: vm.readonly,
|
|
1128
|
+
}),
|
|
1129
|
+
].join(BgWidget.mbContainer(8))}
|
|
1128
1130
|
</div>`;
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1131
|
+
})(),
|
|
1132
|
+
},
|
|
1133
|
+
], [(_h = vm.data.recommend_status) !== null && _h !== void 0 ? _h : ''], (data) => {
|
|
1134
|
+
vm.data.recommend_status = data[0];
|
|
1135
|
+
if (!vm.readonly && vm.data.recommend_status === 'new') {
|
|
1136
|
+
vm.data.recommend_user = {
|
|
1137
|
+
id: 0,
|
|
1138
|
+
name: '',
|
|
1139
|
+
email: '',
|
|
1140
|
+
phone: '',
|
|
1141
|
+
};
|
|
1142
|
+
}
|
|
1143
|
+
}, { single: true, readonly: vm.readonly })}`,
|
|
1144
|
+
html ` <div class="tx_700">推薦媒介(可複選)</div>
|
|
1143
1145
|
${BgWidget.mbContainer(8)}
|
|
1144
1146
|
${BgWidget.selectDropList({
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1147
|
+
gvc: gvc,
|
|
1148
|
+
callback: (value) => {
|
|
1149
|
+
vm.data.recommend_medium = value;
|
|
1150
|
+
},
|
|
1151
|
+
default: (_j = vm.data.recommend_medium) !== null && _j !== void 0 ? _j : [],
|
|
1152
|
+
options: mediumList,
|
|
1153
|
+
style: 'width: 100%;',
|
|
1154
|
+
})}`,
|
|
1155
|
+
].join(BgWidget.mbContainer(18))),
|
|
1156
|
+
BgWidget.mainCard([
|
|
1157
|
+
html ` <div class="tx_700">活動時間</div>`,
|
|
1158
|
+
html `<div class="tx_normal">開始時間</div>`,
|
|
1159
|
+
html ` <div class="d-flex mb-3 ${document.body.clientWidth < 768 ? 'flex-column' : ''}" style="gap: 12px">
|
|
1158
1160
|
${EditorElem.editeInput({
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1161
|
+
gvc: gvc,
|
|
1162
|
+
title: '',
|
|
1163
|
+
type: 'date',
|
|
1164
|
+
style: inputStyle,
|
|
1165
|
+
default: (_k = vm.data.startDate) !== null && _k !== void 0 ? _k : getDateTime().date,
|
|
1166
|
+
placeHolder: '',
|
|
1167
|
+
callback: (text) => {
|
|
1168
|
+
vm.data.startDate = text;
|
|
1169
|
+
},
|
|
1170
|
+
})}
|
|
1169
1171
|
${EditorElem.editeInput({
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1172
|
+
gvc: gvc,
|
|
1173
|
+
title: '',
|
|
1174
|
+
type: 'time',
|
|
1175
|
+
style: inputStyle,
|
|
1176
|
+
default: (_l = vm.data.startTime) !== null && _l !== void 0 ? _l : getDateTime().time,
|
|
1177
|
+
placeHolder: '',
|
|
1178
|
+
callback: (text) => {
|
|
1179
|
+
vm.data.startTime = text;
|
|
1180
|
+
},
|
|
1181
|
+
})}
|
|
1180
1182
|
</div>`,
|
|
1181
|
-
|
|
1182
|
-
|
|
1183
|
-
|
|
1184
|
-
|
|
1185
|
-
|
|
1183
|
+
BgWidget.multiCheckboxContainer(gvc, [
|
|
1184
|
+
{
|
|
1185
|
+
key: 'withEnd',
|
|
1186
|
+
name: '設定結束時間',
|
|
1187
|
+
innerHtml: html `<div class="d-flex mt-3 ${document.body.clientWidth < 768 ? 'flex-column' : ''}" style="gap: 12px">
|
|
1186
1188
|
${EditorElem.editeInput({
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1189
|
+
gvc: gvc,
|
|
1190
|
+
title: '',
|
|
1191
|
+
type: 'date',
|
|
1192
|
+
style: inputStyle,
|
|
1193
|
+
default: (_m = vm.data.endDate) !== null && _m !== void 0 ? _m : getDateTime(7).date,
|
|
1194
|
+
placeHolder: '',
|
|
1195
|
+
callback: (text) => {
|
|
1196
|
+
vm.data.endDate = text;
|
|
1197
|
+
},
|
|
1198
|
+
})}
|
|
1197
1199
|
${EditorElem.editeInput({
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1200
|
+
gvc: gvc,
|
|
1201
|
+
title: '',
|
|
1202
|
+
type: 'time',
|
|
1203
|
+
style: inputStyle,
|
|
1204
|
+
default: (_o = vm.data.endTime) !== null && _o !== void 0 ? _o : getDateTime(7).time,
|
|
1205
|
+
placeHolder: '',
|
|
1206
|
+
callback: (text) => {
|
|
1207
|
+
vm.data.endTime = text;
|
|
1208
|
+
},
|
|
1209
|
+
})}
|
|
1208
1210
|
</div>`,
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
? vm.data.recommend_user
|
|
1271
|
-
:
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
|
|
1275
|
-
|
|
1276
|
-
|
|
1277
|
-
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
1286
|
-
|
|
1287
|
-
|
|
1288
|
-
|
|
1211
|
+
},
|
|
1212
|
+
], [vm.data.endDate ? 'withEnd' : ''], (data) => {
|
|
1213
|
+
var _a, _b;
|
|
1214
|
+
if (data[0] === 'withEnd') {
|
|
1215
|
+
vm.data.endDate = (_a = vm.data.endDate) !== null && _a !== void 0 ? _a : getDateTime(7).date;
|
|
1216
|
+
vm.data.endTime = (_b = vm.data.endTime) !== null && _b !== void 0 ? _b : getDateTime(7).time;
|
|
1217
|
+
}
|
|
1218
|
+
else {
|
|
1219
|
+
vm.data.endDate = undefined;
|
|
1220
|
+
vm.data.endTime = undefined;
|
|
1221
|
+
}
|
|
1222
|
+
}, { single: false }),
|
|
1223
|
+
].join(BgWidget.mbContainer(18))),
|
|
1224
|
+
];
|
|
1225
|
+
return map.join(BgWidget.mbContainer(24));
|
|
1226
|
+
},
|
|
1227
|
+
divCreate: { class: 'p-0' },
|
|
1228
|
+
};
|
|
1229
|
+
}),
|
|
1230
|
+
ratio: 65,
|
|
1231
|
+
}, {
|
|
1232
|
+
html: gvc.bindView(() => {
|
|
1233
|
+
return {
|
|
1234
|
+
bind: vm.noteId,
|
|
1235
|
+
dataList: [
|
|
1236
|
+
{ obj: vm.data, key: 'code' },
|
|
1237
|
+
{ obj: vm.data, key: 'title' },
|
|
1238
|
+
{ obj: vm.data, key: 'voucher_status' },
|
|
1239
|
+
{ obj: vm.data, key: 'voucher' },
|
|
1240
|
+
{ obj: vm.data, key: 'share_type' },
|
|
1241
|
+
{ obj: vm.data, key: 'share_value' },
|
|
1242
|
+
{ obj: vm.data, key: 'recommend_medium' },
|
|
1243
|
+
{ obj: vm.data, key: 'startDate' },
|
|
1244
|
+
],
|
|
1245
|
+
view: () => {
|
|
1246
|
+
return BgWidget.mainCard(BgWidget.summaryHTML([
|
|
1247
|
+
[
|
|
1248
|
+
`分銷代碼: ${vm.data.code.length > 0 ? vm.data.code : '尚未輸入分銷代碼'}`,
|
|
1249
|
+
`分銷連結名稱: ${vm.data.title.length > 0 ? vm.data.title : '尚未輸入分銷連結名稱'}`,
|
|
1250
|
+
],
|
|
1251
|
+
[
|
|
1252
|
+
vm.data.voucher_status === 'yes'
|
|
1253
|
+
? `套用折扣: ${(() => {
|
|
1254
|
+
const voucher = vm.voucherList.find((v) => v.id === vm.data.voucher);
|
|
1255
|
+
return voucher && voucher.content && voucher.content.title ? voucher.content.title : '尚未選擇優惠券';
|
|
1256
|
+
})()}`
|
|
1257
|
+
: '不套用折扣',
|
|
1258
|
+
],
|
|
1259
|
+
[
|
|
1260
|
+
(() => {
|
|
1261
|
+
switch (vm.data.share_type) {
|
|
1262
|
+
case 'fix':
|
|
1263
|
+
return `分潤按固定金額 ${vm.data.share_value} 元`;
|
|
1264
|
+
case 'percent':
|
|
1265
|
+
return `分潤按百分比 ${vm.data.share_value} %`;
|
|
1266
|
+
case 'none':
|
|
1267
|
+
default:
|
|
1268
|
+
return '沒有分潤';
|
|
1269
|
+
}
|
|
1270
|
+
})(),
|
|
1271
|
+
`推薦人: ${vm.data.recommend_user.id
|
|
1272
|
+
? getRecommender(vm.users, vm.data.recommend_user)
|
|
1273
|
+
: vm.data.recommend_user.name.length > 0
|
|
1274
|
+
? vm.data.recommend_user.name
|
|
1275
|
+
: '尚未選擇推薦人'}`,
|
|
1276
|
+
`推薦媒介: ${vm.data.recommend_medium.length > 0
|
|
1277
|
+
? mediumList
|
|
1278
|
+
.filter((item) => {
|
|
1279
|
+
return vm.data.recommend_medium.includes(item.key);
|
|
1280
|
+
})
|
|
1281
|
+
.map((item) => {
|
|
1282
|
+
return item.value;
|
|
1283
|
+
})
|
|
1284
|
+
: ' 尚未選擇推薦媒介'}`,
|
|
1285
|
+
`啟用時間: ${vm.data.startDate}`,
|
|
1286
|
+
],
|
|
1287
|
+
]));
|
|
1288
|
+
},
|
|
1289
|
+
divCreate: { class: 'summary-card p-0' },
|
|
1290
|
+
};
|
|
1291
|
+
}),
|
|
1292
|
+
ratio: 35,
|
|
1293
|
+
}),
|
|
1289
1294
|
BgWidget.mbContainer(240),
|
|
1290
1295
|
html ` <div class="update-bar-container">
|
|
1291
1296
|
${cf.data.id
|
|
@@ -1374,7 +1379,7 @@ export class BgRecommend {
|
|
|
1374
1379
|
}
|
|
1375
1380
|
}))}
|
|
1376
1381
|
</div>`,
|
|
1377
|
-
].join('<div class="my-2"></div>')
|
|
1382
|
+
].join('<div class="my-2"></div>'));
|
|
1378
1383
|
},
|
|
1379
1384
|
onCreate: () => {
|
|
1380
1385
|
if (vm.loading) {
|
|
@@ -1456,16 +1461,15 @@ export class BgRecommend {
|
|
|
1456
1461
|
}
|
|
1457
1462
|
if (vm.type === 'user') {
|
|
1458
1463
|
return BgWidget.container([
|
|
1459
|
-
html ` <div class="
|
|
1460
|
-
<div class="
|
|
1461
|
-
|
|
1462
|
-
${BgWidget.goBack(gvc.event(() => {
|
|
1464
|
+
html ` <div class="title-container">
|
|
1465
|
+
<div class="mt-1">
|
|
1466
|
+
${BgWidget.goBack(gvc.event(() => {
|
|
1463
1467
|
cf.callback();
|
|
1464
1468
|
}))}
|
|
1465
|
-
</div>
|
|
1466
|
-
${BgWidget.title(vm.data.name || '新增推薦人')}
|
|
1467
1469
|
</div>
|
|
1468
|
-
<div
|
|
1470
|
+
<div>
|
|
1471
|
+
${BgWidget.title(vm.data.name || '新增推薦人')}${cf.data.id ? BgWidget.grayNote(`建立時間: ${Tool.convertDateTimeFormat(cf.data.created_time)}`) : ''}
|
|
1472
|
+
</div>
|
|
1469
1473
|
</div>
|
|
1470
1474
|
<div class="flex-fill"></div>`,
|
|
1471
1475
|
html `<div class="d-flex justify-content-center ${document.body.clientWidth < 768 ? 'flex-column' : ''}" style="gap: 24px">
|
|
@@ -1552,7 +1556,7 @@ export class BgRecommend {
|
|
|
1552
1556
|
},
|
|
1553
1557
|
divCreate: { class: 'p-0' },
|
|
1554
1558
|
};
|
|
1555
|
-
})
|
|
1559
|
+
}))}
|
|
1556
1560
|
</div>`,
|
|
1557
1561
|
BgWidget.mbContainer(240),
|
|
1558
1562
|
html ` <div class="update-bar-container">
|
|
@@ -1622,7 +1626,7 @@ export class BgRecommend {
|
|
|
1622
1626
|
}
|
|
1623
1627
|
}))}
|
|
1624
1628
|
</div>`,
|
|
1625
|
-
].join('<div class="my-2"></div>')
|
|
1629
|
+
].join('<div class="my-2"></div>'));
|
|
1626
1630
|
}
|
|
1627
1631
|
if (vm.type === 'link') {
|
|
1628
1632
|
return this.editorLink({
|