index.vue 79 KB

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