addtocash using sendcoins Circuit
This commit is contained in:
BIN
B00001.jpg
Normal file
BIN
B00001.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 158 KiB |
BIN
B00002.jpg
Normal file
BIN
B00002.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
BIN
B00003.jpg
Normal file
BIN
B00003.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 178 KiB |
@@ -46,11 +46,13 @@ export interface IProduct {
|
||||
|
||||
stockQty: number, // UPDATING
|
||||
stockBloccatiQty: number, // UPDATING
|
||||
bookedQtyOrdered: number // UPDATING
|
||||
bookedQtyConfirmed: number // UPDATING
|
||||
|
||||
qtyToReachForGas: number
|
||||
maxbookableGASQty: number
|
||||
bookedGASQtyOrdered: number // UPDATING
|
||||
bookedGASQtyConfirmed: number // UPDATING
|
||||
bookableGASBloccatiQty: number // UPDATING
|
||||
|
||||
minBuyQty: number
|
||||
|
||||
@@ -66,9 +66,12 @@ const msg_it = {
|
||||
minBuyQty: 'Qta minima acquistabile',
|
||||
minStepQty: 'Step Minimo',
|
||||
maxBookableSinglePersQty: 'Qtà massima prenotabile singolarm.',
|
||||
maxbookableGASQty: 'Prenotabili',
|
||||
bookedQtyOrdered: 'Quantità Ordered',
|
||||
bookedQtyConfirmed: 'Quantità Confermate',
|
||||
bookableAvailableQty: 'Disponib. Prenotabili',
|
||||
maxbookableGASQty: 'Prenotabili',
|
||||
bookedGASQtyConfirmed: 'Qtà GAS Confermate',
|
||||
bookableGASBloccatiQty: 'Qtà GAS Bloccate',
|
||||
weight: 'Peso',
|
||||
unit: 'Unità di Misura',
|
||||
stars: 'Voto',
|
||||
|
||||
@@ -2085,6 +2085,11 @@ export const colTableProducts = [
|
||||
label_trans: 'products.stockBloccatiQty',
|
||||
fieldtype: costanti.FieldType.number
|
||||
}),
|
||||
AddCol({
|
||||
name: 'bookedQtyOrdered',
|
||||
label_trans: 'products.bookedQtyOrdered',
|
||||
fieldtype: costanti.FieldType.number
|
||||
}),
|
||||
AddCol({
|
||||
name: 'bookedQtyConfirmed',
|
||||
label_trans: 'products.bookedQtyConfirmed',
|
||||
|
||||
@@ -60,11 +60,14 @@ function getRecordProductEmpty(): IProduct {
|
||||
|
||||
stockQty: 0,
|
||||
stockBloccatiQty: 0,
|
||||
bookedQtyOrdered: 0,
|
||||
bookedQtyConfirmed: 0,
|
||||
|
||||
qtyToReachForGas: 0,
|
||||
|
||||
maxbookableGASQty: 0,
|
||||
bookedGASQtyOrdered: 0,
|
||||
bookedGASQtyConfirmed: 0,
|
||||
bookableGASBloccatiQty: 0,
|
||||
|
||||
canBeShipped: false,
|
||||
@@ -621,6 +624,10 @@ export const useProducts = defineStore('Products', {
|
||||
return ris
|
||||
},
|
||||
|
||||
getOptions() {
|
||||
return {}
|
||||
},
|
||||
|
||||
async CreateOrdersCart({ cart_id, status, note }: { cart_id: string, status: number, note: string }) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
@@ -631,7 +638,7 @@ export const useProducts = defineStore('Products', {
|
||||
|
||||
let ris = null
|
||||
|
||||
ris = await Api.SendReq('/cart/' + userStore.my._id + '/createorderscart', 'POST', { cart_id, status, note })
|
||||
ris = await Api.SendReq('/cart/' + userStore.my._id + '/createorderscart', 'POST', { cart_id, status, note, options: this.getOptions() })
|
||||
.then((res) => {
|
||||
|
||||
if (res.data.status === shared_consts.OrderStatus.CHECKOUT_SENT) {
|
||||
@@ -662,7 +669,7 @@ export const useProducts = defineStore('Products', {
|
||||
|
||||
let ris = null
|
||||
|
||||
ris = await Api.SendReq('/cart/updatestatuscart', 'POST', { ordercart_id, status })
|
||||
ris = await Api.SendReq('/cart/updatestatuscart', 'POST', { ordercart_id, status, options: this.getOptions() })
|
||||
.then((res) => {
|
||||
|
||||
if (res.data.status === shared_consts.OrderStatus.CHECKOUT_SENT) {
|
||||
@@ -681,6 +688,8 @@ export const useProducts = defineStore('Products', {
|
||||
return ris
|
||||
},
|
||||
|
||||
|
||||
|
||||
async UpdateOrderCartStatus({ order_id, status }: { order_id: string, status: number }) {
|
||||
|
||||
const userStore = useUserStore()
|
||||
@@ -691,7 +700,7 @@ export const useProducts = defineStore('Products', {
|
||||
|
||||
let ris = null
|
||||
|
||||
ris = await Api.SendReq('/cart/' + userStore.my._id + '/ordercartstatus', 'POST', { order_id, status, options })
|
||||
ris = await Api.SendReq('/cart/' + userStore.my._id + '/ordercartstatus', 'POST', { order_id, status, options: this.getOptions() })
|
||||
.then((res) => {
|
||||
|
||||
this.updateDataProduct(res)
|
||||
|
||||
@@ -106,6 +106,8 @@ export default defineComponent({
|
||||
oldrec.value = myrec.value
|
||||
note.value = mycart.value.note!
|
||||
|
||||
let options = {};
|
||||
|
||||
if (mycart.value) {
|
||||
recOrderCart.value = await productStore.CreateOrdersCart({ cart_id: mycart.value._id, status: 0, note: note.value })
|
||||
}
|
||||
|
||||
BIN
upload/products/B00001.jpg
Normal file
BIN
upload/products/B00001.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 158 KiB |
BIN
upload/products/B00002.jpg
Normal file
BIN
upload/products/B00002.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 76 KiB |
BIN
upload/products/B00003.jpg
Normal file
BIN
upload/products/B00003.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 178 KiB |
Reference in New Issue
Block a user