index.vue 53 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846
  1. <template>
  2. <div class="box" ref="appBox">
  3. <!-- <div class="topbox_text">Cart Information</div> -->
  4. <div class="contentbox">
  5. <p class="cart_f">{{ $t("card.Cart") }}</p>
  6. <div class="bottomcontentbox_b">
  7. <div class="bottomcontentbox">
  8. <!-- <div class="cart_p">
  9. <p>Cart Information</p>
  10. </div> -->
  11. <!-- <div class="input_box">
  12. <span>
  13. {{$t('inquiry.QuickAdd')}}:
  14. </span>
  15. <el-input class="catalogInput" placeholder=""></el-input>
  16. <span>{{$t('button.addQuoteForm')}}</span>
  17. </div> -->
  18. <el-table
  19. class="table_boxf"
  20. :empty-text="$t('table.notable')"
  21. ref="dataTable"
  22. :row-key="getRowKeys"
  23. :data="list"
  24. border
  25. style="width: 100%"
  26. @select-all="checkSelectAll"
  27. @select="checkSelect"
  28. header-row-class-name="table_header"
  29. >
  30. <el-table-column
  31. type="selection"
  32. :reserve-selection="true"
  33. width="40"
  34. >
  35. </el-table-column>
  36. <el-table-column
  37. width="120"
  38. prop="productCatalog"
  39. :label="$t('table.catalog')"
  40. >
  41. </el-table-column>
  42. <el-table-column
  43. prop="productName"
  44. :label="$t('table.productName')"
  45. ></el-table-column>
  46. <el-table-column
  47. width="120"
  48. prop="size"
  49. :label="$t('table.size')"
  50. ></el-table-column>
  51. <el-table-column width="100" :label="$t('table.quantity')">
  52. <template slot-scope="scope">
  53. <el-input-number
  54. v-model="scope.row.number"
  55. @change="handleChange($event, scope.row)"
  56. :min="1"
  57. label="描述文字"
  58. ></el-input-number>
  59. </template>
  60. </el-table-column>
  61. <el-table-column width="100" :label="$t('bottomBar.Price')">
  62. <template slot-scope="scope">
  63. <span class="price">{{ $t("bottomBar.money") }}</span>
  64. <span class="line_total" v-if="$util.localeStorage()">{{
  65. scope.row.price
  66. }}</span>
  67. <span class="line_total" v-if="!$util.localeStorage()">{{
  68. scope.row.cnPrice
  69. }}</span>
  70. </template>
  71. </el-table-column>
  72. <!-- <el-table-column width="120" prop="discountPrice" :label="$t('card.Discount')"> -->
  73. <el-table-column width="120" :label="$t('card.Discount')">
  74. <template slot-scope="scope">
  75. <span class="price">{{ $t("bottomBar.money") }}</span>
  76. <span class="line_total" v-if="$util.localeStorage()">{{
  77. scope.row.discountPrice
  78. }}</span>
  79. <span class="line_total" v-if="!$util.localeStorage()">{{
  80. scope.row.cnDiscountPrice
  81. }}</span>
  82. </template>
  83. </el-table-column>
  84. <el-table-column width="100" :label="$t('card.Total')">
  85. <template slot-scope="scope">
  86. <span class="price">{{ $t("bottomBar.money") }}</span>
  87. <span class="line_total" v-if="$util.localeStorage()">{{
  88. scope.row.number * scope.row.discountPrice
  89. }}</span>
  90. <span class="line_total" v-if="!$util.localeStorage()">{{
  91. scope.row.number * scope.row.cnDiscountPrice
  92. }}</span>
  93. </template>
  94. </el-table-column>
  95. <el-table-column width="100" :label="$t('card.Operate')">
  96. <template slot-scope="scope">
  97. <i @click="tapDelete(scope.row)" class="el-icon-delete"></i>
  98. </template>
  99. </el-table-column>
  100. </el-table>
  101. <!-- 移动 -->
  102. <el-table
  103. class="table_pmd"
  104. :empty-text="$t('table.notable')"
  105. ref="dataTablewx"
  106. :row-key="getRowKeys"
  107. :data="list"
  108. border
  109. style="width: 100%"
  110. @select-all="checkSelectAll"
  111. @select="checkSelect"
  112. header-row-class-name="table_header"
  113. >
  114. <el-table-column
  115. type="selection"
  116. :reserve-selection="true"
  117. width="40"
  118. >
  119. </el-table-column>
  120. <el-table-column
  121. prop="productCatalog"
  122. :label="$t('table.catalog')"
  123. style="width:20%;"
  124. >
  125. </el-table-column>
  126. <el-table-column
  127. prop="productName"
  128. :label="$t('table.productName')"
  129. style="width:20%"
  130. >
  131. </el-table-column>
  132. <el-table-column
  133. prop="size"
  134. :label="$t('table.size')"
  135. style="width:20%"
  136. >
  137. </el-table-column>
  138. <el-table-column :label="$t('table.quantity')" style="width:20%">
  139. <template slot-scope="scope">
  140. <el-input-number
  141. v-model="scope.row.number"
  142. @change="handleChange($event, scope.row)"
  143. :min="1"
  144. label="描述文字"
  145. ></el-input-number>
  146. </template>
  147. </el-table-column>
  148. <el-table-column
  149. :label="$t('checkout.More')"
  150. style="width:20%"
  151. type="expand"
  152. >
  153. <template slot-scope="scope">
  154. <el-form label-position="left" inline class="demo-table-expand">
  155. <el-form-item :label="$t('bottomBar.Price')">
  156. <span class="price">{{ $t("bottomBar.money") }}</span>
  157. <span v-if="$util.localeStorage()">{{
  158. scope.row.price
  159. }}</span>
  160. <span v-if="!$util.localeStorage()">{{
  161. scope.row.cnPrice
  162. }}</span>
  163. </el-form-item>
  164. <el-form-item :label="$t('card.Discount')">
  165. <!-- <div>{{ scope.row.discountPrice }}</div> -->
  166. <span class="price">{{ $t("bottomBar.money") }}</span>
  167. <span v-if="$util.localeStorage()">{{
  168. scope.row.discountPrice
  169. }}</span>
  170. <span v-if="!$util.localeStorage()">{{
  171. scope.row.cnDiscountPrice
  172. }}</span>
  173. </el-form-item>
  174. <el-form-item :label="$t('card.Total')">
  175. <span class="price">{{ $t("bottomBar.money") }}</span>
  176. <!-- <div>{{scope.row.number*scope.row.discountPrice}}</div> -->
  177. <span v-if="$util.localeStorage()">{{
  178. scope.row.number * scope.row.discountPrice
  179. }}</span>
  180. <span v-if="!$util.localeStorage()">{{
  181. scope.row.number * scope.row.cnDiscountPrice
  182. }}</span>
  183. </el-form-item>
  184. <el-form-item :label="$t('card.Operate')">
  185. <i @click="tapDelete(scope.row)" class="el-icon-delete"></i>
  186. </el-form-item>
  187. </el-form>
  188. </template>
  189. </el-table-column>
  190. </el-table>
  191. <div class="cart_button">
  192. <button @click="tapDeleteAll">{{ $t("card.items") }}</button>
  193. </div>
  194. <div class="cart_button_f">
  195. <div class="cart_text" v-if="$util.localeStorage()">
  196. {{ $t("card.Subtotal") }} :<span
  197. >{{ $t("bottomBar.money")
  198. }}{{ cartTotal.checkedGoodsDiscount }}</span
  199. >
  200. </div>
  201. <div class="cart_text" v-if="!$util.localeStorage()">
  202. {{ $t("card.Subtotal") }} :<span
  203. >{{ $t("bottomBar.money")
  204. }}{{ cartTotal.checkedGoodsDiscount }}</span
  205. >
  206. </div>
  207. <!-- <button @click="tapCheck">{{$t('card.check')}}</button> -->
  208. </div>
  209. </div>
  210. <!-- 客户联系信息 -->
  211. <div class="customer_box">
  212. <div class="customer" v-if="!tokenShow">
  213. <div class="title">
  214. {{ $t("taps.tips") }}<span class="required">*</span
  215. >{{ $t("taps.tipsRequired") }}
  216. </div>
  217. <el-form
  218. :model="form"
  219. class="demo-form-inline"
  220. label-position="left"
  221. :label-width="langShow ? '160px' : '120px'"
  222. :inline="true"
  223. >
  224. <el-form-item :label="$t('input.email') + ':'" :required="true">
  225. <el-input
  226. v-model="form.email"
  227. :placeholder="$t('input.email')"
  228. ></el-input>
  229. </el-form-item>
  230. <el-form-item :label="$t('register.Fullname') + ':'">
  231. <el-input
  232. v-model="form.name"
  233. :placeholder="$t('register.Fullname')"
  234. ></el-input>
  235. </el-form-item>
  236. <el-form-item :label="$t('register.Company') + ':'">
  237. <el-input
  238. v-model="form.company"
  239. :placeholder="$t('register.Company')"
  240. ></el-input>
  241. </el-form-item>
  242. <el-form-item :label="$t('register.Country') + ':'">
  243. <el-select
  244. v-if="langShow"
  245. v-model="form.country"
  246. :placeholder="$t('register.Country')"
  247. >
  248. <el-option
  249. v-for="item in regionList"
  250. :key="item.en"
  251. :label="item.en"
  252. :value="item.en"
  253. >
  254. </el-option>
  255. </el-select>
  256. <el-select
  257. v-else
  258. v-model="form.country"
  259. :placeholder="$t('register.Country')"
  260. >
  261. <el-option
  262. v-for="item in regionList"
  263. :key="item.cn"
  264. :label="item.cn"
  265. :value="item.cn"
  266. >
  267. </el-option>
  268. </el-select>
  269. </el-form-item>
  270. <el-form-item :label="$t('register.Account') + ':'">
  271. <el-select
  272. v-model="form.accountType"
  273. :placeholder="$t('register.Account')"
  274. >
  275. <el-option
  276. v-for="item in accountTypeList"
  277. :key="$util.localeStorage() ? item.name : item.nameCn"
  278. :label="$util.localeStorage() ? item.name : item.nameCn"
  279. :value="item.name"
  280. >
  281. </el-option>
  282. </el-select>
  283. </el-form-item>
  284. </el-form>
  285. </div>
  286. <!-- 收货地址 -->
  287. <div class="information customer">
  288. <div class="title title_s">
  289. {{ $t("checkout.Shipping") }}
  290. <div class="horizontal"></div>
  291. </div>
  292. <disdAddress @onaddress="onaddress" v-if="tokenShow"></disdAddress>
  293. <el-form
  294. v-else
  295. :model="receipt"
  296. ref="receipt"
  297. class="demo-form-inline"
  298. label-position="left"
  299. :label-width="langShow ? '160px' : '120px'"
  300. :inline="true"
  301. >
  302. <el-form-item
  303. :label="$t('checkout.Name') + ':'"
  304. :required="true"
  305. >
  306. <el-input
  307. v-model="receipt.name"
  308. :placeholder="$t('checkout.Name')"
  309. ></el-input>
  310. </el-form-item>
  311. <el-form-item
  312. :label="$t('checkout.Phone') + ':'"
  313. :required="true"
  314. >
  315. <el-input
  316. v-model="receipt.tel"
  317. :placeholder="$t('checkout.Phone')"
  318. ></el-input>
  319. </el-form-item>
  320. <el-form-item
  321. :label="$t('checkout.Institute') + ':'"
  322. :required="true"
  323. >
  324. <el-input
  325. v-model="receipt.company"
  326. :placeholder="$t('checkout.Institute')"
  327. ></el-input>
  328. </el-form-item>
  329. <el-form-item
  330. :label="$t('order.country') + ':'"
  331. :required="true"
  332. v-if="langShow"
  333. >
  334. <el-select
  335. v-model="receipt.country"
  336. :placeholder="$t('register.Country')"
  337. >
  338. <el-option
  339. v-for="item in regionList"
  340. :key="item.en"
  341. :label="item.en"
  342. :value="item.en"
  343. >
  344. </el-option>
  345. </el-select>
  346. </el-form-item>
  347. <el-form-item label="省:" :required="true" v-if="!langShow">
  348. <el-select
  349. v-model="receipt.province"
  350. placeholder="省"
  351. @change="changeProvince"
  352. >
  353. <el-option
  354. v-for="item in province"
  355. :key="item.label"
  356. :label="item.label"
  357. :value="item.label"
  358. >
  359. </el-option>
  360. </el-select>
  361. </el-form-item>
  362. <el-form-item label="市:" :required="true" v-if="!langShow">
  363. <el-select v-model="receipt.city" placeholder="市">
  364. <el-option
  365. v-for="item in city"
  366. :key="item.label"
  367. :label="item.label"
  368. :value="item.label"
  369. >
  370. </el-option>
  371. </el-select>
  372. </el-form-item>
  373. <el-form-item
  374. :label="$t('checkout.Addre') + ':'"
  375. :required="true"
  376. >
  377. <el-input
  378. v-model="receipt.address"
  379. :placeholder="$t('checkout.Addre')"
  380. ></el-input>
  381. </el-form-item>
  382. <el-form-item
  383. :label="$t('checkout.postal') + ':'"
  384. :required="true"
  385. >
  386. <el-input
  387. v-model="receipt.postalCode"
  388. :placeholder="$t('checkout.postal')"
  389. ></el-input>
  390. </el-form-item>
  391. </el-form>
  392. </div>
  393. <!-- 账单地址 -->
  394. <div class="information customer" v-if="!tokenShow">
  395. <div class="title title_s">
  396. {{ $t("checkout.Choose") }}
  397. <div class="horizontal"></div>
  398. </div>
  399. <div class="checked_b">
  400. <el-checkbox v-model="identical" @change="identicalChange">{{
  401. $t("taps.sameAs")
  402. }}</el-checkbox>
  403. </div>
  404. <el-form
  405. :model="bill"
  406. ref="bill"
  407. class="demo-form-inline"
  408. label-position="left"
  409. :label-width="langShow ? '160px' : '120px'"
  410. :inline="true"
  411. >
  412. <el-form-item
  413. :label="$t('checkout.Name') + ':'"
  414. :required="true"
  415. >
  416. <el-input
  417. v-model="bill.name"
  418. :placeholder="$t('checkout.Name')"
  419. ></el-input>
  420. </el-form-item>
  421. <el-form-item
  422. :label="$t('checkout.Phone') + ':'"
  423. :required="true"
  424. >
  425. <el-input
  426. v-model="bill.tel"
  427. :placeholder="$t('checkout.Phone')"
  428. ></el-input>
  429. </el-form-item>
  430. <el-form-item
  431. :label="$t('checkout.Institute') + ':'"
  432. :required="true"
  433. >
  434. <el-input
  435. v-model="bill.company"
  436. :placeholder="$t('checkout.Institute')"
  437. ></el-input>
  438. </el-form-item>
  439. <el-form-item
  440. :label="$t('order.country') + ':'"
  441. :required="true"
  442. v-if="langShow"
  443. >
  444. <el-select
  445. v-model="bill.country"
  446. :placeholder="$t('register.Country')"
  447. >
  448. <el-option
  449. v-for="item in regionList"
  450. :key="item.en"
  451. :label="item.en"
  452. :value="item.en"
  453. >
  454. </el-option>
  455. </el-select>
  456. </el-form-item>
  457. <el-form-item label="省:" :required="true" v-if="!langShow">
  458. <el-select
  459. v-model="bill.province"
  460. placeholder="省"
  461. @change="billProvince"
  462. >
  463. <el-option
  464. v-for="item in province"
  465. :key="item.label"
  466. :label="item.label"
  467. :value="item.label"
  468. >
  469. </el-option>
  470. </el-select>
  471. </el-form-item>
  472. <el-form-item label="市:" :required="true" v-if="!langShow">
  473. <el-select v-model="bill.city" placeholder="市">
  474. <el-option
  475. v-for="item in billCity"
  476. :key="item.label"
  477. :label="item.label"
  478. :value="item.label"
  479. >
  480. </el-option>
  481. </el-select>
  482. </el-form-item>
  483. <el-form-item
  484. :label="$t('checkout.Addre') + ':'"
  485. :required="true"
  486. >
  487. <el-input
  488. v-model="bill.address"
  489. :placeholder="$t('checkout.Addre')"
  490. ></el-input>
  491. </el-form-item>
  492. <el-form-item
  493. :label="$t('checkout.postal') + ':'"
  494. :required="true"
  495. >
  496. <el-input
  497. v-model="bill.postalCode"
  498. :placeholder="$t('checkout.postal')"
  499. ></el-input>
  500. </el-form-item>
  501. </el-form>
  502. </div>
  503. <div class="information customer">
  504. <div class="title title_s">
  505. {{ $t("checkout.Payout") }}
  506. <div class="horizontal"></div>
  507. </div>
  508. <dissPayment></dissPayment>
  509. </div>
  510. </div>
  511. <div class="checkButtom">
  512. <button class="buttom" @click="submit">
  513. {{ $t("application.Submit") }}
  514. </button>
  515. </div>
  516. </div>
  517. </div>
  518. </div>
  519. </template>
  520. <script>
  521. import region from "@/js/region";
  522. import provinces from "@/js/provinces";
  523. import disdAddress from "@/components/diss-address";
  524. import dissPayment from "@/components/diss-payment";
  525. export default {
  526. components: {
  527. disdAddress,
  528. dissPayment
  529. },
  530. name: "mycart",
  531. data() {
  532. return {
  533. identical: false,
  534. rules: [],
  535. langShow: this.$util.localeStorage(),
  536. regionList: [], // 国家
  537. province: [], // 市
  538. city: [],
  539. billCity: [], // 账单省
  540. tokenShow: !!localStorage.getItem("token"),
  541. list: [],
  542. cartTotal: {
  543. checkedGoodsDiscount: 0
  544. },
  545. checkList: [],
  546. selectList: [], // 选中
  547. form: {
  548. email: "",
  549. name: "",
  550. accountType: "",
  551. country: "",
  552. company: "",
  553. position: ""
  554. },
  555. receipt: {
  556. // 收货
  557. address: "", // 详细收货地址
  558. city: "", // 中文版–市
  559. company: "", // 企业
  560. country: "", // 国家 中文默认传China
  561. id: 0,
  562. isDefault: false, // 是否默认地址
  563. name: "", // 收货人名称
  564. postalCode: "", // 邮政编码
  565. province: "", // 中文版–省
  566. tel: "" // 手机号码
  567. },
  568. bill: {
  569. // 账单
  570. address: "", // 详细账单地址
  571. city: "", // 中文版–市
  572. company: "", // 企业
  573. country: "", // 国家 中文默认传China
  574. id: 0,
  575. isDefault: false, // 是否默认地址
  576. name: "", // 账单人名称
  577. postalCode: "", // 邮政编码
  578. province: "", // 中文版–省
  579. tel: "" // 手机号码
  580. },
  581. accountTypeList: [
  582. {
  583. name: "Industry",
  584. nameCn: "工业客户"
  585. },
  586. {
  587. name: "Academic",
  588. nameCn: "科研客户"
  589. },
  590. {
  591. name: "Distributor",
  592. nameCn: "经销商"
  593. }
  594. ],
  595. delFlagId: "",
  596. billId: ""
  597. };
  598. },
  599. methods: {
  600. onaddress(e) {
  601. this.delFlagId = e.delFlag;
  602. this.billId = e.billId;
  603. },
  604. identicalChange(e) {
  605. // 是否与帐单地址相同
  606. if (e) {
  607. this.bill = { ...this.receipt };
  608. // this.$set(this.bill, this.receipt)
  609. } else {
  610. this.bill.address = "";
  611. this.bill.city = "";
  612. this.bill.company = "";
  613. this.bill.country = "";
  614. this.bill.id = 0;
  615. this.bill.isDefault = false;
  616. this.bill.name = "";
  617. this.bill.postalCode = "";
  618. this.bill.province = "";
  619. this.bill.tel = "";
  620. }
  621. },
  622. submit() {
  623. // 提交
  624. if (this.tokenShow) {
  625. this.tapsubmit();
  626. } else {
  627. // console.log(this.checkList, '-------')
  628. this.noToken();
  629. }
  630. },
  631. noToken() {
  632. if (
  633. this.userVerification() &&
  634. this.verification() &&
  635. this.billVerification()
  636. ) {
  637. if (this.checkList.length > 0) {
  638. this.$api
  639. .post("order/submitNoLogin", {
  640. cartId: 0,
  641. cartList: this.checkList,
  642. fpAddress: this.receipt,
  643. message: "",
  644. shAddress: this.bill,
  645. user: this.form
  646. })
  647. .then(res => {
  648. if (res.code === 0) {
  649. this.$message({
  650. message: this.$t("message.checkoutSuccess"),
  651. type: "success"
  652. });
  653. for (let i = 0; i < this.list.length; i++) {
  654. for (let j = 0; j < this.checkList.length; j++) {
  655. if (this.list[i].skuId === this.checkList[j].skuId) {
  656. this.list.splice(i, 1);
  657. }
  658. }
  659. }
  660. window.gtag && window.gtag("event", "submit_cart");
  661. localStorage.setItem("shoppingCart", JSON.stringify(this.list));
  662. localStorage.setItem(
  663. "shoppingNum",
  664. JSON.stringify(this.list.length)
  665. );
  666. this.$router.push({ name: "ordersuccess" });
  667. } else {
  668. this.$message(res.msg);
  669. }
  670. });
  671. } else {
  672. this.$message(this.$t("button.Itsover"));
  673. }
  674. }
  675. },
  676. tapsubmit() {
  677. // 登录提交订单
  678. this.$api
  679. .post("order/submit", {
  680. cartId: 0,
  681. fpAddress: { id: this.billId },
  682. message: "",
  683. shAddress: { id: this.delFlagId }
  684. })
  685. .then(res => {
  686. if (res.code == 0) {
  687. this.$message({
  688. message: this.$t("message.checkoutSuccess"),
  689. type: "success"
  690. });
  691. gtag("event", "submit_cart");
  692. this.$router.push({ name: "ordersuccess" });
  693. } else {
  694. this.$message(res.msg);
  695. }
  696. });
  697. },
  698. // 发货地址获取市
  699. changeProvince(e) {
  700. let that = this;
  701. that.receipt.city = "";
  702. that.province.forEach(item => {
  703. if (item.label == e) {
  704. that.city = item.children;
  705. }
  706. });
  707. },
  708. // 账单地址获取市
  709. billProvince(e) {
  710. let that = this;
  711. that.bill.city = "";
  712. that.province.forEach(item => {
  713. if (item.label == e) {
  714. that.billCity = item.children;
  715. }
  716. });
  717. },
  718. // tapCheck () {
  719. // if (JSON.parse(localStorage.getItem('token'))) {
  720. // if (this.cartTotal.checkedGoodsDiscount > 0) {
  721. // this.$router.push({name: 'checkout'})
  722. // } else {
  723. // this.$message.error(this.$t('message.PleaseSelect'))
  724. // }
  725. // } else {
  726. // this.$router.push({name: 'login'})
  727. // }
  728. // },
  729. getRowKeys(row, index) {
  730. if (JSON.parse(localStorage.getItem("token"))) {
  731. return row.id;
  732. } else {
  733. return row.skuId;
  734. }
  735. },
  736. checkSelectAll(e) {
  737. // 全选
  738. let that = this;
  739. var obj = [];
  740. that.selectList = [];
  741. if (JSON.parse(localStorage.getItem("token"))) {
  742. if (e.length > 0) {
  743. e.forEach(item => {
  744. that.selectList.push(item.id);
  745. });
  746. that.checked(true, that.selectList);
  747. } else {
  748. that.list.forEach(item => {
  749. obj.push(item.id);
  750. });
  751. that.checked(false, obj);
  752. }
  753. } else {
  754. if (e.length > 0) {
  755. var objList = [];
  756. e.forEach(item => {
  757. let data = {
  758. checked: true,
  759. id: item.id,
  760. number: item.number,
  761. productCatalog: item.productCatalog,
  762. skuId: item.skuId
  763. };
  764. objList.push(data);
  765. });
  766. this.checkList = objList;
  767. } else {
  768. this.checkList = [];
  769. }
  770. console.log(e, "============", this.checkList);
  771. // this.$router.push({name: 'login'})
  772. }
  773. },
  774. checkSelect(selection, row) {
  775. // 单选
  776. let that = this;
  777. let data = [row.id];
  778. if (selection.length > that.selectList.length) {
  779. selection.forEach(item => {
  780. that.selectList.push(item.id);
  781. });
  782. this.checked(true, data, row);
  783. } else {
  784. that.selectList.forEach((item, index) => {
  785. if (item == row.id) {
  786. that.selectList.splice(index, 1);
  787. }
  788. });
  789. this.checked(false, data, row);
  790. }
  791. },
  792. checked(checked, obj, row) {
  793. // checked
  794. let that = this;
  795. if (JSON.parse(localStorage.getItem("token"))) {
  796. that.$api
  797. .post("cart/checked", {
  798. checked: checked,
  799. ids: obj
  800. })
  801. .then(res => {
  802. if (res.code == 0) {
  803. // console.log(res)
  804. that.getList();
  805. } else {
  806. this.$message(res.msg);
  807. }
  808. });
  809. } else {
  810. if (checked) {
  811. let data = {
  812. checked: true,
  813. id: row.id,
  814. number: row.number,
  815. productCatalog: row.productCatalog,
  816. skuId: row.skuId
  817. };
  818. this.checkList.push(data);
  819. } else {
  820. for (let i = 0; i < this.checkList.length; i++) {
  821. if (this.checkList[i].skuId === row.skuId) {
  822. this.checkList.splice(i, 1);
  823. }
  824. }
  825. }
  826. }
  827. },
  828. tapDeleteAll() {
  829. // 删除所有
  830. let that = this;
  831. var obj = [];
  832. if (JSON.parse(localStorage.getItem("token"))) {
  833. that.list.forEach(item => {
  834. obj.push(item.id);
  835. });
  836. that.$api
  837. .post("cart/delete", {
  838. checked: true,
  839. ids: this.selectList
  840. })
  841. .then(res => {
  842. if (res.code == 0) {
  843. that.getList();
  844. } else {
  845. this.$message(res.msg);
  846. }
  847. });
  848. } else {
  849. this.list = [];
  850. this.checkList = [];
  851. localStorage.removeItem("shoppingCart");
  852. localStorage.setItem("shoppingNum", JSON.stringify(this.list.length));
  853. }
  854. },
  855. tapDelete(e) {
  856. // 删除
  857. let that = this;
  858. if (JSON.parse(localStorage.getItem("token"))) {
  859. this.$api
  860. .post("cart/delete", {
  861. checked: true,
  862. ids: [e.id]
  863. })
  864. .then(res => {
  865. if (res.code == 0) {
  866. this.getList();
  867. } else {
  868. this.$message(res.msg);
  869. }
  870. });
  871. } else {
  872. this.list.forEach((item, index) => {
  873. if (item.skuId == e.skuId) {
  874. if (this.$util.localeStorage()) {
  875. that.cartTotal.checkedGoodsDiscount =
  876. that.cartTotal.checkedGoodsDiscount -
  877. e.number * e.discountPrice;
  878. } else {
  879. that.cartTotal.checkedGoodsDiscount =
  880. that.cartTotal.checkedGoodsDiscount -
  881. e.number * e.cnDiscountPrice;
  882. }
  883. that.list.splice(index, 1);
  884. }
  885. });
  886. for (let i = 0; i < this.checkList.length; i++) {
  887. if (this.checkList[i].skuId === e.skuId) {
  888. this.checkList.splice(i, 1);
  889. }
  890. }
  891. localStorage.setItem("shoppingCart", JSON.stringify(this.list));
  892. localStorage.setItem("shoppingNum", JSON.stringify(this.list.length));
  893. }
  894. },
  895. getList() {
  896. let that = this;
  897. let data = JSON.parse(localStorage.getItem("shoppingCart"));
  898. let arry = [];
  899. if (JSON.parse(localStorage.getItem("token"))) {
  900. if (data && data.length > 0) {
  901. data.forEach(item => {
  902. var obj = {
  903. checked: true,
  904. id: item.id,
  905. number: item.number,
  906. productCatalog: item.productCatalog,
  907. skuId: item.skuId
  908. };
  909. arry.push(obj);
  910. });
  911. } else {
  912. arry = null;
  913. }
  914. this.$api
  915. .post("cart/index", {
  916. cartList: arry
  917. })
  918. .then(res => {
  919. if (res.code == 0) {
  920. this.list = res.data.cartList;
  921. this.cartTotal = res.data.cartTotal;
  922. localStorage.removeItem("shoppingCart");
  923. localStorage.setItem(
  924. "shoppingNum",
  925. JSON.stringify(res.data.cartList.length)
  926. );
  927. } else {
  928. this.$message(res.msg);
  929. }
  930. });
  931. } else {
  932. if (data && data.length > 0) {
  933. data.forEach(item => {
  934. that.list.push(item);
  935. let data = {
  936. checked: true,
  937. id: item.id,
  938. number: item.number,
  939. productCatalog: item.productCatalog,
  940. skuId: item.skuId
  941. };
  942. that.checkList.push(data);
  943. if (this.$util.localeStorage()) {
  944. that.cartTotal.checkedGoodsDiscount +=
  945. item.number * item.discountPrice;
  946. } else {
  947. that.cartTotal.checkedGoodsDiscount +=
  948. item.number * item.cnDiscountPrice;
  949. }
  950. });
  951. }
  952. }
  953. },
  954. handleChange(e, obj) {
  955. // 更新
  956. let that = this;
  957. if (JSON.parse(localStorage.getItem("token"))) {
  958. this.$api
  959. .post("cart/update", {
  960. checked: obj.checked,
  961. id: obj.id,
  962. number: obj.number,
  963. productCatalog: obj.productCatalog,
  964. skuId: obj.skuId
  965. })
  966. .then(res => {
  967. if (res.code == 0) {
  968. this.getList();
  969. } else {
  970. this.getList();
  971. this.$message(res.msg);
  972. }
  973. });
  974. } else {
  975. that.cartTotal.checkedGoodsDiscount = 0;
  976. this.list.forEach(item => {
  977. if (this.$util.localeStorage()) {
  978. that.cartTotal.checkedGoodsDiscount +=
  979. item.number * item.discountPrice;
  980. } else {
  981. that.cartTotal.checkedGoodsDiscount +=
  982. item.number * item.cnDiscountPrice;
  983. }
  984. });
  985. localStorage.setItem("shoppingCart", JSON.stringify(this.list));
  986. }
  987. },
  988. verification() {
  989. // 收货地址验证
  990. if (!this.langShow) {
  991. if (!this.receipt.name) {
  992. this.$message.error(
  993. this.$t("checkout.Name") + this.$t("message.notEmpty")
  994. );
  995. return false;
  996. } else if (!this.receipt.tel) {
  997. this.$message.error(
  998. this.$t("checkout.Phone") + this.$t("message.notEmpty")
  999. );
  1000. return false;
  1001. } else if (!this.$util.isMobile(this.receipt.tel)) {
  1002. this.$message.error(
  1003. this.$t("checkout.Phone") + this.$t("message.IncorrectFormat")
  1004. );
  1005. return false;
  1006. } else if (!this.receipt.company) {
  1007. this.$message.error(
  1008. this.$t("checkout.Institute") + this.$t("message.notEmpty")
  1009. );
  1010. return false;
  1011. } else if (!this.receipt.province) {
  1012. this.$message.error("请选择省份");
  1013. return false;
  1014. } else if (!this.receipt.city) {
  1015. this.$message.error("请选择市");
  1016. return false;
  1017. } else if (!this.receipt.address) {
  1018. this.$message.error(
  1019. this.$t("checkout.Addre") + this.$t("message.notEmpty")
  1020. );
  1021. return false;
  1022. } else if (!this.receipt.postalCode) {
  1023. this.$message.error(
  1024. this.$t("checkout.postal") + this.$t("message.notEmpty")
  1025. );
  1026. return false;
  1027. } else {
  1028. return true;
  1029. }
  1030. } else {
  1031. if (!this.receipt.name) {
  1032. this.$message.error(
  1033. this.$t("checkout.Name") + this.$t("message.notEmpty")
  1034. );
  1035. return false;
  1036. } else if (!this.receipt.tel) {
  1037. this.$message.error(
  1038. this.$t("checkout.Phone") + this.$t("message.notEmpty")
  1039. );
  1040. return false;
  1041. } else if (!this.$util.isMobile(this.receipt.tel)) {
  1042. this.$message.error(
  1043. this.$t("checkout.Phone") + this.$t("message.IncorrectFormat")
  1044. );
  1045. return false;
  1046. } else if (!this.receipt.company) {
  1047. this.$message.error(
  1048. this.$t("checkout.Institute") + this.$t("message.notEmpty")
  1049. );
  1050. return false;
  1051. } else if (!this.receipt.country) {
  1052. this.$message.error(
  1053. this.$t("message.PleaseSelects") + this.$t("order.country")
  1054. );
  1055. return false;
  1056. } else if (!this.receipt.address) {
  1057. this.$message.error(
  1058. this.$t("checkout.Addre") + this.$t("message.notEmpty")
  1059. );
  1060. return false;
  1061. } else if (!this.receipt.postalCode) {
  1062. this.$message.error(
  1063. this.$t("checkout.postal") + this.$t("message.notEmpty")
  1064. );
  1065. return false;
  1066. } else {
  1067. return true;
  1068. }
  1069. }
  1070. },
  1071. billVerification() {
  1072. // 账单地址验证
  1073. if (!this.langShow) {
  1074. if (!this.bill.name) {
  1075. this.$message.error(
  1076. this.$t("checkout.Name") + this.$t("message.notEmpty")
  1077. );
  1078. return false;
  1079. } else if (!this.bill.tel) {
  1080. this.$message.error(
  1081. this.$t("checkout.Phone") + this.$t("message.notEmpty")
  1082. );
  1083. return false;
  1084. } else if (!this.$util.isMobile(this.bill.tel)) {
  1085. this.$message.error(
  1086. this.$t("checkout.Phone") + this.$t("message.IncorrectFormat")
  1087. );
  1088. return false;
  1089. } else if (!this.bill.company) {
  1090. this.$message.error(
  1091. this.$t("checkout.Institute") + this.$t("message.notEmpty")
  1092. );
  1093. return false;
  1094. } else if (!this.bill.province) {
  1095. this.$message.error("请选择省份");
  1096. return false;
  1097. } else if (!this.bill.city) {
  1098. this.$message.error("请选择市");
  1099. return false;
  1100. } else if (!this.bill.address) {
  1101. this.$message.error(
  1102. this.$t("checkout.Addre") + this.$t("message.notEmpty")
  1103. );
  1104. return false;
  1105. } else if (!this.bill.postalCode) {
  1106. this.$message.error(
  1107. this.$t("checkout.postal") + this.$t("message.notEmpty")
  1108. );
  1109. return false;
  1110. } else {
  1111. return true;
  1112. }
  1113. } else {
  1114. if (!this.bill.name) {
  1115. this.$message.error(
  1116. this.$t("checkout.Name") + this.$t("message.notEmpty")
  1117. );
  1118. return false;
  1119. } else if (!this.bill.tel) {
  1120. this.$message.error(
  1121. this.$t("checkout.Phone") + this.$t("message.notEmpty")
  1122. );
  1123. return false;
  1124. } else if (!this.$util.isMobile(this.bill.tel)) {
  1125. this.$message.error(
  1126. this.$t("checkout.Phone") + this.$t("message.IncorrectFormat")
  1127. );
  1128. return false;
  1129. } else if (!this.bill.company) {
  1130. this.$message.error(
  1131. this.$t("checkout.Institute") + this.$t("message.notEmpty")
  1132. );
  1133. return false;
  1134. } else if (!this.bill.country) {
  1135. this.$message.error(
  1136. this.$t("message.PleaseSelects") + this.$t("order.country")
  1137. );
  1138. return false;
  1139. } else if (!this.bill.address) {
  1140. this.$message.error(
  1141. this.$t("checkout.Addre") + this.$t("message.notEmpty")
  1142. );
  1143. return false;
  1144. } else if (!this.bill.postalCode) {
  1145. this.$message.error(
  1146. this.$t("checkout.postal") + this.$t("message.notEmpty")
  1147. );
  1148. return false;
  1149. } else {
  1150. return true;
  1151. }
  1152. }
  1153. },
  1154. initialization() {
  1155. // 获取个人信息
  1156. if (JSON.parse(localStorage.getItem("token"))) {
  1157. var userInfo = JSON.parse(localStorage.getItem("user"));
  1158. this.form.user = userInfo.name;
  1159. this.form.accountType = userInfo.accountType;
  1160. this.form.country = userInfo.country;
  1161. this.form.company = userInfo.company;
  1162. }
  1163. },
  1164. userVerification() {
  1165. // 个人信息验证
  1166. if (!this.form.email) {
  1167. this.$message.error(
  1168. this.$t("register.Address") + this.$t("register.Cannot")
  1169. );
  1170. return false;
  1171. } else if (!this.$util.isEmail(this.form.email)) {
  1172. this.$message.error(this.$t("input.email") + this.$t("message.email"));
  1173. return false;
  1174. } else {
  1175. return true;
  1176. }
  1177. }
  1178. },
  1179. watch: {
  1180. list(n, o) {
  1181. let that = this;
  1182. this.$nextTick(() => {
  1183. that.selectList = [];
  1184. that.list.forEach(item => {
  1185. if (item.checked) {
  1186. if (that.$refs.appBox.clientWidth > 750) {
  1187. this.$refs.dataTable.toggleRowSelection(item, true);
  1188. that.selectList.push(item.id);
  1189. } else {
  1190. this.$refs.dataTablewx.toggleRowSelection(item, true);
  1191. that.selectList.push(item.id);
  1192. }
  1193. }
  1194. });
  1195. });
  1196. }
  1197. },
  1198. mounted() {},
  1199. created() {
  1200. this.getList();
  1201. this.regionList = region;
  1202. this.province = provinces;
  1203. this.initialization();
  1204. }
  1205. };
  1206. </script>
  1207. <style lang="scss" scoped>
  1208. @media screen and (min-width: 751px) and (max-width: 9999px) {
  1209. .box {
  1210. width: 100%;
  1211. overflow: hidden;
  1212. }
  1213. .topbox_text {
  1214. font-size: 20px;
  1215. margin-bottom: 2.4rem;
  1216. }
  1217. .contentbox {
  1218. width: 100%;
  1219. overflow: hidden;
  1220. }
  1221. .contentbox > .cart_f {
  1222. font-size: 16px;
  1223. padding: 1rem 1rem;
  1224. font-weight: 700;
  1225. font-family: Arial;
  1226. color: #005bab;
  1227. background: #cfe0ef;
  1228. }
  1229. .bottomcontentbox_b {
  1230. width: 100%;
  1231. overflow: hidden;
  1232. padding: 2rem;
  1233. border: 1px solid #dbdbdb;
  1234. background: #ffffff;
  1235. }
  1236. .bottomcontentbox /deep/ {
  1237. border: 1px solid #dbdbdb;
  1238. background: white;
  1239. padding: 1rem;
  1240. margin-bottom: 1.6rem;
  1241. .cart_p {
  1242. // border-bottom:1px solid #DBDBDB;
  1243. p {
  1244. margin-bottom: 1rem;
  1245. font-size: 14px;
  1246. font-weight: 600;
  1247. }
  1248. }
  1249. .el-table {
  1250. .table_header {
  1251. color: #005bab;
  1252. }
  1253. .el-table__body-wrapper {
  1254. .el-table__row {
  1255. .cell {
  1256. .el-icon-delete {
  1257. font-size: 18px;
  1258. color: #005bab;
  1259. font-weight: 600;
  1260. cursor: pointer;
  1261. }
  1262. .el-input-number {
  1263. width: 100% !important;
  1264. line-height: 30px;
  1265. .el-input-number__decrease {
  1266. width: 20px;
  1267. height: 28px;
  1268. top: 50%;
  1269. transform: translateY(-50%);
  1270. .el-icon-minus {
  1271. line-height: 30px;
  1272. }
  1273. }
  1274. .el-input-number__increase {
  1275. width: 20px;
  1276. height: 28px;
  1277. top: 50%;
  1278. transform: translateY(-50%);
  1279. .el-icon-plus {
  1280. margin-top: -10px;
  1281. }
  1282. }
  1283. .el-input {
  1284. .el-input__inner {
  1285. padding: 0 20px;
  1286. height: 30px;
  1287. }
  1288. }
  1289. }
  1290. }
  1291. }
  1292. }
  1293. }
  1294. }
  1295. .input_box /deep/ {
  1296. display: none;
  1297. align-items: center;
  1298. margin: 1rem 0;
  1299. & > span:nth-of-type(1) {
  1300. font-size: 14px;
  1301. float: left;
  1302. // color: #005BAB;
  1303. margin-top: 0.3rem;
  1304. margin-right: 0.5rem;
  1305. }
  1306. & > span:nth-of-type(2) {
  1307. padding: 0 1rem;
  1308. line-height: 2rem;
  1309. height: 2rem;
  1310. border: 1px solid #d3d3d3;
  1311. display: inline-block;
  1312. background: #005bab;
  1313. color: white;
  1314. border-radius: 0.2rem;
  1315. cursor: pointer;
  1316. }
  1317. .catalogInput {
  1318. width: 170px;
  1319. margin-right: 0.5rem;
  1320. .el-input__inner {
  1321. height: 2rem;
  1322. border: 1px solid #d3d3d3;
  1323. float: left;
  1324. border-radius: 0.2rem;
  1325. text-indent: 0.5rem;
  1326. padding: 0 10px;
  1327. }
  1328. }
  1329. }
  1330. .cart_button {
  1331. border-bottom: 1px solid #dbdbdb;
  1332. overflow: hidden;
  1333. button {
  1334. margin: 1rem 0;
  1335. padding: 0.5rem;
  1336. background: #005bab;
  1337. color: white;
  1338. border: none;
  1339. border-radius: 0.2rem;
  1340. float: right;
  1341. cursor: pointer;
  1342. }
  1343. }
  1344. .cart_button_f {
  1345. overflow: hidden;
  1346. display: flex;
  1347. flex-direction: column;
  1348. align-items: flex-end;
  1349. .cart_text {
  1350. font-size: 14px;
  1351. font-weight: 600;
  1352. // float: right;
  1353. color: #005bab;
  1354. margin-top: 1rem;
  1355. span {
  1356. font-weight: 600;
  1357. font-size: 18px;
  1358. }
  1359. }
  1360. button {
  1361. padding: 0.5rem;
  1362. background: #005bab;
  1363. color: white;
  1364. border: none;
  1365. border-radius: 0.2rem;
  1366. margin-top: 0.5rem;
  1367. cursor: pointer;
  1368. // float: right;
  1369. }
  1370. }
  1371. .footer_card {
  1372. line-height: 1.8;
  1373. }
  1374. .table_pmd {
  1375. display: none;
  1376. }
  1377. .footerbox_text {
  1378. display: none;
  1379. }
  1380. .customer_box {
  1381. border: 1px solid #dbdbdb;
  1382. padding: 1rem 2rem;
  1383. .customer {
  1384. .title {
  1385. font-size: 1.2rem;
  1386. color: #331515;
  1387. margin-bottom: 20px;
  1388. font-weight: 600;
  1389. display: flex;
  1390. align-items: center;
  1391. flex-wrap: wrap;
  1392. .required {
  1393. color: red;
  1394. }
  1395. .horizontal {
  1396. width: 60px;
  1397. height: 1px;
  1398. background-color: #bdbdbd;
  1399. margin-left: 10px;
  1400. }
  1401. }
  1402. .checked_b {
  1403. margin: 1rem 0;
  1404. }
  1405. .demo-form-inline /deep/ {
  1406. .el-form-item {
  1407. width: 48%;
  1408. .el-form-item__content {
  1409. width: 60%;
  1410. .el-select {
  1411. width: 100%;
  1412. }
  1413. }
  1414. }
  1415. }
  1416. }
  1417. }
  1418. .checkButtom {
  1419. margin-top: 10px;
  1420. .buttom {
  1421. margin: 1rem 0 0;
  1422. padding: 0.5rem 2rem;
  1423. background: #005bab;
  1424. color: #fff;
  1425. border: none;
  1426. border-radius: 0.2rem;
  1427. float: right;
  1428. cursor: pointer;
  1429. }
  1430. }
  1431. }
  1432. @media screen and (min-width: 0px) and (max-width: 750px) {
  1433. .box {
  1434. width: 100%;
  1435. overflow: hidden;
  1436. }
  1437. .topbox_text {
  1438. font-size: 0.18rem;
  1439. margin-bottom: 0.2rem;
  1440. }
  1441. .contentbox {
  1442. width: 100%;
  1443. overflow: hidden;
  1444. }
  1445. .contentbox > .cart_f {
  1446. font-size: 0.16rem;
  1447. padding: 0.2rem 0.14rem;
  1448. font-weight: 700;
  1449. font-family: Arial;
  1450. color: #005bab;
  1451. background: #cfe0ef;
  1452. }
  1453. .bottomcontentbox_b {
  1454. margin-top: 0.2rem;
  1455. width: 100%;
  1456. overflow: hidden;
  1457. padding: 0.08rem 0.14rem;
  1458. border: 1px solid #dbdbdb;
  1459. background: #ffffff;
  1460. }
  1461. .bottomcontentbox /deep/ {
  1462. // margin-top: 0.12rem;
  1463. // padding: 0rem 0.14rem;
  1464. overflow: hidden;
  1465. .table_boxf {
  1466. display: none;
  1467. }
  1468. // 将el-table的展开图标替换为其他图标
  1469. .el-table__expand-icon {
  1470. width: 0.2rem;
  1471. height: 0.2rem;
  1472. margin: 0 auto;
  1473. border-radius: 4px;
  1474. -webkit-transform: rotate(90deg);
  1475. transform: rotate(90deg);
  1476. background: #005bab;
  1477. color: #ffffff;
  1478. }
  1479. .el-table__expand-icon .el-icon-arrow-right:before {
  1480. content: "\";
  1481. border: 1px solid #ccc;
  1482. // padding: 2px;
  1483. border: none;
  1484. }
  1485. .el-table__expand-icon--expanded .el-icon-arrow-right:before {
  1486. content: "\";
  1487. }
  1488. .el-table__cell {
  1489. padding: 0;
  1490. .el-form-item {
  1491. margin: 0;
  1492. width: 100%;
  1493. border-bottom: 1px solid #dbdbdb;
  1494. display: flex;
  1495. .el-form-item__label {
  1496. width: 40%;
  1497. padding-left: 0.2rem;
  1498. border-right: 1px solid #dbdbdb;
  1499. }
  1500. .el-form-item__content {
  1501. width: 60%;
  1502. padding-left: 0.2rem;
  1503. background: #f0f5fa;
  1504. .el-icon-delete {
  1505. color: #005bab;
  1506. }
  1507. }
  1508. }
  1509. }
  1510. .el-table {
  1511. border: 1px solid #dfdfdf;
  1512. margin-top: 0.12rem !important ;
  1513. // margin-bottom:0.14rem !important ;
  1514. .el-table__header-wrapper {
  1515. width: 100%;
  1516. .el-table__header {
  1517. width: 100% !important;
  1518. colgroup {
  1519. // col{
  1520. // width: 20% !important;
  1521. // }
  1522. col:nth-of-type(1) {
  1523. width: 10% !important;
  1524. }
  1525. col:nth-of-type(2) {
  1526. width: 15% !important;
  1527. }
  1528. col:nth-of-type(3) {
  1529. width: 20% !important;
  1530. }
  1531. col:nth-of-type(4) {
  1532. width: 15% !important;
  1533. }
  1534. col:nth-of-type(5) {
  1535. width: 25% !important;
  1536. }
  1537. col:nth-of-type(6) {
  1538. width: 15% !important;
  1539. }
  1540. }
  1541. thead {
  1542. tr {
  1543. width: 60px !important;
  1544. th {
  1545. width: 60px !important;
  1546. .cell {
  1547. font-size: 12px;
  1548. padding: 0 4px;
  1549. font-family: Arial;
  1550. font-weight: bold;
  1551. color: #005bab;
  1552. }
  1553. }
  1554. }
  1555. }
  1556. }
  1557. }
  1558. .el-table__body-wrapper {
  1559. .el-table__body {
  1560. width: 100% !important;
  1561. colgroup {
  1562. width: 100% !important;
  1563. col:nth-of-type(1) {
  1564. width: 10% !important;
  1565. }
  1566. col:nth-of-type(2) {
  1567. width: 15% !important;
  1568. }
  1569. col:nth-of-type(3) {
  1570. width: 20% !important;
  1571. }
  1572. col:nth-of-type(4) {
  1573. width: 15% !important;
  1574. }
  1575. col:nth-of-type(5) {
  1576. width: 25% !important;
  1577. }
  1578. col:nth-of-type(6) {
  1579. width: 15% !important;
  1580. }
  1581. }
  1582. tbody {
  1583. .el-table__row {
  1584. .el-table__cell {
  1585. &:nth-of-type(2) {
  1586. .cell {
  1587. font-family: Arial;
  1588. color: #005bab;
  1589. }
  1590. }
  1591. .cell {
  1592. font-size: 12px;
  1593. padding: 0 4px;
  1594. line-height: 0.24rem;
  1595. .size_data {
  1596. .size_q {
  1597. width: 40% !important;
  1598. max-width: 100px;
  1599. .el-input__inner {
  1600. width: 100% !important;
  1601. }
  1602. }
  1603. .el-select {
  1604. max-width: 100px;
  1605. width: 60% !important;
  1606. .el-input__inner {
  1607. padding-right: 16px;
  1608. }
  1609. .el-input__suffix {
  1610. .el-select__caret {
  1611. width: 16px;
  1612. }
  1613. }
  1614. }
  1615. }
  1616. .el-input-number {
  1617. .el-input-number__decrease {
  1618. width: 0.16rem;
  1619. }
  1620. .el-input-number__increase {
  1621. width: 0.16rem;
  1622. }
  1623. }
  1624. }
  1625. }
  1626. }
  1627. }
  1628. }
  1629. }
  1630. .el-table__empty-block {
  1631. width: 100% !important;
  1632. }
  1633. }
  1634. .size_data {
  1635. display: flex;
  1636. align-items: center;
  1637. .size_q {
  1638. width: 0.4rem;
  1639. .el-input__inner {
  1640. height: 0.24rem;
  1641. border: 1px solid #dfdfdf;
  1642. line-height: 0.24rem;
  1643. padding: 0 0.03rem;
  1644. width: 0.4rem;
  1645. // border-radius: 0.2rem;
  1646. }
  1647. }
  1648. .el-select {
  1649. width: 0.6rem;
  1650. .el-input__inner {
  1651. height: 0.24rem;
  1652. line-height: 0.24rem;
  1653. padding-left: 0.05rem;
  1654. }
  1655. .el-input__icon {
  1656. line-height: 0.24rem;
  1657. }
  1658. }
  1659. }
  1660. .el-input-number {
  1661. width: 100%;
  1662. .el-input-number__decrease {
  1663. width: 0.24rem;
  1664. height: 0.22rem;
  1665. line-height: 0.22rem;
  1666. top: 7px;
  1667. }
  1668. .el-input-number__increase {
  1669. width: 0.24rem;
  1670. height: 0.22rem;
  1671. line-height: 0.22rem;
  1672. top: 7px;
  1673. }
  1674. .el-input {
  1675. .el-input__inner {
  1676. height: 0.26rem;
  1677. line-height: 0.26rem;
  1678. padding: 0 0.24rem;
  1679. border: 1px solid #dfdfdf;
  1680. &:focus {
  1681. border: 1px solid #dfdfdf;
  1682. }
  1683. }
  1684. }
  1685. }
  1686. }
  1687. .input_box /deep/ {
  1688. display: flex;
  1689. align-items: center;
  1690. & > span:nth-of-type(1) {
  1691. font-size: 0.12rem;
  1692. float: left;
  1693. color: #005bab;
  1694. margin-right: 0.1rem;
  1695. }
  1696. & > span:nth-of-type(2) {
  1697. // padding: 0 1rem;
  1698. line-height: 0.28rem;
  1699. height: 0.28rem;
  1700. border: 1px solid #d3d3d3;
  1701. // float: left;
  1702. display: inline-block;
  1703. background: #005bab;
  1704. color: white;
  1705. cursor: pointer;
  1706. padding: 0 0.1rem;
  1707. }
  1708. .catalogInput {
  1709. width: 1rem;
  1710. .el-input__inner {
  1711. height: 0.28rem;
  1712. line-height: 0.28rem;
  1713. // border: none;
  1714. float: left;
  1715. padding: 0 0.1rem;
  1716. }
  1717. }
  1718. }
  1719. .cart_button {
  1720. border-bottom: 1px solid #dbdbdb;
  1721. overflow: hidden;
  1722. margin-bottom: 0.2rem;
  1723. button {
  1724. width: 100%;
  1725. margin: 0.2rem 0;
  1726. height: 0.4rem;
  1727. background: #005bab;
  1728. color: white;
  1729. border: none;
  1730. border-radius: 4px;
  1731. font-size: 0.18rem;
  1732. }
  1733. }
  1734. .cart_button_f {
  1735. overflow: hidden;
  1736. display: flex;
  1737. flex-direction: column;
  1738. // align-items: flex-end;
  1739. .cart_text {
  1740. font-size: 0.16rem;
  1741. font-weight: 600;
  1742. margin-bottom: 0.08rem;
  1743. color: #005bab;
  1744. span {
  1745. font-weight: 600;
  1746. font-size: 0.22rem;
  1747. }
  1748. }
  1749. button {
  1750. width: 100%;
  1751. height: 0.4rem;
  1752. background: #005bab;
  1753. color: white;
  1754. border: none;
  1755. border-radius: 4px;
  1756. margin-top: 0.16rem;
  1757. font-size: 0.18rem;
  1758. margin-bottom: 0.22rem;
  1759. }
  1760. }
  1761. .footer_card {
  1762. display: none;
  1763. }
  1764. .footerbox_text {
  1765. margin-top: 0.2rem;
  1766. .footer_text {
  1767. font-size: 0.14rem;
  1768. line-height: 1.8;
  1769. word-wrap: break-word;
  1770. word-break: normal;
  1771. }
  1772. }
  1773. .customer_box {
  1774. border: 1px solid #dbdbdb;
  1775. padding: 0.1rem 0.1rem;
  1776. .customer {
  1777. .title {
  1778. font-size: 0.12rem;
  1779. color: #331515;
  1780. margin-bottom: 20px;
  1781. font-weight: 600;
  1782. display: flex;
  1783. align-items: center;
  1784. flex-wrap: wrap;
  1785. // white-space: nowrap;
  1786. .required {
  1787. color: red;
  1788. }
  1789. .horizontal {
  1790. width: 60px;
  1791. height: 1px;
  1792. background-color: #bdbdbd;
  1793. margin-left: 10px;
  1794. }
  1795. }
  1796. .checked_b {
  1797. margin: 0.1rem 0;
  1798. }
  1799. .demo-form-inline /deep/ {
  1800. .el-form-item {
  1801. width: 100%;
  1802. display: flex;
  1803. .el-form-item__content {
  1804. flex: 1;
  1805. .el-select {
  1806. width: 100%;
  1807. }
  1808. }
  1809. }
  1810. }
  1811. }
  1812. }
  1813. .checkButtom {
  1814. margin-top: 10px;
  1815. .buttom {
  1816. width: 100%;
  1817. padding: 0.12rem;
  1818. background: #005bab;
  1819. color: #fff;
  1820. border: none;
  1821. border-radius: 0.1rem;
  1822. cursor: pointer;
  1823. }
  1824. }
  1825. }
  1826. </style>