detailsPage.vue 52 KB

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