index.vue 58 KB

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