index.vue 58 KB

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