bgdetails.vue 95 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579
  1. <template>
  2. <div class="borderless" v-loading="pageLoading">
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button type="danger" style="border: none;background: none;color: red"
  6. icon="el-icon-arrow-left"
  7. @click="backToList">返回列表
  8. </el-button>
  9. </div>
  10. <div class="add-customer-btn">
  11. <el-button size="small" style="margin-right: 8px"
  12. :loading="saveLoading" :disabled="!form.id" @click="previewreportfun" >预 览
  13. </el-button>
  14. <el-button size="small" style="margin-right: 8px" v-if="roleName.indexOf('admin') != -1"
  15. :loading="saveLoading" :disabled="!form.id" @click="DesignreportDialog = true" >报表设计
  16. </el-button>
  17. <el-button size="small" type="warning" :disabled="!form.id" v-if="form.status == 1"
  18. @click.stop="revokeDocumentApproval">撤销单据请核
  19. </el-button>
  20. <el-button size="small" type="success" :disabled="!form.id || detailData.seeDisabled"
  21. v-if="form.status == 0 || form.status == 4"
  22. @click.stop="DocumentApproval">单据请核
  23. </el-button>
  24. <el-button size="small" type="primary" style="margin-right: 8px"
  25. :loading="saveLoading" @click="savefun">保 存
  26. </el-button>
  27. </div>
  28. </div>
  29. <div style="margin-top: 65px">
  30. <el-tabs type="border-card" v-model="bigtabs" @tab-click="bigHandleClick">
  31. <el-tab-pane label="委托信息" name="wt">
  32. <el-form :model="form" ref="form" label-width="90px" class="demo-ruleForm">
  33. <basic-container :showBtn="true">
  34. <el-row>
  35. <el-col :span="4">
  36. <el-form-item label="业务编号" prop="billNo" label-width="70px">
  37. <el-input style="width: 100%;" v-model="form.billNo"
  38. size="small" autocomplete="off"
  39. :disabled="true"
  40. clearable placeholder="业务编号" ></el-input>
  41. </el-form-item>
  42. </el-col>
  43. <el-col :span="4">
  44. <el-form-item label="接单日期" prop="billDate" label-width="70px">
  45. <el-date-picker v-model="form.billDate" clearable style="width: 100%;"
  46. type="date" size="small" :disabled="true"
  47. value-format="yyyy-MM-dd HH:mm:ss"
  48. placeholder="选择日期">
  49. </el-date-picker>
  50. </el-form-item>
  51. </el-col>
  52. <el-col :span="4">
  53. <el-form-item label="贸易类型" prop="businessType" label-width="70px">
  54. <search-query :datalist="businessTypeData"
  55. :selectValue="form.businessType"
  56. :clearable="true"
  57. :disabled="true"
  58. :buttonIf="false"
  59. placeholder="贸易类型"
  60. :forParameter="{key:'value',label:'label',value:'value'}"
  61. @corpChange="corpChange($event,'billNo')">
  62. </search-query>
  63. </el-form-item>
  64. </el-col>
  65. <el-col :span="4">
  66. <el-form-item label="制单人" prop="createUserName" label-width="70px">
  67. <el-input style="width: 100%;" v-model="form.createUserName"
  68. size="small" autocomplete="off"
  69. :disabled="true"
  70. clearable placeholder="制单人" ></el-input>
  71. </el-form-item>
  72. </el-col>
  73. <el-col :span="4">
  74. <el-form-item label="源操作" prop="srcOperation" label-width="70px">
  75. <el-input style="width: 100%;" v-model="form.srcOperation"
  76. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  77. clearable placeholder="请输入源操作" ></el-input>
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="4">
  81. <el-form-item label="对账约号" prop="reconciliationAgreementNumber" label-width="70px">
  82. <el-input style="width: 100%;" v-model="form.reconciliationAgreementNumber"
  83. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  84. clearable placeholder="请输入对账约号" ></el-input>
  85. </el-form-item>
  86. </el-col>
  87. <el-col :span="10">
  88. <el-form-item label="代理公司" prop="agencyCompanytId" label-width="70px">
  89. <el-row type="flex" justify="space-between" :gutter="10">
  90. <el-col :span="8">
  91. <search-query :datalist="agencyCompanytData"
  92. :selectValue="form.agencyCompanytCnName"
  93. :filterable="true"
  94. :clearable="true"
  95. :remote="true"
  96. :disabled="detailData.seeDisabled"
  97. :buttonIf="false"
  98. placeholder="请选择代理公司"
  99. :forParameter="{key:'id',label:'cnName',value:'cnName'}"
  100. @remoteMethod="agencyCompanytBcorpsListfun"
  101. @corpChange="corpChange($event,'agencyCompanytCnName')"
  102. @corpFocus="agencyCompanytBcorpsListfun">
  103. </search-query>
  104. </el-col>
  105. <el-col :span="16">
  106. <el-input style="width: 100%;" v-model="form.agencyCompanytCode"
  107. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  108. clearable placeholder="代理公司" ></el-input>
  109. </el-col>
  110. </el-row>
  111. </el-form-item>
  112. </el-col>
  113. <el-col :span="4">
  114. <el-form-item label="提单号:" prop="mblno" label-width="70px">
  115. <el-input style="width: 100%;" v-model="form.mblno"
  116. size="small" autocomplete="off"
  117. :disabled="detailData.seeDisabled"
  118. clearable placeholder="请输入提单号" ></el-input>
  119. </el-form-item>
  120. </el-col>
  121. <el-col :span="5">
  122. <el-form-item label="业务来源:" prop="srcType" label-width="70px">
  123. <el-row type="flex" justify="space-between" :gutter="10" >
  124. <el-col :span="12">
  125. <search-query :datalist="srcTypeData"
  126. :selectValue="form.srcType"
  127. :clearable="true"
  128. :buttonIf="false"
  129. :disabled="detailData.seeDisabled"
  130. placeholder="请选择业务来源"
  131. :forParameter="{key:'dictKey',label:'dictValue',value:'dictKey'}"
  132. @remoteMethod="srcTypeWorkDictsfun"
  133. @corpChange="corpChange($event,'srcType')"
  134. @corpFocus="srcTypeWorkDictsfun">
  135. </search-query>
  136. </el-col>
  137. <el-col :span="12">
  138. <search-query :datalist="srcData"
  139. :selectValue="form.srcCnName"
  140. :filterable="true"
  141. :clearable="true"
  142. :remote="true"
  143. :buttonIf="false"
  144. :disabled="!form.srcType || detailData.seeDisabled"
  145. :forParameter="srcForParameter"
  146. placeholder="请选择详情"
  147. @remoteMethod="srcfun"
  148. @corpChange="corpChange($event,'srcCnName')"
  149. @corpFocus="srcfun">
  150. </search-query>
  151. </el-col>
  152. </el-row>
  153. </el-form-item>
  154. </el-col>
  155. <el-col :span="5">
  156. <el-form-item label="申报方式:" prop="declarationMethodName" label-width="70px">
  157. <el-row type="flex" justify="space-between" :gutter="10" >
  158. <el-col :span="12">
  159. <search-query :datalist="declarationMethodData"
  160. :selectValue="form.declarationMethodName"
  161. :clearable="true"
  162. :buttonIf="false"
  163. :disabled="detailData.seeDisabled"
  164. placeholder="请选择申报方式"
  165. :forParameter="{key:'dictValue',label:'dictValue',value:'dictValue'}"
  166. @remoteMethod="declarationMethodWorkDictsfun"
  167. @corpChange="corpChange($event,'declarationMethodName')"
  168. @corpFocus="declarationMethodWorkDictsfun">
  169. </search-query>
  170. </el-col>
  171. <el-col :span="12">
  172. <el-input style="width: 100%;" v-model="form.declarationMethodCode"
  173. size="small" autocomplete="off" :disabled="true"
  174. clearable placeholder="申报方式" ></el-input>
  175. </el-col>
  176. </el-row>
  177. </el-form-item>
  178. </el-col>
  179. <el-col :span="10">
  180. <el-form-item label="经营单位" prop="agencyCompanytId" label-width="70px">
  181. <el-row type="flex" justify="space-between" :gutter="10">
  182. <el-col :span="8">
  183. <search-query :datalist="corpData"
  184. :selectValue="form.corpCnName"
  185. :filterable="true"
  186. :clearable="true"
  187. :remote="true"
  188. :disabled="detailData.seeDisabled"
  189. :buttonIf="false"
  190. placeholder="请选择经营单位"
  191. :forParameter="{key:'id',label:'cnName',value:'cnName'}"
  192. @remoteMethod="corpBcorpsListfun"
  193. @corpChange="corpChange($event,'corpCnName')"
  194. @corpFocus="corpBcorpsListfun">
  195. </search-query>
  196. </el-col>
  197. <el-col :span="16">
  198. <el-input style="width: 100%;" v-model="form.corpEnName"
  199. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  200. clearable placeholder="经营单位" ></el-input>
  201. </el-col>
  202. </el-row>
  203. </el-form-item>
  204. </el-col>
  205. <el-col :span="5">
  206. <el-form-item label="企业名称:" prop="enterpriseCnName" label-width="80px">
  207. <search-query :datalist="enterpriseData"
  208. :selectValue="form.enterpriseCnName"
  209. :filterable="true"
  210. :clearable="true"
  211. :remote="true"
  212. :buttonIf="false"
  213. placeholder="请选择企业名称"
  214. :disabled="detailData.seeDisabled"
  215. :forParameter="{key:'id',label:'cnName',value:'cnName'}"
  216. @remoteMethod="enterpriseCnNameBcorpsListfun"
  217. @corpChange="corpChange($event,'enterpriseCnName')"
  218. @corpFocus="enterpriseCnNameBcorpsListfun">
  219. </search-query>
  220. </el-form-item>
  221. </el-col>
  222. <el-col :span="5">
  223. <el-form-item label="企业海关编码:" prop="billNo" label-width="100px">
  224. <el-input style="width: 100%;" v-model="form.enterpriseCode"
  225. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  226. clearable placeholder="请输入企业海关编码" ></el-input>
  227. </el-form-item>
  228. </el-col>
  229. <el-col :span="4">
  230. <el-form-item label="所属团队:" prop="enterpriseCnName" label-width="70px">
  231. <search-query :datalist="teamData"
  232. :selectValue="form.teamName"
  233. :filterable="true"
  234. :clearable="true"
  235. :remote="true"
  236. :buttonIf="false"
  237. :disabled="detailData.seeDisabled"
  238. placeholder="请选择所属团队"
  239. :forParameter="{key:'id',label:'postName',value:'postName'}"
  240. @remoteMethod="postSelectByUserfun"
  241. @corpChange="corpChange($event,'teamName')"
  242. @corpFocus="postSelectByUserfun">
  243. </search-query>
  244. </el-form-item>
  245. </el-col>
  246. <el-col :span="4">
  247. <el-form-item label="订舱号" prop="bookingNo" label-width="70px">
  248. <el-input style="width: 100%;" v-model="form.bookingNo"
  249. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  250. clearable placeholder="请输入订舱号" ></el-input>
  251. </el-form-item>
  252. </el-col>
  253. <el-col :span="4">
  254. <el-form-item label="船名" prop="vesselEnName" label-width="70px">
  255. <search-query :datalist="vesselData"
  256. :selectValue="form.vesselEnName"
  257. :filterable="true"
  258. :clearable="true"
  259. :remote="true"
  260. :buttonIf="false"
  261. :disabled="detailData.seeDisabled"
  262. placeholder="请输入船名"
  263. :forParameter="{key:'id',label:'enName',value:'enName'}"
  264. @remoteMethod="vesselBvesselsListfun"
  265. @corpChange="corpChange($event,'vessel')"
  266. @corpFocus="vesselBvesselsListfun" >
  267. </search-query>
  268. </el-form-item>
  269. </el-col>
  270. <el-col :span="4">
  271. <el-form-item label="三检单号" prop="tripleInspectionNumber" label-width="70px">
  272. <el-input style="width: 100%;" v-model="form.tripleInspectionNumber"
  273. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  274. clearable placeholder="请输入三检单号" ></el-input>
  275. </el-form-item>
  276. </el-col>
  277. <el-col :span="4">
  278. <el-form-item label="报检日期" prop="inspectionDeclarationDate" label-width="70px">
  279. <el-date-picker v-model="form.inspectionDeclarationDate" clearable style="width: 100%;"
  280. type="date" size="small" :disabled="detailData.seeDisabled"
  281. value-format="yyyy-MM-dd HH:mm:ss"
  282. placeholder="请选择保检日期">
  283. </el-date-picker>
  284. </el-form-item>
  285. </el-col>
  286. <el-col :span="4">
  287. <el-form-item label="ETD" prop="etdDate" label-width="70px">
  288. <el-date-picker v-model="form.etdDate" clearable style="width: 100%;"
  289. type="date" size="small" :disabled="detailData.seeDisabled"
  290. value-format="yyyy-MM-dd HH:mm:ss"
  291. placeholder="请选择ETD日期">
  292. </el-date-picker>
  293. </el-form-item>
  294. </el-col>
  295. <el-col :span="4">
  296. <el-form-item label="发票号码" prop="invoiceNumber" label-width="70px">
  297. <el-input style="width: 100%;" v-model="form.invoiceNumber"
  298. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  299. clearable placeholder="请输入发票号码" ></el-input>
  300. </el-form-item>
  301. </el-col>
  302. <el-col :span="8">
  303. <el-form-item label="贸易方式:" prop="tradeMethodName" label-width="70px">
  304. <el-row type="flex" justify="space-between" :gutter="10">
  305. <el-col :span="12">
  306. <search-query :datalist="tradeMethodData"
  307. :selectValue="form.tradeMethodName"
  308. :filterable="true"
  309. :clearable="true"
  310. :remote="true"
  311. :buttonIf="false"
  312. :disabled="detailData.seeDisabled"
  313. placeholder="请选择贸易方式"
  314. :forParameter="{key:'id',label:'cnName',value:'cnName'}"
  315. @remoteMethod="tradeMethodBtrademodesListfun"
  316. @corpChange="corpChange($event,'tradeMethodName')"
  317. @corpFocus="tradeMethodBtrademodesListfun">
  318. </search-query>
  319. </el-col>
  320. <el-col :span="12">
  321. <el-input style="width: 100%;" v-model="form.tradeMethodCode"
  322. size="small" autocomplete="off" :disabled="true"
  323. clearable placeholder="贸易方式" ></el-input>
  324. </el-col>
  325. </el-row>
  326. </el-form-item>
  327. </el-col>
  328. <el-col :span="4">
  329. <el-form-item label="运抵国(地区):" prop="destinationCountryCnName" label-width="90px">
  330. <search-query :datalist="destinationCountryData"
  331. :selectValue="form.destinationCountryCnName"
  332. :filterable="true"
  333. :clearable="true"
  334. :remote="true"
  335. :buttonIf="false"
  336. :disabled="detailData.seeDisabled"
  337. placeholder="请选择运抵国"
  338. :forParameter="{key:'id',label:'cnName',value:'cnName'}"
  339. @remoteMethod="destinationCountrybcountrysListfun"
  340. @corpChange="corpChange($event,'destinationCountryCnName')"
  341. @corpFocus="destinationCountrybcountrysListfun">
  342. </search-query>
  343. </el-form-item>
  344. </el-col>
  345. <el-col :span="4">
  346. <el-form-item label="指运港:" prop="portOfDestinationEnName" label-width="70px">
  347. <search-query :datalist="portOfDestinationData"
  348. :selectValue="form.portOfDestinationEnName"
  349. :filterable="true"
  350. :clearable="true"
  351. :remote="true"
  352. :buttonIf="false"
  353. placeholder="请选择指运港"
  354. :disabled="detailData.seeDisabled"
  355. :forParameter="{key:'id',label:'enName',value:'enName'}"
  356. @remoteMethod="portOfDestinationBportsListfun"
  357. @corpChange="corpChange($event,'portOfDestinationEnName')"
  358. @corpFocus="portOfDestinationBportsListfun">
  359. </search-query>
  360. </el-form-item>
  361. </el-col>
  362. <el-col :span="4">
  363. <el-form-item label="出口口岸:" prop="exportPortEnName" label-width="70px">
  364. <search-query :datalist="exportPortData"
  365. :selectValue="form.exportPortEnName"
  366. :filterable="true"
  367. :clearable="true"
  368. :remote="true"
  369. :buttonIf="false"
  370. placeholder="请选择出口口岸"
  371. :disabled="detailData.seeDisabled"
  372. :forParameter="{key:'id',label:'enName',value:'enName'}"
  373. @remoteMethod="exportPortBportsListfun"
  374. @corpChange="corpChange($event,'exportPortEnName')"
  375. @corpFocus="exportPortBportsListfun">
  376. </search-query>
  377. </el-form-item>
  378. </el-col>
  379. <el-col :span="4">
  380. <el-form-item label="报关单号:" prop="customsDeclarationNumber" label-width="70px">
  381. <el-input style="width: 100%;" v-model="form.customsDeclarationNumber"
  382. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  383. clearable placeholder="请输入报关单号" ></el-input>
  384. </el-form-item>
  385. </el-col>
  386. <el-col :span="4">
  387. <el-form-item label="备案号:" prop="recordNumber" label-width="70px">
  388. <el-input style="width: 100%;" v-model="form.recordNumber"
  389. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  390. clearable placeholder="请输入备案号" ></el-input>
  391. </el-form-item>
  392. </el-col>
  393. <el-col :span="4">
  394. <el-form-item label="ReferenceNO" prop="refno" label-width="90px">
  395. <el-input style="width: 100%;" v-model="form.refno"
  396. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  397. clearable placeholder="请输入Reference NO" ></el-input>
  398. </el-form-item>
  399. </el-col>
  400. <el-col :span="4">
  401. <el-form-item label="申报日期:" prop="declareDate" label-width="70px">
  402. <el-date-picker v-model="form.declareDate" clearable style="width: 100%;"
  403. type="date" size="small" :disabled="detailData.seeDisabled"
  404. value-format="yyyy-MM-dd HH:mm:ss"
  405. placeholder="请选择申报日期">
  406. </el-date-picker>
  407. </el-form-item>
  408. </el-col>
  409. <el-col :span="4">
  410. <el-form-item label="预录日期:" prop="preRrecordingDate" label-width="70px">
  411. <el-date-picker v-model="form.preRrecordingDate" clearable style="width: 100%;"
  412. type="date" size="small" :disabled="detailData.seeDisabled"
  413. value-format="yyyy-MM-dd HH:mm:ss"
  414. placeholder="请选择预录日期">
  415. </el-date-picker>
  416. </el-form-item>
  417. </el-col>
  418. <el-col :span="4">
  419. <el-form-item label="提运单号:" prop="contractAgreementNumber" label-width="70px">
  420. <el-input style="width: 100%;" v-model="form.contractAgreementNumber"
  421. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  422. clearable placeholder="请输入提运单号" ></el-input>
  423. </el-form-item>
  424. </el-col>
  425. <el-col :span="4">
  426. <el-form-item label="发货单位:" prop="deliveryCnName" label-width="70px">
  427. <search-query :datalist="deliveryData"
  428. :selectValue="form.deliveryCnName"
  429. :filterable="true"
  430. :clearable="true"
  431. :remote="true"
  432. :disabled="detailData.seeDisabled"
  433. :buttonIf="false"
  434. placeholder="请选择发货单位"
  435. :forParameter="{key:'id',label:'cnName',value:'cnName'}"
  436. @remoteMethod="deliveryBcorpsListfun"
  437. @corpChange="corpChange($event,'deliveryCnName')"
  438. @corpFocus="deliveryBcorpsListfun">
  439. </search-query>
  440. </el-form-item>
  441. </el-col>
  442. <el-col :span="4">
  443. <el-form-item label="结汇方式:" prop="exchangeSettlementMethod" label-width="70px">
  444. <search-query :datalist="exchangeSettlementMethodData"
  445. :selectValue="form.exchangeSettlementMethod"
  446. :clearable="true"
  447. :buttonIf="false"
  448. :disabled="detailData.seeDisabled"
  449. placeholder="请选择结汇方式"
  450. :forParameter="{key:'dictValue',label:'dictValue',value:'dictValue'}"
  451. @remoteMethod="exchangeSettlementMethodWorkDictsfun"
  452. @corpChange="corpChange($event,'exchangeSettlementMethod')"
  453. @corpFocus="exchangeSettlementMethodWorkDictsfun">
  454. </search-query>
  455. </el-form-item>
  456. </el-col>
  457. <el-col :span="4">
  458. <el-form-item label="成交方式:" prop="dealMethod" label-width="70px">
  459. <search-query :datalist="dealMethodData"
  460. :selectValue="form.dealMethod"
  461. :clearable="true"
  462. :buttonIf="false"
  463. :disabled="detailData.seeDisabled"
  464. placeholder="请选择成交方式"
  465. :forParameter="{key:'id',label:'cnName',value:'cnName'}"
  466. @remoteMethod="dealMethodWorkDictsfun"
  467. @corpChange="corpChange($event,'dealMethod')"
  468. @corpFocus="dealMethodWorkDictsfun">
  469. </search-query>
  470. </el-form-item>
  471. </el-col>
  472. <el-col :span="4">
  473. <el-form-item label="运费:" prop="amountFreight" label-width="70px">
  474. <el-input style="width: 100%;" v-model="form.amountFreight"
  475. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  476. clearable placeholder="请输入运费" ></el-input>
  477. </el-form-item>
  478. </el-col>
  479. <el-col :span="4">
  480. <el-form-item label="保费:" prop="amountPremium" label-width="70px">
  481. <el-input style="width: 100%;" v-model="form.amountPremium"
  482. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  483. clearable placeholder="请输入保费" ></el-input>
  484. </el-form-item>
  485. </el-col>
  486. <el-col :span="4">
  487. <el-form-item label="杂费:" prop="amountMiscellaneousExpenses" label-width="70px">
  488. <el-input style="width: 100%;" v-model="form.amountMiscellaneousExpenses"
  489. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  490. clearable placeholder="请输入杂费" ></el-input>
  491. </el-form-item>
  492. </el-col>
  493. <el-col :span="4">
  494. <el-form-item label="境内货源地:" prop="domesticSourceOfGoods" label-width="80px">
  495. <el-input style="width: 100%;" v-model="form.domesticSourceOfGoods"
  496. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  497. clearable placeholder="请输入境内货源地" ></el-input>
  498. </el-form-item>
  499. </el-col>
  500. <el-col :span="4">
  501. <el-form-item label="合同协议号:" prop="deliveryNumbers" label-width="80px">
  502. <el-input style="width: 100%;" v-model="form.deliveryNumbers"
  503. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  504. clearable placeholder="请输入合同协议号" ></el-input>
  505. </el-form-item>
  506. </el-col>
  507. <el-col :span="4">
  508. <el-form-item label="件数:" prop="quantity" label-width="70px">
  509. <el-input style="width: 100%;" v-model="form.quantity"
  510. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  511. clearable placeholder="请输入件数" ></el-input>
  512. </el-form-item>
  513. </el-col>
  514. <el-col :span="4">
  515. <el-form-item label="包装种类:" prop="packingUnit" label-width="70px">
  516. <search-query :datalist="packingUnitData"
  517. :selectValue="form.packingUnit"
  518. :filterable="true"
  519. :clearable="true"
  520. :remote="true"
  521. :buttonIf="false"
  522. placeholder="请选择包装种类"
  523. :forParameter="{key:'id',label:'cnName',value:'cnName'}"
  524. @remoteMethod="packingUnitBunitsListfun"
  525. @corpChange="corpChange($event,'packingUnit')"
  526. @corpFocus="packingUnitBunitsListfun">
  527. </search-query>
  528. </el-form-item>
  529. </el-col>
  530. <el-col :span="4">
  531. <el-form-item label="毛重:" prop="grossWeight" label-width="70px">
  532. <el-input style="width: 100%;" v-model="form.grossWeight"
  533. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  534. clearable placeholder="请输入毛重" ></el-input>
  535. </el-form-item>
  536. </el-col>
  537. <el-col :span="4">
  538. <el-form-item label="净重:" prop="netWeight" label-width="70px">
  539. <el-input style="width: 100%;" v-model="form.netWeight"
  540. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  541. clearable placeholder="请输入净重" ></el-input>
  542. </el-form-item>
  543. </el-col>
  544. <el-col :span="4">
  545. <el-form-item label="货物金额:" prop="amountGoods" label-width="80px">
  546. <el-input style="width: 100%;" v-model="form.amountGoods"
  547. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  548. clearable placeholder="请输入货物金额" ></el-input>
  549. </el-form-item>
  550. </el-col>
  551. <el-col :span="8">
  552. <el-form-item label="唛码及备注:" prop="marks" label-width="110px">
  553. <el-input style="width: 100%;" v-model="form.marks" type="textarea"
  554. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  555. clearable placeholder="请输入唛码及备注" ></el-input>
  556. </el-form-item>
  557. </el-col>
  558. <el-col :span="8">
  559. <el-form-item label="备注:" prop="remarks" label-width="70px">
  560. <el-input style="width: 100%;" v-model="form.remarks" type="textarea"
  561. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  562. clearable placeholder="请输入备注" ></el-input>
  563. </el-form-item>
  564. </el-col>
  565. <el-col :span="24">
  566. <el-form-item label="随附单据:" prop="documentsAttached" label-width="70px">
  567. <el-checkbox size="medium" true-label="fp" :false-label="null" :disabled="detailData.seeDisabled" v-model="comprehensiveForm.fp">发票</el-checkbox>
  568. <el-checkbox size="medium" true-label="xd" :false-label="null" :disabled="detailData.seeDisabled" v-model="comprehensiveForm.xd">箱单</el-checkbox>
  569. <el-checkbox size="medium" true-label="ht" :false-label="null" :disabled="detailData.seeDisabled" v-model="comprehensiveForm.ht">合同</el-checkbox>
  570. <el-checkbox size="medium" true-label="sjtgd" :false-label="null" :disabled="detailData.seeDisabled" v-model="comprehensiveForm.sjtgd">商检通过单</el-checkbox>
  571. <el-checkbox size="medium" true-label="xyz" :false-label="null" :disabled="detailData.seeDisabled" v-model="comprehensiveForm.xyz">信用证</el-checkbox>
  572. <el-checkbox size="medium" true-label="hzpz" :false-label="null" :disabled="detailData.seeDisabled" v-model="comprehensiveForm.hzpz">换证凭单</el-checkbox>
  573. <el-checkbox size="medium" true-label="cjd" :false-label="null" :disabled="detailData.seeDisabled" v-model="comprehensiveForm.cjd">厂检单</el-checkbox>
  574. <el-checkbox size="medium" true-label="bzxnjgd" :false-label="null" :disabled="detailData.seeDisabled" v-model="comprehensiveForm.bzxnjgd">包装性能结果单</el-checkbox>
  575. <el-checkbox size="medium" true-label="xkz" :false-label="null" :disabled="detailData.seeDisabled" v-model="comprehensiveForm.xkz">许可证</el-checkbox>
  576. <el-checkbox size="medium" true-label="wtdj" :false-label="null" :disabled="detailData.seeDisabled" v-model="comprehensiveForm.wtdj">委托单据</el-checkbox>
  577. </el-form-item>
  578. <el-form-item label="其他:" prop="documentsAttachedOther" label-width="70px">
  579. <el-input style="width: 100%;" v-model="form.documentsAttachedOther"
  580. size="small" autocomplete="off" :disabled="detailData.seeDisabled"
  581. clearable placeholder="请输入其他" ></el-input>
  582. </el-form-item>
  583. </el-col>
  584. </el-row>
  585. </basic-container>
  586. </el-form>
  587. <basic-container>
  588. <table-details :tableData="form.customsDeclarationGoodsList" :form="form" :roleName="roleName"
  589. :disabled="detailData.seeDisabled"
  590. @billsDetailfun="customsdeclarationDetailfun(form.id)" ></table-details>
  591. </basic-container>
  592. </el-tab-pane>
  593. <el-tab-pane label="费用信息" name="fy"
  594. v-if="roleName.indexOf('admin') != -1?true:roleName.indexOf('应收修改') != -1 || roleName.indexOf('应付修改') != -1 || roleName.indexOf('应收查看') != -1 || roleName.indexOf('应付查看') != -1" >
  595. <feecenter :assemblyForm="form" :detailData="detailData"
  596. :pleasereviewType="pleasereviewType" :pid="form.id"
  597. @billsDetailfun="customsdeclarationDetailfun(form.id)"></feecenter>
  598. </el-tab-pane>
  599. </el-tabs>
  600. </div>
  601. <!--设计报表弹窗-->
  602. <el-dialog append-to-body title="设计报表" class="el-dialogDeep" :visible.sync="DesignreportDialog" width="70%"
  603. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  604. <reports :id="form.id" :assemblyForm="form" businessValue="BGAI" classifyCode="BGAI" ></reports>
  605. </el-dialog>
  606. <!--预览-->
  607. <el-dialog
  608. title="打印"
  609. :visible.sync="selectPrintingDialog"
  610. append-to-body
  611. width="70%"
  612. :close-on-click-modal="false"
  613. :destroy-on-close="true"
  614. :close-on-press-escape="false"
  615. v-dialog-drag>
  616. <div>
  617. <reportformsList ref="reportformsList" @reportRadio="reportRadio"></reportformsList>
  618. </div>
  619. <span slot="footer" class="dialog-footer">
  620. <el-button size="small" @click="selectPrintingDialog = false;">取 消</el-button>
  621. </span>
  622. </el-dialog>
  623. <!--费用打印-->
  624. <reportContainer ref="reportContainer"></reportContainer>
  625. </div>
  626. </template>
  627. <script>
  628. import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
  629. import {getBcorpslistByType} from "@/api/iosBasicData/bcorps";
  630. import {getWorkDicts} from "@/api/system/dictbiz";
  631. import {getList as userGetList} from '@/api/system/user'
  632. import {getDeptLazyTree} from "@/api/system/dept";
  633. import {getBvesselsList} from "@/api/iosBasicData/bvessels";
  634. import TableDetails from "./assembly/TableDetails.vue";
  635. import feecenter from "./assembly/feecenter.vue";
  636. import {getBtrademodesList} from "@/api/iosBasicData/btrademodes";
  637. import {bcountrysList} from "@/api/iosBasicData/bcountrys";
  638. import {bportsList} from "@/api/iosBasicData/bports";
  639. import {
  640. checkCustomsDeclaration, copyCustomsDeclaration,
  641. customsdeclarationDetail,
  642. customsdeclarationSubmit, revokeCheckCustomsDeclaration
  643. } from "@/api/iosBasicData/customsdeclaration";
  644. import {popupReminder} from "@/util/messageReminder";
  645. import {getBunitsList} from "@/api/iosBasicData/bunits";
  646. import reportContainer from "@/views/iosBasicData/report-container/report-container.vue";
  647. import reportformsList from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reportformsList.vue";
  648. import reports from "@/views/iosBasicData/SeafreightExportF/bills/assembly/reports.vue";
  649. import {reportsGetReportData} from "@/api/iosBasicData/reports";
  650. import {getList as getreportsList} from "@/api/iosBasicData/reports";
  651. import { postSelectByUser } from '@/api/iosBasicData/bills'
  652. export default {
  653. components: {reports, reportformsList, reportContainer, feecenter, SearchQuery,TableDetails},
  654. props:{
  655. detailData:{
  656. type:Object,
  657. default:{},
  658. }
  659. },
  660. data(){
  661. return {
  662. DesignreportDialog:false, // 报表设计弹窗
  663. selectPrintingDialog:false, // 预览弹窗
  664. pageLoading:false, // 动画加载
  665. saveLoading:false, // 按钮动画加载
  666. roleName:[], // 当前的角色权限
  667. saberUserInfo:[], // 当前登录人的数据
  668. // 绑定的数据
  669. form:{
  670. businessType:'BGAI',
  671. createUser:'', // 制单人id
  672. createUserName:'', // 制单人名称
  673. customsDeclarationGoodsList:[],
  674. feeCenterListD:[],
  675. feeCenterListC:[]
  676. },
  677. bigtabs:'wt', // tabs切换
  678. corpData:[], // 经营单位数据
  679. agencyCompanytData:[], // 代理公司数据
  680. businessTypeData:[
  681. {
  682. label:'海运出口报关',
  683. value:'BGSE'
  684. },
  685. {
  686. label:'海运进口报关',
  687. value:'BGSI'
  688. },
  689. {
  690. label:'空运出口报关',
  691. value:'BGAE'
  692. },
  693. {
  694. label:'空运进口报关',
  695. value:'BGAI'
  696. }
  697. ], // 贸易类型
  698. srcTypeData:[], // 业务来源数据
  699. srcData:[], // 来源详情数据
  700. srcForParameter:{ key:'id', label:'title', value:'title'}, // 来源详情配置项数据
  701. declarationMethodData:[], // 申报方式字典数据
  702. enterpriseData:[], // 企业数据
  703. teamData:[], // 所属团队
  704. vesselData:[], // 船名数据
  705. tradeMethodData:[], // 贸易条款数据
  706. destinationCountryData:[], // 运抵国数据
  707. portOfDestinationData:[], // 指运港
  708. dealMethodData:[], // 成交方式
  709. exportPortData:[], // 出口口岸
  710. deliveryData:[], // 发货单位
  711. packingUnitData:[], // 包装种类
  712. exchangeSettlementMethodData:[], // 结汇方式
  713. comprehensiveForm:{}, // 多选集合
  714. pleasereviewType:false, // 请核之后禁用
  715. // 需要加判断是否必填的数据
  716. messageData:[
  717. {
  718. name:'经营单位',
  719. value:'corpCnName',
  720. },
  721. {
  722. name:'业务来源',
  723. value:'srcType',
  724. },
  725. {
  726. name:'提单号',
  727. value:'mblno',
  728. },
  729. {
  730. name:'报关单号',
  731. value:'customsDeclarationNumber',
  732. },
  733. {
  734. name:'ETD',
  735. value:'etdDate',
  736. },
  737. {
  738. name:'申报日期',
  739. value:'declareDate',
  740. },
  741. {
  742. name:'运抵国',
  743. value:'destinationCountryCnName',
  744. },
  745. {
  746. name:'指运港',
  747. value:'portOfDestinationEnName',
  748. },
  749. {
  750. name:'船名',
  751. value:'vesselEnName',
  752. },
  753. {
  754. name:'件数',
  755. value:'quantity',
  756. }
  757. ],
  758. }
  759. },
  760. created() {
  761. this.roleName = localStorage.getItem('roleName').split(',')
  762. // 获取当前登录人个人信息
  763. this.saberUserInfo = JSON.parse(localStorage.getItem('saber-userInfo')).content
  764. this.form.createUser = this.saberUserInfo.user_id
  765. this.form.createUserName = this.saberUserInfo.user_name
  766. this.srcTypeWorkDictsfun() // 业务来源
  767. this.postSelectByUserfun() // 所属团队
  768. },
  769. methods:{
  770. // 报表预览
  771. previewreportfun(){
  772. getreportsList(1,10,{
  773. businessType:'BGAI',
  774. classifyCode:'BGAI',
  775. groupCode:'AI'
  776. }).then(res=>{
  777. if (res.data.data.records.length == 1) {
  778. this.reportRadio(res.data.data.records[0])
  779. }else {
  780. this.saveLoading = true
  781. this.selectPrintingDialog = true
  782. this.saveLoading = false
  783. let page = {
  784. pageSize: 10,
  785. currentPage: 1,
  786. total: 0
  787. }
  788. this.$nextTick(()=>{
  789. this.$refs.reportformsList.onLoad(page,{
  790. businessType:'BGAI',
  791. classifyCode:'BGAI',
  792. groupCode:'AI'
  793. })
  794. })
  795. }
  796. })
  797. },
  798. // 预览里的打印
  799. reportRadio(val){
  800. // 获取报表数据
  801. reportsGetReportData({
  802. billId:this.form.id,
  803. reportCode:val.classifyCode,
  804. groupCode:val.groupCode,
  805. type:'BGAI'
  806. }).then(res=>{
  807. this.handleReportPreview(val.url,res.data.data.data)
  808. })
  809. },
  810. // 单据请核
  811. DocumentApproval(){
  812. if (popupReminder(this.form,this.messageData)){
  813. this.$confirm(popupReminder(this.form,this.messageData), {
  814. confirmButtonText: "确定",
  815. cancelButtonText: "取消",
  816. type: "warning"
  817. })
  818. }
  819. if (popupReminder(this.form,this.messageData)) {
  820. return;
  821. }
  822. if (this.form.feeCenterListC.length == 0 && this.form.feeCenterListD == 0) {
  823. return this.$message.warning('请添加费用信息')
  824. }
  825. this.$confirm("确定要请核数据?", {
  826. confirmButtonText: "确定",
  827. cancelButtonText: "取消",
  828. type: "warning"
  829. }).then(()=>{
  830. this.pageLoading = true
  831. checkCustomsDeclaration({
  832. id:this.form.id,
  833. url: '/iosBasicData/reportClose/AIreportClose/index',
  834. pageStatus: "this.$store.getters.AIreportClose",
  835. pageLabel: "空运进口报关",
  836. }).then(res=>{
  837. this.pageLoading = false
  838. this.$message({
  839. type: "success",
  840. message: "操作成功!"
  841. });
  842. // 详情
  843. this.customsdeclarationDetailfun(this.form.id)
  844. })
  845. })
  846. },
  847. // 撤销请核
  848. revokeDocumentApproval(){
  849. this.$confirm("确定要撤销请核数据?", {
  850. confirmButtonText: "确定",
  851. cancelButtonText: "取消",
  852. type: "warning"
  853. }).then(()=>{
  854. this.pageLoading = true
  855. revokeCheckCustomsDeclaration({
  856. id:this.form.id
  857. }).then(res=>{
  858. this.pageLoading = false
  859. this.$message({
  860. type: "success",
  861. message: "操作成功!"
  862. });
  863. // 详情
  864. this.customsdeclarationDetailfun(this.form.id)
  865. })
  866. })
  867. },
  868. // 大保存
  869. savefun(){
  870. // 经营单位
  871. if (!this.form.corpId) {
  872. return this.$message.warning('请填写经营单位!')
  873. }
  874. let multiArr = []
  875. for (let i in this.comprehensiveForm) {
  876. if (this.comprehensiveForm[i]) {
  877. multiArr.push(this.comprehensiveForm[i])
  878. }
  879. }
  880. // 多选集合转换成字符串赋值
  881. this.form.documentsAttached = multiArr.join(',')
  882. this.form.customsDeclarationGoodsList.map((item,index)=>{
  883. item.sort = Number(index) + 1
  884. item.pid = this.form.id
  885. })
  886. this.form.feeCenterListD.map((row,index)=>{
  887. row.dc = 'D'
  888. row.sort = Number(index) + 1
  889. row.businessType = this.form.businessType // 业务类型
  890. row.billNo = this.form.billNo // 单据编号
  891. row.billDate = this.form.billDate
  892. row.billCorpId = this.form.corpId // 主表客户 id
  893. row.billCorpCnName = this.form.corpCnName // 主表客户中文名称
  894. row.billCorpEnName = this.form.corpEnName // 主表客户英文名称
  895. row.vesselId = this.form.vesselId // 船名 id
  896. row.vesselCnName = this.form.vesselCnName // 中文船名
  897. row.vesselEnName = this.form.vesselEnName // 英文船名
  898. row.mblno = this.form.mblno // MB/L NO
  899. row.etd = this.form.etdDate // 开船日期
  900. // 数量 * 单价 = 净额
  901. // 总税率 = 税率 + 附件税率
  902. // 税额 = 净额 * 总税率
  903. // 含税
  904. if (row.curCode == 'CNY') {
  905. row.amount = row.rmbAmount?row.rmbAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)
  906. }else {
  907. row.amount = row.usdAmount?row.usdAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)
  908. }
  909. // 净额
  910. if (row.curCode == 'CNY') {
  911. row.amountNet = row.rmbAmountNet?row.rmbAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)
  912. }else {
  913. row.amountNet = row.usdAmountNet?row.usdAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)
  914. }
  915. })
  916. this.form.feeCenterListC.map((row,index)=>{
  917. row.dc = 'C'
  918. row.sort = Number(index) + 1
  919. row.businessType = this.form.businessType // 业务类型
  920. row.billNo = this.form.billNo // 单据编号
  921. row.billDate = this.form.billDate
  922. row.billCorpId = this.form.corpId // 主表客户 id
  923. row.billCorpCnName = this.form.corpCnName // 主表客户中文名称
  924. row.billCorpEnName = this.form.corpEnName // 主表客户英文名称
  925. row.vesselId = this.form.vesselId // 船名 id
  926. row.vesselCnName = this.form.vesselCnName // 中文船名
  927. row.vesselEnName = this.form.vesselEnName // 英文船名
  928. row.mblno = this.form.mblno // MB/L NO
  929. row.etd = this.form.etdDate // 开船日期
  930. // 数量 * 单价 = 净额
  931. // 总税率 = 税率 + 附件税率
  932. // 税额 = 净额 * 总税率
  933. // 含税
  934. if (row.curCode == 'CNY') {
  935. row.amount = row.rmbAmount?row.rmbAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)
  936. }else {
  937. row.amount = row.usdAmount?row.usdAmount:(Number(row.quantity) * Number(row.price)).toFixed(2)
  938. }
  939. // 净额
  940. if (row.curCode == 'CNY') {
  941. row.amountNet = row.rmbAmountNet?row.rmbAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)
  942. }else {
  943. row.amountNet = row.usdAmountNet?row.usdAmountNet:(Number(row.quantity) * Number(row.price)).toFixed(2)
  944. }
  945. })
  946. this.customsdeclarationSubmitfun()
  947. },
  948. // 保存接口
  949. customsdeclarationSubmitfun(){
  950. this.form.billNoFormat = 'BG-KYJK'
  951. this.form.businessTypeCode = 'BGAI'
  952. this.pageLoading = true
  953. customsdeclarationSubmit(this.form).then(res=>{
  954. this.pageLoading = false
  955. this.$message.success('操作成功!')
  956. this.customsdeclarationDetailfun(res.data.data.id)
  957. })
  958. },
  959. // 复制单据
  960. copyCustomsDeclarationfun(id){
  961. copyCustomsDeclaration({id}).then(res=>{
  962. this.form = res.data.data;
  963. this.pageLoading = false
  964. // 处理多选数据
  965. for (let item of this.form.documentsAttached.split(',')) {
  966. this.$set(this.comprehensiveForm,item,item)
  967. }
  968. // 处理明细数据
  969. for (let item of this.form.customsDeclarationGoodsList) {
  970. item.edit = false
  971. }
  972. // 应收
  973. for(let item of this.form.feeCenterListD) {
  974. if (item.curCode == 'CNY') {
  975. this.$set(item,'rmbAmount',item.amount)
  976. this.$set(item,'usdAmount','')
  977. this.$set(item,'rmbAmountNet',item.amountNet)
  978. this.$set(item,'usdAmountNet','')
  979. }else {
  980. this.$set(item,'usdAmount',item.amount)
  981. this.$set(item,'rmbAmount','')
  982. this.$set(item,'usdAmountNet',item.amountNet)
  983. this.$set(item,'rmbAmountNet','')
  984. }
  985. item.edit = false
  986. }
  987. // 应付
  988. for(let item of this.form.feeCenterListC) {
  989. if (item.curCode == 'CNY') {
  990. this.$set(item,'rmbAmount',item.amount)
  991. this.$set(item,'usdAmount','')
  992. this.$set(item,'rmbAmountNet',item.amountNet)
  993. this.$set(item,'usdAmountNet','')
  994. }else {
  995. this.$set(item,'usdAmount',item.amount)
  996. this.$set(item,'rmbAmount','')
  997. this.$set(item,'usdAmountNet',item.amountNet)
  998. this.$set(item,'rmbAmountNet','')
  999. }
  1000. item.edit = false
  1001. }
  1002. })
  1003. },
  1004. // 详情
  1005. customsdeclarationDetailfun(id){
  1006. customsdeclarationDetail(id).then(res=>{
  1007. this.pageLoading = false
  1008. this.form = res.data.data
  1009. if (this.form.status == 1 || this.form.status == 2 || this.form.status == 3) {
  1010. this.pleasereviewType = true // 请核禁用
  1011. this.detailData.seeDisabled = true
  1012. }else {
  1013. this.pleasereviewType = false
  1014. }
  1015. // 处理多选数据
  1016. for (let item of this.form.documentsAttached.split(',')) {
  1017. this.$set(this.comprehensiveForm,item,item)
  1018. }
  1019. // 处理费用数据
  1020. for(let item of this.form.feeCenterListD) {
  1021. if (item.curCode == 'CNY') {
  1022. this.$set(item,'rmbAmount',item.amount)
  1023. this.$set(item,'usdAmount','')
  1024. this.$set(item,'rmbAmountNet',item.amountNet)
  1025. this.$set(item,'usdAmountNet','')
  1026. }else {
  1027. this.$set(item,'usdAmount',item.amount)
  1028. this.$set(item,'rmbAmount','')
  1029. this.$set(item,'usdAmountNet',item.amountNet)
  1030. this.$set(item,'rmbAmountNet','')
  1031. }
  1032. item.edit = false
  1033. }
  1034. for(let item of this.form.feeCenterListC) {
  1035. if (item.curCode == 'CNY') {
  1036. this.$set(item,'rmbAmount',item.amount)
  1037. this.$set(item,'usdAmount','')
  1038. this.$set(item,'rmbAmountNet',item.amountNet)
  1039. this.$set(item,'usdAmountNet','')
  1040. }else {
  1041. this.$set(item,'usdAmount',item.amount)
  1042. this.$set(item,'rmbAmount','')
  1043. this.$set(item,'usdAmountNet',item.amountNet)
  1044. this.$set(item,'rmbAmountNet','')
  1045. }
  1046. item.edit = false
  1047. }
  1048. // 处理明细数据
  1049. for (let item of this.form.customsDeclarationGoodsList) {
  1050. item.edit = false
  1051. }
  1052. })
  1053. },
  1054. // 下拉回调
  1055. corpChange(value,name){
  1056. // 经营单位
  1057. if (name == 'corpCnName') {
  1058. for (let item of this.corpData) {
  1059. if (item.cnName == value) {
  1060. this.$set(this.form,'corpId',item.id)
  1061. this.$set(this.form,'corpCnName',item.cnName)
  1062. this.$set(this.form,'corpEnName',item.enName)
  1063. }
  1064. }
  1065. }
  1066. // 代理公司
  1067. else if(name == 'agencyCompanytCnName') {
  1068. for (let item of this.agencyCompanytData) {
  1069. if (item.cnName == value) {
  1070. this.$set(this.form,'agencyCompanytId',item.id)
  1071. this.$set(this.form,'agencyCompanytCode',item.code)
  1072. this.$set(this.form,'agencyCompanytCnName',item.cnName)
  1073. this.$set(this.form,'agencyCompanytEnName',item.enName)
  1074. }
  1075. }
  1076. }
  1077. // 来源详情
  1078. else if (name == 'srcCnName') {
  1079. for(let item of this.srcData) {
  1080. if (item[this.srcForParameter.value] == value) {
  1081. if (this.form.srcType == 'SALES') {
  1082. // 业务员
  1083. this.$set(this.form,'srcId',item.id)
  1084. this.$set(this.form,'srcCnName',item.name)
  1085. this.$set(this.form,'srcEnName',item.name)
  1086. }else if (this.form.srcType == 'AGENT') {
  1087. // 代理
  1088. this.$set(this.form,'srcId',item.id)
  1089. this.$set(this.form,'srcCnName',item.cnName)
  1090. this.$set(this.form,'srcEnName',item.enName)
  1091. }else if (this.form.srcType == 'OWN') {
  1092. // 公司
  1093. this.$set(this.form,'srcId',item.id)
  1094. this.$set(this.form,'srcCnName',item.title)
  1095. this.$set(this.form,'srcEnName',item.title)
  1096. }else {}
  1097. }
  1098. }
  1099. }
  1100. // 申报方式
  1101. else if (name == 'declarationMethodName') {
  1102. for(let item of this.declarationMethodData) {
  1103. if (item.dictValue == value) {
  1104. this.$set(this.form,'declarationMethodCode',item.dictKey)
  1105. this.$set(this.form,'declarationMethodName',item.dictValue)
  1106. }
  1107. }
  1108. }
  1109. // 企业
  1110. else if(name == 'enterpriseCnName') {
  1111. for (let item of this.enterpriseData) {
  1112. if (item.cnName == value) {
  1113. this.$set(this.form,'enterpriseId',item.id)
  1114. this.$set(this.form,'enterpriseCode',item.code)
  1115. this.$set(this.form,'enterpriseCnName',item.cnName)
  1116. this.$set(this.form,'enterpriseEnName',item.enName)
  1117. }
  1118. }
  1119. }
  1120. // 船名
  1121. else if (name == 'vessel') {
  1122. for(let item of this.vesselData) {
  1123. if (item.enName == value) {
  1124. this.$set(this.form,'vesselId',item.id)
  1125. this.$set(this.form,'vesselCnName',item.cnName)
  1126. this.$set(this.form,'vesselEnName',item.enName)
  1127. }
  1128. }
  1129. }
  1130. // 贸易条款
  1131. else if (name == 'tradeMethodName') {
  1132. for (let item of this.tradeMethodData) {
  1133. if (item.cnName == value) {
  1134. this.$set(this.form,'tradeMethodId',item.id)
  1135. this.$set(this.form,'tradeMethodCode',item.code)
  1136. this.$set(this.form,'tradeMethodName',item.cnName)
  1137. }
  1138. }
  1139. }
  1140. // 运抵国
  1141. else if (name == 'destinationCountryCnName') {
  1142. for (let item of this.destinationCountryData) {
  1143. if (item.cnName == value) {
  1144. this.$set(this.form,'destinationCountryId',item.id)
  1145. this.$set(this.form,'destinationCountryCnName',item.cnName)
  1146. this.$set(this.form,'destinationCountryEnName',item.cnName)
  1147. }
  1148. }
  1149. }
  1150. // 指运港
  1151. else if (name == 'portOfDestinationEnName') {
  1152. for (let item of this.portOfDestinationData) {
  1153. if (item.enName == value) {
  1154. this.$set(this.form,'portOfDestinationId',item.id)
  1155. this.$set(this.form,'portOfDestinationCnName',item.cnName)
  1156. this.$set(this.form,'portOfDestinationEnName',item.enName)
  1157. }
  1158. }
  1159. }
  1160. // 出口口岸
  1161. else if (name == 'exportPortEnName') {
  1162. for (let item of this.exportPortData) {
  1163. if (item.enName == value) {
  1164. this.$set(this.form,'exportPortId',item.id)
  1165. this.$set(this.form,'exportPortCnName',item.cnName)
  1166. this.$set(this.form,'exportPortEnName',item.enName)
  1167. }
  1168. }
  1169. }
  1170. // 发货单位
  1171. else if (name == 'deliveryCnName') {
  1172. for (let item of this.deliveryData) {
  1173. if (item.cnName == value) {
  1174. this.$set(this.form,'deliveryId',item.id)
  1175. this.$set(this.form,'deliveryCnName',item.cnName)
  1176. this.$set(this.form,'deliveryEnName',item.enName)
  1177. }
  1178. }
  1179. }
  1180. // 包装种类
  1181. else if (name == 'packingUnit') {
  1182. for (let item of this.packingUnitData) {
  1183. if (item.cnName == value) {
  1184. this.$set(this.form,'packingUnitId',item.id)
  1185. this.$set(this.form,'packingUnit',item.cnName)
  1186. }
  1187. }
  1188. }
  1189. else {
  1190. this.$set(this.form,name,value)
  1191. }
  1192. },
  1193. // 业务来源搜索和聚焦
  1194. srcfun(value){
  1195. if (this.form.srcType == 'SALES') {
  1196. // 业务员
  1197. this.srcForParameter = { key:'id', label:'name', value:'name'}
  1198. this.salesUserGetListfun(value)
  1199. }else if (this.form.srcType == 'AGENT') {
  1200. // 代理
  1201. this.srcForParameter = { key:'id', label:'cnName', value:'cnName'}
  1202. this.agentBcorpsListfun(value)
  1203. }else if (this.form.srcType == 'OWN') {
  1204. // 公司
  1205. this.srcForParameter = { key:'id', label:'title', value:'title'}
  1206. this.ownDeptLazyTreefun()
  1207. }else {}
  1208. },
  1209. // 接口数据获取🥲🥲🥲🥲🥲🥲🥲🥲🥲🥲
  1210. // 经营单位
  1211. corpBcorpsListfun(cnName){
  1212. getBcorpslistByType(1,10,{cnName}).then(res=>{
  1213. this.corpData = res.data.data.records
  1214. })
  1215. },
  1216. // 获取代理公司数据
  1217. agencyCompanytBcorpsListfun(cnName){
  1218. let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
  1219. getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
  1220. this.agencyCompanytData = res.data.data.records
  1221. })
  1222. },
  1223. // 获取业务来源数据
  1224. srcTypeWorkDictsfun(){
  1225. getWorkDicts('src_type_los').then(res=>{
  1226. this.srcTypeData = res.data.data
  1227. })
  1228. },
  1229. // 获取业务来源代理数据
  1230. agentBcorpsListfun(cnName){
  1231. let corpType = '1712285382575398914,1712285645314990082,1712285842321448962,1712286433378574338'
  1232. getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
  1233. this.srcData = res.data.data.records
  1234. })
  1235. },
  1236. // 获取业务来源业务员数据
  1237. salesUserGetListfun(account){
  1238. userGetList(1,10,{account}).then(res=>{
  1239. this.srcData = res.data.data.records
  1240. })
  1241. },
  1242. // 获取公司名称 用户管理左侧
  1243. ownDeptLazyTreefun(){
  1244. getDeptLazyTree(0).then(res=>{
  1245. this.srcData = res.data.data
  1246. })
  1247. },
  1248. // 申报方式字典数据
  1249. declarationMethodWorkDictsfun(){
  1250. getWorkDicts('declaration_method_los').then(res=>{
  1251. this.declarationMethodData = res.data.data
  1252. })
  1253. },
  1254. // 获取企业数据
  1255. enterpriseCnNameBcorpsListfun(cnName){
  1256. let corpType = '1752603229734072321'
  1257. getBcorpslistByType(1,10,{cnName,corpType}).then(res=>{
  1258. this.enterpriseData = res.data.data.records
  1259. })
  1260. },
  1261. // 船名
  1262. vesselBvesselsListfun(cnName){
  1263. getBvesselsList(1,10,{cnName}).then(res=>{
  1264. this.vesselData = res.data.data.records
  1265. })
  1266. },
  1267. // 贸易条款
  1268. tradeMethodBtrademodesListfun(cnName){
  1269. getBtrademodesList(1,10,{cnName}).then(res=>{
  1270. this.tradeMethodData = res.data.data.records
  1271. })
  1272. },
  1273. // 运抵国
  1274. destinationCountrybcountrysListfun(cnName){
  1275. bcountrysList(1,10,{cnName}).then(res=>{
  1276. this.destinationCountryData = res.data.data.records
  1277. })
  1278. },
  1279. // 指运港
  1280. portOfDestinationBportsListfun(enName){
  1281. bportsList(1,10,{enName}).then(res=>{
  1282. this.portOfDestinationData = res.data.data.records
  1283. })
  1284. },
  1285. // 成交方式
  1286. dealMethodWorkDictsfun(cnName){
  1287. // getWorkDicts('transaction_method_los').then(res=>{
  1288. // this.dealMethodData = res.data.data
  1289. // })
  1290. getBtrademodesList(1,10,{cnName}).then(res=>{
  1291. this.dealMethodData = res.data.data.records
  1292. })
  1293. },
  1294. // 出口口岸
  1295. exportPortBportsListfun(enName){
  1296. bportsList(1,10,{enName}).then(res=>{
  1297. this.exportPortData = res.data.data.records
  1298. })
  1299. },
  1300. // 发货单位
  1301. deliveryBcorpsListfun(cnName){
  1302. getBcorpslistByType(1,10,{cnName}).then(res=>{
  1303. this.deliveryData = res.data.data.records
  1304. })
  1305. },
  1306. // 结汇方式
  1307. exchangeSettlementMethodWorkDictsfun(){
  1308. getWorkDicts('settlement_exchange_los').then(res=>{
  1309. this.exchangeSettlementMethodData = res.data.data
  1310. })
  1311. },
  1312. // 包装种类
  1313. packingUnitBunitsListfun(cnName){
  1314. getBunitsList(1,10,{cnName}).then(res=>{
  1315. this.packingUnitData = res.data.data.records
  1316. })
  1317. },
  1318. // 获取所属岗位数据
  1319. postSelectByUserfun(){
  1320. postSelectByUser(JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id).then(res=>{
  1321. this.teamData = res.data.data
  1322. // 判断是否有值,没有的话默认第一个
  1323. if (!this.form.teamName) {
  1324. this.$set(this.form,'teamId',res.data.data[0].id)
  1325. this.$set(this.form,'teamName',res.data.data[0].postName)
  1326. }
  1327. })
  1328. },
  1329. //返回列表
  1330. backToList() {
  1331. this.$emit('goBack')
  1332. },
  1333. // 预览报表
  1334. handleReportPreview(url,data){
  1335. console.log(url,1670)
  1336. console.log(data,1671)
  1337. Stimulsoft.Base.StiLicense.key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHn0s4gy0Fr5YoUZ9V00Y0igCSFQzwEqYBh/N77k4f0fWXTHW5rqeBNLkaurJDenJ9o97TyqHs9HfvINK18Uwzsc/bG01Rq+x3H3Rf+g7AY92gvWmp7VA2Uxa30Q97f61siWz2dE5kdBVcCnSFzC6awE74JzDcJMj8OuxplqB1CYcpoPcOjKy1PiATlC3UsBaLEXsok1xxtRMQ283r282tkh8XQitsxtTczAJBxijuJNfziYhci2jResWXK51ygOOEbVAxmpflujkJ8oEVHkOA/CjX6bGx05pNZ6oSIu9H8deF94MyqIwcdeirCe60GbIQByQtLimfxbIZnO35X3fs/94av0ODfELqrQEpLrpU6FNeHttvlMc5UVrT4K+8lPbqR8Hq0PFWmFrbVIYSi7tAVFMMe2D1C59NWyLu3AkrD3No7YhLVh7LV0Tttr/8FrcZ8xirBPcMZCIGrRIesrHxOsZH2V8t/t0GXCnLLAWX+TNvdNXkB8cF2y9ZXf1enI064yE5dwMs2fQ0yOUG/xornE'
  1338. // Stimulsoft.Base.StiLicense.Key = '6vJhGtLLLz2GNviWmUTrhSqnOItdDwjBylQzQcAOiHkcgIvwL0jnpsDqRpWg5FI5kt2G7A0tYIcUygBh1sPs7plofUOqPB1a4HBIXJB621mau2oiAIj+ysU7gKUXfjn/D5BocmduNB+ZMiDGPxFrAp3PoD0nYNkkWh8r7gBZ1v/JZSXGE3bQDrCQCNSy6mgby+iFAMV8/PuZ1z77U+Xz3fkpbm6MYQXYp3cQooLGLUti7k1TFWrnawT0iEEDJ2iRcU9wLqn2g9UiWesEZtKwI/UmEI2T7nv5NbgV+CHguu6QU4WWzFpIgW+3LUnKCT/vCDY+ymzgycw9A9+HFSzARiPzgOaAuQYrFDpzhXV+ZeX31AxWlnzjDWqpfluygSNPtGul5gyNt2CEoJD1Yom0VN9fvRonYsMsimkFFx2AwyVpPcs+JfVBtpPbTcZscnzUdmiIvxv8Gcin6sNSibM6in/uUKFt3bVgW/XeMYa7MLGF53kvBSwi78poUDigA2n12SmghLR0AHxyEDIgZGOTbNI33GWu7ZsPBeUdGu55R8w='
  1339. Stimulsoft.Base.Localization.StiLocalization.addLocalizationFile( '/reports/stimulsoft/Localization/zh-CHS.xml', true, 'zh-CHS')
  1340. Stimulsoft.Base.Localization.StiLocalization.setLocalizationFile('/reports/stimulsoft/Localization/zh-CHS.xml' )
  1341. // 工具栏
  1342. var options = new Stimulsoft.Viewer.StiViewerOptions()
  1343. options.height = '100%'
  1344. options.appearance.scrollbarsMode = true // 滚动条模式
  1345. options.toolbar.showDesignButton = false // 显示设计按钮
  1346. options.toolbar.showAboutButton = false // 显示关于按钮
  1347. options.toolbar.showResourcesButton = false // 显示资源按钮
  1348. options.toolbar.showFullScreenButton = false // 显示全屏按钮
  1349. options.toolbar.showOpenButton = false // 显示打开按钮
  1350. options.appearance.showTooltips = false // 显示工具提示
  1351. options.appearance.showDialogsHelp = false // 显示对话框帮助
  1352. options.exports.showExportToDocument = false // 显示导出到文档
  1353. options.toolbar.showParametersButton = true // 显示参数按钮
  1354. options.appearance.bookmarksPrint = true // 书签打印
  1355. // options.toolbar.showPrintButton = false // 打印按钮是否显示 下面直接自定义控制打印弹窗是否开启
  1356. // printDestination 参数:用于指定报表打印的目标位置,可以是打印机、PDF 文件或者直接打印到浏览器等。
  1357. // Stimulsoft.Viewer.StiPrintDestination.Direct:表示直接打印到打印机,即将报表内容直接发送至打印机进行打印。
  1358. // 通过设置不同的 printDestination 参数,你可以控制报表打印的行为,例如是直接打印到打印机,还是生成 PDF 文件,或者直接在浏览器中预览打印内容等。
  1359. options.toolbar.printDestination = Stimulsoft.Viewer.StiPrintDestination.Direct
  1360. // htmlRenderMode html渲染模式
  1361. options.appearance.htmlRenderMode = Stimulsoft.Report.Export.StiHtmlExportMode.Table
  1362. // 是创建一个 Stimulsoft 报表查看器的实例的代码
  1363. let viewer = new Stimulsoft.Viewer.StiViewer(options, 'StiViewer', false)
  1364. // 报表
  1365. console.log("创建一个报表实例");
  1366. console.log()
  1367. let report = new window.Stimulsoft.Report.StiReport();
  1368. // 加载文件
  1369. console.log("从url加载报表");
  1370. // report.loadFile("/reports/stimulsoft/demos/SimpleList.mrt");
  1371. report.load(url)
  1372. data.pageOne = 'Page : 1 of 1'
  1373. // 处理超长数据
  1374. if (data.hshipperDetails) {
  1375. var consignerIndex2 = data.hshipperDetails.indexOf( '\n' )
  1376. for (let i = 0; i < 4; i++) {
  1377. consignerIndex2 = data.hshipperDetails.indexOf( '\n', consignerIndex2 + 1 );
  1378. }
  1379. if (consignerIndex2 != -1) {
  1380. var hshipperDetails = data.hshipperDetails.substring(consignerIndex2 + 2, data.hshipperDetails.length)
  1381. data.hshipperDetails = data.hshipperDetails.substring(0, consignerIndex2) + ' *'
  1382. data.commodityDescr += '\n*' + hshipperDetails
  1383. }
  1384. }
  1385. if (data.hconsigneeDetails) {
  1386. var consigneeIndex2 = data.hconsigneeDetails.indexOf( '\n' )
  1387. for (let i = 0; i < 3; i++) {
  1388. consigneeIndex2 = data.hconsigneeDetails.indexOf( '\n', consigneeIndex2 + 1 );
  1389. }
  1390. if (consigneeIndex2 != -1) {
  1391. var hconsigneeDetails = data.hconsigneeDetails.substring(consigneeIndex2 + 2, data.hconsigneeDetails.length)
  1392. data.hconsigneeDetails = data.hconsigneeDetails.substring(0, consigneeIndex2) + ' **'
  1393. data.commodityDescr += '\n**' + hconsigneeDetails
  1394. }
  1395. }
  1396. if (data.hnotifyDetails) {
  1397. var notifierIndex2 = data.hnotifyDetails.indexOf( '\n' )
  1398. for (let i = 0; i < 3; i++) {
  1399. notifierIndex2 = data.hnotifyDetails.indexOf( '\n', notifierIndex2 + 1 );
  1400. }
  1401. if (notifierIndex2 != -1) {
  1402. var hnotifyDetails = data.hnotifyDetails.substring(notifierIndex2 + 2, data.hnotifyDetails.length)
  1403. data.hnotifyDetails = data.hnotifyDetails.substring(0, notifierIndex2) + ' ***'
  1404. data.commodityDescr += '\n***' + hnotifyDetails
  1405. }
  1406. }
  1407. // 处理箱号
  1408. if (this.isPrintTheBoxNumber) {
  1409. data.commodityDescr += '\n.\n.\n'
  1410. }
  1411. // PLACE & DATE OF ISSUE
  1412. data.placeAndDateOfIssue = ''
  1413. if (data.issueAt) {
  1414. data.placeAndDateOfIssue += data.issueAt
  1415. }
  1416. if (data.issueDate) {
  1417. let date = new Date(data.issueDate.replace(/-/g,'/'));
  1418. let yyyy = date.getFullYear();
  1419. let mmmm = date.toDateString().split(" ")[1]
  1420. let dd = date.getDate()
  1421. data.placeAndDateOfIssue += ', ' + dd + '-' + mmmm + '-' + yyyy
  1422. }
  1423. // Total number of containers or packages received by the Carriers
  1424. if (data.preContainersList) {
  1425. let boxMap = new Map();
  1426. for (let boxQuantity of data.preContainersList) {
  1427. if (boxMap.get(boxQuantity.cntrTypeCode)) {
  1428. let v = boxMap.get(boxQuantity.cntrTypeCode)
  1429. boxMap.set(boxQuantity.cntrTypeCode, v + boxQuantity.quantity)
  1430. } else {
  1431. boxMap.set(boxQuantity.cntrTypeCode, boxQuantity.quantity)
  1432. }
  1433. }
  1434. let boxs = ''
  1435. boxMap.forEach(function (value, key, map) {
  1436. boxs += value + 'x' + key + ', '
  1437. })
  1438. boxs = boxs.substring(0, boxs.length - 2)
  1439. data.boxQuantity = boxs + ' CONTAINER(S) ONLY'
  1440. }
  1441. // Number of original B/Ls
  1442. if (data.numberOfObl) {
  1443. data.numberOfObl += ' (' + data.numberOfOblDigit + ')'
  1444. }
  1445. if (data.commodityDescr) {
  1446. var descriptionIndex2 = data.commodityDescr.indexOf( '\n' )
  1447. for (let i = 0; i < 19; i++) {
  1448. descriptionIndex2 = data.commodityDescr.indexOf( '\n', descriptionIndex2 + 1 );
  1449. }
  1450. if (descriptionIndex2 != -1) {
  1451. data.pageOne = 'Page : 1 of 2'
  1452. data.pageTwo = 'Page : 2 of 2'
  1453. var extraLongText = data.commodityDescr.substring(descriptionIndex2 + 2, data.commodityDescr.length)
  1454. data.commodityDescr = data.commodityDescr.substring(0, descriptionIndex2)
  1455. data.extraLongTips = '** TO BE CONTINUED ON ATTACHED LIST **'
  1456. data.extraLongText = extraLongText
  1457. }
  1458. }
  1459. // console.log(data.hshipperDetails, 'hshipperDetails2')
  1460. // 创建一个 Stimulsoft 数据集(DataSet)的实例的代码
  1461. var dataSet = new Stimulsoft.System.Data.DataSet(
  1462. 'reportData'
  1463. )
  1464. dataSet.readJson(data) // 用于将 JSON 格式的数据加载到数据集中。data 是包含报表数据的 JSON 对象。
  1465. // 这是一个方法调用,用于在报表中注册数据源。参数 'reportData' 是数据源的名称,
  1466. // 第二个 'reportData' 是数据源的别名,dataSet 则是之前创建的数据集实例
  1467. report.regData('reportData', 'reportData', dataSet)
  1468. // 从模版和数据加载报表
  1469. // loadReport(report, '', {})
  1470. // 这是将报表对象指定给报表查看器的属性。viewer 是报表查看器的实例,而 report 是之前创建的报表对象。
  1471. viewer.report = report;
  1472. this.$refs.reportContainer.showContainer(
  1473. ()=> {
  1474. setTimeout(() => {
  1475. viewer.renderHtml('reportContainer')
  1476. this.createViewerButtons(viewer)
  1477. }, 50)
  1478. },
  1479. ()=>{
  1480. },
  1481. )
  1482. console.log("加载成功完成!");
  1483. },
  1484. createViewerButtons (viewer){
  1485. viewer.jsObject.collections.images['myClose.png'] =
  1486. 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABmJLR0QA/wD/AP+gvaeTAAAA0ElEQVQ4ja3TO05CQRQG4A8iOwAbtYWETndAaecK7NwCKmETtJZsSBNLobEz8ZFIJQ0UnOGSm3DnYviTybzO/895DQXGWGCVGQuMEqkRcwcfuMOLalziCaf4TIe9UG9nyMJmFRzNGoRK1BU4xxx9G7cfwostciGk+x8MqgySwDXe4tU53hVV+MNtTmAoX84JGv9NYgrHyR6DV8wUSW7hItZLm36ZVoVQxsFJLOMsPOrH/h7dQwR2cdxOTEn8DtUbPGc4V2H7Vb4Yqfedf/GYSGt8VUmxgyfuBAAAAABJRU5ErkJggg=='
  1487. const closeBtn = viewer.jsObject.SmallButton(
  1488. 'closeBtn',
  1489. '关闭',
  1490. 'myClose.png'
  1491. )
  1492. // 增加打印弹窗配置
  1493. const printBtn = viewer.jsObject.SmallButton(
  1494. 'printBtn',
  1495. '打印报表',
  1496. 'myClose.png'
  1497. )
  1498. // console.log(viewer.jsObject.print(),'1013')
  1499. // 获取 关闭按钮的dom元素位置
  1500. const toolbarTable = viewer.jsObject.controls.toolbar.firstChild.firstChild
  1501. const buttonsTable = toolbarTable.rows[0].lastChild.lastChild
  1502. const userButtonCell = buttonsTable.rows[0].insertCell(0)
  1503. // 获取打印按钮的位置
  1504. const buttonsTablePrint = toolbarTable.rows[0].childNodes[0].lastChild // 打印按钮
  1505. const userButtonPrint = buttonsTablePrint.rows[0].childNodes[0] // 打印按钮dom位置
  1506. userButtonPrint.addEventListener("click", (event)=>{
  1507. console.log("打印点击");
  1508. // event.preventDefault()
  1509. });
  1510. userButtonPrint.addEventListener("mouseover", (event) => {
  1511. console.log("移入打印按钮");
  1512. console.log(event,1035)
  1513. });
  1514. userButtonCell.className = 'stiJsViewerClearAllStyles'
  1515. userButtonCell.appendChild(closeBtn) // 添加关闭节点
  1516. // userButtonPrint.prepend(printBtn) // 在 printBtn 节点里最前面增加一个子级节点
  1517. let that=this
  1518. // 关闭按钮的监听点击
  1519. closeBtn.action = function() {
  1520. console.log(that.$refs.ReportContainer,'1022')
  1521. if (that.$refs.reportContainer)
  1522. that.$refs.reportContainer.hideContainer()
  1523. }
  1524. // // // 打印按钮监听
  1525. // printBtn.action = (e)=>{
  1526. // console.log('打印')
  1527. // window.print()
  1528. // }
  1529. },
  1530. }
  1531. }
  1532. </script>
  1533. <style scoped>
  1534. .borderless {
  1535. height: 100%;
  1536. box-sizing: border-box
  1537. }
  1538. .demo-ruleForm {
  1539. font-size: 14px;
  1540. }
  1541. ::v-deep.el-form-item {
  1542. margin-bottom: 0;
  1543. }
  1544. </style>