index.vue 84 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509
  1. <template>
  2. <div class="app-container">
  3. <el-button
  4. icon="el-icon-arrow-left"
  5. type="danger"
  6. v-if="cancelButton === true"
  7. @click="cancel"
  8. style="margin-bottom: 5px"
  9. >返回列表
  10. </el-button>
  11. <el-collapse v-model="activeNames" @change="">
  12. <el-collapse-item title="基础资料" name="1">
  13. <el-form ref="form" :model="form" label-width="130px" size="mini" class="selectForm" :rules="rules">
  14. <el-row>
  15. <el-col :span="6">
  16. <el-form-item label="订舱单位" prop="corpName">
  17. <el-input
  18. v-model="form.corpName"
  19. :disabled="modify"
  20. size="small"
  21. style="width: 100%"
  22. />
  23. </el-form-item>
  24. </el-col>
  25. <el-col :span="6">
  26. <el-form-item label="提单号" prop="fMblno">
  27. <el-input
  28. v-model="form.fMblno"
  29. :disabled="changeNum"
  30. size="small"
  31. style="width: 100%"
  32. placeholder="手工输入"
  33. />
  34. </el-form-item>
  35. </el-col>
  36. <el-col :span="6">
  37. <el-form-item label="起运港口" prop="fDestportid">
  38. <el-select
  39. v-model="form.fLoadportid"
  40. filterable
  41. remote
  42. style="width: 100%;"
  43. :disabled="modify"
  44. class="elSelect"
  45. placeholder="请输入模糊查找目的港口"
  46. >
  47. <el-scrollbar>
  48. <el-option
  49. v-for="(dict, index) in fMblnoOptions"
  50. :key="dict.fId"
  51. :label="dict.fName"
  52. :value="dict.fId"
  53. ></el-option>
  54. </el-scrollbar>
  55. </el-select>
  56. </el-form-item>
  57. </el-col>
  58. <el-col :span="6">
  59. <el-form-item label="目的港口" prop="destportid">
  60. <el-select
  61. v-model="form.fDestportid"
  62. filterable
  63. remote
  64. style="width: 100%;"
  65. :disabled="modify"
  66. class="elSelect"
  67. placeholder="请输入模糊查找目的港口"
  68. >
  69. <el-scrollbar>
  70. <el-option
  71. v-for="(dict, index) in fMblnoOptions"
  72. :key="dict.fId"
  73. :label="dict.fName"
  74. :value="dict.fId"
  75. ></el-option>
  76. </el-scrollbar>
  77. </el-select>
  78. </el-form-item>
  79. </el-col>
  80. <el-col :span="6">
  81. <el-form-item label="预计装货时间" prop="fBsdate">
  82. <el-date-picker
  83. v-model="form.fBsdate"
  84. type="date"
  85. size="small"
  86. style="width: 100%"
  87. :disabled="modify"
  88. placeholder="选择日期"
  89. format="yyyy-MM-dd"
  90. >
  91. </el-date-picker>
  92. </el-form-item>
  93. </el-col>
  94. <el-col :span="6">
  95. <el-form-item label="运输条款" prop="fServiceitems">
  96. <el-select
  97. v-model="form.fServiceitems"
  98. :disabled="modify"
  99. size="small"
  100. style="width: 100%"
  101. >
  102. <el-option
  103. v-for="(dict, index) in transport"
  104. :key="dict.dictValue"
  105. :label="dict.dictLabel"
  106. :value="dict.dictValue"
  107. ></el-option>
  108. </el-select>
  109. </el-form-item>
  110. </el-col>
  111. <el-col :span="6">
  112. <el-form-item label="付款方式" prop="fPaymode">
  113. <el-select
  114. v-model="form.fPaymode"
  115. :disabled="modify"
  116. size="small"
  117. style="width: 100%"
  118. >
  119. <el-option
  120. v-for="(dict, index) in paymentMethod"
  121. :key="dict.dictValue"
  122. :label="dict.dictLabel"
  123. :value="dict.dictValue"
  124. ></el-option>
  125. </el-select>
  126. </el-form-item>
  127. </el-col>
  128. <el-col :span="6">
  129. <el-form-item label="售票方" prop="fInvoceobj">
  130. <el-select
  131. v-model="form.fInvoceobj"
  132. :disabled="modify"
  133. size="small"
  134. style="width: 100%"
  135. >
  136. <el-option
  137. v-for="(dict, index) in drawee"
  138. :key="dict.dictValue"
  139. :label="dict.dictLabel"
  140. :value="dict.dictValue"
  141. ></el-option>
  142. </el-select>
  143. </el-form-item>
  144. </el-col>
  145. <el-col :span="6">
  146. <el-form-item label="箱内签收单" prop="fSign">
  147. <el-select
  148. v-model="form.fSign"
  149. :disabled="modify"
  150. size="small"
  151. style="width: 100%"
  152. >
  153. <el-option
  154. v-for="(dict, index) in cEsign"
  155. :key="dict.dictValue"
  156. :label="dict.dictLabel"
  157. :value="dict.dictValue"
  158. ></el-option>
  159. </el-select>
  160. </el-form-item>
  161. </el-col>
  162. <el-col :span="6">
  163. <el-form-item label="订舱人扣货" prop="fDetentioncargo">
  164. <el-select
  165. v-model="form.fDetentioncargo"
  166. :disabled="modify"
  167. style="width: 100%"
  168. size="small"
  169. >
  170. <el-option
  171. v-for="(dict, index) in etentioncargo"
  172. :key="dict.dictValue"
  173. :label="dict.dictLabel"
  174. :value="dict.dictValue"
  175. ></el-option>
  176. </el-select>
  177. </el-form-item>
  178. </el-col>
  179. <el-col :span="6">
  180. <el-form-item label="船名" prop="vslid">
  181. <el-select
  182. v-model="form.fVslid"
  183. filterable
  184. remote
  185. style="width: 100%;"
  186. :disabled="modify"
  187. class="elSelect"
  188. placeholder="请输入模糊查找目的船名"
  189. >
  190. <el-scrollbar>
  191. <el-option
  192. v-for="(dict, index) in vslidList"
  193. :key="dict.fId"
  194. :label="dict.fName"
  195. :value="dict.fId"
  196. ></el-option>
  197. </el-scrollbar>
  198. </el-select>
  199. </el-form-item>
  200. </el-col>
  201. <el-col :span="6">
  202. <el-form-item label="航次" prop="voyidName">
  203. <el-select
  204. v-model="form.fVoyid"
  205. filterable
  206. remote
  207. style="width: 100%;"
  208. :disabled="modify"
  209. class="elSelect"
  210. placeholder="请输入模糊查找目的船名"
  211. >
  212. <el-scrollbar>
  213. <el-option
  214. v-for="(dict, index) in voyidList"
  215. :key="dict.fId"
  216. :label="dict.fNo"
  217. :value="dict.fId"
  218. ></el-option>
  219. </el-scrollbar>
  220. </el-select>
  221. </el-form-item>
  222. </el-col>
  223. <el-col :span="14">
  224. <el-form-item label="备注" prop="remarks">
  225. <el-input
  226. v-model="form.remark"
  227. :disabled="modify"
  228. size="small"
  229. style="width: 75%"
  230. >
  231. </el-input>
  232. <el-button type="primary" size="small" @click="check(1)">查看</el-button>
  233. </el-form-item>
  234. </el-col>
  235. </el-row>
  236. </el-form>
  237. </el-collapse-item>
  238. <el-collapse-item title="预计时间" name="2">
  239. <el-form v-model="estimatedTime" label-width="130px" size="mini">
  240. <el-row>
  241. <el-col :span="6">
  242. <el-form-item label="起运港口" prop="portofloadidName">
  243. <el-input
  244. v-model="estimatedTime.portofloadidName"
  245. :disabled="doNot"
  246. size="small"
  247. style="width: 100%"
  248. />
  249. </el-form-item>
  250. </el-col>
  251. <el-col :span="6">
  252. <el-form-item label="中转港口" prop="portoftransshipmentName">
  253. <el-input
  254. v-model="estimatedTime.portoftransshipmentName"
  255. :disabled="doNot"
  256. size="small"
  257. style="width: 100%"
  258. />
  259. </el-form-item>
  260. </el-col>
  261. <!-- <el-col :span="6">-->
  262. <!-- <el-form-item label="预计中转抵港日期" prop="fMblno">-->
  263. <!-- <el-input-->
  264. <!-- v-model="form.fMblno"-->
  265. <!-- :disabled="modify"-->
  266. <!-- size="small"-->
  267. <!-- style="width: 100%"-->
  268. <!-- placeholder="手工输入"-->
  269. <!-- />-->
  270. <!-- </el-form-item>-->
  271. <!-- </el-col>-->
  272. <!-- <el-col :span="6">-->
  273. <!-- <el-form-item label="预计中转开航日期" prop="fMblno">-->
  274. <!-- <el-input-->
  275. <!-- v-model="form.fMblno"-->
  276. <!-- :disabled="modify"-->
  277. <!-- size="small"-->
  278. <!-- style="width: 100%"-->
  279. <!-- placeholder="手工输入"-->
  280. <!-- />-->
  281. <!-- </el-form-item>-->
  282. <!-- </el-col>-->
  283. <el-col :span="6">
  284. <el-form-item label="目的港口" prop="distinationidName">
  285. <el-input
  286. v-model="estimatedTime.distinationidName"
  287. :disabled="doNot"
  288. size="small"
  289. style="width: 100%"
  290. />
  291. </el-form-item>
  292. </el-col>
  293. <el-col :span="6">
  294. <el-form-item label="预计开航日期" prop="fEtd">
  295. <el-input
  296. v-model="estimatedTime.fEtd"
  297. :disabled="doNot"
  298. size="small"
  299. style="width: 100%"
  300. />
  301. </el-form-item>
  302. </el-col>
  303. <el-col :span="6">
  304. <el-form-item label="预计抵港日期" prop="fEta">
  305. <el-input
  306. v-model="estimatedTime.fEta"
  307. :disabled="doNot"
  308. size="small"
  309. style="width: 100%"
  310. />
  311. </el-form-item>
  312. </el-col>
  313. </el-row>
  314. </el-form>
  315. </el-collapse-item>
  316. <el-collapse-item title="收发货人信息" name="3">
  317. <el-form v-model="form" label-width="130px" size="mini">
  318. <el-row>
  319. <el-col :span="6">
  320. <el-form-item label="发货人公司全称" prop="fShippername">
  321. <el-input
  322. v-model="form.fShippername"
  323. :disabled="modify"
  324. size="small"
  325. style="width: 100%"
  326. placeholder="手工输入"
  327. />
  328. </el-form-item>
  329. </el-col>
  330. <el-col :span="6">
  331. <el-form-item label="发货人详细地址" prop="fShipperattn">
  332. <el-input
  333. v-model="form.fShipperattn"
  334. :disabled="modify"
  335. style="width: 100%"
  336. size="small"
  337. placeholder="手工输入"
  338. />
  339. </el-form-item>
  340. </el-col>
  341. <el-col :span="6">
  342. <el-form-item label="发货人姓名和电话" prop="fShippertel">
  343. <el-input
  344. v-model="form.fShippertel"
  345. :disabled="modify"
  346. size="small"
  347. style="width: 100%"
  348. placeholder="手工输入"
  349. />
  350. </el-form-item>
  351. </el-col>
  352. </el-row>
  353. <el-row>
  354. <el-col :span="6">
  355. <el-form-item label="收货人公司全称" prop="fConsigneername">
  356. <el-input
  357. v-model="form.fConsigneername"
  358. :disabled="modify"
  359. size="small"
  360. style="width: 100%"
  361. placeholder="手工输入"
  362. />
  363. </el-form-item>
  364. </el-col>
  365. <el-col :span="6">
  366. <el-form-item label="收货人详细地址" prop="fConsigneeattn">
  367. <el-input
  368. v-model="form.fConsigneeattn"
  369. :disabled="modify"
  370. style="width: 100%"
  371. size="small"
  372. placeholder="手工输入"
  373. />
  374. </el-form-item>
  375. </el-col>
  376. <el-col :span="6">
  377. <el-form-item label="收货人姓名和电话" prop="fConsigneetel">
  378. <el-input
  379. v-model="form.fConsigneetel"
  380. :disabled="modify"
  381. style="width: 100%"
  382. size="small"
  383. placeholder="手工输入"
  384. />
  385. </el-form-item>
  386. </el-col>
  387. </el-row>
  388. </el-form>
  389. </el-collapse-item>
  390. <el-collapse-item title="费用信息" name="5" class="minHeight">
  391. <el-form v-model="form" label-width="130px" size="mini">
  392. <el-row>
  393. <el-col :span="6">
  394. <el-form-item label="是否办理保险" prop="fInsurance">
  395. <el-select
  396. v-model="form.fInsurance"
  397. :disabled="modify"
  398. size="small"
  399. style="width: 100%"
  400. >
  401. <el-option
  402. v-for="(dict, index) in insurance"
  403. :key="dict.dictValue"
  404. :label="dict.dictLabel"
  405. :value="dict.dictValue"
  406. ></el-option>
  407. </el-select>
  408. </el-form-item>
  409. </el-col>
  410. <el-col :span="6">
  411. <el-form-item label="保险货值(万元)" prop="fInsuranceamt">
  412. <el-input
  413. v-model="form.fInsuranceamt"
  414. :disabled="modify"
  415. style="width: 100%"
  416. size="small"
  417. />
  418. </el-form-item>
  419. </el-col>
  420. </el-row>
  421. </el-form>
  422. </el-collapse-item>
  423. <el-collapse-item title="货物信息" name="4">
  424. <el-table :data="goodsList" style="width: 100%;" align="center">
  425. <el-table-column label="行号" type="index" min-width="100px"/>
  426. <el-table-column label="货物名称" prop="fGoodsid" min-width="100px">
  427. <template slot-scope="scope">
  428. <el-select v-model="scope.row.fGoodsid" @change="selectChange(scope)" :disabled="modify">
  429. <el-option
  430. v-for="(item,index) in goods"
  431. :key="index"
  432. :label="item.fName"
  433. :value="item.fId"
  434. />
  435. </el-select>
  436. </template>
  437. </el-table-column>
  438. <el-table-column label="货类" prop="typeidName" min-width="100px">
  439. <template slot-scope="scope">
  440. <el-input v-model="scope.row.typeidName" :disabled="modify"></el-input>
  441. </template>
  442. </el-table-column>
  443. <el-table-column label="包装类型" prop="fPackageid" min-width="100px">
  444. <template slot-scope="scope">
  445. <el-select v-model="scope.row.fPackageid" :disabled="modify">
  446. <el-option
  447. v-for="item in packgeOptions"
  448. :key="item.dictValue"
  449. :label="item.dictLabel"
  450. :value="item.dictValue"
  451. />
  452. </el-select>
  453. </template>
  454. </el-table-column>
  455. <el-table-column label="箱型" prop="fCntrid" min-width="100px">
  456. <template slot-scope="scope">
  457. <el-select v-model="scope.row.fCntrid" @change="seleEt(scope)" :disabled="modify">
  458. <el-option
  459. v-for="item in cntrOptions"
  460. :key="item.fId"
  461. :label="item.fNo"
  462. :value="item.fId"
  463. />
  464. </el-select>
  465. </template>
  466. </el-table-column>
  467. <el-table-column label="箱量" prop="fCntrcount" min-width="100px">
  468. <template slot-scope="scope">
  469. <el-input v-model="scope.row.fCntrcount" :disabled="modify" :maxlength="3" oninput='this.value=this.value.replace(/[^\d.]/g,"")'></el-input>
  470. </template>
  471. </el-table-column>
  472. <el-table-column label="单箱重量(吨)" prop="fCntrweight" min-width="120px">
  473. <template slot-scope="scope">
  474. <el-input v-model="scope.row.fCntrweight" :disabled="modify" @input="cntrWeight"></el-input>
  475. </template>
  476. </el-table-column>
  477. <el-table-column label="箱态" prop="fCntrstatus" min-width="100px">
  478. <template slot-scope="scope">
  479. <el-select v-model="scope.row.fCntrstatus" :disabled="modify">
  480. <el-option
  481. v-for="item in fStatus"
  482. :key="item.dictValue"
  483. :label="item.dictLabel"
  484. :value="item.dictValue"
  485. />
  486. </el-select>
  487. </template>
  488. </el-table-column>
  489. <el-table-column label="自备货柜" prop="fSoc" min-width="100px">
  490. <template slot-scope="scope">
  491. <el-select v-model="scope.row.fSoc" :disabled="modify">
  492. <el-option label="是" value="0"></el-option>
  493. <el-option label="否" value="1"></el-option>
  494. </el-select>
  495. </template>
  496. </el-table-column>
  497. <div v-if="whether === true">
  498. <el-table-column label="设置温度(℃)" prop="fTemperature" min-width="120px">
  499. <template slot-scope="scope">
  500. <el-input v-model="scope.row.fTemperature" :disabled="modify" @input="temperature" oninput='this.value=this.value.replace(/[^\-?\d.]/g,"")'></el-input>
  501. </template>
  502. </el-table-column>
  503. <el-table-column label="风门开度(%)" prop="fDraught" min-width="120px">
  504. <template slot-scope="scope">
  505. <el-input v-model="scope.row.fDraught" :disabled="modify" @input="throttleOpening" oninput='this.value=this.value.replace(/[^\d.]/g,"")'></el-input>
  506. </template>
  507. </el-table-column>
  508. <el-table-column label="湿度设置(%)" prop="fHumidity" min-width="120px">
  509. <template slot-scope="scope">
  510. <el-input v-model="scope.row.fHumidity" :disabled="modify" @input="throttleOpening" oninput='this.value=this.value.replace(/[^\d.]/g,"")'></el-input>
  511. </template>
  512. </el-table-column>
  513. <el-table-column label="预冷要求" prop="fPrecooling" min-width="100px">
  514. <template slot-scope="scope">
  515. <el-select v-model="scope.row.fPrecooling" :disabled="modify">
  516. <el-option label="是" value="1"></el-option>
  517. <el-option label="否" value="2"></el-option>
  518. </el-select>
  519. </template>
  520. </el-table-column>
  521. </div>
  522. <el-table-column label="是否危险品" prop="ifdangerName" min-width="100px">
  523. <template slot-scope="scope">
  524. <span>{{ scope.row.ifdangerName }}</span>
  525. <el-button type="primary" size="small" @click="check(2)" style="margin-left: 5px;">查看</el-button>
  526. </template>
  527. </el-table-column>
  528. <el-table-column label="备注" prop="remark" min-width="100px"/>
  529. </el-table>
  530. </el-collapse-item>
  531. <el-collapse-item title="箱信息" name="6" class="minHeight">
  532. <div
  533. class="dialogTableTitle flex a-center jlr"
  534. style="
  535. display: flex;
  536. justify-content: space-between;
  537. align-items: center;
  538. margin: 10px 0;
  539. font-size: 16px;
  540. font-weight: bolder;
  541. "
  542. >
  543. <div>
  544. <el-button
  545. size="small"
  546. type="primary"
  547. :disabled="modify"
  548. @click.prevent="addList()"
  549. >新行
  550. </el-button>
  551. <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
  552. >删除
  553. </el-button> -->
  554. <el-button
  555. type="primary"
  556. size="small"
  557. :disabled="modify"
  558. @click="approval(1)"
  559. >保 存
  560. </el-button
  561. >
  562. </div>
  563. </div>
  564. <el-table :data="dataList" style="width: 100%;">
  565. <el-table-column type="selection" width="55" align="center"/>
  566. <el-table-column label="序号" type="index" width="80"/>
  567. <el-table-column label="箱号" align="center" prop="fCntrno">
  568. <template slot-scope="scope">
  569. <el-input v-model="scope.row.fCntrno" :disabled="modify"/>
  570. </template>
  571. </el-table-column>
  572. <el-table-column label="铅封号" align="center" prop="fSealno">
  573. <template slot-scope="scope">
  574. <el-input v-model="scope.row.fSealno" :disabled="modify"/>
  575. </template>
  576. </el-table-column>
  577. <el-table-column prop="fCntrweight" label="单箱重量(吨)" align="center">
  578. <template slot-scope="scope">
  579. <el-input v-model="scope.row.fCntrweight" :disabled="modify"
  580. @input="cntrWeight"
  581. />
  582. </template>
  583. </el-table-column>
  584. <el-table-column prop="fGoodsid" label="货名" align="center">
  585. <template slot-scope="scope">
  586. <el-select clearable v-model="scope.row.fGoodsid" :disabled="modify">
  587. <el-option
  588. v-for="item in goodsOptions"
  589. :key="item.fId"
  590. :label="item.fName"
  591. :value="item.fId"
  592. />
  593. </el-select>
  594. </template>
  595. </el-table-column>
  596. <el-table-column prop="fPackageid" label="包装类型" align="center">
  597. <template slot-scope="scope">
  598. <el-select clearable v-model="scope.row.fPackageid" :disabled="modify">
  599. <el-option
  600. v-for="dict in packgeOptions"
  601. :key="dict.dictValue"
  602. :label="dict.dictLabel"
  603. :value="dict.dictValue"
  604. />
  605. </el-select>
  606. </template>
  607. </el-table-column>
  608. <el-table-column prop="fCntrid" label="箱型" align="center">
  609. <template slot-scope="scope">
  610. <el-select clearable v-model="scope.row.fCntrid" :disabled="modify">
  611. <el-option
  612. v-for="item in cntrOptions"
  613. :key="item.fId"
  614. :label="item.fNo"
  615. :value="item.fId"
  616. />
  617. </el-select>
  618. </template>
  619. </el-table-column>
  620. <!-- <el-table-column prop="fManual" label="来源" align="center">-->
  621. <!-- <template slot-scope="scope">-->
  622. <!-- <el-select clearable v-model="scope.row.fManual" :disabled="modify">-->
  623. <!-- <el-option />-->
  624. <!-- </el-select>-->
  625. <!-- </template>-->
  626. <!-- </el-table-column>-->
  627. <el-table-column prop="address" label="操作" align="center">
  628. <template slot-scope="scope">
  629. <el-button size="small" :disabled="modify"
  630. @click="deleteRow(scope.$index, dataList)"
  631. >移除
  632. </el-button>
  633. </template>
  634. </el-table-column>
  635. </el-table>
  636. </el-collapse-item>
  637. <el-collapse-item name="7">
  638. <template slot="title">
  639. <i class="el-icon-circle-plus"></i>应收费用
  640. </template>
  641. <div
  642. class="dialogTableTitle flex a-center jlr"
  643. style="
  644. display: flex;
  645. justify-content: space-between;
  646. align-items: center;
  647. margin: 10px 0;">
  648. <div>
  649. <el-button
  650. size="small"
  651. type="primary"
  652. :disabled="modify"
  653. @click.prevent="addCollection()"
  654. >新行
  655. </el-button>
  656. <!-- <el-button :disabled="browseStatus" @click.prevent="deleteRow(warehouseDrList)"
  657. >删除
  658. </el-button> -->
  659. <el-button
  660. type="primary"
  661. size="small"
  662. :disabled="modify"
  663. @click="approval(1)"
  664. >保 存
  665. </el-button
  666. >
  667. <!-- <el-button @click.prevent="addAgreement()" type="warning">仓储费协议</el-button> -->
  668. <el-button
  669. size="small"
  670. @click.prevent="handleSelect(3)"
  671. :disabled="modify"
  672. type="danger"
  673. >导入协议
  674. </el-button
  675. >
  676. </div>
  677. </div>
  678. <el-table
  679. :data="warehouseDrList"
  680. ref="table"
  681. tooltip-effect="dark"
  682. border
  683. stripe
  684. show-summary
  685. @selection-change=""
  686. :summary-method="warehouseDrSummaries"
  687. >
  688. <el-table-column type="selection" width="55" align="center"/>
  689. <el-table-column label="序号" type="index" width="80">
  690. </el-table-column>
  691. <el-table-column
  692. prop="fBusinessType"
  693. header-align="center"
  694. align="center"
  695. width="180px"
  696. label="业务类型"
  697. >
  698. <template slot-scope="scope">
  699. <el-select
  700. v-model="scope.row.fBusinessType"
  701. filterable
  702. remote
  703. :disabled="modify || scope.row.fSrcTypeId != 0"
  704. placeholder="请选择业务类型"
  705. >
  706. <el-option
  707. v-for="dict in businessTypeOptions"
  708. :key="dict.dictValue"
  709. :label="dict.dictLabel"
  710. :value="dict.dictValue"
  711. ></el-option>
  712. </el-select>
  713. </template>
  714. </el-table-column>
  715. <el-table-column
  716. prop="fCorpid"
  717. header-align="center"
  718. align="center"
  719. width="180px"
  720. label="客户名称"
  721. >
  722. <template slot-scope="scope">
  723. <el-select
  724. v-model="scope.row.fCorpid"
  725. filterable
  726. remote
  727. :disabled="modify || scope.row.fSrcTypeId != 0"
  728. placeholder="请选择客户名称"
  729. >
  730. <el-option
  731. v-for="item in nameOptions"
  732. :key="item.fId"
  733. :label="item.fName"
  734. :value="item.fId"
  735. ></el-option>
  736. </el-select>
  737. </template>
  738. </el-table-column>
  739. <el-table-column
  740. prop="fFeeid"
  741. header-align="center"
  742. align="center"
  743. width="180px"
  744. label="费用名称"
  745. >
  746. <template slot-scope="scope">
  747. <el-select
  748. v-model="scope.row.fFeeid"
  749. filterable
  750. remote
  751. :disabled="modify || scope.row.fSrcTypeId !== 0"
  752. placeholder="请选择费用名称"
  753. >
  754. <el-option
  755. v-for="(dict, index) in fDNameOptions"
  756. :key="index.fId"
  757. :label="dict.fName"
  758. :value="dict.fId"
  759. ></el-option>
  760. </el-select>
  761. </template>
  762. </el-table-column>
  763. <el-table-column
  764. prop="fFeeUnitid"
  765. header-align="center"
  766. align="center"
  767. width="180px"
  768. label="计价单位"
  769. >
  770. <template slot-scope="scope">
  771. <el-select
  772. v-model="scope.row.fFeeUnitid"
  773. placeholder="请选择计价单位"
  774. @change="changeFeeUnit(scope.row)"
  775. clearable
  776. :disabled="modify || scope.row.fSrcTypeId !== 0"
  777. >
  778. <el-option
  779. v-for="(dict, index) in jFeetunitOptions"
  780. :key="index.dictValue"
  781. :label="dict.dictLabel"
  782. :value="dict.dictValue"
  783. />
  784. </el-select>
  785. </template>
  786. </el-table-column>
  787. <el-table-column
  788. prop="fQty"
  789. header-align="center"
  790. align="center"
  791. width="130px"
  792. label="数量"
  793. >
  794. <template slot-scope="scope">
  795. <el-input
  796. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  797. v-model="scope.row.fQty"
  798. placeholder="数量"
  799. :disabled="modify || scope.row.fSrcTypeId !== 0"
  800. @change="changeContractAmt(scope.row)"
  801. show-word-limit
  802. />
  803. </template>
  804. </el-table-column>
  805. <el-table-column
  806. prop="fUnitprice"
  807. header-align="center"
  808. align="center"
  809. width="130px"
  810. label="单价"
  811. >
  812. <template slot-scope="scope">
  813. <el-input
  814. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  815. v-model="scope.row.fUnitprice"
  816. placeholder="单价"
  817. :disabled="modify || scope.row.fSrcTypeId !== 0"
  818. @change="changeContractAmt(scope.row)"
  819. show-word-limit
  820. />
  821. </template>
  822. </el-table-column>
  823. <el-table-column
  824. prop="fAmount"
  825. header-align="center"
  826. align="center"
  827. width="130px"
  828. label="金额"
  829. >
  830. <template slot-scope="scope">
  831. <el-input
  832. disabled
  833. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  834. v-model="scope.row.fAmount"
  835. placeholder="金额"
  836. show-word-limit
  837. />
  838. </template>
  839. </el-table-column>
  840. <el-table-column
  841. prop="fStltypeid"
  842. header-align="center"
  843. align="center"
  844. width="130px"
  845. label="结算方式"
  846. >
  847. <template slot-scope="scope">
  848. <el-select
  849. v-model="scope.row.fStltypeid"
  850. placeholder="请选择结算表票结、月结"
  851. :disabled="modify || scope.row.fSrcTypeId !== 0"
  852. >
  853. <el-option
  854. v-for="(dict, index) in fStltypeOptions"
  855. :key="index.dictValue"
  856. :label="dict.dictLabel"
  857. :value="parseInt(dict.dictValue)"
  858. ></el-option>
  859. </el-select>
  860. </template>
  861. </el-table-column>
  862. <el-table-column
  863. prop="fCurrency"
  864. header-align="center"
  865. align="center"
  866. width="130px"
  867. label="币别"
  868. >
  869. <template slot-scope="scope">
  870. <el-input
  871. v-model="scope.row.fCurrency"
  872. :disabled="modify || scope.row.fSrcTypeId !== 0"
  873. placeholder="币别"
  874. show-word-limit
  875. />
  876. </template>
  877. </el-table-column>
  878. <el-table-column
  879. prop="fExrate"
  880. header-align="center"
  881. align="center"
  882. width="130px"
  883. label="汇率"
  884. >
  885. <template slot-scope="scope">
  886. <el-input
  887. v-model="scope.row.fExrate"
  888. :disabled="modify || scope.row.fSrcTypeId !== 0"
  889. placeholder="汇率"
  890. show-word-limit
  891. />
  892. </template>
  893. </el-table-column>
  894. <el-table-column
  895. prop="fTaxrate"
  896. header-align="center"
  897. align="center"
  898. width="130px"
  899. label="税率"
  900. >
  901. <template slot-scope="scope">
  902. <el-input
  903. v-model="scope.row.fTaxrate"
  904. :disabled="modify || scope.row.fSrcTypeId !== 0"
  905. placeholder="税率"
  906. show-word-limit
  907. />
  908. </template>
  909. </el-table-column>
  910. <el-table-column
  911. prop="fSrcTypeId"
  912. header-align="center"
  913. align="center"
  914. width="130px"
  915. label="来源"
  916. >
  917. <template slot-scope="scope">
  918. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  919. <span v-if="scope.row.fSrcTypeId === 1">协议</span>
  920. <span v-if="scope.row.fSrcTypeId === 2">订舱</span>
  921. </template>
  922. </el-table-column>
  923. <el-table-column
  924. prop="remark"
  925. header-align="center"
  926. align="center"
  927. width="150px"
  928. label="备注"
  929. >
  930. <template slot-scope="scope">
  931. <el-input
  932. v-model="scope.row.remark"
  933. :disabled="modify || scope.row.fSrcTypeId !== 0"
  934. placeholder="备注"
  935. show-word-limit
  936. />
  937. </template>
  938. </el-table-column>
  939. <el-table-column
  940. header-align="center"
  941. align="center"
  942. label="操作"
  943. width="200px"
  944. >
  945. <template slot-scope="scope">
  946. <el-button
  947. @click.native.prevent="
  948. deleteRow(scope.$index, warehouseDrList)
  949. "
  950. size="small"
  951. :disabled="modify"
  952. >移除
  953. </el-button
  954. >
  955. </template>
  956. </el-table-column>
  957. </el-table>
  958. </el-collapse-item>
  959. <el-collapse-item name="8">
  960. <template slot="title">
  961. <i class="el-icon-remove"></i>应付费用
  962. </template>
  963. <div
  964. class="dialogTableTitle flex a-center jlr"
  965. style="
  966. display: flex;
  967. justify-content: space-between;
  968. align-items: center;
  969. margin: 10px 0;
  970. "
  971. >
  972. <div>
  973. <el-button
  974. type="primary"
  975. :disabled="modify"
  976. @click.prevent="addpayment()"
  977. size="small"
  978. >新行
  979. </el-button>
  980. <el-button
  981. type="primary"
  982. size="small"
  983. @click="approval(1)"
  984. :disabled="modify"
  985. >保 存
  986. </el-button
  987. >
  988. <el-button
  989. type="danger"
  990. size="small"
  991. @click.prevent="handleSelect(1)"
  992. :disabled="modify"
  993. >导入协议
  994. </el-button
  995. >
  996. </div>
  997. </div>
  998. <el-table
  999. :data="warehouseCrList"
  1000. ref="table"
  1001. tooltip-effect="dark"
  1002. border
  1003. stripe
  1004. show-summary
  1005. @selection-change=""
  1006. :summary-method="warehouseCrSummaries"
  1007. >
  1008. <el-table-column type="selection" width="55" align="center"/>
  1009. <el-table-column label="序号" type="index" width="80">
  1010. </el-table-column>
  1011. <el-table-column
  1012. prop="fCorpid"
  1013. header-align="center"
  1014. align="center"
  1015. width="180px"
  1016. label="业务类型"
  1017. >
  1018. <template slot-scope="scope">
  1019. <el-select
  1020. v-model="scope.row.fBusinessType"
  1021. filterable
  1022. remote
  1023. :disabled="modify || scope.row.fSrcTypeId != 0"
  1024. placeholder="请选择业务类型"
  1025. >
  1026. <el-option
  1027. v-for="dict in businessTypeOptions"
  1028. :key="dict.dictValue"
  1029. :label="dict.dictLabel"
  1030. :value="dict.dictValue"
  1031. ></el-option>
  1032. </el-select>
  1033. </template>
  1034. </el-table-column>
  1035. <el-table-column
  1036. prop="fCorpid"
  1037. header-align="center"
  1038. align="center"
  1039. width="180px"
  1040. label="客户名称"
  1041. >
  1042. <template slot-scope="scope">
  1043. <el-select
  1044. v-model="scope.row.fCorpid"
  1045. filterable
  1046. remote
  1047. :disabled="modify || scope.row.fSrcTypeId != 0"
  1048. placeholder="请选择客户名称"
  1049. >
  1050. <el-option
  1051. v-for="item in nameOptions"
  1052. :key="item.fId"
  1053. :label="item.fName"
  1054. :value="item.fId"
  1055. ></el-option>
  1056. </el-select>
  1057. </template>
  1058. </el-table-column>
  1059. <el-table-column
  1060. prop="fFeeid"
  1061. header-align="center"
  1062. align="center"
  1063. width="180px"
  1064. label="费用名称"
  1065. >
  1066. <template slot-scope="scope">
  1067. <el-select
  1068. v-model="scope.row.fFeeid"
  1069. filterable
  1070. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1071. remote
  1072. placeholder="请选择费用名称"
  1073. >
  1074. <el-option
  1075. v-for="(dict, index) in fCNameOptions"
  1076. :key="index.fId"
  1077. :label="dict.fName"
  1078. :value="dict.fId"
  1079. ></el-option>
  1080. </el-select>
  1081. </template>
  1082. </el-table-column>
  1083. <el-table-column
  1084. prop="fFeeUnitid"
  1085. header-align="center"
  1086. align="center"
  1087. width="180px"
  1088. label="计价单位"
  1089. >
  1090. <template slot-scope="scope">
  1091. <el-select
  1092. v-model="scope.row.fFeeUnitid"
  1093. filterable
  1094. remote
  1095. @change="changeFeeUnit(scope.row)"
  1096. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1097. placeholder="请选择计价单位"
  1098. >
  1099. <el-option
  1100. v-for="(dict, index) in jFeetunitOptions"
  1101. :key="index.dictValue"
  1102. :label="dict.dictLabel"
  1103. :value="dict.dictValue"
  1104. ></el-option>
  1105. </el-select>
  1106. </template>
  1107. </el-table-column>
  1108. <el-table-column
  1109. prop="fQty"
  1110. header-align="center"
  1111. align="center"
  1112. width="150px"
  1113. label="数量"
  1114. >
  1115. <template slot-scope="scope">
  1116. <el-input
  1117. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d\d\d).*$/, "$1$2.$3")'
  1118. v-model="scope.row.fQty"
  1119. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1120. @change="changeContractAmt(scope.row)"
  1121. placeholder="数量"
  1122. show-word-limit
  1123. />
  1124. </template>
  1125. </el-table-column>
  1126. <el-table-column
  1127. prop="fUnitprice"
  1128. header-align="center"
  1129. align="center"
  1130. width="150px"
  1131. label="单价"
  1132. >
  1133. <template slot-scope="scope">
  1134. <el-input
  1135. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1136. v-model="scope.row.fUnitprice"
  1137. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1138. @change="changeContractAmt(scope.row)"
  1139. placeholder="单价"
  1140. show-word-limit
  1141. />
  1142. </template>
  1143. </el-table-column>
  1144. <el-table-column
  1145. prop="fAmount"
  1146. header-align="center"
  1147. align="center"
  1148. width="150px"
  1149. label="金额"
  1150. >
  1151. <template slot-scope="scope">
  1152. <el-input
  1153. disabled
  1154. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  1155. v-model="scope.row.fAmount"
  1156. placeholder="金额"
  1157. show-word-limit
  1158. />
  1159. </template>
  1160. </el-table-column>
  1161. <el-table-column
  1162. prop="fStltypeid"
  1163. header-align="center"
  1164. align="center"
  1165. width="130px"
  1166. label="结算方式"
  1167. >
  1168. <template slot-scope="scope">
  1169. <el-select
  1170. v-model="scope.row.fStltypeid"
  1171. placeholder="请选择结算表票结、月结"
  1172. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1173. >
  1174. <el-option
  1175. v-for="(dict, index) in fStltypeOptions"
  1176. :key="index.dictValue"
  1177. :label="dict.dictLabel"
  1178. :value="parseInt(dict.dictValue)"
  1179. ></el-option>
  1180. </el-select>
  1181. </template>
  1182. </el-table-column>
  1183. <el-table-column
  1184. prop="fCurrency"
  1185. header-align="center"
  1186. align="center"
  1187. width="150px"
  1188. label="币别"
  1189. >
  1190. <template slot-scope="scope">
  1191. <el-input
  1192. v-model="scope.row.fCurrency"
  1193. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1194. placeholder="币别"
  1195. show-word-limit
  1196. />
  1197. </template>
  1198. </el-table-column>
  1199. <el-table-column
  1200. prop="fExrate"
  1201. header-align="center"
  1202. align="center"
  1203. width="150px"
  1204. label="汇率"
  1205. >
  1206. <template slot-scope="scope">
  1207. <el-input
  1208. v-model="scope.row.fExrate"
  1209. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1210. placeholder="汇率"
  1211. show-word-limit
  1212. />
  1213. </template>
  1214. </el-table-column>
  1215. <el-table-column
  1216. prop="fTaxrate"
  1217. header-align="center"
  1218. align="center"
  1219. width="150px"
  1220. label="税率"
  1221. >
  1222. <template slot-scope="scope">
  1223. <el-input
  1224. v-model="scope.row.fTaxrate"
  1225. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1226. placeholder="税率"
  1227. show-word-limit
  1228. />
  1229. </template>
  1230. </el-table-column>
  1231. <el-table-column
  1232. prop="fSrcTypeId"
  1233. header-align="center"
  1234. align="center"
  1235. width="130px"
  1236. label="来源"
  1237. >
  1238. <template slot-scope="scope">
  1239. <span v-if="scope.row.fSrcTypeId === 0">录入</span>
  1240. <span v-if="scope.row.fSrcTypeId === 1">协议</span>
  1241. <span v-if="scope.row.fSrcTypeId === 2">订舱</span>
  1242. </template>
  1243. </el-table-column>
  1244. <el-table-column
  1245. prop="remark"
  1246. header-align="center"
  1247. align="center"
  1248. width="150px"
  1249. label="备注"
  1250. >
  1251. <template slot-scope="scope">
  1252. <el-input
  1253. v-model="scope.row.remark"
  1254. :disabled="modify || scope.row.fSrcTypeId !== 0"
  1255. placeholder="备注"
  1256. show-word-limit
  1257. />
  1258. </template>
  1259. </el-table-column>
  1260. <el-table-column
  1261. header-align="center"
  1262. align="center"
  1263. width="200px"
  1264. label="操作"
  1265. >
  1266. <template slot-scope="scope">
  1267. <!-- <el-button size="small">审核费用</el-button> -->
  1268. <el-button
  1269. @click.native.prevent="
  1270. deleteRow(scope.$index, warehouseCrList)
  1271. "
  1272. size="small"
  1273. :disabled="modify"
  1274. >移除
  1275. </el-button
  1276. >
  1277. </template>
  1278. </el-table-column>
  1279. </el-table>
  1280. </el-collapse-item>
  1281. <el-collapse-item name="9" class="minHeight" title="箱信息">
  1282. <template slot="title">
  1283. <i class="el-icon-circle-plus"></i>利润合计:
  1284. {{this.amountDr != null && this.amountCr != null ? this.amountDr - this.amountCr :
  1285. (!this.amountDr && this.amountCr ? 0 - this.amountCr :
  1286. (!this.amountDr && !this.amountCr ? '' : this.amountDr))}}
  1287. </template>
  1288. </el-collapse-item>
  1289. </el-collapse>
  1290. <div style="margin:60px;float: right">
  1291. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  1292. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"
  1293. ></approval-comments>
  1294. <el-button type="info" :disabled="jumpDonot" v-if="form.fBillstatus == 11 || form.fBillstatus == 6" @click="modify = false">修 改
  1295. </el-button>
  1296. <el-button type="success" :disabled="modify" v-if="form.fBillstatus == 11 || form.fBillstatus == 6" @click="approval(1)">保 存
  1297. </el-button>
  1298. <el-button type="primary" :disabled="modify" v-if="form.fBillstatus == 11 && this.form.moneyStatus < 4"
  1299. @click="feeSubmission"
  1300. >费用请核
  1301. </el-button>
  1302. <el-button type="success" v-if="approVal" @click="addOrUpdateHand(form,'f_billstatus')">审 批</el-button>
  1303. <el-button type="primary"
  1304. v-if="(form.fUpdeteStatus === 4 || form.fUpdeteStatus === 5 || form.fUpdeteStatus === 6 || form.fUpdeteStatus === 2) && (form.fSubmitUpdate == 2 || form.fSubmitUpdate == 4) && (form.fDeleteStatus === 2 || form.fDeleteStatus === 4) && approvalTwo"
  1305. @click="modifyApproval()"
  1306. >审批
  1307. </el-button>
  1308. <el-button v-if="!form.fMblno && form.fBillstatus < 5" type="danger" @click="rejectDeletion">
  1309. 驳回并删除
  1310. </el-button>
  1311. <el-button type="danger" :disabled="disappear" v-if="form.moneyStatus === 4 && current == before"
  1312. @click="revokeTwo('f_billstatus')"
  1313. >撤销请核
  1314. </el-button>
  1315. <el-button type="primary"
  1316. v-if="(form.fUpdeteStatus !== 4 && form.fUpdeteStatus !== 5 && form.fUpdeteStatus !== 6 && form.fUpdeteStatus !== 2) && (form.fBillstatus != 11 ||form.moneyStatus == null || form.moneyStatus != null && form.moneyStatus >= 4)"
  1317. @click="addOrUpdateHandle('f_billstatus')"
  1318. >查看审批
  1319. </el-button>
  1320. <el-button type="primary"
  1321. v-if="(form.fUpdeteStatus === 4 || form.fUpdeteStatus === 5 || form.fUpdeteStatus === 6 || form.fUpdeteStatus === 2) && (form.fSubmitUpdate == 2 || form.fSubmitUpdate == 4) && (form.fDeleteStatus === 2 || form.fDeleteStatus === 4) && dataElist"
  1322. @click="revisionApproval()"
  1323. >查看审批
  1324. </el-button>
  1325. <el-button icon="el-icon-arrow-left" type="danger" v-if="cancelButton === true" @click="cancel">返回列表</el-button>
  1326. <el-button icon="el-icon-arrow-left" type="danger" v-if="cancelButton === false" @click="cancelTwo"
  1327. >返回首页
  1328. </el-button
  1329. >
  1330. </div>
  1331. <!-- 附件查看-->
  1332. <el-dialog
  1333. title="查看附件"
  1334. :visible.sync="dialogVisible"
  1335. width="60%"
  1336. v-dialogDrag
  1337. >
  1338. <el-table
  1339. :data="relevantAttachments"
  1340. ref="table"
  1341. tooltip-effect="dark"
  1342. border
  1343. stripe
  1344. style="width: 100%"
  1345. height="150"
  1346. >
  1347. <el-table-column label="序号" type="index" width="80">
  1348. </el-table-column>
  1349. <el-table-column
  1350. prop="fName"
  1351. header-align="center"
  1352. align="center"
  1353. width="250px"
  1354. label="附件名称"
  1355. >
  1356. <template slot-scope="scope">
  1357. <el-input
  1358. v-model="scope.row.fName"
  1359. placeholder="附件名称"
  1360. show-word-limit
  1361. />
  1362. </template>
  1363. </el-table-column>
  1364. <el-table-column
  1365. prop="createTime"
  1366. header-align="center"
  1367. align="center"
  1368. width="250px"
  1369. label="上传时间"
  1370. >
  1371. <template slot-scope="scope">
  1372. <el-input
  1373. v-model="scope.row.createTime"
  1374. disabled
  1375. placeholder="上传时间"
  1376. ></el-input>
  1377. </template>
  1378. </el-table-column>
  1379. <el-table-column
  1380. prop="createBy"
  1381. header-align="center"
  1382. align="center"
  1383. width="150px"
  1384. label="上传人"
  1385. >
  1386. <template slot-scope="scope">
  1387. <el-input
  1388. v-model="scope.row.createBy"
  1389. disabled
  1390. placeholder="上传人"
  1391. show-word-limit
  1392. />
  1393. </template>
  1394. </el-table-column>
  1395. <el-table-column
  1396. prop="fUrl"
  1397. header-align="center"
  1398. align="center"
  1399. width="150px"
  1400. label="操作"
  1401. >
  1402. <template slot-scope="scope">
  1403. <!-- <el-upload-->
  1404. <!-- class="upload-demo"-->
  1405. <!-- :action="uploadImgUrl"-->
  1406. <!-- :on-success="(res,file)=>{handleSucces(scope,res,file)}"-->
  1407. <!-- :headers="headers"-->
  1408. <!-- style="width:25%;float: left"-->
  1409. <!-- :show-file-list="false"-->
  1410. <!-- :limit="1"-->
  1411. <!-- >-->
  1412. <!-- <el-button size="small" type="primary" style="margin-left:20px">点击上传</el-button>-->
  1413. <!-- </el-upload>-->
  1414. <el-button size="small" type="primary" @click="checkFile(scope)">查看</el-button>
  1415. <!-- <el-button size="small" type="primary" @click="deleteFile(scope)">删除</el-button>-->
  1416. </template>
  1417. </el-table-column>
  1418. </el-table>
  1419. <span slot="footer" class="dialog-footer">
  1420. <el-button @click="dialogVisible = false">取 消</el-button>
  1421. <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  1422. </span>
  1423. </el-dialog>
  1424. </div>
  1425. </template>
  1426. <script>
  1427. import {
  1428. listCorps,
  1429. addmodify,
  1430. getCntr,
  1431. postApproval,
  1432. listFees,
  1433. getGoodName,
  1434. getFName,
  1435. getfee,
  1436. getName,
  1437. portInquiry,
  1438. nameOfVessel,
  1439. voyageNumber,
  1440. reject
  1441. } from '@/api/kaihe/domesticTrade/orderInformation'
  1442. import Global from '@/layout/components/global'
  1443. import { getToken } from '@/utils/auth'
  1444. import Cookies from 'js-cookie'
  1445. import draggable from 'vuedraggable'
  1446. import Vue from 'vue'
  1447. import AddOrUpdate from '@/views/viewApproval'
  1448. import ApprovalComments from '@/views/startApproval'
  1449. import { revoke, revokeTwo } from '@/api/warehouseBusiness/warehouseInStock'
  1450. import { queryUserVal } from '@/api/system/user'
  1451. Vue.directive('dialogDrag', {
  1452. bind(el, binding, vnode, oldVnode) {
  1453. const dialogHeaderEl = el.querySelector('.el-dialog__header')
  1454. const dragDom = el.querySelector('.el-dialog')
  1455. const enlarge = el.querySelector('.enlarge')
  1456. dialogHeaderEl.style.cursor = 'move'
  1457. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  1458. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null)
  1459. if (enlarge) {
  1460. enlarge.onclick = (e) => {
  1461. dragDom.style.top = '0px'
  1462. dragDom.style.left = '0px'
  1463. }
  1464. }
  1465. dialogHeaderEl.onmousedown = (e) => {
  1466. // 鼠标按下,计算当前元素距离可视区的距离
  1467. const disX = e.clientX - dialogHeaderEl.offsetLeft
  1468. const disY = e.clientY - dialogHeaderEl.offsetTop
  1469. // 获取到的值带px 正则匹配替换
  1470. let styL, styT
  1471. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  1472. if (sty.left.includes('%')) {
  1473. styL = +document.body.clientWidth * (+sty.left.replace(/\%/g, '') / 100)
  1474. styT = +document.body.clientHeight * (+sty.top.replace(/\%/g, '') / 100)
  1475. } else {
  1476. styL = +sty.left.replace(/\px/g, '')
  1477. styT = +sty.top.replace(/\px/g, '')
  1478. }
  1479. document.onmousemove = function(e) {
  1480. // 通过事件委托,计算移动的距离
  1481. const l = e.clientX - disX
  1482. const t = e.clientY - disY
  1483. // 移动当前元素
  1484. if ((t + styT) >= 0) {
  1485. dragDom.style.top = `${t + styT}px`
  1486. }
  1487. dragDom.style.left = `${l + styL}px`
  1488. // 将此时的位置传出去
  1489. // binding.value({x:e.pageX,y:e.pageY})
  1490. }
  1491. document.onmouseup = function(e) {
  1492. document.onmousemove = null
  1493. document.onmouseup = null
  1494. }
  1495. }
  1496. }
  1497. })
  1498. export default {
  1499. name: 'orderInformation',
  1500. components: {
  1501. AddOrUpdate,
  1502. ApprovalComments
  1503. },
  1504. data() {
  1505. return {
  1506. insurance:[],
  1507. etentioncargo:[],
  1508. vslidList:[],
  1509. voyidList:[],
  1510. cEsign:[],
  1511. transport:[],
  1512. paymentMethod:[],
  1513. drawee:[],
  1514. whether:false,
  1515. fStatus:[],
  1516. goods:[],
  1517. rules: {
  1518. fMblno: [{ required: true, message: ' ', trigger: 'blur' }]
  1519. },
  1520. changeNum: true,
  1521. cancelButton: true,
  1522. jumpDonot: false,
  1523. disappear: false,
  1524. businessTypeOptions: [],
  1525. id: null,
  1526. current: '',
  1527. before: '',
  1528. approVal: false,
  1529. //客户名称下拉模糊
  1530. nameOptions: [],
  1531. //字典表包装类型
  1532. packgeOptions: [],
  1533. //货名下拉
  1534. goodsOptions: [],
  1535. //箱型下拉
  1536. cntrOptions: [],
  1537. fTaxrate: '',
  1538. //结算方式
  1539. fStltypeOptions: [],
  1540. //计价单位
  1541. jFeetunitOptions: [],
  1542. //收付款费用名称字典表
  1543. fDNameOptions: [],
  1544. fCNameOptions: [],
  1545. warehouseCrList: [],
  1546. estimatedTime: {},
  1547. addOrUpdateVisible: false,
  1548. dataElist:false,
  1549. addOrUpdateVisib: false,
  1550. warehouseDrList: [],
  1551. goodsList: [],
  1552. dataList: [],
  1553. visible: false,
  1554. dataForm: {},
  1555. modify: true,
  1556. doNot: true,
  1557. activeNames: ['1', '2', '3', '4', '5', '6'],
  1558. form: {},
  1559. fMblnoOptions:[],
  1560. uploadImgUrl: process.env.VUE_APP_BASE_API + '/common/upload', // 上传的图片服务器地址
  1561. relevantAttachments: [],
  1562. headers: { Authorization: 'Bearer ' + getToken() },
  1563. //集装箱尺码字典表
  1564. CntrsizeOptions: [],
  1565. //模糊查询箱类型
  1566. typeOptions: [],
  1567. //附件上传弹窗
  1568. dialogVisible: false,
  1569. //调箱动作字典表
  1570. boxActionOptions: [],
  1571. //集装箱主字典表
  1572. ownerOptions: [],
  1573. //模糊下拉查询地点
  1574. addressOptions: [],
  1575. //空重字典表
  1576. updateEFOptions: [],
  1577. //状态字典表
  1578. cntrstatusOptions: [],
  1579. // 遮罩层
  1580. loading: true,
  1581. // 选中数组
  1582. ids: [],
  1583. // 显示搜索条件
  1584. showSearch: true,
  1585. // 总条数
  1586. total: 0,
  1587. // 客户详情表格数据
  1588. corpsList: [],
  1589. // 查询参数
  1590. select: '',
  1591. querDate: [],
  1592. file: [],
  1593. row: [],
  1594. res: [],
  1595. formList:{},
  1596. approvalTwo:false,
  1597. amountDr:null,
  1598. amountCr:null
  1599. }
  1600. },
  1601. //页面跳转后传递参数
  1602. activated() {
  1603. if (this.$route.query.testing)this.dataElist = true
  1604. this.modify = true
  1605. let formDate
  1606. if (this.$route.query.list) {
  1607. formDate = {
  1608. fId: JSON.parse(this.$route.query.list).billId
  1609. }
  1610. this.formList = formDate
  1611. this.approVal = true
  1612. this.cancelButton = false
  1613. } else if (this.$route.query.data) {
  1614. formDate = {
  1615. fId: JSON.parse(this.$route.query.data).fId,
  1616. num: JSON.parse(this.$route.query.data).num
  1617. }
  1618. this.id = formDate.fId
  1619. this.formList = {
  1620. fId: formDate.fId
  1621. }
  1622. this.approVal = false
  1623. }else if (this.$route.query.testing){
  1624. console.log(this.$route.query.testing)
  1625. formDate = {
  1626. fId:JSON.parse(this.$route.query.testing).billId
  1627. }
  1628. this.formList = formDate
  1629. this.approvalTwo = true
  1630. this.cancelButton = false
  1631. }
  1632. if (formDate) {
  1633. addmodify(formDate).then(response => {
  1634. console.log(response)
  1635. if(response.code == 200){
  1636. this.form = response.rows[0]
  1637. if (this.form.fMblno == null) {
  1638. this.changeNum = false
  1639. } else {
  1640. this.changeNum = true
  1641. }
  1642. let data = {
  1643. actId: 460,
  1644. id: this.form.fId
  1645. }
  1646. getName(data).then(response => {
  1647. if (response.data.length != 0) {
  1648. this.before = response.data[0].userName
  1649. }
  1650. })
  1651. queryUserVal().then((response) => {
  1652. this.current = response.user.userName
  1653. if (formDate.num) {
  1654. if (this.form.moneyStatus >= 4) {
  1655. this.jumpDonot = true
  1656. }
  1657. if (this.current == this.before) {
  1658. this.disappear = false
  1659. }
  1660. } else {
  1661. this.jumpDonot = true
  1662. this.disappear = true
  1663. }
  1664. })
  1665. this.$set(this.form,'fPaymode',JSON.stringify(this.form.fPaymode))
  1666. this.$set(this.form,'fSign',JSON.stringify(this.form.fSign))
  1667. this.$set(this.form,'fDetentioncargo',JSON.stringify(this.form.fDetentioncargo))
  1668. this.goodsList = response.rows[0].tWarehousebillsCntrList
  1669. this.estimatedTime = response.rows[0].tVoyageL
  1670. if (response.rows[0].tWarehousebillsCntritemsList !== null) {
  1671. this.dataList = response.rows[0].tWarehousebillsCntritemsList
  1672. }else this.dataList = []
  1673. this.loading = false
  1674. if (response.rows[0].tWarehousebillsfeesDr) {
  1675. this.warehouseDrList = response.rows[0].tWarehousebillsfeesDr
  1676. for (let item in this.warehouseDrList) {
  1677. this.$set(this.warehouseDrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseDrList[item].fFeeunitid))
  1678. // this.$set(this.warehouseDrList[item], 'fCorpid', JSON.stringify(this.warehouseDrList[item].fCorpid))
  1679. }
  1680. }
  1681. if (response.rows[0].warehousebillsfeesCr) {
  1682. this.warehouseCrList = response.rows[0].warehousebillsfeesCr
  1683. for (let item in this.warehouseCrList) {
  1684. this.$set(this.warehouseCrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseCrList[item].fFeeunitid))
  1685. }
  1686. }
  1687. }
  1688. })
  1689. }
  1690. },
  1691. created() {
  1692. nameOfVessel().then(res =>{
  1693. this.vslidList = res.rows
  1694. })
  1695. voyageNumber().then(res =>{
  1696. this.voyidList = res.rows
  1697. })
  1698. portInquiry().then(res =>{
  1699. this.fMblnoOptions = res.rows;
  1700. })
  1701. this.getDicts('data_unitfees').then((response) => {
  1702. if (response.data) {
  1703. this.jFeetunitOptions = response.data
  1704. }
  1705. })
  1706. this.getDicts('data_stltype_type').then((response) => {
  1707. if (response.data) {
  1708. this.fStltypeOptions = response.data
  1709. }
  1710. })
  1711. this.getDicts('tax_rate').then((response) => {
  1712. if (response.data) {
  1713. this.fTaxrate = response.data[0].dictValue
  1714. }
  1715. })
  1716. this.getDicts('f_packageid').then((response) => {
  1717. if (response.data) {
  1718. this.packgeOptions = response.data
  1719. }
  1720. })
  1721. this.getDicts('data_billType').then((response) => {
  1722. if (response.data) {
  1723. this.businessTypeOptions = response.data
  1724. }
  1725. })
  1726. this.getDicts('f_updateEF').then((response) => {
  1727. if (response.data) {
  1728. this.fStatus = response.data
  1729. }
  1730. })
  1731. this.getDicts('f_serviceitems').then((response) => {
  1732. if (response.data) {
  1733. this.transport = response.data
  1734. }
  1735. })
  1736. this.getDicts('f_paymode').then((response) => {
  1737. if (response.data) {
  1738. this.paymentMethod = response.data
  1739. }
  1740. })
  1741. this.getDicts('f_invoceobj').then((response) => {
  1742. if (response.data) {
  1743. this.drawee = response.data
  1744. }
  1745. })
  1746. this.getDicts('f_sign').then((response) => {
  1747. if (response.data) {
  1748. this.cEsign = response.data
  1749. }
  1750. })
  1751. this.getDicts('f_detentioncargo').then((response) => {
  1752. if (response.data) {
  1753. this.etentioncargo = response.data
  1754. }
  1755. })
  1756. this.getDicts('f_insurance').then((response) => {
  1757. if (response.data) {
  1758. this.insurance = response.data
  1759. }
  1760. })
  1761. this.cntrtypeRemoteMethod()
  1762. this.goodRemoteMethod()
  1763. this.nameRemoteMethod()
  1764. this.fWRemoteMethod()
  1765. this.queryGoods()
  1766. let queryParams = { pageNum: 1, fDc: 'C' }
  1767. listFees(queryParams).then((response) => {
  1768. this.fCNameOptions = response.rows
  1769. })
  1770. let query = { pageNum: 1, fDc: 'D' }
  1771. listFees(query).then((response) => {
  1772. this.fDNameOptions = response.rows
  1773. })
  1774. },
  1775. methods: {
  1776. rejectDeletion(){
  1777. this.$confirm('驳回并删除, 是否继续?', '提示', {
  1778. confirmButtonText: '确定',
  1779. cancelButtonText: '取消',
  1780. type: 'warning'
  1781. }).then(() => {
  1782. reject(this.form.fId).then(res =>{
  1783. if (res.code === 200) {
  1784. this.$message({
  1785. type: 'success',
  1786. message: '删除成功!'
  1787. });
  1788. this.cancelTwo()
  1789. }
  1790. })
  1791. }).catch(() => {
  1792. this.$message({
  1793. type: 'info',
  1794. message: '已取消'
  1795. });
  1796. });
  1797. },
  1798. seleEt(scope) {
  1799. console.log(scope)
  1800. for (let item in this.cntrOptions) {
  1801. if (this.cntrOptions[item].fId === scope.row.fCntrid) {
  1802. if (this.cntrOptions[item].fType === 2) {
  1803. this.whether = true;
  1804. return;
  1805. } else {
  1806. this.whether = false;
  1807. return;
  1808. }
  1809. }
  1810. }
  1811. },
  1812. throttleOpening(res) {
  1813. if (res <= 100) {
  1814. } else {
  1815. this.list.fDraught = '';
  1816. this.$message({
  1817. showClose: true,
  1818. message: '不能大于100%或小于0%',
  1819. type: 'error',
  1820. offset: 90
  1821. });
  1822. }
  1823. },
  1824. temperature(res) {
  1825. if (res < 20 && res > -30) {
  1826. } else if (res == '-') {
  1827. } else {
  1828. this.list.fTemperature = '';
  1829. this.$message({
  1830. showClose: true,
  1831. message: '冷藏箱温度为-30℃至20℃之间的整数',
  1832. type: 'error',
  1833. offset: 90
  1834. });
  1835. }
  1836. },
  1837. selectChange(scope) {
  1838. for (let item in this.goods) {
  1839. if (this.goods[item].fId === scope.row.fGoodsid) {
  1840. scope.row.typeidName = this.goods[item].typeName;
  1841. }
  1842. }
  1843. },
  1844. queryGoods() {
  1845. getGoodName().then(res=>{
  1846. if(res.code == 200){
  1847. this.goods = res.data
  1848. }
  1849. })
  1850. },
  1851. homePage() {
  1852. this.open = false
  1853. let view = {
  1854. fullPath: '/finance/contrast',
  1855. hash: '',
  1856. matched: Array(2),
  1857. meta: Object,
  1858. name: 'Contrast',
  1859. params: Object,
  1860. path: '/finance/contrast',
  1861. query: Object,
  1862. title: '对账'
  1863. }
  1864. this.$router.push({ path: '/index' })
  1865. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  1866. if (this.isActive(view)) {
  1867. this.toLastView(visitedViews, view)
  1868. }
  1869. })
  1870. Global.$emit('removeCache', 'closeSelectedTag', view)
  1871. },
  1872. cancel() {
  1873. if (this.form.moneyStatus === 4 ||
  1874. this.form.fBillstatus === 4 ||
  1875. this.form.fBillstatus === 9 ||
  1876. this.modify == true) {
  1877. this.$router.push({ path: '/domesticTrade/myOrder' })
  1878. } else {
  1879. this.$confirm('返回列表,是否保存?', '提示', {
  1880. confirmButtonText: '保存',
  1881. cancelButtonText: '取消',
  1882. type: 'warning'
  1883. })
  1884. .then(() => {
  1885. this.approval()
  1886. })
  1887. .catch(() => {
  1888. this.$router.push({ path: '/domesticTrade/myOrder' })
  1889. this.modify = true
  1890. })
  1891. }
  1892. },
  1893. //撤销审批
  1894. revokeTwo(status) {
  1895. let data = {
  1896. actId: 460,
  1897. billId: this.form.fId,
  1898. id: this.form.fId,
  1899. fidStatus: status,
  1900. }
  1901. revokeTwo(data).then((data) => {
  1902. if (data.code === 200) {
  1903. this.msgSuccess('撤销成功')
  1904. this.jumpDonot = false
  1905. if (this.formList) {
  1906. addmodify(this.formList).then(response => {
  1907. this.form = response.rows[0]
  1908. let data = {
  1909. actId: 460,
  1910. id: this.form.fId
  1911. }
  1912. getName(data).then(response => {
  1913. if (response.data.length != 0) {
  1914. this.before = response.data[0].userName
  1915. }
  1916. })
  1917. queryUserVal().then((response) => {
  1918. this.current = response.user.userName
  1919. })
  1920. this.goodsList = response.rows[0].tWarehousebillsCntrList
  1921. this.estimatedTime = response.rows[0].tVoyageL
  1922. if (response.rows[0].tWarehousebillsCntritemsList !== null) {
  1923. this.dataList = response.rows[0].tWarehousebillsCntritemsList
  1924. }else this.dataList = []
  1925. this.loading = false
  1926. if (response.rows[0].tWarehousebillsfeesDr) {
  1927. this.warehouseDrList = response.rows[0].tWarehousebillsfeesDr
  1928. for (let item in this.warehouseDrList) {
  1929. this.$set(this.warehouseDrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseDrList[item].fFeeunitid))
  1930. }
  1931. }
  1932. if (response.rows[0].warehousebillsfeesCr) {
  1933. this.warehouseCrList = response.rows[0].warehousebillsfeesCr
  1934. for (let item in this.warehouseCrList) {
  1935. this.$set(this.warehouseCrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseCrList[item].fFeeunitid))
  1936. }
  1937. }
  1938. // if(this.current == this.before)
  1939. // this.disappear = false;
  1940. })
  1941. }
  1942. this.reset()
  1943. }
  1944. })
  1945. },
  1946. //费用提交审核
  1947. feeSubmission() {
  1948. if (!this.warehouseDrList && !this.warehouseCrList) {
  1949. this.$message.error('请维护费用')
  1950. return false
  1951. }
  1952. if (this.warehouseDrList) {
  1953. for (let li in this.warehouseDrList) {
  1954. if (!this.warehouseDrList[li].fBusinessType) {
  1955. this.$message.error('应收费用第' + (Number(li) + 1) + '行业务类型为空,请维护业务类型')
  1956. return false
  1957. } else if (!this.warehouseDrList[li].fCorpid) {
  1958. this.$message.error('应收费用第' + (Number(li) + 1) + '行客户名称为空,请维护客户名称')
  1959. return false
  1960. } else if (!this.warehouseDrList[li].fFeeid) {
  1961. this.$message.error('应收费用第' + (Number(li) + 1) + '行费用名称为空,请维护费用名称')
  1962. return false
  1963. } else if (!this.warehouseDrList[li].fQty) {
  1964. this.$message.error('应收费用第' + (Number(li) + 1) + '行数量为空,请维护数量')
  1965. return false
  1966. } else if (!this.warehouseDrList[li].fUnitprice) {
  1967. this.$message.error('应收费用第' + (Number(li) + 1) + '行单价为空,请维护单价')
  1968. return false
  1969. }
  1970. }
  1971. }
  1972. if (this.warehouseCrList) {
  1973. for (let li in this.warehouseCrList) {
  1974. if (!this.warehouseCrList[li].fBusinessType) {
  1975. this.$message.error('应付费用第' + (Number(li) + 1) + '行业务类型为空,请维护业务类型')
  1976. return false
  1977. } else if (!this.warehouseDrList[li].fCorpid) {
  1978. this.$message.error('应付费用第' + (Number(li) + 1) + '行客户名称为空,请维护客户名称')
  1979. return false
  1980. } else if (!this.warehouseDrList[li].fFeeid) {
  1981. this.$message.error('应付费用第' + (Number(li) + 1) + '行费用名称为空,请维护费用名称')
  1982. return false
  1983. } else if (!this.warehouseDrList[li].fQty) {
  1984. this.$message.error('应付费用第' + (Number(li) + 1) + '行数量为空,请维护数量')
  1985. return false
  1986. } else if (!this.warehouseDrList[li].fUnitprice) {
  1987. this.$message.error('应付费用第' + (Number(li) + 1) + '行单价为空,请维护单价')
  1988. return false
  1989. }
  1990. }
  1991. }
  1992. let form = {
  1993. fId: this.form.fId,
  1994. fMblno: this.form.fMblno
  1995. }
  1996. let formData = new window.FormData()
  1997. for (let li in this.warehouseDrList) {
  1998. this.warehouseDrList[li].fMblno = this.form.fMblno
  1999. for (let item in this.nameOptions) {
  2000. if (this.warehouseDrList[li].fCorpid == this.nameOptions[item].fName) {
  2001. this.warehouseDrList[li].fCorpid = this.nameOptions[item].fId
  2002. }
  2003. }
  2004. }
  2005. for (let li in this.warehouseCrList) {
  2006. this.warehouseCrList[li].fMblno = this.form.fMblno
  2007. }
  2008. formData.append('tWarehousebills', JSON.stringify(form))
  2009. formData.append('tWarehousebillsCntritems', JSON.stringify(this.dataList))
  2010. formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
  2011. formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
  2012. getfee(formData).then(response => {
  2013. this.$message.success('操作成功')
  2014. this.form.moneyStatus = 4
  2015. this.jumpDonot = true
  2016. this.modify = true
  2017. let data = {
  2018. actId: 460,
  2019. id: this.form.fId
  2020. }
  2021. getName(data).then(response => {
  2022. if (response.data.length != 0) {
  2023. this.before = response.data[0].userName
  2024. if (this.current == this.before) {
  2025. this.disappear = false
  2026. }
  2027. }
  2028. })
  2029. })
  2030. },
  2031. //箱信息操作限制
  2032. cntrWeight(res) {
  2033. if (res < 40 && res > 0) {
  2034. return
  2035. } else if (res == '' || res == null) {
  2036. } else {
  2037. this.$message({
  2038. showClose: true,
  2039. message: '单箱重量应在0-40吨之间',
  2040. type: 'error',
  2041. offset: 90
  2042. })
  2043. }
  2044. },
  2045. //获取客户名称下拉
  2046. nameRemoteMethod() {
  2047. let queryParams = { pageNum: 1 }
  2048. getFName(queryParams).then(response => {
  2049. this.nameOptions = response.data
  2050. })
  2051. },
  2052. //货名下拉
  2053. goodRemoteMethod() {
  2054. let queryParams = { pageNum: 1 }
  2055. getGoodName(queryParams).then(response => {
  2056. this.goodsOptions = response.data
  2057. })
  2058. },
  2059. //箱型下拉获取
  2060. cntrtypeRemoteMethod() {
  2061. let queryParams = { pageNum: 1 }
  2062. getCntr(queryParams).then(response => {
  2063. this.cntrOptions = response.rows
  2064. })
  2065. },
  2066. //计价单位
  2067. // corpsRemoteMethod(name) {
  2068. // if (name == null || name === "") {
  2069. // return false;
  2070. // }
  2071. // let queryParams = { pageNum: 1, fName: name, type: 1 };
  2072. // listCorps(queryParams).then((response) => {
  2073. // this.fMblnoOptions = response.rows;
  2074. // this.KHblnoOptions = response.rows;
  2075. // });
  2076. // },
  2077. //应付信息新行
  2078. addpayment() {
  2079. this.warehouseCrList.push({
  2080. fBusinessType: null,
  2081. fCorpid: null,
  2082. fFeeid: null,
  2083. fFeeUnitid: '7',
  2084. fQty: null,
  2085. fUnitprice: null,
  2086. fAmount: null,
  2087. fStltypeid: null,
  2088. fCurrency: 'RMB',
  2089. fExrate: '1',
  2090. fTaxrate: this.fTaxrate,
  2091. fSrcTypeId: 0,
  2092. remark: null
  2093. })
  2094. },
  2095. // 数量计算
  2096. changeContractAmt(row) {
  2097. let fQty = 0
  2098. let fUnitprice = 0
  2099. if (row.fUnitprice) {
  2100. fUnitprice = row.fUnitprice
  2101. }
  2102. if (row.fQty) {
  2103. fQty = row.fQty
  2104. }
  2105. this.$set(row, 'fAmount', parseFloat(Number(fUnitprice) * Number(fQty)).toFixed(2))
  2106. },
  2107. // 变更计价单位
  2108. changeFeeUnit(row) {
  2109. if (!row.fFeeUnitid) {
  2110. return false
  2111. }
  2112. // if (row.fFeeUnitid === "2") {
  2113. // this.$set(row, "fQty", (this.fGrossweight / 1000).toFixed(2));
  2114. // } else if (row.fFeeUnitid === "1") {
  2115. // this.$set(row, "fQty", this.fQty);
  2116. // } else if (row.fFeeUnitid === "3") {
  2117. // this.$set(row, "fQty", (this.fNetweight / 1000).toFixed(2));
  2118. // } else if (row.fFeeUnitid === "7") {
  2119. // this.$set(row, "fQty", this.fCntqty);
  2120. // } else {
  2121. // this.$set(row, "fQty", 0);
  2122. // }
  2123. if (row.fUnitprice) {
  2124. this.$set(
  2125. row,
  2126. 'fAmount',
  2127. parseFloat(Number(row.fUnitprice) * Number(row.fQty)).toFixed(2)
  2128. )
  2129. }
  2130. },
  2131. // 选择费用信息时获取计价单位
  2132. // changeFeeId(row) {
  2133. // for (let li in this.fWbuOptions) {
  2134. // if (row.fFeeid === this.fWbuOptions[li].fId) {
  2135. // this.$set(row, "fFeeUnitid", this.fWbuOptions[li].fFeeunitid + "");
  2136. // this.changeFeeUnit(row);
  2137. // break;
  2138. // }
  2139. // }
  2140. // },
  2141. // 远程模糊查询费用名称
  2142. fWRemoteMethod(name) {
  2143. if (name == null || name === '') {
  2144. return false
  2145. }
  2146. let queryParams = { pageNum: 1, fDc: 'C', fName: name }
  2147. listFees(queryParams).then((response) => {
  2148. this.fCNameOptions = response.rows
  2149. })
  2150. let query = { pageNum: 1, fDc: 'D', fName: name }
  2151. listFees(query).then((response) => {
  2152. this.fDNameOptions = response.rows
  2153. })
  2154. },
  2155. // 收款合计
  2156. warehouseDrSummaries(param) {
  2157. const { columns, data } = param
  2158. const sums = []
  2159. columns.forEach((column, index) => {
  2160. if (index === 0) {
  2161. sums[index] = '合计'
  2162. return
  2163. } else if (column.label == '单价' || column.label == '数量' || column.label == '金额') {
  2164. const values = data.map((item) => Number(item[column.property]));
  2165. if (!values.every((value) => isNaN(value))) {
  2166. sums[index] = values.reduce((prev, curr) => {
  2167. const value = Number(curr);
  2168. if (!isNaN(value)) {
  2169. return prev + curr;
  2170. } else {
  2171. return prev;
  2172. }
  2173. }, 0);
  2174. }
  2175. }
  2176. });
  2177. this.amountDr = sums[8]
  2178. return sums
  2179. },
  2180. //付款合计
  2181. warehouseCrSummaries(param) {
  2182. const { columns, data } = param
  2183. const sums = []
  2184. columns.forEach((column, index) => {
  2185. if (index === 0) {
  2186. sums[index] = '合计'
  2187. return
  2188. } else if (column.label == '单价' || column.label == '数量' || column.label == '金额') {
  2189. const values = data.map((item) => Number(item[column.property]));
  2190. if (!values.every((value) => isNaN(value))) {
  2191. sums[index] = values.reduce((prev, curr) => {
  2192. const value = Number(curr);
  2193. if (!isNaN(value)) {
  2194. return prev + curr;
  2195. } else {
  2196. return prev;
  2197. }
  2198. }, 0);
  2199. }
  2200. }
  2201. });
  2202. this.amountCr = sums[8]
  2203. return sums
  2204. },
  2205. addOrUpdateHand(form,status) {
  2206. // if(form.fMblno == null){
  2207. // this.addOrUpdateVisib = false;
  2208. // this.$message.error("提单号为空,请维护提单号")
  2209. // return false
  2210. // }else{
  2211. // this.addOrUpdateVisib = true;
  2212. // }
  2213. this.$refs['form'].validate((valid) => {
  2214. if (valid) {
  2215. this.addOrUpdateVisib = true
  2216. this.$nextTick(() => {
  2217. let actId = ''
  2218. if (this.form.fBillstatus < 6) {
  2219. actId = '410'
  2220. this.$refs.ApprovalComments.init(form.fId,status,actId,this.form.fMblno)
  2221. } else if(this.form.fBillstatus > 6 && this.form.fBillstatus < 11){
  2222. actId = '420'
  2223. this.$refs.ApprovalComments.init(form.fId, status,actId)
  2224. }else if (this.form.fBillstatus == 11 && this.form.moneyStatus != null && this.form.moneyStatus < 6) {
  2225. actId = '460'
  2226. this.$refs.ApprovalComments.init(form.fId,status,actId)
  2227. }
  2228. })
  2229. } else {
  2230. this.$message.error('提单号为空,请维护提单号')
  2231. }
  2232. })
  2233. },
  2234. modifyApproval(){
  2235. this.addOrUpdateVisib = true
  2236. let list = JSON.parse(this.$route.query.testing)
  2237. this.$nextTick(() => {
  2238. let actId = ''
  2239. console.log(list)
  2240. this.addOrUpdateVisible = true
  2241. if(list.refno4 == 'XGDD'){
  2242. actId = 471
  2243. }else if (list.refno4 == 'XGTJ'){
  2244. actId = 472
  2245. }else if(list.refno4 == 'DDSC'){
  2246. actId = 473
  2247. }
  2248. this.$refs.ApprovalComments.init(this.form.fId,status,actId,this.form.fMblno)
  2249. })
  2250. },
  2251. //首页审批跳转关闭返回首页
  2252. cancelTwo() {
  2253. this.open = false
  2254. let view = {
  2255. fullPath: '/domesticTrade/orderInformation?data=%7B%22fId%22%3A687%7D',
  2256. hash: '',
  2257. matched: Array(2),
  2258. meta: Object,
  2259. name: 'OrderInformation',
  2260. params: Object,
  2261. path: '/domesticTrade/orderInformation',
  2262. query: Object,
  2263. title: '订单信息'
  2264. }
  2265. this.$router.push({ path: '/index' })
  2266. this.$store
  2267. .dispatch('tagsView/delView', view)
  2268. .then(({ visitedViews }) => {
  2269. if (this.isActive(view)) {
  2270. this.toLastView(visitedViews, view)
  2271. }
  2272. })
  2273. Global.$emit('removeCache', 'closeSelectedTag', view)
  2274. },
  2275. // 查看审批流
  2276. getDataList() {
  2277. this.addOrUpdateVisible = false
  2278. },
  2279. returnData() {
  2280. this.addOrUpdateVisib = false
  2281. this.open = false
  2282. this.cancelTwo()
  2283. },
  2284. revisionApproval(){
  2285. let list = JSON.parse(this.$route.query.testing)
  2286. let actId = ''
  2287. console.log(list)
  2288. this.addOrUpdateVisible = true
  2289. if(list.refno4 == 'XGDD'){
  2290. actId = 471
  2291. }else if (list.refno4 == 'XGTJ'){
  2292. actId = 472
  2293. }else if(list.refno4 == 'DDSC'){
  2294. actId = 473
  2295. }
  2296. this.$nextTick(() => {
  2297. this.$refs.addOrUpdate.init(this.form.fId,actId,list.fidStatus)
  2298. })
  2299. },
  2300. addOrUpdateHandle(status) {
  2301. this.addOrUpdateVisible = true
  2302. let id = '448'
  2303. let actId = ''
  2304. if (this.form.fBillstatus < 6) {
  2305. actId = '410'
  2306. } else if (this.form.moneyStatus != null && this.form.moneyStatus < 6) {
  2307. actId = '460'
  2308. } else {
  2309. actId = '420'
  2310. }
  2311. this.$nextTick(() => {
  2312. this.$refs.addOrUpdate.init(this.form.fId, actId,status)
  2313. })
  2314. },
  2315. handleSelect() {
  2316. },
  2317. //应收新行
  2318. addCollection() {
  2319. this.warehouseDrList.push({
  2320. fBusinessType: null,
  2321. fCorpid: this.form.corpName,
  2322. fFeeid: null,
  2323. fFeeUnitid: '7',
  2324. fQty: null,
  2325. fUnitprice: null,
  2326. fAmount: null,
  2327. fStltypeid: null,
  2328. fCurrency: 'RMB',
  2329. fExrate: '1',
  2330. fTaxrate: this.fTaxrate,
  2331. fSrcTypeId: 0,
  2332. remark: null
  2333. })
  2334. },
  2335. //提交审批
  2336. approval(res) {
  2337. if (!this.form.fMblno) {
  2338. this.$message.error('请维护提单号')
  2339. return false
  2340. }
  2341. // if (this.dataList.length === 0) {
  2342. // this.$message.error('请维护箱信息')
  2343. // return false
  2344. // }
  2345. if (res != 1 && this.form.fMblno || res != 1 && this.dataList.length != 0) {
  2346. this.$router.push({ path: '/domesticTrade/myOrder' })
  2347. this.modify = true
  2348. }
  2349. let form = {
  2350. fId: this.form.fId,
  2351. fMblno: this.form.fMblno
  2352. }
  2353. let formData = new window.FormData()
  2354. for (let li in this.warehouseDrList) {
  2355. this.warehouseDrList[li].fMblno = this.form.fMblno
  2356. for (let item in this.nameOptions) {
  2357. if (this.warehouseDrList[li].fCorpid == this.nameOptions[item].fName) {
  2358. this.warehouseDrList[li].fCorpid = this.nameOptions[item].fId
  2359. }
  2360. }
  2361. }
  2362. for (let item in this.warehouseCrList) {
  2363. this.warehouseCrList[item].fMblno = this.form.fMblno
  2364. }
  2365. formData.append('tWarehousebills', JSON.stringify(this.form))
  2366. formData.append("tWarehousebillsCntr",JSON.stringify(this.goodsList))
  2367. formData.append('tWarehousebillsCntritems', JSON.stringify(this.dataList))
  2368. formData.append('tWarehousebillsfeesDr', JSON.stringify(this.warehouseDrList))
  2369. formData.append('tWarehousebillsfeesCr', JSON.stringify(this.warehouseCrList))
  2370. postApproval(formData).then(response => {
  2371. this.msgSuccess('操作成功')
  2372. if (response.data.tWarehouseBills) {
  2373. this.form = response.data.tWarehouseBills
  2374. this.$set(this.form,'fPaymode',JSON.stringify(this.form.fPaymode))
  2375. this.$set(this.form,'fSign',JSON.stringify(this.form.fSign))
  2376. this.$set(this.form,'fDetentioncargo',JSON.stringify(this.form.fDetentioncargo))
  2377. }
  2378. if(response.data.tWarehousebillsCntrList){
  2379. this.goodsList = response.data.tWarehousebillsCntrList
  2380. }
  2381. if (response.data.tWarehousebillsCntritemsList !== null) {
  2382. this.dataList = response.data.tWarehousebillsCntritemsList
  2383. }else this.dataList = []
  2384. if (response.data.warehousebillsfeesCrList) {
  2385. this.warehouseCrList = response.data.warehousebillsfeesCrList
  2386. for (let item in this.warehouseCrList) {
  2387. this.$set(this.warehouseCrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseCrList[item].fFeeunitid))
  2388. }
  2389. }
  2390. if (response.data.warehousebillsfeesDrList) {
  2391. this.warehouseDrList = response.data.warehousebillsfeesDrList
  2392. for (let item in this.warehouseDrList) {
  2393. this.$set(this.warehouseDrList[item], 'fFeeUnitid', JSON.stringify(this.warehouseDrList[item].fFeeunitid))
  2394. }
  2395. }
  2396. })
  2397. },
  2398. //新行
  2399. addList() {
  2400. this.dataList.push({
  2401. fManual: '1',
  2402. fCntrno: null,
  2403. fSealno: null,
  2404. fCntrweight: null,
  2405. fGoodsid: null,
  2406. fPackageid: null,
  2407. fCntrid: null
  2408. })
  2409. },
  2410. //查看附件
  2411. check(status) {
  2412. this.dialogVisible = true
  2413. if (status === 1) {
  2414. } else {
  2415. }
  2416. },
  2417. saveFile() {
  2418. this.row.accessoryList = this.file
  2419. this.dialogVisible = false
  2420. this.relevantAttachments = []
  2421. },
  2422. deleteRow(index, rows) {
  2423. rows.splice(index, 1)
  2424. },
  2425. //多选框选中
  2426. handleSelectionChange(selection) {
  2427. this.ids = selection.map(item => item.fId)
  2428. this.select = selection
  2429. }
  2430. }
  2431. }
  2432. </script>
  2433. <style lang="scss" scoped>
  2434. .tabSetting {
  2435. display: flex;
  2436. justify-content: flex-end;
  2437. }
  2438. .listStyle {
  2439. display: flex;
  2440. border-top: 1px solid #dcdfe6;
  2441. border-left: 1px solid #dcdfe6;
  2442. border-right: 1px solid #dcdfe6;
  2443. }
  2444. .listStyle:last-child {
  2445. border-bottom: 1px solid #dcdfe6;
  2446. }
  2447. .progress {
  2448. display: flex;
  2449. align-items: center;
  2450. padding: 2px;
  2451. background-color: rgba(0, 0, 0, 0.05);
  2452. height: 100%;
  2453. }
  2454. .el-form {
  2455. padding-top: 20px;
  2456. //border-top:1px dashed #ccc;
  2457. }
  2458. .selectForm > > > .el-form-item__label {
  2459. font-size: 12px !important;
  2460. }
  2461. .app-container /deep/ .el-collapse-item__content{
  2462. padding-bottom:0
  2463. }
  2464. </style>
  2465. <style lang="scss">
  2466. .el-collapse-item__header {
  2467. font-size: 16px;
  2468. font-weight: bolder;
  2469. padding-left: 5px;
  2470. background-color: #f8f8f9;
  2471. }
  2472. .el-form-item__label {
  2473. font-size: 12px;
  2474. }
  2475. </style>