addAnchorageReport.vue 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856
  1. <!-- 锚泊报 -->
  2. <template>
  3. <div class="frame">
  4. <div style="height: 50px"
  5. v-if="editFlag">
  6. <auditFlow show-history-flag="true"
  7. :activities="activities"
  8. :message="approveStatus"
  9. :billNo="shipMan.status" />
  10. </div>
  11. <div id="addConstuctionReport"
  12. class="app-container input-form">
  13. <ws-form :model="shipMan"
  14. :show-message="false"
  15. ref="shipMan"
  16. :rules="rules">
  17. <div class="crewAddTitle clearfix"
  18. style="margin-top:1px">
  19. <div class="left">
  20. <span class="crewAddTitleMsg">基本信息(锚泊报)</span>
  21. </div>
  22. <div class="right">
  23. <ws-button type="primary"
  24. class="editBtn"
  25. @click="submit"
  26. v-if="!auth">提 交</ws-button>
  27. <ws-button type="primary"
  28. class="editBtn"
  29. @click="confirm"
  30. v-if="auth">确 认</ws-button>
  31. <ws-button type="primary"
  32. class="editBtn"
  33. @click="refuse"
  34. v-if="auth">退 回</ws-button>
  35. <ws-button type="primary"
  36. class="editBtn"
  37. @click="save">保 存</ws-button>
  38. <ws-button class="editBtn"
  39. @click="back">返 回</ws-button>
  40. <div class="divIcon"
  41. @click="openState(openMsg[0].key)">
  42. <i v-show="openMsg[0].state"
  43. class="iconfont iconopen" />
  44. <i v-show="!openMsg[0].state"
  45. class="iconfont iconclose" />
  46. <!-- <svg-icon class="openCloseIcon" v-show="openMsg[0].state" icon-class="open" />-->
  47. <!-- <svg-icon class="openCloseIcon" v-show="!openMsg[0].state" icon-class="close" />-->
  48. <span class="openClose">{{ openMsg[0].value }}</span>
  49. </div>
  50. </div>
  51. </div>
  52. <transition name="draw">
  53. <div v-show="openMsg[0].state"
  54. class="crewMsg">
  55. <div>
  56. <ws-info-table>
  57. <ws-form-item label="报告类型"
  58. prop="reportTypeId"
  59. span="1">
  60. <ws-select :placeholder="$t('common.selected')"
  61. v-model="shipMan.reportTypeId"
  62. disabled>
  63. <ws-option v-for="item in typeList"
  64. :key="item.parameterKey"
  65. :label="item.parameterValue"
  66. :value="item.parameterKey">
  67. </ws-option>
  68. </ws-select>
  69. </ws-form-item>
  70. <ws-form-item label="船舶名称"
  71. prop="vesselId"
  72. span="1">
  73. <!-- <ws-select :placeholder="$t('common.selected')"
  74. v-model="shipMan.vesselId"
  75. clearable
  76. @change="vesselChange"
  77. :disabled="editFlag || vesselBankFlag == 'V'"
  78. filterable>
  79. <ws-option v-for="item in shipList"
  80. :key="item.vesselId"
  81. :label="item.vesselName"
  82. :value="item.vesselId"></ws-option>
  83. </ws-select> -->
  84. <BaseShipSelect v-model="shipMan.vesselId"
  85. :disabled="editFlag || vesselBankFlag == 'V'"
  86. filterable
  87. :placeholder="$t('common.selected')"
  88. :showAll="false"
  89. clearable
  90. :remote="true"
  91. @change="vesselChange"
  92. style="width:100%;"></BaseShipSelect>
  93. </ws-form-item>
  94. <ws-form-item label="船舶呼号"
  95. prop="callSign"
  96. span="1">
  97. <ws-input :placeholder="$t('common.input')"
  98. v-model.trim="shipMan.callSign"
  99. maxlength="50"
  100. clearable></ws-input>
  101. </ws-form-item>
  102. <ws-form-item label="报告日期"
  103. prop="reportDate"
  104. span="1">
  105. <ws-date-picker v-model="shipMan.reportDate"
  106. type="date"
  107. :placeholder="$t('common.selected')"
  108. value-format="yyyy-MM-dd"
  109. format="yyyy.MM.dd">
  110. </ws-date-picker>
  111. </ws-form-item>
  112. <ws-form-item label="时区"
  113. prop="timeZone"
  114. span="1">
  115. <ws-select :placeholder="$t('common.selected')"
  116. v-model="shipMan.timeZone"
  117. clearable>
  118. <ws-option v-for="item in timeList"
  119. :key="item.dictionaryItemId"
  120. :label="item.dictionaryItemName"
  121. :value="item.dictionaryItemName"></ws-option>
  122. </ws-select>
  123. </ws-form-item>
  124. <ws-form-item label="船舶状态"
  125. prop="shipStatus"
  126. span="1">
  127. <ws-input :placeholder="$t('common.input')"
  128. v-model.trim="shipMan.shipStatus"
  129. maxlength="50"></ws-input>
  130. </ws-form-item>
  131. <ws-form-item label="备注"
  132. span="2">
  133. <ws-input :placeholder="$t('common.input')"
  134. v-model.trim="shipMan.remarks"
  135. maxlength="50"
  136. clearable></ws-input>
  137. </ws-form-item>
  138. </ws-info-table>
  139. </div>
  140. </div>
  141. </transition>
  142. <div class="crewAddTitle clearfix">
  143. <div class="left">
  144. <span class="crewAddTitleMsg">锚泊信息</span>
  145. </div>
  146. <div class="right"
  147. @click="openState(openMsg[1].key)">
  148. <i v-show="openMsg[1].state"
  149. class="iconfont iconopen" />
  150. <i v-show="!openMsg[1].state"
  151. class="iconfont iconclose" />
  152. <!-- <svg-icon class="openCloseIcon" v-show="openMsg[1].state" icon-class="open" />-->
  153. <!-- <svg-icon class="openCloseIcon" v-show="!openMsg[1].state" icon-class="close" />-->
  154. <span class="openClose">{{ openMsg[1].value }}</span>
  155. </div>
  156. </div>
  157. <transition name="draw">
  158. <div v-show="openMsg[1].state"
  159. class="crewMsg">
  160. <div>
  161. <ws-info-table>
  162. <ws-form-item label="锚泊港口名称"
  163. span="1">
  164. <ws-input :placeholder="$t('common.input')"
  165. v-model.trim="shipMan.reportDetail.portName"
  166. maxlength="50"
  167. clearable></ws-input>
  168. </ws-form-item>
  169. <ws-form-item label="锚泊安全"
  170. span="1">
  171. <ws-input :placeholder="$t('common.input')"
  172. v-model.trim="shipMan.reportDetail.safety"
  173. maxlength="50"
  174. clearable></ws-input>
  175. </ws-form-item>
  176. <ws-form-item label="锚泊时间"
  177. span="1">
  178. <ws-date-picker v-model="shipMan.reportDetail.anchorTime"
  179. type="datetime"
  180. :placeholder="$t('common.selected')"
  181. value-format="yyyy-MM-dd HH:mm"
  182. format="yyyy-MM-dd HH:mm">
  183. </ws-date-picker>
  184. </ws-form-item>
  185. <ws-form-item label="锚泊作业"
  186. span="1">
  187. <ws-input :placeholder="$t('common.input')"
  188. v-model.trim="shipMan.reportDetail.anchoringPeration"
  189. maxlength="50"
  190. clearable></ws-input>
  191. </ws-form-item>
  192. <ws-form-item label="锚泊经度"
  193. span="1">
  194. <ws-input :placeholder="$t('common.input')"
  195. v-model.trim="shipMan.reportDetail.longDegree"
  196. maxlength="50"
  197. clearable></ws-input>
  198. </ws-form-item>
  199. <ws-form-item label="锚泊纬度"
  200. span="1">
  201. <ws-input :placeholder="$t('common.input')"
  202. v-model.trim="shipMan.reportDetail.latDegree"
  203. maxlength="50"
  204. clearable></ws-input>
  205. </ws-form-item>
  206. </ws-info-table>
  207. </div>
  208. </div>
  209. </transition>
  210. <div class="crewAddTitle clearfix">
  211. <div class="left">
  212. <span class="crewAddTitleMsg">油水存量、消耗及接收信息</span>
  213. </div>
  214. <div class="right"
  215. @click="openState(openMsg[2].key)">
  216. <i v-show="openMsg[2].state"
  217. class="iconfont iconopen" />
  218. <i v-show="!openMsg[2].state"
  219. class="iconfont iconclose" />
  220. <!-- <svg-icon class="openCloseIcon" v-show="openMsg[2].state" icon-class="open" />-->
  221. <!-- <svg-icon class="openCloseIcon" v-show="!openMsg[2].state" icon-class="close" />-->
  222. <span class="openClose">{{ openMsg[2].value }}</span>
  223. </div>
  224. </div>
  225. <transition name="draw">
  226. <div v-show="openMsg[2].state"
  227. class="crewMsg">
  228. <div>
  229. <ws-info-table>
  230. <ws-form-item label="重油补给"
  231. span="1">
  232. <ws-input style="width:95%"
  233. :placeholder="$t('common.input')"
  234. v-model.trim="shipMan.reportDetail.heavyOilSupply"
  235. maxlength="50"
  236. clearable></ws-input>
  237. <div class="rightDiv">MT</div>
  238. </ws-form-item>
  239. <ws-form-item label="轻油补给">
  240. <ws-input style="width:95%"
  241. :placeholder="$t('common.input')"
  242. v-model.trim="shipMan.reportDetail.lightOilSupply"
  243. maxlength="50"
  244. clearable></ws-input>
  245. <div class="rightDiv">MT</div>
  246. </ws-form-item>
  247. <ws-form-item label="重油消耗">
  248. <ws-input style="width:95%"
  249. :placeholder="$t('common.input')"
  250. v-model.trim="shipMan.reportDetail.heavyOilDeplete"
  251. maxlength="50"
  252. clearable></ws-input>
  253. <div class="rightDiv">MT</div>
  254. </ws-form-item>
  255. <ws-form-item label="轻油消耗">
  256. <ws-input style="width:95%"
  257. :placeholder="$t('common.input')"
  258. v-model.trim="shipMan.reportDetail.lightOilDeplete"
  259. maxlength="50"
  260. clearable></ws-input>
  261. <div class="rightDiv">MT</div>
  262. </ws-form-item>
  263. <ws-form-item label="重油存量">
  264. <ws-input v-leave-num-only
  265. style="width:95%"
  266. :placeholder="$t('common.input')"
  267. v-model.trim="shipMan.reportDetail.heavyOilStock"
  268. maxlength="50"
  269. clearable></ws-input>
  270. <div class="rightDiv">MT</div>
  271. </ws-form-item>
  272. <ws-form-item label="轻油存量">
  273. <ws-input v-leave-num-only
  274. style="width:95%"
  275. :placeholder="$t('common.input')"
  276. v-model.trim="shipMan.reportDetail.lightOilStock"
  277. maxlength="50"
  278. clearable></ws-input>
  279. <div class="rightDiv">MT</div>
  280. </ws-form-item>
  281. <ws-form-item label="主机系统油补给">
  282. <ws-input style="width:95%"
  283. :placeholder="$t('common.input')"
  284. v-leave-num-only
  285. v-model.trim="shipMan.reportDetail.mainOilSupply"
  286. maxlength="50"
  287. clearable></ws-input>
  288. <div class="rightDiv">L</div>
  289. </ws-form-item>
  290. <ws-form-item label="副机系统油补给">
  291. <ws-input style="width:95%"
  292. :placeholder="$t('common.input')"
  293. v-leave-num-only
  294. v-model.trim="shipMan.reportDetail.auxiliaryOilSupply"
  295. maxlength="50"
  296. clearable></ws-input>
  297. <div class="rightDiv">L</div>
  298. </ws-form-item>
  299. <ws-form-item label="主机系统油消耗">
  300. <ws-input style="width:95%"
  301. :placeholder="$t('common.input')"
  302. v-leave-num-only
  303. v-model.trim="shipMan.reportDetail.mainOilDeplete"
  304. maxlength="50"
  305. clearable></ws-input>
  306. <div class="rightDiv">L</div>
  307. </ws-form-item>
  308. <ws-form-item label="副机系统油消耗">
  309. <ws-input style="width:95%"
  310. :placeholder="$t('common.input')"
  311. v-leave-num-only
  312. v-model.trim="shipMan.reportDetail.auxiliaryOilDeplete"
  313. maxlength="50"
  314. clearable></ws-input>
  315. <div class="rightDiv">L</div>
  316. </ws-form-item>
  317. <ws-form-item label="主机系统油存量">
  318. <ws-input style="width:95%"
  319. :placeholder="$t('common.input')"
  320. v-leave-num-only
  321. v-model.trim="shipMan.reportDetail.mainOilStock"
  322. maxlength="50"
  323. clearable></ws-input>
  324. <div class="rightDiv">L</div>
  325. </ws-form-item>
  326. <ws-form-item label="副机系统油存量">
  327. <ws-input style="width:95%"
  328. :placeholder="$t('common.input')"
  329. v-leave-num-only
  330. v-model.trim="shipMan.reportDetail.auxiliaryOilStock"
  331. maxlength="50"
  332. clearable></ws-input>
  333. <div class="rightDiv">L</div>
  334. </ws-form-item>
  335. <ws-form-item label="日用淡水补给">
  336. <ws-input style="width:95%"
  337. :placeholder="$t('common.input')"
  338. v-leave-num-only
  339. v-model.trim="shipMan.reportDetail.dailyWaterSupply"
  340. maxlength="50"
  341. clearable></ws-input>
  342. <div class="rightDiv">MT</div>
  343. </ws-form-item>
  344. <ws-form-item label="日用淡水消耗">
  345. <ws-input style="width:95%"
  346. :placeholder="$t('common.input')"
  347. v-leave-num-only
  348. v-model.trim="shipMan.reportDetail.dailyWaterDeplete"
  349. maxlength="50"
  350. clearable></ws-input>
  351. <div class="rightDiv">MT</div>
  352. </ws-form-item>
  353. <ws-form-item label="日用淡水存量">
  354. <ws-input style="width:95%"
  355. :placeholder="$t('common.input')"
  356. v-leave-num-only
  357. v-model.trim="shipMan.reportDetail.dailyWaterStock"
  358. maxlength="50"
  359. clearable></ws-input>
  360. <div class="rightDiv">MT</div>
  361. </ws-form-item>
  362. </ws-info-table>
  363. </div>
  364. </div>
  365. </transition>
  366. <div class="crewAddTitle clearfix">
  367. <div class="left">
  368. <span class="crewAddTitleMsg">附件</span>
  369. </div>
  370. </div>
  371. <transition name="draw">
  372. <div class="crewMsg">
  373. <div>
  374. <ws-upload ref="upload"
  375. table-name="noonreport_dynamic_report_info"
  376. oss-key="deploy"
  377. :vesselId="my_VesselId ? my_VesselId : ''"
  378. :comp-id="compId"
  379. :appendix-ids="appendixIds" />
  380. </div>
  381. </div>
  382. </transition>
  383. </ws-form>
  384. </div>
  385. </div>
  386. </template>
  387. <script>
  388. import {
  389. parameterTenantQuery,
  390. queryItems,
  391. saveDynamicReport,
  392. submitDynamicReport,
  393. getReportInfoById,
  394. saveConfirm,
  395. saveReturn,
  396. getDynamicHistorys
  397. } from '@/model/crew/index'
  398. import WsUpload from '@/components/WsUpload'
  399. import auditFlow from '@/components/WinseaCom/auditFlow.vue'
  400. import { EventBus } from 'base-core-lib'
  401. export default {
  402. components: { WsUpload, auditFlow },
  403. name: 'addDispatchReport_arrival',
  404. props: ['callbackdata', 'authFlag'],
  405. data () {
  406. return {
  407. my_VesselId: localStorage.getItem('ws-pf_vesselId'),
  408. openMsg: [
  409. {
  410. key: 0,
  411. value: '收起',
  412. state: true
  413. },
  414. {
  415. key: 1,
  416. value: '收起',
  417. state: true
  418. },
  419. {
  420. key: 2,
  421. value: '收起',
  422. state: true
  423. },
  424. {
  425. key: 3,
  426. value: '收起',
  427. state: true
  428. }
  429. ],
  430. shipMan: {
  431. reportTypeId: '5', //报告类型ID
  432. reportType: '锚泊报', //报告类型
  433. sailingStatus: '', //航行状态
  434. sailingStatusId: '', //航行状态ID(调遣报有)
  435. vesselId: '', //船舶ID
  436. vesselName: '', //船舶
  437. reportDate: '', //报告日期
  438. shipStatus: '锚泊', //船舶状态
  439. previousProjectPort: '', //上一项目港
  440. nextProjectPort: '', //下一项目港
  441. remarks: '', //备注
  442. reportDetail: {
  443. departureName: '',
  444. arrivalName: '',
  445. departureTime: '',
  446. estimatedArrivalTime: '',
  447. longDegree: '',
  448. latDegree: '',
  449. motorizedSailingTime: '',
  450. constantSpeedTime: '',
  451. motorizedSailingDistance: '',
  452. distanceNextProjectPort: '',
  453. heavyOilStock: '',
  454. maneuverHeavyOilDeplete: '',
  455. maneuverLightOilDeplete: '',
  456. dailyWaterStock: '',
  457. sailingTime: '',
  458. drivenMileage: '',
  459. totalMileage: '',
  460. remainingMileage: '',
  461. nightLong: '',
  462. nightLat: '',
  463. fifteenLong: '',
  464. fifteenLat: '',
  465. arrivalNextProjectPortName: '',
  466. arrivalNextProjectPortTime: '',
  467. fixSpeedDistance: '',
  468. anchorTime: '',
  469. anchoringPeration: ''
  470. }
  471. },
  472. typeList: [],
  473. shipList: [],
  474. timeList: [],
  475. compId: localStorage.getItem('ws-pf_compId'),
  476. rules: {
  477. reportTypeId: [
  478. {
  479. required: true,
  480. message: '请输入优惠政策名称',
  481. trigger: ['blur', 'change']
  482. }
  483. ],
  484. vesselId: [
  485. {
  486. required: true,
  487. message: '请输入优惠政策名称',
  488. trigger: ['blur', 'change']
  489. }
  490. ],
  491. callSign: [
  492. {
  493. required: true,
  494. message: '请输入优惠政策名称',
  495. trigger: ['blur', 'change']
  496. }
  497. ],
  498. timeZone: [
  499. {
  500. required: true,
  501. message: '请输入优惠政策名称',
  502. trigger: ['blur', 'change']
  503. }
  504. ],
  505. shipStatus: [
  506. {
  507. required: true,
  508. message: '请输入优惠政策名称',
  509. trigger: ['blur', 'change']
  510. }
  511. ],
  512. reportDate: [
  513. {
  514. required: true,
  515. message: '请输入优惠政策名称',
  516. trigger: ['blur', 'change']
  517. }
  518. ]
  519. },
  520. id: '',
  521. editFlag: false,
  522. auth: false,
  523. // 新上传
  524. oldAppendixIds: '',
  525. newAppendixs: [],
  526. onChangeFlag: false,
  527. appendixIds: '',
  528. activities: [],
  529. approveStatus: '',
  530. vesselBankFlag: localStorage.getItem('ws-pf_vesselBankFlag')
  531. }
  532. },
  533. created () { },
  534. mounted () {
  535. document.getElementById('addConstuctionReport').style.cssText =
  536. 'width:100%;background-color: white;position:absolute;overflow-y:scroll;height:' +
  537. (document.body.clientHeight - 40) +
  538. 'px'
  539. if (this.callbackdata) {
  540. this.editFlag = this.callbackdata
  541. getReportInfoById({
  542. id: localStorage.getItem('ws_dynamicReport_id')
  543. }).toPromise().then(response => {
  544. this.shipMan = response
  545. if (this.shipMan.appendixFileUrls) {
  546. this.appendixIds = this.shipMan.appendixFileUrls // 用于回显
  547. this.oldAppendixIds = this.shipMan.appendixFileUrls // 用于下一次点击保存给saveFiles接口传参
  548. }
  549. // 操作历史
  550. getDynamicHistorys({
  551. id: response.id
  552. }).toPromise().then(response => {
  553. this.activities = response
  554. })
  555. })
  556. }
  557. if (this.authFlag) {
  558. this.auth = this.authFlag
  559. }
  560. this.initData()
  561. },
  562. methods: {
  563. editData () {
  564. this.editFlag = true
  565. getReportInfoById({ id: this.id }).toPromise().then(response => {
  566. this.shipMan = response
  567. if (this.shipMan.appendixFileUrls) {
  568. this.appendixIds = this.shipMan.appendixFileUrls // 用于回显
  569. this.oldAppendixIds = this.shipMan.appendixFileUrls // 用于下一次点击保存给saveFiles接口传参
  570. }
  571. // 操作历史
  572. getDynamicHistorys({
  573. id: response.id
  574. }).toPromise().then(response => {
  575. this.activities = response
  576. })
  577. })
  578. },
  579. initData () {
  580. // 所属船舶
  581. this.shipList = JSON.parse(localStorage.getItem('ws-pf_vessels'))
  582. if (this.vesselBankFlag == 'V') {
  583. this.shipMan.vesselId = localStorage.getItem('ws-pf_vesselId')
  584. this.shipMan.vesselName = this.shipList.find(
  585. item => this.shipMan.vesselId == item.vesselId
  586. ).vesselName
  587. }
  588. parameterTenantQuery({
  589. compId: this.compId,
  590. constCode: 'NOON_REPORT_TYPE'
  591. }).toPromise().then(response => {
  592. this.typeList = response
  593. })
  594. queryItems({ categoryCode: 'TIME_ZONE' }).toPromise().then(response => {
  595. this.timeList = response
  596. })
  597. },
  598. vesselChange () {
  599. const arrat = JSON.parse(JSON.stringify(this.shipList))
  600. let findVessel = arrat.find((item, index, arr) => {
  601. return item.vesselId == this.shipMan.vesselId
  602. })
  603. this.shipMan.vesselName = findVessel.vesselName
  604. },
  605. // 展开状态
  606. openState (key) {
  607. this.openMsg[key].state = !this.openMsg[key].state
  608. if (this.openMsg[key].state) {
  609. this.openMsg[key].value = '收起'
  610. } else {
  611. this.openMsg[key].value = '展开'
  612. }
  613. },
  614. // 保存接口
  615. saveData () {
  616. return new Promise(resolve => {
  617. this.$refs['shipMan'].validate(valid => {
  618. if (valid) {
  619. saveDynamicReport(this.shipMan).toPromise().then(response => {
  620. this.id = response
  621. resolve('ok')
  622. })
  623. } else {
  624. EventBus.$emit('error', this.$t('deploy.enterRequireData'))
  625. }
  626. })
  627. })
  628. },
  629. saveDataChild (resolve) {
  630. this.saveData().then(value => {
  631. if (value == 'ok') {
  632. resolve('yes')
  633. EventBus.$emit('success', '保存成功')
  634. this.editData()
  635. }
  636. })
  637. },
  638. save () {
  639. return new Promise(resolve => {
  640. this.$refs.upload.handleSaveBill().then(res => {
  641. this.shipMan.appendixFileUrls = res
  642. this.saveDataChild(resolve)
  643. })
  644. })
  645. },
  646. submitData () {
  647. let that = this
  648. submitDynamicReport(that.$qs.stringify({ id: this.id })).toPromise().then(
  649. response => {
  650. that.$router.push({ name: 'dynamicReportView' })
  651. }
  652. )
  653. },
  654. submit () {
  655. this.$refs['shipMan'].validate(valid => {
  656. if (valid) {
  657. let that = this
  658. that
  659. .$confirm(
  660. that.$t('deploy.message02'),
  661. that.$t('showMessage.hint'),
  662. {
  663. confirmButtonText: that.$t('showMessage.confirm'),
  664. cancelButtonText: that.$t('showMessage.cancel'),
  665. type: 'warning'
  666. }
  667. )
  668. .then(() => {
  669. that.save().then(val => {
  670. if (val == 'yes') {
  671. that.submitData()
  672. }
  673. })
  674. })
  675. } else {
  676. EventBus.$emit('error', this.$t('deploy.enterRequireData'))
  677. }
  678. })
  679. },
  680. back () {
  681. this.$router.back(-1)
  682. },
  683. onChange (files) {
  684. this.newAppendixs = files
  685. this.onChangeFlag = true
  686. },
  687. confirm () {
  688. let that = this
  689. that
  690. .$confirm(
  691. '确认后将不能更改,确认提交吗?',
  692. that.$t('showMessage.hint'),
  693. {
  694. confirmButtonText: that.$t('showMessage.confirm'),
  695. cancelButtonText: that.$t('showMessage.cancel'),
  696. type: 'warning'
  697. }
  698. )
  699. .then(() => {
  700. that.save().then(val => {
  701. if (val == 'yes') {
  702. saveConfirm(this.$qs.stringify({ id: this.shipMan.id })).toPromise().then(
  703. response => {
  704. EventBus.$emit('success', '确认成功')
  705. this.$router.push({ name: 'dynamicReportView' })
  706. }
  707. )
  708. }
  709. })
  710. })
  711. },
  712. refuse () {
  713. let that = this
  714. that
  715. .$confirm(
  716. '退回后将不能更改,确认提交吗?',
  717. that.$t('showMessage.hint'),
  718. {
  719. confirmButtonText: that.$t('showMessage.confirm'),
  720. cancelButtonText: that.$t('showMessage.cancel'),
  721. type: 'warning'
  722. }
  723. )
  724. .then(() => {
  725. saveReturn(this.$qs.stringify({ id: this.shipMan.id })).toPromise().then(
  726. response => {
  727. EventBus.$emit('success', '退回成功')
  728. this.$router.push({ name: 'dynamicReportView' })
  729. }
  730. )
  731. })
  732. }
  733. }
  734. }
  735. </script>
  736. <style lang="scss" scoped>
  737. .yhellipsis {
  738. width: 95%;
  739. }
  740. .frame {
  741. background-color: white;
  742. padding: 0px 15px 15px 1px;
  743. }
  744. .frameTitle {
  745. background-color: #fff;
  746. }
  747. .frameCenter {
  748. background-color: #fff;
  749. padding: 0px 15px 45px 15px;
  750. height: calc(100vh - 90px);
  751. overflow-y: auto;
  752. }
  753. .crewAddButton {
  754. height: 50px;
  755. line-height: 50px;
  756. padding-right: 10px;
  757. }
  758. .crewAddTitle {
  759. font-size: 16px;
  760. color: #333;
  761. font-weight: bold;
  762. height: 60px;
  763. line-height: 60px;
  764. }
  765. .left {
  766. float: left;
  767. }
  768. .right {
  769. font-size: 14px;
  770. font-weight: 500;
  771. cursor: pointer;
  772. float: right;
  773. }
  774. .crewAddTitleMsg::before {
  775. content: '▍';
  776. color: #1d6ced;
  777. }
  778. .uphead {
  779. margin-bottom: 10px;
  780. display: inline-block;
  781. position: relative;
  782. height: 60px;
  783. line-height: 60px;
  784. }
  785. .img {
  786. position: absolute;
  787. display: inline-block;
  788. height: 60px;
  789. width: 60px;
  790. border-radius: 50%;
  791. }
  792. .kyc-passin0 {
  793. font-size: 14px;
  794. margin-left: 70px;
  795. color: #666666;
  796. position: absolute;
  797. top: 14px;
  798. width: 80px;
  799. height: 30px;
  800. line-height: 30px;
  801. text-align: center;
  802. border: 1px solid #cccccc;
  803. border-radius: 5px;
  804. }
  805. .kyc-passin {
  806. width: 85px;
  807. opacity: 0;
  808. margin-left: 70px;
  809. }
  810. .talk {
  811. font-size: 12px;
  812. color: #999999;
  813. }
  814. .draw-enter-active,
  815. .draw-leave-active {
  816. transition: all 0.4s;
  817. }
  818. .draw-enter,
  819. .draw-leave-active {
  820. transform: translateY(-45px);
  821. opacity: 0;
  822. }
  823. .add {
  824. margin-right: 15px;
  825. }
  826. .add,
  827. .openClose {
  828. display: inline-block;
  829. }
  830. /deep/ .edit-input .el-input__inner {
  831. width: 95%;
  832. }
  833. .certificateEdit .el-input--medium {
  834. border-left: none;
  835. }
  836. .el-dialog__body {
  837. padding: 10px;
  838. }
  839. .Yhsearch {
  840. margin-bottom: 10px;
  841. }
  842. .divIcon {
  843. display: inline-block;
  844. }
  845. .editBtn {
  846. margin-right: 10px;
  847. }
  848. .rightDiv {
  849. width: 5%;
  850. float: right;
  851. }
  852. /deep/ .el-time-panel {
  853. margin: 5px -27px !important;
  854. }
  855. </style>