index.vue 71 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760
  1. <template>
  2. <div class="tenant">
  3. <div class="content">
  4. <byTable
  5. :source="sourceList.data"
  6. :pagination="sourceList.pagination"
  7. :config="config"
  8. :loading="loading"
  9. highlight-current-row
  10. :action-list="[
  11. {
  12. text: '创建单证',
  13. action: () => openModal(),
  14. },
  15. ]"
  16. @get-list="getList">
  17. <template #acceptCode="{ item }">
  18. <div>
  19. <div style="color: #409eff" v-if="item.acceptCode">{{ item.acceptCarriage }} ({{ item.acceptCode }})</div>
  20. <div v-else>
  21. <el-button type="warning" style="background-color: var(--el-button-bg-color) !important" @click="clickAddAcceptCode(item)">填写</el-button>
  22. </div>
  23. </div>
  24. </template>
  25. <template #toView="{ item }">
  26. <div>
  27. <el-button type="warning" style="background-color: var(--el-button-bg-color) !important" @click="clickToView(item)">查看</el-button>
  28. </div>
  29. </template>
  30. </byTable>
  31. </div>
  32. <el-dialog title="创建单证" v-if="dialogVisible" v-model="dialogVisible" width="1000">
  33. <byForm :formConfig="formConfig" :formOption="formOption" v-model="formData.data" :rules="rules" ref="submit" v-loading="loadingDialog">
  34. <template #details>
  35. <div style="width: 100%">
  36. <el-table :data="formData.data.documentsProductList" style="width: 100%; margin-top: 16px">
  37. <el-table-column label="货物描述" min-width="240">
  38. <template #default="{ row, $index }">
  39. <div style="width: 100%">
  40. <el-form-item :prop="'documentsProductList.' + $index + '.describes'" :rules="rules.describes" :inline-message="true">
  41. <el-input v-model="row.describes" placeholder="请输入货物描述" />
  42. </el-form-item>
  43. </div>
  44. </template>
  45. </el-table-column>
  46. <el-table-column label="副描述" min-width="200">
  47. <template #default="{ row, $index }">
  48. <div style="width: 100%">
  49. <el-form-item :prop="'documentsProductList.' + $index + '.subDescribe'" :rules="rules.subDescribe" :inline-message="true">
  50. <el-input v-model="row.subDescribe" placeholder="请输入副描述" />
  51. </el-form-item>
  52. </div>
  53. </template>
  54. </el-table-column>
  55. <el-table-column label="海关编码" width="160">
  56. <template #default="{ row, $index }">
  57. <div style="width: 100%">
  58. <el-form-item :prop="'documentsProductList.' + $index + '.customsCode'" :rules="rules.customsCode" :inline-message="true">
  59. <el-input v-model="row.customsCode" placeholder="请输入海关编码" />
  60. </el-form-item>
  61. </div>
  62. </template>
  63. </el-table-column>
  64. <el-table-column label="数量" width="160">
  65. <template #default="{ row, $index }">
  66. <div style="width: 100%">
  67. <el-form-item :prop="'documentsProductList.' + $index + '.quantity'" :rules="rules.quantity" :inline-message="true">
  68. <el-input-number v-model="row.quantity" placeholder="请输入数量" style="width: 100%" :precision="0" :controls="false" :min="0" />
  69. </el-form-item>
  70. </div>
  71. </template>
  72. </el-table-column>
  73. <el-table-column label="单价" width="160">
  74. <template #default="{ row, $index }">
  75. <div style="width: 100%">
  76. <el-form-item :prop="'documentsProductList.' + $index + '.price'" :rules="rules.price" :inline-message="true">
  77. <el-input-number v-model="row.price" placeholder="请输入单价" style="width: 100%" :precision="2" :controls="false" :min="0" />
  78. </el-form-item>
  79. </div>
  80. </template>
  81. </el-table-column>
  82. </el-table>
  83. </div>
  84. </template>
  85. </byForm>
  86. <template #footer>
  87. <el-button @click="dialogVisible = false" size="large">取 消</el-button>
  88. <el-button type="primary" @click="submitForm()" size="large">确 定</el-button>
  89. </template>
  90. </el-dialog>
  91. <el-dialog title="货运详情" v-if="openAddAcceptCode" v-model="openAddAcceptCode" width="600">
  92. <byForm :formConfig="formConfigTwo" :formOption="formOption" v-model="formDataTwo.data" :rules="rulesTwo" ref="submitTwo" v-loading="loadingTwo">
  93. <template #departureTime>
  94. <div>
  95. <el-date-picker v-model="formDataTwo.data.departureTime" type="datetime" placeholder="请选择起运时间" value-format="YYYY-MM-DD HH:mm:ss" />
  96. </div>
  97. </template>
  98. <template #file>
  99. <div style="width: 100%">
  100. <el-upload
  101. v-model:fileList="fileList"
  102. action="https://winfaster.obs.cn-south-1.myhuaweicloud.com"
  103. :data="uploadData"
  104. multiple
  105. :before-upload="uploadFile"
  106. :on-preview="onPreviewFile">
  107. <el-button>选择</el-button>
  108. </el-upload>
  109. </div>
  110. </template>
  111. </byForm>
  112. <template #footer>
  113. <el-button @click="openAddAcceptCode = false" size="large">取 消</el-button>
  114. <el-button type="primary" @click="submitTwoForm()" size="large">确 定</el-button>
  115. </template>
  116. </el-dialog>
  117. <el-dialog title="打印" v-if="openSelectPrint" v-model="openSelectPrint" width="600">
  118. <div>
  119. <el-button @click="clickPrint(1)" type="primary">装箱单</el-button>
  120. <el-button @click="clickPrint(2)" type="primary">商业发票</el-button>
  121. <el-button @click="clickPrint(3)" type="primary">销售确认书</el-button>
  122. <el-button @click="clickPrint(4)" type="primary">报关单</el-button>
  123. </div>
  124. <template #footer>
  125. <el-button @click="openSelectPrint = false" size="large">关闭</el-button>
  126. </template>
  127. </el-dialog>
  128. <el-dialog title="打印" v-if="openPrint" v-model="openPrint" width="860">
  129. <div id="printMe">
  130. <div id="pdfDom" style="width: 800px; padding: 16px; font-size: 12px !important">
  131. <div v-if="openStatus === 1">
  132. <div style="font-size: 16px; text-align: center; font-weight: 700">装箱单</div>
  133. <div style="font-size: 16px; text-align: center; text-decoration: underline; font-weight: 700">PACKING LIST</div>
  134. </div>
  135. <div v-else-if="openStatus === 2">
  136. <div style="font-size: 16px; text-align: center; font-weight: 700">商业发票</div>
  137. <div style="font-size: 16px; text-align: center; text-decoration: underline; font-weight: 700">COMMERCIAL INVOICE</div>
  138. </div>
  139. <div v-else-if="openStatus === 3">
  140. <div style="font-size: 16px; text-align: center; font-weight: 700">合同</div>
  141. <div style="font-size: 16px; text-align: center; text-decoration: underline; font-weight: 700">CONTRACT</div>
  142. </div>
  143. <div style="padding-top: 8px" v-if="[1, 2].includes(openStatus)">
  144. <div>C.I. NO. : {{ printDetails.contract.code }}</div>
  145. <div>C.I. DATE: {{ printDetails.date }}</div>
  146. </div>
  147. <div style="padding-top: 8px" v-else-if="[3].includes(openStatus)">
  148. <div>P.I. NO. : {{ printDetails.contract.code }}</div>
  149. <div>P.I. DATE: {{ printDetails.date }}</div>
  150. </div>
  151. <!-- <div style="height: 16px"></div> -->
  152. <div style="border: 1px solid black; display: flex" v-if="[1, 2].includes(openStatus)">
  153. <div style="width: 50%; border-right: 1px solid black; padding-left: 4px">
  154. <div style="font-weight: 700">买方 SOLD TO MESSRS:</div>
  155. <div>{{ printDetails.customer.name }}</div>
  156. <div style="padding-top: 16px" v-if="[2].includes(openStatus)">
  157. <span style="font-weight: 700">TAX NUMBER:</span>
  158. <span> {{ printDetails.contract.taxNumber }} </span>
  159. </div>
  160. <div style="padding: 16px 0">
  161. {{ printDetails.contract.buyAddress }},{{ printDetails.contract.buyPostalCode }},{{ printDetails.contract.buyCityName }},{{
  162. printDetails.contract.buyProvinceName
  163. }},{{ printDetails.contract.buyCountryName }}
  164. </div>
  165. <div v-if="[2].includes(openStatus)">
  166. <span style="font-weight: 700">POST CODE:</span>
  167. <span> {{ printDetails.contract.buyPostalCode }} </span>
  168. </div>
  169. <div style="padding-top: 16px">CONTRACT: {{ printDetails.contract.buyContactName }}</div>
  170. <div>TEL.: {{ printDetails.contract.buyContactNumber }}</div>
  171. </div>
  172. <div style="width: 50%; padding-left: 4px">
  173. <div style="font-weight: 700">卖方 VENDOR:</div>
  174. <div>{{ printDetails.corporation.name }}</div>
  175. <div>{{ printDetails.corporation.nameEn }}</div>
  176. <div style="padding: 16px 0">
  177. {{ printDetails.contract.sellAddress }},{{ printDetails.contract.sellCityName }},{{ printDetails.contract.sellProvinceName }},{{
  178. printDetails.contract.sellCountryName
  179. }}
  180. </div>
  181. <div>CONTRACT: {{ printDetails.contract.sellContactName }}</div>
  182. <div>TEL.: {{ printDetails.contract.sellContactNumber }}</div>
  183. </div>
  184. </div>
  185. <div style="border: 1px solid black; display: flex" v-else-if="[3].includes(openStatus)">
  186. <div style="width: 50%; border-right: 1px solid black; padding-left: 4px">
  187. <div style="font-weight: 700">卖方 VENDOR:</div>
  188. <div>{{ printDetails.corporation.name }}</div>
  189. <div>{{ printDetails.corporation.nameEn }}</div>
  190. <div style="padding: 16px 0">
  191. {{ printDetails.contract.sellAddress }},{{ printDetails.contract.sellCityName }},{{ printDetails.contract.sellProvinceName }},{{
  192. printDetails.contract.sellCountryName
  193. }}
  194. </div>
  195. <div>CONTRACT: {{ printDetails.contract.sellContactName }}</div>
  196. <div>TEL.: {{ printDetails.contract.sellContactNumber }}</div>
  197. </div>
  198. <div style="width: 50%; padding-left: 4px">
  199. <div style="font-weight: 700">买方 BUYER:</div>
  200. <div>{{ printDetails.customer.name }}</div>
  201. <div style="padding-top: 16px">
  202. <span style="font-weight: 700">TAX NUMBER:</span>
  203. <span> {{ printDetails.contract.taxNumber }} </span>
  204. </div>
  205. <div style="padding: 16px 0">
  206. {{ printDetails.contract.buyAddress }},{{ printDetails.contract.buyPostalCode }},{{ printDetails.contract.buyCityName }},{{
  207. printDetails.contract.buyProvinceName
  208. }},{{ printDetails.contract.buyCountryName }}
  209. </div>
  210. <div>
  211. <span style="font-weight: 700">POST CODE:</span>
  212. <span> {{ printDetails.contract.buyPostalCode }} </span>
  213. </div>
  214. <div style="padding-top: 16px">CONTRACT: {{ printDetails.contract.buyContactName }}</div>
  215. <div>TEL.: {{ printDetails.contract.buyContactNumber }}</div>
  216. </div>
  217. </div>
  218. <div style="height: 16px"></div>
  219. <div style="border: 1px solid black" v-if="[1, 2].includes(openStatus)">
  220. <div style="display: flex; width: 100%">
  221. <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black; padding-left: 4px">
  222. <div style="font-weight: 700">原产国 COUNTRY OF ORIGIN:</div>
  223. <div>{{ printDetails.contract.sellCountryName }}</div>
  224. </div>
  225. <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black; padding-left: 4px">
  226. <div style="font-weight: 700">目的国 COUNTRY OF DESTINATION:</div>
  227. <div>{{ printDetails.documents.countryName }}</div>
  228. </div>
  229. <div style="width: 33%; border-bottom: 1px solid black; padding-left: 4px">
  230. <div style="font-weight: 700">贸易方式 TERMS OF DELIVERY:</div>
  231. <div>
  232. {{ dictValueLabel(printDetails.contract.tradeMethods, tradeMethods) }}
  233. </div>
  234. </div>
  235. </div>
  236. <div style="display: flex; width: 100%">
  237. <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black; padding-left: 4px">
  238. <div style="font-weight: 700">付款方式 TERMS OF PAYMENT:</div>
  239. <div>
  240. {{ printDetails.contract.remark }}
  241. </div>
  242. </div>
  243. <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black; padding-left: 4px">
  244. <div style="font-weight: 700">交货期 DELIVERY TIME:</div>
  245. <div>{{ printDetails.contract.deliveryTime }}</div>
  246. </div>
  247. <div style="width: 33%; border-bottom: 1px solid black; padding-left: 4px">
  248. <div style="font-weight: 700">运输方式 EXPORT BY/VIA:</div>
  249. <div>
  250. {{ dictValueLabel(printDetails.contract.transportMethod, shippingMethod) }}
  251. </div>
  252. </div>
  253. </div>
  254. <div style="display: flex; width: 100%">
  255. <div style="width: 33%; border-right: 1px solid black; padding-left: 4px">
  256. <div style="font-weight: 700">装卸港 PLACE OF DISCHARGE:</div>
  257. <div>{{ printDetails.contract.transportRemark }}</div>
  258. </div>
  259. <div style="width: 34%; border-right: 1px solid black; padding-left: 4px">
  260. <div style="font-weight: 700">目的港 FINAL DESTINATION:</div>
  261. <div>{{ printDetails.documents.portOfDestination }}</div>
  262. </div>
  263. <div style="width: 33%; padding-left: 4px">
  264. <div style="font-weight: 700">质保期 WARRANTY:</div>
  265. <div>
  266. <span v-if="printDetails.contract.warranty">{{ printDetails.contract.warranty }}天</span>
  267. </div>
  268. </div>
  269. </div>
  270. </div>
  271. <div style="border: 1px solid black" v-else-if="[3].includes(openStatus)">
  272. <div style="display: flex; width: 100%">
  273. <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black; padding-left: 4px">
  274. <div style="font-weight: 700">COUNTRY OF ORIGIN:</div>
  275. <div>{{ printDetails.contract.sellCountryName }}</div>
  276. </div>
  277. <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black; padding-left: 4px">
  278. <div style="font-weight: 700">COUNTRY OF DESTINATION:</div>
  279. <div>{{ printDetails.documents.countryName }}</div>
  280. </div>
  281. <div style="width: 33%; border-bottom: 1px solid black; padding-left: 4px">
  282. <div style="font-weight: 700">PLACE OF DISCHARGE:</div>
  283. <div>{{ printDetails.contract.transportRemark }}</div>
  284. </div>
  285. </div>
  286. <div style="display: flex; width: 100%">
  287. <div style="width: 33%; border-bottom: 1px solid black; border-right: 1px solid black; padding-left: 4px">
  288. <div style="font-weight: 700">TERMS OF DELIVERY:</div>
  289. <div>
  290. {{ dictValueLabel(printDetails.contract.tradeMethods, tradeMethods) }}
  291. </div>
  292. </div>
  293. <div style="width: 34%; border-bottom: 1px solid black; border-right: 1px solid black; padding-left: 4px">
  294. <div style="font-weight: 700">CURRENCY:</div>
  295. <div>
  296. {{ printDetails.contract.currency }}
  297. </div>
  298. </div>
  299. <div style="width: 33%; border-bottom: 1px solid black; padding-left: 4px">
  300. <div style="font-weight: 700">EXPORT BY/VIA:</div>
  301. <div>
  302. {{ dictValueLabel(printDetails.contract.transportMethod, shippingMethod) }}
  303. </div>
  304. </div>
  305. </div>
  306. <div style="display: flex; width: 100%">
  307. <div style="width: 33%; border-right: 1px solid black; padding-left: 4px">
  308. <div style="font-weight: 700">DELIVERY TIME:</div>
  309. <div>{{ printDetails.contract.deliveryTime }}</div>
  310. </div>
  311. <div style="width: 67%; padding-left: 4px">
  312. <div style="font-weight: 700">付款方式 TERMS OF PAYMENT:</div>
  313. <div>
  314. {{ printDetails.contract.remark }}
  315. </div>
  316. </div>
  317. </div>
  318. </div>
  319. <div style="height: 16px"></div>
  320. <div style="border: 1px solid black" v-if="[1, 2].includes(openStatus)">
  321. <div style="display: flex; width: 100%">
  322. <div style="width: 33%; border-right: 1px solid black; padding-left: 4px">
  323. <div style="font-weight: 700">唛头及箱号 MARK & NUMBERS</div>
  324. <div style="padding: 8px 0" v-html="getStyle(printDetails.documents.remark)"></div>
  325. </div>
  326. <div style="width: 34%; border-right: 1px solid black; padding-left: 4px">
  327. <div style="font-weight: 700">包装规格 PACKING & DESCRIPTION</div>
  328. <div v-if="printDetails.packDetailList && printDetails.packDetailList.length > 0">
  329. <div style="padding: 8px 0" v-for="(item, index) in printDetails.packDetailList" :key="index">
  330. <span style="padding-right: 16px">{{ index + 1 }}</span>
  331. <span v-if="item.boxLong">{{ item.boxLong }}cm</span>
  332. <span>*</span>
  333. <span v-if="item.boxWide">{{ item.boxWide }}cm</span>
  334. <span>*</span>
  335. <span v-if="item.boxHigh">{{ item.boxHigh }}cm</span>
  336. <span>*</span>
  337. <span>{{ item.packQuantity }}TNS</span>
  338. </div>
  339. </div>
  340. </div>
  341. <div style="width: 33%; padding-left: 4px">
  342. <div style="font-weight: 700">总毛重 TOTAL GROSS WEIGHT/KG</div>
  343. <div>{{ printDetails.sumRoughWeight }}</div>
  344. <div style="font-weight: 700">总净重 TOTAL NET WEIGHT/KG</div>
  345. <div>{{ printDetails.sumNetWeight }}</div>
  346. <div style="font-weight: 700">总体积 TOTAL DIMENSION/M3</div>
  347. <div>{{ printDetails.sumBomVolume }}</div>
  348. </div>
  349. </div>
  350. </div>
  351. <div style="height: 16px"></div>
  352. <table class="three" cellspacing="0" cellpadding="0" border="0" style="width: 100%; border-bottom: 0">
  353. <thead>
  354. <tr>
  355. <td style="width: 100px">
  356. 项目
  357. <br />
  358. ITEM NO.
  359. </td>
  360. <td>
  361. 货物描述
  362. <br />
  363. DESCRIPTION OF GOODS
  364. </td>
  365. <template v-if="[3].includes(openStatus)">
  366. <td style="width: 100px">
  367. 单位
  368. <br />
  369. UNIT
  370. </td>
  371. </template>
  372. <td style="width: 100px">
  373. 数量
  374. <br />
  375. QUANTITY
  376. <br />
  377. (SET/PCS)
  378. </td>
  379. <template v-if="[1].includes(openStatus)">
  380. <td style="width: 100px">
  381. 净重
  382. <br />
  383. N.W./ KG
  384. </td>
  385. <td style="width: 100px; border-right: 0">
  386. 毛重
  387. <br />
  388. G.W./ KG
  389. </td>
  390. </template>
  391. <template v-if="[2, 3].includes(openStatus)">
  392. <td style="width: 100px">
  393. 单价
  394. <br />
  395. UNIT PRICE
  396. <br />
  397. {{ dictValueLabel(printDetails.contract.currency, accountCurrency) }}
  398. </td>
  399. <td style="width: 100px; border-right: 0">
  400. 总价
  401. <br />
  402. TOTAL PRICE
  403. <br />
  404. {{ dictValueLabel(printDetails.contract.currency, accountCurrency) }}
  405. </td>
  406. </template>
  407. </tr>
  408. </thead>
  409. <tbody v-if="printDetails.documentsProducts && printDetails.documentsProducts.length > 0">
  410. <tr v-for="(item, index) in printDetails.documentsProducts" :key="index">
  411. <td style="text-align: center">{{ index + 1 }}</td>
  412. <td>
  413. <div style="text-align: center">{{ item.describes }}</div>
  414. <div style="text-align: center">{{ item.subDescribe }}</div>
  415. <div style="text-align: center">HS CODE: {{ item.customsCode }}</div>
  416. </td>
  417. <td style="text-align: center" v-if="[3].includes(openStatus)">
  418. {{ dictValueLabel(item.productUnit, productUnit) }}
  419. </td>
  420. <td style="text-align: center">{{ item.quantity }}</td>
  421. <td :rowspan="printDetails.documentsProducts.length" style="text-align: center" v-if="index === 0 && [1].includes(openStatus)">
  422. {{ printDetails.sumNetWeight }}
  423. </td>
  424. <td :rowspan="printDetails.documentsProducts.length" style="text-align: center; border-right: 0" v-if="index === 0 && [1].includes(openStatus)">
  425. {{ printDetails.sumRoughWeight }}
  426. </td>
  427. <td style="text-align: center" v-if="[2, 3].includes(openStatus)">{{ printDetails.contract.currency }}{{ item.price }}</td>
  428. <td style="text-align: center; border-right: 0" v-if="[2, 3].includes(openStatus)">
  429. {{ printDetails.contract.currency }}{{ parseFloat(Number(item.quantity) * Number(item.price)).toFixed(2) }}
  430. </td>
  431. </tr>
  432. </tbody>
  433. <template v-if="[2].includes(openStatus)">
  434. <tr>
  435. <td :colspan="2" style="text-align: left; padding-left: 4px">SUBTOTAL:</td>
  436. <td style="text-align: center">
  437. {{ statistics("quantity", "", 0) }}
  438. </td>
  439. <td></td>
  440. <td style="text-align: center">{{ printDetails.contract.currency }}{{ statistics("price", "quantity", 2) }}</td>
  441. </tr>
  442. <template v-if="printDetails.contractProjectList && printDetails.contractProjectList.length > 0">
  443. <tr v-for="(item, index) in printDetails.contractProjectList" :key="index">
  444. <td :colspan="4" style="text-align: left; padding-left: 4px">{{ item.payName }}:</td>
  445. <td style="text-align: center">{{ printDetails.contract.currency }}{{ item.amount }}</td>
  446. </tr>
  447. </template>
  448. <tr>
  449. <td :colspan="4" style="text-align: left; padding-left: 4px">
  450. TOTAL
  451. {{ dictValueLabel(printDetails.contract.tradeMethods, tradeMethods) }}
  452. PRICE:
  453. </td>
  454. <td style="text-align: center">{{ printDetails.contract.currency }}{{ getAllMoney(statistics("price", "quantity", 2)) }}</td>
  455. </tr>
  456. </template>
  457. <template v-if="[3].includes(openStatus)">
  458. <tr>
  459. <td :colspan="3" style="text-align: left; padding-left: 4px">SUBTOTAL:</td>
  460. <td style="text-align: center">
  461. {{ statistics("quantity", "", 0) }}
  462. </td>
  463. <td></td>
  464. <td style="text-align: center">{{ printDetails.contract.currency }}{{ statistics("price", "quantity", 2) }}</td>
  465. </tr>
  466. <template v-if="printDetails.contractProjectList && printDetails.contractProjectList.length > 0">
  467. <tr v-for="(item, index) in printDetails.contractProjectList" :key="index">
  468. <td :colspan="5" style="text-align: left; padding-left: 4px">{{ item.payName }}:</td>
  469. <td style="text-align: center">{{ printDetails.contract.currency }}{{ item.amount }}</td>
  470. </tr>
  471. </template>
  472. <tr>
  473. <td :colspan="5" style="text-align: left; padding-left: 4px">
  474. TOTAL
  475. {{ dictValueLabel(printDetails.contract.tradeMethods, tradeMethods) }}
  476. PRICE:
  477. </td>
  478. <td style="text-align: center">{{ printDetails.contract.currency }}{{ getAllMoney(statistics("price", "quantity", 2)) }}</td>
  479. </tr>
  480. </template>
  481. </table>
  482. <div v-if="[1].includes(openStatus)">
  483. <div style="font-weight: 700; padding: 4px 0">THE PACK FOR ABOVE CARGO ARE AS BELOWING SHOWS:</div>
  484. <table
  485. class="three"
  486. cellspacing="0"
  487. cellpadding="0"
  488. border="0"
  489. style="width: 100%; border-bottom: 0"
  490. v-if="printDetails.packDetailList && printDetails.packDetailList.length > 0">
  491. <tbody v-for="(item, index) in printDetails.packDetailList" :key="index">
  492. <tr v-for="(itemAAA, indexAAA) in item.packDetailGoodsList" :key="indexAAA">
  493. <td :rowspan="item.packDetailGoodsList.length" style="text-align: center; width: 100px" v-if="indexAAA === 0">CTN NO.{{ index + 1 }}</td>
  494. <td>
  495. <div style="text-align: center">{{ itemAAA.remark }}</div>
  496. </td>
  497. <td style="text-align: center; width: 100px">
  498. {{ itemAAA.unit }}
  499. </td>
  500. <td style="text-align: center; width: 100px">
  501. {{ itemAAA.quantity }}
  502. </td>
  503. <td :rowspan="item.packDetailGoodsList.length" style="text-align: center; width: 200px; border-right: 0" v-if="indexAAA === 0">
  504. <span v-if="item.boxLong">{{ item.boxLong }}cm</span>
  505. <span>*</span>
  506. <span v-if="item.boxLong">{{ item.boxWide }}cm</span>
  507. <span>*</span>
  508. <span v-if="item.boxLong">{{ item.boxHigh }}cm</span>
  509. <span> / {{ item.roughWeight }}KG</span>
  510. </td>
  511. </tr>
  512. </tbody>
  513. </table>
  514. </div>
  515. <div v-if="[3].includes(openStatus)">
  516. <div style="height: 16px"></div>
  517. <div class="baseRow">
  518. <div class="contentRow" style="width: 100%; font-weight: 700">ACCOUNT INFORMATION:</div>
  519. </div>
  520. <div class="baseRow" style="border-bottom: 1px solid black">
  521. <div class="contentRow" style="width: 100%">
  522. <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
  523. Beneficiary Name: {{ printDetails.contract.beneficiaryName }}
  524. </div>
  525. <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
  526. Beneficiary Bank: {{ printDetails.contract.beneficiaryBank }}
  527. </div>
  528. <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
  529. Beneficiary Bank Address:
  530. {{ printDetails.contract.beneficiaryBankAddress }}
  531. </div>
  532. <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
  533. Beneficiary Account Number:
  534. {{ printDetails.contract.beneficiaryAccountNumber }}
  535. </div>
  536. <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
  537. Swift Code: {{ printDetails.contract.swiftCode }}
  538. </div>
  539. <div style="line-height: 24px; padding-left: 4px; word-break: break-all; word-wrap: break-word">
  540. Beneficiary Address:
  541. {{ printDetails.contract.beneficiaryAddress }}
  542. </div>
  543. </div>
  544. </div>
  545. <div style="height: 32px"></div>
  546. <div style="display: flex">
  547. <div style="width: 50%">
  548. <div style="font-weight: 700">CONFIRMED BY VENDOR:</div>
  549. <div>{{ printDetails.corporation.nameEn }}</div>
  550. </div>
  551. <div style="width: 50%">
  552. <div style="font-weight: 700">CONFIRMED BY BUYER:</div>
  553. <div>{{ printDetails.customer.name }}</div>
  554. </div>
  555. </div>
  556. </div>
  557. </div>
  558. </div>
  559. <template #footer>
  560. <el-button @click="openPrint = false" size="large">取消</el-button>
  561. <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
  562. </template>
  563. </el-dialog>
  564. <el-dialog title="打印" v-if="openCustomsDeclaration" v-model="openCustomsDeclaration" width="1460">
  565. <div id="printMe">
  566. <div id="pdfDom" style="width: 1400px; padding: 16px; font-size: 12px !important">
  567. <table cellspacing="0" cellpadding="0" border="0" class="one">
  568. <tr>
  569. <td colspan="8">
  570. <span style="font-weight: 700">出口货物正式报关单草单/申报信息填制模板</span>
  571. </td>
  572. </tr>
  573. <tr>
  574. <td colspan="2" style="background-color: #dce6f1">
  575. <div>发件公司清关负责人</div>
  576. <div>联系电话/手机(必填)</div>
  577. </td>
  578. <td colspan="2" style="background-color: #ebf1de">
  579. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  580. {{ printCustomsDeclaration.content.contacts }}
  581. </div>
  582. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  583. {{ printCustomsDeclaration.content.contactsMobile }}
  584. </div>
  585. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.contacts" size="small" />
  586. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.contactsMobile" size="small" />
  587. </td>
  588. <td colspan="2" style="background-color: #dce6f1">
  589. <span>联系人邮箱</span>
  590. </td>
  591. <td colspan="2" style="background-color: #ebf1de; text-align: left">
  592. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  593. {{ printCustomsDeclaration.content.contactsEmail }}
  594. </div>
  595. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.contactsEmail" size="small" />
  596. </td>
  597. </tr>
  598. <tr style="background-color: #dce6f1">
  599. <td colspan="2">
  600. <span>境内发货人名称(填写发货公司中文名称)</span>
  601. </td>
  602. <td colspan="2">
  603. <span>境内发货人代码(填写18位统一社会信用代码,没有信用证代码填报10位海关备案编码)</span>
  604. </td>
  605. <td colspan="2">
  606. <span>出境关别(不用填写)</span>
  607. </td>
  608. <td colspan="2">
  609. <span>备案号(如是手册的请填写)</span>
  610. </td>
  611. </tr>
  612. <tr>
  613. <td colspan="2">
  614. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  615. {{ printCustomsDeclaration.content.companyNameChinese }}
  616. </div>
  617. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.companyNameChinese" size="small" />
  618. </td>
  619. <td colspan="2">
  620. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  621. {{ printCustomsDeclaration.content.organizationCode }}
  622. </div>
  623. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.organizationCode" size="small" />
  624. </td>
  625. <td colspan="2">
  626. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  627. {{ printCustomsDeclaration.content.exitCustoms }}
  628. </div>
  629. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.exitCustoms" size="small" />
  630. </td>
  631. <td colspan="2">
  632. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  633. {{ printCustomsDeclaration.content.recordNo }}
  634. </div>
  635. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.recordNo" size="small" />
  636. </td>
  637. </tr>
  638. <tr style="background-color: #dce6f1">
  639. <td colspan="2">
  640. <span>境外收货人(指合同买方或合同指定的收货人公司英文名称)</span>
  641. </td>
  642. <td colspan="2">
  643. <span>境外收货人代码(AEO互认企业需填报AEO编码;不填默认非AEO互认)</span>
  644. </td>
  645. <td colspan="2">
  646. <span>运输方式(不用填写)</span>
  647. </td>
  648. <td>
  649. <span>运输工具名称及航次号(不用填写)</span>
  650. </td>
  651. <td>
  652. <span>提运单号(指12位快递运单号码)</span>
  653. </td>
  654. </tr>
  655. <tr>
  656. <td colspan="2" style="background-color: #ebf1de">
  657. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  658. {{ printCustomsDeclaration.content.customerCompanyName }}
  659. </div>
  660. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.customerCompanyName" size="small" />
  661. </td>
  662. <td colspan="2">
  663. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  664. {{ printCustomsDeclaration.content.overseasConsigneeCode }}
  665. </div>
  666. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.overseasConsigneeCode" size="small" />
  667. </td>
  668. <td colspan="2">
  669. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  670. {{ printCustomsDeclaration.content.typeOfShipping }}
  671. </div>
  672. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.typeOfShipping" size="small" />
  673. </td>
  674. <td>
  675. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  676. {{ printCustomsDeclaration.content.meansOfTransport }}
  677. </div>
  678. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.meansOfTransport" size="small" />
  679. </td>
  680. <td>
  681. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  682. {{ printCustomsDeclaration.content.waybillCode }}
  683. </div>
  684. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.waybillCode" size="small" />
  685. </td>
  686. </tr>
  687. <tr style="background-color: #dce6f1">
  688. <td colspan="2">
  689. <span>生产销售单位(指生产该产品的公司名称)</span>
  690. </td>
  691. <td colspan="2">
  692. <span>生产销售单位代码(填写18位统一社会信用代码,没有信用证代码填写“NO”)</span>
  693. </td>
  694. <td colspan="2">
  695. <span>监管方式</span>
  696. </td>
  697. <td>
  698. <span>征免性质(与监管方式对应填写)</span>
  699. </td>
  700. <td>
  701. <span>许可证号(如需许可证的请填写)</span>
  702. </td>
  703. </tr>
  704. <tr>
  705. <td colspan="2">
  706. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  707. {{ printCustomsDeclaration.content.productCompanyNameChinese }}
  708. </div>
  709. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.productCompanyNameChinese" size="small" />
  710. </td>
  711. <td colspan="2">
  712. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  713. {{ printCustomsDeclaration.content.productOrganizationCode }}
  714. </div>
  715. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.productOrganizationCode" size="small" />
  716. </td>
  717. <td colspan="2">
  718. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  719. {{ printCustomsDeclaration.content.supervisionMode }}
  720. </div>
  721. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.supervisionMode" size="small" />
  722. </td>
  723. <td>
  724. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  725. {{ printCustomsDeclaration.content.exemptionNature }}
  726. </div>
  727. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.exemptionNature" size="small" />
  728. </td>
  729. <td>
  730. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  731. {{ printCustomsDeclaration.content.licenseKey }}
  732. </div>
  733. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.licenseKey" size="small" />
  734. </td>
  735. </tr>
  736. <tr style="background-color: #dce6f1">
  737. <td colspan="2">
  738. <span>合同协议号(根据合同填写)</span>
  739. </td>
  740. <td colspan="2">
  741. <span>贸易国(合同买方所在国)</span>
  742. </td>
  743. <td colspan="2">
  744. <span>运抵国</span>
  745. </td>
  746. <td>
  747. <span>指运港(不用填写)</span>
  748. </td>
  749. <td>
  750. <span>离境口岸(不用填写)</span>
  751. </td>
  752. </tr>
  753. <tr>
  754. <td colspan="2" style="background-color: #ebf1de">
  755. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  756. {{ printCustomsDeclaration.content.contractCode }}
  757. </div>
  758. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.contractCode" size="small" />
  759. </td>
  760. <td colspan="2" style="background-color: #ebf1de">
  761. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  762. {{ printCustomsDeclaration.content.tradingCountry }}
  763. </div>
  764. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.tradingCountry" size="small" />
  765. </td>
  766. <td colspan="2" style="background-color: #ebf1de">
  767. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  768. {{ printCustomsDeclaration.content.arrivalCountry }}
  769. </div>
  770. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.arrivalCountry" size="small" />
  771. </td>
  772. <td>
  773. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  774. {{ printCustomsDeclaration.content.portOfDestination }}
  775. </div>
  776. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.portOfDestination" size="small" />
  777. </td>
  778. <td>
  779. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  780. {{ printCustomsDeclaration.content.departurePort }}
  781. </div>
  782. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.departurePort" size="small" />
  783. </td>
  784. </tr>
  785. <tr style="background-color: #dce6f1">
  786. <td>
  787. <span>包装种类</span>
  788. </td>
  789. <td>
  790. <span>件数(运单和装箱单一致)</span>
  791. </td>
  792. <td>
  793. <span>毛重(千克)</span>
  794. </td>
  795. <td>
  796. <span>净重(千克)</span>
  797. </td>
  798. <td>
  799. <span>成交方式</span>
  800. </td>
  801. <td>
  802. <span>运费</span>
  803. </td>
  804. <td>
  805. <span>保费</span>
  806. </td>
  807. <td>
  808. <span>杂费(如有请填写)</span>
  809. </td>
  810. </tr>
  811. <tr>
  812. <td style="background-color: #ebf1de">
  813. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  814. {{ printCustomsDeclaration.content.packageType }}
  815. </div>
  816. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.packageType" size="small" />
  817. </td>
  818. <td style="background-color: #ebf1de">
  819. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  820. {{ printCustomsDeclaration.content.sumPackQuantity }}
  821. </div>
  822. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.sumPackQuantity" size="small" />
  823. </td>
  824. <td style="background-color: #ebf1de">
  825. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  826. {{ printCustomsDeclaration.content.sumRoughWeight }}
  827. </div>
  828. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.sumRoughWeight" size="small" />
  829. </td>
  830. <td style="background-color: #ebf1de">
  831. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  832. {{ printCustomsDeclaration.content.sumNetWeight }}
  833. </div>
  834. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.sumNetWeight" size="small" />
  835. </td>
  836. <td style="background-color: #ebf1de">
  837. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  838. {{ printCustomsDeclaration.content.tradeModeName }}
  839. </div>
  840. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.tradeModeName" size="small" />
  841. </td>
  842. <td>
  843. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  844. {{ printCustomsDeclaration.content.freightPrice }}
  845. </div>
  846. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.freightPrice" size="small" />
  847. </td>
  848. <td>
  849. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  850. {{ printCustomsDeclaration.content.premiumPrice }}
  851. </div>
  852. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.premiumPrice" size="small" />
  853. </td>
  854. <td>
  855. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  856. {{ printCustomsDeclaration.content.incidentalPrice }}
  857. </div>
  858. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.incidentalPrice" size="small" />
  859. </td>
  860. </tr>
  861. <tr>
  862. <td colspan="3" style="background-color: #dce6f1">
  863. <span>随附单证及编号(常见如通关单号、原进口报关单号)</span>
  864. </td>
  865. <td colspan="5">
  866. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  867. {{ printCustomsDeclaration.content.documentsAttached }}
  868. </div>
  869. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.documentsAttached" size="small" />
  870. </td>
  871. </tr>
  872. <tr>
  873. <td colspan="2" style="background-color: #dce6f1">
  874. <span>标记唛码及备注</span>
  875. </td>
  876. <td colspan="2" style="background-color: #ebf1de">
  877. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  878. {{ printCustomsDeclaration.content.shippingMark }}
  879. </div>
  880. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.shippingMark" size="small" />
  881. </td>
  882. <td style="background-color: #dce6f1">
  883. <span>境内货源地</span>
  884. </td>
  885. <td colspan="3" style="background-color: #ebf1de; text-align: left">
  886. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  887. {{ printCustomsDeclaration.content.withinChinaSource }}
  888. </div>
  889. <el-input autosize type="textarea" v-if="!textShow" v-model="printCustomsDeclaration.content.withinChinaSource" size="small" />
  890. </td>
  891. </tr>
  892. </table>
  893. <table cellspacing="0" cellpadding="0" border="0" class="two">
  894. <tr>
  895. <th style="width: 20px">
  896. <span>项号</span>
  897. </th>
  898. <th style="width: 140px">
  899. <span>商品编号(13位)原10位海关编码+3位检验检疫附加编码</span>
  900. </th>
  901. <th style="width: 140px">
  902. <span>商品名称</span>
  903. </th>
  904. <th>
  905. <span>品牌</span>
  906. </th>
  907. <th>
  908. <span>品牌类型</span>
  909. </th>
  910. <th style="width: 140px">
  911. <span>出口享惠情况(不填写则默认不享受)</span>
  912. </th>
  913. <th>
  914. <span>型号</span>
  915. </th>
  916. <th style="width: 140px">
  917. <span>税号所需申报要素(如:用途、材质等)</span>
  918. </th>
  919. <th>
  920. <span>各项净重</span>
  921. </th>
  922. <th>
  923. <span>成交数量</span>
  924. </th>
  925. <th>
  926. <span>成交单位</span>
  927. </th>
  928. <th>
  929. <span>原产国(地区)</span>
  930. </th>
  931. <th>
  932. <span>总价与币制</span>
  933. </th>
  934. <th>
  935. <span>成交单价</span>
  936. </th>
  937. <th>
  938. <span>EXW 单价</span>
  939. </th>
  940. </tr>
  941. <template v-if="printCustomsDeclaration.content.products && printCustomsDeclaration.content.products.length > 0">
  942. <tr v-for="(item, index) in printCustomsDeclaration.content.products" :key="index">
  943. <td>
  944. <span>{{ index + 1 }}</span>
  945. </td>
  946. <td>
  947. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  948. {{ item.customsCode }}
  949. </div>
  950. <el-input autosize type="textarea" v-if="!textShow" v-model="item.customsCode" size="small" />
  951. </td>
  952. <td>
  953. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  954. {{ item.productName }}
  955. </div>
  956. <el-input autosize type="textarea" v-if="!textShow" v-model="item.productName" size="small" />
  957. </td>
  958. <td>
  959. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  960. {{ item.brand }}
  961. </div>
  962. <el-input autosize type="textarea" v-if="!textShow" v-model="item.brand" size="small" />
  963. </td>
  964. <td>
  965. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  966. {{ item.brandType }}
  967. </div>
  968. <el-input autosize type="textarea" v-if="!textShow" v-model="item.brandType" size="small" />
  969. </td>
  970. <td>
  971. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  972. {{ item.exportBenefits }}
  973. </div>
  974. <el-input autosize type="textarea" v-if="!textShow" v-model="item.exportBenefits" size="small" />
  975. </td>
  976. <td>
  977. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  978. {{ item.productModelChinese }}
  979. </div>
  980. <el-input autosize type="textarea" v-if="!textShow" v-model="item.productModelChinese" size="small" />
  981. </td>
  982. <td>
  983. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  984. {{ item.declareRemark }}
  985. </div>
  986. <el-input autosize type="textarea" v-if="!textShow" v-model="item.declareRemark" size="small" />
  987. </td>
  988. <td>
  989. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  990. {{ item.netWeight }}
  991. </div>
  992. <el-input autosize type="textarea" v-if="!textShow" v-model="item.netWeight" size="small" />
  993. </td>
  994. <td>
  995. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  996. {{ item.quantity }}
  997. </div>
  998. <el-input autosize type="textarea" v-if="!textShow" v-model="item.quantity" size="small" />
  999. </td>
  1000. <td>
  1001. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  1002. {{ item.unit }}
  1003. </div>
  1004. <el-input autosize type="textarea" v-if="!textShow" v-model="item.unit" size="small" />
  1005. </td>
  1006. <td>
  1007. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  1008. {{ item.countryChinese }}
  1009. </div>
  1010. <el-input autosize type="textarea" v-if="!textShow" v-model="item.countryChinese" size="small" />
  1011. </td>
  1012. <td>
  1013. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  1014. {{ item.sumPrice }}
  1015. </div>
  1016. <el-input autosize type="textarea" v-if="!textShow" v-model="item.sumPrice" size="small" />
  1017. </td>
  1018. <td>
  1019. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  1020. {{ item.declaredPrice }}
  1021. </div>
  1022. <el-input autosize type="textarea" v-if="!textShow" v-model="item.declaredPrice" size="small" />
  1023. </td>
  1024. <td>
  1025. <div style="word-wrap: break-word; padding: 0 4px" v-if="textShow">
  1026. {{ item.exwPrice }}
  1027. </div>
  1028. <el-input autosize type="textarea" v-if="!textShow" v-model="item.exwPrice" size="small" />
  1029. </td>
  1030. </tr>
  1031. </template>
  1032. <tr>
  1033. <td colspan="15" style="text-align: left; padding-left: 8px">
  1034. <span style="color: red">
  1035. 我司保证以上所提供的信息及资料准确无误,如在海关申报、查验时有任何异议,所造成的损失及后果由我司承担。 确认签名/盖章:_________________________
  1036. </span>
  1037. </td>
  1038. </tr>
  1039. </table>
  1040. </div>
  1041. </div>
  1042. <template #footer>
  1043. <el-button @click="openCustomsDeclaration = false" size="large">取消</el-button>
  1044. <el-button type="primary" @click="clickDownload()" size="large">下载PDF</el-button>
  1045. <el-button type="primary" @click="clickSave()" size="large">保存</el-button>
  1046. </template>
  1047. </el-dialog>
  1048. </div>
  1049. </template>
  1050. <script setup>
  1051. import { computed, ref } from "vue";
  1052. import byTable from "@/components/byTable/index";
  1053. import byForm from "@/components/byForm/index";
  1054. import { ElMessage, ElMessageBox } from "element-plus";
  1055. import useUserStore from "@/store/modules/user";
  1056. const { proxy } = getCurrentInstance();
  1057. const shipmentList = ref([]);
  1058. const countryData = ref([]);
  1059. const fundsPaymentMethod = ref([]);
  1060. const shippingMethod = ref([]);
  1061. const tradeMethods = ref([]);
  1062. const accountCurrency = ref([]);
  1063. const productUnit = ref([]);
  1064. const sourceList = ref({
  1065. data: [],
  1066. pagination: {
  1067. total: 0,
  1068. pageNum: 1,
  1069. pageSize: 10,
  1070. keyword: "",
  1071. warehouseId: "",
  1072. toWarehouseId: "",
  1073. type: "3",
  1074. },
  1075. });
  1076. const loading = ref(false);
  1077. const config = computed(() => {
  1078. return [
  1079. {
  1080. attrs: {
  1081. label: "归属公司",
  1082. prop: "sellCorporationName",
  1083. "min-width": 260,
  1084. },
  1085. },
  1086. {
  1087. attrs: {
  1088. label: "客户名称",
  1089. prop: "buyCorporationName",
  1090. "min-width": 200,
  1091. },
  1092. },
  1093. {
  1094. attrs: {
  1095. label: "主合同编号",
  1096. prop: "code",
  1097. width: 200,
  1098. },
  1099. },
  1100. {
  1101. attrs: {
  1102. label: "货运详情",
  1103. slot: "acceptCode",
  1104. width: 200,
  1105. },
  1106. },
  1107. {
  1108. attrs: {
  1109. label: "查看单证",
  1110. slot: "toView",
  1111. width: 140,
  1112. },
  1113. },
  1114. {
  1115. attrs: {
  1116. label: "创建时间",
  1117. prop: "createTime",
  1118. width: 160,
  1119. },
  1120. },
  1121. {
  1122. attrs: {
  1123. label: "操作",
  1124. width: "80",
  1125. align: "center",
  1126. },
  1127. renderHTML(row) {
  1128. return [
  1129. {
  1130. attrs: {
  1131. label: "删除",
  1132. type: "primary",
  1133. text: true,
  1134. },
  1135. el: "button",
  1136. click() {
  1137. ElMessageBox.confirm("此操作将永久删除该数据, 是否继续?", "提示", {
  1138. confirmButtonText: "确定",
  1139. cancelButtonText: "取消",
  1140. type: "warning",
  1141. }).then(() => {
  1142. proxy
  1143. .post("/documents/delete", {
  1144. id: row.id,
  1145. })
  1146. .then(() => {
  1147. ElMessage({
  1148. message: "删除成功",
  1149. type: "success",
  1150. });
  1151. getList();
  1152. });
  1153. });
  1154. },
  1155. },
  1156. ];
  1157. },
  1158. },
  1159. ];
  1160. });
  1161. const getDict = () => {
  1162. proxy.post("/customizeArea/list", { parentId: "0" }).then((res) => {
  1163. if (res && res.length > 0) {
  1164. countryData.value = res.map((item) => {
  1165. return {
  1166. label: item.name,
  1167. value: item.id,
  1168. };
  1169. });
  1170. }
  1171. });
  1172. proxy
  1173. .post("/dictTenantData/page", {
  1174. pageNum: 1,
  1175. pageSize: 999,
  1176. dictCode: "funds_payment_method",
  1177. tenantId: useUserStore().user.tenantId,
  1178. })
  1179. .then((res) => {
  1180. if (res.rows && res.rows.length > 0) {
  1181. fundsPaymentMethod.value = res.rows.map((item) => {
  1182. return {
  1183. label: item.dictValue,
  1184. value: item.dictKey,
  1185. };
  1186. });
  1187. }
  1188. });
  1189. proxy
  1190. .post("/dictTenantData/page", {
  1191. pageNum: 1,
  1192. pageSize: 999,
  1193. dictCode: "shipping_method",
  1194. tenantId: useUserStore().user.tenantId,
  1195. })
  1196. .then((res) => {
  1197. if (res.rows && res.rows.length > 0) {
  1198. shippingMethod.value = res.rows.map((item) => {
  1199. return {
  1200. label: item.dictValue,
  1201. value: item.dictKey,
  1202. };
  1203. });
  1204. }
  1205. });
  1206. proxy
  1207. .post("/dictTenantData/page", {
  1208. pageNum: 1,
  1209. pageSize: 999,
  1210. dictCode: "trade_mode",
  1211. tenantId: useUserStore().user.tenantId,
  1212. })
  1213. .then((res) => {
  1214. if (res.rows && res.rows.length > 0) {
  1215. tradeMethods.value = res.rows.map((item) => {
  1216. return {
  1217. label: item.dictValue,
  1218. value: item.dictKey,
  1219. };
  1220. });
  1221. }
  1222. });
  1223. proxy
  1224. .post("/dictTenantData/page", {
  1225. pageNum: 1,
  1226. pageSize: 999,
  1227. dictCode: "account_currency",
  1228. tenantId: useUserStore().user.tenantId,
  1229. })
  1230. .then((res) => {
  1231. if (res.rows && res.rows.length > 0) {
  1232. accountCurrency.value = res.rows.map((item) => {
  1233. return {
  1234. label: item.dictValue,
  1235. value: item.dictKey,
  1236. };
  1237. });
  1238. }
  1239. });
  1240. proxy
  1241. .post("/dictTenantData/page", {
  1242. pageNum: 1,
  1243. pageSize: 999,
  1244. dictCode: "unit",
  1245. tenantId: useUserStore().user.tenantId,
  1246. })
  1247. .then((res) => {
  1248. if (res.rows && res.rows.length > 0) {
  1249. productUnit.value = res.rows.map((item) => {
  1250. return {
  1251. label: item.dictValue,
  1252. value: item.dictKey,
  1253. };
  1254. });
  1255. }
  1256. });
  1257. };
  1258. const getList = async (req) => {
  1259. sourceList.value.pagination = { ...sourceList.value.pagination, ...req };
  1260. loading.value = true;
  1261. proxy.post("/documents/page", sourceList.value.pagination).then((res) => {
  1262. sourceList.value.data = res.rows;
  1263. sourceList.value.pagination.total = res.total;
  1264. setTimeout(() => {
  1265. loading.value = false;
  1266. }, 200);
  1267. });
  1268. };
  1269. getDict();
  1270. getList();
  1271. const dialogVisible = ref(false);
  1272. const loadingDialog = ref(false);
  1273. const submit = ref(null);
  1274. const formOption = reactive({
  1275. inline: true,
  1276. labelWidth: 100,
  1277. itemWidth: 100,
  1278. rules: [],
  1279. });
  1280. const formData = reactive({
  1281. data: {
  1282. documentsProductList: [],
  1283. },
  1284. });
  1285. const formConfig = computed(() => {
  1286. return [
  1287. {
  1288. type: "select",
  1289. prop: "contractId",
  1290. label: "出货主合同",
  1291. required: true,
  1292. data: shipmentList.value,
  1293. fn: (val) => {
  1294. changeContract(val);
  1295. },
  1296. },
  1297. {
  1298. type: "slot",
  1299. slotName: "details",
  1300. label: "产品信息",
  1301. },
  1302. {
  1303. label: "唛头信息",
  1304. },
  1305. {
  1306. type: "select",
  1307. prop: "countryId",
  1308. label: "目的国",
  1309. required: true,
  1310. filterable: true,
  1311. data: countryData.value,
  1312. itemWidth: 40,
  1313. },
  1314. {
  1315. type: "input",
  1316. prop: "portOfDestination",
  1317. label: "目的港",
  1318. itemWidth: 60,
  1319. },
  1320. {
  1321. type: "input",
  1322. prop: "remark",
  1323. label: "唛头明细",
  1324. itemType: "textarea",
  1325. },
  1326. ];
  1327. });
  1328. const rules = ref({
  1329. contractId: [{ required: true, message: "请选择出货主合同", trigger: "change" }],
  1330. countryId: [{ required: true, message: "请选择目的国", trigger: "change" }],
  1331. describes: [{ required: true, message: "请输入货物描述", trigger: "blur" }],
  1332. subDescribe: [{ required: true, message: "请输入副描述", trigger: "blur" }],
  1333. customsCode: [{ required: true, message: "请输入海关编码", trigger: "blur" }],
  1334. quantity: [{ required: true, message: "请输入数量", trigger: "blur" }],
  1335. price: [{ required: true, message: "请输入单价", trigger: "blur" }],
  1336. });
  1337. const openModal = () => {
  1338. proxy.post("/packShipment/list", {}).then((res) => {
  1339. if (res && res.length > 0) {
  1340. shipmentList.value = res.map((item) => {
  1341. return {
  1342. packShipmentId: item.id,
  1343. label: item.contractCode,
  1344. value: item.contractId,
  1345. packDetailIds: item.packDetailIds,
  1346. };
  1347. });
  1348. } else {
  1349. shipmentList.value = [];
  1350. }
  1351. });
  1352. formData.data = {
  1353. documentsProductList: [],
  1354. };
  1355. loadingDialog.value = false;
  1356. dialogVisible.value = true;
  1357. };
  1358. const changeContract = (val) => {
  1359. if (val) {
  1360. let data = shipmentList.value.filter((item) => item.value === val);
  1361. if (data && data.length > 0) {
  1362. formData.data.packShipmentId = data[0].packShipmentId;
  1363. proxy
  1364. .post("/packShipment/productDetailList", {
  1365. packDetailIds: data[0].packDetailIds,
  1366. })
  1367. .then((res) => {
  1368. if (res && res.length > 0) {
  1369. formData.data.documentsProductList = res.map((item) => {
  1370. return {
  1371. businessId: item.businessId,
  1372. productId: item.productId,
  1373. describes: item.remark,
  1374. subDescribe: item.subDescription,
  1375. customsCode: item.customsCode,
  1376. quantity: item.quantity,
  1377. price: item.price,
  1378. type: item.type,
  1379. };
  1380. });
  1381. } else {
  1382. formData.data.documentsProductList = [];
  1383. }
  1384. });
  1385. } else {
  1386. formData.data.documentsProductList = [];
  1387. }
  1388. proxy.post("/contract/detail", { id: val }).then((res) => {
  1389. formData.data.countryId = res.buyCountryId;
  1390. });
  1391. } else {
  1392. formData.data.documentsProductList = [];
  1393. }
  1394. };
  1395. const submitForm = () => {
  1396. submit.value.handleSubmit(() => {
  1397. loadingDialog.value = true;
  1398. proxy.post("/documents/add", formData.data).then(
  1399. () => {
  1400. ElMessage({
  1401. message: "提交成功",
  1402. type: "success",
  1403. });
  1404. dialogVisible.value = false;
  1405. sourceList.value.pagination.pageNum = 1;
  1406. getList();
  1407. },
  1408. (err) => {
  1409. console.log(err);
  1410. loadingDialog.value = false;
  1411. }
  1412. );
  1413. });
  1414. };
  1415. const openAddAcceptCode = ref(false);
  1416. const loadingTwo = ref(false);
  1417. const submitTwo = ref(null);
  1418. const fileList = ref([]);
  1419. const uploadData = ref({});
  1420. const formDataTwo = reactive({
  1421. data: {
  1422. documentsId: "",
  1423. },
  1424. });
  1425. const formConfigTwo = computed(() => {
  1426. return [
  1427. {
  1428. type: "input",
  1429. prop: "acceptCarriage",
  1430. label: "承运方",
  1431. itemType: "text",
  1432. itemWidth: 40,
  1433. },
  1434. {
  1435. type: "input",
  1436. prop: "code",
  1437. label: "单号",
  1438. itemType: "text",
  1439. itemWidth: 60,
  1440. },
  1441. {
  1442. type: "slot",
  1443. prop: "departureTime",
  1444. slotName: "departureTime",
  1445. label: "起运时间",
  1446. },
  1447. {
  1448. type: "input",
  1449. prop: "remark",
  1450. label: "备注",
  1451. itemType: "textarea",
  1452. },
  1453. {
  1454. type: "slot",
  1455. prop: "file",
  1456. slotName: "file",
  1457. label: "上传附件",
  1458. },
  1459. ];
  1460. });
  1461. const rulesTwo = ref({
  1462. acceptCarriage: [{ required: true, message: "请输入承运方", trigger: "blur" }],
  1463. code: [{ required: true, message: "请输入承运单号", trigger: "blur" }],
  1464. departureTime: [{ required: true, message: "请选择起运时间", trigger: "change" }],
  1465. });
  1466. const clickAddAcceptCode = (item) => {
  1467. formDataTwo.data = {
  1468. documentsId: item.id,
  1469. };
  1470. fileList.value = [];
  1471. openAddAcceptCode.value = true;
  1472. };
  1473. const uploadFile = async (file) => {
  1474. const res = await proxy.post("/fileInfo/getSing", { fileName: file.name });
  1475. uploadData.value = res.uploadBody;
  1476. file.id = res.id;
  1477. file.fileName = res.fileName;
  1478. file.fileUrl = res.fileUrl;
  1479. return true;
  1480. };
  1481. const onPreviewFile = (file) => {
  1482. window.open(file.raw.fileUrl, "_blank");
  1483. };
  1484. const submitTwoForm = () => {
  1485. submitTwo.value.handleSubmit(() => {
  1486. if (fileList.value && fileList.value.length > 0) {
  1487. formDataTwo.data.fileList = fileList.value.map((item) => {
  1488. return {
  1489. id: item.raw.id,
  1490. fileName: item.raw.fileName,
  1491. fileUrl: item.raw.fileUrl,
  1492. };
  1493. });
  1494. } else {
  1495. formDataTwo.data.fileList = [];
  1496. }
  1497. loadingTwo.value = true;
  1498. proxy.post("/documentsTransport/add", formDataTwo.data).then(
  1499. () => {
  1500. ElMessage({
  1501. message: "提交成功",
  1502. type: "success",
  1503. });
  1504. openAddAcceptCode.value = false;
  1505. getList();
  1506. },
  1507. (err) => {
  1508. console.log(err);
  1509. loadingTwo.value = false;
  1510. }
  1511. );
  1512. });
  1513. };
  1514. const rowData = ref({});
  1515. const openSelectPrint = ref(false);
  1516. const clickToView = (item) => {
  1517. rowData.value = item;
  1518. openSelectPrint.value = true;
  1519. printDetails.value = {
  1520. packDetailGoodsList: [],
  1521. documents: {},
  1522. contract: {},
  1523. corporation: {},
  1524. packDetailList: [],
  1525. documentsProducts: [],
  1526. customer: {},
  1527. };
  1528. proxy.get("/documents/generateInvoiceAPackPdf", { id: rowData.value.id }).then((res) => {
  1529. printDetails.value = res.data;
  1530. });
  1531. };
  1532. const openPrint = ref(false);
  1533. const openStatus = ref("");
  1534. const printDetails = ref({
  1535. packDetailGoodsList: [],
  1536. documents: {},
  1537. contract: {},
  1538. contractProjectList: [],
  1539. corporation: {},
  1540. packDetailList: [],
  1541. documentsProducts: [],
  1542. customer: {},
  1543. });
  1544. const openCustomsDeclaration = ref(false);
  1545. const printCustomsDeclaration = ref({
  1546. content: {},
  1547. });
  1548. const textShow = ref(false);
  1549. const clickPrint = (status) => {
  1550. // printDetails.value = {
  1551. // packDetailGoodsList: [],
  1552. // documents: {},
  1553. // contract: {},
  1554. // contractProjectList: [],
  1555. // corporation: {},
  1556. // packDetailList: [],
  1557. // documentsProducts: [],
  1558. // customer: {},
  1559. // };
  1560. if ([1, 2, 3].includes(status)) {
  1561. openStatus.value = status;
  1562. openPrint.value = true;
  1563. } else {
  1564. printCustomsDeclaration.value = {
  1565. content: {},
  1566. };
  1567. openStatus.value = status;
  1568. textShow.value = false;
  1569. openCustomsDeclaration.value = true;
  1570. proxy.get("/documents/generateClearanceePdf", { id: rowData.value.id }).then((res) => {
  1571. if (res.data.content) {
  1572. res.data.content = JSON.parse(res.data.content);
  1573. }
  1574. printCustomsDeclaration.value = res.data;
  1575. });
  1576. }
  1577. // proxy.get("/documents/generateInvoiceAPackPdf", { id: rowData.value.id }).then((res) => {
  1578. // printDetails.value = res.data;
  1579. // });
  1580. };
  1581. const clickDownload = () => {
  1582. if (openStatus.value === 1) {
  1583. proxy.getPdf("装箱单PDF文件");
  1584. } else if (openStatus.value === 2) {
  1585. proxy.getPdf("商业发票PDF文件");
  1586. } else if (openStatus.value === 3) {
  1587. proxy.getPdf("销售确认书PDF文件");
  1588. } else if (openStatus.value === 4) {
  1589. textShow.value = true;
  1590. let data = proxy.deepClone(printCustomsDeclaration.value);
  1591. data.content = JSON.stringify(data.content);
  1592. proxy.post("/documentsPdf/add", data).then();
  1593. setTimeout(() => {
  1594. proxy.getPdfTransverseA4("报关单PDF文件");
  1595. nextTick(() => {
  1596. setTimeout(() => {
  1597. textShow.value = false;
  1598. }, 1000);
  1599. });
  1600. }, 1000);
  1601. }
  1602. };
  1603. const clickSave = () => {
  1604. if (openStatus.value === 1) {
  1605. proxy.getPdf("装箱单PDF文件");
  1606. } else if (openStatus.value === 2) {
  1607. proxy.getPdf("商业发票PDF文件");
  1608. } else if (openStatus.value === 3) {
  1609. proxy.getPdf("销售确认书PDF文件");
  1610. } else if (openStatus.value === 4) {
  1611. textShow.value = true;
  1612. let data = proxy.deepClone(printCustomsDeclaration.value);
  1613. data.content = JSON.stringify(data.content);
  1614. proxy.post("/documentsPdf/add", data).then((res) => {
  1615. ElMessage({
  1616. message: "保存成功",
  1617. type: "success",
  1618. });
  1619. });
  1620. }
  1621. };
  1622. const getStyle = (text) => {
  1623. if (text) {
  1624. return text.replace(/\n|\r\n/g, "<br>");
  1625. } else {
  1626. return "";
  1627. }
  1628. };
  1629. const statistics = (label, label2, index) => {
  1630. let num = 0;
  1631. if (printDetails.value.documentsProducts && printDetails.value.documentsProducts.length > 0) {
  1632. printDetails.value.documentsProducts.map((item) => {
  1633. if (label2) {
  1634. if (item[label] && item[label2]) {
  1635. num = parseFloat(Number(num) + Number(item[label]) * Number(item[label2])).toFixed(index);
  1636. }
  1637. } else {
  1638. if (item[label]) {
  1639. num = parseFloat(Number(num) + Number(item[label])).toFixed(index);
  1640. }
  1641. }
  1642. });
  1643. }
  1644. return num;
  1645. };
  1646. const getAllMoney = (num) => {
  1647. let money = num;
  1648. if (printDetails.value.contractProjectList && printDetails.value.contractProjectList.length > 0) {
  1649. printDetails.value.contractProjectList.map((item) => {
  1650. if (item.amount) {
  1651. money = parseFloat(Number(money) + Number(item.amount)).toFixed(2);
  1652. }
  1653. });
  1654. }
  1655. return money;
  1656. };
  1657. const printObj = ref({
  1658. id: "printMe",
  1659. popTitle: "",
  1660. extraCss: "https://cdn.bootcdn.net/ajax/libs/animate.css/4.1.1/animate.compat.css, https://cdn.bootcdn.net/ajax/libs/hover.css/2.3.1/css/hover-min.css",
  1661. extraHead: '<meta http-equiv="Content-Language"content="zh-cn"/>',
  1662. });
  1663. </script>
  1664. <style lang="scss" scoped>
  1665. .tenant {
  1666. padding: 20px;
  1667. }
  1668. ::v-deep(.el-input-number .el-input__inner) {
  1669. text-align: left;
  1670. }
  1671. .baseRow {
  1672. min-height: 20px;
  1673. border-top: 1px solid black;
  1674. border-left: 1px solid black;
  1675. }
  1676. .contentRow {
  1677. border-right: 1px solid black;
  1678. line-height: 20px;
  1679. padding-left: 4px;
  1680. }
  1681. .three {
  1682. width: 100%;
  1683. border: 1px solid black;
  1684. }
  1685. .three thead {
  1686. text-align: center;
  1687. line-height: 20px;
  1688. font-weight: 700;
  1689. }
  1690. .three th {
  1691. border-right: 1px solid black;
  1692. border-bottom: 1px solid black;
  1693. }
  1694. .three td {
  1695. line-height: 20px;
  1696. border-right: 1px solid black;
  1697. border-bottom: 1px solid black;
  1698. }
  1699. .one {
  1700. width: 100%;
  1701. text-align: center;
  1702. border-top: 1px solid black;
  1703. border-left: 1px solid black;
  1704. table-layout: fixed;
  1705. }
  1706. .one td {
  1707. border: 0;
  1708. line-height: 18px;
  1709. border-right: 1px solid black;
  1710. border-bottom: 1px solid black;
  1711. }
  1712. .two {
  1713. width: 100%;
  1714. text-align: center;
  1715. border-top: 1px solid black;
  1716. border-left: 1px solid black;
  1717. table-layout: fixed;
  1718. }
  1719. .two th {
  1720. border: 0;
  1721. line-height: 18px;
  1722. border-right: 1px solid black;
  1723. border-bottom: 1px solid black;
  1724. background-color: #dce6f1;
  1725. }
  1726. .two td {
  1727. border: 0;
  1728. line-height: 18px;
  1729. border-right: 1px solid black;
  1730. border-bottom: 1px solid black;
  1731. }
  1732. :deep(#pdfDom .el-textarea__inner) {
  1733. background: transparent !important;
  1734. overflow-y: hidden;
  1735. padding: 0 4px !important;
  1736. resize: none;
  1737. }
  1738. :deep(#pdfDom .el-textarea) {
  1739. --el-input-focus-border: transparent;
  1740. --el-input-transparent-border: 0 0 0 0px;
  1741. --el-input-border-color: transparent;
  1742. --el-input-hover-border: 0px !important;
  1743. --el-input-hover-border-color: transparent;
  1744. --el-input-focus-border-color: transparent;
  1745. --el-input-clear-hover-color: transparent;
  1746. box-shadow: 0 0 0 0px !important;
  1747. --el-input-border: 0px;
  1748. }
  1749. </style>