@ -45,7 +45,6 @@
< el -tooltip class = "item" effect = "dark" :content ="item.product.name" placement = "top" >
< div class = "product-item" > { { item . product . name } } < / div >
< / e l - t o o l t i p >
< / template >
< / template >
< / template >
@ -71,14 +70,163 @@
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e - c o l u m n >
< / template >
< template v -slot : card >
< el -table -column align = 'left' label = "Card" width = "240" header -align = " center " >
< template slot -scope = " scope " >
< div style = "color:blue;cursor: pointer;text-decoration: underline;" @click ="toDecode(scope.row.card)" > {{ scope.row.card }} < / div >
< / template >
< / e l - t a b l e - c o l u m n >
< / template >
<!-- shipping address -- >
< template v -slot : shipping >
< el -table -column align = 'left' label = "Shipping Address" minWidth = "360" header -align = " center " >
< el -table -column align = 'left' label = "Attention" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . shipping _attention } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Address" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . shipping _address } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "City" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . shipping _city } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "States/Province" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . shipping _region } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Zip/Postal Code" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . shipping _zip _code } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Country/Region" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . shipping _country } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Phone" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . shipping _mobile } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Exempt From Sales Tax" width = "180" header -align = " center " >
< template slot -scope = " scope " >
< div v-if ="scope.row.not_tax" >
Yes
< / div >
< div v-else >
No
< / div >
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Account" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . shipping _account } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Courier" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . shipping _courier } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Service" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . shipping _service } }
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e - c o l u m n >
< / template >
<!-- billing address -- >
< template v -slot : billing >
< el -table -column align = 'left' label = "Billing Address" minWidth = "360" header -align = " center " >
< el -table -column align = 'left' label = "Attention" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . billing _attention } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Address" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . billing _address } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "City" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . billing _city } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "States/Province" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . billing _region } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Zip/Postal Code" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . billing _zip _code } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Country/Region" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . billing _country } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Phone" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . billing _mobile } }
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e - c o l u m n >
< / template >
<!-- Credit Card Information -- >
<!-- < template v -slot : credit >
< el -table -column align = 'left' label = "Credit Card Information" minWidth = "360" header -align = " center " >
< el -table -column align = 'left' label = "Cardholder Name" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . card _name } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Card Number" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . card _number } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "Expiration Date MM/DD" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . card _expire } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "CVV" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . card _cvv } }
< / template >
< / e l - t a b l e - c o l u m n >
< el -table -column align = 'left' label = "" width = "180" header -align = " center " >
< template slot -scope = " scope " >
{ { scope . row . card } }
< / template >
< / e l - t a b l e - c o l u m n >
< / e l - t a b l e - c o l u m n >
< / template > -- >
< template v -slot : card >
< el -table -column align = 'left' label = "Card" width = "240" header -align = " center " >
< template slot -scope = " scope " >
< div style = "color:blue;cursor: pointer;text-decoration: underline;" > { { scope . row . card } } < / div >
< / template >
< / e l - t a b l e - c o l u m n >
< / template >
< template v -slot : file_id >
< el -table -column align = 'left' label = "PO File" width = "240" header -align = " center " >
< template slot -scope = " scope " >
< a v-if ="scope.row.file" :href="scope.row.file.url" target="_blank" style="color:blue;cursor: pointer;text-decoration: underline;" > {{ scope.row.file.original_name }} < / a >
< / template >
< / e l - t a b l e - c o l u m n >
< / template >
< template v -slot : btns >
< el -table -column align = 'center' fixed = "right" label = "Operate" width = "120" header -align = " center " >
< template slot -scope = " scope " >
@ -116,61 +264,143 @@
total : 0 ,
list : [ ] ,
table _item : [ {
prop : 'index' ,
type : 'index' ,
width : 50 ,
fixed : 'left'
} , {
prop : 'number' ,
label : 'Order Number' ,
align : 'left' ,
width : 240
} , {
prop : 'order_product' ,
label : 'Product' ,
align : 'left' ,
minWidth : 360 ,
/ / m u l t i H d : [ {
/ / p r o p : ' n a m e ' ,
/ / l a b e l : ' N a m e ' ,
/ / a l i g n : ' l e f t ' ,
/ / } , {
/ / p r o p : ' n u m b e r ' ,
/ / l a b e l : ' N u m b e r ' ,
/ / a l i g n : ' l e f t ' ,
/ / } ]
} , {
prop : 'user.email' ,
label : 'Email' ,
align : 'left' ,
width : 180
} , {
prop : 'index' ,
type : 'index' ,
width : 50 ,
fixed : 'left'
} ,
{
prop : 'user.email' ,
label : 'User Email' ,
align : 'left' ,
width : 180
} , {
prop : 'number' ,
label : 'Order Number' ,
align : 'left' ,
width : 240
} , {
prop : 'order_product' ,
label : 'Product' ,
align : 'left' ,
minWidth : 360 ,
} ,
{
prop : 'shipping' ,
label : 'Shipping Address' ,
align : 'left' ,
minWidth : 360 ,
} ,
{
prop : 'requirements' ,
label : 'Special Requirements/Notes' ,
align : 'left' ,
width : 180
} ,
{
prop : 'reference_number' ,
label : 'Reference Number' ,
align : 'left' ,
width : 180
} ,
{
prop : 'quote_number' ,
label : 'Quote Number' ,
align : 'left' ,
width : 180
} ,
{
prop : 'estimated_shipping' ,
label : 'Estimated Shipping' ,
align : 'left' ,
width : 180
} ,
{
prop : 'subtotal' ,
label : 'Subtotal' ,
align : 'left' ,
width : 180
} ,
{
prop : 'tax' ,
label : 'Tax' ,
align : 'left' ,
width : 180
} ,
{
prop : 'total' ,
label : 'Total' ,
align : 'left' ,
width : 180
} ,
{
prop : 'billing' ,
label : 'Billing Address' ,
align : 'left' ,
minWidth : 360 ,
} ,
{
prop : 'card' ,
label : 'Card' ,
align : 'left' ,
minWidth : 360 ,
} ,
{
prop : 'file_id' ,
label : 'PO File' ,
align : 'left' ,
minWidth : 360 ,
} ,
{
prop : 'p0_number' ,
label : 'PO Number' ,
align : 'left' ,
width : 180 ,
} , {
prop : 'created_at' ,
label : 'Order Time' ,
align : 'left' ,
width : 240
}
] ,
export _item : {
"user.email" : 'User Email' ,
"number" : 'Order Number' ,
"order_product" : "Product" ,
"shipping_attention" : "Shipping Attention" ,
"shipping_address" : "Shipping Address" ,
"shipping_city" : "Shipping City" ,
"shipping_region" : "Shipping States/Province" ,
"shipping_zip_code" : "Shipping Zip/Postal Code" ,
"shipping_country" : "Shipping Country/Region" ,
"shipping_mobile" : "Shipping Phone" ,
"not_tax_text" : "Exempt From Sales Tax" ,
"shipping_account" : "Shipping Account" ,
"shipping_courier" : "Shipping Courier" ,
"shipping_service" : "Shipping Service" ,
prop : 'mobile' ,
label : 'Mobile' ,
align : 'left' ,
width : 180
} , {
prop : 'user.country' ,
label : 'Country' ,
align : 'left' ,
width : 180
} , {
prop : 'user.shipping_address' ,
label : 'Address' ,
align : 'left' ,
width : 360
} , {
prop : 'card' ,
label : 'Card' ,
align : 'left' ,
width : 240
} , {
prop : 'created_at' ,
label : 'Created At' ,
align : 'left' ,
width : 240
} ]
"requirements" : "Special Requirements/Notes" ,
"reference_number" : "Reference Number" ,
"quote_number" : "Quote Number" ,
"estimated_shipping" : "Estimated Shipping" ,
"subtotal" : "Subtotal" ,
"tax" : "Tax" ,
"total" : "Total" ,
"billing_attention" : "Billing Attention" ,
"billing_address" : "Billing Address" ,
"billing_city" : "Billing City" ,
"billing_region" : "Billing States/Province" ,
"billing_zip_code" : "Billing Zip/Postal Code" ,
"billing_country" : "Billing Country/Region" ,
"billing_mobile" : "Billing Phone" ,
"card" : "Card" ,
'file.url' : 'PO File' ,
'p0_number' : 'PO Number' ,
'created_at' : 'Order Time'
}
}
} ,
created ( ) {
@ -194,19 +424,19 @@
this . getList ( )
} ,
exportExcel ( ) {
let _export = { }
this . table _item . map ( item => {
if ( item . prop === 'index' ) {
let _export = this . export _item
/ / t h i s . t a b l e _ i t e m . m a p ( i t e m = > {
/ / i f ( i t e m . p r o p = = = ' i n d e x ' ) {
} else {
_export [ item . prop ] = item . labe l
}
} )
/ / } e l s e {
/ / _ e x p o r t [ i t e m . p r o p ] = i t e m . l a b e l
/ / }
/ / } )
download (
'/api/admin/order/index' ,
'get' , {
export _fields : _export ,
show _relation : [ 'orderProducts.product' , 'user' ],
show _relation : [ 'orderProducts.product' , 'user' ,'file' ],
email : this . select . email ,
filter : [ {
key : 'number' ,
@ -226,7 +456,7 @@
async getList ( ) {
const res = await index ( {
... this . select ,
show _relation : [ 'orderProducts.product' , 'user' ],
show _relation : [ 'orderProducts.product' , 'user' ,'file' ],
email : this . select . email ,
filter : [ {
key : 'number' ,
@ -252,9 +482,14 @@
console . log ( error )
reject ( error )
} )
} ,
toDecode ( code ) {
this . $router . push ( { path : '/order/decode' , query : { code : code } } )
} ,
toDecode ( code ) {
this . $router . push ( {
path : '/order/decode' ,
query : {
code : code
}
} )
}
}
}