|
|
@@ -7,18 +7,12 @@
|
|
|
<template v-else-if="isLoading == 2">
|
|
|
<!-- <div class="eco-tip" v-if="orderDetail.Emission_Total_Kg && orderDetail.Emission_Total_Kg != '0'">
|
|
|
<div class="eco-tip-title">
|
|
|
- <img
|
|
|
- src="@/assets/img/esg/leaf.png"
|
|
|
- alt="eco"
|
|
|
- class="eco-tip-icon" />
|
|
|
+ <img src="@/assets/img/esg/leaf.png" alt="eco" class="eco-tip-icon" />
|
|
|
<span> Protecting Nature Starts with Your Choice</span>
|
|
|
</div>
|
|
|
<div class="eco-tip-desc">
|
|
|
- Your Eco-Friendly Purchase Generated
|
|
|
- <span class="eco-tip-co2"
|
|
|
- >{{ orderDetail.Emission_Total_Kg || 0 }} KG</span
|
|
|
- >
|
|
|
- Of Carbon Emissions. Together, We<br />
|
|
|
+ Your Eco-Friendly Purchase Generated
|
|
|
+ <span class="eco-tip-co2">{{ orderDetail.Emission_Total_Kg || 0 }} KG</span> Of Carbon Emissions. Together, We<br>
|
|
|
Embrace Enyironmental Responsibility For A More Sustainable Future.
|
|
|
</div>
|
|
|
</div> -->
|
|
|
@@ -73,26 +67,18 @@
|
|
|
</el-step>
|
|
|
<el-step
|
|
|
title="In Production"
|
|
|
- :description="
|
|
|
- formatStepDesc(orderDetail.Sampling_Factory_Confirm)
|
|
|
- "></el-step>
|
|
|
+ :description="formatStepDesc(orderDetail.Sampling_Factory_Confirm)"></el-step>
|
|
|
<el-step
|
|
|
title="QC Inspection"
|
|
|
:description="formatStepDesc(orderDetail.GZ_WH)"></el-step>
|
|
|
<el-step
|
|
|
title="International Shipment"
|
|
|
- :description="
|
|
|
- formatStepDesc(orderDetail.International_transshipment)
|
|
|
- "></el-step>
|
|
|
+ :description="formatStepDesc(orderDetail.International_transshipment)"></el-step>
|
|
|
<el-step
|
|
|
title="UK Warehouse"
|
|
|
:description="formatStepDesc(orderDetail.AU_WH)"></el-step>
|
|
|
<el-step
|
|
|
- :title="
|
|
|
- orderDetail.Order_Stage === 'Bulk Production Shipping'
|
|
|
- ? 'Domestic Delivery'
|
|
|
- : 'Shipped'
|
|
|
- "
|
|
|
+ :title="orderDetail.Order_Stage === 'Bulk Production Shipping' ? 'Domestic Delivery' : 'Shipped'"
|
|
|
:description="formatStepDesc(orderDetail.AU_WH_Client)"></el-step>
|
|
|
<el-step
|
|
|
title="Delivered"
|
|
|
@@ -107,11 +93,7 @@
|
|
|
class="steps-title pointer"
|
|
|
:class="{ 'margin-b-50': stepShow }"
|
|
|
@click="toggleStep">
|
|
|
- Sample Dispatch
|
|
|
- <i
|
|
|
- :class="
|
|
|
- stepShow ? 'el-icon-arrow-down' : 'el-icon-arrow-right'
|
|
|
- "></i>
|
|
|
+ Sample Dispatch <i :class="stepShow ? 'el-icon-arrow-down' : 'el-icon-arrow-right'"></i>
|
|
|
</p>
|
|
|
<el-steps
|
|
|
:active="comSampleState"
|
|
|
@@ -123,29 +105,21 @@
|
|
|
process-status="wait">
|
|
|
<el-step
|
|
|
title="Factory Process"
|
|
|
- :description="
|
|
|
- formatStepDesc(orderDetail.Sample_Factory_Confirmed)
|
|
|
- ">
|
|
|
+ :description="formatStepDesc(orderDetail.Sample_Factory_Confirmed)">
|
|
|
</el-step>
|
|
|
<el-step
|
|
|
title="Sample Dispatching"
|
|
|
- :description="
|
|
|
- formatStepDesc(orderDetail.Sample_Dispatching)
|
|
|
- "></el-step>
|
|
|
+ :description="formatStepDesc(orderDetail.Sample_Dispatching)"></el-step>
|
|
|
<el-step
|
|
|
title="Sample Delivered"
|
|
|
- :description="
|
|
|
- formatStepDesc(orderDetail.Sample_Delivered)
|
|
|
- "></el-step>
|
|
|
+ :description="formatStepDesc(orderDetail.Sample_Delivered)"></el-step>
|
|
|
</el-steps>
|
|
|
</div>
|
|
|
</section>
|
|
|
<section class="main-custom">
|
|
|
<p class="sharing-title">Customer information</p>
|
|
|
<div>
|
|
|
- <p class="sharing-subtitle">
|
|
|
- {{ isShow ? 'Billing' : 'Supplier' }} Address
|
|
|
- </p>
|
|
|
+ <p class="sharing-subtitle">{{ isShow ? 'Billing' : 'Supplier' }} Address</p>
|
|
|
<div class="sharing-address">
|
|
|
<p>{{ orderDetail.Account_Name_name }}</p>
|
|
|
<p>{{ orderDetail.Billing_Unit_Building_Name }}</p>
|
|
|
@@ -173,11 +147,7 @@
|
|
|
<el-table
|
|
|
:data="orderDetail.shipping_tracking"
|
|
|
style="width: 100%"
|
|
|
- :header-cell-style="{
|
|
|
- background: '#F7F8FC',
|
|
|
- color: '#101010',
|
|
|
- fontWeight: 'normal',
|
|
|
- }">
|
|
|
+ :header-cell-style="{ background: '#F7F8FC', color: '#101010', fontWeight: 'normal' }">
|
|
|
<el-table-column
|
|
|
type="expand"
|
|
|
style="padding: 0">
|
|
|
@@ -185,11 +155,7 @@
|
|
|
<el-table
|
|
|
:data="props.row.test_pkg_details"
|
|
|
style="margin-left: 50px; width: calc(100% - 50px)"
|
|
|
- :header-cell-style="{
|
|
|
- background: '#F7F8FC',
|
|
|
- color: '#101010',
|
|
|
- fontWeight: 'normal',
|
|
|
- }">
|
|
|
+ :header-cell-style="{ background: '#F7F8FC', color: '#101010', fontWeight: 'normal' }">
|
|
|
<el-table-column
|
|
|
prop="Product_name"
|
|
|
label="Item & Description"></el-table-column>
|
|
|
@@ -331,15 +297,11 @@
|
|
|
<table class="total">
|
|
|
<tr>
|
|
|
<td>Sub Total</td>
|
|
|
- <td>
|
|
|
- {{ comCurrency }} {{ transformNumber(orderDetail.Sub_Total) }}
|
|
|
- </td>
|
|
|
+ <td>{{ comCurrency }} {{ transformNumber(orderDetail.Sub_Total) }}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>Total Taxes</td>
|
|
|
- <td>
|
|
|
- {{ comCurrency }} {{ transformNumber(orderDetail.Tax_Total) }}
|
|
|
- </td>
|
|
|
+ <td>{{ comCurrency }} {{ transformNumber(orderDetail.Tax_Total) }}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>Total Discount</td>
|
|
|
@@ -347,16 +309,11 @@
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>Adjustment</td>
|
|
|
- <td>
|
|
|
- {{ comCurrency }}
|
|
|
- {{ transformNumber(orderDetail.Total_Adjustment) }}
|
|
|
- </td>
|
|
|
+ <td>{{ comCurrency }} {{ transformNumber(orderDetail.Total_Adjustment) }}</td>
|
|
|
</tr>
|
|
|
<tr>
|
|
|
<td>Grand Total</td>
|
|
|
- <td>
|
|
|
- {{ comCurrency }} {{ transformNumber(orderDetail.Grand_Total) }}
|
|
|
- </td>
|
|
|
+ <td>{{ comCurrency }} {{ transformNumber(orderDetail.Grand_Total) }}</td>
|
|
|
</tr>
|
|
|
</table>
|
|
|
</div>
|
|
|
@@ -396,8 +353,8 @@
|
|
|
|
|
|
<script>
|
|
|
import throttle from 'lodash.throttle'
|
|
|
-import { mapMutations } from 'vuex'
|
|
|
import { round } from '@/utils/price.js'
|
|
|
+import { mapMutations } from 'vuex'
|
|
|
|
|
|
export default {
|
|
|
name: 'OrderDetailPart',
|
|
|
@@ -480,8 +437,7 @@ export default {
|
|
|
methods: {
|
|
|
...mapMutations({ openDialog: 'openDialog' }),
|
|
|
judgeStepDirection: throttle(function () {
|
|
|
- this.computedStepDirection =
|
|
|
- window.document.body.clientWidth >= 1000 ? 'horizontal' : 'vertical'
|
|
|
+ this.computedStepDirection = window.document.body.clientWidth >= 1000 ? 'horizontal' : 'vertical'
|
|
|
}, 300),
|
|
|
toggleStep() {
|
|
|
this.stepShow = !this.stepShow
|
|
|
@@ -514,7 +470,7 @@ export default {
|
|
|
}
|
|
|
this.orderDetail = res.result
|
|
|
if (this.orderDetail.shipping_tracking?.length) {
|
|
|
- const isDelivered = true
|
|
|
+ let isDelivered = true
|
|
|
|
|
|
for (const items of this.orderDetail.shipping_tracking) {
|
|
|
if (items.test_pkg_details?.length) {
|
|
|
@@ -533,23 +489,19 @@ export default {
|
|
|
this.$set(items, 'showMore', true)
|
|
|
})
|
|
|
} else {
|
|
|
- this.orderDetail.sales_orders_details =
|
|
|
- this.orderDetail.sales_orders_details
|
|
|
- .filter(item => {
|
|
|
- return (
|
|
|
- item.product_Product_Code !== 'PC Setup Service' &&
|
|
|
- item.product_Product_Code !== 'PC Freight'
|
|
|
- )
|
|
|
- })
|
|
|
- .map(item => {
|
|
|
- this.$set(item, 'showMore', true)
|
|
|
- return item
|
|
|
- })
|
|
|
+ this.orderDetail.sales_orders_details = this.orderDetail.sales_orders_details
|
|
|
+ .filter(item => {
|
|
|
+ return item.product_Product_Code !== 'PC Setup Service' && item.product_Product_Code !== 'PC Freight'
|
|
|
+ })
|
|
|
+ .map(item => {
|
|
|
+ this.$set(item, 'showMore', true)
|
|
|
+ return item
|
|
|
+ })
|
|
|
}
|
|
|
}
|
|
|
this.isLoading = 2
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
+ .catch(err => {
|
|
|
this.handleBranchLogic()
|
|
|
})
|
|
|
},
|
|
|
@@ -564,6 +516,7 @@ export default {
|
|
|
this.openDialog()
|
|
|
this.loginCount = 1
|
|
|
}, 1000)
|
|
|
+ return
|
|
|
},
|
|
|
transformNumber(value) {
|
|
|
return round(Number(value)).toFixed(2)
|
|
|
@@ -592,10 +545,7 @@ export default {
|
|
|
.post('Crmdata/downloadreport', { id: item.id, name: item.name })
|
|
|
.then(res => {
|
|
|
if (res.result) {
|
|
|
- this.$utils.downloadBlob(
|
|
|
- res.result?.data,
|
|
|
- decodeURIComponent(res.result?.url_name)
|
|
|
- )
|
|
|
+ this.$utils.downloadBlob(res.result?.data, decodeURIComponent(res.result?.url_name))
|
|
|
} else {
|
|
|
this.$message.error('Download failed, please try again later')
|
|
|
}
|
|
|
@@ -626,10 +576,7 @@ export default {
|
|
|
confirmButtonClass: 'com-btnblack',
|
|
|
}
|
|
|
).then(() => {
|
|
|
- this.$router.push({
|
|
|
- path: '/so-confirm',
|
|
|
- query: { id: row.sales_orders_id, pc_psw: row.HASH },
|
|
|
- })
|
|
|
+ this.$router.push({ path: '/so-confirm', query: { id: row.sales_orders_id, pc_psw: row.HASH } })
|
|
|
})
|
|
|
},
|
|
|
},
|