detailsPage.vue 53 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548
  1. <template>
  2. <div>
  3. <div class="customer-head">
  4. <div class="customer-back">
  5. <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left"
  6. @click="backToList(0)">返回列表
  7. </el-button>
  8. <el-button v-if="detailData.id" type="danger" style="border: none;background: none;color: red"
  9. icon="el-icon-arrow-left"
  10. @click="backToList(1)">返回审核列表
  11. </el-button>
  12. </div>
  13. <div class="add-customer-btn">
  14. <el-button class="el-button--small-yh" type="primary" size="small"
  15. :disabled="form.status>0"
  16. @click="confirmEdit" v-if="optionForm.disabled === true">编辑
  17. </el-button>
  18. <el-button style="margin-right: 10px" type="primary" size="small"
  19. :disabled="form.status>0 || !form.id"
  20. @click="excelBox = true">上传
  21. </el-button>
  22. <el-dropdown style="margin-right: 10px">
  23. <el-button type="primary" size="small">
  24. 初审审核<i class="el-icon-arrow-down el-icon--right"></i>
  25. </el-button>
  26. <el-dropdown-menu slot="dropdown">
  27. <el-dropdown-item @click.native="pleaseCheck" :disabled="!(form.status === 0)">请核数据</el-dropdown-item>
  28. <el-dropdown-item @click.native="checkScheduleDialog = true,checkId = form.id,times = 1" :disabled="form.status < 1">审核进度</el-dropdown-item>
  29. <el-dropdown-item @click.native="repealCancel(1)" :disabled="roleName.includes('admin')?!(form.status === 1) || !(form.status === 4):!(form.status === 1)" v-if="!detailData.id">撤销请核</el-dropdown-item>
  30. <!-- <el-dropdown-item @click.native="changeApproveOpen">特殊审批</el-dropdown-item>-->
  31. </el-dropdown-menu>
  32. </el-dropdown>
  33. <el-dropdown style="margin-right: 10px">
  34. <el-button type="primary" size="small">
  35. 复审审核<i class="el-icon-arrow-down el-icon--right"></i>
  36. </el-button>
  37. <el-dropdown-menu slot="dropdown">
  38. <el-dropdown-item @click.native="pleaseCheck" :disabled="!(form.status === 4)">请核数据</el-dropdown-item>
  39. <el-dropdown-item @click.native="checkScheduleDialog = true,checkId = form.id,times = 2" :disabled="form.status < 5">审核进度</el-dropdown-item>
  40. <el-dropdown-item @click.native="repealCancel(2)" :disabled="roleName.includes('admin')?!(form.status === 5) || !(form.status === 5):!(form.status === 7)" v-if="!detailData.id">撤销请核
  41. </el-dropdown-item>
  42. <!-- <el-dropdown-item @click.native="changeApproveOpen">特殊审批</el-dropdown-item>-->
  43. </el-dropdown-menu>
  44. </el-dropdown>
  45. <el-button class="el-button--small-yh" type="primary" size="small" :disabled="form.status>0" @click="editCustomer">
  46. 保存数据
  47. </el-button>
  48. </div>
  49. </div>
  50. <trade-card title="基础资料" style="margin-top: 50px">
  51. <avue-form :option="optionForm" v-model="form" ref="form">
  52. <!--<template slot="purchaseCompanyId" slot-scope="scope">-->
  53. <!-- <crop-select-->
  54. <!-- v-model="form.purchaseCompanyId"-->
  55. <!-- @getCorpData="(row)=>{getGSData(row,['form','purchaseCompanyName'])}"-->
  56. <!-- :disabled="scope.disabled"-->
  57. <!-- corpType="KH"/>-->
  58. <!--</template>-->
  59. <template slot="customsDeclarationPlaceLabel">
  60. <e-crop-jump label="申报地海关:" corp-type="KH"></e-crop-jump>
  61. </template>
  62. <template slot="declareStatusLabel">
  63. <e-crop-jump label="申报状态:" corp-type="ZD"></e-crop-jump>
  64. </template>
  65. <template slot="exitCustomsLabel">
  66. <e-crop-jump label="进境关别:" corp-type="ZD"></e-crop-jump>
  67. </template>
  68. <template slot="domesticNoLabel">
  69. <e-crop-jump label="境内收发货人:" corp-type="KH"></e-crop-jump>
  70. </template>
  71. <template slot="abroadNoLabel">
  72. <e-crop-jump label="境外收发货人:" corp-type="KH"></e-crop-jump>
  73. </template>
  74. <template slot="consumptionUnitNoLabel">
  75. <e-crop-jump label="消费使用单位:" corp-type="KH"></e-crop-jump>
  76. </template>
  77. <template slot="applicantNoLabel">
  78. <e-crop-jump label="申报单位:" corp-type="KH"></e-crop-jump>
  79. </template>
  80. <template slot="transportTypeLabel">
  81. <e-crop-jump label="运输方式:" corp-type="ZD"></e-crop-jump>
  82. </template>
  83. <template slot="superviseModeLabel">
  84. <e-crop-jump label="监管方式:" corp-type="ZD"></e-crop-jump>
  85. </template>
  86. <template slot="expropriationExemptionNatureLabel">
  87. <e-crop-jump label="征免性质:" corp-type="ZD"></e-crop-jump>
  88. </template>
  89. <template slot="countryOriginIdLabel">
  90. <e-crop-jump label="启运国:" corp-type="DD"></e-crop-jump>
  91. </template>
  92. <template slot="stopOverHarborIdLabel">
  93. <e-crop-jump label="经停港:" corp-type="DD"></e-crop-jump>
  94. </template>
  95. <template slot="transactionModeLabel">
  96. <e-crop-jump label="成交方式:" corp-type="ZD"></e-crop-jump>
  97. </template>
  98. <template slot="freightMethodLabel">
  99. <e-crop-jump label="方式:" corp-type="ZD"></e-crop-jump>
  100. </template>
  101. <template slot="insuranceMethodLabel">
  102. <e-crop-jump label="方式:" corp-type="ZD"></e-crop-jump>
  103. </template>
  104. <template slot="sundryFeesMethodLabel">
  105. <e-crop-jump label="方式:" corp-type="ZD"></e-crop-jump>
  106. </template>
  107. <template slot="packingLabel">
  108. <e-crop-jump label="包装:" corp-type="ZD"></e-crop-jump>
  109. </template>
  110. <template slot="tradeCountryIdLabel">
  111. <e-crop-jump label="贸易国别(地区):" corp-type="DD"></e-crop-jump>
  112. </template>
  113. <template slot="portEntryIdLabel">
  114. <e-crop-jump label="入境口岸:" corp-type="DD"></e-crop-jump>
  115. </template>
  116. <template slot="portDepartureIdLabel">
  117. <e-crop-jump label="启运港:" corp-type="DD"></e-crop-jump>
  118. </template>
  119. <template slot="customsDeclarationTypeLabel">
  120. <e-crop-jump label="报关单类型:" corp-type="ZD"></e-crop-jump>
  121. </template>
  122. <template slot="domesticNo" slot-scope="scope">
  123. <crop-select v-model="form.domesticNo"
  124. label="code"
  125. :disabled="scope.disabled"
  126. @getCorpData="(row)=>{getGSData(row,['form','domesticName','domesticCustomsNo'])}"
  127. corpType="KH"/>
  128. </template>
  129. <template slot="abroadNo" slot-scope="scope">
  130. <crop-select v-model="form.abroadNo"
  131. label="code"
  132. :disabled="scope.disabled"
  133. @getCorpData="(row)=>{getGSData(row,['form','abroadName','abroadCustomsNo'])}"
  134. corpType="KH"/>
  135. </template>
  136. <template slot="consumptionUnitNo" slot-scope="scope">
  137. <crop-select v-model="form.consumptionUnitNo"
  138. label="code"
  139. :disabled="scope.disabled"
  140. @getCorpData="(row)=>{getGSData(row,['form','consumptionUnitName','consumptionUnitCustomsNo'])}"
  141. corpType="KH"/>
  142. </template>
  143. <template slot="applicantNo" slot-scope="scope">
  144. <crop-select v-model="form.applicantNo"
  145. label="code"
  146. :disabled="scope.disabled"
  147. @getCorpData="(row)=>{getGSData(row,['form','applicantName','applicantCustomsNo'])}"
  148. corpType="KH"/>
  149. </template>
  150. <template slot="countryOriginId" slot-scope="scope">
  151. <port-info v-model="form.countryOriginId" type="id" @balabalaTow="(row)=>{balabala(row,['form','countryOriginName'])}" :search="{typeName: '国家'}" :disabled="scope.disabled"/>
  152. </template>
  153. <template slot="tradeCountryId" slot-scope="scope">
  154. <port-info v-model="form.tradeCountryId" type="id" @balabalaTow="(row)=>{balabala(row,['form','tradeCountryName'])}" :search="{typeName: '国家'}" :disabled="scope.disabled"/>
  155. </template>
  156. <template slot="stopOverHarborId" slot-scope="scope">
  157. <port-info v-model="form.stopOverHarborId" type="id" @balabalaTow="(row)=>{balabala(row,['form','stopOverHarborName'])}" :search="{typeName: '港口'}" :disabled="scope.disabled"/>
  158. </template>
  159. <template slot="portDepartureId" slot-scope="scope">
  160. <port-info v-model="form.portDepartureId" type="id" @balabalaTow="(row)=>{balabala(row,['form','portDepartureName'])}" :search="{typeName: '港口'}" :disabled="scope.disabled"/>
  161. </template>
  162. <template slot="portEntryId" slot-scope="scope">
  163. <port-info v-model="form.portEntryId" type="id" @balabalaTow="(row)=>{balabala(row,['form','portEntryName'])}" :search="{typeName: '港口'}" :disabled="scope.disabled"/>
  164. </template>
  165. </avue-form>
  166. </trade-card>
  167. <trade-card title="商品信息">
  168. <avue-crud
  169. :option="option"
  170. :data="dataList"
  171. v-model="formTwo"
  172. ref="crud"
  173. :key="key"
  174. :before-open="beforeOpen"
  175. @row-save="rowSave"
  176. @row-update="rowUpdate"
  177. @resetColumn="resetColumnTwo('crud','option','optionBack',246.1)"
  178. @saveColumn="saveColumnTwo('crud','option','optionBack',246.1)">
  179. <template slot-scope="{type,size,row,index,disabled}" slot="menu">
  180. <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
  181. @click="$refs.crud.rowEdit(row,index)">编辑
  182. </el-button>
  183. <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
  184. @click="rowDel(row,index,'SP')">删除
  185. </el-button>
  186. </template>
  187. <!-- <template slot="boxMakingCompanyForm" slot-scope="scope">-->
  188. <!-- <crop-select v-model="formTwo.boxMakingCompanyId" :disabled="scope.disabled" :refresh="false"-->
  189. <!-- @getCorpData="(row)=>{getGSData(row,['formTwo','boxMakingCompany'])}" corpType="GS"/>-->
  190. <!-- </template>-->
  191. <template slot="originatedCountriesNameForm" slot-scope="scope">
  192. <port-info v-model="formTwo.originatedCountriesId" type="id" @balabalaTow="(row)=>{balabala(row,['formTwo','originatedCountriesName'])}" :search="{typeName: '国家'}" :disabled="scope.disabled"/>
  193. </template>
  194. <template slot="finalDestinationCountryNameForm" slot-scope="scope">
  195. <port-info v-model="formTwo.finalDestinationCountryId" type="id" @balabalaTow="(row)=>{balabala(row,['formTwo','finalDestinationCountryName'])}" :search="{typeName: '国家'}" :disabled="scope.disabled"/>
  196. </template>
  197. </avue-crud>
  198. </trade-card>
  199. <trade-card title="集装箱">
  200. <avue-crud
  201. :option="optionTwo"
  202. :data="containerList"
  203. v-model="formTwoTwo"
  204. ref="crudTwo"
  205. :key="key"
  206. :before-open="beforeOpen"
  207. @row-save="rowSave"
  208. @row-update="rowUpdate"
  209. @resetColumn="resetColumnTwo('crudTwo','optionTwo','optionTwoBack',246.2)"
  210. @saveColumn="saveColumnTwo('crudTwo','optionTwo','optionTwoBack',246.2)">
  211. <template slot-scope="{type,size,row,index,disabled}" slot="menu">
  212. <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
  213. @click="$refs.crudTwo.rowEdit(row,index)">编辑
  214. </el-button>
  215. <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
  216. @click="rowDel(row,index,'JZX')">删除
  217. </el-button>
  218. </template>
  219. </avue-crud>
  220. </trade-card>
  221. <trade-card title="单证">
  222. <avue-crud
  223. :option="optionThree"
  224. :data="documentsList"
  225. v-model="formTwoThree"
  226. ref="crudThree"
  227. :key="key"
  228. :before-open="beforeOpen"
  229. @row-save="rowSave"
  230. @row-update="rowUpdate"
  231. @resetColumn="resetColumnTwo('crudThree','optionThree','optionThreeBack',246.21)"
  232. @saveColumn="saveColumnTwo('crudThree','optionThree','optionThreeBack',246.21)">
  233. <template slot-scope="{type,size,row,index,disabled}" slot="menu">
  234. <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
  235. @click="$refs.crudThree.rowEdit(row,index)">编辑
  236. </el-button>
  237. <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
  238. @click="rowDel(row,index,'DZ')">删除
  239. </el-button>
  240. </template>
  241. </avue-crud>
  242. </trade-card>
  243. <!-- 费用信息组件-->
  244. <box-cost v-model="dataListTwo" :id="form.id" activeName="second" ref="boxCost" type="BG" @resetTrigger="resetTrigger" url="/api/blade-box-tube/declareCustomsFees/remove"></box-cost>
  245. <trade-card title="附件明细">
  246. <c-upload
  247. basic
  248. :data="tradingBoxFilesList"
  249. :disabled="disabled"
  250. deleteUrl="/api/blade-box-tube/declareCustomsFiles/remove"
  251. :enumerationValue="246.3"
  252. display
  253. />
  254. </trade-card>
  255. <el-dialog
  256. append-to-body
  257. title="审批进度"
  258. class="el-dialogDeep"
  259. :visible.sync="checkScheduleDialog"
  260. width="40%"
  261. :close-on-click-modal="false"
  262. :destroy-on-close="true"
  263. :close-on-press-escape="false"
  264. v-dialog-drag
  265. >
  266. <check-schedule
  267. :checkId="checkId"
  268. :times="times"
  269. :key="times"
  270. :batchNo="batchNo"
  271. @choceScheduleFun="choceScheduleFun"
  272. ></check-schedule>
  273. </el-dialog>
  274. <el-dialog
  275. title="上传附件"
  276. append-to-body
  277. :visible.sync="excelBox"
  278. width="555px"
  279. v-if="excelBox"
  280. :close-on-click-modal="false"
  281. v-dialog-drag
  282. >
  283. <el-upload
  284. class="upload-demo"
  285. drag
  286. style="text-align: center"
  287. ref="upload"
  288. :action="action"
  289. :headers="headers"
  290. :data="{id:form.id}"
  291. accept=".pdf,.PDF"
  292. :show-file-list="false"
  293. :on-success="onSuccess"
  294. :on-error="onError"
  295. multiple
  296. >
  297. <i class="el-icon-upload"></i>
  298. <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
  299. <div class="el-upload__tip" slot="tip">
  300. 如上传文件过大,请耐心等待上传成功
  301. </div>
  302. </el-upload>
  303. </el-dialog>
  304. </div>
  305. </template>
  306. <script>
  307. import {
  308. detail,
  309. submit,
  310. tradingBoxFiles,
  311. selectArchivesList,
  312. tradingBoxItem,
  313. tradingBoxFees,
  314. containerItem,
  315. documentsItem,
  316. pleaseCheck,
  317. repealCancel, copyDetail
  318. } from "@/api/importTrade/importDeclaration.js";
  319. import checkSchedule from "@/components/check/checkSchedule";
  320. import {selectByName} from "@/api/boxManagement";
  321. import {getToken} from "@/util/auth";
  322. export default {
  323. name: "detailsPage",
  324. props: {
  325. onLoad: Object,
  326. detailData: Object
  327. },
  328. components: {checkSchedule},
  329. data() {
  330. return {
  331. excelBox:false,
  332. action: "/api/blade-box-tube/declareCustoms/importPDF",
  333. headers: { "Blade-Auth": "Bearer " + getToken() },
  334. roleName:'',
  335. key: 0,
  336. formTwoTwo:{},
  337. formTwoThree:{},
  338. containerList:[],
  339. documentsList:[],
  340. checkScheduleDialog: false,
  341. checkId: '',
  342. batchNo: '',
  343. times: '',
  344. breakConfiguration: {
  345. multipleChoices: false,
  346. multiple: false,
  347. disabled: false,
  348. searchShow: true,
  349. collapseTags: false,
  350. clearable: true,
  351. placeholder: "请点击右边按钮选择",
  352. dicData: []
  353. },
  354. form: {},
  355. formTwo: {},
  356. optionForm: {
  357. menuBtn: false,
  358. span: 6,
  359. column: [{
  360. label: '申报地海关',
  361. prop: 'customsDeclarationPlace',
  362. filterable: true,
  363. type: 'select',
  364. dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
  365. props: {
  366. label: "dictValue",
  367. value: "dictValue"
  368. }
  369. }, {
  370. label: '申报状态',
  371. prop: 'declareStatus',
  372. filterable: true,
  373. type: 'select',
  374. dicUrl: "/api/blade-system/dict-biz/dictionary?code=declare_status",
  375. props: {
  376. label: "dictValue",
  377. value: "dictValue"
  378. }
  379. }, {
  380. label: '统一编号',
  381. prop: 'unifiedNumbering'
  382. }, {
  383. label: '预录入编号',
  384. prop: 'preEntryNo'
  385. }, {
  386. label: '海关编号',
  387. prop: 'customsNo'
  388. }, {
  389. label: '进境关别',
  390. prop: 'exitCustoms',
  391. filterable: true,
  392. type: 'select',
  393. dicUrl: "/api/blade-system/dict-biz/dictionary?code=customs",
  394. props: {
  395. label: "dictValue",
  396. value: "dictValue"
  397. }
  398. }, {
  399. label: '已实施防御性防疫',
  400. prop: 'whetherEpidemicPrevention',
  401. labelWidth:115,
  402. overHidden: true,
  403. filterable: true,
  404. type: 'select',
  405. dicData:[{
  406. label:'是',
  407. value:1
  408. },{
  409. label:'否',
  410. value:0
  411. }]
  412. }, {
  413. label: '备案号',
  414. prop: 'filingNo'
  415. }, {
  416. label: '合同协议号',
  417. prop: 'contractAgreementNo'
  418. }, {
  419. label: '进口日期',
  420. prop: 'importExportDate',
  421. type: "date",
  422. format: "yyyy-MM-dd",
  423. valueFormat: "yyyy-MM-dd HH:mm:ss"
  424. }, {
  425. label: '启运日期',
  426. prop: 'shipmentDate',
  427. type: "date",
  428. format: "yyyy-MM-dd",
  429. valueFormat: "yyyy-MM-dd HH:mm:ss"
  430. }, {
  431. label: '申报日期',
  432. prop: 'declareDate',
  433. type: "date",
  434. format: "yyyy-MM-dd",
  435. valueFormat: "yyyy-MM-dd HH:mm:ss"
  436. },{
  437. label: '境内收发货人',
  438. prop: 'domesticNo'
  439. }, {
  440. label: '海关号',
  441. prop: 'domesticCustomsNo'
  442. }, {
  443. label: '名称',
  444. prop: 'domesticName',
  445. span: 12
  446. },{
  447. label: '境外收发货人',
  448. prop: 'abroadNo'
  449. }, {
  450. label: '海关号',
  451. prop: 'abroadCustomsNo'
  452. }, {
  453. label: '名称',
  454. prop: 'abroadName',
  455. span: 12
  456. }, {
  457. label: '消费使用单位',
  458. prop: 'consumptionUnitNo'
  459. }, {
  460. label: '海关号',
  461. prop: 'consumptionUnitCustomsNo'
  462. }, {
  463. label: '名称',
  464. prop: 'consumptionUnitName',
  465. span: 12
  466. }, {
  467. label: '申报单位',
  468. prop: 'applicantNo'
  469. }, {
  470. label: '海关号',
  471. prop: 'applicantCustomsNo'
  472. }, {
  473. label: '名称',
  474. prop: 'applicantName',
  475. span: 12
  476. }, {
  477. label: '运输方式',
  478. prop: 'transportType',
  479. filterable: true,
  480. type: 'select',
  481. dicUrl: "/api/blade-system/dict-biz/dictionary?code=mode_transport",
  482. props: {
  483. label: "dictValue",
  484. value: "dictValue"
  485. }
  486. }, {
  487. label: '运输工具名称',
  488. prop: 'conveyanceName'
  489. }, {
  490. label: '航次号',
  491. prop: 'voyageNo'
  492. }, {
  493. label: '提运单号',
  494. prop: 'deliveryNumbers'
  495. }, {
  496. label: '监管方式',
  497. prop: 'superviseMode',
  498. span: 8,
  499. filterable: true,
  500. type: 'select',
  501. dicUrl: "/api/blade-system/dict-biz/dictionary?code=supervise_mode",
  502. props: {
  503. label: "dictValue",
  504. value: "dictValue"
  505. }
  506. }, {
  507. label: '征免性质',
  508. prop: 'expropriationExemptionNature',
  509. span: 8,
  510. filterable: true,
  511. type: 'select',
  512. dicUrl: "/api/blade-system/dict-biz/dictionary?code=expropriation_nature",
  513. props: {
  514. label: "dictValue",
  515. value: "dictValue"
  516. }
  517. }, {
  518. label: '许可证号',
  519. prop: 'licenseKey',
  520. span: 8
  521. }, {
  522. label: '启运国',
  523. prop: 'countryOriginId',
  524. span: 8
  525. }, {
  526. label: '经停港',
  527. prop: 'stopOverHarborId',
  528. span: 8
  529. }, {
  530. label: '成交方式',
  531. prop: 'transactionMode',
  532. span: 8,
  533. filterable: true,
  534. type: 'select',
  535. dicUrl: "/api/blade-system/dict-biz/dictionary?code=transaction_mode",
  536. props: {
  537. label: "dictValue",
  538. value: "dictValue"
  539. }
  540. }, {
  541. label: '运费',
  542. prop: 'freight',
  543. type: 'number',
  544. controls: false,
  545. precision:2
  546. }, {
  547. label: '方式',
  548. prop: 'freightMethod',
  549. filterable: true,
  550. type: 'select',
  551. dicUrl: "/api/blade-system/dict-biz/dictionary?code=method",
  552. props: {
  553. label: "dictValue",
  554. value: "dictValue"
  555. }
  556. }, {
  557. label: '金额',
  558. prop: 'freightAmount',
  559. type: 'number',
  560. controls: false,
  561. precision:2
  562. }, {
  563. label: '币别',
  564. prop: 'freightCurrency',
  565. overHidden: true,
  566. filterable: true,
  567. type: "select",
  568. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  569. props: {
  570. label: "dictValue",
  571. value: "dictValue"
  572. },
  573. }, {
  574. label: '保险',
  575. prop: 'insurance',
  576. type: 'number',
  577. controls: false,
  578. precision:2
  579. }, {
  580. label: '方式',
  581. prop: 'insuranceMethod',
  582. filterable: true,
  583. type: 'select',
  584. dicUrl: "/api/blade-system/dict-biz/dictionary?code=method",
  585. props: {
  586. label: "dictValue",
  587. value: "dictValue"
  588. }
  589. }, {
  590. label: '金额',
  591. prop: 'insuranceAmount',
  592. type: 'number',
  593. controls: false,
  594. precision:2
  595. }, {
  596. label: '币别',
  597. prop: 'insuranceCurrency',
  598. overHidden: true,
  599. filterable: true,
  600. type: "select",
  601. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  602. props: {
  603. label: "dictValue",
  604. value: "dictValue"
  605. },
  606. }, {
  607. label: '杂费',
  608. prop: 'sundryFees',
  609. type: 'number',
  610. controls: false,
  611. precision:2
  612. }, {
  613. label: '方式',
  614. prop: 'sundryFeesMethod',
  615. filterable: true,
  616. type: 'select',
  617. dicUrl: "/api/blade-system/dict-biz/dictionary?code=method",
  618. props: {
  619. label: "dictValue",
  620. value: "dictValue"
  621. }
  622. }, {
  623. label: '金额',
  624. prop: 'sundryFeesAmount',
  625. type: 'number',
  626. controls: false,
  627. precision:2
  628. }, {
  629. label: '币别',
  630. prop: 'sundryFeesCurrency',
  631. overHidden: true,
  632. filterable: true,
  633. type: "select",
  634. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  635. props: {
  636. label: "dictValue",
  637. value: "dictValue"
  638. },
  639. }, {
  640. label: '件数',
  641. prop: 'number',
  642. type: 'number',
  643. controls: false,
  644. precision:2
  645. }, {
  646. label: '包装',
  647. prop: 'packing',
  648. filterable: true,
  649. type: 'select',
  650. dicUrl: "/api/blade-system/dict-biz/dictionary?code=packing",
  651. props: {
  652. label: "dictValue",
  653. value: "dictValue"
  654. }
  655. }, {
  656. label: '毛重(kg)',
  657. prop: 'grossWeight',
  658. type: 'number',
  659. controls: false,
  660. precision:2
  661. }, {
  662. label: '净重(kg)',
  663. prop: 'netWeight'
  664. }, {
  665. label: '贸易国别(地区)',
  666. prop: 'tradeCountryId',
  667. labelWidth:100
  668. }, {
  669. label: '集装箱数',
  670. prop: 'containersNumber',
  671. type: 'number',
  672. controls: false,
  673. precision:2
  674. }, {
  675. label: '随附单证',
  676. prop: 'documentsAttached'
  677. }, {
  678. label: '入境口岸',
  679. prop: 'portEntryId'
  680. }, {
  681. label: '货物存放地点',
  682. prop: 'storagePlaceGoods'
  683. }, {
  684. label: '启运港',
  685. prop: 'portDepartureId'
  686. }, {
  687. label: '报关单类型',
  688. prop: 'customsDeclarationType',
  689. filterable: true,
  690. type: 'select',
  691. dicUrl: "/api/blade-system/dict-biz/dictionary?code=declaration_type",
  692. props: {
  693. label: "dictValue",
  694. value: "dictValue"
  695. }
  696. }, {
  697. label: '系统编号',
  698. prop: 'sysNo',
  699. disabled:true
  700. }, {
  701. label: '备注',
  702. prop: 'remark',
  703. type: 'textarea',
  704. minRows: 3,
  705. span: 12
  706. }, {
  707. label: '唛头',
  708. prop: 'shippingMark',
  709. type: 'textarea',
  710. minRows: 3,
  711. span: 12
  712. }]
  713. },
  714. option: {},
  715. optionBack: {
  716. align: 'center',
  717. index: true,
  718. addBtnText: "录入明细",
  719. refreshBtn: false,
  720. addBtn: true,
  721. span: 8,
  722. addRowBtn: false,
  723. cellBtn: false,
  724. editBtn: false,
  725. delBtn: false,
  726. menuWidth: 140,
  727. dialogTop: 25,
  728. dialogWidth: "80%",
  729. showSummary: true,
  730. sumColumnList: [{
  731. name: 'amount',
  732. type: 'sum',
  733. decimals: 2
  734. }],
  735. column: [{
  736. label: '备案编号',
  737. prop: 'goodsFilingNo',
  738. width: 100,
  739. overHidden: true
  740. }, {
  741. label: '商品编号',
  742. prop: 'commodityNo',
  743. width: 100,
  744. }, {
  745. label: '检验检疫名称',
  746. prop: 'quarantineName',
  747. width: 100
  748. }, {
  749. label: '商品名称',
  750. prop: 'commodityName',
  751. overHidden: true,
  752. filterable: true,
  753. type: "select",
  754. dicUrl: "/api/blade-client/goodsdesc/descListAll",
  755. props: {
  756. label: "cname",
  757. value: "cname"
  758. },
  759. width: 100
  760. }, {
  761. label: '规格型号',
  762. prop: 'specificationModel',
  763. overHidden: true,
  764. width: 100
  765. }, {
  766. label: '成交数量',
  767. prop: 'transactionsNumber',
  768. overHidden: true,
  769. width: 100
  770. }, {
  771. label: '单位',
  772. prop: 'dealUnitMeasurement',
  773. overHidden: true,
  774. width: 100,
  775. filterable: true,
  776. type: 'select',
  777. dicUrl: "/api/blade-system/dict-biz/dictionary?code=deal_unit",
  778. props: {
  779. label: "dictValue",
  780. value: "dictValue"
  781. }
  782. }, {
  783. label: '单价',
  784. prop: 'price',
  785. overHidden: true,
  786. width: 100
  787. }, {
  788. label: '总价',
  789. prop: 'totalPrice',
  790. overHidden: true,
  791. width: 100
  792. }, {
  793. label: '币制',
  794. prop: 'currencySystem',
  795. overHidden: true,
  796. width: 100,
  797. filterable: true,
  798. type: 'select',
  799. dicUrl: "/api/blade-system/dict-biz/dictionary?code=currency",
  800. props: {
  801. label: "dictValue",
  802. value: "dictValue"
  803. }
  804. }, {
  805. label: '法定第一数量',
  806. prop: 'statutoryFirstQuantity',
  807. overHidden: true,
  808. width: 100
  809. }, {
  810. label: '法定第一计量单位',
  811. prop: 'statutoryFirstMeasurement',
  812. labelWidth: 120,
  813. overHidden: true,
  814. width: 120,
  815. filterable: true,
  816. type: 'select',
  817. dicUrl: "/api/blade-system/dict-biz/dictionary?code=deal_unit",
  818. props: {
  819. label: "dictValue",
  820. value: "dictValue"
  821. }
  822. }, {
  823. label: '加工成品单耗版本号',
  824. prop: 'versionNo',
  825. labelWidth:125,
  826. overHidden: true,
  827. width: 130
  828. }, {
  829. label: '货号',
  830. prop: 'articleNo',
  831. overHidden: true,
  832. width: 100
  833. }, {
  834. label: '最终目的国',
  835. prop: 'finalDestinationCountryName',
  836. overHidden: true,
  837. width: 100
  838. }, {
  839. label: '法定第二数量',
  840. prop: 'legalSecondQuantity',
  841. overHidden: true,
  842. width: 100
  843. }, {
  844. label: '法定第二计量单位',
  845. prop: 'legalSecondMeasurement',
  846. labelWidth: 120,
  847. overHidden: true,
  848. width: 120,
  849. filterable: true,
  850. type: 'select',
  851. dicUrl: "/api/blade-system/dict-biz/dictionary?code=deal_unit",
  852. props: {
  853. label: "dictValue",
  854. value: "dictValue"
  855. }
  856. }, {
  857. label: '原产国',
  858. prop: 'originatedCountriesName',
  859. overHidden: true,
  860. width: 100
  861. }, {
  862. label: '原产地区',
  863. prop: 'regionOrigin',
  864. overHidden: true,
  865. width: 100
  866. }, {
  867. label: '境内目的地',
  868. prop: 'domesticDestination',
  869. overHidden: true,
  870. width: 100
  871. }, {
  872. label: '征免方式',
  873. prop: 'expropriationExemptionType',
  874. overHidden: true,
  875. width: 100,
  876. filterable: true,
  877. type: 'select',
  878. dicUrl: "/api/blade-system/dict-biz/dictionary?code=expropriation_type",
  879. props: {
  880. label: "dictValue",
  881. value: "dictValue"
  882. }
  883. }]
  884. },
  885. optionTwo:{},
  886. optionTwoBack: {
  887. align: 'center',
  888. index: true,
  889. addBtnText: "录入明细",
  890. refreshBtn: false,
  891. addBtn: true,
  892. span: 8,
  893. addRowBtn: false,
  894. cellBtn: false,
  895. editBtn: false,
  896. delBtn: false,
  897. menuWidth: 140,
  898. dialogTop: 25,
  899. dialogWidth: "80%",
  900. showSummary: true,
  901. sumColumnList: [{
  902. name: 'amount',
  903. type: 'sum',
  904. decimals: 2
  905. }],
  906. column: [{
  907. label: '箱号',
  908. prop: 'caseNo',
  909. overHidden: true,
  910. rules: [{
  911. required: true,
  912. message: " ",
  913. trigger: "blur"
  914. }]
  915. }, {
  916. label: '箱类型',
  917. prop: 'boxType',
  918. overHidden: true
  919. }, {
  920. label: '拼箱标识',
  921. prop: 'lclSign',
  922. overHidden: true,
  923. filterable: true,
  924. type: 'select',
  925. dicData:[{
  926. label:'是',
  927. value:1
  928. },{
  929. label:'否',
  930. value:0
  931. }]
  932. }]
  933. },
  934. optionThree:{},
  935. optionThreeBack: {
  936. align: 'center',
  937. index: true,
  938. addBtnText: "录入明细",
  939. refreshBtn: false,
  940. addBtn: true,
  941. span: 8,
  942. addRowBtn: false,
  943. cellBtn: false,
  944. editBtn: false,
  945. delBtn: false,
  946. menuWidth: 140,
  947. dialogTop: 25,
  948. dialogWidth: "80%",
  949. showSummary: true,
  950. sumColumnList: [{
  951. name: 'amount',
  952. type: 'sum',
  953. decimals: 2
  954. }],
  955. column: [{
  956. label: '单证代码',
  957. prop: 'documentCode',
  958. overHidden: true
  959. },{
  960. label: '单证编码',
  961. prop: 'documentNo',
  962. overHidden: true
  963. }]
  964. },
  965. dataList: [],
  966. dataListTwo: [],
  967. tradingBoxFilesList: [],
  968. disabled: false,
  969. costData: {}
  970. }
  971. },
  972. async created() {
  973. this.roleName=localStorage.getItem("roleName")
  974. this.option = await this.getColumnData(this.getColumnName(246.1), this.optionBack);
  975. this.findObject(this.option.column, "commodityName").change = ({value, column}) => {
  976. for (let item of this.$refs.crud.DIC.commodityName){
  977. if (value === item.cname){
  978. this.formTwo.commodityNo = item.code
  979. this.formTwo.specificationModel = item.typeno
  980. }
  981. }
  982. }
  983. this.optionTwo = await this.getColumnData(this.getColumnName(246.2), this.optionTwoBack);
  984. this.optionThree = await this.getColumnData(this.getColumnName(246.21), this.optionThreeBack);
  985. selectByName("买箱费").then(res => {
  986. this.costData = res.data.data
  987. })
  988. this.key++
  989. if (this.onLoad.id.slice(0, 2) === '复制'){
  990. this.copyData(this.onLoad.id.slice(2, this.onLoad.id.length), false)
  991. } else if (this.onLoad.id && this.detailData.id) {
  992. this.refresh(this.onLoad.id, true)
  993. } else if (this.onLoad.id) {
  994. this.refresh(this.onLoad.id, true)
  995. }
  996. },
  997. methods: {
  998. onSuccess(response, file, fileList) {
  999. this.excelBox = false;
  1000. this.refresh(this.form.id)
  1001. },
  1002. onError(err, file, fileList){
  1003. this.$message.error(JSON.parse(err.message).msg)
  1004. },
  1005. confirmEdit() {
  1006. if (this.form.status > 0) {
  1007. //基础资料
  1008. this.$set(this.optionForm, "disabled", true)
  1009. //箱信息
  1010. this.$set(this.option, "disabled", true)
  1011. this.$set(this.option, "addBtn", false)
  1012. this.$set(this.option, "menu", false)
  1013. //费用信息
  1014. this.$set(this.$refs.boxCost.option, "disabled", true)
  1015. this.$set(this.$refs.boxCost.option, "addBtn", false)
  1016. this.$set(this.$refs.boxCost.option, "menu", false)
  1017. //集装箱
  1018. this.$set(this.optionTwo, "disabled", true)
  1019. this.$set(this.optionTwo, "addBtn", false)
  1020. this.$set(this.optionTwo, "menu", false)
  1021. //单证
  1022. this.$set(this.optionThree, "disabled", true)
  1023. this.$set(this.optionThree, "addBtn", false)
  1024. this.$set(this.optionThree, "menu", false)
  1025. //附件和顶部按钮
  1026. this.disabled = true
  1027. } else {
  1028. //基础资料
  1029. this.$set(this.optionForm, "disabled", false)
  1030. //箱信息
  1031. this.$set(this.option, "disabled", false)
  1032. this.$set(this.option, "addBtn", true)
  1033. this.$set(this.option, "menu", true)
  1034. //集装箱
  1035. this.$set(this.optionTwo, "disabled", false)
  1036. this.$set(this.optionTwo, "addBtn", true)
  1037. this.$set(this.optionTwo, "menu", true)
  1038. //单证
  1039. this.$set(this.optionThree, "disabled", false)
  1040. this.$set(this.optionThree, "addBtn", true)
  1041. this.$set(this.optionThree, "menu", true)
  1042. //费用信息
  1043. this.$set(this.$refs.boxCost.option, "disabled", false)
  1044. this.$set(this.$refs.boxCost.option, "addBtn", true)
  1045. this.$set(this.$refs.boxCost.option, "menu", true)
  1046. //附件和顶部按钮
  1047. this.disabled = false
  1048. }
  1049. },
  1050. // 明细删除
  1051. rowDel(row, index, type) {
  1052. this.$confirm("确定将选择数据删除?", {
  1053. confirmButtonText: "确定",
  1054. cancelButtonText: "取消",
  1055. type: "warning"
  1056. }).then(() => {
  1057. if (row.id) {
  1058. if (type == "SP"){
  1059. tradingBoxItem(row.id).then(res => {
  1060. if (res.data.success) {
  1061. this.$message.success("操作成功!");
  1062. this.dataList.splice(index, 1);
  1063. }
  1064. });
  1065. }
  1066. if (type == "JZX"){
  1067. containerItem(row.id).then(res => {
  1068. if (res.data.success) {
  1069. this.$message.success("操作成功!");
  1070. this.containerList.splice(index, 1);
  1071. }
  1072. });
  1073. }
  1074. if (type == "DZ"){
  1075. documentsItem(row.id).then(res => {
  1076. if (res.data.success) {
  1077. this.$message.success("操作成功!");
  1078. this.documentsList.splice(index, 1);
  1079. }
  1080. });
  1081. }
  1082. } else {
  1083. if (type == "DZ"){
  1084. this.dataList.splice(index, 1);
  1085. }
  1086. if (type == "JZX"){
  1087. this.containerList.splice(index, 1);
  1088. }
  1089. if (type == "DZ"){
  1090. this.documentsList.splice(index, 1);
  1091. }
  1092. this.$message.success("操作成功!");
  1093. }
  1094. }
  1095. )
  1096. ;
  1097. },
  1098. balabala(row,type) {
  1099. if (row.name){
  1100. this[type[0]][type[1]] = row.name
  1101. }else {
  1102. this[type[0]][type[1]] = row.cname
  1103. }
  1104. },
  1105. //选择费用名称
  1106. selectValue(value) {
  1107. this.formThree.itemName = value.cname
  1108. },
  1109. //撤销
  1110. repealCancel(tyrp) {
  1111. this.$confirm("您确定撤回此次申请吗?", {
  1112. confirmButtonText: "确定",
  1113. cancelButtonText: "取消",
  1114. type: "warning"
  1115. }).then(() => {
  1116. const data = {
  1117. id: this.form.id,
  1118. pageLabel: "进口报关",
  1119. importExportSigns: "BGJK",
  1120. checkFlag:tyrp
  1121. }
  1122. const loading = this.$loading({
  1123. lock: true,
  1124. text: '加载中',
  1125. spinner: 'el-icon-loading',
  1126. background: 'rgba(255,255,255,0.7)'
  1127. });
  1128. repealCancel(data).then(res => {
  1129. loading.close();
  1130. this.$message.success('撤回成功')
  1131. this.refresh(this.form.id)
  1132. }).catch(() => {
  1133. loading.close();
  1134. })
  1135. })
  1136. },
  1137. // 请核
  1138. pleaseCheck() {
  1139. this.$confirm("您确定提交请核申请吗?", {
  1140. confirmButtonText: "确定",
  1141. cancelButtonText: "取消",
  1142. type: "warning"
  1143. }).then(() => {
  1144. this.$refs["form"].validate((valid, done) => {
  1145. done()
  1146. if (valid) {
  1147. if (this.dataList.length === 0) {
  1148. return this.$message.error("商品信息不能为空")
  1149. }
  1150. if (this.$refs.boxCost.dataList.length === 0) {
  1151. return this.$message.error("费用信息不能为空")
  1152. } else {
  1153. for (let item of this.$refs.boxCost.dataList) {
  1154. if (!item.id) {
  1155. return this.$message.error("费用信息未保存")
  1156. }
  1157. }
  1158. }
  1159. let data = {
  1160. ...this.form,
  1161. itemList: this.dataList,
  1162. feesList: this.dataListTwo,
  1163. fileList: this.tradingBoxFilesList,
  1164. containerList:this.containerList,
  1165. documentsList:this.documentsList,
  1166. importExportSigns: "BGJK",
  1167. }
  1168. const loading = this.$loading({
  1169. lock: true,
  1170. text: '加载中',
  1171. spinner: 'el-icon-loading',
  1172. background: 'rgba(255,255,255,0.7)'
  1173. });
  1174. submit(data).then(res => {
  1175. const data = {
  1176. id: res.data.data.id,
  1177. url: '/purchase/importDeclaration/index',
  1178. pageStatus: "this.$store.getters.domSaleStatus",
  1179. pageLabel: "进口报关",
  1180. checkFlag: 1,
  1181. }
  1182. pleaseCheck({
  1183. ...data,
  1184. importExportSigns: "BGJK"
  1185. }).then(rest => {
  1186. loading.close();
  1187. this.$message.success('请核成功')
  1188. this.refresh(res.data.data.id)
  1189. }).catch(() => {
  1190. loading.close();
  1191. })
  1192. }).catch(() => {
  1193. loading.close();
  1194. })
  1195. }
  1196. });
  1197. })
  1198. },
  1199. //审核关闭
  1200. choceScheduleFun() {
  1201. this.checkScheduleDialog = false
  1202. },
  1203. refresh(id, type) {
  1204. const loading = this.$loading({
  1205. lock: true,
  1206. text: '加载中',
  1207. spinner: 'el-icon-loading',
  1208. background: 'rgba(255,255,255,0.7)'
  1209. });
  1210. detail({id: id}).then(res => {
  1211. this.form = res.data.data
  1212. this.dataList = res.data.data.itemList
  1213. this.dataListTwo = res.data.data.feesList
  1214. this.tradingBoxFilesList = res.data.data.fileList
  1215. this.containerList = res.data.data.containerList
  1216. this.documentsList = res.data.data.documentsList
  1217. delete this.form.containerList
  1218. delete this.form.documentsList
  1219. delete this.form.itemList
  1220. delete this.form.feesList
  1221. delete this.form.fileList
  1222. loading.close();
  1223. if (type) {
  1224. //基础资料
  1225. this.$set(this.optionForm, "disabled", true)
  1226. //箱信息
  1227. this.$set(this.option, "disabled", true)
  1228. this.$set(this.option, "addBtn", false)
  1229. this.$set(this.option, "menu", false)
  1230. //集装箱
  1231. this.$set(this.optionTwo, "disabled", true)
  1232. this.$set(this.optionTwo, "addBtn", false)
  1233. this.$set(this.optionTwo, "menu", false)
  1234. //单证
  1235. this.$set(this.optionThree, "disabled", true)
  1236. this.$set(this.optionThree, "addBtn", false)
  1237. this.$set(this.optionThree, "menu", false)
  1238. //费用信息
  1239. this.$set(this.$refs.boxCost.option, "disabled", true)
  1240. this.$set(this.$refs.boxCost.option, "addBtn", false)
  1241. this.$set(this.$refs.boxCost.option, "menu", false)
  1242. //附件和顶部按钮
  1243. this.disabled = true
  1244. } else {
  1245. if (this.form.status > 0) {
  1246. //基础资料
  1247. this.$set(this.optionForm, "disabled", true)
  1248. //箱信息
  1249. this.$set(this.option, "disabled", true)
  1250. this.$set(this.option, "addBtn", false)
  1251. this.$set(this.option, "menu", false)
  1252. //集装箱
  1253. this.$set(this.optionTwo, "disabled", true)
  1254. this.$set(this.optionTwo, "addBtn", false)
  1255. this.$set(this.optionTwo, "menu", false)
  1256. //单证
  1257. this.$set(this.optionThree, "disabled", true)
  1258. this.$set(this.optionThree, "addBtn", false)
  1259. this.$set(this.optionThree, "menu", false)
  1260. //费用信息
  1261. this.$set(this.$refs.boxCost.option, "disabled", true)
  1262. this.$set(this.$refs.boxCost.option, "addBtn", false)
  1263. this.$set(this.$refs.boxCost.option, "menu", false)
  1264. //附件和顶部按钮
  1265. this.disabled = true
  1266. } else {
  1267. //基础资料
  1268. this.$set(this.optionForm, "disabled", false)
  1269. //箱信息
  1270. this.$set(this.option, "disabled", false)
  1271. this.$set(this.option, "addBtn", true)
  1272. this.$set(this.option, "menu", true)
  1273. //集装箱
  1274. this.$set(this.optionTwo, "disabled", false)
  1275. this.$set(this.optionTwo, "addBtn", true)
  1276. this.$set(this.optionTwo, "menu", true)
  1277. //单证
  1278. this.$set(this.optionThree, "disabled", false)
  1279. this.$set(this.optionThree, "addBtn", true)
  1280. this.$set(this.optionThree, "menu", true)
  1281. //费用信息
  1282. this.$set(this.$refs.boxCost.option, "disabled", false)
  1283. this.$set(this.$refs.boxCost.option, "addBtn", true)
  1284. this.$set(this.$refs.boxCost.option, "menu", true)
  1285. //附件和顶部按钮
  1286. this.disabled = false
  1287. }
  1288. }
  1289. })
  1290. },
  1291. copyData(id, type){
  1292. const loading = this.$loading({
  1293. lock: true,
  1294. text: '加载中',
  1295. spinner: 'el-icon-loading',
  1296. background: 'rgba(255,255,255,0.7)'
  1297. });
  1298. copyDetail({id: id}).then(res => {
  1299. this.form = res.data.data
  1300. this.dataList = res.data.data.itemList
  1301. this.dataListTwo = res.data.data.feesList
  1302. this.tradingBoxFilesList = res.data.data.fileList
  1303. this.containerList = res.data.data.containerList
  1304. this.documentsList = res.data.data.documentsList
  1305. delete this.form.containerList
  1306. delete this.form.documentsList
  1307. delete this.form.itemList
  1308. delete this.form.feesList
  1309. delete this.form.fileList
  1310. loading.close();
  1311. if (type) {
  1312. //基础资料
  1313. this.$set(this.optionForm, "disabled", true)
  1314. //箱信息
  1315. this.$set(this.option, "disabled", true)
  1316. this.$set(this.option, "addBtn", false)
  1317. this.$set(this.option, "menu", false)
  1318. //集装箱
  1319. this.$set(this.optionTwo, "disabled", true)
  1320. this.$set(this.optionTwo, "addBtn", false)
  1321. this.$set(this.optionTwo, "menu", false)
  1322. //单证
  1323. this.$set(this.optionThree, "disabled", true)
  1324. this.$set(this.optionThree, "addBtn", false)
  1325. this.$set(this.optionThree, "menu", false)
  1326. //费用信息
  1327. this.$set(this.$refs.boxCost.option, "disabled", true)
  1328. this.$set(this.$refs.boxCost.option, "addBtn", false)
  1329. this.$set(this.$refs.boxCost.option, "menu", false)
  1330. //附件和顶部按钮
  1331. this.disabled = true
  1332. } else {
  1333. if (this.form.status > 0) {
  1334. //基础资料
  1335. this.$set(this.optionForm, "disabled", true)
  1336. //箱信息
  1337. this.$set(this.option, "disabled", true)
  1338. this.$set(this.option, "addBtn", false)
  1339. this.$set(this.option, "menu", false)
  1340. //集装箱
  1341. this.$set(this.optionTwo, "disabled", true)
  1342. this.$set(this.optionTwo, "addBtn", false)
  1343. this.$set(this.optionTwo, "menu", false)
  1344. //单证
  1345. this.$set(this.optionThree, "disabled", true)
  1346. this.$set(this.optionThree, "addBtn", false)
  1347. this.$set(this.optionThree, "menu", false)
  1348. //费用信息
  1349. this.$set(this.$refs.boxCost.option, "disabled", true)
  1350. this.$set(this.$refs.boxCost.option, "addBtn", false)
  1351. this.$set(this.$refs.boxCost.option, "menu", false)
  1352. //附件和顶部按钮
  1353. this.disabled = true
  1354. } else {
  1355. //基础资料
  1356. this.$set(this.optionForm, "disabled", false)
  1357. //箱信息
  1358. this.$set(this.option, "disabled", false)
  1359. this.$set(this.option, "addBtn", true)
  1360. this.$set(this.option, "menu", true)
  1361. //集装箱
  1362. this.$set(this.optionTwo, "disabled", false)
  1363. this.$set(this.optionTwo, "addBtn", true)
  1364. this.$set(this.optionTwo, "menu", true)
  1365. //单证
  1366. this.$set(this.optionThree, "disabled", false)
  1367. this.$set(this.optionThree, "addBtn", true)
  1368. this.$set(this.optionThree, "menu", true)
  1369. //费用信息
  1370. this.$set(this.$refs.boxCost.option, "disabled", false)
  1371. this.$set(this.$refs.boxCost.option, "addBtn", true)
  1372. this.$set(this.$refs.boxCost.option, "menu", true)
  1373. //附件和顶部按钮
  1374. this.disabled = false
  1375. }
  1376. }
  1377. })
  1378. },
  1379. //新增修改
  1380. editCustomer() {
  1381. this.$refs["form"].validate((valid, done) => {
  1382. done()
  1383. if (valid) {
  1384. let data = {
  1385. ...this.form,
  1386. itemList: this.dataList,
  1387. feesList: this.dataListTwo,
  1388. fileList: this.tradingBoxFilesList,
  1389. containerList:this.containerList,
  1390. documentsList:this.documentsList,
  1391. importExportSigns: "BGJK"
  1392. }
  1393. const loading = this.$loading({
  1394. lock: true,
  1395. text: '加载中',
  1396. spinner: 'el-icon-loading',
  1397. background: 'rgba(255,255,255,0.7)'
  1398. });
  1399. submit(data).then(res => {
  1400. if (this.form.id) {
  1401. this.$message.success("修改成功")
  1402. } else {
  1403. this.$message.success("新增成功")
  1404. }
  1405. loading.close();
  1406. this.refresh(res.data.data.id)
  1407. }).catch(() => {
  1408. loading.close();
  1409. })
  1410. }
  1411. });
  1412. },
  1413. rowSave(form, done, loading) {
  1414. done(form)
  1415. },
  1416. rowUpdate(form, index, done, loading) {
  1417. done(form)
  1418. },
  1419. //打开表单前
  1420. beforeOpen(done, type) {
  1421. done();
  1422. },
  1423. getGSData(row, type) {
  1424. // this[type[0]][type[1]] = row.cname
  1425. if (type[1] === "domesticName" || type[1] === "abroadName" || type[1] === "consumptionUnitName" || type[1] === "applicantName"){
  1426. this[type[0]][type[1]] = row.cname
  1427. this[type[0]][type[2]] = row.customsNo
  1428. }
  1429. },
  1430. backToList(type) {
  1431. if (type == 0) {
  1432. if (this.detailData.id) {
  1433. this.$router.push({
  1434. path: '/purchase/importDeclaration/index'
  1435. });
  1436. }
  1437. this.$emit("backToList", type);
  1438. } else if (type == 1) {
  1439. this.$router.push({
  1440. path: '/approveData/index'
  1441. });
  1442. this.$emit("backToList", type);
  1443. }
  1444. },
  1445. //自定义列保存
  1446. async saveColumnTwo(ref, option, optionBack, code) {
  1447. /**
  1448. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1449. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1450. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1451. */
  1452. const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
  1453. if (inSave) {
  1454. this.$message.success("保存成功");
  1455. //关闭窗口
  1456. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  1457. }
  1458. },
  1459. resetTrigger() {
  1460. if (this.optionForm.disabled == true) {
  1461. if (this.form.status > 0) {
  1462. //基础资料
  1463. this.$set(this.optionForm, "disabled", true)
  1464. //箱信息
  1465. this.$set(this.option, "disabled", true)
  1466. this.$set(this.option, "addBtn", false)
  1467. this.$set(this.option, "menu", false)
  1468. //集装箱
  1469. this.$set(this.optionTwo, "disabled", true)
  1470. this.$set(this.optionTwo, "addBtn", false)
  1471. this.$set(this.optionTwo, "menu", false)
  1472. //单证
  1473. this.$set(this.optionThree, "disabled", true)
  1474. this.$set(this.optionThree, "addBtn", false)
  1475. this.$set(this.optionThree, "menu", false)
  1476. //费用信息
  1477. this.$set(this.$refs.boxCost.option, "disabled", true)
  1478. this.$set(this.$refs.boxCost.option, "addBtn", false)
  1479. this.$set(this.$refs.boxCost.option, "menu", false)
  1480. //附件和顶部按钮
  1481. this.disabled = true
  1482. } else {
  1483. //基础资料
  1484. this.$set(this.optionForm, "disabled", false)
  1485. //箱信息
  1486. this.$set(this.option, "disabled", false)
  1487. this.$set(this.option, "addBtn", true)
  1488. this.$set(this.option, "menu", true)
  1489. //集装箱
  1490. this.$set(this.optionTwo, "disabled", false)
  1491. this.$set(this.optionTwo, "addBtn", true)
  1492. this.$set(this.optionTwo, "menu", true)
  1493. //单证
  1494. this.$set(this.optionThree, "disabled", false)
  1495. this.$set(this.optionThree, "addBtn", true)
  1496. this.$set(this.optionThree, "menu", true)
  1497. //费用信息
  1498. this.$set(this.$refs.boxCost.option, "disabled", false)
  1499. this.$set(this.$refs.boxCost.option, "addBtn", true)
  1500. this.$set(this.$refs.boxCost.option, "menu", true)
  1501. //附件和顶部按钮
  1502. this.disabled = false
  1503. }
  1504. } else {
  1505. //基础资料
  1506. this.$set(this.optionForm, "disabled", false)
  1507. //箱信息
  1508. this.$set(this.option, "disabled", false)
  1509. this.$set(this.option, "addBtn", true)
  1510. this.$set(this.option, "menu", true)
  1511. //集装箱
  1512. this.$set(this.optionTwo, "disabled", false)
  1513. this.$set(this.optionTwo, "addBtn", true)
  1514. this.$set(this.optionTwo, "menu", true)
  1515. //单证
  1516. this.$set(this.optionThree, "disabled", false)
  1517. this.$set(this.optionThree, "addBtn", true)
  1518. this.$set(this.optionThree, "menu", true)
  1519. //费用信息
  1520. this.$set(this.$refs.boxCost.option, "disabled", false)
  1521. this.$set(this.$refs.boxCost.option, "addBtn", true)
  1522. this.$set(this.$refs.boxCost.option, "menu", true)
  1523. //附件和顶部按钮
  1524. this.disabled = false
  1525. }
  1526. },
  1527. //自定义列重置
  1528. async resetColumnTwo(ref, option, optionBack, code) {
  1529. this[option] = this[optionBack];
  1530. const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
  1531. if (inSave) {
  1532. this.resetTrigger()
  1533. this.$message.success("重置成功");
  1534. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  1535. }
  1536. }
  1537. }
  1538. }
  1539. </script>
  1540. <style scoped>
  1541. ::v-deep .el-form-item {
  1542. margin-bottom: 8px;
  1543. }
  1544. </style>