detailsPage.vue 54 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360
  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&#45;&#45;small-yh" style="margin-left: 6px;" type="primary" size="small"
  11. v-if="form.id && editButton" :disabled="form.issueStatus != 'I'" @click="inEdit">编 辑
  12. </el-button>
  13. <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small"
  14. v-if="!editButton" @click="submit">保 存
  15. </el-button>
  16. <el-button type="success" size="small" v-if="form.id && form.issueStatus == 'I'"
  17. @click="subApplication">放单完成</el-button>
  18. </div>
  19. </div>
  20. <div style="margin-top: 50px">
  21. <trade-card title="基础信息">
  22. <avue-form :option="optionForm" v-model="form" ref="form">
  23. <tempalte slot="corpCnName" slot-scope="{ row }">
  24. <search-query :datalist="corpData" :selectValue="form.corpCnName" :clearable="true"
  25. :buttonIf="false" :filterable="true" :remote="true" :disabled="editButton" placeholder="请选择客户"
  26. :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
  27. @corpFocus="getRemote($event, 'corpCnName')" @remoteMethod="getRemote($event, 'corpCnName')"
  28. @corpChange="selectChange($event, 'corpCnName')">
  29. </search-query>
  30. </tempalte>
  31. <tempalte slot="carrierCnName" slot-scope="{ row }">
  32. <search-query :datalist="carrierData" :selectValue="form.carrierCnName" :clearable="true"
  33. :buttonIf="false" :filterable="true" :remote="true" :disabled="editButton" placeholder="请选择船公司"
  34. :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
  35. @corpFocus="getRemote($event, 'carrierCnName')"
  36. @remoteMethod="getRemote($event, 'carrierCnName')"
  37. @corpChange="selectChange($event, 'carrierCnName')">
  38. </search-query>
  39. </tempalte>
  40. <tempalte slot="vesselCnName" slot-scope="{ row }">
  41. <search-query :datalist="vesselData" :selectValue="form.vesselCnName" :clearable="true"
  42. :buttonIf="false" :filterable="true" :remote="true" :disabled="editButton" placeholder="请选择船名"
  43. :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
  44. @corpFocus="getRemote($event, 'vesselCnName')" @remoteMethod="getRemote($event, 'vesselCnName')"
  45. @corpChange="selectChange($event, 'vesselCnName')">
  46. </search-query>
  47. </tempalte>
  48. <tempalte slot="polCnName" slot-scope="{ row }">
  49. <search-query :datalist="polData" :selectValue="form.polCnName" :clearable="true" :buttonIf="false"
  50. :filterable="true" :remote="true" :disabled="editButton" placeholder="请选择起运港"
  51. :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
  52. @corpFocus="getRemote($event, 'polCnName')" @remoteMethod="getRemote($event, 'polCnName')"
  53. @corpChange="selectChange($event, 'polCnName')">
  54. </search-query>
  55. </tempalte>
  56. <tempalte slot="podCnName" slot-scope="{ row }">
  57. <search-query :datalist="podData" :selectValue="form.podCnName" :clearable="true" :buttonIf="false"
  58. :filterable="true" :remote="true" :disabled="editButton" placeholder="请选择目的港"
  59. :forParameter="{ key: 'id', label: 'cnName', value: 'cnName' }"
  60. @corpFocus="getRemote($event, 'podCnName')" @remoteMethod="getRemote($event, 'podCnName')"
  61. @corpChange="selectChange($event, 'podCnName')">
  62. </search-query>
  63. </tempalte>
  64. <tempalte slot="runnerName" slot-scope="{ row }">
  65. <search-query :datalist="runnerData" :selectValue="form.runnerName" :clearable="true"
  66. :buttonIf="false" :filterable="true" :remote="true" :disabled="editButton" placeholder="请选择跑单"
  67. :forParameter="{ key: 'id', label: 'name', value: 'name' }"
  68. @corpFocus="getRemote($event, 'runnerName')" @remoteMethod="getRemote($event, 'runnerName')"
  69. @corpChange="selectChange($event, 'runnerName')">
  70. </search-query>
  71. </tempalte>
  72. <template slot="unreleaseBillsLabel">
  73. <el-button type="primary" size="small" plain
  74. :disabled="!form.id || form.issueStatus != 'I' || editButton"
  75. @click="subsequentAb">后续有货</el-button>
  76. </template>
  77. </avue-form>
  78. <div style="display: flex;justify-content: flex-end;">
  79. <el-button type="primary" size="small" :disabled="editButton || form.releaseBillList.length > 0"
  80. @click="queryDetails">检索</el-button>
  81. <el-button plain size="small" :disabled="editButton || form.id" @click="reset">重置</el-button>
  82. <el-button type="danger" size="small" :disabled="editButton || selectionList.length == 0"
  83. @click="del">删除</el-button>
  84. </div>
  85. </trade-card>
  86. <trade-card title="明细信息">
  87. <avue-crud :option="optionContacts" :data="form.releaseBillList" v-model="formContacts"
  88. @selection-change="selectionChange"></avue-crud>
  89. </trade-card>
  90. </div>
  91. </div>
  92. </template>
  93. <script>
  94. import {
  95. getDetails,
  96. submit,
  97. releaseApplication,
  98. getListByType,
  99. getBvessels,
  100. getBports,
  101. getRunner,
  102. itemsRemove,
  103. application,
  104. revokeApplication,
  105. signcomplete,
  106. revokeSigncomplete,
  107. subsequentAvailability
  108. } from "@/api/iosBasicData/release/releaseManagement";
  109. import reportDialog from "@/components/report-dialog/main";
  110. import { dateFormat } from "@/util/date";
  111. import checkSchedule from "@/components/checkL/checkSchedule";
  112. import check from "@/components/checkL/check";
  113. // import commodityxsho from '../../configuration/commodityxsho.json'
  114. import SearchQuery from "@/components/iosbasic-data/searchquery.vue";
  115. import _ from "lodash";
  116. export default {
  117. name: "detailsPage",
  118. data() {
  119. return {
  120. selectionList: [],
  121. runnerData: [],
  122. podData: [],
  123. polData: [],
  124. vesselData: [],
  125. carrierData: [],
  126. corpData: [],
  127. reportName: '轮胎商城-销售退货', // 打印传的名字
  128. SelectSearch: {}, // 添加商品检索
  129. // 编辑还是保存
  130. mingxibaocun: true,
  131. // 批次号请求到的数据
  132. picihaolist: [],
  133. // 添加商品弹窗
  134. dialogVisible: false,
  135. // 弹窗高度
  136. rowHeight: '',
  137. // 左侧选择搜索
  138. treeDataGoods: [],
  139. treeDeptId: '',
  140. page: {
  141. pageSize: 10,
  142. currentPage: 1,
  143. total: 0,
  144. pageSizes: [10, 50, 100, 300, 500]
  145. },
  146. // 表格需要的配置
  147. // optionTwo: commodityxsho,
  148. loading: false,
  149. // 商品列表数据合计
  150. goodsListShow: [],
  151. // 商品列表暂存
  152. goodsListSave: [],
  153. saveLoading: false,
  154. commodityData: false,
  155. surplusRouteQuantityOption: [],
  156. tableData: [],
  157. // tabs切换
  158. activeNameTabs: 'searchList',
  159. data: [],
  160. inventory: 0,
  161. isStatus: 1,
  162. goodsIdoptions: [],
  163. dataList: [],
  164. dicUrlWithCustomId: '',
  165. sharedCompanyId: 0,
  166. isAddBtn: true, // 添加商品的是否禁用
  167. isSaveBtn: false, // 大保存的是否禁用
  168. viewDisabled: false, // 大审批的是否禁用
  169. isAdd: false, // 表格按钮的是否点击
  170. editButton: false, // 大编辑大隐藏显示
  171. isEditButton: false, // 大编辑是否禁用
  172. goods: [],
  173. isDisabled: false, // 表格删除的是否禁用
  174. isDisabledTask: false, // 撤销任务和生成任务的是否禁用
  175. contactsOption: [],
  176. isContacts: false, // 表单的联系人是否禁用
  177. checkData: {},
  178. buttonText: '生成任务', // 生成任务和撤销任务文本
  179. buttonColor: 'success', // 初始颜色为success 生成任务和撤销任务颜色状态
  180. checkScheduleDialog: false, // 审批进度的弹窗开启关闭
  181. isApplySettlement: true, // 申请退款的是否禁用
  182. isConfirmRefundBtn: true, // 确认退款的是否禁用
  183. isExamineBtn: true, // 审批是否禁用
  184. isRevocationRequest: true, // 撤销审核是否禁用
  185. checkDialog: false, // 审核弹窗的开启关闭
  186. checkId: '',
  187. batchNo: '',
  188. switchDialog: false, // 打印弹窗的开启和关闭
  189. activeName: "sale_detail",
  190. disabled: false, // 表格按钮的禁用
  191. key: 0,
  192. form: {
  193. createUser: JSON.parse(localStorage.getItem("saber-userInfo")) ? JSON.parse(localStorage.getItem("saber-userInfo")).content.user_id : null,
  194. createUserName: JSON.parse(localStorage.getItem("saber-userInfo")) ? JSON.parse(localStorage.getItem("saber-userInfo")).content.user_name : null,
  195. corpCnName: null,
  196. carrierCnName: null,
  197. vesselCnNam: null,
  198. polCnName: null,
  199. podCnName: null,
  200. runnerName: null,
  201. workType: 'RELEASE',
  202. businessType: 'SE',
  203. // issueStatus: 'N',
  204. isSwtich: 0,
  205. releaseBillList: []
  206. },
  207. customerData: [], // 客户数据
  208. optionForm: {
  209. menuBtn: false,
  210. span: 6,
  211. labelWidth: 120,
  212. disabled: false,
  213. column: [
  214. {
  215. label: '单据编号',
  216. prop: "billNo",
  217. disabled: true,
  218. span: 5
  219. },
  220. {
  221. label: '单据日期',
  222. prop: "billDate",
  223. disabled: true,
  224. type: "datetime",
  225. value: dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss'),
  226. format: "yyyy-MM-dd HH:mm:ss",
  227. valueFormat: "yyyy-MM-dd HH:mm:ss",
  228. span: 5
  229. },
  230. {
  231. label: "制单人",
  232. prop: "createUserName",
  233. disabled: true,
  234. span: 5
  235. },
  236. {
  237. label: '放单时间',
  238. prop: "releaseTime",
  239. type: "datetime",
  240. format: "yyyy-MM-dd HH:mm",
  241. valueFormat: "yyyy-MM-dd HH:mm",
  242. span: 5
  243. },
  244. {
  245. label: '工作类型',
  246. prop: "workType",
  247. type: "select",
  248. disabled: true,
  249. dicData: [{
  250. id: "RELEASE",
  251. name: "放单",
  252. }],
  253. props: {
  254. label: "name",
  255. value: "id",
  256. },
  257. span: 4
  258. },
  259. // {
  260. // label: '状态',
  261. // prop: "issueStatus",
  262. // type: "select",
  263. // disabled: true,
  264. // dicData: [{
  265. // id: 'N',
  266. // name: "新建",
  267. // }, {
  268. // id: 'S',
  269. // name: "提交",
  270. // }, {
  271. // id: 'I',
  272. // name: "跑单中",
  273. // }, {
  274. // id: 'O',
  275. // name: "操作确认",
  276. // }, {
  277. // id: 'D',
  278. // name: "调度确认",
  279. // }, {
  280. // id: 'T',
  281. // name: "放单",
  282. // }, {
  283. // id: 'B',
  284. // name: "退回",
  285. // }],
  286. // props: {
  287. // label: "name",
  288. // value: "id",
  289. // },
  290. // span: 4
  291. // },
  292. {
  293. label: '客户',
  294. prop: "corpCnName",
  295. overHidden: true,
  296. formslot: true,
  297. rules: [{
  298. required: true,
  299. message: " ",
  300. trigger: "blur"
  301. }],
  302. span: 6
  303. },
  304. {
  305. label: '是否VIP',
  306. prop: "vip",
  307. type: 'select',
  308. disabled: true,
  309. filterable: true,
  310. dicData: [{
  311. label: '否',
  312. value: 0
  313. }, {
  314. label: '是',
  315. value: 1
  316. }],
  317. props: {
  318. label: 'label',
  319. value: 'value',
  320. },
  321. span: 6
  322. },
  323. {
  324. label: '业务类型',
  325. prop: "businessType",
  326. type: "select",
  327. dicData: [{
  328. id: "SE",
  329. name: "海运出口",
  330. }, {
  331. id: "SI",
  332. name: "海运进口",
  333. }],
  334. props: {
  335. label: "name",
  336. value: "id",
  337. },
  338. rules: [{
  339. required: true,
  340. message: " ",
  341. trigger: "blur"
  342. }],
  343. span: 6
  344. },
  345. {
  346. label: '提单号',
  347. prop: "mblno",
  348. },
  349. {
  350. label: '信誉等级',
  351. prop: "vipLevel",
  352. type: 'select',
  353. disabled: true,
  354. filterable: true,
  355. remote: true,
  356. props: {
  357. label: 'dictValue',
  358. value: 'dictKey',
  359. res: 'data'
  360. },
  361. dicUrl: '/api/blade-system/dict-biz/dictionary?code=bcorps-credit-level',
  362. span: 6
  363. },
  364. {
  365. label: '结算方式',
  366. prop: "stlMode",
  367. type: "select",
  368. dicData: [{
  369. id: 0,
  370. name: "票结",
  371. }, {
  372. id: 1,
  373. name: "月结",
  374. }],
  375. props: {
  376. label: "name",
  377. value: "id",
  378. },
  379. span: 6
  380. },
  381. {
  382. label: '船公司',
  383. prop: "carrierCnName",
  384. overHidden: true,
  385. formslot: true,
  386. disabled: false,
  387. span: 12
  388. // type: 'select',
  389. // filterable: true,
  390. // remote: true,
  391. // dicUrl: "/api/blade-los/bcorps/listByType?cnName={{key}}",
  392. // props: {
  393. // label: 'cnName',
  394. // value: 'id',
  395. // res: 'data.records'
  396. // },
  397. },
  398. {
  399. label: '协议生效日期',
  400. prop: "effectiveDate",
  401. type: "datetime",
  402. format: "yyyy-MM-dd HH:mm",
  403. valueFormat: "yyyy-MM-dd HH:mm",
  404. span: 6
  405. },
  406. {
  407. label: '协议失效期限',
  408. prop: "expiringDate",
  409. type: "datetime",
  410. format: "yyyy-MM-dd HH:mm",
  411. valueFormat: "yyyy-MM-dd HH:mm",
  412. span: 6
  413. },
  414. {
  415. label: 'ETD开始日期',
  416. prop: "dateFrom",
  417. type: "datetime",
  418. format: "yyyy-MM-dd",
  419. valueFormat: "yyyy-MM-dd 00:00",
  420. span: 4
  421. },
  422. {
  423. label: 'ETD结束日期',
  424. prop: "dateTo",
  425. type: "datetime",
  426. format: "yyyy-MM-dd",
  427. valueFormat: "yyyy-MM-dd 23:59",
  428. span: 6
  429. },
  430. {
  431. label: 'RMB限额',
  432. prop: "amountCny",
  433. span: 6
  434. },
  435. {
  436. label: 'USD限额',
  437. prop: "amountUsd",
  438. span: 6
  439. },
  440. {
  441. label: '船名',
  442. prop: "vesselCnName",
  443. overHidden: true,
  444. formslot: true,
  445. disabled: false,
  446. // type: 'select',
  447. // filterable: true,
  448. // remote: true,
  449. // dicUrl: "/api/blade-los/bvessels/list?cnName={{key}}",
  450. // props: {
  451. // label: 'cnName',
  452. // value: 'id',
  453. // res: 'data.records'
  454. // },
  455. },
  456. {
  457. label: '船次',
  458. prop: "voyageNo",
  459. span: 6
  460. },
  461. {
  462. label: 'RMB未收',
  463. prop: "unstlDrCny",
  464. span: 6
  465. },
  466. {
  467. label: 'USD未收',
  468. prop: "unstlDrUsd",
  469. span: 6
  470. },
  471. {
  472. label: '起运港',
  473. prop: "polCnName",
  474. overHidden: true,
  475. formslot: true,
  476. disabled: false,
  477. // type: 'select',
  478. // filterable: true,
  479. // remote: true,
  480. // dicUrl: "/api/blade-los/bports/list?enName?cnName={{key}}",
  481. // props: {
  482. // label: 'cnName',
  483. // value: 'id',
  484. // res: 'data.records'
  485. // },
  486. },
  487. {
  488. label: '目的港',
  489. prop: "podCnName",
  490. overHidden: true,
  491. formslot: true,
  492. disabled: false,
  493. // filterable: true,
  494. // remote: true,
  495. // dicUrl: "/api/blade-los/bports/list?enName?cnName={{key}}",
  496. // props: {
  497. // label: 'cnName',
  498. // value: 'id',
  499. // res: 'data.records'
  500. // }
  501. },
  502. {
  503. label: '限额合计',
  504. prop: "amountTotal",
  505. span: 6
  506. },
  507. {
  508. label: '合计未收',
  509. prop: "unstlDrTotal",
  510. span: 6
  511. },
  512. {
  513. label: '已生成账单未放单',
  514. prop: "unplacedOrders",
  515. type: 'select',
  516. disabled: true,
  517. filterable: true,
  518. dicData: [{
  519. label: '否',
  520. value: 0
  521. }, {
  522. label: '是',
  523. value: 1
  524. }],
  525. props: {
  526. label: 'label',
  527. value: 'value',
  528. },
  529. span: 6
  530. },
  531. {
  532. label: '换签',
  533. prop: "isSwtich",
  534. type: 'select',
  535. disabled: false,
  536. filterable: true,
  537. dicData: [{
  538. label: '否',
  539. value: 0
  540. }, {
  541. label: '是',
  542. value: 1
  543. }],
  544. props: {
  545. label: 'label',
  546. value: 'value',
  547. },
  548. },
  549. {
  550. label: '协议编号',
  551. prop: "agreementNo",
  552. span: 6
  553. },
  554. {
  555. label: '款已到账',
  556. prop: "isAmountReceived",
  557. type: 'select',
  558. disabled: false,
  559. filterable: true,
  560. dicData: [{
  561. label: '否',
  562. value: 0
  563. }, {
  564. label: '是',
  565. value: 1
  566. }],
  567. props: {
  568. label: 'label',
  569. value: 'value',
  570. },
  571. },
  572. {
  573. label: '单票限额',
  574. prop: "limitAmountPerBill",
  575. span: 6
  576. },
  577. {
  578. label: '放单方式',
  579. prop: "releaseType",
  580. type: 'select',
  581. disabled: false,
  582. filterable: true,
  583. dicData: [{
  584. label: '自取',
  585. value: 0
  586. }, {
  587. label: '送单',
  588. value: 1
  589. }, {
  590. label: '寄送,',
  591. value: 2
  592. }],
  593. props: {
  594. label: 'label',
  595. value: 'value',
  596. },
  597. },
  598. {
  599. label: '单票超额业务',
  600. prop: "overLimitBills",
  601. type: 'textarea',
  602. disabled: false,
  603. span: 12,
  604. minRows: 2
  605. },
  606. {
  607. label: '后续有货',
  608. prop: "unreleaseBills",
  609. type: 'textarea',
  610. disabled: false,
  611. span: 12,
  612. minRows: 2
  613. }]
  614. },
  615. formContacts: {},
  616. optionContacts: {
  617. disabled: false,
  618. border: true,
  619. align: 'center',
  620. index: true,
  621. refreshBtn: false,
  622. addBtn: false,
  623. // 航编辑开启
  624. cellBtn: true,
  625. span: 8,
  626. height: 500,
  627. addRowBtn: false,
  628. editBtn: false,
  629. delBtn: false,
  630. menuWidth: 120,
  631. menu: false,
  632. tip: false,
  633. showSummary: true,
  634. selection: true,
  635. column: [
  636. {
  637. label: '放单信息',
  638. overHidden: true,
  639. disabled: false,
  640. children: [{
  641. label: '业务编号',
  642. prop: 'billNo',
  643. overHidden: true,
  644. display: false
  645. }, {
  646. label: 'MBL NO',
  647. prop: 'mblno',
  648. overHidden: true,
  649. display: false
  650. }, {
  651. label: 'HBL NO',
  652. prop: 'hblno',
  653. overHidden: true,
  654. display: false
  655. },
  656. {
  657. label: '提单份数',
  658. prop: 'numberOfObl',
  659. overHidden: true,
  660. display: false
  661. }, {
  662. label: '签单',
  663. prop: '',
  664. overHidden: true,
  665. display: false
  666. }, {
  667. label: '放单',
  668. prop: '',
  669. overHidden: true,
  670. display: false
  671. }]
  672. },
  673. {
  674. label: '有船公司账单',
  675. prop: '',
  676. width: 160,
  677. disabled: false,
  678. remote: true,
  679. overHidden: true,
  680. },
  681. {
  682. label: '产生账单',
  683. prop: 'isAccbill',
  684. width: 120,
  685. disabled: false,
  686. remote: true,
  687. overHidden: true,
  688. dicData: [{
  689. label: '否',
  690. value: 0
  691. }, {
  692. label: '是',
  693. value: 1
  694. }],
  695. },
  696. {
  697. label: 'RMB',
  698. overHidden: true,
  699. disabled: false,
  700. children: [{
  701. label: '应收',
  702. prop: 'amountDrCny',
  703. overHidden: true,
  704. display: false
  705. }, {
  706. label: '签收',
  707. prop: 'signForCny',
  708. overHidden: true,
  709. display: false
  710. }, {
  711. label: '未收',
  712. prop: 'unstlDrCny',
  713. overHidden: true,
  714. display: false
  715. }]
  716. },
  717. {
  718. label: 'USD',
  719. overHidden: true,
  720. disabled: false,
  721. children: [{
  722. label: '应收',
  723. prop: 'amountDrUsd',
  724. overHidden: true,
  725. display: false
  726. }, {
  727. label: '签收',
  728. prop: 'signForUsd',
  729. overHidden: true,
  730. display: false
  731. }, {
  732. label: '未收',
  733. prop: 'unstlDrUsd',
  734. overHidden: true,
  735. display: false
  736. }]
  737. },
  738. {
  739. label: '合计',
  740. overHidden: true,
  741. disabled: false,
  742. children: [{
  743. label: '应收',
  744. prop: 'amountDrTotal',
  745. overHidden: true,
  746. display: false
  747. }, {
  748. label: '未收',
  749. prop: 'unstlDrTotal',
  750. overHidden: true,
  751. display: false
  752. }]
  753. },
  754. // {
  755. // label: '发票号*',
  756. // prop: '',
  757. // disabled: false,
  758. // remote: true,
  759. // overHidden: true,
  760. // },
  761. {
  762. label: '单票超额费用',
  763. overHidden: true,
  764. disabled: false,
  765. children: [{
  766. label: '是否',
  767. prop: 'isOverLimit',
  768. overHidden: true,
  769. display: false,
  770. dicData: [{
  771. label: '否',
  772. value: 0
  773. }, {
  774. label: '是',
  775. value: 1
  776. }],
  777. }, {
  778. label: '金额',
  779. prop: 'overAmountDr',
  780. overHidden: true,
  781. display: false
  782. }]
  783. },
  784. {
  785. label: '业务信息',
  786. overHidden: true,
  787. disabled: false,
  788. children: [
  789. {
  790. label: '客户简称',
  791. prop: 'corpCnName',
  792. overHidden: true,
  793. }, {
  794. label: '船公司',
  795. prop: 'carrierCnName',
  796. overHidden: true,
  797. display: false
  798. }, {
  799. label: 'ETD',
  800. prop: 'etd',
  801. overHidden: true,
  802. display: false
  803. }, {
  804. label: 'VSL',
  805. prop: 'vesselCnName',
  806. overHidden: true,
  807. display: false
  808. }, {
  809. label: 'VOY',
  810. prop: 'voyageNo',
  811. overHidden: true,
  812. display: false
  813. }]
  814. },
  815. {
  816. label: '备注',
  817. prop: 'remarks',
  818. width: 100,
  819. disabled: false,
  820. remote: true,
  821. overHidden: true,
  822. },
  823. {
  824. label: '签单信息',
  825. overHidden: true,
  826. disabled: false,
  827. children: [{
  828. label: '要求时间',
  829. prop: 'requireTime',
  830. overHidden: true,
  831. display: false
  832. }, {
  833. label: '完成时间',
  834. prop: 'releaseTime',
  835. overHidden: true,
  836. display: false
  837. }, {
  838. label: '紧急程度',
  839. prop: 'itemLevel',
  840. overHidden: true,
  841. width: 120,
  842. dicData: [{
  843. label: '普通',
  844. value: 0
  845. }, {
  846. label: '一级',
  847. value: 1
  848. }, {
  849. label: '二级',
  850. value: 2
  851. }, {
  852. label: '三级',
  853. value: 3
  854. }],
  855. }]
  856. },
  857. {
  858. label: '换签次数',
  859. prop: 'swtichCount',
  860. width: 100,
  861. disabled: false,
  862. remote: true,
  863. overHidden: true,
  864. },
  865. {
  866. label: '换签原因',
  867. prop: 'swtichReason',
  868. width: 100,
  869. disabled: false,
  870. remote: true,
  871. overHidden: true,
  872. },
  873. {
  874. label: '单据类型',
  875. prop: 'billType',
  876. width: 100,
  877. disabled: false,
  878. remote: true,
  879. overHidden: true,
  880. dicData: [{
  881. label: '直单',
  882. value: 'DD'
  883. }, {
  884. label: '主单',
  885. value: 'MM'
  886. }, {
  887. label: '主分单',
  888. value: 'MH'
  889. }, {
  890. label: '从分单',
  891. value: 'HH'
  892. }],
  893. },
  894. ]
  895. },
  896. selectionMultilist: [], // 多选数据
  897. }
  898. },
  899. components: { SearchQuery, reportDialog, check, checkSchedule },
  900. props: {
  901. onLoad: Object,
  902. detailData: Object
  903. },
  904. async created() {
  905. if (this.detailData.id) {
  906. this.editButton = true
  907. this.optionForm.disabled = true
  908. this.getDetail(this.detailData.id)
  909. }
  910. },
  911. methods: {
  912. selectionChange(list) {
  913. this.selectionList = list
  914. },
  915. selectChange(val, name) {
  916. console.log(val, name)
  917. if (val) {
  918. if (name == 'corpCnName') {
  919. this.corpData.forEach(e => {
  920. if (e.cnName == val) {
  921. this.form.corpId = e.id
  922. this.form.corpCnName = e.cnName
  923. this.form.corpEnName = e.enName
  924. this.form.vip = e.vip
  925. this.form.vipLevel = e.creditLevel
  926. }
  927. })
  928. }
  929. if (name == 'carrierCnName') {
  930. this.carrierData.forEach(e => {
  931. if (e.cnName == val) {
  932. this.form.carrierId = e.id
  933. this.form.carrierCnName = e.cnName
  934. this.form.carrierEnName = e.enName
  935. }
  936. })
  937. }
  938. if (name == 'vesselCnName') {
  939. this.vesselData.forEach(e => {
  940. if (e.cnName == val) {
  941. this.form.vesselId = e.id
  942. this.form.vesselCnName = e.cnName
  943. this.form.vesselEnName = e.enName
  944. }
  945. })
  946. }
  947. if (name == 'polCnName') {
  948. this.polData.forEach(e => {
  949. if (e.cnName == val) {
  950. this.form.polId = e.id
  951. this.form.polCnName = e.cnName
  952. this.form.polEnName = e.enName
  953. }
  954. })
  955. }
  956. if (name == 'podCnName') {
  957. this.podData.forEach(e => {
  958. if (e.cnName == val) {
  959. this.form.podId = e.id
  960. this.form.podCnName = e.cnName
  961. this.form.podEnName = e.enName
  962. }
  963. })
  964. }
  965. if (name == 'runnerName') {
  966. this.runnerData.forEach(e => {
  967. if (e.name == val) {
  968. this.form.runnerId = e.id
  969. this.form.runnerName = e.name
  970. }
  971. })
  972. }
  973. } else {
  974. if (name == 'corpCnName') {
  975. this.form.corpId = null
  976. this.form.corpCnName = null
  977. this.form.corpEnName = null
  978. this.form.vip = null
  979. this.form.vipLevel = null
  980. }
  981. if (name == 'carrierCnName') {
  982. this.form.carrierId = null
  983. this.form.carrierCnName = null
  984. this.form.carrierEnName = null
  985. }
  986. if (name == 'vesselCnName') {
  987. this.form.vesselId = null
  988. this.form.vesselCnName = null
  989. this.form.vesselEnName = null
  990. }
  991. if (name == 'polCnName') {
  992. this.form.polId = null
  993. this.form.polCnName = null
  994. this.form.polEnName = null
  995. }
  996. if (name == 'podCnName') {
  997. this.form.podId = null
  998. this.form.podCnName = null
  999. this.form.podEnName = null
  1000. }
  1001. if (name == 'runnerName') {
  1002. this.form.runnerId = null
  1003. this.form.runnerName = null
  1004. }
  1005. }
  1006. },
  1007. getRemote(val, name) {
  1008. if (name == 'corpCnName') {
  1009. getListByType({ current: 1, size: 10, cnName: val ? val : null }).then(res => {
  1010. this.corpData = res.data.data.records
  1011. })
  1012. }
  1013. if (name == 'carrierCnName') {
  1014. getListByType({ current: 1, size: 10, cnName: val ? val : null }).then(res => {
  1015. this.carrierData = res.data.data.records
  1016. })
  1017. }
  1018. if (name == 'vesselCnName') {
  1019. getBvessels({ current: 1, size: 10, cnName: val ? val : null }).then(res => {
  1020. this.vesselData = res.data.data.records
  1021. })
  1022. }
  1023. if (name == 'polCnName') {
  1024. getBports({ current: 1, size: 10, cnName: val ? val : null }).then(res => {
  1025. this.polData = res.data.data.records
  1026. })
  1027. }
  1028. if (name == 'podCnName') {
  1029. getBports({ current: 1, size: 10, cnName: val ? val : null }).then(res => {
  1030. this.podData = res.data.data.records
  1031. })
  1032. }
  1033. if (name == 'runnerName') {
  1034. getRunner({ roles: '跑单员', name: val ? val : null }).then(res => {
  1035. this.runnerData = res.data.data
  1036. })
  1037. }
  1038. },
  1039. queryDetails() {
  1040. this.$refs["form"].validate((valid, done) => {
  1041. done();
  1042. if (valid) {
  1043. const loading = this.$loading({
  1044. lock: true,
  1045. text: '加载中',
  1046. spinner: 'el-icon-loading',
  1047. background: 'rgba(255,255,255,0.7)'
  1048. });
  1049. let obj = {}
  1050. this.form.releaseBillList = []
  1051. if (this.form.businessType == 'SE') {
  1052. obj = {
  1053. businessType: this.form.businessType,
  1054. mblno: this.form.mblno,
  1055. carrierId: this.form.carrierId,
  1056. vesselId: this.form.vesselId,
  1057. voyageNo: this.form.voyageNo,
  1058. polId: this.form.polId,
  1059. podId: this.form.podId,
  1060. corpId: this.form.corpId,
  1061. bookingNo: this.form.bookingNo,
  1062. dateFrom: this.form.dateFrom,
  1063. dateTo: this.form.dateTo,
  1064. isSwtich: this.form.isSwtich
  1065. }
  1066. } else if (this.form.businessType == 'SI') {
  1067. obj = {
  1068. businessType: this.form.businessType,
  1069. mblno: this.form.mblno,
  1070. carrierId: this.form.carrierId,
  1071. vesselId: this.form.vesselId,
  1072. voyageNo: this.form.voyageNo,
  1073. polId: this.form.polId,
  1074. podId: this.form.podId,
  1075. corpId: this.form.corpId,
  1076. bookingNo: this.form.bookingNo,
  1077. dateFrom: this.form.dateFrom,
  1078. dateTo: this.form.dateTo,
  1079. isSwtich: this.form.isSwtich
  1080. }
  1081. }
  1082. releaseApplication(obj).then(res => {
  1083. this.form.releaseBillList = res.data.data
  1084. this.$message.success("查询成功");
  1085. }).finally(() => {
  1086. loading.close();
  1087. });
  1088. } else {
  1089. return false;
  1090. }
  1091. });
  1092. },
  1093. reset() {
  1094. this.form = this.$options.data().form
  1095. },
  1096. del() {
  1097. if (this.form.id) {
  1098. let ids = []
  1099. this.selectionList.forEach(e => {
  1100. ids.push(e.id)
  1101. })
  1102. console.log(ids.join(','))
  1103. itemsRemove({ ids: ids.join(',') }).then(res => {
  1104. this.form.releaseBillList = this.form.releaseBillList.filter(e => !this.selectionList.includes(e))
  1105. this.selectionList = []
  1106. this.$message.success("删除成功");
  1107. })
  1108. } else {
  1109. this.form.releaseBillList = this.form.releaseBillList.filter(e => !this.selectionList.includes(e))
  1110. this.selectionList = []
  1111. this.$message.success("删除成功");
  1112. }
  1113. },
  1114. //表头编辑
  1115. inEdit() {
  1116. this.editButton = false
  1117. this.optionForm.disabled = false
  1118. },
  1119. subsequentAb() {
  1120. this.$confirm('是否继续操作?', '提示', {
  1121. confirmButtonText: '确定',
  1122. cancelButtonText: '取消',
  1123. type: 'warning'
  1124. }).then(() => {
  1125. subsequentAvailability(this.form).then(res => {
  1126. if (Object.keys(res.data.data).length) {
  1127. this.form.unreleaseBills = '票数:' + res.data.data.number + '\n' + res.data.data.text
  1128. }
  1129. })
  1130. }).catch(() => {
  1131. });
  1132. },
  1133. //修改提交触发
  1134. submit() {
  1135. this.$refs["form"].validate((valid, done) => {
  1136. done();
  1137. if (valid) {
  1138. const loading = this.$loading({
  1139. lock: true,
  1140. text: '加载中',
  1141. spinner: 'el-icon-loading',
  1142. background: 'rgba(255,255,255,0.7)'
  1143. });
  1144. let obj = {}
  1145. let val = 0
  1146. val = this.form.releaseBillList.filter(e => e.preleaseId)
  1147. if (val.length > 0) {
  1148. obj = {
  1149. billNoFormat: 'FD',
  1150. businessTypeCode: 'FD',
  1151. ...this.form,
  1152. billType: "R"
  1153. }
  1154. submit(obj).then(res => {
  1155. this.form = res.data.data
  1156. this.$message.success("保存成功");
  1157. this.editButton = true;
  1158. this.optionForm.disabled = true
  1159. }).finally(() => {
  1160. loading.close();
  1161. });
  1162. } else {
  1163. if (this.selectionList.length > 0) {
  1164. if (this.selectionList.length > 0) {
  1165. this.form.releaseBillList = this.selectionList
  1166. obj = {
  1167. billNoFormat: 'FD',
  1168. businessTypeCode: 'FD',
  1169. ...this.form,
  1170. billType: "R"
  1171. }
  1172. submit(obj).then(res => {
  1173. this.form = res.data.data
  1174. this.$message.success("保存成功");
  1175. this.editButton = true;
  1176. this.optionForm.disabled = true
  1177. }).finally(() => {
  1178. loading.close();
  1179. });
  1180. } else {
  1181. loading.close();
  1182. this.$message.error("请选择明细");
  1183. }
  1184. } else {
  1185. obj = {
  1186. billNoFormat: 'FD',
  1187. businessTypeCode: 'FD',
  1188. ...this.form,
  1189. billType: "R"
  1190. }
  1191. submit(obj).then(res => {
  1192. this.form = res.data.data
  1193. this.$message.success("保存成功");
  1194. }).finally(() => {
  1195. loading.close();
  1196. });
  1197. }
  1198. }
  1199. } else {
  1200. return false;
  1201. }
  1202. });
  1203. },
  1204. subApplication() {
  1205. this.$refs["form"].validate((valid, done) => {
  1206. done();
  1207. if (valid) {
  1208. const loading = this.$loading({
  1209. lock: true,
  1210. text: '加载中',
  1211. spinner: 'el-icon-loading',
  1212. background: 'rgba(255,255,255,0.7)'
  1213. });
  1214. application(this.form).then(res => {
  1215. this.form = res.data.data
  1216. this.$message.success("提交成功");
  1217. this.editButton = true;
  1218. this.optionForm.disabled = true
  1219. this.getDetail(this.form.id)
  1220. }).finally(() => {
  1221. loading.close();
  1222. });
  1223. } else {
  1224. return false;
  1225. }
  1226. });
  1227. },
  1228. revokeApp() {
  1229. this.$refs["form"].validate((valid, done) => {
  1230. done();
  1231. if (valid) {
  1232. const loading = this.$loading({
  1233. lock: true,
  1234. text: '加载中',
  1235. spinner: 'el-icon-loading',
  1236. background: 'rgba(255,255,255,0.7)'
  1237. });
  1238. revokeApplication(this.form).then(res => {
  1239. this.form = res.data.data
  1240. this.$message.success("撤销成功");
  1241. this.getDetail(this.form.id)
  1242. }).finally(() => {
  1243. loading.close();
  1244. });
  1245. } else {
  1246. return false;
  1247. }
  1248. });
  1249. },
  1250. submitSign() {
  1251. this.$refs["form"].validate((valid, done) => {
  1252. done();
  1253. if (valid) {
  1254. const loading = this.$loading({
  1255. lock: true,
  1256. text: '加载中',
  1257. spinner: 'el-icon-loading',
  1258. background: 'rgba(255,255,255,0.7)'
  1259. });
  1260. signcomplete(this.form).then(res => {
  1261. this.form = res.data.data
  1262. this.$message.success("签单成功");
  1263. this.getDetail(this.form.id)
  1264. }).finally(() => {
  1265. loading.close();
  1266. });
  1267. } else {
  1268. return false;
  1269. }
  1270. });
  1271. },
  1272. revokeSign() {
  1273. this.$refs["form"].validate((valid, done) => {
  1274. done();
  1275. if (valid) {
  1276. const loading = this.$loading({
  1277. lock: true,
  1278. text: '加载中',
  1279. spinner: 'el-icon-loading',
  1280. background: 'rgba(255,255,255,0.7)'
  1281. });
  1282. revokeSigncomplete(this.form).then(res => {
  1283. this.form = res.data.data
  1284. this.$message.success("取消成功");
  1285. this.getDetail(this.form.id)
  1286. }).finally(() => {
  1287. loading.close();
  1288. });
  1289. } else {
  1290. return false;
  1291. }
  1292. });
  1293. },
  1294. getDetail(id, type) {
  1295. const loading = this.$loading({
  1296. lock: true,
  1297. text: '加载中',
  1298. spinner: 'el-icon-loading',
  1299. background: 'rgba(255,255,255,0.7)'
  1300. })
  1301. getDetails({ id: id }).then(res => {
  1302. this.form = res.data.data
  1303. loading.close();
  1304. }).catch(() => {
  1305. loading.close();
  1306. })
  1307. },
  1308. //自定义列保存
  1309. async saveColumnTwo(ref, option, optionBack, code) {
  1310. /**
  1311. * 已定义全局方法,直接使用,saveColumnData保存列数据方法,参数传值(表格名称,当前表格的option数据)
  1312. * 已定义全局方法,直接使用,getColumnName方法用来获取枚举值,参数根据自己定义的code值获取中文名
  1313. * 一定要执行异步操作,要等接口成功返回,才能执行下一行代码
  1314. */
  1315. const inSave = await this.saveColumnData(this.getColumnName(code), this[option]);
  1316. if (inSave) {
  1317. this.$message.success("保存成功");
  1318. //关闭窗口
  1319. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  1320. }
  1321. },
  1322. //自定义列重置
  1323. async resetColumnTwo(ref, option, optionBack, code) {
  1324. this[option] = this[optionBack];
  1325. const inSave = await this.delColumnData(this.getColumnName(code), this[optionBack]);
  1326. if (inSave) {
  1327. this.$message.success("重置成功");
  1328. this.$refs[ref].$refs.dialogColumn.columnBox = false;
  1329. }
  1330. },
  1331. backToList(type) {
  1332. this.$emit("backToList", type);
  1333. },
  1334. // 弹框的重置
  1335. resetCrud() {
  1336. this.$message.success("重置成功");
  1337. },
  1338. // 弹窗的保存
  1339. saveCrud() {
  1340. this.$message.success("保存成功");
  1341. }
  1342. }
  1343. }
  1344. </script>
  1345. <style lang="scss" scoped>
  1346. ::v-deep .el-form-item {
  1347. margin-bottom: 8px !important;
  1348. }
  1349. </style>