geer-builder 1.2.545 → 1.2.548
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/GBinaryWidget.vue +1 -1
- package/GCheckout.vue +26 -3
- package/GManageProduct.vue +8 -0
- package/GProductList.vue +16 -1
- package/GProductPage.vue +7 -0
- package/GRegistration.vue +19 -1
- package/GRequestProduct.vue +9 -1
- package/components/GProfile.vue +2 -2
- package/components/GSlotWallet/WalletLogsDialog.vue +9 -0
- package/components/ManageProduct/Dialogs/AddDiscount.vue +143 -0
- package/components/ManageProduct/Tabs/Information.vue +26 -2
- package/components/MyPurchases/tabs/CompletedTab.vue +6 -2
- package/components/MyPurchases/tabs/ProcessingTab.vue +2 -0
- package/components/MyPurchases/tabs/ToPayTab.vue +3 -1
- package/components/MyPurchases/tabs/ToPickedTab.vue +2 -1
- package/components/MyPurchases/tabs/ToReceiveTab.vue +8 -1
- package/components/MyPurchases/tabs/ToShipTab.vue +2 -0
- package/components/SalesInvoicePrintable.vue +7 -2
- package/package.json +1 -1
package/GBinaryWidget.vue
CHANGED
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
<pairing-history :slot_info="slot_info" :binary_type="binary_type" :binary_settings="binary_settings" @closePopup="is_open_pairing_history_dialog = false"></pairing-history>
|
|
72
72
|
</q-dialog>
|
|
73
73
|
<q-dialog full-width v-model="is_open_binary_history_dialog">
|
|
74
|
-
<binary-history :slot_info="slot_info" :flushout_hide="true" :binary_type="binary_type" @closePopup="is_open_binary_history_dialog = false"></binary-history>
|
|
74
|
+
<binary-history :is_company_succes="is_company_success" :slot_info="slot_info" :flushout_hide="true" :binary_type="binary_type" @closePopup="is_open_binary_history_dialog = false"></binary-history>
|
|
75
75
|
</q-dialog>
|
|
76
76
|
<q-dialog full-width v-model="is_open_point_history_dialog">
|
|
77
77
|
<point-history :slot_info="slot_info" :binary_type="binary_type" @closePopup="is_open_point_history_dialog = false"></point-history>
|
package/GCheckout.vue
CHANGED
|
@@ -437,7 +437,8 @@ export default {
|
|
|
437
437
|
dragon_pay_amount:[],
|
|
438
438
|
filtered_payment_channel:[],
|
|
439
439
|
gcash_fee:0,
|
|
440
|
-
show_gcash_fee:false
|
|
440
|
+
show_gcash_fee:false,
|
|
441
|
+
online_payment_only:false,
|
|
441
442
|
}),
|
|
442
443
|
async mounted()
|
|
443
444
|
{
|
|
@@ -504,7 +505,6 @@ export default {
|
|
|
504
505
|
}
|
|
505
506
|
else
|
|
506
507
|
{
|
|
507
|
-
console.log('check online pay');
|
|
508
508
|
this.check = await this.$_fbCall('memberCheckPendingCheckout', { sale_id: pending_checkout.sale_id, amount:pending_checkout.amount });
|
|
509
509
|
}
|
|
510
510
|
if(this.check.data)
|
|
@@ -556,7 +556,6 @@ export default {
|
|
|
556
556
|
{
|
|
557
557
|
async dragon_pay_choice()
|
|
558
558
|
{
|
|
559
|
-
console.log(this.dragon_pay_choice.shortName);
|
|
560
559
|
this.gcash_fee = 0;
|
|
561
560
|
this.show_gcash_fee = false;
|
|
562
561
|
if(this.dragon_pay_choice.shortName == 'GCash' || this.dragon_pay_choice.shortName == 'GCash App')
|
|
@@ -1702,6 +1701,10 @@ export default {
|
|
|
1702
1701
|
{
|
|
1703
1702
|
this.$q.dialog({ html: true, title: `Something's not quite right`, message: "Insufficient GC" });
|
|
1704
1703
|
}
|
|
1704
|
+
else if(this.online_payment_only && this.checkout_info.payment_method.payment_method_id != "dragon_pay" && this.checkout_info.payment_method.payment_method_id != "online_payment")
|
|
1705
|
+
{
|
|
1706
|
+
this.$q.dialog({ html: true, title: `Something's not quite right`, message: "Shopper membership can only be purchased using online payment or dragon pay" });
|
|
1707
|
+
}
|
|
1705
1708
|
else
|
|
1706
1709
|
{
|
|
1707
1710
|
if(sessionStorage.referral_slot_code && this.payment_method.payment_method_id != "gc_points")
|
|
@@ -1871,6 +1874,26 @@ export default {
|
|
|
1871
1874
|
this.checkout_info.payment_method = this.payment_method_list[0];
|
|
1872
1875
|
this.payment_method = this.payment_method_list[0];
|
|
1873
1876
|
|
|
1877
|
+
this.product_list.forEach(element => {
|
|
1878
|
+
if(element.product.hasOwnProperty('membership_kit') && element.product.membership_kit.membership.membership_id == 'shopper_member')
|
|
1879
|
+
{
|
|
1880
|
+
this.online_payment_only = true;
|
|
1881
|
+
for( var i = 0; i < this.payment_method_list.length; i++)
|
|
1882
|
+
{
|
|
1883
|
+
if (this.payment_method_list[i].payment_method_id == 'dragon_pay' || this.payment_method_list[i].payment_method_id == 'online_payment')
|
|
1884
|
+
{
|
|
1885
|
+
|
|
1886
|
+
}
|
|
1887
|
+
else
|
|
1888
|
+
{
|
|
1889
|
+
this.payment_method_list.splice(i, 1);
|
|
1890
|
+
i--;
|
|
1891
|
+
}
|
|
1892
|
+
}
|
|
1893
|
+
}
|
|
1894
|
+
});
|
|
1895
|
+
|
|
1896
|
+
|
|
1874
1897
|
}
|
|
1875
1898
|
},
|
|
1876
1899
|
changePaymentMethod(event,index)
|
package/GManageProduct.vue
CHANGED
|
@@ -112,6 +112,14 @@ export default
|
|
|
112
112
|
required: true,
|
|
113
113
|
sortable: true,
|
|
114
114
|
},
|
|
115
|
+
{
|
|
116
|
+
name : 'merchant discount',
|
|
117
|
+
label : 'MERCHANT DISCOUNT %',
|
|
118
|
+
field : row => row.merchant_discount_applied ? row.merchant_percentage_discount : 0,
|
|
119
|
+
align : 'left',
|
|
120
|
+
required: true,
|
|
121
|
+
sortable: true,
|
|
122
|
+
},
|
|
115
123
|
|
|
116
124
|
],
|
|
117
125
|
slot_code : "",
|
package/GProductList.vue
CHANGED
|
@@ -9,9 +9,18 @@
|
|
|
9
9
|
<template v-if="show_discount_badge">
|
|
10
10
|
<div class="discount-badge" v-if="field.user_discount>0">{{field.user_discount}}% <br/>OFF</div>
|
|
11
11
|
</template>
|
|
12
|
+
<template v-if="show_merchant_discount">
|
|
13
|
+
<div class="discount-badge" v-if="field.merchant_percentage_discount>0">{{field.merchant_percentage_discount}}% <br/>OFF</div>
|
|
14
|
+
</template>
|
|
12
15
|
<template v-if="cashback">
|
|
13
16
|
<div class="cashback-badge" v-if="field.item_pv>0"><div class="cashback-label">Cashback: </div> <div class="cashback-value">{{$_formatNumber((field.item_pv/12), { decimal: 2})}} </div></div>
|
|
14
17
|
</template>
|
|
18
|
+
<template v-if="show_reseller_commission && field.referral_commission > 0 ">
|
|
19
|
+
<div class="commission-badge">
|
|
20
|
+
<div class="commission-label">rc: </div>
|
|
21
|
+
<div class="commission-value">{{$_formatNumber((field.referral_commission), { decimal: 2})}} </div>
|
|
22
|
+
</div>
|
|
23
|
+
</template>
|
|
15
24
|
<div v-if="show_description" class="product-desc" v-html="field.description"></div>
|
|
16
25
|
<div class="product-list-detail" v-if="sort_by!='gc_price'">
|
|
17
26
|
<div class="product-list-row">
|
|
@@ -50,6 +59,7 @@ import DB_PRODUCTS from './models/DB_PRODUCT';
|
|
|
50
59
|
import GlobalMixins from './mixins/global_mixins';
|
|
51
60
|
import GLoader from './components/GlobalLoader';
|
|
52
61
|
import ProductClass from './classes/ProductClass';
|
|
62
|
+
import { log } from 'console';
|
|
53
63
|
|
|
54
64
|
|
|
55
65
|
export default {
|
|
@@ -75,6 +85,7 @@ export default {
|
|
|
75
85
|
show_discount_price: Boolean,
|
|
76
86
|
show_discount_badge: Boolean,
|
|
77
87
|
show_original_price:Boolean,
|
|
88
|
+
show_merchant_discount:Boolean,
|
|
78
89
|
},
|
|
79
90
|
data: () =>
|
|
80
91
|
({
|
|
@@ -91,6 +102,7 @@ export default {
|
|
|
91
102
|
rank_list: '',
|
|
92
103
|
membership_list:'',
|
|
93
104
|
stockist_list:'',
|
|
105
|
+
show_reseller_commission:false,
|
|
94
106
|
}),
|
|
95
107
|
async mounted()
|
|
96
108
|
{
|
|
@@ -105,7 +117,10 @@ export default {
|
|
|
105
117
|
this.public_settings = await this.$_getData('public_settings');
|
|
106
118
|
this.main_currency = this.public_settings.main_currency;
|
|
107
119
|
this.prod_per_page = this.product_per_page;
|
|
108
|
-
|
|
120
|
+
if(this.public_settings.hasOwnProperty('referral_commission_earning'))
|
|
121
|
+
{
|
|
122
|
+
if(this.public_settings.referral_commission_earning) this.show_reseller_commission = true;
|
|
123
|
+
}
|
|
109
124
|
await this.newGetProduct(Number(this.prod_per_page));
|
|
110
125
|
this.first_load_done=true;
|
|
111
126
|
},
|
package/GProductPage.vue
CHANGED
|
@@ -53,6 +53,9 @@
|
|
|
53
53
|
<div class="discount-percent" v-if="show_discount_badge && variant_product_details.user_discount>0">
|
|
54
54
|
{{variant_product_details.user_discount}}% OFF
|
|
55
55
|
</div>
|
|
56
|
+
<div class="discount-percent" v-if="show_merchant_discount_badge && variant_product_details.merchant_percentage_discount>0">
|
|
57
|
+
{{variant_product_details.merchant_percentage_discount}}% OFF
|
|
58
|
+
</div>
|
|
56
59
|
</template>
|
|
57
60
|
<template v-else>
|
|
58
61
|
<div :style="product_details.user_discount>0 ? 'text-decoration-line: line-through;font-weight:400;font-size:15px;color:gray;margin-right:3px;font-size: 10px;' : ''">
|
|
@@ -79,6 +82,9 @@
|
|
|
79
82
|
<div class="discount-percent" v-if="show_discount_badge && product_details.user_discount>0">
|
|
80
83
|
{{product_details.user_discount}}% OFF
|
|
81
84
|
</div>
|
|
85
|
+
<div class="discount-percent" v-if="show_merchant_discount_badge && product_details.merchant_percentage_discount>0">
|
|
86
|
+
{{product_details.merchant_percentage_discount}}% OFF
|
|
87
|
+
</div>
|
|
82
88
|
</template>
|
|
83
89
|
</div>
|
|
84
90
|
<div class="selling-price" v-if="product_discount>0">
|
|
@@ -412,6 +418,7 @@ export default {
|
|
|
412
418
|
'slot_code',
|
|
413
419
|
'show_discount',
|
|
414
420
|
'show_discount_badge',
|
|
421
|
+
'show_merchant_discount_badge',
|
|
415
422
|
'show_only',
|
|
416
423
|
'show_pv'
|
|
417
424
|
],
|
package/GRegistration.vue
CHANGED
|
@@ -21,7 +21,10 @@
|
|
|
21
21
|
<!-- country -->
|
|
22
22
|
<div class="g-registration__fields q-mt-md">
|
|
23
23
|
<div class="label">Country</div>
|
|
24
|
-
<div class="input">
|
|
24
|
+
<div class="input" v-if="international_country">
|
|
25
|
+
<q-select v-model="form_data.international_country" option-label="name" option-value="code" :options="country_list" dense class="input" outlined stack-label/>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="input" v-else>
|
|
25
28
|
<q-select v-model="form_data.country" option-label="name" option-value="code" :options="[{ name: 'Philippines', code: 'PH' }]" dense class="input" outlined stack-label/>
|
|
26
29
|
</div>
|
|
27
30
|
</div>
|
|
@@ -114,6 +117,7 @@
|
|
|
114
117
|
import GlobalMixins from './mixins/global_mixins.js';
|
|
115
118
|
import scss from './GRegistration.scss'
|
|
116
119
|
import axios from 'axios';
|
|
120
|
+
import { truncateSync } from 'fs';
|
|
117
121
|
|
|
118
122
|
export default
|
|
119
123
|
{
|
|
@@ -132,17 +136,22 @@ export default
|
|
|
132
136
|
password : '',
|
|
133
137
|
confirm_password : '',
|
|
134
138
|
gender : 'Male',
|
|
139
|
+
international_country:{ name: 'Philippines', code: 'PH' },
|
|
135
140
|
country : { name: 'Philippines', code: 'PH' },
|
|
136
141
|
},
|
|
137
142
|
gender_options : ['Male', 'Female'],
|
|
138
143
|
country_options : [{ name: 'Philippines', code: 'PH' }],
|
|
144
|
+
country_list :[],
|
|
139
145
|
is_term_checked : false,
|
|
140
146
|
is_term_and_condition_open : false,
|
|
141
147
|
terms_and_conditions : '',
|
|
142
148
|
region_list : [],
|
|
149
|
+
international_country:false,
|
|
143
150
|
}),
|
|
144
151
|
async mounted()
|
|
145
152
|
{
|
|
153
|
+
|
|
154
|
+
this.country_list = await this.$_getData('country_list');
|
|
146
155
|
//terms and conditions in public settings
|
|
147
156
|
this.terms_and_conditions = await this.$_getData('public_settings');
|
|
148
157
|
if(this.terms_and_conditions.hasOwnProperty('mbot'))
|
|
@@ -161,6 +170,10 @@ export default
|
|
|
161
170
|
this.form_data.sponsor = sessionStorage.referral_slot_code;
|
|
162
171
|
}
|
|
163
172
|
}
|
|
173
|
+
if(this.terms_and_conditions.hasOwnProperty('international_country_registration'))
|
|
174
|
+
{
|
|
175
|
+
this.international_country= true;
|
|
176
|
+
}
|
|
164
177
|
|
|
165
178
|
},
|
|
166
179
|
props:{
|
|
@@ -181,6 +194,10 @@ export default
|
|
|
181
194
|
},
|
|
182
195
|
async submitCreateAccount()
|
|
183
196
|
{
|
|
197
|
+
if(!this.international_country)
|
|
198
|
+
{
|
|
199
|
+
delete this.form_data.international_country;
|
|
200
|
+
}
|
|
184
201
|
if(this.val == false)
|
|
185
202
|
{
|
|
186
203
|
this.is_term_and_condition_open = true;
|
|
@@ -201,6 +218,7 @@ export default
|
|
|
201
218
|
this.is_submitting = true;
|
|
202
219
|
try
|
|
203
220
|
{
|
|
221
|
+
console.log(this.form_data);
|
|
204
222
|
let callbackCreateAccount = await this.$_fbCall('frontRegistration', this.form_data);
|
|
205
223
|
this.$emit('success', this.form_data);
|
|
206
224
|
this.is_submitting = false;
|
package/GRequestProduct.vue
CHANGED
|
@@ -375,10 +375,10 @@
|
|
|
375
375
|
vat:0,
|
|
376
376
|
transaction_fee:0,
|
|
377
377
|
product_deductions:false,
|
|
378
|
+
referral_commission:0,
|
|
378
379
|
}),
|
|
379
380
|
computed:
|
|
380
381
|
{
|
|
381
|
-
|
|
382
382
|
computedCommision()
|
|
383
383
|
{
|
|
384
384
|
return this.computed_commission = parseFloat((this.product_details.commission_margin / 100) * this.product_details.selling_price);
|
|
@@ -417,6 +417,10 @@
|
|
|
417
417
|
this.vat= this.settings.product_deductions.vat;
|
|
418
418
|
this.product_deductions = true;
|
|
419
419
|
}
|
|
420
|
+
if(this.settings && this.settings.hasOwnProperty('referral_commission_earning') && this.settings.referral_commission_earning.active)
|
|
421
|
+
{
|
|
422
|
+
this.referral_commission = this.settings.referral_commission_earning.default_commission ? this.settings.referral_commission_earning.default_commission : 0;
|
|
423
|
+
}
|
|
420
424
|
},
|
|
421
425
|
async getCategoriesList()
|
|
422
426
|
{
|
|
@@ -449,6 +453,10 @@
|
|
|
449
453
|
// console.log(this.product_details)
|
|
450
454
|
try
|
|
451
455
|
{
|
|
456
|
+
if(this.referral_commission>0)
|
|
457
|
+
{
|
|
458
|
+
this.product_details.referral_commission = this.referral_commission;
|
|
459
|
+
}
|
|
452
460
|
this.product_details.vat = this.vat;
|
|
453
461
|
this.product_details.transaction_fee = this.transaction_fee;
|
|
454
462
|
this.product_details.stockist = this.current_slot_info.slot_code;
|
package/components/GProfile.vue
CHANGED
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
<div @click="$emit('closePopup')" class="pinfo">
|
|
19
19
|
<div class="group">
|
|
20
20
|
<div class="val">{{ prop_user_info.slot_owned }}</div>
|
|
21
|
-
<div class="lab" v-if="is_company_ultrapro">Slot
|
|
22
|
-
<div class="lab" v-else>Slot
|
|
21
|
+
<div class="lab" v-if="is_company_ultrapro">Slot Count</div>
|
|
22
|
+
<div class="lab" v-else>Slot Owned</div>
|
|
23
23
|
|
|
24
24
|
</div>
|
|
25
25
|
<div class="group">
|
|
@@ -230,7 +230,16 @@ export default
|
|
|
230
230
|
},
|
|
231
231
|
async getTableData()
|
|
232
232
|
{
|
|
233
|
+
// await this.$bind("table_data", new DB_SLOT_LOG().collection().where("recipient_id", "==", this.user_info.active_slot).orderBy('convert_message', 'desc').orderBy('created_date', 'desc'));
|
|
233
234
|
await this.$bind("table_data", new DB_SLOT_LOG().collection().where("recipient_id", "==", this.user_info.active_slot).orderBy('created_date', 'desc'));
|
|
235
|
+
for( var i = 0; i < this.table_data.length; i++)
|
|
236
|
+
{
|
|
237
|
+
if (this.table_data[i].temp_wallet_message)
|
|
238
|
+
{
|
|
239
|
+
this.table_data.splice(i, 1);
|
|
240
|
+
i--;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
234
243
|
this.table_loading = false;
|
|
235
244
|
},
|
|
236
245
|
},
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="merchant-add-discount">
|
|
3
|
+
<q-bar class="bg-primary text-white q-pa-lg">
|
|
4
|
+
<q-icon class="q-mr-sm" name="fa fa-list-alt"></q-icon>
|
|
5
|
+
<b>Add Discount</b>
|
|
6
|
+
<q-space />
|
|
7
|
+
|
|
8
|
+
<q-btn dense flat icon="close" v-close-popup>
|
|
9
|
+
<q-tooltip content-class="bg-white text-primary">Close</q-tooltip>
|
|
10
|
+
</q-btn>
|
|
11
|
+
</q-bar>
|
|
12
|
+
<div class="content-holder">
|
|
13
|
+
<div class="input-holder">
|
|
14
|
+
<q-input type="number" :disable="disable_input" square filled v-model="discount" label="Enter Percentage" />
|
|
15
|
+
</div>
|
|
16
|
+
<div class="discount-holder">
|
|
17
|
+
<div class="discount" v-for="(discount, i) in discount_button" :key="i" @click="enterDiscount(discount.value)">
|
|
18
|
+
<div class="label">
|
|
19
|
+
{{ discount.label}}
|
|
20
|
+
</div>
|
|
21
|
+
</div>
|
|
22
|
+
</div>
|
|
23
|
+
<div class="button-holder">
|
|
24
|
+
<q-btn color="primary" @click="updateDiscount" class="full-width q-pa-sm q-mt-sm">Update Discount</q-btn>
|
|
25
|
+
</div>
|
|
26
|
+
</div>
|
|
27
|
+
|
|
28
|
+
</div>
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<script>
|
|
32
|
+
export default
|
|
33
|
+
{
|
|
34
|
+
filters: { },
|
|
35
|
+
props:['product_information'],
|
|
36
|
+
data:() =>(
|
|
37
|
+
{
|
|
38
|
+
|
|
39
|
+
disable_input:true,
|
|
40
|
+
discount:0,
|
|
41
|
+
discount_button: [{label: '10%', value: 10},{label: '20%', value: 20},{label: '30%', value: 30},{label: '40%', value: 40},{label: '50%', value: 50}, {label: 'Custom Percentage', value: 0}],
|
|
42
|
+
}),
|
|
43
|
+
mounted() { },
|
|
44
|
+
methods:
|
|
45
|
+
{
|
|
46
|
+
async updateDiscount()
|
|
47
|
+
{
|
|
48
|
+
this.$q.loading.show();
|
|
49
|
+
if(this.product_information)
|
|
50
|
+
{
|
|
51
|
+
let update = {};
|
|
52
|
+
update.merchant_discount = this.discount;
|
|
53
|
+
update.product_id = this.product_information.product_id;
|
|
54
|
+
|
|
55
|
+
try
|
|
56
|
+
{
|
|
57
|
+
await this.$_fbCall('memberUpdateMerchantDiscount', update);
|
|
58
|
+
this.$q.dialog({ html: true, title: `Success`, message: 'Discount updated.' });
|
|
59
|
+
this.$emit('closePopUp');
|
|
60
|
+
}
|
|
61
|
+
catch (error)
|
|
62
|
+
{
|
|
63
|
+
this.$q.dialog({ html: true, title: `Something's not quite right`, message: error.message });
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
this.$q.loading.hide();
|
|
67
|
+
|
|
68
|
+
},
|
|
69
|
+
enterDiscount(data)
|
|
70
|
+
{
|
|
71
|
+
if(data === 0)
|
|
72
|
+
{
|
|
73
|
+
this.disable_input = false;
|
|
74
|
+
}
|
|
75
|
+
else
|
|
76
|
+
{
|
|
77
|
+
this.discount = data;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
},
|
|
81
|
+
watch:
|
|
82
|
+
{
|
|
83
|
+
discount()
|
|
84
|
+
{
|
|
85
|
+
if(this.discount < 1)
|
|
86
|
+
{
|
|
87
|
+
this.discount = 1;
|
|
88
|
+
}
|
|
89
|
+
if(this.discount >50)
|
|
90
|
+
{
|
|
91
|
+
this.discount = 50;
|
|
92
|
+
this.disable_input = true;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
computed:
|
|
97
|
+
{
|
|
98
|
+
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
</script>
|
|
102
|
+
<style lang="scss">
|
|
103
|
+
.merchant-add-discount
|
|
104
|
+
{
|
|
105
|
+
min-width: 20vw;
|
|
106
|
+
min-height: 20vh;
|
|
107
|
+
background: #fafafa;
|
|
108
|
+
.content-holder
|
|
109
|
+
{
|
|
110
|
+
.input-holder
|
|
111
|
+
{
|
|
112
|
+
padding: 20px;
|
|
113
|
+
}
|
|
114
|
+
.discount-holder
|
|
115
|
+
{
|
|
116
|
+
display: grid;
|
|
117
|
+
grid-template-columns:1fr 1fr;
|
|
118
|
+
grid-gap: 10px;
|
|
119
|
+
padding: 0 20px;
|
|
120
|
+
.discount
|
|
121
|
+
{
|
|
122
|
+
background: $primary;
|
|
123
|
+
border-radius: 2px;
|
|
124
|
+
color: #fafafa;
|
|
125
|
+
padding: 20px;
|
|
126
|
+
.label
|
|
127
|
+
{
|
|
128
|
+
text-align: center;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
.discount:hover{
|
|
132
|
+
cursor: pointer;
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
}
|
|
136
|
+
.button-holder{
|
|
137
|
+
padding: 0 20px 20px 20px;
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
</style>
|
|
@@ -23,8 +23,12 @@
|
|
|
23
23
|
</div>
|
|
24
24
|
<!-- FIELD - BARCODE -->
|
|
25
25
|
<div class="col-3">
|
|
26
|
-
<div class="q-mt-sm q-ma-sm"><q-input disable outlined v-model="
|
|
26
|
+
<div class="q-mt-sm q-ma-sm"><q-input disable outlined v-model="merchant_percentage_discount" label="Merchant Discount %" stack-label></q-input></div>
|
|
27
27
|
</div>
|
|
28
|
+
<!-- FIELD - BARCODE -->
|
|
29
|
+
<!-- <div class="col-3">
|
|
30
|
+
<div class="q-mt-sm q-ma-sm"><q-input disable outlined v-model="product_details.barcode" label="Barcode" stack-label></q-input></div>
|
|
31
|
+
</div> -->
|
|
28
32
|
<!-- FIELD - CATEGORY -->
|
|
29
33
|
<div class="col-3">
|
|
30
34
|
<div class="q-mt-sm q-ma-sm"><q-select outlined v-model="product_details.category" label="Categories" option-value="category_identifier" option-label="category_identifier" :options="categories_list" stack-label></q-select></div>
|
|
@@ -85,6 +89,7 @@
|
|
|
85
89
|
<template v-else>
|
|
86
90
|
<q-btn v-if="product_information" class="q-pa-sm q-ml-sm" unelevated outline color="primary" @click="add_variation_dialog_open=true;update_variant_button=true;"><q-icon size="14px" class="q-mr-sm" name="fa fa-filter"></q-icon> Update Variation</q-btn>
|
|
87
91
|
</template>
|
|
92
|
+
<q-btn v-if="product_information && product_information.type != 'Pending Approval' " unelevated class="q-pa-sm q-ml-sm" @click="addDiscount" color="primary"><q-icon size="14px" class="q-mr-sm" name="fa fa-percentage"></q-icon> Add Merchant Discount</q-btn>
|
|
88
93
|
<q-btn v-if="product_information" unelevated class="q-pa-sm q-ml-sm" type="submit" color="primary"><q-icon size="14px" class="q-mr-sm" name="fa fa-save"></q-icon> Update Product Information</q-btn>
|
|
89
94
|
<q-btn v-if="!product_information" class="q-pa-sm" unelevated outline color="primary"><q-icon size="14px" class="q-mr-sm" name="fa fa-times"></q-icon> Cancel Create Product</q-btn>
|
|
90
95
|
<q-btn v-if="!product_information" unelevated class="q-pa-sm q-ml-sm" type="submit" color="primary"><q-icon size="14px" class="q-mr-sm" name="fa fa-save"></q-icon> Save New Product Information</q-btn>
|
|
@@ -96,6 +101,10 @@
|
|
|
96
101
|
<q-dialog persistent v-model="add_variation_dialog_open">
|
|
97
102
|
<add-variant-dialog :product_information="product_information" :update="update_variant_button" @addVariant="updateVariant" @closePopUp="add_variation_dialog_open=false"/>
|
|
98
103
|
</q-dialog>
|
|
104
|
+
|
|
105
|
+
<q-dialog persistent v-model="add_discount_dialog_open">
|
|
106
|
+
<add-discount :product_information="product_information" :update="update_variant_button" @closePopUp="add_discount_dialog_open=false"/>
|
|
107
|
+
</q-dialog>
|
|
99
108
|
</div>
|
|
100
109
|
|
|
101
110
|
</template>
|
|
@@ -106,16 +115,18 @@
|
|
|
106
115
|
import PUploader from '../../PUploader';
|
|
107
116
|
import GlobalMixins from '../../../mixins/global_mixins.js';
|
|
108
117
|
import AddVariantDialog from '../Dialogs/AddVariantDialog'
|
|
118
|
+
import AddDiscount from '../Dialogs/AddDiscount'
|
|
109
119
|
|
|
110
120
|
export default
|
|
111
121
|
{
|
|
112
122
|
mixins: [GlobalMixins],
|
|
113
|
-
components: { PUploader,AddVariantDialog },
|
|
123
|
+
components: { PUploader,AddVariantDialog, AddDiscount },
|
|
114
124
|
props: {
|
|
115
125
|
product_information: Object,
|
|
116
126
|
},
|
|
117
127
|
data: () =>
|
|
118
128
|
({
|
|
129
|
+
add_discount_dialog_open:false,
|
|
119
130
|
update_variant_button: false,
|
|
120
131
|
add_variation_dialog_open:false,
|
|
121
132
|
succesfullupdate : false,
|
|
@@ -154,14 +165,27 @@
|
|
|
154
165
|
seo : { title: "", keyword: "", description: "" }
|
|
155
166
|
},
|
|
156
167
|
categories_list : [],
|
|
168
|
+
merchant_percentage_discount: 0,
|
|
157
169
|
}),
|
|
158
170
|
mounted()
|
|
159
171
|
{
|
|
160
172
|
this.getMembershipList();
|
|
161
173
|
this.getCategoriesList();
|
|
174
|
+
this.setDiscount();
|
|
162
175
|
},
|
|
163
176
|
methods:
|
|
164
177
|
{
|
|
178
|
+
setDiscount()
|
|
179
|
+
{
|
|
180
|
+
if(this.product_information.hasOwnProperty('merchant_discount_applied') && this.product_information.merchant_discount_applied)
|
|
181
|
+
{
|
|
182
|
+
this.merchant_percentage_discount = this.product_information.merchant_percentage_discount;
|
|
183
|
+
}
|
|
184
|
+
},
|
|
185
|
+
addDiscount()
|
|
186
|
+
{
|
|
187
|
+
this.add_discount_dialog_open = true;
|
|
188
|
+
},
|
|
165
189
|
updateVariant(variant)
|
|
166
190
|
{
|
|
167
191
|
this.add_variation_dialog_open=false;
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
<div style="display:flex;background:white;border-top: 1px solid rgb(194, 189, 189);">
|
|
23
23
|
<div style="font-weight:600;padding:5px;padding-left:10px;width:46%;"><q-icon name="fa fa-store" class="q-mr-sm"></q-icon>{{list.orders.merchant_name}}</div>
|
|
24
|
+
<div style="font-weight:600;padding:5px;margin-left:auto;margin-right:10px;width:20%;"><q-icon name="fa fa-phone-alt" class="q-mr-sm"></q-icon> {{list.orders.merchant_details.business_contact_number}}</div>
|
|
24
25
|
<div v-if="list.shipping_details" style="font-weight:600;padding:5px;width:35%;">Tracking Number: {{list.shipping_details.tracking_number}}</div>
|
|
25
26
|
<div :style="`font-weight:600;padding:5px;${list.shipping_details ? 'width:19%' : 'width:55%'};text-align:right;padding-right:18px;`">Order ID: {{list.order_id}}</div>
|
|
26
27
|
</div>
|
|
@@ -116,8 +117,11 @@
|
|
|
116
117
|
<div style="display:flex;background:white;border-top: 1px solid rgb(194, 189, 189);">
|
|
117
118
|
<div style="font-weight:600;padding:5px;padding-left:10px;width:46%;"><q-icon name="fa fa-store" class="q-mr-sm"></q-icon>{{list.orders.merchant_name}}</div>
|
|
118
119
|
<div v-if="list.shipping_details" style="font-weight:600;padding:5px;width:35%;">Tracking Number: {{list.shipping_details.tracking_number}}</div>
|
|
119
|
-
|
|
120
|
-
|
|
120
|
+
</div>
|
|
121
|
+
<div class="grid-merchant" style="display:flex">
|
|
122
|
+
<div :style="`margin-left:10px;font-weight:600;padding:5px;text-align:left;${list.shipping_details ? 'width:50%' : 'width:50%'};`">Order ID: {{list.order_id}}</div>
|
|
123
|
+
<div style="font-weight:600;padding:5px;margin-left:10px;"><q-icon name="fa fa-phone-alt" class="q-mr-sm"></q-icon>{{list.orders.merchant_details ? list.orders.merchant_details.business_contact_number: ''}}</div>
|
|
124
|
+
</div>
|
|
121
125
|
</div>
|
|
122
126
|
<div v-for="(field, i) in list.orders.products" :key="i" class="checkout-container" :id="i" >
|
|
123
127
|
<div class="inner_container">
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
<div style="display:flex;background:white;border-top: 1px solid rgb(194, 189, 189);">
|
|
23
23
|
<div style="font-weight:600;padding:5px;margin-left:10px;"><q-icon name="fa fa-store" class="q-mr-sm"></q-icon>{{list.orders.merchant_name}}</div>
|
|
24
|
+
<div style="font-weight:600;padding:5px;margin-left:auto;margin-right:10px;"><q-icon name="fa fa-phone-alt" class="q-mr-sm"></q-icon> {{list.orders.merchant_details.business_contact_number}}</div>
|
|
24
25
|
<div style="font-weight:600;padding:5px;margin-left:auto;margin-right:10px;">Order ID: {{list.order_id}}</div>
|
|
25
26
|
</div>
|
|
26
27
|
|
|
@@ -111,6 +112,7 @@
|
|
|
111
112
|
<div style="display:flex;background:white;border-top: 1px solid rgb(194, 189, 189);">
|
|
112
113
|
<div style="font-weight:600;padding:5px;margin-left:10px;"><q-icon name="fa fa-store" class="q-mr-sm"></q-icon>{{list.orders.merchant_name}}</div>
|
|
113
114
|
<div style="font-weight:600;padding:5px;margin-left:auto;margin-right:10px;">Order ID: {{list.order_id}}</div>
|
|
115
|
+
<div style="font-weight:600;padding:5px;margin-left:10px;"><q-icon name="fa fa-phone-alt" class="q-mr-sm"></q-icon>{{list.orders.merchant_details ? list.orders.merchant_details.business_contact_number: ''}}</div>
|
|
114
116
|
</div>
|
|
115
117
|
|
|
116
118
|
</div>
|
|
@@ -19,8 +19,9 @@
|
|
|
19
19
|
<div class="status">Status: <div class="value" :style="list.status == 'to_pay' ? 'color:#a29e9e;' : 'color:darkviolet;'">{{list.status == "to_pay" || list.status == "pre_processing" ? "Waiting for Payment" : "Waiting for platform to Received the payment"}}</div></div>
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
|
-
<div style="display:flex;background
|
|
22
|
+
<div style="display:flex;background:#eeee;border-top: 1px solid rgb(194, 189, 189);">
|
|
23
23
|
<div style="font-weight:600;padding:5px;margin-left:10px;"><q-icon name="fa fa-store" class="q-mr-sm"></q-icon>{{list.orders.merchant_name}}</div>
|
|
24
|
+
<div style="font-weight:600;padding:5px;margin-left:auto;margin-right:10px;"><q-icon name="fa fa-phone-alt" class="q-mr-sm"></q-icon> {{list.orders.merchant_details.business_contact_number}}</div>
|
|
24
25
|
<div style="font-weight:600;padding:5px;margin-left:auto;margin-right:10px;">Order ID: {{list.order_id}}</div>
|
|
25
26
|
</div>
|
|
26
27
|
|
|
@@ -108,6 +109,7 @@
|
|
|
108
109
|
<div style="display:flex;background:white;border-top: 1px solid rgb(194, 189, 189);">
|
|
109
110
|
<div style="font-weight:600;padding:5px;margin-left:10px;"><q-icon name="fa fa-store" class="q-mr-sm"></q-icon>{{list.orders.merchant_name}}</div>
|
|
110
111
|
<div style="font-weight:600;padding:5px;margin-left:auto;margin-right:10px;">Order ID: {{list.order_id}}</div>
|
|
112
|
+
<div style="font-weight:600;padding:5px;margin-left:10px;"><q-icon name="fa fa-phone-alt" class="q-mr-sm"></q-icon>{{list.orders.merchant_details ? list.orders.merchant_details.business_contact_number: ''}}</div>
|
|
111
113
|
</div>
|
|
112
114
|
</div>
|
|
113
115
|
<div v-for="(field, i) in list.orders.products" :key="i" class="checkout-container" :id="i" >
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
<div style="display:flex;background:white;border-top: 1px solid rgb(194, 189, 189);">
|
|
23
23
|
<div style="font-weight:600;padding:5px;padding-left:10px;width:46%;"><q-icon name="fa fa-store" class="q-mr-sm"></q-icon>{{list.orders.merchant_name}}</div>
|
|
24
|
-
|
|
24
|
+
<div style="font-weight:600;padding:5px;margin-left:auto;margin-right:10px;"><q-icon name="fa fa-phone-alt" class="q-mr-sm"></q-icon> {{list.orders.merchant_details.business_contact_number}}</div>
|
|
25
25
|
<div style="font-weight:600;padding:5px;width:55%;text-align:right;padding-right:18px;">Order ID: {{list.order_id}}</div>
|
|
26
26
|
</div>
|
|
27
27
|
|
|
@@ -120,6 +120,7 @@
|
|
|
120
120
|
<div style="background:white;border-top: 1px solid rgb(194, 189, 189);">
|
|
121
121
|
<div style="display: grid; grid-template-columns: 1fr 2fr;">
|
|
122
122
|
<div style="font-weight:600;padding:5px;"><q-icon name="fa fa-store" class="q-mr-sm"></q-icon>{{list.orders.merchant_name}}</div>
|
|
123
|
+
<div style="font-weight:600;padding:5px;margin-left:10px;"><q-icon name="fa fa-phone-alt" class="q-mr-sm"></q-icon>{{list.orders.merchant_details ? list.orders.merchant_details.business_contact_number: ''}}</div>
|
|
123
124
|
<!-- <div style="font-weight:600;padding:5px;text-align:right">Tracking Number: {{list.shipping_details.tracking_number}}</div> -->
|
|
124
125
|
</div>
|
|
125
126
|
<div style="font-weight:600;padding:5px;text-align:right;padding-right:18px;">Order ID: {{list.order_id}}</div>
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
</div>
|
|
21
21
|
</div>
|
|
22
22
|
<div style="display:flex;background:white;border-top: 1px solid rgb(194, 189, 189);">
|
|
23
|
+
<!-- <div style="font-weight:600;padding:5px;padding-left:10px;width:40%;"><q-icon name="fa fa-store" class="q-mr-sm"></q-icon>{{list.orders.merchant_name}}</div>
|
|
24
|
+
<div style="font-weight:600;padding:5px;margin-left:auto;margin-right:10px;width:20%;"><q-icon name="fa fa-phone-alt" class="q-mr-sm"></q-icon> {{list.orders.merchant_details.business_contact_number}}</div>
|
|
25
|
+
<div style="font-weight:600;padding:5px;width:25%;">Tracking Number: {{list.shipping_details.tracking_number}}</div>
|
|
26
|
+
<div style="font-weight:600;padding:5px;width:15%;text-align:right;padding-right:18px;">Order ID: {{list.order_id}}</div> -->
|
|
23
27
|
<div style="font-weight:600;padding:5px;padding-left:10px;width:46%;"><q-icon name="fa fa-store" class="q-mr-sm"></q-icon>{{list.orders.merchant_name}}</div>
|
|
24
28
|
<div style="font-weight:600;padding:5px;width:35%;">Tracking Number: {{list.shipping_details ? list.shipping_details.tracking_number : ''}}</div>
|
|
25
29
|
<div style="font-weight:600;padding:5px;width:19%;text-align:right;padding-right:18px;">Order ID: {{list.order_id}}</div>
|
|
@@ -122,7 +126,10 @@
|
|
|
122
126
|
<div style="font-weight:600;padding:5px;"><q-icon name="fa fa-store" class="q-mr-sm"></q-icon>{{list.orders.merchant_name}}</div>
|
|
123
127
|
<div style="font-weight:600;padding:5px;text-align:right">Tracking Number: {{list.shipping_details ? list.shipping_details.tracking_number : ''}}</div>
|
|
124
128
|
</div>
|
|
125
|
-
<div style="
|
|
129
|
+
<div class="grid-merchant" style="display:flex; justify-content:space-between">
|
|
130
|
+
<div style="font-weight:600;padding:5px;;padding-right:18px;">Order ID: {{list.order_id}}</div>
|
|
131
|
+
<div style="font-weight:600;padding:5px;margin-left:10px;"><q-icon name="fa fa-phone-alt" class="q-mr-sm"></q-icon>{{list.orders.merchant_details ? list.orders.merchant_details.business_contact_number: ''}}</div>
|
|
132
|
+
</div>
|
|
126
133
|
</div>
|
|
127
134
|
</div>
|
|
128
135
|
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
</div>
|
|
22
22
|
<div style="display:flex;background:white;border-top: 1px solid rgb(194, 189, 189);">
|
|
23
23
|
<div style="font-weight:600;padding:5px;margin-left:10px;"><q-icon name="fa fa-store" class="q-mr-sm"></q-icon>{{list.orders.merchant_name}}</div>
|
|
24
|
+
<div style="font-weight:600;padding:5px;margin-left:auto;margin-right:10px;"><q-icon name="fa fa-phone-alt" class="q-mr-sm"></q-icon> {{list.orders.merchant_details.business_contact_number}}</div>
|
|
24
25
|
<div style="font-weight:600;padding:5px;margin-left:auto;margin-right:10px;">Order ID: {{list.order_id}}</div>
|
|
25
26
|
</div>
|
|
26
27
|
|
|
@@ -105,6 +106,7 @@
|
|
|
105
106
|
<div style="display:flex;background:white;border-top: 1px solid rgb(194, 189, 189);">
|
|
106
107
|
<div style="font-weight:600;padding:5px;margin-left:10px;"><q-icon name="fa fa-store" class="q-mr-sm"></q-icon>{{list.orders.merchant_name}}</div>
|
|
107
108
|
<div style="font-weight:600;padding:5px;margin-left:auto;margin-right:10px;">Order ID: {{list.order_id}}</div>
|
|
109
|
+
<div style="font-weight:600;padding:5px;margin-left:10px;"><q-icon name="fa fa-phone-alt" class="q-mr-sm"></q-icon>{{list.orders.merchant_details ? list.orders.merchant_details.business_contact_number: ''}}</div>
|
|
108
110
|
</div>
|
|
109
111
|
</div>
|
|
110
112
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<q-card class="sales-invoice-printable">
|
|
2
|
+
<q-card class="sales-invoice-printable" :style="company_qdy ? `font-family:arial; letter-spacing: 1px; font-size:11px; padding:50px 20px;` : ``">
|
|
3
3
|
<div class="row">
|
|
4
4
|
<div class="col-12">
|
|
5
5
|
<div class="row">
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
</div>
|
|
18
18
|
<div class="col-5 label" style="margin-top:15px;">Order No. Receipt No. : {{ number }}</div>
|
|
19
19
|
</div>
|
|
20
|
-
<div class="row text-left info">
|
|
20
|
+
<div class="row text-left info" :style="company_qdy? `line-height:20px`:``">
|
|
21
21
|
<div class="col-7 label sold" style="margin-top:2"><div>Sold To :{{ customer.name }}</div></div>
|
|
22
22
|
<div class="col-5 label date">DATE : {{ $_formatDate(transaction_date, 'YYYY-MM-DD mm:ss.s') }}</div>
|
|
23
23
|
</div>
|
|
@@ -122,6 +122,7 @@ export default {
|
|
|
122
122
|
main_currency:'',
|
|
123
123
|
show_batch:false,
|
|
124
124
|
show_customer_details:false,
|
|
125
|
+
company_qdy:false,
|
|
125
126
|
}),
|
|
126
127
|
async mounted()
|
|
127
128
|
{
|
|
@@ -129,6 +130,10 @@ export default {
|
|
|
129
130
|
// this.contact = this.stockist_info.stockist_details.phone_number;
|
|
130
131
|
|
|
131
132
|
this.settings = await this.$_getData('public_settings');
|
|
133
|
+
if(this.settings.hasOwnProperty("qdy") && this.settings.qdy)
|
|
134
|
+
{
|
|
135
|
+
this.company_qdy = true;
|
|
136
|
+
}
|
|
132
137
|
if(this.settings.hasOwnProperty("cashier_show_batch") && this.settings.cashier_show_batch == true)
|
|
133
138
|
{
|
|
134
139
|
this.show_batch = true;
|