addConstructionReport.vue 42 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158
  1. <!-- 施工报-->
  2. <template>
  3. <div class="frame"
  4. id="addConstuctionReport">
  5. <div style="height: 50px"
  6. v-if="editFlag">
  7. <auditFlow show-history-flag="true"
  8. :activities="activities"
  9. :message="approveStatus"
  10. :billNo="shipMan.status" />
  11. </div>
  12. <div class="app-container input-form">
  13. <ws-form :model="shipMan"
  14. label-width="30%"
  15. :show-message="false"
  16. ref="shipMan"
  17. :rules="rules">
  18. <div class="crewAddTitle clearfix"
  19. style="margin-top:1px">
  20. <div class="left">
  21. <span class="crewAddTitleMsg">基本信息(施工报)</span>
  22. </div>
  23. <div class="right">
  24. <ws-button type="primary"
  25. class="editBtn"
  26. @click="submit"
  27. v-if="!auth">提 交</ws-button>
  28. <ws-button type="primary"
  29. class="editBtn"
  30. @click="confirm"
  31. v-if="auth">确 认</ws-button>
  32. <ws-button type="primary"
  33. class="editBtn"
  34. @click="refuse"
  35. v-if="auth">退 回</ws-button>
  36. <ws-button type="primary"
  37. class="editBtn"
  38. @click="save">保 存</ws-button>
  39. <ws-button class="editBtn"
  40. @click="back">返 回</ws-button>
  41. <div class="divIcon"
  42. @click="openState(openMsg[0].key)">
  43. <i v-show="openMsg[0].state"
  44. class="iconfont iconopen" />
  45. <i v-show="!openMsg[0].state"
  46. class="iconfont iconclose" />
  47. <!-- <svg-icon class="openCloseIcon" v-show="openMsg[0].state" icon-class="open" />-->
  48. <!-- <svg-icon class="openCloseIcon" v-show="!openMsg[0].state" icon-class="close" />-->
  49. <span class="openClose">{{ openMsg[0].value }}</span>
  50. </div>
  51. </div>
  52. </div>
  53. <transition name="draw">
  54. <div v-show="openMsg[0].state"
  55. class="crewMsg">
  56. <ws-info-table>
  57. <ws-form-item span="1"
  58. label="报告类型"
  59. class="labelDiv"
  60. prop="reportTypeId">
  61. <ws-select :placeholder="$t('common.selected')"
  62. v-model="shipMan.reportTypeId"
  63. disabled>
  64. <ws-option v-for="item in typeList"
  65. :key="item.parameterKey"
  66. :label="item.parameterValue"
  67. :value="item.parameterKey">
  68. </ws-option>
  69. </ws-select>
  70. </ws-form-item>
  71. <ws-form-item span="1"
  72. label="船舶名称"
  73. class="labelDiv"
  74. prop="vesselId">
  75. <!-- <ws-select :placeholder="$t('common.selected')"
  76. v-model="shipMan.vesselId"
  77. clearable
  78. @change="vesselChange"
  79. :disabled="editFlag || vesselBankFlag == 'V'"
  80. filterable>
  81. <ws-option v-for="item in shipList"
  82. :key="item.vesselId"
  83. :label="item.vesselName"
  84. :value="item.vesselId"></ws-option>
  85. </ws-select> -->
  86. <BaseShipSelect v-model="shipMan.vesselId"
  87. :disabled="editFlag || vesselBankFlag == 'V'"
  88. filterable
  89. :placeholder="$t('common.selected')"
  90. :showAll="false"
  91. clearable
  92. :remote="true"
  93. @change="vesselChange"
  94. style="width:100%;"></BaseShipSelect>
  95. </ws-form-item>
  96. <ws-form-item span="1"
  97. label="船舶呼号"
  98. class="labelDiv"
  99. prop="callSign">
  100. <ws-input :placeholder="$t('common.input')"
  101. v-model.trim="shipMan.callSign"
  102. maxlength="50"></ws-input>
  103. </ws-form-item>
  104. <ws-form-item span="1"
  105. label="报告日期"
  106. class="labelDiv"
  107. prop="reportDate">
  108. <ws-date-picker v-model="shipMan.reportDate"
  109. type="date"
  110. :placeholder="$t('common.selected')"
  111. value-format="yyyy-MM-dd"
  112. format="yyyy.MM.dd">
  113. </ws-date-picker>
  114. </ws-form-item>
  115. <ws-form-item span="1"
  116. label="时区"
  117. class="labelDiv"
  118. prop="timeZone">
  119. <ws-select :placeholder="$t('common.selected')"
  120. v-model="shipMan.timeZone"
  121. clearable>
  122. <ws-option v-for="item in timeList"
  123. :key="item.dictionaryItemId"
  124. :label="item.dictionaryItemName"
  125. :value="item.dictionaryItemName"></ws-option>
  126. </ws-select>
  127. </ws-form-item>
  128. <ws-form-item span="1"
  129. label="船舶状态"
  130. class="labelDiv"
  131. prop="shipStatus">
  132. <ws-input :placeholder="$t('common.input')"
  133. v-model.trim="shipMan.shipStatus"
  134. maxlength="50"></ws-input>
  135. </ws-form-item>
  136. <ws-form-item span="1"
  137. label="施工地点"
  138. class="labelDiv">
  139. <ws-input :placeholder="$t('common.input')"
  140. v-model.trim="shipMan.constructionSite"
  141. maxlength="50"></ws-input>
  142. </ws-form-item>
  143. <ws-form-item span="1"
  144. label="备注"
  145. class="labelDiv">
  146. <ws-input :placeholder="$t('common.input')"
  147. v-model.trim="shipMan.remarks"
  148. maxlength="50"></ws-input>
  149. </ws-form-item>
  150. </ws-info-table>
  151. </div>
  152. </transition>
  153. <div class="crewAddTitle clearfix">
  154. <div class="left">
  155. <span class="crewAddTitleMsg">天气及施工信息</span>
  156. </div>
  157. <div class="right"
  158. @click="openState(openMsg[1].key)">
  159. <i v-show="openMsg[1].state"
  160. class="iconfont iconopen" />
  161. <i v-show="!openMsg[1].state"
  162. class="iconfont iconclose" />
  163. <!-- <svg-icon class="openCloseIcon" v-show="openMsg[1].state" icon-class="open" />-->
  164. <!-- <svg-icon class="openCloseIcon" v-show="!openMsg[1].state" icon-class="close" />-->
  165. <span class="openClose">{{ openMsg[1].value }}</span>
  166. </div>
  167. </div>
  168. <transition name="draw">
  169. <div v-show="openMsg[1].state"
  170. class="crewMsg">
  171. <ws-info-table>
  172. <ws-form-item span="1"
  173. label="海况">
  174. <ws-input :placeholder="$t('common.input')"
  175. v-model.trim="shipMan.reportDetail.sea"
  176. maxlength="50"></ws-input>
  177. </ws-form-item>
  178. <ws-form-item span="1"
  179. label="浪高">
  180. <ws-input :placeholder="$t('common.input')"
  181. v-model.trim="shipMan.reportDetail.swell"
  182. maxlength="50"></ws-input>
  183. </ws-form-item>
  184. <ws-form-item span="1"
  185. label="天气及视距">
  186. <ws-input :placeholder="$t('common.input')"
  187. v-model.trim="shipMan.reportDetail.weatherStadia"
  188. maxlength="50"></ws-input>
  189. </ws-form-item>
  190. <ws-form-item span="1"
  191. label="风向及风力">
  192. <ws-input :placeholder="$t('common.input')"
  193. v-model.trim="shipMan.reportDetail.windDirection"
  194. maxlength="50"></ws-input>
  195. </ws-form-item>
  196. <ws-form-item span="1"
  197. label="施工区段">
  198. <ws-input :placeholder="$t('common.input')"
  199. v-model.trim="shipMan.reportDetail.constructionSection"
  200. maxlength="50"></ws-input>
  201. </ws-form-item>
  202. <ws-form-item span="1"
  203. label="工程量">
  204. <div>
  205. <ws-input v-leave-num-only
  206. style="width:95%"
  207. :placeholder="$t('common.input')"
  208. v-model.trim="shipMan.reportDetail.quantityWork"
  209. maxlength="50"
  210. clearable></ws-input>
  211. <div class="rightDiv">m³</div>
  212. </div>
  213. </ws-form-item>
  214. <ws-form-item span="1"
  215. label="船次">
  216. <ws-input :placeholder="$t('common.input')"
  217. v-model.trim="shipMan.reportDetail.shipTimes"
  218. maxlength="50"></ws-input>
  219. </ws-form-item>
  220. <ws-form-item span="1"
  221. label="停工时长">
  222. <div>
  223. <ws-input v-leave-num-only
  224. style="width:95%"
  225. :placeholder="$t('common.input')"
  226. v-model.trim="shipMan.reportDetail.downtime"
  227. maxlength="50"></ws-input>
  228. <div class="rightDiv">h</div>
  229. </div>
  230. </ws-form-item>
  231. <ws-form-item span="1"
  232. label="停工原因">
  233. <ws-input :placeholder="$t('common.input')"
  234. v-model.trim="shipMan.reportDetail.downtimeReasons"
  235. maxlength="50"></ws-input>
  236. </ws-form-item>
  237. <ws-form-item span="1"
  238. label="生产时长">
  239. <div>
  240. <ws-input v-leave-num-only
  241. style="width:95%"
  242. :placeholder="$t('common.input')"
  243. v-model.trim="shipMan.reportDetail.runningTime"
  244. maxlength="50"></ws-input>
  245. <div class="rightDiv">h</div>
  246. </div>
  247. </ws-form-item>
  248. <ws-form-item span="1"
  249. label="主机(左)运转时长">
  250. <div>
  251. <ws-input v-leave-num-only
  252. style="width:95%"
  253. :placeholder="$t('common.input')"
  254. v-model.trim="shipMan.reportDetail.hostLeftRunningTime"
  255. maxlength="50"></ws-input>
  256. <div class="rightDiv">h</div>
  257. </div>
  258. </ws-form-item>
  259. <ws-form-item span="1"
  260. label="主机(右)运转时长">
  261. <div>
  262. <ws-input v-leave-num-only
  263. style="width:95%"
  264. :placeholder="$t('common.input')"
  265. v-model.trim="shipMan.reportDetail.hostRightRunningTime"
  266. maxlength="50"></ws-input>
  267. <div class="rightDiv">h</div>
  268. </div>
  269. </ws-form-item>
  270. <ws-form-item span="1"
  271. label="副机运转时长">
  272. <ws-input v-leave-num-only
  273. :placeholder="$t('common.input')"
  274. v-model.trim="
  275. shipMan.reportDetail.secondaryMachineRunningTime
  276. "
  277. maxlength="50"></ws-input>
  278. </ws-form-item>
  279. </ws-info-table>
  280. </div>
  281. </transition>
  282. <transition name="draw">
  283. <div class="crewAddTitle clearfix">
  284. <div class="left">
  285. <span class="crewAddTitleMsg">油水存量、消耗及接收信息</span>
  286. </div>
  287. <div class="right"
  288. @click="openState(openMsg[2].key)">
  289. <i v-show="openMsg[2].state"
  290. class="iconfont iconopen" />
  291. <i v-show="!openMsg[2].state"
  292. class="iconfont iconclose" />
  293. <!--<svg-icon class="openCloseIcon" v-show="openMsg[2].state" icon-class="open" />-->
  294. <!--<svg-icon class="openCloseIcon" v-show="!openMsg[2].state" icon-class="close" />-->
  295. <span class="openClose">{{ openMsg[2].value }}</span>
  296. </div>
  297. </div>
  298. </transition>
  299. <div class="crewAddTitle clearfix">
  300. <div class="left">
  301. <span class="crewAddTitleMsg">天气及施工信息</span>
  302. </div>
  303. <div class="right"
  304. @click="openState(openMsg[1].key)">
  305. <i v-show="openMsg[1].state"
  306. class="iconfont iconopen"
  307. style="font-size: 14px;" />
  308. <i v-show="!openMsg[1].state"
  309. class="iconfont iconclose"
  310. style="font-size: 14px;" />
  311. <!-- <svg-icon class="openCloseIcon" v-show="openMsg[1].state" icon-class="open" />-->
  312. <!-- <svg-icon class="openCloseIcon" v-show="!openMsg[1].state" icon-class="close" />-->
  313. <span class="openClose">{{ openMsg[1].value }}</span>
  314. </div>
  315. </div>
  316. <transition name="draw">
  317. <div v-show="openMsg[1].state"
  318. class="crewMsg">
  319. <ws-info-table>
  320. <ws-form-item span="1"
  321. label="海况">
  322. <ws-input :placeholder="$t('common.input')"
  323. v-model.trim="shipMan.reportDetail.sea"
  324. maxlength="50"></ws-input>
  325. </ws-form-item>
  326. <ws-form-item span="1"
  327. label="浪高">
  328. <ws-input :placeholder="$t('common.input')"
  329. v-model.trim="shipMan.reportDetail.swell"
  330. maxlength="50"></ws-input>
  331. </ws-form-item>
  332. <ws-form-item span="1"
  333. label="天气及视距">
  334. <ws-input :placeholder="$t('common.input')"
  335. v-model.trim="shipMan.reportDetail.weatherStadia"
  336. maxlength="50"></ws-input>
  337. </ws-form-item>
  338. <ws-form-item span="1"
  339. label="风向及风力">
  340. <ws-input :placeholder="$t('common.input')"
  341. v-model.trim="shipMan.reportDetail.windDirection"
  342. maxlength="50"></ws-input>
  343. </ws-form-item>
  344. <ws-form-item span="1"
  345. label="施工区段">
  346. <ws-input :placeholder="$t('common.input')"
  347. v-model.trim="shipMan.reportDetail.constructionSection"
  348. maxlength="50"></ws-input>
  349. </ws-form-item>
  350. <ws-form-item span="1"
  351. label="工程量">
  352. <div>
  353. <ws-input v-leave-num-only
  354. style="width:95%"
  355. :placeholder="$t('common.input')"
  356. v-model.trim="shipMan.reportDetail.quantityWork"
  357. maxlength="50"
  358. clearable></ws-input>
  359. <div class="rightDiv">m³</div>
  360. </div>
  361. </ws-form-item>
  362. <ws-form-item span="1"
  363. label="船次">
  364. <ws-input :placeholder="$t('common.input')"
  365. v-model.trim="shipMan.reportDetail.shipTimes"
  366. maxlength="50"></ws-input>
  367. </ws-form-item>
  368. <ws-form-item span="1"
  369. label="停工时长">
  370. <div>
  371. <ws-input v-leave-num-only
  372. style="width:95%"
  373. :placeholder="$t('common.input')"
  374. v-model.trim="shipMan.reportDetail.downtime"
  375. maxlength="50"></ws-input>
  376. <div class="rightDiv">h</div>
  377. </div>
  378. </ws-form-item>
  379. <ws-form-item span="1"
  380. label="停工原因">
  381. <ws-input :placeholder="$t('common.input')"
  382. v-model.trim="shipMan.reportDetail.downtimeReasons"
  383. maxlength="50"></ws-input>
  384. </ws-form-item>
  385. <ws-form-item span="1"
  386. label="生产时长">
  387. <div>
  388. <ws-input v-leave-num-only
  389. style="width:95%"
  390. :placeholder="$t('common.input')"
  391. v-model.trim="shipMan.reportDetail.runningTime"
  392. maxlength="50"></ws-input>
  393. <div class="rightDiv">h</div>
  394. </div>
  395. </ws-form-item>
  396. <ws-form-item span="1"
  397. label="主机(左)运转时长">
  398. <div>
  399. <ws-input v-leave-num-only
  400. style="width:95%"
  401. :placeholder="$t('common.input')"
  402. v-model.trim="shipMan.reportDetail.hostLeftRunningTime"
  403. maxlength="50"></ws-input>
  404. <div class="rightDiv">h</div>
  405. </div>
  406. </ws-form-item>
  407. <ws-form-item span="1"
  408. label="主机(右)运转时长">
  409. <div>
  410. <ws-input v-leave-num-only
  411. style="width:95%"
  412. :placeholder="$t('common.input')"
  413. v-model.trim="shipMan.reportDetail.hostRightRunningTime"
  414. maxlength="50"></ws-input>
  415. <div class="rightDiv">h</div>
  416. </div>
  417. </ws-form-item>
  418. <ws-form-item span="1"
  419. label="副机运转时长">
  420. <ws-input v-leave-num-only
  421. :placeholder="$t('common.input')"
  422. v-model.trim="
  423. shipMan.reportDetail.secondaryMachineRunningTime
  424. "
  425. maxlength="50"></ws-input>
  426. </ws-form-item>
  427. </ws-info-table>
  428. </div>
  429. </transition>
  430. <div class="crewAddTitle clearfix">
  431. <div class="left">
  432. <span class="crewAddTitleMsg">油水存量、消耗及接收信息</span>
  433. </div>
  434. <div class="right"
  435. @click="openState(openMsg[2].key)">
  436. <i v-show="openMsg[2].state"
  437. class="iconfont iconopen"
  438. style="font-size: 14px;" />
  439. <i v-show="!openMsg[2].state"
  440. class="iconfont iconclose"
  441. style="font-size: 14px;" />
  442. <!-- <svg-icon class="openCloseIcon" v-show="openMsg[2].state" icon-class="open" />-->
  443. <!-- <svg-icon class="openCloseIcon" v-show="!openMsg[2].state" icon-class="close" />-->
  444. <span class="openClose">{{ openMsg[2].value }}</span>
  445. </div>
  446. </div>
  447. <transition name="draw">
  448. <div v-show="openMsg[2].state"
  449. class="crewMsg">
  450. <ws-info-table>
  451. <ws-form-item span="1"
  452. label="重油补给">
  453. <div>
  454. <ws-input v-leave-num-only
  455. style="width:95%"
  456. :placeholder="$t('common.input')"
  457. v-model.trim="shipMan.reportDetail.heavyOilSupply"
  458. maxlength="50"></ws-input>
  459. <div class="rightDiv">MT</div>
  460. </div>
  461. </ws-form-item>
  462. <ws-form-item span="1"
  463. label="轻油补给">
  464. <div>
  465. <ws-input v-leave-num-only
  466. style="width:95%"
  467. :placeholder="$t('common.input')"
  468. v-model.trim="shipMan.reportDetail.lightOilSupply"
  469. maxlength="50"
  470. ws></ws-input>
  471. <div class="rightDiv">MT</div>
  472. </div>
  473. </ws-form-item>
  474. <ws-form-item span="1"
  475. label="重油消耗">
  476. <div>
  477. <ws-input v-leave-num-only
  478. style="width:95%"
  479. :placeholder="$t('common.input')"
  480. v-model.trim="shipMan.reportDetail.heavyOilDeplete"
  481. maxlength="50"></ws-input>
  482. <div class="rightDiv">MT</div>
  483. </div>
  484. </ws-form-item>
  485. <ws-form-item span="1"
  486. label="轻油消耗">
  487. <div>
  488. <ws-input v-leave-num-only
  489. style="width:95%"
  490. :placeholder="$t('common.input')"
  491. v-model.trim="shipMan.reportDetail.lightOilDeplete"
  492. maxlength="50"></ws-input>
  493. <div class="rightDiv">MT</div>
  494. </div>
  495. </ws-form-item>
  496. <ws-form-item span="1"
  497. label="重油存量">
  498. <div>
  499. <ws-input v-leave-num-only
  500. style="width:95%"
  501. :placeholder="$t('common.input')"
  502. v-model.trim="shipMan.reportDetail.heavyOilStock"
  503. maxlength="50"></ws-input>
  504. <div class="rightDiv">MT</div>
  505. </div>
  506. </ws-form-item>
  507. <ws-form-item span="1"
  508. label="轻油存量">
  509. <div>
  510. <ws-input v-leave-num-only
  511. style="width:95%"
  512. :placeholder="$t('common.input')"
  513. v-model.trim="shipMan.reportDetail.lightOilStock"
  514. maxlength="50"></ws-input>
  515. <div class="rightDiv">MT</div>
  516. </div>
  517. </ws-form-item>
  518. <ws-form-item span="1"
  519. label="主机系统油补给">
  520. <div>
  521. <ws-input style="width:95%"
  522. :placeholder="$t('common.input')"
  523. v-leave-num-only
  524. v-model.trim="shipMan.reportDetail.mainOilSupply"
  525. maxlength="50"></ws-input>
  526. <div class="rightDiv">L</div>
  527. </div>
  528. </ws-form-item>
  529. <ws-form-item span="1"
  530. label="副机系统油补给">
  531. <div>
  532. <ws-input style="width:95%"
  533. :placeholder="$t('common.input')"
  534. v-leave-num-only
  535. v-model.trim="shipMan.reportDetail.auxiliaryOilSupply"
  536. maxlength="50"></ws-input>
  537. <div class="rightDiv">L</div>
  538. </div>
  539. </ws-form-item>
  540. <ws-form-item span="1"
  541. label="主机系统油消耗">
  542. <div>
  543. <ws-input style="width:95%"
  544. :placeholder="$t('common.input')"
  545. v-leave-num-only
  546. v-model.trim="shipMan.reportDetail.mainOilDeplete"
  547. maxlength="50"></ws-input>
  548. <div class="rightDiv">L</div>
  549. </div>
  550. </ws-form-item>
  551. <ws-form-item span="1"
  552. label="副机系统油消耗">
  553. <div>
  554. <ws-input style="width:95%"
  555. :placeholder="$t('common.input')"
  556. v-leave-num-only
  557. v-model.trim="shipMan.reportDetail.auxiliaryOilDeplete"
  558. maxlength="50"></ws-input>
  559. <div class="rightDiv">L</div>
  560. </div>
  561. </ws-form-item>
  562. <ws-form-item span="1"
  563. label="主机系统油存量">
  564. <div>
  565. <ws-input style="width:95%"
  566. :placeholder="$t('common.input')"
  567. v-leave-num-only
  568. v-model.trim="shipMan.reportDetail.mainOilStock"
  569. maxlength="50"></ws-input>
  570. <div class="rightDiv">L</div>
  571. </div>
  572. </ws-form-item>
  573. <ws-form-item span="1"
  574. label="副机系统油存量">
  575. <div>
  576. <ws-input style="width:95%"
  577. :placeholder="$t('common.input')"
  578. v-leave-num-only
  579. v-model.trim="shipMan.reportDetail.auxiliaryOilStock"
  580. maxlength="50"></ws-input>
  581. <div class="rightDiv">L</div>
  582. </div>
  583. </ws-form-item>
  584. <ws-form-item span="1"
  585. label="主机重油消耗">
  586. <div>
  587. <ws-input style="width:95%"
  588. :placeholder="$t('common.input')"
  589. v-leave-num-only
  590. v-model.trim="shipMan.reportDetail.mainHeavyOilSupply"
  591. maxlength="50"></ws-input>
  592. <div class="rightDiv">MT</div>
  593. </div>
  594. </ws-form-item>
  595. <ws-form-item span="1"
  596. label="主机轻油消耗">
  597. <div>
  598. <ws-input style="width:95%"
  599. :placeholder="$t('common.input')"
  600. v-leave-num-only
  601. v-model.trim="shipMan.reportDetail.mainLightOilSupply"
  602. maxlength="50"></ws-input>
  603. <div class="rightDiv">MT</div>
  604. </div>
  605. </ws-form-item>
  606. <ws-form-item span="1"
  607. label="副机轻油消耗">
  608. <div>
  609. <ws-input style="width:95%"
  610. :placeholder="$t('common.input')"
  611. v-model.trim="shipMan.reportDetail.auxiliaryLightOilSupply"
  612. maxlength="50"></ws-input>
  613. <div class="rightDiv">MT</div>
  614. </div>
  615. </ws-form-item>
  616. <ws-form-item span="1"
  617. label="日用淡水补给">
  618. <div>
  619. <ws-input style="width:95%"
  620. :placeholder="$t('common.input')"
  621. v-leave-num-only
  622. v-model.trim="shipMan.reportDetail.dailyWaterSupply"
  623. maxlength="50"></ws-input>
  624. <div class="rightDiv">MT</div>
  625. </div>
  626. </ws-form-item>
  627. <ws-form-item span="1"
  628. label="日用淡水消耗">
  629. <div>
  630. <ws-input style="width:95%"
  631. :placeholder="$t('common.input')"
  632. v-leave-num-only
  633. v-model.trim="shipMan.reportDetail.dailyWaterDeplete"
  634. maxlength="50"></ws-input>
  635. <div class="rightDiv">MT</div>
  636. </div>
  637. </ws-form-item>
  638. <ws-form-item span="1"
  639. label="日用淡水存量">
  640. <div>
  641. <ws-input style="width:95%"
  642. :placeholder="$t('common.input')"
  643. v-leave-num-only
  644. v-model.trim="shipMan.reportDetail.dailyWaterStock"
  645. maxlength="50"></ws-input>
  646. <div class="rightDiv">MT</div>
  647. </div>
  648. </ws-form-item>
  649. </ws-info-table>
  650. </div>
  651. </transition>
  652. <div class="crewAddTitle clearfix">
  653. <div class="left">
  654. <span class="crewAddTitleMsg">附件</span>
  655. </div>
  656. </div>
  657. <transition name="draw">
  658. <div class="crewMsg">
  659. <div>
  660. <ws-upload ref="upload"
  661. table-name="noonreport_dynamic_report_info"
  662. oss-key="deploy"
  663. :vesselId="my_VesselId ? my_VesselId : ''"
  664. :comp-id="compId"
  665. :appendix-ids="appendixIds" />
  666. </div>
  667. </div>
  668. </transition>
  669. </ws-form>
  670. </div>
  671. </div>
  672. </template>
  673. <script>
  674. import {
  675. parameterTenantQuery,
  676. queryItems,
  677. saveDynamicReport,
  678. submitDynamicReport,
  679. getReportInfoById,
  680. saveConfirm,
  681. saveReturn,
  682. getDynamicHistorys
  683. } from '@/model/crew/index'
  684. import WsUpload from '@/components/WsUpload'
  685. import auditFlow from '@/components/WinseaCom/auditFlow.vue'
  686. import { EventBus } from 'base-core-lib'
  687. export default {
  688. components: { WsUpload, auditFlow },
  689. name: 'addConstructionReport',
  690. props: ['callbackdata', 'authFlag'],
  691. data () {
  692. return {
  693. my_VesselId: localStorage.getItem('ws-pf_vesselId'),
  694. openMsg: [
  695. {
  696. key: 0,
  697. value: '收起',
  698. state: true
  699. },
  700. {
  701. key: 1,
  702. value: '收起',
  703. state: true
  704. },
  705. {
  706. key: 2,
  707. value: '收起',
  708. state: true
  709. },
  710. {
  711. key: 3,
  712. value: '收起',
  713. state: true
  714. }
  715. ],
  716. shipMan: {
  717. id: '',
  718. reportTypeId: '1', //报告类型ID
  719. reportType: '施工报', //报告类型
  720. vesselId: '', //船舶ID
  721. vesselName: '', //船舶
  722. sailingStatusId: '',
  723. sailingStatus: '',
  724. callSign: '', //呼号
  725. timeZone: '', //时区
  726. shipStatus: '施工', //船舶状态
  727. remarks: '', //备注
  728. constructionSite: '', //施工地点
  729. previousProjectPort: '',
  730. nextProjectPort: '',
  731. reportDate: '', //报告日期
  732. reporter: '',
  733. appendixFileUrls: '',
  734. // 动态报明细
  735. reportDetail: {
  736. sea: '',
  737. swell: '',
  738. weatherStadia: '',
  739. windDirection: '',
  740. constructionSection: '',
  741. quantityWork: '',
  742. shipTimes: '',
  743. downtimeReasons: '',
  744. downtime: '',
  745. runningTime: '',
  746. hostLeftRunningTime: '',
  747. hostRightRunningTime: '',
  748. secondaryMachineRunningTime: '',
  749. heavyOilSupply: '',
  750. lightOilSupply: '',
  751. heavyOilDeplete: '',
  752. lightOilDeplete: '',
  753. heavyOilStock: '',
  754. lightOilStock: '',
  755. mainOilSupply: '',
  756. auxiliaryOilSupply: '',
  757. mainOilDeplete: '',
  758. auxiliaryOilDeplete: '',
  759. mainOilStock: '',
  760. auxiliaryOilStock: '',
  761. dailyWaterSupply: '',
  762. dailyWaterDeplete: '',
  763. dailyWaterStock: '',
  764. auxiliaryLightOilSupply: ''
  765. }
  766. },
  767. typeList: [],
  768. shipList: [],
  769. timeList: [],
  770. compId: localStorage.getItem('ws-pf_compId'),
  771. rules: {
  772. reportTypeId: [
  773. {
  774. required: true,
  775. message: '请输入优惠政策名称',
  776. trigger: ['blur', 'change']
  777. }
  778. ],
  779. vesselId: [
  780. {
  781. required: true,
  782. message: '请输入优惠政策名称',
  783. trigger: ['blur', 'change']
  784. }
  785. ],
  786. callSign: [
  787. {
  788. required: true,
  789. message: '请输入优惠政策名称',
  790. trigger: ['blur', 'change']
  791. }
  792. ],
  793. timeZone: [
  794. {
  795. required: true,
  796. message: '请输入优惠政策名称',
  797. trigger: ['blur', 'change']
  798. }
  799. ],
  800. shipStatus: [
  801. {
  802. required: true,
  803. message: '请输入优惠政策名称',
  804. trigger: ['blur', 'change']
  805. }
  806. ],
  807. reportDate: [
  808. {
  809. required: true,
  810. message: '请输入优惠政策名称',
  811. trigger: ['blur', 'change']
  812. }
  813. ]
  814. },
  815. id: '',
  816. editFlag: false,
  817. auth: false,
  818. // 新上传
  819. oldAppendixIds: '',
  820. newAppendixs: [],
  821. onChangeFlag: false,
  822. appendixIds: '',
  823. activities: [],
  824. approveStatus: '',
  825. vesselBankFlag: localStorage.getItem('ws-pf_vesselBankFlag')
  826. }
  827. },
  828. created () { },
  829. mounted () {
  830. document.getElementById('addConstuctionReport').style.cssText =
  831. 'width:100%;background-color: white;position:absolute;overflow-y:scroll;height:' +
  832. (document.body.clientHeight - 40) +
  833. 'px'
  834. if (this.callbackdata) {
  835. this.editFlag = this.callbackdata
  836. getReportInfoById({
  837. id: localStorage.getItem('ws_dynamicReport_id')
  838. }).toPromise().then(response => {
  839. this.shipMan = response
  840. if (this.shipMan.appendixFileUrls) {
  841. this.appendixIds = this.shipMan.appendixFileUrls // 用于回显
  842. this.oldAppendixIds = this.shipMan.appendixFileUrls // 用于下一次点击保存给saveFiles接口传参
  843. }
  844. // 操作历史
  845. getDynamicHistorys({
  846. id: response.id
  847. }).toPromise().then(response => {
  848. this.activities = response
  849. })
  850. })
  851. }
  852. if (this.authFlag) {
  853. this.auth = this.authFlag
  854. }
  855. this.initData()
  856. },
  857. methods: {
  858. editData () {
  859. this.editFlag = true
  860. getReportInfoById({ id: this.id }).toPromise().then(response => {
  861. this.shipMan = response
  862. if (this.shipMan.appendixFileUrls) {
  863. this.appendixIds = this.shipMan.appendixFileUrls // 用于回显
  864. this.oldAppendixIds = this.shipMan.appendixFileUrls // 用于下一次点击保存给saveFiles接口传参
  865. }
  866. // 操作历史
  867. getDynamicHistorys({
  868. id: response.id
  869. }).toPromise().then(response => {
  870. this.activities = response
  871. })
  872. })
  873. },
  874. initData () {
  875. // 所属船舶
  876. this.shipList = JSON.parse(localStorage.getItem('ws-pf_vessels'))
  877. if (this.vesselBankFlag == 'V') {
  878. this.shipMan.vesselId = localStorage.getItem('ws-pf_vesselId')
  879. this.shipMan.vesselName = this.shipList.find(
  880. item => this.shipMan.vesselId == item.vesselId
  881. ).vesselName
  882. }
  883. parameterTenantQuery({
  884. compId: this.compId,
  885. constCode: 'NOON_REPORT_TYPE'
  886. }).toPromise().then(response => {
  887. this.typeList = response
  888. })
  889. queryItems({ categoryCode: 'TIME_ZONE' })
  890. .toPromise()
  891. .then(response => {
  892. this.timeList = response
  893. })
  894. },
  895. vesselChange () {
  896. const arrat = JSON.parse(JSON.stringify(this.shipList))
  897. let findVessel = arrat.find((item, index, arr) => {
  898. return item.vesselId == this.shipMan.vesselId
  899. })
  900. this.shipMan.vesselName = findVessel.vesselName
  901. },
  902. // 展开状态
  903. openState (key) {
  904. this.openMsg[key].state = !this.openMsg[key].state
  905. if (this.openMsg[key].state) {
  906. this.openMsg[key].value = '收起'
  907. } else {
  908. this.openMsg[key].value = '展开'
  909. }
  910. },
  911. // 保存接口
  912. saveData () {
  913. return new Promise(resolve => {
  914. this.$refs['shipMan'].validate(valid => {
  915. if (valid) {
  916. saveDynamicReport(this.shipMan).toPromise().then(response => {
  917. this.id = response
  918. resolve('ok')
  919. })
  920. } else {
  921. EventBus.$emit('error', this.$t('deploy.enterRequireData'))
  922. }
  923. })
  924. })
  925. },
  926. saveDataChild (resolve) {
  927. this.saveData().then(value => {
  928. if (value == 'ok') {
  929. resolve('yes')
  930. EventBus.$emit('success', '保存成功')
  931. this.editData()
  932. }
  933. })
  934. },
  935. save () {
  936. return new Promise(resolve => {
  937. this.$refs.upload.handleSaveBill().then(res => {
  938. this.shipMan.appendixFileUrls = res
  939. this.saveDataChild(resolve)
  940. })
  941. })
  942. },
  943. submitData () {
  944. let that = this
  945. submitDynamicReport(that.$qs.stringify({ id: this.id })).toPromise().then(
  946. response => {
  947. that.$router.push({ name: 'dynamicReportView' })
  948. }
  949. )
  950. },
  951. submit () {
  952. this.$refs['shipMan'].validate(valid => {
  953. if (valid) {
  954. let that = this
  955. that
  956. .$confirm(
  957. that.$t('deploy.message02'),
  958. that.$t('showMessage.hint'),
  959. {
  960. confirmButtonText: that.$t('showMessage.confirm'),
  961. cancelButtonText: that.$t('showMessage.cancel'),
  962. type: 'warning'
  963. }
  964. )
  965. .then(() => {
  966. that.save().then(val => {
  967. if (val == 'yes') {
  968. that.submitData()
  969. }
  970. })
  971. })
  972. } else {
  973. EventBus.$emit('error', this.$t('deploy.enterRequireData'))
  974. }
  975. })
  976. },
  977. back () {
  978. this.$router.back(-1)
  979. },
  980. onChange (files) {
  981. this.newAppendixs = files
  982. this.onChangeFlag = true
  983. },
  984. confirm () {
  985. let that = this
  986. that
  987. .$confirm(
  988. '确认后将不能更改,确认提交吗?',
  989. that.$t('showMessage.hint'),
  990. {
  991. confirmButtonText: that.$t('showMessage.confirm'),
  992. cancelButtonText: that.$t('showMessage.cancel'),
  993. type: 'warning'
  994. }
  995. )
  996. .then(() => {
  997. that.save().then(val => {
  998. if (val == 'yes') {
  999. saveConfirm(this.$qs.stringify({ id: this.shipMan.id })).toPromise().then(
  1000. response => {
  1001. EventBus.$emit('success', '确认成功')
  1002. this.$router.push({ name: 'dynamicReportView' })
  1003. }
  1004. )
  1005. }
  1006. })
  1007. })
  1008. },
  1009. refuse () {
  1010. let that = this
  1011. that
  1012. .$confirm(
  1013. '退回后将不能更改,确认提交吗?',
  1014. that.$t('showMessage.hint'),
  1015. {
  1016. confirmButtonText: that.$t('showMessage.confirm'),
  1017. cancelButtonText: that.$t('showMessage.cancel'),
  1018. type: 'warning'
  1019. }
  1020. )
  1021. .then(() => {
  1022. saveReturn(this.$qs.stringify({ id: this.shipMan.id })).toPromise().then(
  1023. response => {
  1024. EventBus.$emit('success', '退回成功')
  1025. this.$router.push({ name: 'dynamicReportView' })
  1026. }
  1027. )
  1028. })
  1029. }
  1030. },
  1031. // 空内容填充‘--’字符
  1032. watch: {}
  1033. }
  1034. </script>
  1035. <style lang="scss" scoped>
  1036. .yhellipsis {
  1037. width: 95%;
  1038. }
  1039. .frame {
  1040. padding: 0px 15px 15px 1px;
  1041. }
  1042. .frameTitle {
  1043. background-color: #fff;
  1044. }
  1045. .frameCenter {
  1046. background-color: #fff;
  1047. padding: 0px 15px 45px 15px;
  1048. height: calc(100vh - 90px);
  1049. overflow-y: auto;
  1050. }
  1051. .crewAddButton {
  1052. height: 50px;
  1053. line-height: 50px;
  1054. padding-right: 10px;
  1055. }
  1056. .crewAddTitle {
  1057. font-size: 16px;
  1058. color: #333;
  1059. font-weight: bold;
  1060. height: 60px;
  1061. line-height: 60px;
  1062. }
  1063. .left {
  1064. float: left;
  1065. }
  1066. .right {
  1067. font-size: 14px;
  1068. font-weight: 500;
  1069. cursor: pointer;
  1070. float: right;
  1071. }
  1072. .crewAddTitleMsg::before {
  1073. content: '▍';
  1074. color: #1d6ced;
  1075. }
  1076. .uphead {
  1077. margin-bottom: 10px;
  1078. display: inline-block;
  1079. position: relative;
  1080. height: 60px;
  1081. line-height: 60px;
  1082. }
  1083. .img {
  1084. position: absolute;
  1085. display: inline-block;
  1086. height: 60px;
  1087. width: 60px;
  1088. border-radius: 50%;
  1089. }
  1090. .kyc-passin0 {
  1091. font-size: 14px;
  1092. margin-left: 70px;
  1093. color: #666666;
  1094. position: absolute;
  1095. top: 14px;
  1096. width: 80px;
  1097. height: 30px;
  1098. line-height: 30px;
  1099. text-align: center;
  1100. border: 1px solid #cccccc;
  1101. border-radius: 5px;
  1102. }
  1103. .kyc-passin {
  1104. width: 85px;
  1105. opacity: 0;
  1106. margin-left: 70px;
  1107. }
  1108. .talk {
  1109. font-size: 12px;
  1110. color: #999999;
  1111. }
  1112. .draw-enter-active,
  1113. .draw-leave-active {
  1114. transition: all 0.4s;
  1115. }
  1116. .draw-enter,
  1117. .draw-leave-active {
  1118. transform: translateY(-45px);
  1119. opacity: 0;
  1120. }
  1121. .add {
  1122. margin-right: 15px;
  1123. }
  1124. .add,
  1125. .openClose {
  1126. display: inline-block;
  1127. }
  1128. /deep/ .edit-input .el-input__inner {
  1129. width: 95%;
  1130. }
  1131. .certificateEdit .el-input--medium {
  1132. border-left: none;
  1133. }
  1134. .el-dialog__body {
  1135. padding: 10px;
  1136. }
  1137. .Yhsearch {
  1138. margin-bottom: 10px;
  1139. }
  1140. .divIcon {
  1141. display: inline-block;
  1142. }
  1143. .editBtn {
  1144. margin-right: 10px;
  1145. }
  1146. /deep/ .labelDiv label {
  1147. display: block;
  1148. }
  1149. .rightDiv {
  1150. width: 5%;
  1151. float: right;
  1152. }
  1153. /deep/ .el-time-panel {
  1154. margin: 5px -27px !important;
  1155. }
  1156. </style>