ts-glitter 22.0.1 → 22.0.2
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 +2 -2
- package/lowcode/backend-manager/bg-blog.js +19 -5
- package/lowcode/backend-manager/bg-blog.ts +20 -5
- package/lowcode/backend-manager/bg-line.js +2 -2
- package/lowcode/backend-manager/bg-line.ts +2 -2
- package/lowcode/backend-manager/bg-notify.js +10 -3
- package/lowcode/backend-manager/bg-notify.ts +10 -3
- package/lowcode/backend-manager/bg-sns.js +3 -3
- package/lowcode/backend-manager/bg-sns.ts +3 -3
- package/lowcode/backend-manager/bg-widget.js +77 -75
- package/lowcode/backend-manager/bg-widget.ts +121 -97
- package/lowcode/cms-plugin/auto-fcm-advertise.js +2 -2
- package/lowcode/cms-plugin/auto-fcm-advertise.ts +2 -2
- package/lowcode/cms-plugin/auto-fcm-history.js +2 -2
- package/lowcode/cms-plugin/auto-fcm-history.ts +2 -2
- package/lowcode/cms-plugin/menus-setting.js +2 -2
- package/lowcode/cms-plugin/menus-setting.ts +2 -4
- package/lowcode/cms-plugin/pos-pages/payment-page.js +11 -7
- package/lowcode/cms-plugin/pos-pages/payment-page.ts +17 -11
- package/lowcode/cms-plugin/shopping-discount-setting.js +1 -1
- package/lowcode/cms-plugin/shopping-discount-setting.ts +1 -1
- package/lowcode/cms-plugin/shopping-finance-setting.js +23 -10
- package/lowcode/cms-plugin/shopping-finance-setting.ts +282 -269
- package/lowcode/cms-plugin/shopping-order-manager.js +1 -1
- package/lowcode/cms-plugin/shopping-order-manager.ts +1 -1
- package/lowcode/cms-plugin/shopping-rebate.js +1 -1
- package/lowcode/cms-plugin/shopping-rebate.ts +1 -1
- package/lowcode/cms-plugin/shopping-setting-basic.js +36 -8
- package/lowcode/cms-plugin/shopping-setting-basic.ts +36 -8
- package/lowcode/glitter-base/route/shopping.js +16 -9
- package/lowcode/glitter-base/route/shopping.ts +16 -10
- package/lowcode/glitter-base/route/user.js +19 -9
- package/lowcode/glitter-base/route/user.ts +21 -10
- package/lowcode/glitterBundle/plugins/editor-elem.js +1 -5
- package/lowcode/glitterBundle/plugins/editor-elem.ts +1 -5
- package/package.json +1 -1
- package/src/api-public/services/checkout-event.js +17 -7
- package/src/api-public/services/checkout-event.js.map +1 -1
- package/src/api-public/services/line-message.js +122 -138
- package/src/api-public/services/line-message.js.map +1 -1
- package/src/api-public/services/line-message.ts +1134 -1130
- package/src/api-public/services/shopping.js +3 -5
- package/src/api-public/services/shopping.js.map +1 -1
- package/src/api-public/services/shopping.ts +4 -6
- package/src/api-public/services/strategies/ecpay-strategy.js +0 -1
- package/src/api-public/services/strategies/ecpay-strategy.js.map +1 -1
- package/src/api-public/services/strategies/ecpay-strategy.ts +3 -4
- package/src/api-public/services/strategies/ezpay-strategy.js +0 -1
- package/src/api-public/services/strategies/ezpay-strategy.js.map +1 -1
- package/src/api-public/services/strategies/ezpay-strategy.ts +4 -7
- package/src/modules/firebase.js +0 -4
- package/src/modules/firebase.js.map +1 -1
- package/src/modules/firebase.ts +5 -12
|
@@ -4125,6 +4125,7 @@ ${obj.default ?? ''}</textarea
|
|
|
4125
4125
|
if (vm.loading) {
|
|
4126
4126
|
return html` <div class="my-4">${this.spinner()}</div>`;
|
|
4127
4127
|
}
|
|
4128
|
+
|
|
4128
4129
|
return html` <div style="width: 100%; overflow-y: auto;" class="bg-white shadow rounded-3">
|
|
4129
4130
|
<div class="w-100 d-flex align-items-center p-3 border-bottom">
|
|
4130
4131
|
<div class="tx_700">${obj.title}</div>
|
|
@@ -4143,89 +4144,101 @@ ${obj.default ?? ''}</textarea
|
|
|
4143
4144
|
${obj.readonly
|
|
4144
4145
|
? ''
|
|
4145
4146
|
: html` <div
|
|
4146
|
-
|
|
4147
|
-
|
|
4148
|
-
|
|
4149
|
-
|
|
4150
|
-
|
|
4151
|
-
|
|
4152
|
-
|
|
4153
|
-
|
|
4154
|
-
|
|
4155
|
-
|
|
4156
|
-
|
|
4157
|
-
|
|
4158
|
-
|
|
4159
|
-
|
|
4160
|
-
|
|
4161
|
-
|
|
4162
|
-
|
|
4163
|
-
|
|
4164
|
-
|
|
4165
|
-
|
|
4166
|
-
|
|
4167
|
-
|
|
4168
|
-
|
|
4169
|
-
|
|
4170
|
-
|
|
4147
|
+
class="d-flex position-sticky px-1"
|
|
4148
|
+
style="gap: 12px; top: 0; background-color: #fff;"
|
|
4149
|
+
>
|
|
4150
|
+
${this.searchFilter(
|
|
4151
|
+
gvc.event(e => {
|
|
4152
|
+
vm.query = e.value;
|
|
4153
|
+
vm.loading = true;
|
|
4154
|
+
obj.gvc.notifyDataChange(vm.id);
|
|
4155
|
+
}),
|
|
4156
|
+
vm.query || '',
|
|
4157
|
+
'搜尋'
|
|
4158
|
+
)}
|
|
4159
|
+
${obj.updownOptions
|
|
4160
|
+
? this.updownFilter({
|
|
4161
|
+
gvc,
|
|
4162
|
+
callback: (value: any) => {
|
|
4163
|
+
vm.orderString = value;
|
|
4164
|
+
vm.loading = true;
|
|
4165
|
+
obj.gvc.notifyDataChange(vm.id);
|
|
4166
|
+
},
|
|
4167
|
+
default: vm.orderString || 'default',
|
|
4168
|
+
options: obj.updownOptions || [],
|
|
4169
|
+
})
|
|
4170
|
+
: ''}
|
|
4171
|
+
</div>
|
|
4172
|
+
${this.grayNote('系統提示:資料選項過多時,請善用搜尋功能')}`}
|
|
4171
4173
|
${obj.gvc.map(
|
|
4172
4174
|
vm.options.map((opt: OptionsItem, index: number) => {
|
|
4173
4175
|
if (obj.custom_line_items) {
|
|
4174
4176
|
return obj.custom_line_items(opt);
|
|
4175
4177
|
}
|
|
4176
4178
|
|
|
4179
|
+
const opt_id = `_opt_${opt.key}`;
|
|
4180
|
+
|
|
4177
4181
|
function call() {
|
|
4178
|
-
vm.selectKey = {
|
|
4179
|
-
|
|
4180
|
-
|
|
4181
|
-
|
|
4182
|
+
vm.selectKey = { name: opt.key, index: index };
|
|
4183
|
+
|
|
4184
|
+
if (obj.single) {
|
|
4185
|
+
const originKeys = obj.default.slice().map(key => `_opt_${key}`);
|
|
4186
|
+
obj.default = [opt.key];
|
|
4187
|
+
gvc.notifyDataChange([...originKeys, opt_id]);
|
|
4188
|
+
return;
|
|
4189
|
+
}
|
|
4190
|
+
|
|
4191
|
+
const filterSelected = obj.default.filter(key => {
|
|
4192
|
+
return !vm.options.some(opt => opt.key === key);
|
|
4193
|
+
});
|
|
4194
|
+
|
|
4182
4195
|
if (obj.default.includes(opt.key)) {
|
|
4183
4196
|
obj.default = obj.default.filter(item => item !== opt.key);
|
|
4184
4197
|
} else {
|
|
4185
4198
|
obj.default.push(opt.key);
|
|
4186
4199
|
}
|
|
4187
|
-
|
|
4200
|
+
|
|
4201
|
+
obj.default = [...new Set(filterSelected.concat(obj.default))];
|
|
4202
|
+
gvc.notifyDataChange(opt_id);
|
|
4188
4203
|
}
|
|
4189
4204
|
|
|
4190
|
-
return
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
|
|
4195
|
-
|
|
4196
|
-
|
|
4197
|
-
|
|
4198
|
-
|
|
4199
|
-
|
|
4200
|
-
|
|
4201
|
-
|
|
4202
|
-
|
|
4203
|
-
|
|
4204
|
-
|
|
4205
|
-
|
|
4206
|
-
|
|
4207
|
-
|
|
4208
|
-
|
|
4209
|
-
|
|
4210
|
-
|
|
4211
|
-
|
|
4212
|
-
gvc
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
</div>
|
|
4224
|
-
</div>`;
|
|
4205
|
+
return gvc.bindView({
|
|
4206
|
+
bind: opt_id,
|
|
4207
|
+
view: () => {
|
|
4208
|
+
return html`${obj.readonly
|
|
4209
|
+
? ''
|
|
4210
|
+
: html`<input
|
|
4211
|
+
class="form-check-input mt-0 ${vm.checkClass}"
|
|
4212
|
+
type="checkbox"
|
|
4213
|
+
id="${opt.key}"
|
|
4214
|
+
name="radio_${vm.id}"
|
|
4215
|
+
onclick="${gvc.event(() => call())}"
|
|
4216
|
+
${obj.default.find(k => k == opt.key) ? 'checked' : ''}
|
|
4217
|
+
/>`}
|
|
4218
|
+
${opt.image
|
|
4219
|
+
? BgWidget.validImageBox({
|
|
4220
|
+
gvc: gvc,
|
|
4221
|
+
image: opt.image,
|
|
4222
|
+
width: 40,
|
|
4223
|
+
})
|
|
4224
|
+
: ''}
|
|
4225
|
+
<div
|
|
4226
|
+
class="form-check-label c_updown_label ${obj.readonly ? '' : 'cursor_pointer'}"
|
|
4227
|
+
onclick="${gvc.event(() => call())}"
|
|
4228
|
+
>
|
|
4229
|
+
<div class="tx_normal ${opt.note ? 'mb-1' : ''}">${opt.value}</div>
|
|
4230
|
+
${opt.note ? html` <div class="tx_gray_12">${opt.note}</div> ` : ''}
|
|
4231
|
+
</div>`;
|
|
4232
|
+
},
|
|
4233
|
+
divCreate: {
|
|
4234
|
+
class: 'd-flex align-items-center',
|
|
4235
|
+
style: 'gap: 24px',
|
|
4236
|
+
},
|
|
4237
|
+
});
|
|
4225
4238
|
})
|
|
4226
4239
|
)}
|
|
4227
4240
|
</div>
|
|
4228
|
-
${obj.readonly
|
|
4241
|
+
${obj.readonly
|
|
4229
4242
|
? ''
|
|
4230
4243
|
: html` <div class="c_dialog_bar">
|
|
4231
4244
|
${BgWidget.cancel(
|
|
@@ -4243,12 +4256,7 @@ ${obj.default ?? ''}</textarea
|
|
|
4243
4256
|
)}
|
|
4244
4257
|
${BgWidget.save(
|
|
4245
4258
|
obj.gvc.event(() => {
|
|
4246
|
-
obj.callback(
|
|
4247
|
-
obj.default.filter(item => {
|
|
4248
|
-
return vm.options.find((opt: OptionsItem) => opt.key === item);
|
|
4249
|
-
}),
|
|
4250
|
-
1
|
|
4251
|
-
);
|
|
4259
|
+
obj.callback(obj.default, 1);
|
|
4252
4260
|
gvc.closeDialog();
|
|
4253
4261
|
}),
|
|
4254
4262
|
'確認'
|
|
@@ -4271,23 +4279,24 @@ ${obj.default ?? ''}</textarea
|
|
|
4271
4279
|
obj.gvc.notifyDataChange(vm.id);
|
|
4272
4280
|
});
|
|
4273
4281
|
} else {
|
|
4274
|
-
|
|
4275
|
-
|
|
4276
|
-
|
|
4277
|
-
|
|
4278
|
-
|
|
4279
|
-
|
|
4280
|
-
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4287
|
-
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
}
|
|
4282
|
+
// 選項勾選後,將選項跳至畫面中央
|
|
4283
|
+
// let n = 0;
|
|
4284
|
+
// const si = setInterval(() => {
|
|
4285
|
+
// const element = document.getElementById(vm.selectKey.name);
|
|
4286
|
+
// if (element) {
|
|
4287
|
+
// element.scrollIntoView();
|
|
4288
|
+
// const element2 = document.querySelector('.c_dialog_main');
|
|
4289
|
+
// if (element2 && vm.selectKey.index < vm.options.length - 5) {
|
|
4290
|
+
// element2.scrollTop -= element2.clientHeight / 2;
|
|
4291
|
+
// }
|
|
4292
|
+
// clearInterval(si);
|
|
4293
|
+
// } else {
|
|
4294
|
+
// n++;
|
|
4295
|
+
// if (n > 50) {
|
|
4296
|
+
// clearInterval(si);
|
|
4297
|
+
// }
|
|
4298
|
+
// }
|
|
4299
|
+
// }, 100);
|
|
4291
4300
|
}
|
|
4292
4301
|
},
|
|
4293
4302
|
})}
|
|
@@ -4509,8 +4518,7 @@ ${obj.default ?? ''}</textarea
|
|
|
4509
4518
|
if (vm.loading) {
|
|
4510
4519
|
ApiShop.getVariants({
|
|
4511
4520
|
page: 0,
|
|
4512
|
-
limit:
|
|
4513
|
-
// limit: 99999,
|
|
4521
|
+
limit: 9999,
|
|
4514
4522
|
search: vm.query || undefined,
|
|
4515
4523
|
searchType: 'title',
|
|
4516
4524
|
orderBy: vm.orderString || undefined,
|
|
@@ -5233,7 +5241,7 @@ ${obj.default ?? ''}</textarea
|
|
|
5233
5241
|
<div class="c_dialog_body h-100">
|
|
5234
5242
|
<div
|
|
5235
5243
|
class="c_dialog_main h-100"
|
|
5236
|
-
style="max-height: 100%; padding: 0; gap: 24px; z-index: 1; position: relative;"
|
|
5244
|
+
style="max-height: 100%; padding: 0; border: 0; gap: 24px; z-index: 1; position: relative;"
|
|
5237
5245
|
>
|
|
5238
5246
|
${obj.innerHTML(gvc) ?? ''}
|
|
5239
5247
|
</div>
|
|
@@ -5734,6 +5742,8 @@ ${obj.default ?? ''}</textarea
|
|
|
5734
5742
|
quick_insert?: { title: string; value: string }[];
|
|
5735
5743
|
}) {
|
|
5736
5744
|
const gvc = obj.gvc;
|
|
5745
|
+
const dialog = new ShareDialog(gvc.glitter);
|
|
5746
|
+
|
|
5737
5747
|
return gvc.bindView(
|
|
5738
5748
|
(() => {
|
|
5739
5749
|
const id = gvc.glitter.getUUID();
|
|
@@ -5828,15 +5838,29 @@ ${obj.default ?? ''}</textarea
|
|
|
5828
5838
|
return [
|
|
5829
5839
|
BgWidget.cancel(
|
|
5830
5840
|
gvc2.event(() => {
|
|
5831
|
-
|
|
5832
|
-
|
|
5841
|
+
dialog.checkYesOrNot({
|
|
5842
|
+
text: '確定要取消並關閉嗎?',
|
|
5843
|
+
callback: bool => {
|
|
5844
|
+
if (bool) {
|
|
5845
|
+
obj.content = originContent;
|
|
5846
|
+
gvc2.closeDialog();
|
|
5847
|
+
}
|
|
5848
|
+
},
|
|
5849
|
+
});
|
|
5833
5850
|
})
|
|
5834
5851
|
),
|
|
5835
5852
|
BgWidget.save(
|
|
5836
5853
|
gvc2.event(() => {
|
|
5837
|
-
|
|
5838
|
-
|
|
5839
|
-
|
|
5854
|
+
dialog.checkYesOrNot({
|
|
5855
|
+
text: '確定要儲存並更新嗎?',
|
|
5856
|
+
callback: bool => {
|
|
5857
|
+
if (bool) {
|
|
5858
|
+
gvc2.closeDialog();
|
|
5859
|
+
gvc.notifyDataChange(id);
|
|
5860
|
+
obj.callback(obj.content);
|
|
5861
|
+
}
|
|
5862
|
+
},
|
|
5863
|
+
});
|
|
5840
5864
|
})
|
|
5841
5865
|
),
|
|
5842
5866
|
].join('');
|
|
@@ -385,7 +385,7 @@ export class AutoFcmAdvertise {
|
|
|
385
385
|
return new Promise(resolve => {
|
|
386
386
|
ApiUser.getUserListOrders({
|
|
387
387
|
page: 0,
|
|
388
|
-
limit:
|
|
388
|
+
limit: 999,
|
|
389
389
|
id: postData.userList.map(user => { var _a; return (_a = user.id) !== null && _a !== void 0 ? _a : 0; }).join(','),
|
|
390
390
|
only_id: true,
|
|
391
391
|
}).then(dd => {
|
|
@@ -530,7 +530,7 @@ export class AutoFcmAdvertise {
|
|
|
530
530
|
return new Promise(resolve => {
|
|
531
531
|
ApiUser.getUserList({
|
|
532
532
|
page: 0,
|
|
533
|
-
limit:
|
|
533
|
+
limit: 999,
|
|
534
534
|
search: data.query,
|
|
535
535
|
only_id: true,
|
|
536
536
|
}).then(dd => {
|
|
@@ -413,7 +413,7 @@ export class AutoFcmAdvertise {
|
|
|
413
413
|
return new Promise(resolve => {
|
|
414
414
|
ApiUser.getUserListOrders({
|
|
415
415
|
page: 0,
|
|
416
|
-
limit:
|
|
416
|
+
limit: 999,
|
|
417
417
|
id: postData.userList.map(user => user.id ?? 0).join(','),
|
|
418
418
|
only_id: true,
|
|
419
419
|
}).then(dd => {
|
|
@@ -569,7 +569,7 @@ export class AutoFcmAdvertise {
|
|
|
569
569
|
return new Promise(resolve => {
|
|
570
570
|
ApiUser.getUserList({
|
|
571
571
|
page: 0,
|
|
572
|
-
limit:
|
|
572
|
+
limit: 999,
|
|
573
573
|
search: data.query,
|
|
574
574
|
only_id: true,
|
|
575
575
|
}).then(dd => {
|
|
@@ -1085,7 +1085,7 @@ export class BgNotify {
|
|
|
1085
1085
|
return new Promise(resolve => {
|
|
1086
1086
|
ApiUser.getUserListOrders({
|
|
1087
1087
|
page: 0,
|
|
1088
|
-
limit:
|
|
1088
|
+
limit: 999,
|
|
1089
1089
|
id: postData.userList.map(user => { var _a; return (_a = user.id) !== null && _a !== void 0 ? _a : 0; }).join(','),
|
|
1090
1090
|
only_id: true,
|
|
1091
1091
|
}).then(dd => {
|
|
@@ -1244,7 +1244,7 @@ export class BgNotify {
|
|
|
1244
1244
|
return new Promise(resolve => {
|
|
1245
1245
|
ApiUser.getUserList({
|
|
1246
1246
|
page: 0,
|
|
1247
|
-
limit:
|
|
1247
|
+
limit: 999,
|
|
1248
1248
|
search: data.query,
|
|
1249
1249
|
only_id: true,
|
|
1250
1250
|
}).then(dd => {
|
|
@@ -1202,7 +1202,7 @@ export class BgNotify {
|
|
|
1202
1202
|
return new Promise(resolve => {
|
|
1203
1203
|
ApiUser.getUserListOrders({
|
|
1204
1204
|
page: 0,
|
|
1205
|
-
limit:
|
|
1205
|
+
limit: 999,
|
|
1206
1206
|
id: postData.userList.map(user => user.id ?? 0).join(','),
|
|
1207
1207
|
only_id: true,
|
|
1208
1208
|
}).then(dd => {
|
|
@@ -1370,7 +1370,7 @@ export class BgNotify {
|
|
|
1370
1370
|
return new Promise(resolve => {
|
|
1371
1371
|
ApiUser.getUserList({
|
|
1372
1372
|
page: 0,
|
|
1373
|
-
limit:
|
|
1373
|
+
limit: 999,
|
|
1374
1374
|
search: data.query,
|
|
1375
1375
|
only_id: true,
|
|
1376
1376
|
}).then(dd => {
|
|
@@ -904,7 +904,7 @@ export class MenusSetting {
|
|
|
904
904
|
return __awaiter(this, void 0, void 0, function* () {
|
|
905
905
|
return yield ApiUser.getUserList({
|
|
906
906
|
page: 0,
|
|
907
|
-
limit:
|
|
907
|
+
limit: 99999,
|
|
908
908
|
only_id: true,
|
|
909
909
|
id: visible_data_array.join(','),
|
|
910
910
|
}).then(dd => {
|
|
@@ -921,7 +921,7 @@ export class MenusSetting {
|
|
|
921
921
|
return __awaiter(this, void 0, void 0, function* () {
|
|
922
922
|
return yield ApiUser.getUserList({
|
|
923
923
|
page: 0,
|
|
924
|
-
limit:
|
|
924
|
+
limit: 99999,
|
|
925
925
|
only_id: true,
|
|
926
926
|
}).then(dd => {
|
|
927
927
|
var _a;
|
|
@@ -1020,8 +1020,7 @@ export class MenusSetting {
|
|
|
1020
1020
|
static async getUserList(visible_data_array: string[]) {
|
|
1021
1021
|
return await ApiUser.getUserList({
|
|
1022
1022
|
page: 0,
|
|
1023
|
-
|
|
1024
|
-
limit: 15,
|
|
1023
|
+
limit: 99999,
|
|
1025
1024
|
only_id: true,
|
|
1026
1025
|
id: visible_data_array.join(','),
|
|
1027
1026
|
}).then(dd => {
|
|
@@ -1037,8 +1036,7 @@ export class MenusSetting {
|
|
|
1037
1036
|
static async getUserOption() {
|
|
1038
1037
|
return await ApiUser.getUserList({
|
|
1039
1038
|
page: 0,
|
|
1040
|
-
|
|
1041
|
-
limit: 15,
|
|
1039
|
+
limit: 99999,
|
|
1042
1040
|
only_id: true,
|
|
1043
1041
|
}).then(dd => {
|
|
1044
1042
|
try {
|
|
@@ -228,14 +228,18 @@ export class PaymentPage {
|
|
|
228
228
|
if (`${data.show_understocking}` === 'false') {
|
|
229
229
|
return '不追蹤庫存';
|
|
230
230
|
}
|
|
231
|
-
const stock = gvc.glitter.share.store_list
|
|
231
|
+
const stock = gvc.glitter.share.store_list
|
|
232
|
+
.filter((dd) => {
|
|
232
233
|
var _a;
|
|
233
|
-
return (dd.id === POSSetting.config.where_store
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
234
|
+
return (dd.id === POSSetting.config.where_store ||
|
|
235
|
+
((_a = gvc.glitter.share.store_list.find((dd) => {
|
|
236
|
+
return dd.id === POSSetting.config.where_store;
|
|
237
|
+
}).support_store) !== null && _a !== void 0 ? _a : []).includes(dd.id));
|
|
238
|
+
})
|
|
239
|
+
.map((d1) => {
|
|
237
240
|
return data.stockList[d1.id].count;
|
|
238
|
-
})
|
|
241
|
+
})
|
|
242
|
+
.reduce((acc, val) => acc + val, 0);
|
|
239
243
|
return `庫存: ${stock || 0}`;
|
|
240
244
|
})()}
|
|
241
245
|
</div>
|
|
@@ -515,7 +519,7 @@ export class PaymentPage {
|
|
|
515
519
|
return new Promise(resolve => {
|
|
516
520
|
ApiUser.getUserList({
|
|
517
521
|
page: 0,
|
|
518
|
-
limit:
|
|
522
|
+
limit: 999,
|
|
519
523
|
search: data.query,
|
|
520
524
|
only_id: true,
|
|
521
525
|
}).then(dd => {
|
|
@@ -265,16 +265,22 @@ export class PaymentPage {
|
|
|
265
265
|
if (`${data.show_understocking}` === 'false') {
|
|
266
266
|
return '不追蹤庫存';
|
|
267
267
|
}
|
|
268
|
-
const stock = gvc.glitter.share.store_list
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
268
|
+
const stock = gvc.glitter.share.store_list
|
|
269
|
+
.filter((dd: any) => {
|
|
270
|
+
return (
|
|
271
|
+
dd.id === POSSetting.config.where_store ||
|
|
272
|
+
(
|
|
273
|
+
gvc.glitter.share.store_list.find((dd: any) => {
|
|
274
|
+
return dd.id === POSSetting.config.where_store;
|
|
275
|
+
}).support_store ?? []
|
|
276
|
+
).includes(dd.id)
|
|
277
|
+
);
|
|
278
|
+
})
|
|
279
|
+
.map((d1: any) => {
|
|
280
|
+
return data.stockList[d1.id].count;
|
|
281
|
+
})
|
|
282
|
+
.reduce((acc: any, val: any) => acc + val, 0);
|
|
283
|
+
|
|
278
284
|
return `庫存: ${stock || 0}`;
|
|
279
285
|
})()}
|
|
280
286
|
</div>
|
|
@@ -576,7 +582,7 @@ export class PaymentPage {
|
|
|
576
582
|
return new Promise(resolve => {
|
|
577
583
|
ApiUser.getUserList({
|
|
578
584
|
page: 0,
|
|
579
|
-
limit:
|
|
585
|
+
limit: 999,
|
|
580
586
|
search: data.query,
|
|
581
587
|
only_id: true,
|
|
582
588
|
}).then(dd => {
|
|
@@ -236,7 +236,6 @@ export class ShoppingFinanceSetting {
|
|
|
236
236
|
class="w-100 position-relative main-card"
|
|
237
237
|
style=" background: white; overflow: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 10px; display: inline-flex;"
|
|
238
238
|
>
|
|
239
|
-
|
|
240
239
|
<div
|
|
241
240
|
class="pt-4"
|
|
242
241
|
style="align-self: stretch; justify-content: flex-start; align-items: center; gap: 28px; display: inline-flex"
|
|
@@ -602,7 +601,6 @@ export class ShoppingFinanceSetting {
|
|
|
602
601
|
})}
|
|
603
602
|
</div>
|
|
604
603
|
</div>
|
|
605
|
-
|
|
606
604
|
</div>`;
|
|
607
605
|
})
|
|
608
606
|
.join('')}
|
|
@@ -751,7 +749,8 @@ export class ShoppingFinanceSetting {
|
|
|
751
749
|
class="w-100 position-relative main-card"
|
|
752
750
|
style=" background: white; overflow: hidden; flex-direction: column; justify-content: flex-start; align-items: flex-start; gap: 10px; display: inline-flex;"
|
|
753
751
|
>
|
|
754
|
-
<div
|
|
752
|
+
<div
|
|
753
|
+
class="pt-4"
|
|
755
754
|
style="align-self: stretch; justify-content: flex-start; align-items: center; gap: 28px; display: inline-flex"
|
|
756
755
|
>
|
|
757
756
|
<div style="min-width: 46px;max-width: 46px;">
|
|
@@ -777,8 +776,8 @@ export class ShoppingFinanceSetting {
|
|
|
777
776
|
</div>
|
|
778
777
|
</div>
|
|
779
778
|
</div>
|
|
780
|
-
|
|
781
|
-
<div class="position-absolute"
|
|
779
|
+
|
|
780
|
+
<div class="position-absolute" style="right:10px;top:10px;">
|
|
782
781
|
${BgWidget.customButton({
|
|
783
782
|
button: {
|
|
784
783
|
color: 'gray',
|
|
@@ -2136,13 +2135,27 @@ export class ShoppingFinanceSetting {
|
|
|
2136
2135
|
footer_html: (gvc2) => {
|
|
2137
2136
|
return [
|
|
2138
2137
|
BgWidget.cancel(gvc2.event(() => {
|
|
2139
|
-
|
|
2140
|
-
|
|
2138
|
+
dialog.checkYesOrNot({
|
|
2139
|
+
text: '確定要取消並關閉嗎?',
|
|
2140
|
+
callback: bool => {
|
|
2141
|
+
if (bool) {
|
|
2142
|
+
language_data.info = originContent;
|
|
2143
|
+
gvc2.closeDialog();
|
|
2144
|
+
}
|
|
2145
|
+
},
|
|
2146
|
+
});
|
|
2141
2147
|
})),
|
|
2142
2148
|
BgWidget.save(gvc2.event(() => {
|
|
2143
|
-
|
|
2144
|
-
|
|
2145
|
-
|
|
2149
|
+
dialog.checkYesOrNot({
|
|
2150
|
+
text: '確定要儲存並更新嗎?',
|
|
2151
|
+
callback: bool => {
|
|
2152
|
+
if (bool) {
|
|
2153
|
+
gvc2.closeDialog();
|
|
2154
|
+
gvc.notifyDataChange(id);
|
|
2155
|
+
save();
|
|
2156
|
+
}
|
|
2157
|
+
},
|
|
2158
|
+
});
|
|
2146
2159
|
})),
|
|
2147
2160
|
].join('');
|
|
2148
2161
|
},
|