detailsPage.vue 36 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120
  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. </div>
  9. <div class="add-customer-btn">
  10. <el-button class="el-button--small-yh" style="margin-right: 10px" type="primary" size="small" v-if="!editButton"
  11. @click="confirmEditing">编辑
  12. </el-button>
  13. <el-dropdown style="margin-right: 10px">
  14. <el-button type="primary" size="small">
  15. 审核处理<i class="el-icon-arrow-down el-icon--right"></i>
  16. </el-button>
  17. <el-dropdown-menu slot="dropdown">
  18. <el-dropdown-item @click.native="pleaseCheck(1)" :disabled="form.status>0">请核数据</el-dropdown-item>
  19. <el-dropdown-item @click.native="checkScheduleDialog = true,checkId = form.id">审核进度</el-dropdown-item>
  20. <el-dropdown-item @click.native="repealCancel" :disabled="form.status === 0 || !form.status"
  21. v-if="!detailData.id">撤销请核
  22. </el-dropdown-item>
  23. <el-dropdown-item @click.native="checkDialog = true,checkData = detailData.check;" v-if="detailData.id">审批
  24. </el-dropdown-item>
  25. </el-dropdown-menu>
  26. </el-dropdown>
  27. <el-button class="el-button--small-yh" type="primary" size="small"
  28. @click="editCustomer">
  29. 保存数据
  30. </el-button>
  31. </div>
  32. </div>
  33. <trade-card title="基础资料" style="margin-top: 50px">
  34. <avue-form :option="optionForm" v-model="form" ref="form">
  35. <template slot="affiliatedCompanyId" slot-scope="scope">
  36. <crop-select v-model="form.affiliatedCompanyId" corpType="GS" :disabled="scope.disabled"
  37. @getCorpData="(val)=>{form.affiliatedCompanyName = val.cname || ''}"></crop-select>
  38. </template>
  39. <template slot="corpId" slot-scope="scope">
  40. <crop-select v-model="form.corpId" corpType="KH" :disabled="scope.disabled"
  41. @getCorpData="(val)=>{form.corpName = val.cname || ''}"></crop-select>
  42. </template>
  43. <template slot="shippingCompanyId" slot-scope="scope">
  44. <crop-select v-model="form.shippingCompanyId" corpType="GS" :disabled="scope.disabled"
  45. @getCorpData="(val)=>{form.shippingCompanyName = val.cname || ''}"></crop-select>
  46. </template>
  47. </avue-form>
  48. </trade-card>
  49. <trade-card title="提单信息">
  50. <avue-form :option="optionFormTwo" v-model="shippingBillDetails" ref="formTwo">
  51. <template slot="branchPayPlaceId" slot-scope="scope">
  52. <e-crop-select
  53. v-model="shippingBillDetails.branchPayPlaceId"
  54. corp-type="DD-ID"
  55. :disabled="scope.disabled"
  56. :name.sync="shippingBillDetails.branchPayPlaceId"
  57. @getCropId="(val)=>{shippingBillDetails.branchPayPlaceName = val.name}"
  58. />
  59. </template>
  60. <template slot="mainPayPlaceId" slot-scope="scope">
  61. <e-crop-select
  62. v-model="shippingBillDetails.mainPayPlaceId"
  63. corp-type="DD-ID"
  64. :disabled="scope.disabled"
  65. :name.sync="shippingBillDetails.mainPayPlaceId"
  66. @getCropId="(val)=>{shippingBillDetails.mainPayPlaceName = val.name}"
  67. />
  68. </template>
  69. </avue-form>
  70. </trade-card>
  71. <trade-card title="箱型箱量">
  72. <avue-crud :option="optionBox" v-model="formBox" ref="formBox" :data="shippingBoxTypeList" @row-save="rowSave"
  73. @row-update="rowUpdate"
  74. @resetColumn="resetColumnTwo('formBox','optionBox','optionBoxBack',254.1)"
  75. @saveColumn="saveColumnTwo('formBox','optionBox','optionBoxBack',254.1)">>
  76. <template slot-scope="{type,size,row,index,disabled}" slot="menu">
  77. <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
  78. @click="$refs.formBox.rowEdit(row,index)">编辑
  79. </el-button>
  80. <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
  81. @click="rowDelBox(row,index)">删除
  82. </el-button>
  83. </template>
  84. </avue-crud>
  85. </trade-card>
  86. <trade-card title="地点信息">
  87. <avue-form :option="optionFormAdd" v-model="form" ref="formAdd">
  88. <template slot="deliverGoodsAddressName" slot-scope="scope">
  89. <port-info :disabled="scope.disabled" v-model="form.deliverGoodsAddressId" type="id"
  90. @balabalaTow="(val)=>{form.deliverGoodsAddressName = val.name || ''}"/>
  91. </template>
  92. <template slot="loadingPortName" slot-scope="scope">
  93. <port-info :disabled="scope.disabled" v-model="form.loadingPortId" type="id"
  94. @balabalaTow="(val)=>{form.loadingPortName = val.name || ''}"/>
  95. </template>
  96. <template slot="dischargeCargoHarborName" slot-scope="scope">
  97. <port-info :disabled="scope.disabled" v-model="form.dischargeCargoHarborId" type="id"
  98. @balabalaTow="(val)=>{form.dischargeCargoHarborName = val.name || ''}"/>
  99. </template>
  100. <template slot="destinationName" slot-scope="scope">
  101. <port-info :disabled="scope.disabled" v-model="form.destinationId" type="id"
  102. @balabalaTow="(val)=>{form.destinationName = val.name || ''}"/>
  103. </template>
  104. <template slot="deliveryAddressName" slot-scope="scope">
  105. <port-info :disabled="scope.disabled" v-model="form.deliveryAddressId" type="id"
  106. @balabalaTow="(val)=>{form.deliveryAddressName = val.name || ''}"/>
  107. </template>
  108. </avue-form>
  109. </trade-card>
  110. <trade-card title="配箱信息">
  111. <avue-crud :option="optionBoxTwo" v-model="formBoxTwo" ref="formBoxTwo" :data="shippingMatchBoxList"
  112. @row-save="rowSaveTwo" @row-update="rowUpdateTwo"
  113. @resetColumn="resetColumnTwo('formBoxTwo','optionBoxTwo','optionBoxTwoBack',254.2)"
  114. @saveColumn="saveColumnTwo('formBoxTwo','optionBoxTwo','optionBoxTwoBack',254.2)">
  115. <template slot-scope="{type,size,row,index,disabled}" slot="menu">
  116. <el-button icon="el-icon-edit" :size="size" :disabled="disabled" :type="type"
  117. @click="$refs.formBoxTwo.rowEdit(row,index)">编辑
  118. </el-button>
  119. <el-button icon="el-icon-delete" :size="size" :disabled="disabled" :type="type"
  120. @click="rowDelBoxTwo(row,index)">删除
  121. </el-button>
  122. </template>
  123. </avue-crud>
  124. </trade-card>
  125. <trade-card title="服务项目">
  126. <avue-form :option="optionFormThree" v-model="form" ref="formThree"></avue-form>
  127. </trade-card>
  128. <trade-card title="发货信息">
  129. <avue-form :option="optionFormFour" v-model="form" ref="formFour">
  130. <template slot="consignorId" slot-scope="{disabled}">
  131. <crop-select v-model="form.consignorId" corpType="KH" :disabled="disabled"
  132. @getCorpData="(val)=>{form.consignorName = val.cname || '';form.consignorDetails = val.details}"></crop-select>
  133. </template>
  134. <template slot="consigneeId" slot-scope="{disabled}">
  135. <crop-select v-model="form.consigneeId" corpType="KH" :disabled="disabled"
  136. @getCorpData="(val)=>{form.consigneeName = val.cname || '';form.consigneeDetails = val.details}"></crop-select>
  137. </template>
  138. <template slot="notifierId" slot-scope="{disabled}">
  139. <crop-select v-model="form.notifierId" corpType="KH" :disabled="disabled"
  140. @getCorpData="(val)=>{form.notifierName = val.cname || '';form.notifierDetails = val.details}"></crop-select>
  141. </template>
  142. </avue-form>
  143. </trade-card>
  144. <!-- 费用信息组件-->
  145. <sea-cost v-model="shippingFeesList" :id="form.id" :codeValue="254.3" type="CK" activeName="first" ref="boxCost"
  146. url="/api/blade-box-tube/shippingfees/remove" @generateBill="refresh(form.id)"></sea-cost>
  147. <trade-card title="附件管理">
  148. <c-upload
  149. basic
  150. :data="shippingFileList"
  151. :disabled="disabled"
  152. deleteUrl="/api/blade-box-tube/shippingfile/remove"
  153. :enumerationValue="254.4"
  154. display
  155. />
  156. </trade-card>
  157. <el-dialog
  158. append-to-body
  159. title="审批进度"
  160. class="el-dialogDeep"
  161. :visible.sync="checkScheduleDialog"
  162. width="40%"
  163. :close-on-click-modal="false"
  164. :destroy-on-close="true"
  165. :close-on-press-escape="false"
  166. v-dialog-drag
  167. >
  168. <check-schedule
  169. :checkId="checkId"
  170. :batchNo="batchNo"
  171. @choceScheduleFun="choceScheduleFun"
  172. ></check-schedule>
  173. </el-dialog>
  174. <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
  175. :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
  176. <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
  177. </check>
  178. </el-dialog>
  179. </div>
  180. </template>
  181. <script>
  182. import {
  183. tradingBox,
  184. tradingBoxItem,
  185. detail,
  186. submit,
  187. pleaseCheck,
  188. repealCancel
  189. } from "@/api/oceanShipping/maritimeExport/index.js";
  190. import checkSchedule from "@/components/check/checkSchedule.vue";
  191. import check from "@/components/check/check.vue";
  192. export default {
  193. name: "detailsPage",
  194. props: {
  195. onLoad: Object,
  196. detailData: Object
  197. },
  198. components: {
  199. checkSchedule, check
  200. },
  201. data() {
  202. return {
  203. editButton: false,
  204. checkId: '',
  205. batchNo: '',
  206. checkData: {},
  207. checkScheduleDialog: false,
  208. checkDialog: false,
  209. shippingFeesList: [],
  210. shippingFileList: [],
  211. disabled: false,
  212. form: {},
  213. shippingBillDetails: {},
  214. optionForm: {
  215. menuBtn: false,
  216. span: 6,
  217. column: [{
  218. label: '系统号',
  219. prop: 'sysNo',
  220. disabled: true
  221. }, {
  222. label: '部门',
  223. prop: 'deptId',
  224. type: 'tree',
  225. props: {
  226. label: 'title',
  227. value: 'value'
  228. },
  229. dicUrl: '/api/blade-system/dept/tree',
  230. rules: [{
  231. required: true,
  232. message: "请选择部门",
  233. trigger: "blur"
  234. }],
  235. }, {
  236. label: '单据类型',
  237. prop: 'documentType'
  238. }, {
  239. label: '业务类型',
  240. prop: 'businessType',
  241. overHidden: true,
  242. filterable: true,
  243. type: 'select',
  244. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_business_type",
  245. props: {
  246. label: "dictValue",
  247. value: "dictKey"
  248. }
  249. }, {
  250. label: '所属公司',
  251. prop: 'affiliatedCompanyId'
  252. }, {
  253. label: '客户',
  254. prop: 'corpId'
  255. }, {
  256. label: '客户联系人',
  257. prop: 'contacts'
  258. }, {
  259. label: '客户电话',
  260. prop: 'telephone'
  261. }, {
  262. label: '业务来源',
  263. prop: 'businessSource',
  264. overHidden: true,
  265. filterable: true,
  266. type: 'select',
  267. cascader: ['sourceId'],
  268. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_business_source",
  269. props: {
  270. label: "dictValue",
  271. value: "dictKey"
  272. }
  273. }, {
  274. label: '来源',
  275. prop: 'sourceId',
  276. overHidden: true,
  277. filterable: true,
  278. type: 'select',
  279. dicUrl: "/api/blade-client/corpsdesc/oceanCorpsList?corpsTypeName={{key}}",
  280. props: {
  281. label: "cname",
  282. value: "id"
  283. }
  284. }, {
  285. label: '船公司',
  286. prop: 'shippingCompanyId'
  287. }, {
  288. label: '订舱代理',
  289. prop: 'bookingAgentId',
  290. filterable: true,
  291. type: 'select',
  292. dicUrl: "/api/blade-client/corpsdesc/oceanCorpsList?corpsTypeName=订舱代理",
  293. props: {
  294. label: "cname",
  295. value: "id"
  296. }
  297. }, {
  298. label: '场站',
  299. prop: 'station'
  300. }, {
  301. label: '场站联系人',
  302. prop: 'stationContacts'
  303. }, {
  304. label: '场站电话',
  305. prop: 'stationTelephone'
  306. }, {
  307. label: '航线',
  308. prop: 'route',
  309. type: "select",
  310. slot: true,
  311. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_route",
  312. props: {
  313. label: "dictValue",
  314. value: "dictKey"
  315. },
  316. overHidden: true
  317. }, {
  318. label: '备注',
  319. prop: 'remarks',
  320. type: 'textarea',
  321. span: 24,
  322. minRows: 2,
  323. }]
  324. },
  325. optionFormTwo: {
  326. menuBtn: false,
  327. span: 6,
  328. column: [{
  329. label: '主提单号',
  330. prop: 'mainBillNo'
  331. }, {
  332. label: '主单条款',
  333. prop: 'mainClause',
  334. overHidden: true,
  335. filterable: true,
  336. type: 'select',
  337. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_main_clause",
  338. props: {
  339. label: "dictValue",
  340. value: "dictKey"
  341. }
  342. }, {
  343. label: '主单付费地点',
  344. prop: 'mainPayPlaceId'
  345. }, {
  346. label: '分提单号',
  347. prop: 'branchBillNo'
  348. }, {
  349. label: '分单条款',
  350. prop: 'branchClause',
  351. overHidden: true,
  352. filterable: true,
  353. type: 'select',
  354. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_branch_clause",
  355. props: {
  356. label: "dictValue",
  357. value: "dictKey"
  358. }
  359. }, {
  360. label: '分单付费地点',
  361. prop: 'branchPayPlaceId'
  362. }, {
  363. label: '装运方式',
  364. prop: 'shipmentMode',
  365. overHidden: true,
  366. filterable: true,
  367. type: 'select',
  368. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_shipment_mode",
  369. props: {
  370. label: "dictValue",
  371. value: "dictKey"
  372. }
  373. }, {
  374. label: '签单方式',
  375. prop: 'signingMethod',
  376. overHidden: true,
  377. filterable: true,
  378. type: 'select',
  379. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_signing_method",
  380. props: {
  381. label: "dictValue",
  382. value: "dictKey"
  383. }
  384. }, {
  385. label: '提单份数',
  386. prop: 'billCopies'
  387. }, {
  388. label: '操作员',
  389. prop: 'operatorId',
  390. filterable: true,
  391. remote: true,
  392. type: "select",
  393. dicUrl: "/api/blade-user/page?size=20&current=1&account={{key}}",
  394. props: {
  395. label: "account",
  396. value: "id",
  397. res: 'data.records'
  398. },
  399. change: (data) => {
  400. if (data.value) {
  401. for (let item of this.$refs.formTwo.DIC.operatorId || []) {
  402. if (data.value === item.id) {
  403. this.shippingBillDetails.accountingDeptId = item.deptId
  404. }
  405. }
  406. }
  407. }
  408. }, {
  409. label: '核算部门',
  410. prop: 'accountingDeptId',
  411. type: "tree",
  412. multiple: true,
  413. tags: true,
  414. dicUrl: "/api/blade-system/dept/tree?tenantId=" + JSON.parse(localStorage.getItem("saber-userInfo")).content.tenant_id,
  415. props: {
  416. label: "title"
  417. },
  418. checkStrictly: true,
  419. }, {
  420. label: '合同号',
  421. prop: 'contractNo'
  422. }, {
  423. label: '提单状态',
  424. prop: 'billStatus',
  425. type: "select",
  426. slot: true,
  427. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_bill_status",
  428. props: {
  429. label: "dictValue",
  430. value: "dictKey"
  431. },
  432. overHidden: true
  433. }, {
  434. label: '船名',
  435. prop: 'shipId',
  436. type: "select",
  437. cascader: ['voyageNumberId'],
  438. dicUrl: "/api/blade-box-tube/shippingvessel/listAll",
  439. props: {
  440. label: "name",
  441. value: "id",
  442. }
  443. }, {
  444. label: '航次',
  445. prop: 'voyageNumberId',
  446. type: "select",
  447. dicUrl: "/api/blade-box-tube/shippingvessel/listAllByVoyage?pid={{key}}",
  448. props: {
  449. label: "no",
  450. value: "id",
  451. },
  452. change: (data) => {
  453. if (data.value) {
  454. for (let item of this.$refs.formTwo.DIC.voyageNumberId || []) {
  455. if (data.value === item.id) {
  456. this.form.route = item.lane
  457. this.shippingBillDetails.sailDate = item.estimateSailDate
  458. this.shippingBillDetails.actualSailDate = item.sailDate
  459. this.shippingBillDetails.deadline = item.ducomentrayoffDate
  460. this.shippingBillDetails.closingDate = item.cutoffDate
  461. }
  462. }
  463. }
  464. }
  465. }, {
  466. label: '开船日期',
  467. prop: 'sailDate',
  468. type: "date",
  469. format: "yyyy-MM-dd",
  470. valueFormat: "yyyy-MM-dd HH:mm:ss",
  471. }, {
  472. label: '实际开船',
  473. prop: 'actualSailDate',
  474. type: "date",
  475. format: "yyyy-MM-dd",
  476. valueFormat: "yyyy-MM-dd HH:mm:ss",
  477. }, {
  478. label: '截单日期',
  479. prop: 'deadline',
  480. type: "date",
  481. format: "yyyy-MM-dd",
  482. valueFormat: "yyyy-MM-dd HH:mm:ss",
  483. }, {
  484. label: '截港日期',
  485. prop: 'closingDate',
  486. type: "date",
  487. format: "yyyy-MM-dd",
  488. valueFormat: "yyyy-MM-dd HH:mm:ss",
  489. }, {
  490. label: '订舱日期',
  491. prop: 'bookingDate',
  492. type: "date",
  493. format: "yyyy-MM-dd",
  494. valueFormat: "yyyy-MM-dd HH:mm:ss",
  495. }, {
  496. label: '账期截止',
  497. prop: 'accountingPeriodEndDate',
  498. type: "date",
  499. format: "yyyy-MM-dd",
  500. valueFormat: "yyyy-MM-dd HH:mm:ss",
  501. }, {
  502. label: '服务条款',
  503. prop: 'serviceClause',
  504. type: "select",
  505. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_service_clause",
  506. props: {
  507. label: "dictValue",
  508. value: "dictKey"
  509. },
  510. overHidden: true
  511. }, {
  512. label: '贸易条款',
  513. prop: 'tradeTerms',
  514. type: "select",
  515. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_trade_terms",
  516. props: {
  517. label: "dictValue",
  518. value: "dictKey"
  519. },
  520. overHidden: true
  521. }, {
  522. label: '件数',
  523. prop: 'number'
  524. }, {
  525. label: '包装',
  526. prop: 'packing',
  527. type: "select",
  528. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_packing",
  529. props: {
  530. label: "dictValue",
  531. value: "dictKey"
  532. },
  533. overHidden: true
  534. }, {
  535. label: '包装描述',
  536. prop: 'packingDescribe'
  537. }, {
  538. label: '重量',
  539. prop: 'weight'
  540. }, {
  541. label: '尺码',
  542. prop: 'size'
  543. }, {
  544. label: '货物类型',
  545. prop: 'goodsType',
  546. type: "select",
  547. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_goods_type",
  548. props: {
  549. label: "dictValue",
  550. value: "dictKey"
  551. },
  552. overHidden: true
  553. }, {
  554. label: '货物',
  555. prop: 'goodsId',
  556. type: "select",
  557. dicUrl: "/api/blade-client/goodsdesc/descListAll",
  558. props: {
  559. label: "cname",
  560. value: "id"
  561. },
  562. change: (data) => {
  563. if (data.value) {
  564. for (let item of this.$refs.formTwo.DIC.goodsId || []) {
  565. if (data.value === item.id) {
  566. this.shippingBillDetails.goodsDetails = item.nameDescription
  567. this.shippingBillDetails.hsCode = item.hsCode
  568. }
  569. }
  570. }
  571. },
  572. overHidden: true
  573. }, {
  574. label: 'HS代码',
  575. prop: 'hsCode'
  576. }, {
  577. label: '货物详情',
  578. prop: 'goodsDetails',
  579. type: 'textarea',
  580. span: 12,
  581. minRows: 2,
  582. }, {
  583. label: '唛头',
  584. prop: 'remarks',
  585. type: 'textarea',
  586. span: 12,
  587. minRows: 2,
  588. }]
  589. },
  590. formBox: {},
  591. shippingBoxTypeList: [],
  592. optionBox: {},
  593. optionBoxBack: {
  594. align: 'center',
  595. index: true,
  596. addBtnText: "录入明细",
  597. refreshBtn: false,
  598. dialogDrag: true,
  599. addBtn: true,
  600. span: 8,
  601. height: 600,
  602. selection: true,
  603. addRowBtn: false,
  604. cellBtn: false,
  605. editBtn: false,
  606. delBtn: false,
  607. menuWidth: 140,
  608. dialogTop: 25,
  609. dialogWidth: "80%",
  610. showSummary: true,
  611. sumColumnList: [{
  612. name: 'emptyWeight',
  613. type: 'sum',
  614. decimals: 2
  615. }],
  616. column: [{
  617. label: '箱型',
  618. prop: 'boxType',
  619. width: 100,
  620. type: "select",
  621. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_box_ype",
  622. props: {
  623. label: "dictValue",
  624. value: "dictKey"
  625. },
  626. overHidden: true
  627. }, {
  628. label: '箱量',
  629. prop: 'boxQuantity',
  630. width: 100,
  631. overHidden: true
  632. }, {
  633. label: 'SOC箱',
  634. prop: 'socBox',
  635. width: 100,
  636. overHidden: true
  637. }, {
  638. label: '温度',
  639. prop: 'temperature',
  640. width: 100,
  641. overHidden: true
  642. }, {
  643. label: '温度单位',
  644. prop: 'temperatureUnit',
  645. width: 100,
  646. type: "select",
  647. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_temperature_unit",
  648. props: {
  649. label: "dictValue",
  650. value: "dictKey"
  651. },
  652. overHidden: true
  653. }, {
  654. label: '通风量',
  655. prop: 'ventilationCapacity',
  656. width: 100,
  657. overHidden: true
  658. }, {
  659. label: '湿度',
  660. prop: 'humidity',
  661. width: 100,
  662. overHidden: true
  663. }, {
  664. label: '备注',
  665. prop: 'remarks',
  666. overHidden: true
  667. }]
  668. },
  669. formBoxTwo: {},
  670. shippingMatchBoxList: [],
  671. optionBoxTwo: {},
  672. optionBoxTwoBack: {
  673. align: 'center',
  674. index: true,
  675. addBtnText: "录入明细",
  676. refreshBtn: false,
  677. dialogDrag: true,
  678. addBtn: true,
  679. span: 8,
  680. height: 600,
  681. selection: true,
  682. addRowBtn: false,
  683. cellBtn: false,
  684. editBtn: false,
  685. delBtn: false,
  686. menuWidth: 140,
  687. dialogTop: 25,
  688. dialogWidth: "80%",
  689. showSummary: true,
  690. sumColumnList: [{
  691. name: 'emptyWeight',
  692. type: 'sum',
  693. decimals: 2
  694. }],
  695. column: [{
  696. label: '箱型',
  697. prop: 'boxType',
  698. width: 100,
  699. type: "select",
  700. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_box_ype",
  701. props: {
  702. label: "dictValue",
  703. value: "dictKey"
  704. },
  705. overHidden: true
  706. }, {
  707. label: '箱号',
  708. prop: 'boxNo',
  709. width: 100,
  710. overHidden: true
  711. }, {
  712. label: 'HS代码',
  713. prop: 'hsCode',
  714. width: 100,
  715. overHidden: true
  716. }, {
  717. label: '货物明细',
  718. prop: 'goodsDetails',
  719. width: 100,
  720. overHidden: true
  721. }, {
  722. label: '件数',
  723. prop: 'number',
  724. width: 100,
  725. overHidden: true
  726. }, {
  727. label: '包装',
  728. prop: 'packing',
  729. width: 100,
  730. type: "select",
  731. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_packing",
  732. props: {
  733. label: "dictValue",
  734. value: "dictKey"
  735. },
  736. overHidden: true
  737. }, {
  738. label: '重量',
  739. prop: 'weight',
  740. width: 100,
  741. overHidden: true
  742. }, {
  743. label: '尺码',
  744. prop: 'size',
  745. width: 100,
  746. overHidden: true
  747. }, {
  748. label: '备注',
  749. prop: 'remarks',
  750. overHidden: true
  751. }]
  752. },
  753. optionFormThree: {
  754. menuBtn: false,
  755. span: 12,
  756. column: [{
  757. label: '服务项目',
  758. prop: 'serviceItems',
  759. type: 'checkbox',
  760. dicUrl: "/api/blade-system/dict-biz/dictionary?code=ocean_service_items",
  761. props: {
  762. label: "dictValue",
  763. value: "dictKey"
  764. },
  765. overHidden: true
  766. }, {
  767. label: '其他服务',
  768. prop: 'serviceItemsDetails',
  769. disabled: false,
  770. type: 'textarea',
  771. minRows: 1,
  772. }]
  773. },
  774. optionFormAdd: {
  775. menuBtn: false,
  776. span: 8,
  777. column: [{
  778. label: '发货地',
  779. prop: 'deliverGoodsAddressName'
  780. }, {
  781. label: '装货港',
  782. prop: 'loadingPortName'
  783. }, {
  784. label: '卸货港',
  785. prop: 'dischargeCargoHarborName'
  786. }, {
  787. label: '目的地',
  788. prop: 'destinationName'
  789. }, {
  790. label: '交货地',
  791. prop: 'deliveryAddressName'
  792. }]
  793. },
  794. optionFormFour: {
  795. menuBtn: false,
  796. span: 8,
  797. column: [{
  798. label: '发货人',
  799. prop: 'consignorId',
  800. }, {
  801. label: '发货人详情',
  802. prop: 'consignorDetails',
  803. type: 'textarea',
  804. span: 16,
  805. minRows: 1,
  806. }, {
  807. label: '收货人',
  808. prop: 'consigneeId'
  809. }, {
  810. label: '收货人详情',
  811. prop: 'consigneeDetails',
  812. type: 'textarea',
  813. span: 16,
  814. minRows: 1,
  815. }, {
  816. label: '通知人',
  817. prop: 'notifierId'
  818. }, {
  819. label: '通知人详情',
  820. prop: 'notifierDetails',
  821. type: 'textarea',
  822. span: 16,
  823. minRows: 1,
  824. }]
  825. }
  826. }
  827. },
  828. async created() {
  829. this.optionBox = await this.getColumnData(this.getColumnName(254.1), this.optionBoxBack);
  830. this.optionBoxTwo = await this.getColumnData(this.getColumnName(254.2), this.optionBoxTwoBack);
  831. // this.key++
  832. if (this.onLoad.id && this.detailData.id) {
  833. this.refresh(this.onLoad.id, true)
  834. } else if (this.onLoad.id) {
  835. this.refresh(this.onLoad.id, true)
  836. }
  837. },
  838. methods: {
  839. //审核进度关闭
  840. choceScheduleFun() {
  841. this.checkScheduleDialog = false
  842. },
  843. //关闭审核
  844. choceCheckFun() {
  845. this.checkDialog = false;
  846. this.$store.commit("DOMXS_CLOSE_EXPORT_DETAIL");
  847. this.$router.$avueRouter.closeTag(window.location.hash.slice(1));
  848. },
  849. //刷新数据
  850. refresh(id, type) {
  851. const loading = this.$loading({
  852. lock: true,
  853. text: '加载中',
  854. spinner: 'el-icon-loading',
  855. background: 'rgba(255,255,255,0.7)'
  856. })
  857. detail({id: id}).then(res => {
  858. this.form = res.data.data
  859. this.shippingBoxTypeList = this.form.shippingBoxTypeList
  860. this.shippingMatchBoxList = this.form.shippingMatchBoxList
  861. this.shippingFeesList = this.form.shippingFeesList
  862. this.shippingFileList = this.form.shippingFileList
  863. this.form.serviceItems = this.form.serviceItems.split(',')
  864. this.shippingBillDetails = this.form.shippingBillDetails
  865. delete this.form.shippingBoxTypeList
  866. delete this.form.shippingMatchBoxList
  867. delete this.form.shippingFeesList
  868. delete this.form.shippingFileList
  869. delete this.form.shippingBillDetails
  870. loading.close();
  871. this.limit(type)
  872. }).catch(() => {
  873. loading.close();
  874. })
  875. },
  876. confirmEditing() {
  877. this.editButton = true
  878. this.limit()
  879. },
  880. limit(type) {
  881. type = !this.editButton;
  882. if (type || this.form.status > 0) {
  883. this.$set(this.optionForm, "disabled", true)
  884. this.$set(this.optionFormTwo, "disabled", true)
  885. //箱型箱量
  886. this.$set(this.optionBox, "disabled", true)
  887. this.$set(this.optionBox, "menu", false)
  888. this.$set(this.optionBox, "addBtn", false)
  889. //地点信息
  890. this.$set(this.optionFormAdd, "disabled", true)
  891. //配箱信息
  892. this.$set(this.optionBoxTwo, "disabled", true)
  893. this.$set(this.optionBoxTwo, "menu", false)
  894. this.$set(this.optionBoxTwo, "addBtn", false)
  895. //服务项目
  896. this.$set(this.optionFormThree, "disabled", true)
  897. //发货信息
  898. this.$set(this.optionFormFour, "disabled", true)
  899. //附件明细
  900. this.disabled = true
  901. } else {
  902. this.$set(this.optionForm, "disabled", false)
  903. this.$set(this.optionFormTwo, "disabled", false)
  904. //箱型箱量
  905. this.$set(this.optionBox, "disabled", false)
  906. this.$set(this.optionBox, "menu", true)
  907. this.$set(this.optionBox, "addBtn", true)
  908. //地点信息
  909. this.$set(this.optionFormAdd, "disabled", false)
  910. //配箱信息
  911. this.$set(this.optionBoxTwo, "disabled", false)
  912. this.$set(this.optionBoxTwo, "menu", true)
  913. this.$set(this.optionBoxTwo, "addBtn", true)
  914. //服务项目
  915. this.$set(this.optionFormThree, "disabled", false)
  916. //发货信息
  917. this.$set(this.optionFormFour, "disabled", false)
  918. //附件明细
  919. this.disabled = false
  920. }
  921. },
  922. rowSave(form, done, loading) {
  923. done(form)
  924. },
  925. rowUpdate(form, index, done, loading) {
  926. done(form)
  927. },
  928. rowSaveTwo(form, done, loading) {
  929. done(form)
  930. },
  931. rowUpdateTwo(form, index, done, loading) {
  932. done(form)
  933. },
  934. rowDelBox(row, index) {
  935. this.$confirm("确定将选择数据删除?", {
  936. confirmButtonText: "确定",
  937. cancelButtonText: "取消",
  938. type: "warning"
  939. }).then(() => {
  940. if (row.id) {
  941. tradingBox(row.id).then(res => {
  942. this.shippingBoxTypeList.splice(index, 1);
  943. this.$message.success("操作成功!");
  944. });
  945. } else {
  946. this.shippingBoxTypeList.splice(index, 1);
  947. this.$message.success("操作成功!");
  948. }
  949. }
  950. )
  951. ;
  952. },
  953. rowDelBoxTwo(row, index) {
  954. this.$confirm("确定将选择数据删除?", {
  955. confirmButtonText: "确定",
  956. cancelButtonText: "取消",
  957. type: "warning"
  958. }).then(() => {
  959. if (row.id) {
  960. tradingBoxItem(row.id).then(res => {
  961. this.shippingMatchBoxList.splice(index, 1);
  962. this.$message.success("操作成功!");
  963. });
  964. } else {
  965. this.shippingMatchBoxList.splice(index, 1);
  966. this.$message.success("操作成功!");
  967. }
  968. })
  969. },
  970. //保存数据
  971. editCustomer() {
  972. this.$refs["form"].validate((valid, done) => {
  973. done()
  974. if (valid) {
  975. this.$refs["formTwo"].validate((valid, done) => {
  976. done()
  977. if (valid) {
  978. let form = {
  979. ...this.form,
  980. shippingBillDetails: this.shippingBillDetails,
  981. shippingBoxTypeList: this.shippingBoxTypeList,
  982. shippingMatchBoxList: this.shippingMatchBoxList,
  983. shippingFeesList: this.shippingFeesList,
  984. shippingFileList: this.shippingFileList,
  985. serviceItems: this.form.serviceItems.join(','),
  986. billType: "HYCK",
  987. tradeType: "HY"
  988. }
  989. const loading = this.$loading({
  990. lock: true,
  991. text: '加载中',
  992. spinner: 'el-icon-loading',
  993. background: 'rgba(255,255,255,0.7)'
  994. });
  995. submit(form).then(res => {
  996. this.$message.success("保存成功")
  997. loading.close()
  998. this.refresh(res.data.data.id)
  999. }).catch(() => {
  1000. loading.close()
  1001. })
  1002. }
  1003. })
  1004. }
  1005. })
  1006. },
  1007. //撤销
  1008. repealCancel() {
  1009. this.$confirm("您确定撤回此次申请吗?", {
  1010. confirmButtonText: "确定",
  1011. cancelButtonText: "取消",
  1012. type: "warning"
  1013. }).then(() => {
  1014. const data = {
  1015. id: this.form.id,
  1016. pageLabel: "买箱",
  1017. approvalType: 1,
  1018. checkFlag: 1,
  1019. }
  1020. const loading = this.$loading({
  1021. lock: true,
  1022. text: '加载中',
  1023. spinner: 'el-icon-loading',
  1024. background: 'rgba(255,255,255,0.7)'
  1025. });
  1026. repealCancel(data).then(res => {
  1027. loading.close();
  1028. this.$message.success('撤回成功')
  1029. this.refresh(this.form.id)
  1030. }).catch(() => {
  1031. loading.close();
  1032. })
  1033. })
  1034. },
  1035. pleaseCheck(type) {
  1036. this.$confirm("您确定提交请核申请吗?", {
  1037. confirmButtonText: "确定",
  1038. cancelButtonText: "取消",
  1039. type: "warning"
  1040. }).then(() => {
  1041. this.$refs["form"].validate((valid, done) => {
  1042. done()
  1043. if (valid) {
  1044. let form = {
  1045. ...this.form,
  1046. shippingBillDetails: this.shippingBillDetails,
  1047. shippingBoxTypeList: this.shippingBoxTypeList,
  1048. shippingMatchBoxList: this.shippingMatchBoxList,
  1049. shippingFeesList: this.shippingFeesList,
  1050. shippingFileList: this.shippingFileList,
  1051. serviceItems: this.form.serviceItems.join(','),
  1052. billType: "HYCK",
  1053. tradeType: "HY"
  1054. }
  1055. const loading = this.$loading({
  1056. lock: true,
  1057. text: '加载中',
  1058. spinner: 'el-icon-loading',
  1059. background: 'rgba(255,255,255,0.7)'
  1060. });
  1061. submit(form).then(res => {
  1062. const data = {
  1063. id: res.data.data.id,
  1064. url: '/oceanShipping/maritimeExport/index',
  1065. pageStatus: "this.$store.getters.maritimeExport",
  1066. approvalType: type,
  1067. pageLabel: "海运出口",
  1068. checkFlag: 1,
  1069. billType: "HYCK"
  1070. }
  1071. pleaseCheck(data).then(rest => {
  1072. loading.close();
  1073. this.$message.success('请核成功')
  1074. this.refresh(res.data.data.id)
  1075. }).catch(() => {
  1076. loading.close();
  1077. })
  1078. }).catch(() => {
  1079. loading.close()
  1080. })
  1081. }
  1082. });
  1083. })
  1084. },
  1085. //自定义列保存
  1086. async saveColumnTwo(ref, option, optionBack, code) {
  1087. /**
  1088. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1089. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1090. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1091. */
  1092. const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
  1093. if (inSave) {
  1094. this.$message.success("保存成功");
  1095. //关闭窗口
  1096. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  1097. }
  1098. },
  1099. //自定义列重置
  1100. async resetColumnTwo(ref, option, optionBack, code) {
  1101. this[option] = this[optionBack];
  1102. const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
  1103. if (inSave) {
  1104. this.$message.success("重置成功");
  1105. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  1106. this.limit()
  1107. }
  1108. },
  1109. backToList(type) {
  1110. this.$emit("backToList", type);
  1111. }
  1112. }
  1113. }
  1114. </script>
  1115. <style scoped>
  1116. </style>