You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1287 lines
48 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div
  3. class="service-content tw-mb-[60px] tw-grid tw-grid-cols-1 tw-gap-[30px] md:tw-mb-[100px] xl:tw-px-[60px] xl:tw-max-w-screen-xl xl:tw-mx-auto xl:tw-grid-cols-[auto_364px]">
  4. <mobileFixTopBar ref="stickySwiper" :fixBar="fixBar" :currStep="currStep" :list="fixBarList"></mobileFixTopBar>
  5. <section class="step sercion-1 tw-w-full md:tw-px-[30px] xl:tw-px-0 xl:tw-col-span-2">
  6. <div class="tw-mt-[20px] md:tw-mb-[11px] md:tw-mt-[40px]">
  7. <Breadcrumbs></Breadcrumbs>
  8. </div>
  9. <div v-if="content.banners.length" class="tw-w-full">
  10. <slideshow :banners="content.banners"></slideshow>
  11. </div>
  12. </section>
  13. <section class="sercion-2 tw-px-[30px] md:tw-px-[30px] xl:tw-px-0 xl:tw-col-start-1 xl:tw-row-start-2">
  14. <h1 class="t16 tw-mb-[18px] md:t24">{{ content.name }}</h1>
  15. <div v-if="content.supplier"
  16. class="supplier tw-flex tw-items-center tw-mb-[20px] tw-text-base-primary t14 md:tw-mb-[30px] md:t16 md:tw-font-normal">
  17. <img :src="content.supplier.logo" class="tw-max-w-[40px] md:tw-max-w-[80px]" />
  18. <div class="t14 tw-font-normal tw-ml-[10px] md:t18 md:tw-font-normal">
  19. {{ content.supplier.brand }}
  20. </div>
  21. </div>
  22. <div class="editor-styleguide tw-text-base-primary" v-html="content.highlights"></div>
  23. </section>
  24. <section
  25. class="sercion-3 tw-grid tw-grid-cols-1 tw-gap-[30px] md:tw-gap-[40px] md:tw-px-[30px] xl:tw-px-0 xl:tw-col-start-1 xl:tw-row-start-3">
  26. <div ref="packageOptions" id="packageOptions" class="step">
  27. <div class="tw-px-[30px] md:tw-px-0">
  28. <h2 class="title-icon-left t16 tw-mb-[20px] md:t24">
  29. {{ $t("Package Options") }}
  30. </h2>
  31. <p class="text-slate-600 t12 md:t16">{{ $t("Select the exhibition you want to attend, and add the storage and delivery service of exhibits or truck pickup service") }}</p>
  32. </div>
  33. <div class="tw-w-full tw-bg-neutrals-100 tw-px-[20px] tw-py-[30px] md:tw-p-[30px] tw-rounded-[20px]">
  34. <div class="">
  35. <div class="group tw-mb-[40px] tw-px-[20px] tw-py-[30px] tw-rounded-[20px] tw-bg-white">
  36. <h3 class="t14 tw-font-bold tw-mb-[30px] md:t16 tw-block">
  37. {{ $t("Select Exhibition") }}
  38. </h3>
  39. <selectExhibition ref="ref_selectExhibition" :selectYearList="selectYearList" :selectMonthList="selectMonthList"></selectExhibition>
  40. </div>
  41. <div class="group tw-mb-[20px] tw-p-[20px] tw-rounded-[20px] tw-bg-white">
  42. <h3 class="t14 tw-font-bold tw-mb-[20px] md:t16 tw-block">
  43. {{ $t("Select exhibition hall service") }}
  44. </h3>
  45. <div class="tw-mb-[10px]">
  46. <p class="tw-text-neutrals-500 tw-font-normal md:t16">{{ $t("Storage service of exhibits in the exhibition hall, and assistance in transportation to the designated booth") }}</p>
  47. </div>
  48. <selectExhibitionService v-for="(item,index) in selectExhibitionServiceList"
  49. :key="item.id" :ref="'ref_selectExhibitionitem'+item.id" @ChangeCosts="ChangeCosts($event)"
  50. :selectQuantityList="selectQuantityList"
  51. :selectPackageList="selectPackageList"
  52. :typeGroupList="typeGroupList"
  53. :sort="index+1"
  54. :show = "item.id == showServiceItem"
  55. @delExhibitionService="delExhibitionService(item.id)">
  56. </selectExhibitionService>
  57. <v-btn outlined class="tw-rounded-[16px] remove-upper tw-border-primary-2 tw-text-primary-1 tw-flex tw-items-center"
  58. style="padding: 24px 10px" width="100%" @click="addExhibitionService">
  59. <v-img max-width="20" class="tw-mr-[8px]" :src="require(`@/assets/svg/new.svg`)"></v-img>
  60. <span class="t18 tw-font-normal">{{ $t("New exhibit specifications") }}</span>
  61. </v-btn>
  62. </div>
  63. <div v-show="showCardItem" class="group tw-mb-[20px] tw-p-[20px] tw-rounded-[20px] tw-bg-white">
  64. <div class="tw-flex tw-justify-between tw-items-center">
  65. <h3 class="t14 tw-font-bold tw-mb-[20px] md:t16">
  66. {{ $t("Select truck pickup service") }}
  67. </h3>
  68. <v-img v-show="pickupServiceShow" max-width="18" max-height="19" class="tw-mr-[8px] tw-cursor-pointer" :src="require(`@/assets/svg/delete_default.svg`)" @click="deletePickupSerivce()"></v-img>
  69. </div>
  70. <div class="tw-mb-[20px]">
  71. <p class="tw-text-neutrals-500 tw-font-normal md:t16">{{ $t("Pick up the goods at the designated place and transport them to the exhibition hall") }}</p>
  72. </div>
  73. <div v-show="pickupServiceShow">
  74. <div>
  75. <quantitySelectGroup ref="ref_quantitySelectGroup" :label="'Select quantity'" :quantitySelectList="quantitySelectList" @ChangeCosts="ChangeCosts($event)">
  76. </quantitySelectGroup>
  77. </div>
  78. <h3 class="t14 tw-font-bold tw-mb-[20px] md:t16 tw-block">
  79. {{ $t("Fill in the picking information") }}<span class="required t12 md:t14">*</span>
  80. </h3>
  81. <pickupInformation :selectAddressList="selectAddressList" ref="ref_pickupService" @ChangeCosts="ChangeCosts($event)"></pickupInformation>
  82. </div>
  83. <v-btn v-show="pickupServiceShow==false" outlined class="tw-rounded-[16px] remove-upper tw-border-primary-2 tw-text-primary-1 t18"
  84. style="padding: 24px 10px" width="100%" @click="pickupServiceShow = true">
  85. <v-img max-width="20" class="tw-mr-[8px]" :src="require(`@/assets/svg/new.svg`)"></v-img>
  86. <span class="t18 tw-font-normal">{{ $t("New pickup service") }}</span>
  87. </v-btn>
  88. </div>
  89. <div class="md:tw-flex md:tw-justify-between md:tw-items-center">
  90. <div class="tw-flex tw-justify-between tw-items-start md:tw-w-full md:tw-basis-10/12">
  91. <div class="tw-flex tw-flex-col tw-justify-center">
  92. <div class="tw-flex tw-items-center tw-mb-[8px] md:tw-mb-0">
  93. <div class="tw-body-4 tw-text-neutrals-900 tw-mr-[10px] md:t24">
  94. ${{ finalPrice }} {{ currencyName }}
  95. </div>
  96. </div>
  97. <!-- <div class="tw-hidden tw-body-4 tw-text-neutrals-600 md:tw-hidden">
  98. Deposit fee: $5 {{ currency }} (10%)
  99. </div> -->
  100. </div>
  101. <like></like>
  102. </div>
  103. <button
  104. class="tw-transition tw-btn-md tw-text-white tw-border tw-border-solid tw-border-primary-default tw-bg-primary-default tw-py-[8.5px] tw-mt-[20px] tw-w-full tw-rounded-xl md:tw-mt-0 md:tw-ml-[36px] md:tw-w-auto md:tw-basis-2/12 disabled:tw-bg-neutral-100 disabled:tw-text-base-disable disabled:tw-border-neutral-200"
  105. @click="bookNow" :disabled="btnDisabled">
  106. {{ $t("Book Now") }}
  107. </button>
  108. </div>
  109. </div>
  110. </div>
  111. </div>
  112. <div id="serviceDetails" class="serviceDetails step">
  113. <div class="tw-px-[30px] md:tw-px-0">
  114. <h2 class="title-icon-left t16 tw-mb-[20px] md:t20 xl:tw-font-bold">
  115. {{ $t("Service Details") }}
  116. </h2>
  117. <div v-if="content.details.length < 800">
  118. <div ref="details" class="editor-styleguide tw-text-base-primary t14 md:t16 md:tw-font-normal"
  119. v-html="content.details"></div>
  120. </div>
  121. <div v-else>
  122. <div :class="[
  123. button.details ? 'seeMore-hide' : 'seeMore-show',
  124. 'editor-styleguide tw-text-base-primary tw-transition t14 md:t16 md:tw-font-normal',
  125. ]" ref="details" v-html="content.details"></div>
  126. <button v-show="seeMore.details" :class="[
  127. 'seeMore tw-transition tw-btn-md tw-text-primary-1 tw-border tw-border-solid tw-border-primary-1 tw-px-[30px] tw-py-[8.5px] tw-mt-[20px] tw-w-full tw-rounded-xl hover:tw-bg-primary-3 xl:hover:tw-bg-transparent xl:tw-border-none',
  128. button.details ? '' : 'open',
  129. ]" @click="opendetail()">
  130. {{ $t(seeMoreDetailsText) }}
  131. </button>
  132. </div>
  133. </div>
  134. </div>
  135. <div id="serviceDescription" class="serviceDescription step">
  136. <div class="tw-px-[30px] md:tw-px-0">
  137. <h2 class="title-icon-left t16 tw-mb-[20px] md:t20 xl:tw-font-bold">
  138. {{ $t("Service Description") }}
  139. </h2>
  140. <div v-for="(item,index) in expenseRules" :key="index">
  141. <h3 class="t16 tw-mb-[20px] md:18 xl:t18 xl:tw-font-bold tw-pl-[10px]">
  142. {{ index+1 }}.&nbsp;{{ item.ItemName }}
  143. </h3>
  144. <table class="tablecss" width="100%" v-if="item.ItemType=='01'">
  145. <thead class="tw-bg-[#343434]">
  146. <tr>
  147. <th class="tw-text-[#fefefe]">{{$t('Weight')}}</th>
  148. <th class="tw-text-[#fefefe]">{{$t('Price (NT $, tax included)')}}</th>
  149. </tr>
  150. </thead>
  151. <tbody>
  152. <template v-if="item.StackerCostRules && item.StackerCostRules.length>0">
  153. <tr v-for="item2 in item.StackerCostRules" :key="item2.Guid">
  154. <td width="50%">{{item2.Weight_Min}}{{$t('More than tons to')}}{{item2.Weight_Max}}{{$t('Less than tons')}}</td>
  155. <td width="50%">{{item2.Price}}<span v-if="item2.PricingMode=='N'">{{$t('NTD/piece')}}</span><span v-else>{{$t('NTD/ton')}}</span></td>
  156. </tr>
  157. </template>
  158. </tbody>
  159. </table>
  160. <div ref="details" v-if="item.ItemType!='01' && item.ItemType!='02'" class="editor-styleguide tw-text-base-primary t14 md:t16 md:tw-font-normal tw-mt-[20px]"
  161. v-html="item.CostRuleText"></div>
  162. <div ref="details" class="editor-styleguide tw-text-base-primary t14 md:t16 md:tw-font-normal tw-mt-[20px]"
  163. v-html="item.ExpensesMemo"></div>
  164. </div>
  165. <!-- <div v-if="content.details.length < 800">
  166. <div ref="details" class="editor-styleguide tw-text-base-primary t14 md:t16 md:tw-font-normal"
  167. v-html="content.details"></div>
  168. </div>
  169. <div v-else>
  170. <div :class="[
  171. button.details ? 'seeMore-hide' : 'seeMore-show',
  172. 'editor-styleguide tw-text-base-primary tw-transition t14 md:t16 md:tw-font-normal',
  173. ]" ref="details" v-html="content.details"></div>
  174. <button v-show="seeMore.details" :class="[
  175. 'seeMore tw-transition tw-btn-md tw-text-primary-1 tw-border tw-border-solid tw-border-primary-1 tw-px-[30px] tw-py-[8.5px] tw-mt-[20px] tw-w-full tw-rounded-xl hover:tw-bg-primary-3 xl:hover:tw-bg-transparent xl:tw-border-none',
  176. button.details ? '' : 'open',
  177. ]" @click="opendetail()">
  178. {{ $t(seeMoreDetailsText) }}
  179. </button>
  180. </div> -->
  181. </div>
  182. </div>
  183. <div id="cancellationPolicy" class="cancellationPolicy step tw-px-[30px] md:tw-px-0">
  184. <h2 class="title-icon-left t16 tw-mb-[20px] md:t20 xl:tw-font-bold">
  185. {{ $t("Cancellation Policy") }}
  186. </h2>
  187. <div v-if="content.cancellation_policy.length < 800">
  188. <div ref="cancellation_policy" class="editor-styleguide tw-text-base-primary t14 md:t16 md:tw-font-normal"
  189. v-html="content.cancellation_policy">
  190. </div>
  191. </div>
  192. <div v-else>
  193. <div :class="[
  194. button.cancellation_policy ? 'seeMore-hide' : 'seeMore-show',
  195. 'editor-styleguide tw-text-base-primary tw-transition t14 md:t16 md:tw-font-normal',
  196. ]" ref="cancellation_policy" v-html="content.cancellation_policy"></div>
  197. <button v-show="seeMore.cancellation_policy" :class="[
  198. 'seeMore tw-transition tw-btn-md tw-text-primary-1 tw-border tw-border-solid tw-border-primary-1 tw-px-[30px] tw-py-[8.5px] tw-mt-[20px] tw-w-full tw-rounded-xl hover:tw-bg-primary-3 xl:hover:tw-bg-transparent xl:tw-border-none',
  199. button.cancellation_policy ? '' : 'open',
  200. ]" @click="openCancellationPolicy()">
  201. {{ $t(seeMoreCancellationPolicyText) }}
  202. </button>
  203. </div>
  204. </div>
  205. <div v-show="content.faq && content.faq.length>0" id="faq" ref="faq" class="step tw-px-[30px] md:tw-px-0">
  206. <h2 class="title-icon-left t16 tw-mb-[20px] md:t20 xl:tw-font-bold">
  207. {{ $t("FAQ") }}
  208. </h2>
  209. <faq :faq="content.faq" class="tw-z-[8]"></faq>
  210. </div>
  211. <div id="contactUs" class="step tw-px-[30px] md:tw-px-0">
  212. <h2 class="title-icon-left t16 tw-mb-[20px] md:t20 xl:tw-font-bold">
  213. {{ $t("Contact Us") }}
  214. </h2>
  215. <div class="tw-body-3 tw-text-base-primary tw-mb-[20px]">
  216. 886-2-2725-5000
  217. </div>
  218. <div class="tw-body-3 tw-text-base-primary">info@showeasy.com</div>
  219. </div>
  220. <div :class="[
  221. 'tw-bg-white tw-flex tw-flex-cols tw-justify-between tw-items-center tw-px-[30px] tw-py-[16px] tw-w-full',
  222. fixBar
  223. ? 'tw-fixed tw-left-[0px] tw-bottom-[0px] tw-z-[8] tw-shadow-[1px_0px_2px_rgba(0,0,0,0.25)]'
  224. : 'tw-hidden',
  225. ]">
  226. <div :class="[
  227. 'tw-flex tw-flex-col tw-justify-between tw-items-start tw-grow md:tw-w-full md:tw-flex-row md:tw-items-center',
  228. ]">
  229. <div class="tw-flex tw-items-center tw-mb-[12px] md:tw-mb-0">
  230. <div class="t16 tw-text-neutrals-900 tw-mr-[10px] md:t20 md:tw-mr-0">
  231. ${{ finalPrice }} {{ currencyName }}
  232. </div>
  233. </div>
  234. <div class="tw-flex tw-justify-center tw-items-center tw-w-full md:tw-w-fit">
  235. <like></like>
  236. <button
  237. class="tw-transition tw-whitespace-nowrap tw-body-4 tw-text-white tw-border tw-border-solid tw-border-primary-default tw-bg-primary-default tw-ml-[22px] tw-px-[24px] tw-py-[8.5px] tw-rounded-xl tw-w-full md:tw-body-2 md:tw-min-w-[130px] md:tw-max-w-[130px] md:tw-mt-0 disabled:tw-bg-neutral-100 disabled:tw-text-base-disable disabled:tw-border-neutral-200"
  238. @click="bookNow" :disabled="btnDisabled">
  239. {{ $t("Book Now") }}
  240. </button>
  241. </div>
  242. </div>
  243. </div>
  244. </section>
  245. <section
  246. class="sercion-4 tw-px-[30px] tw-grid tw-grid-cols-1 tw-gap-[40px] tw-z-[8] md:tw-px-[30px] xl:tw-px-0 xl:tw-col-start-1 xl:tw-row-start-4">
  247. <detailsModal :detail="content.details"></detailsModal>
  248. <cancellationPolicyModal :cancellationPolicy="content.cancellation_policy"></cancellationPolicyModal>
  249. </section>
  250. <section class="sercion-5 tw-hidden md:tw-px-[30px] xl:tw-px-0 xl:tw-block xl:tw-row-start-2 xl:tw-row-end-5">
  251. <div class="tw-mb-[40px]">
  252. <sidebarSelectOption :totalPrice="finalPrice" :currency="currencyName" :confirmationTime="content.confirmationTime">
  253. </sidebarSelectOption>
  254. </div>
  255. <sideBarMenu :fixBarList="fixBarList" :currStep="currStep"></sideBarMenu>
  256. </section>
  257. <v-dialog v-model="dialog" :width="423"
  258. @click:outside="colseDialog()">
  259. <v-card class="tw-p-[30px]">
  260. <v-spacer class="d-flex tw-justify-between align-center tw-mb-[30px]">
  261. <div class="tw-text-[20px] tw-text-black tw-font-bold">
  262. {{ $t("Remind") }}
  263. </div>
  264. <v-btn @click="colseDialog()" icon>
  265. <v-icon> mdi-close </v-icon>
  266. </v-btn>
  267. </v-spacer>
  268. <v-spacer class="tw-mb-[40px]">
  269. <div class="tw-text-[16px] tw-text-neutrals-800">
  270. {{$t("Your goods are of special size. Please contact ShowEasy service personnel (02) 2725-5000")}}
  271. </div>
  272. </v-spacer>
  273. <div class="tw-text-[18px] tw-rounded-[16px] tw-text-center">
  274. <span class="tw-text-primary-1 t18">{{countdown}}</span>s{{ $t("userProfile.unLinkOK") }}
  275. </div>
  276. </v-card>
  277. </v-dialog>
  278. <loading :isLoading="isLoading"></loading>
  279. </div>
  280. </template>
  281. <script>
  282. import Breadcrumbs from "@/components/Breadcrumbs";
  283. import slideshow from "@/components/swiper/serviceContent.vue";
  284. import detailsModal from "@/components/service/contentModal/DetailsModal.vue";
  285. import cancellationPolicyModal from "@/components/service/contentModal/cancellationPolicyModal.vue";
  286. import selectExhibition from "@/components/service/content/selectExhibition.vue";
  287. import selectExhibitionService from "@/components/service/content/selectExhibitionService.vue";
  288. import quantitySelectGroup from "@/components/service/content/quantitySelectGroup.vue";
  289. import pickupInformation from "@/components/service/content/pickupInformation.vue";
  290. import faq from "@/components/service/content/faq.vue";
  291. import sidebarSelectOption from "@/components/service/content/sidebarSelectOption.vue";
  292. import sideBarMenu from "@/components/service/content/sideBarMenu.vue";
  293. import Swiper from "swiper/bundle";
  294. import { scrollama } from "scrollama";
  295. import mobileFixTopBar from "@/components/swiper/mobileFixTopBar.vue";
  296. import like from "@/components/newComponent/like/like.vue";
  297. import { filterData,dateIsInWeekend } from "~/utils/common";
  298. import loading from "@/components/newComponent/loading/loading.vue";
  299. export default {
  300. name: 'ServiceContent',
  301. layout: "login",
  302. auth: false,
  303. components: {
  304. Swiper,
  305. scrollama,
  306. Breadcrumbs,
  307. slideshow,
  308. detailsModal,
  309. cancellationPolicyModal,
  310. selectExhibition,
  311. selectExhibitionService,
  312. quantitySelectGroup,
  313. pickupInformation,
  314. faq,
  315. sidebarSelectOption,
  316. sideBarMenu,
  317. mobileFixTopBar,
  318. like,
  319. loading,
  320. },
  321. data() {
  322. return {
  323. dialog: false,
  324. isLoading: false,
  325. showCardItem: false,
  326. pickupServiceShow: false,
  327. apiUrl: process.env.SERVICE_CONSOLE,
  328. btnDisabled: process.env.ENV == 'production',
  329. currStep: null,
  330. stickySwiper: null,
  331. content: {
  332. banners: [],
  333. country: null,
  334. city: null,
  335. name: "",
  336. highlights: '',
  337. details: '',
  338. cancellation_policy: "",
  339. saved: false,
  340. confirmation_time: 24,
  341. supplier: {
  342. logo: require('/assets/img/Footer.png'),
  343. brand: 'ShowEasy'
  344. },
  345. available_sections: null,
  346. timeStatus: 'active',
  347. dateStatus: 'active',
  348. times: [{
  349. start_time: '2023-02-06',
  350. end_time: '2023-03-06',
  351. },{
  352. start_time: '2023-02-06',
  353. end_time: '2023-03-06',
  354. },{
  355. start_time: '2023-02-06',
  356. end_time: '2023-03-06',
  357. }],
  358. start: '2023-02-06',
  359. end: '2023-06-06',
  360. faq: [],
  361. confirmationTime: '',
  362. additionalServices: [
  363. {
  364. name: '司機英文服務'
  365. },{
  366. name: '兒童安全座椅'
  367. },{
  368. name: '增加一個停靠點'
  369. },{
  370. name: '協助飯店入住(每個人,限接機)'
  371. }
  372. ],
  373. },
  374. list: [],
  375. choicesIndex: 0,
  376. countrycode: [],
  377. regionName: [],
  378. elementHeight: {
  379. details: null,
  380. cancellation_policy: null,
  381. faq: null,
  382. },
  383. seeMore: {
  384. details: true,
  385. cancellation_policy: true,
  386. },
  387. button: {
  388. details: true,
  389. cancellation_policy: true,
  390. },
  391. offset: {
  392. packageOptions: 0,
  393. faq: 0,
  394. },
  395. contentId: "",
  396. packageId: "",
  397. packageName: "",
  398. window: {
  399. width: 0,
  400. },
  401. fixBar: false,
  402. fixBarList: [
  403. { id: "packageOptions", title: "Package Options", show: true },
  404. { id: "serviceDetails", title: "Service Details", show: true },
  405. { id: "serviceDescription", title: "Service Description", show: true },
  406. { id: "cancellationPolicy", title: "Cancellation Policy", show: true },
  407. { id: "faq", title: "FAQ", show: false },
  408. { id: "contactUs", title: "Contact Us", show: true },
  409. ],
  410. activePackage: 0,
  411. totalPrice: 0,
  412. additionTotalPrice: [],
  413. customPlanPrice: [],
  414. selectDates: '',
  415. typeGroupList: [],
  416. selectQuantityList: [],
  417. selectYearList: [],
  418. selectMonthList: [],
  419. selectAddressList: [],
  420. selectExhibitionServiceList: [{id: 0,show: true}],
  421. selectPackageList: [],
  422. quantitySelectList: [],
  423. deliveryType: '',
  424. expenseRules: [],
  425. finalPrice: "0",
  426. showServiceItem: 0,
  427. currencyName: '',
  428. currencyID: '',
  429. previewFile: '',
  430. countdown: 15,
  431. rulesShow: false,
  432. };
  433. },
  434. async created() {
  435. this.isLoading = true;
  436. let arr = [];
  437. for(let i=1;i<11;i++){
  438. let target = {
  439. id: i+"",
  440. name: i+"",
  441. };
  442. arr.push(target);
  443. }
  444. this.selectQuantityList = arr;
  445. await this.getBanners();
  446. await this.getServiceData();
  447. await this.getExtensionYear();
  448. await this.getExtensionMonth();
  449. // await this.getExhibitions();
  450. await this.getQuantitySelects();
  451. await this.getServiceItems();
  452. await this.getReceivingCitys();
  453. // await this.getFaq();
  454. await this.getPackages();
  455. await this.getInfoItem();
  456. // await this.addViewCount();
  457. // await this.getYouMightLikeData();
  458. // await this.getRegionName();
  459. // await this.getCountryCode();
  460. if (process.browser) {
  461. window.addEventListener("resize", this.handleResize);
  462. }
  463. this.handleResize();
  464. this.$nextTick(()=>{
  465. this.isLoading = false;
  466. });
  467. },
  468. mounted() {
  469. let vm = this;
  470. vm.contentId = vm.$route.params.id;
  471. vm.offset.packageOptions = vm.$refs.packageOptions.offsetTop;
  472. vm.offset.faq = vm.$refs.faq.offsetTop;
  473. vm.$nextTick(function () {
  474. // instantiate the scrollama
  475. const scrollama = require("scrollama");
  476. const scroller = scrollama();
  477. // setup the instance, pass callback functions
  478. scroller
  479. .setup({
  480. step: ".service-content .step",
  481. offset: 0.6,
  482. })
  483. .onStepEnter((response) => {
  484. // { element, index, direction }
  485. vm.currStep = response.element.id;
  486. let fb_messenger = document.querySelector(".fb_dialog_content");
  487. if (response.index > 3) {
  488. vm.$refs.stickySwiper.slideTo(4);
  489. } else {
  490. vm.$refs.stickySwiper.slideTo(0);
  491. }
  492. if (response.index >= 1 && response.index < 6) {
  493. vm.fixBar = true;
  494. if (fb_messenger) {
  495. fb_messenger.classList.add("hasBar");
  496. }
  497. } else {
  498. vm.fixBar = false;
  499. if (fb_messenger) {
  500. fb_messenger.classList.remove("hasBar");
  501. }
  502. }
  503. })
  504. .onStepExit((response) => {
  505. // { element, index, direction }
  506. vm.currStep = response.element.id;
  507. let fb_messenger = document.querySelector(".fb_dialog_content");
  508. if (response.index >= 1 && response.index < 6) {
  509. vm.fixBar = true;
  510. if (fb_messenger) {
  511. fb_messenger.classList.add("hasBar");
  512. }
  513. } else {
  514. vm.fixBar = false;
  515. if (fb_messenger) {
  516. fb_messenger.classList.remove("hasBar");
  517. }
  518. }
  519. });
  520. })
  521. },
  522. computed: {
  523. currency() {
  524. return this.$store.getters.getCurrency;
  525. },
  526. seeMoreDetailsText() {
  527. if (this.button.details == false) {
  528. return "See less";
  529. } else {
  530. return "See more";
  531. }
  532. },
  533. seeMoreCancellationPolicyText() {
  534. if (this.button.cancellation_policy == false) {
  535. return "See less";
  536. } else {
  537. return "See more";
  538. }
  539. },
  540. // finalPrice() {
  541. // let option = 0;
  542. // let custom = 0;
  543. // let addition = 0;
  544. // if (this.additionTotalPrice) {
  545. // this.additionTotalPrice.forEach((item) => {
  546. // addition += Number(item.total);
  547. // });
  548. // }
  549. // if (this.customPlanPrice) {
  550. // this.customPlanPrice.forEach((item) => {
  551. // custom += Number(item.total);
  552. // });
  553. // }
  554. // if (this.totalPrice) {
  555. // this.totalPrice.forEach((item) => {
  556. // option += Number(item.total);
  557. // });
  558. // }
  559. // if (this.currency == 'USD') {
  560. // return Number(addition + custom + option).toFixed(2).toLocaleString();
  561. // } else {
  562. // return Number(addition + custom + option).toLocaleString();
  563. // }
  564. // },
  565. },
  566. watch: {
  567. currency: {
  568. handler: function () {
  569. this.getServiceData();
  570. // this.getPackages();
  571. },
  572. },
  573. // activePackage: {
  574. // handler: function (newVal, oldVal) {
  575. // if (newVal !== oldVal) {
  576. // this.customPlanPrice = [];
  577. // this.totalPrice = [];
  578. // }
  579. // },
  580. // },
  581. // choicesIndex: {
  582. // handler: function (newVal, oldVal) {
  583. // if (newVal !== oldVal) {
  584. // this.customPlanPrice = [];
  585. // this.totalPrice = [];
  586. // }
  587. // },
  588. // }
  589. },
  590. destroyed() {
  591. if (process.browser) {
  592. window.removeEventListener("resize", this.handleResize);
  593. }
  594. },
  595. methods: {
  596. async getBanners() {
  597. await this.$axios.get(`/trending/api/Onsite/BannerFiles?Lang=${this.$i18n.localeProperties["langQuery"]}&ServiceID=${this.$route.params.id}`)
  598. .then((response) => {
  599. if(response && response.data && response.data.DATA && response.data.DATA.rel){
  600. let data = response.data.DATA.rel
  601. if(data.length>0){
  602. this.content.banners = data.map((item) => {
  603. return {
  604. banner_id: item.FileID,
  605. image: item.FilePath,
  606. };
  607. });
  608. }
  609. }
  610. })
  611. .catch((error) => console.log(error));
  612. },
  613. async getExtensionYear() {
  614. await this.$axios.get(`/trending/api/Onsite/ExtensionYear?Lang=${this.$i18n.localeProperties["langQuery"]}&ServiceID=${this.$route.params.id}`)
  615. .then((response) => {
  616. if(response && response.data && response.data.DATA && response.data.DATA.rel){
  617. let data = response.data.DATA.rel
  618. if(data.length>0){
  619. this.selectYearList = data.map((item) => {
  620. return {
  621. id: item.ArgumentID,
  622. name: item.ArgumentValue,
  623. };
  624. });
  625. }
  626. }
  627. })
  628. .catch((error) => console.log(error));
  629. },
  630. async getExtensionMonth() {
  631. await this.$axios.get(`/trending/api/Onsite/ExtensionMonth?Lang=${this.$i18n.localeProperties["langQuery"]}`)
  632. .then((response) => {
  633. if(response && response.data && response.data.DATA && response.data.DATA.rel){
  634. let data = response.data.DATA.rel
  635. if(data.length>0){
  636. this.selectMonthList = data.map((item) => {
  637. return {
  638. id: item.ArgumentID,
  639. name: item.ArgumentValue,
  640. };
  641. });
  642. }
  643. }
  644. })
  645. .catch((error) => console.log(error));
  646. },
  647. async getServiceItems() {
  648. this.showCardItem = false;
  649. await this.$axios
  650. .get(`trending/api/Onsite/ServiceItems?Lang=${this.$i18n.localeProperties["langQuery"]}&ServiceID=${this.$route.params.id}`)
  651. .then((response) => {
  652. if(response && response.data && response.data.DATA && response.data.DATA.rel){
  653. let data = response.data.DATA.rel
  654. if(data.length>0){
  655. this.typeGroupList = data.map((item) => {
  656. if(item.ItemType=="02"){
  657. this.showCardItem = true;
  658. }
  659. return {
  660. package_id: item.ArgumentID,
  661. name: item.ArgumentValue,
  662. itemType: item.ItemType
  663. };
  664. });
  665. }
  666. }
  667. })
  668. .catch((error) => console.log(error));
  669. },
  670. // async getFaq() {
  671. // await this.$axios
  672. // .get(
  673. // `${this.apiUrl}/user-services/faqs?service_id=${this.$route.params.id}&lang_code=${this.$i18n.localeProperties["langQuery"]}`
  674. // )
  675. // .then((res) => {
  676. // this.content.faq = res.data;
  677. // })
  678. // .catch((error) => console.log(error));
  679. // },
  680. async getPackages() {
  681. await this.$axios
  682. .get(`trending/api/Onsite/PackingTypes?Lang=${this.$i18n.localeProperties["langQuery"]}`)
  683. .then((response) => {
  684. if(response && response.data && response.data.DATA && response.data.DATA.rel){
  685. let data = response.data.DATA.rel
  686. if(data.length>0){
  687. this.selectPackageList = data.map((item) => {
  688. return {
  689. id: item.ArgumentID,
  690. name: item.ArgumentValue,
  691. };
  692. });
  693. }
  694. }
  695. })
  696. .catch((error) => console.log(error));
  697. },
  698. async getQuantitySelects() {
  699. await this.$axios
  700. .get(`trending/api/Onsite/TruckTypes?Lang=${this.$i18n.localeProperties["langQuery"]}`)
  701. .then((response) => {
  702. if(response && response.data && response.data.DATA && response.data.DATA.rel){
  703. let data = response.data.DATA.rel
  704. if(data.length>0){
  705. this.quantitySelectList = data;
  706. }
  707. }
  708. })
  709. .catch((error) => console.log(error));
  710. },
  711. async getReceivingCitys() {
  712. await this.$axios
  713. .get(`trending/api/Onsite/ReceivingCitys?Lang=${this.$i18n.localeProperties["langQuery"]}`)
  714. .then((response) => {
  715. if(response && response.data && response.data.DATA && response.data.DATA.rel){
  716. let data = response.data.DATA.rel
  717. if(data.length>0){
  718. this.selectAddressList = data.map((item) => {
  719. return {
  720. id: item.ArgumentID,
  721. name: item.ArgumentValue,
  722. };
  723. });
  724. }
  725. }
  726. })
  727. .catch((error) => console.log(error));
  728. },
  729. async getServiceData() {
  730. await this.$axios
  731. .get(`/trending/api/Onsite/Info?Lang=${this.$i18n.localeProperties["langQuery"]}&ServiceID=${this.$route.params.id}`)
  732. .then((response) => {
  733. if(response && response.data && response.data.DATA && response.data.DATA.rel){
  734. let data = response.data.DATA.rel
  735. if(data){
  736. this.content.name = data.ServiceName;
  737. this.content.highlights = data.Features;
  738. this.content.details = data.Details;
  739. this.content.cancellation_policy = data.CancelPolicy;
  740. this.content.faq = data.FQAs;
  741. this.currencyName = data.CurrencyName;
  742. this.currencyID = data.CurrencyID;
  743. this.previewFile = data.PreviewFile;
  744. this.finalPrice = data.MinPrice == null ? "0" : data.MinPrice +"";
  745. this.content.supplier.brand = data.SupplierName;
  746. this.content.supplier.logo = data.SupplierLogo;
  747. for(let i=0;i<this.fixBarList.length;i++){
  748. if(this.fixBarList[i].id=="faq"){
  749. if(data.FQAs && data.FQAs.length>0){
  750. this.fixBarList.show = true;
  751. }else{
  752. this.fixBarList.show = false;
  753. }
  754. break;
  755. }
  756. }
  757. this.content.confirmationTime = data.ConfirmDays;
  758. }
  759. }
  760. // this.content.country = res.data.country;
  761. // this.content.city = res.data.city;
  762. // this.content.highlights = res.data.highlights;
  763. // this.content.details = res.data.details;
  764. // this.content.cancellation_policy = res.data.cancellation_policy;
  765. // this.content.supplier = res.data.supplier;
  766. // this.content.available_sections = res.data.available_sections;
  767. // this.content.times = res.data.available_sections.times;
  768. // this.content.timeStatus = res.data.available_sections.time_status;
  769. // this.content.dateStatus = res.data.available_sections.date_status;
  770. // this.content.start = res.data.available_sections.start;
  771. // this.content.end = res.data.available_sections.end;
  772. // this.content.payment_currency = res.data.payment_currency;
  773. // this.content.confirmationTime = res.data.confirmation_time.toString();
  774. })
  775. .catch((error) => console.log(error));
  776. },
  777. async getInfoItem() {
  778. await this.$axios
  779. .get(`/trending/api/Onsite/InfoItem?Lang=${this.$i18n.localeProperties["langQuery"]}&ServiceID=${this.$route.params.id}`)
  780. .then((response) => {
  781. if(response && response.data && response.data.DATA && response.data.DATA.rel){
  782. let data = response.data.DATA.rel
  783. if(data.length>0){
  784. this.expenseRules = data;
  785. }
  786. }
  787. })
  788. .catch((error) => console.log(error));
  789. },
  790. async addViewCount() {
  791. let Obj = {
  792. service_id: `${this.$route.params.id}`,
  793. lang_code: `${this.$i18n.localeProperties["langQuery"]}`,
  794. add_number: 1,
  795. };
  796. await this.$axios
  797. .put(`${this.apiUrl}/user-services/view-counts`, Obj)
  798. .then((res) => { })
  799. .catch((error) => console.log(error));
  800. },
  801. opendetail() {
  802. if (this.window.width >= 1366) {
  803. this.button.details = !this.button.details;
  804. } else {
  805. this.$modal.show("Details");
  806. }
  807. },
  808. openCancellationPolicy() {
  809. if (this.window.width >= 1366) {
  810. this.button.cancellation_policy = !this.button.cancellation_policy;
  811. } else {
  812. this.$modal.show("cancellationPolicy");
  813. }
  814. },
  815. handleResize() {
  816. if (process.browser) {
  817. this.window.width = window.innerWidth;
  818. }
  819. },
  820. bookNow() {
  821. let validators = this.$refs.ref_selectExhibition.validators();
  822. if(validators==false){
  823. return false;
  824. }
  825. if(this.selectExhibitionServiceList.length>0){
  826. for(let i=0;i<this.selectExhibitionServiceList.length;i++){
  827. let ref = eval("this.$refs.ref_selectExhibitionitem"+this.selectExhibitionServiceList[i].id)[0];
  828. if(ref !=undefined){
  829. validators = ref.validators();
  830. if(validators==false){
  831. ref.show = true;
  832. return false;
  833. }
  834. }
  835. }
  836. }
  837. let selectExhibitionData = this.$refs.ref_selectExhibition.formData;
  838. let selectExhibitionServiceData = [];
  839. if(this.selectExhibitionServiceList.length>0){
  840. for(let i=0;i<this.selectExhibitionServiceList.length;i++){
  841. let ref = eval("this.$refs.ref_selectExhibitionitem"+this.selectExhibitionServiceList[i].id)[0];
  842. if(ref !=undefined){
  843. let target = ref.formData;
  844. selectExhibitionServiceData.push(target);
  845. }
  846. }
  847. }
  848. let quantityData = this.$refs.ref_quantitySelectGroup.formData;
  849. if(quantityData.selectList.length>0){
  850. if(this.showCardItem){
  851. validators = this.$refs.ref_quantitySelectGroup.validators();
  852. if(validators==false){
  853. this.pickupServiceShow = true;
  854. return false;
  855. }
  856. validators = this.$refs.ref_pickupService.validators();
  857. if(validators==false){
  858. this.pickupServiceShow = true;
  859. return false;
  860. }
  861. }
  862. }
  863. // let pickupServiceData = this.$refs.ref_pickupService.formData;
  864. if(this.rulesShow){
  865. this.ChangeCosts(null);
  866. return false;
  867. }
  868. this.$router.push(
  869. {
  870. path: this.localePath("/service/checkout/" + this.$route.params.id),
  871. //携带需要传递的参数
  872. query: {
  873. selectExhibitionData: encodeURIComponent(JSON.stringify(selectExhibitionData)),
  874. selectExhibitionServiceData: encodeURIComponent(JSON.stringify(selectExhibitionServiceData)),
  875. quantityData: encodeURIComponent(JSON.stringify(quantityData)),
  876. // pickupServiceData: encodeURIComponent(JSON.stringify(pickupServiceData)),
  877. totalPrice: this.totalPrice,
  878. currencyName: encodeURIComponent(this.currencyName),
  879. previewFile: encodeURIComponent(this.previewFile),
  880. title: encodeURIComponent(this.content.name)
  881. }
  882. });
  883. },
  884. // choicesIdx(data) {
  885. // let vm = this;
  886. // vm.choicesIndex = data;
  887. // },
  888. addExhibitionService(){
  889. const arr = this.selectExhibitionServiceList.map(({id})=> id);
  890. let max = arr.length>0 ? Math.max.apply(null, arr) : 0;
  891. this.selectExhibitionServiceList.push({id: max+1,show:true});
  892. this.showServiceItem = max+1;
  893. },
  894. delExhibitionService(value){
  895. if(this.selectExhibitionServiceList.length>0){
  896. for(let i=0;i<this.selectExhibitionServiceList.length;i++){
  897. if(value == this.selectExhibitionServiceList[i].id){
  898. // let index = this.selectExhibitionServiceList.indexOf(this.selectExhibitionServiceList[i]);
  899. this.selectExhibitionServiceList.splice(i, 1);
  900. break;
  901. }
  902. }
  903. }
  904. this.ChangeCosts(null);
  905. },
  906. deletePickupSerivce(){
  907. this.pickupServiceShow = false;
  908. if(this.$refs.ref_quantitySelectGroup){
  909. this.$refs.ref_quantitySelectGroup.clearAll();
  910. }
  911. },
  912. ChangeCosts(data){
  913. let totalPrice = 0;
  914. this.totalPrice = 0;
  915. this.rulesShow = false;
  916. // let selectExhibitionData = this.$refs.ref_selectExhibition.formData;
  917. let selectExhibitionServiceData = [];
  918. if(this.selectExhibitionServiceList.length>0){
  919. for(let i=0;i<this.selectExhibitionServiceList.length;i++){
  920. let ref = eval("this.$refs.ref_selectExhibitionitem"+this.selectExhibitionServiceList[i].id)[0];
  921. if(ref !=undefined){
  922. let target = ref.formData;
  923. selectExhibitionServiceData.push(target);
  924. }
  925. }
  926. }
  927. if(selectExhibitionServiceData.length>0){
  928. for(let i=0;i<selectExhibitionServiceData.length;i++){
  929. let arr = selectExhibitionServiceData[i].selectServiceItems;
  930. if(arr.length>0){
  931. for(let j=0;j<arr.length;j++){
  932. if(arr[j].itemType == "01"){
  933. totalPrice += this.stackerCostRules(selectExhibitionServiceData[i],arr[j]);
  934. if(totalPrice==-1){
  935. this.totalPrice = 0;
  936. this.finalPrice = "0";
  937. this.rulesShow = true;
  938. return false;
  939. }
  940. }else if(arr[j].itemType == "02"){
  941. }else if(arr[j].itemType == "03" || arr[j].itemType == "04" || arr[j].itemType == "05" || arr[j].itemType == "06"){
  942. totalPrice += this.OtherCostRules(selectExhibitionServiceData[i],arr[j]);
  943. if(totalPrice==-1){
  944. this.totalPrice = 0;
  945. this.finalPrice = "0";
  946. this.rulesShow = true;
  947. return false;
  948. }
  949. }
  950. }
  951. }
  952. }
  953. }
  954. let quantityData = this.$refs.ref_quantitySelectGroup.formData;
  955. if(quantityData.selectList.length>0){
  956. totalPrice += this.TruckCostRules();
  957. }
  958. this.totalPrice = Math.ceil(totalPrice);
  959. this.finalPrice = Math.ceil(Number(totalPrice)).toLocaleString();
  960. },
  961. // 堆高機
  962. stackerCostRules(data1,data2){
  963. let price = 0;
  964. let tmpWeight = 0;//Number(data1.weight)/1000;
  965. // 材積重 長x寬x高/6000 得到噸
  966. if((data1.length =="" && data1.width=="" && data1.height=="") && data1.weight!=""){
  967. tmpWeight = Number(data1.weight)/1000;
  968. }else if((data1.length !="" && data1.width!="" && data1.height!="") && data1.weight==""){
  969. tmpWeight = Number(data1.length)*Number(data1.width)*Number(data1.height)/6000/1000;
  970. }else if(data1.length !="" && data1.width!="" && data1.height!="" && data1.weight!=""){
  971. let volumeWeight = Number(data1.length)*Number(data1.width)*Number(data1.height)/6000/1000;
  972. // 比較誰大
  973. if(volumeWeight>Number(data1.weight)/1000){
  974. tmpWeight = volumeWeight;
  975. }else{
  976. tmpWeight = Number(data1.weight)/1000;
  977. }
  978. }
  979. if(Number(data1.length) > 1000 || Number(data1.width) > 1000 || Number(data1.height)>330){
  980. this.dialog = true;
  981. this.openTimer();
  982. return -1;
  983. }
  984. if(tmpWeight==0){
  985. return price;
  986. }
  987. if(this.expenseRules.length>0){
  988. for(let i=0;i<this.expenseRules.length;i++){
  989. let subArr = this.expenseRules[i].StackerCostRules;
  990. if(this.expenseRules[i].Guid == data2.package_id && subArr.length>0){
  991. for(let j=0;j<subArr.length;j++){
  992. // 需要判斷按數量還是重量
  993. if(subArr[j].Weight_Min!="" && subArr[j].Weight_Max!=""){
  994. if(Number(subArr[j].Weight_Min)<=tmpWeight && Number(subArr[j].Weight_Max)>=tmpWeight){
  995. if(subArr[j].PricingMode=="N"){
  996. price = subArr[j].Price;
  997. }else{
  998. price = subArr[j].Price*tmpWeight;
  999. }
  1000. break;
  1001. }
  1002. }
  1003. }
  1004. break;
  1005. }
  1006. }
  1007. }
  1008. let num = (data1.quantity =="" || data1.quantity =="0") ? 0 : Number(data1.quantity);
  1009. price = price*num;
  1010. return price;
  1011. },
  1012. TruckCostRules(){
  1013. let price = 0;
  1014. let quantityData = this.$refs.ref_quantitySelectGroup.formData;
  1015. let pickupServiceData = this.$refs.ref_pickupService.formData;
  1016. if(this.expenseRules.length>0){
  1017. let list = filterData({ItemType: '02'},this.expenseRules);
  1018. if(list.length>0){
  1019. if(list[0].TruckCostRules.length>0 && quantityData.selectList.length>0 && pickupServiceData.address1!="" && pickupServiceData.address1!="0"){
  1020. price += this.updateForData(quantityData.selectList,list[0].TruckCostRules,pickupServiceData.address1);
  1021. }
  1022. if(list[0].TruckMarkupByModel.length>0 && quantityData.truckList.length>0){
  1023. price += this.updateForData(quantityData.truckList,list[0].TruckMarkupByModel,null);
  1024. }
  1025. // 壓車費
  1026. if(list[0].TruckEscortCostRules.length>0 && pickupServiceData.delivery_type=="2" && quantityData.selectList.length>0
  1027. && list[0].EscortFreeCityID!="" && pickupServiceData.address1!="0"){
  1028. price += this.updateForData(quantityData.selectList,list[0].TruckEscortCostRules,list[0].EscortFreeCityID);
  1029. }
  1030. if(list[0].TruckHolidayPay.length>0 && pickupServiceData.select_date!=""){
  1031. let inWeekend = dateIsInWeekend(pickupServiceData.select_date);
  1032. if(inWeekend==5 && pickupServiceData.delivery_type=="2"){
  1033. price += this.updateForData(quantityData.selectList,list[0].TruckHolidayPay,null);
  1034. }else if(inWeekend==6 && pickupServiceData.delivery_type=="2"){
  1035. price += this.updateForData(quantityData.selectList,list[0].TruckHolidayPay,null)*2;
  1036. }else if(inWeekend==0 && pickupServiceData.delivery_type=="2"){
  1037. price += this.updateForData(quantityData.selectList,list[0].TruckHolidayPay,null);
  1038. }else if(inWeekend==6 && pickupServiceData.delivery_type=="1"){
  1039. price += this.updateForData(quantityData.selectList,list[0].TruckHolidayPay,null);
  1040. }else if(inWeekend==0 && pickupServiceData.delivery_type=="1"){
  1041. price += this.updateForData(quantityData.selectList,list[0].TruckHolidayPay,null);
  1042. }
  1043. }
  1044. }
  1045. }
  1046. return price;
  1047. },
  1048. updateForData(data1,data2,address1){
  1049. let price = 0;
  1050. if(data1.length>0 && data2.length>0){
  1051. for(let n=0;n<data1.length;n++){
  1052. let truckID = data1[n].id;
  1053. let num = data1[n].number;
  1054. for(let i=0;i<data2.length;i++){
  1055. if(data2[i].CityID!=undefined && data2[i].CityID!="" && data2[i].TruckID!=""){
  1056. if(data2[i].CityID==address1 && data2[i].TruckID == truckID){
  1057. price += data2[i].Price*num;
  1058. break;
  1059. }
  1060. }else if(data2[i].CityID ==undefined && data2[i].TruckID!=""){
  1061. if(data2[i].TruckID == truckID){
  1062. price += data2[i].Price*num;
  1063. break;
  1064. }
  1065. }
  1066. }
  1067. }
  1068. }
  1069. return price;
  1070. },
  1071. OtherCostRules(data1,data2){
  1072. let price = 0;
  1073. let tmpValue = 0;
  1074. if(data1.length =="" && data1.width=="" && data1.height==""){
  1075. return price;
  1076. }else{
  1077. tmpValue = Number(data1.length)*Number(data1.width)*Number(data1.height)/1000000;
  1078. }
  1079. if(Number(data1.length) > 1000 || Number(data1.width) > 1000 || Number(data1.height)>330){
  1080. this.dialog = true;
  1081. this.openTimer();
  1082. return -1;
  1083. }
  1084. if(this.expenseRules.length>0){
  1085. for(let i=0;i<this.expenseRules.length;i++){
  1086. let subArr = this.expenseRules[i].OtherCostRules;
  1087. if(this.expenseRules[i].Guid == data2.package_id && subArr.length>0){
  1088. for(let j=0;j<subArr.length;j++){
  1089. if(subArr[j].Unit_Min!=""){
  1090. if(Number(subArr[j].Unit_Min)<tmpValue){
  1091. price = subArr[j].Price*tmpValue;
  1092. }else{
  1093. price = subArr[j].Price*subArr[j].Unit_Min;
  1094. }
  1095. break;
  1096. }
  1097. }
  1098. break;
  1099. }
  1100. }
  1101. }
  1102. let num = (data1.quantity =="" || data1.quantity =="0") ? 0 : Number(data1.quantity);
  1103. price = price*num;
  1104. return price;
  1105. },
  1106. colseDialog(){
  1107. this.dialog = false;
  1108. },
  1109. openTimer(){
  1110. this.countdown = 15;
  1111. this.timer = setInterval(() => {
  1112. if (this.countdown > 0) {
  1113. this.countdown--;
  1114. } else {
  1115. clearInterval(this.timer);
  1116. this.dialog = false;
  1117. }
  1118. }, 1000);
  1119. },
  1120. },
  1121. };
  1122. </script>
  1123. <style lang="scss" scoped>
  1124. :deep() {
  1125. // .serviceDetails,
  1126. // .cancellationPolicy {
  1127. // p {
  1128. // margin-bottom: 6px;
  1129. // }
  1130. // }
  1131. }
  1132. .service-content {
  1133. .serviceDetails img {
  1134. width: 100%;
  1135. height: auto;
  1136. }
  1137. .fix-right {
  1138. position: fixed;
  1139. top: 120px;
  1140. right: 0 px;
  1141. max-width: 400px;
  1142. height: auto;
  1143. z-index: 100;
  1144. }
  1145. .title-icon-left {
  1146. background-position: left 0px center;
  1147. }
  1148. ul {
  1149. padding-left: 24px;
  1150. }
  1151. img {
  1152. // image-rendering: pixelated;
  1153. }
  1154. }
  1155. .seeMore {
  1156. &-hide {
  1157. position: relative;
  1158. max-height: 295px;
  1159. overflow: hidden;
  1160. &::after {
  1161. content: "";
  1162. display: block;
  1163. position: absolute;
  1164. background: url("~/assets/img/gradient_white.png") repeat-x left bottom;
  1165. width: 100%;
  1166. height: 130px;
  1167. left: 0;
  1168. bottom: 0;
  1169. z-index: 1;
  1170. transition: bottom 0.5s;
  1171. }
  1172. }
  1173. &-show {
  1174. position: relative;
  1175. max-height: 100%;
  1176. overflow: initial;
  1177. &::after {
  1178. display: none;
  1179. }
  1180. }
  1181. @media screen and (min-width: 1366px) {
  1182. position: relative;
  1183. display: flex;
  1184. align-items: center;
  1185. justify-content: center;
  1186. &::after {
  1187. content: "";
  1188. display: inline-block;
  1189. position: relative;
  1190. background-image: url("~/assets/svg/arrow-down-primary.svg");
  1191. background-position: center center;
  1192. background-repeat: no-repeat;
  1193. background-size: 100%;
  1194. width: 9px;
  1195. height: 6px;
  1196. margin-left: 16px;
  1197. }
  1198. &.open {
  1199. &::after {
  1200. transform: rotate(180deg);
  1201. }
  1202. }
  1203. }
  1204. }
  1205. .section-7 {
  1206. >div {
  1207. box-shadow: 1px 0px 2px rgba(0, 0, 0, 0.25), 0px 1px 2px rgba(0, 0, 0, 0.1);
  1208. }
  1209. }
  1210. .tablecss{
  1211. line-height: 36px;
  1212. text-align: center;
  1213. color: #343434;
  1214. // border-radius: 10px;
  1215. }
  1216. table{
  1217. border: 1px solid #cecece;
  1218. border-collapse: separate;
  1219. border-radius: 10px;
  1220. text-align: center;
  1221. border-spacing: 0px;
  1222. // padding: 10px;
  1223. }
  1224. table thead{
  1225. border-radius: 10px;
  1226. }
  1227. th{
  1228. border: 1px solid #343434;
  1229. text-align: center;
  1230. }
  1231. td{
  1232. border-top: 1px solid #cecece;
  1233. text-align: center;
  1234. }
  1235. table thead>tr:first-of-type>th:first-of-type{
  1236. border-top-left-radius: 10px;
  1237. }
  1238. table thead>tr:first-of-type>th:last-of-type{
  1239. border-top-right-radius: 10px;
  1240. }
  1241. table tfoot>tr:last-of-type>td:first-of-type{
  1242. border-bottom-left-radius: 10px;
  1243. }
  1244. table tfoot>tr:last-of-type>td:last-of-type{
  1245. border-bottom-right-radius: 10px;
  1246. }
  1247. table::before{
  1248. border-radius: 10px;
  1249. }
  1250. // table tr:first-child th:first-child {
  1251. // border-top-left-radius: 10px; /* 设置table左下圆角 */
  1252. // }
  1253. // table tr:first-child th:last-child {
  1254. // border-top-right-radius: 10px; /* 设置table右下圆角 */
  1255. // }
  1256. table tr:last-child td:first-child {
  1257. border-bottom-left-radius: 10px; /* 设置table左下圆角 */
  1258. }
  1259. table tr:last-child td:last-child {
  1260. border-bottom-right-radius: 10px; /* 设置table右下圆角 */
  1261. }
  1262. </style>