index.vue 37 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams"
  5. :inline="true"
  6. v-show="showSearch"
  7. label-width="100px"
  8. >
  9. <el-form-item label="申请编号" prop="fCtrlcorpid">
  10. <el-input
  11. :disabled="doNot"
  12. v-model="queryParams.fCtrlcorpid"
  13. placeholder="请输入货权方"
  14. clearable
  15. size="small"
  16. style="width: 200px"
  17. />
  18. </el-form-item>
  19. <el-form-item label="客户名称" prop="fCorpid">
  20. <el-input
  21. :disabled="doNot"
  22. v-model="queryParams.fCorpid"
  23. filterable
  24. remote
  25. clearable
  26. size="small"
  27. style="width: 200px"
  28. placeholder="请输入结算单位"
  29. >
  30. </el-input>
  31. </el-form-item>
  32. <el-form-item label="开票单位" prop="fAccbilldate">
  33. <el-date-picker
  34. clearable
  35. :disabled="doNot"
  36. size="small"
  37. style="width: 200px"
  38. v-model="queryParams.fAccbilldate"
  39. type="date"
  40. value-format="yyyy-MM-dd"
  41. placeholder="选择账单日期"
  42. >
  43. </el-date-picker>
  44. </el-form-item>
  45. <el-form-item label="申请人" prop="fBillno">
  46. <el-input
  47. :disabled="doNot"
  48. v-model="queryParams.fBillno"
  49. placeholder="请输入系统编号"
  50. clearable
  51. style="width: 200px"
  52. size="small"
  53. />
  54. </el-form-item>
  55. <el-form-item label="金额合计" prop="chargingMethod">
  56. <el-input
  57. :disabled="doNot"
  58. v-model="queryParams.chargingMethod"
  59. placeholder="请选择收费方式"
  60. clearable
  61. style="width: 200px"
  62. size="small"
  63. >
  64. </el-input>
  65. </el-form-item>
  66. <el-form-item label="申请日期" prop="bank">
  67. <el-input
  68. :disabled="doNot"
  69. v-model="queryParams.bank"
  70. placeholder="请输入收款银行"
  71. clearable
  72. size="small"
  73. style="width: 200px"
  74. />
  75. </el-form-item>
  76. <el-form-item label="税率" prop="invoiceNo">
  77. <el-input
  78. :disabled="doNot"
  79. v-model="queryParams.invoiceNo"
  80. placeholder="请输入发票号"
  81. clearable
  82. size="small"
  83. style="width: 200px"
  84. />
  85. </el-form-item>
  86. <el-form-item label="备注" prop="fRemarks">
  87. <el-input
  88. :disabled="doNot"
  89. v-model="queryParams.fRemarks"
  90. placeholder="请输入备注"
  91. clearable
  92. size="small"
  93. style="width: 200px"
  94. />
  95. </el-form-item>
  96. </el-form>
  97. <el-row :gutter="10" class="mb8">
  98. <el-col :span="1.5">
  99. <el-button
  100. type="primary"
  101. @click=""
  102. size="small"
  103. :disabled="doNot"
  104. >请核</el-button
  105. >
  106. </el-col>
  107. <div class="tabSetting">
  108. <right-toolbar
  109. :showSearch.sync="showSearch"
  110. @queryTable="getList"
  111. ></right-toolbar>
  112. <div style="margin: 0 12px">
  113. <el-button
  114. icon="el-icon-setting"
  115. size="mini"
  116. circle
  117. @click="feeInfo ? showSetting = !showSetting : showSetting2 = !showSetting2"
  118. ></el-button>
  119. </div>
  120. </div>
  121. </el-row>
  122. <el-dialog
  123. title="自定义列显示"
  124. :visible.sync="feeInfo ? showSetting :showSetting2"
  125. width="700px"
  126. v-dialogDrag
  127. >
  128. <template slot="title">
  129. <div class="avue-crud__dialog__header">
  130. <span class="el-dialog__title">
  131. <span
  132. style="
  133. display: inline-block;
  134. width: 3px;
  135. height: 20px;
  136. margin-right: 5px;
  137. float: left;
  138. margin-top: 2px;
  139. "
  140. ></span>
  141. </span>
  142. </div>
  143. </template>
  144. <div>配置排序列数据(拖动调整顺序)</div>
  145. <div style="margin-left: 17px">
  146. <el-checkbox
  147. v-model="feeInfo ? allCheck : allCheck2"
  148. label="全选"
  149. @change="feeInfo ? allChecked : allChecked2"
  150. ></el-checkbox>
  151. </div>
  152. <div style="padding: 4px; display: flex; justify-content: center">
  153. <draggable
  154. v-model="feeInfo ? setRowList : setRowList2"
  155. group="site"
  156. animation="300"
  157. @start="onStart"
  158. @end="onEnd"
  159. handle=".indraggable"
  160. >
  161. <transition-group>
  162. <div
  163. v-for="item in feeInfo ? setRowList : setRowList2"
  164. :key="item.surface"
  165. class="listStyle"
  166. >
  167. <div style="width: 500px" class="indraggable">
  168. <div class="progress" :style="{ width: item.width + 'px' }">
  169. <el-checkbox
  170. :label="item.name"
  171. v-model="item.checked"
  172. :true-label="0"
  173. :false-label="1"
  174. >{{ item.name }}
  175. </el-checkbox>
  176. </div>
  177. </div>
  178. <el-input-number
  179. v-model.number="item.width"
  180. controls-position="right"
  181. :min="1"
  182. :max="500"
  183. size="mini"
  184. ></el-input-number>
  185. </div>
  186. </transition-group>
  187. </draggable>
  188. </div>
  189. <span slot="footer" class="dialog-footer">
  190. <el-button @click="feeInfo ? showSetting = false : showSetting2 = false">取 消</el-button>
  191. <el-button @click="delRow" type="danger">重 置</el-button>
  192. <el-button type="primary" @click="feeInfo ? save() : save2()">确 定</el-button>
  193. </span>
  194. </el-dialog>
  195. <el-menu
  196. :default-active="activeIndex"
  197. class="el-menu-demo"
  198. mode="horizontal"
  199. @select="handleSelect"
  200. text-color="#000"
  201. active-text-color="#ffd04b"
  202. style="display: flex;"
  203. >
  204. <div style="display: flex;">
  205. <el-menu-item index="1">费用信息</el-menu-item>
  206. <el-menu-item index="2">发票信息</el-menu-item>
  207. </div>
  208. </el-menu>
  209. <div style="margin:10px">
  210. <el-button
  211. type="success"
  212. size="small"
  213. @click="addList"
  214. v-if="invoiceInfo"
  215. >新行</el-button
  216. >
  217. <el-button
  218. type="success"
  219. size="small"
  220. @click="openSearch"
  221. v-if="feeInfo"
  222. :disabled="doNot"
  223. >检索</el-button
  224. >
  225. </div>
  226. <el-table
  227. v-if="feeInfo"
  228. v-loading="loading"
  229. :data="feeList"
  230. @selection-change="handleSelectionChange_s"
  231. >
  232. <el-table-column type="selection" width="55" align="center"/>
  233. <el-table-column label="序号" type="index" align="center" fixed/>
  234. <el-table-column
  235. v-for="(item, index) in getRowList"
  236. :key="index"
  237. :label="item.name"
  238. :width="item.width"
  239. :prop="item.label"
  240. align="center"
  241. :show-overflow-tooltip="true"
  242. sortable
  243. :fixed="item.fixed"
  244. />
  245. <el-table-column
  246. label="操作"
  247. align="center"
  248. class-name="small-padding fixed-width"
  249. >
  250. <template slot-scope="scope">
  251. <el-button
  252. size="mini"
  253. type="text"
  254. icon="el-icon-delete"
  255. @click.native.prevent="deleteRow(scope.$index, invoiceList)"
  256. >删除
  257. </el-button>
  258. </template>
  259. </el-table-column>
  260. </el-table>
  261. <el-table
  262. v-if="invoiceInfo"
  263. v-loading="loading"
  264. :data="invoiceList"
  265. @selection-change="handleSelectionChange_s"
  266. >
  267. <el-table-column type="selection" width="55" align="center"/>
  268. <el-table-column label="序号" type="index" align="center" />
  269. <el-table-column
  270. v-for="(item, index) in getRowList2"
  271. :key="index"
  272. :label="item.name"
  273. :width="item.width"
  274. :prop="item.label"
  275. align="center"
  276. :show-overflow-tooltip="true"
  277. sortable
  278. :fixed="item.fixed"
  279. >
  280. <template slot-scope="scope">
  281. <el-select v-model="scope.row.fFeeName" v-if="item.label == 'fFeeName'">
  282. <el-option
  283. v-for="(dict, index) in fDNameOptions"
  284. :key="index.fId"
  285. :label="dict.fName"
  286. :value="dict.fId"
  287. ></el-option>
  288. </el-select>
  289. <el-input v-model="scope.row.fModel" v-if="item.label == 'fModel'"/>
  290. <el-input v-model="scope.row.fSbuName" v-if="item.label == 'fSbuName'"/>
  291. <el-input v-model="scope.row.fNumber" v-if="item.label == 'fNumber'"/>
  292. <el-input v-model="scope.row.fUnitprice" v-if="item.label == 'fUnitprice'"/>
  293. <el-input v-model="scope.row.fMoney" v-if="item.label == 'fMoney'"/>
  294. <el-input v-model="scope.row.fTaxrate" v-if="item.label == 'fTaxrate'"/>
  295. <el-input v-model="scope.row.fTax" v-if="item.label == 'fTax'"/>
  296. <el-input v-model="scope.row.fAmount" v-if="item.label == 'fAmount'"/>
  297. <el-select v-model="scope.row.fStatus" v-if="item.label == 'fStatus'">
  298. <el-option label="是" value="0"/>
  299. <el-option label="否" value="1"/>
  300. </el-select>
  301. <el-input v-model="scope.row.remarks" v-if="item.label == 'remarks'"/>
  302. <el-input v-model="scope.row.createBy" v-if="item.label == 'createBy'"/>
  303. <el-input v-model="scope.row.createTime" v-if="item.label == 'createTime'"/>
  304. <el-input v-model="scope.row.updateBy" v-if="item.label == 'updateBy' && scope.row.fStatus == '0'"/>
  305. <el-input v-model="scope.row.updateTime" v-if="item.label == 'updateTime' && scope.row.fStatus == '0'"/>
  306. </template>
  307. </el-table-column>
  308. <el-table-column
  309. label="操作"
  310. align="center"
  311. class-name="small-padding fixed-width"
  312. >
  313. <template slot-scope="scope">
  314. <el-button
  315. size="mini"
  316. type="text"
  317. icon="el-icon-delete"
  318. @click.native.prevent="deleteRow(scope.$index, invoiceList)"
  319. >删除
  320. </el-button>
  321. </template>
  322. </el-table-column>
  323. </el-table>
  324. <div slot="footer" class="dialog-footer" style="margin:20px;float: right">
  325. <el-button type="primary" :disabled="doNot" @click="submit">保 存</el-button>
  326. </div>
  327. <el-dialog
  328. v-dialogDrag
  329. :fullscreen="dialogFull"
  330. :close-on-click-modal="false"
  331. width="70%"
  332. :visible.sync="innerVisible"
  333. title="导入数据"
  334. append-to-body
  335. >
  336. <el-form
  337. ref="form"
  338. :model="queryParameter"
  339. label-width="80px"
  340. style="display: flex; flex-wrap: wrap"
  341. >
  342. <el-form-item label="客户名称" prop="fCorpid">
  343. <el-select
  344. v-model="queryParameter.fCorpid"
  345. filterable
  346. remote
  347. style="width: 200px"
  348. placeholder="客户名称"
  349. >
  350. <el-option
  351. v-for="item in nameOptions"
  352. :key="item.id"
  353. :label="item.name"
  354. :value="item.id"
  355. ></el-option>
  356. </el-select>
  357. </el-form-item>
  358. <el-form-item label="提单号" prop="fMblno">
  359. <el-input
  360. v-model="queryParameter.fMblno"
  361. filterable
  362. remote
  363. clearable
  364. size="small"
  365. style="width: 200px"
  366. placeholder="请输入结算单位"
  367. >
  368. </el-input>
  369. </el-form-item>
  370. <el-form-item label="审核日期" prop="timeExamine">
  371. <el-date-picker
  372. v-model="queryParameter.timeExamine"
  373. type="daterange"
  374. range-separator="至"
  375. @change="timeMethods"
  376. value-format="yyyy-MM-dd"
  377. style="width: 250px"
  378. start-placeholder="开始日期"
  379. end-placeholder="结束日期">
  380. </el-date-picker>
  381. </el-form-item>
  382. <el-form-item label="业务类型" prop="fBusinessType">
  383. <template>
  384. <el-select
  385. v-model="queryParameter.fBusinessType"
  386. filterable
  387. remote
  388. size="small"
  389. style="width: 200px"
  390. placeholder="请选择业务类型"
  391. multiple
  392. >
  393. <el-option
  394. v-for="dict in businessTypeOptions"
  395. :key="dict.dictValue"
  396. :label="dict.dictLabel"
  397. :value="dict.dictValue"
  398. ></el-option>
  399. </el-select>
  400. </template>
  401. </el-form-item>
  402. <el-form-item label="船名" prop="fVslid">
  403. <el-select
  404. filterable
  405. v-model="queryParameter.fVslid"
  406. size="small"
  407. style="width: 200px"
  408. placeholder="请选择仓储业务"
  409. >
  410. <el-option
  411. v-for="item in vesselOptions"
  412. :key="item.fId"
  413. :label="item.fName"
  414. :value="item.fId"/>
  415. </el-select>
  416. </el-form-item>
  417. <el-form-item label="航次" prop="fVoyid">
  418. <el-select
  419. v-model="queryParameter.fVoyid"
  420. filterable
  421. remote
  422. size="small"
  423. style="width: 200px"
  424. >
  425. <el-option
  426. v-for="item in voyageOptions"
  427. :key="item.fId"
  428. :label="item.fNo"
  429. :value="item.fId"/>
  430. </el-select>
  431. </el-form-item>
  432. <el-form-item label="收/付" prop="fDc">
  433. <el-select
  434. v-model="queryParameter.fDc"
  435. filterable
  436. remote
  437. size="small"
  438. style="width: 200px">
  439. <el-option label="收" value="D"/>
  440. <!-- <el-option label="付" value="C"/>-->
  441. </el-select>
  442. </el-form-item>
  443. <el-form-item label="费用名称" label-width="85px" prop="fFeeid">
  444. <el-select
  445. v-model="queryParameter.fFeeid"
  446. filterable
  447. remote
  448. clearable
  449. size="small"
  450. style="width: 200px">
  451. <el-option
  452. v-for="(dict, index) in fDNameOptions"
  453. :key="index.fId"
  454. :label="dict.fName"
  455. :value="dict.fId"
  456. ></el-option>
  457. </el-select>
  458. </el-form-item>
  459. <el-form-item label="业务日期" prop="createTimeList">
  460. <el-date-picker
  461. v-model="queryParameter.createTimeList"
  462. type="daterange"
  463. range-separator="至"
  464. style="width: 250px"
  465. value-format="yyyy-MM-dd"
  466. @change="changeTime"
  467. start-placeholder="开始日期"
  468. end-placeholder="结束日期">
  469. </el-date-picker>
  470. </el-form-item>
  471. <el-form-item>
  472. <el-button
  473. type="cyan"
  474. icon="el-icon-search"
  475. size="mini"
  476. @click="getataDList"
  477. >搜索</el-button
  478. >
  479. <el-button icon="el-icon-refresh" size="mini" @click=""
  480. >重置</el-button
  481. >
  482. </el-form-item>
  483. </el-form>
  484. <el-table
  485. v-loading="loading"
  486. :data="chargeList_s"
  487. ref="chargeList"
  488. show-summary
  489. @selection-change="handleSelectionChange_s"
  490. >
  491. <el-table-column type="selection" width="55" align="center" />
  492. <el-table-column label="序号" type="index" width="55" align="center"/>
  493. <el-table-column label="货权方" align="center" prop="fName" />
  494. <el-table-column label="提单号" align="center" prop="fMblno" />
  495. <!-- <el-table-column label="品名" align="center" prop="fProductName" />-->
  496. <el-table-column label="业务日期" align="center">
  497. <template slot-scope="scope" v-if="scope.row.createTime">
  498. <span>{{ scope.row.createTime.slice(0, 10) }}</span>
  499. </template>
  500. </el-table-column>
  501. <el-table-column label="业务类型" align="center" prop="businessName">
  502. <!-- <template slot-scope="scope">-->
  503. <!-- <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>-->
  504. <!-- <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>-->
  505. <!-- <span v-else>{{ scope.row.fBilltype }}</span>-->
  506. <!-- </template>-->
  507. </el-table-column>
  508. <!-- <el-table-column label="作业类型" align="center" prop="fBusinessType"/>-->
  509. <el-table-column label="审核日期" align="center" prop="fReviewDate" />
  510. <el-table-column label="费用名称" align="center" prop="fFeeName" />
  511. <el-table-column label="金额" align="center" prop="fAmtdr" />
  512. <!-- <el-table-column label="本次金额" align="center" prop="fAmt" width="100">-->
  513. <!-- <template slot-scope="scope">-->
  514. <!-- <el-input-->
  515. <!-- v-model="scope.row.fAmt"-->
  516. <!-- placeholder="请输入本次金额"-->
  517. <!-- clearable-->
  518. <!-- size="small"-->
  519. <!-- oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'-->
  520. <!-- @change=""-->
  521. <!-- />-->
  522. <!-- </template>-->
  523. <!-- </el-table-column>-->
  524. <el-table-column label="备注" align="center" prop="fRemarks">
  525. <template slot-scope="scope">
  526. <el-input
  527. v-model="scope.row.fRemarks"
  528. placeholder="请输入备注"
  529. clearable
  530. size="small"
  531. width="100"
  532. />
  533. </template>
  534. </el-table-column>
  535. </el-table>
  536. <div slot="footer" class="dialog-footer">
  537. <el-button type="primary" @click="determine">确 定</el-button>
  538. <el-button @click="innerVisible = false">取 消</el-button>
  539. </div>
  540. </el-dialog>
  541. </div>
  542. </template>
  543. <script>
  544. import Vue from 'vue'
  545. import Cookies from 'js-cookie'
  546. import { getVoyageName, getVesselName,getcontrastList } from '@/api/finance/applyForInvoice/feeDetail'
  547. import { addSet, select } from '@/api/system/set'
  548. import draggable from "vuedraggable";
  549. import { getFName, listFees } from '@/api/kaihe/domesticTrade/orderInformation'
  550. Vue.directive("dialogDrag", {
  551. bind(el, binding, vnode, oldVnode) {
  552. const dialogHeaderEl = el.querySelector(".el-dialog__header");
  553. const dragDom = el.querySelector(".el-dialog");
  554. const enlarge = el.querySelector(".enlarge");
  555. dialogHeaderEl.style.cursor = "move";
  556. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  557. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
  558. if (enlarge) {
  559. enlarge.onclick = (e) => {
  560. dragDom.style.top = "0px";
  561. dragDom.style.left = "0px";
  562. };
  563. }
  564. dialogHeaderEl.onmousedown = (e) => {
  565. // 鼠标按下,计算当前元素距离可视区的距离
  566. const disX = e.clientX - dialogHeaderEl.offsetLeft;
  567. const disY = e.clientY - dialogHeaderEl.offsetTop;
  568. // 获取到的值带px 正则匹配替换
  569. let styL, styT;
  570. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  571. if (sty.left.includes("%")) {
  572. styL =
  573. +document.body.clientWidth * (+sty.left.replace(/\%/g, "") / 100);
  574. styT =
  575. +document.body.clientHeight * (+sty.top.replace(/\%/g, "") / 100);
  576. } else {
  577. styL = +sty.left.replace(/\px/g, "");
  578. styT = +sty.top.replace(/\px/g, "");
  579. }
  580. document.onmousemove = function (e) {
  581. // 通过事件委托,计算移动的距离
  582. const l = e.clientX - disX;
  583. const t = e.clientY - disY;
  584. // 移动当前元素
  585. if (t + styT >= 0) {
  586. dragDom.style.top = `${t + styT}px`;
  587. }
  588. dragDom.style.left = `${l + styL}px`;
  589. // 将此时的位置传出去
  590. // binding.value({x:e.pageX,y:e.pageY})
  591. };
  592. document.onmouseup = function (e) {
  593. document.onmousemove = null;
  594. document.onmouseup = null;
  595. };
  596. };
  597. },
  598. });
  599. export default {
  600. name: 'feeDetail',
  601. components:{
  602. draggable
  603. },
  604. data(){
  605. return{
  606. empty: [],
  607. nothing: [],
  608. pass: {
  609. fAmtdr: "", //应收合计
  610. fMblno: "", //提单号
  611. fName: "", //货权方
  612. },
  613. voyageOptions:[],
  614. vesselOptions:[],
  615. businessTypeOptions:[],
  616. fDNameOptions: [],
  617. nameOptions:[],
  618. doNot:false,
  619. tableDate: [
  620. {
  621. surface: "1",
  622. label: "fBillno",
  623. name: "业务编号",
  624. checked: 0,
  625. fixed: "left",
  626. width: 100,
  627. },
  628. {
  629. surface: "2",
  630. label: "boatName",
  631. name: "船名",
  632. checked: 0,
  633. fixed: "left",
  634. width: 100,
  635. },
  636. {
  637. surface: "3",
  638. label: "voyageName",
  639. name: "航次",
  640. checked: 0,
  641. width: 100,
  642. },
  643. {
  644. surface: "4",
  645. label: "tMblno",
  646. name: "提单号",
  647. checked: 0,
  648. width: 100,
  649. },
  650. {
  651. surface: "5",
  652. label: "fAccbilldate",
  653. name: "费用名称",
  654. checked: 0,
  655. width: 100,
  656. },
  657. {
  658. surface: "6",
  659. label: "fCurreny",
  660. name: "币别",
  661. checked: 0,
  662. width: 100,
  663. },
  664. {
  665. surface: "7",
  666. label: "chargingMethod",
  667. name: "金额",
  668. checked: 0,
  669. width: 100,
  670. },
  671. {
  672. surface: "8",
  673. label: "invoiceNo",
  674. name: "汇率",
  675. checked: 0,
  676. width: 100,
  677. },
  678. {
  679. surface: "9",
  680. label: "bank",
  681. name: "业务类型",
  682. checked: 0,
  683. width: 100,
  684. },
  685. {
  686. surface: "10",
  687. label: "waterBillNo",
  688. name: "状态",
  689. checked: 0,
  690. width: 100,
  691. },
  692. {
  693. surface: "11",
  694. label: "审核日期",
  695. name: "审核日期",
  696. checked: 0,
  697. width: 100,
  698. },
  699. {
  700. surface: "12",
  701. label: "审核日期",
  702. name: "备注",
  703. checked: 0,
  704. width: 100,
  705. }
  706. ],
  707. tableDate2: [
  708. {
  709. surface: "1",
  710. label: "fFeeName",
  711. name: "货物或应税劳务、服务名称",
  712. checked: 0,
  713. width: 100,
  714. },
  715. {
  716. surface: "2",
  717. label: "fModel",
  718. name: "规格型号",
  719. checked: 0,
  720. width: 100,
  721. },
  722. {
  723. surface: "3",
  724. label: "fSbuName",
  725. name: "单位",
  726. checked: 0,
  727. width: 100,
  728. },
  729. {
  730. surface: "4",
  731. label: "fNumber",
  732. name: "数量",
  733. checked: 0,
  734. width: 100,
  735. },
  736. {
  737. surface: "5",
  738. label: "fUnitprice",
  739. name: "单价(含税)",
  740. checked: 0,
  741. width: 100,
  742. },
  743. {
  744. surface: "6",
  745. label: "fMoney",
  746. name: "金额(含税)",
  747. checked: 0,
  748. width: 100,
  749. },
  750. {
  751. surface: "7",
  752. label: "fTaxrate",
  753. name: "税率",
  754. checked: 0,
  755. width: 100,
  756. },
  757. {
  758. surface: "8",
  759. label: "fTax",
  760. name: "税额",
  761. checked: 0,
  762. width: 100,
  763. },
  764. {
  765. surface: "9",
  766. label: "fAmount",
  767. name: "合计金额",
  768. checked: 0,
  769. width: 100,
  770. },
  771. {
  772. surface: "10",
  773. label: "fStatus",
  774. name: "作废状态",
  775. checked: 0,
  776. width: 100,
  777. },
  778. {
  779. surface: "11",
  780. label: "remarks",
  781. name: "备注",
  782. checked: 0,
  783. width: 100,
  784. },
  785. {
  786. surface: "12",
  787. label: "createBy",
  788. name: "录入人",
  789. checked: 0,
  790. width: 100,
  791. },
  792. {
  793. surface: "13",
  794. label: "createTime",
  795. name: "录入时间",
  796. checked: 0,
  797. width: 100,
  798. },
  799. {
  800. surface: "14",
  801. label: "updateBy",
  802. name: "作废人",
  803. checked: 0,
  804. width: 100,
  805. },
  806. {
  807. surface: "15",
  808. label: "updateTime",
  809. name: "作废时间",
  810. checked: 0,
  811. width: 100,
  812. },
  813. ],
  814. setRowList: [],
  815. getRowList: [],
  816. setRowList2: [],
  817. getRowList2: [],
  818. allCheck2: false,
  819. showSetting2: false,
  820. allCheck: false,
  821. showSetting: false,
  822. chargeList_s:[],
  823. queryParameter:{
  824. fCorpid:null,
  825. fMblno:null,
  826. timeExamine:null,
  827. fBusinessType:null,
  828. fVslid:null,
  829. fVoyid:null,
  830. fDc:'D',
  831. fFeeid:null,
  832. createTimeList:null
  833. },
  834. //打开内部弹窗
  835. innerVisible: false,
  836. //全屏放大
  837. dialogFull: false,
  838. // 遮罩层
  839. loading: false,
  840. activeIndex:"1",
  841. showSearch: true,
  842. feeList:[],
  843. invoiceList:[],
  844. invoiceInfo:false,
  845. feeInfo:true,
  846. queryParams:{},
  847. Fee: [],
  848. }
  849. },
  850. created(){
  851. this.getDicts("data_billType").then((response) => {
  852. if (response.data) {
  853. this.businessTypeOptions = response.data
  854. }
  855. });
  856. this.setRowList = this.tableDate;
  857. this.getRowList = this.tableDate;
  858. this.setRowList2 = this.tableDate2;
  859. this.getRowList2 = this.tableDate2;
  860. this.getRow();
  861. this.nameRemoteMethod()
  862. this.vessleRemthod()
  863. this.voyageRemthods()
  864. // this.getRow2();
  865. },
  866. activated() {
  867. if(this.$route.query.data){
  868. if(this.$route.query.data.Num === 0){
  869. this.doNot = true
  870. }else{
  871. this.doNot = false
  872. }
  873. }
  874. },
  875. methods:{
  876. //确定带入从表
  877. determine(){
  878. console.log(this.selection)
  879. this.pass.fAmtdr = 0;
  880. for (let item in this.selection) {
  881. this.pass.fAmtdr = Number(this.pass.fAmtdr);
  882. this.pass.fAmtdr += Number(this.selection[item].fAmtdr);
  883. }
  884. console.log(this.pass.fAmtdr)
  885. if (!this.selection.length) {
  886. this.$message.error("未选择导入行");
  887. }else{
  888. for (let item in this.selection) {
  889. console.log(this.selection)
  890. this.empty.push(this.selection[item].fMblno);
  891. this.nothing.push(this.selection[item].fName);
  892. console.log(this.empty, this.nothing)
  893. if (this.feeList.length === 0) {
  894. this.feeList = this.feeList.concat(this.selection);
  895. //去重提单号
  896. this.empty = new Set(this.empty);
  897. this.empty = Array.from(this.empty);
  898. //去重货权方
  899. this.nothing = new Set(this.nothing);
  900. this.nothing = Array.from(this.nothing);
  901. if (this.empty.length <= 1) {
  902. this.pass.fMblno = this.empty[0];
  903. } else {
  904. this.pass.fMblno = this.empty[0] + "...";
  905. }
  906. if (this.nothing.length <= 1) {
  907. this.pass.fName = this.nothing[0];
  908. } else {
  909. this.pass.fName = this.nothing[0] + "...";
  910. }
  911. // this.queryParams.tMblno = this.pass.fMblno; //提单号
  912. this.queryParams.fCtrlcorpid = this.pass.fName;
  913. // this.queryParams.fAmtdr = this.pass.fAmtdr;
  914. this.innerVisible = false
  915. this.chargeList_s = []
  916. this.queryParameter = {
  917. fCorpid: "",
  918. fMblno: "",
  919. timeExamine: "",
  920. fBusinessType: "",
  921. fVslid: "",
  922. fVoyid: "",
  923. fDc: 'D',
  924. fFeeid: "",
  925. createTimeList: ""
  926. }
  927. return
  928. }
  929. else {
  930. for (let li in this.feeList) {
  931. if (this.selection[item].fSrcid !== this.feeList[li].fSrcid) {
  932. this.Fee = this.feeList.concat(this.selection);
  933. let result = [];
  934. let obj = {};
  935. for (let lis in this.Fee) {
  936. if (!obj[this.Fee[lis].fSrcid]) {
  937. result.push(this.Fee[lis]);
  938. obj[this.Fee[lis].fSrcid] = true;
  939. }
  940. }
  941. //去重提单号
  942. this.empty = new Set(this.empty);
  943. this.empty = Array.from(this.empty);
  944. //去重货权方
  945. this.nothing = new Set(this.nothing);
  946. this.nothing = Array.from(this.nothing);
  947. if (this.empty.length <= 1) {
  948. this.pass.fMblno = this.empty[0];
  949. } else {
  950. this.pass.fMblno = this.empty[0] + "...";
  951. }
  952. if (this.nothing.length <= 1) {
  953. this.pass.fName = this.nothing[0];
  954. } else {
  955. this.pass.fName = this.nothing[0] + "...";
  956. }
  957. this.innerVisible = false
  958. this.chargeList_s = []
  959. this.queryParameter = {
  960. fCorpid: "",
  961. fMblno: "",
  962. timeExamine: "",
  963. fBusinessType: "",
  964. fVslid: "",
  965. fVoyid: "",
  966. fDc: 'D',
  967. fFeeid: "",
  968. createTimeList: ""
  969. }
  970. this.feeList = result
  971. }else {
  972. let i = Number(item) + 1;
  973. this.$message.error("行号为" + i + "重复");
  974. }
  975. }
  976. }
  977. }
  978. console.log(this.feeList)
  979. }
  980. // this.chargeList_s = this.feeList
  981. },
  982. voyageRemthods(){
  983. getVoyageName().then(response=>{
  984. this.voyageOptions = response.rows
  985. })
  986. },
  987. vessleRemthod(){
  988. getVesselName().then(response=>{
  989. console.log(response)
  990. this.vesselOptions = response.rows
  991. })
  992. },
  993. changeTime(){
  994. this.queryParameter.createTimeList[0] = this.queryParameter.createTimeList[0]+" 00:00:00"
  995. this.queryParameter.createTimeList[1] = this.queryParameter.createTimeList[1]+" 23:59:59"
  996. },
  997. timeMethods(){
  998. this.queryParameter.timeExamine[0] = this.queryParameter.timeExamine[0]+" 00:00:00"
  999. this.queryParameter.timeExamine[1] = this.queryParameter.timeExamine[1]+" 23:59:59"
  1000. },
  1001. openSearch(){
  1002. this.queryParameter = {
  1003. fCorpid:null,
  1004. fMblno:null,
  1005. timeExamine:null,
  1006. fBusinessType:null,
  1007. fVslid:null,
  1008. fVoyid:null,
  1009. fDc:'D',
  1010. fFeeid:null,
  1011. createTimeList:null
  1012. },
  1013. this.chargeList_s = []
  1014. let query = { pageNum: 1, fDc: "D" };
  1015. listFees(query).then((response) => {
  1016. this.fDNameOptions = response.rows;
  1017. });
  1018. this.innerVisible = true
  1019. },
  1020. //获取客户名称下拉
  1021. nameRemoteMethod(){
  1022. let queryParams = { pageNum: 1 }
  1023. getFName(queryParams).then(response=>{
  1024. this.nameOptions = response.data
  1025. })
  1026. },
  1027. getataDList(){
  1028. getcontrastList(this.queryParameter).then(res=>{
  1029. console.log(res)
  1030. this.chargeList_s = res.rows
  1031. })
  1032. },
  1033. submit(){
  1034. },
  1035. //列设置全选
  1036. allChecked() {
  1037. if (this.allCheck == true) {
  1038. this.setRowList.map((e) => {
  1039. return (e.checked = 0);
  1040. });
  1041. } else {
  1042. this.setRowList.map((e) => {
  1043. return (e.checked = 1);
  1044. });
  1045. }
  1046. },
  1047. //查询列数据
  1048. getRow() {
  1049. let that = this;
  1050. this.data = {
  1051. tableName: "费用信息",
  1052. userId: Cookies.get("userName"),
  1053. };
  1054. select(this.data).then((res) => {
  1055. if (res.data.length != 0) {
  1056. this.getRowList = res.data.filter((e) => e.checked == 0);
  1057. this.setRowList = res.data;
  1058. this.setRowList = this.setRowList.reduce((res, item) => {
  1059. res.push({
  1060. surface: item.surface,
  1061. label: item.label,
  1062. name: item.name,
  1063. checked: item.checked,
  1064. width: item.width,
  1065. fixed: item.fixed,
  1066. });
  1067. return res;
  1068. }, []);
  1069. }
  1070. });
  1071. },
  1072. //保存列设置
  1073. save() {
  1074. this.showSetting = false;
  1075. this.data = {
  1076. tableName: "费用信息",
  1077. userId: Cookies.get("userName"),
  1078. sysTableSetList: this.setRowList,
  1079. };
  1080. addSet(this.data).then((res) => {
  1081. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  1082. });
  1083. },
  1084. //重置列表
  1085. delRow() {
  1086. this.data = {
  1087. tableName: "费用信息",
  1088. userId: Cookies.get("userName"),
  1089. };
  1090. resetModule(this.data).then((res) => {
  1091. if (res.code == 200) {
  1092. this.showSetting = false;
  1093. this.setRowList = this.tableDate;
  1094. this.getRowList = this.tableDate;
  1095. }
  1096. });
  1097. },
  1098. //列设置全选
  1099. allChecked2() {
  1100. if (this.allCheck2 == true) {
  1101. this.setRowList2.map((e) => {
  1102. return (e.checked = 0);
  1103. });
  1104. } else {
  1105. this.setRowList2.map((e) => {
  1106. return (e.checked = 1);
  1107. });
  1108. }
  1109. },
  1110. //查询列数据
  1111. getRow2() {
  1112. let that = this;
  1113. this.data = {
  1114. tableName: "发票信息",
  1115. userId: Cookies.get("userName"),
  1116. };
  1117. select(this.data).then((res) => {
  1118. if (res.data.length != 0) {
  1119. this.getRowList2 = res.data.filter((e) => e.checked == 0);
  1120. this.setRowList2 = res.data;
  1121. this.setRowList2 = this.setRowList2.reduce((res, item) => {
  1122. res.push({
  1123. surface: item.surface,
  1124. label: item.label,
  1125. name: item.name,
  1126. checked: item.checked,
  1127. width: item.width,
  1128. fixed: item.fixed,
  1129. });
  1130. return res;
  1131. }, []);
  1132. }
  1133. });
  1134. },
  1135. //保存列设置
  1136. save2() {
  1137. this.showSetting2 = false;
  1138. this.data = {
  1139. tableName: "发票信息",
  1140. userId: Cookies.get("userName"),
  1141. sysTableSetList: this.setRowList2,
  1142. };
  1143. addSet(this.data).then((res) => {
  1144. this.getRowList2 = this.setRowList2.filter((e) => e.checked == 0);
  1145. });
  1146. },
  1147. //重置列表
  1148. delRow2() {
  1149. this.data = {
  1150. tableName: "发票信息",
  1151. userId: Cookies.get("userName"),
  1152. };
  1153. resetModule(this.data).then((res) => {
  1154. if (res.code == 200) {
  1155. this.showSetting2 = false;
  1156. this.setRowList2 = this.tableDate2;
  1157. this.getRowList2 = this.tableDate2;
  1158. }
  1159. });
  1160. },
  1161. //开始拖拽事件
  1162. onStart() {
  1163. this.drag = true;
  1164. },
  1165. //拖拽结束事件
  1166. onEnd() {
  1167. this.drag = false;
  1168. },
  1169. /** 查询财务数据主列表 */
  1170. getList() {
  1171. this.loading = true;
  1172. this.getDicts("approval_process").then((response) => {
  1173. this.options = response.data;
  1174. });
  1175. if (Cookies.get("sysType") == 1) {
  1176. //大木
  1177. listCharge(this.tableFilter).then((response) => {
  1178. this.chargeList = response.rows;
  1179. this.total = response.total;
  1180. this.loading = false;
  1181. });
  1182. } else if (Cookies.get("sysType") == 2) {
  1183. //车队
  1184. listCharges(this.tableFilter).then((response) => {
  1185. response.rows.map((e) => {
  1186. if (e.createTime) {
  1187. e.createTime = e.createTime.substring(0, 10);
  1188. }
  1189. });
  1190. this.chargeList = response.rows;
  1191. this.total = response.total;
  1192. this.loading = false;
  1193. });
  1194. }
  1195. },
  1196. //sheet切换
  1197. handleSelect(key, keyPath) {
  1198. if(key === '1') {
  1199. this.feeInfo = true
  1200. this.invoiceInfo = false
  1201. }else{
  1202. this.feeInfo = false
  1203. this.invoiceInfo = true
  1204. }
  1205. },
  1206. //发票信息新行
  1207. addList(){
  1208. let query = { pageNum: 1, fDc: "D" };
  1209. listFees(query).then((response) => {
  1210. this.fDNameOptions = response.rows;
  1211. });
  1212. this.invoiceList.push({
  1213. })
  1214. },
  1215. // 导入多选框
  1216. handleSelectionChange_s(selection) {
  1217. this.totAL = 0;
  1218. this.Ttime = 0;
  1219. this.selection = selection;
  1220. if (this.selection.length == 0) {
  1221. for (let item in this.chargeList_s) {
  1222. this.totAL += Number(this.chargeList_s[item].fAmt);
  1223. this.Ttime += Number(this.chargeList_s[item].fAmtdr);
  1224. }
  1225. } else {
  1226. for (let index in selection) {
  1227. this.totAL += Number(selection[index].fAmt);
  1228. this.Ttime += Number(selection[index].fAmtdr);
  1229. }
  1230. }
  1231. // this.getSummaries()
  1232. },
  1233. //清空一行
  1234. deleteRow(index, rows) {
  1235. rows.splice(index, 1);
  1236. },
  1237. }
  1238. }
  1239. </script>
  1240. <style lang="scss" scoped>
  1241. .tabSetting {
  1242. display: flex;
  1243. justify-content: flex-end;
  1244. }
  1245. .listStyle {
  1246. display: flex;
  1247. border-top: 1px solid #dcdfe6;
  1248. border-left: 1px solid #dcdfe6;
  1249. border-right: 1px solid #dcdfe6;
  1250. }
  1251. .listStyle:last-child {
  1252. border-bottom: 1px solid #dcdfe6;
  1253. }
  1254. .progress {
  1255. display: flex;
  1256. align-items: center;
  1257. padding: 2px;
  1258. background-color: rgba(0, 0, 0, 0.05);
  1259. height: 100%;
  1260. }
  1261. </style>
  1262. <style lang="scss">
  1263. .el-table {
  1264. .el-table__body-wrapper {
  1265. z-index: 2;
  1266. }
  1267. }
  1268. </style>