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.

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