index.vue 70 KB

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