index.vue 78 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="tablefilter"
  5. ref="queryParams_s"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="68px"
  9. >
  10. <el-form-item label="货权方" prop="fCtrlcorpid">
  11. <el-input
  12. v-model="tablefilter.fCtrlcorpid"
  13. placeholder="请输入客户名称"
  14. filterable
  15. remote
  16. clearable
  17. size="small"
  18. style="width: 200px"
  19. @keyup.enter.native="handleQuery"
  20. :remote-method="corpsRemoteMethod"
  21. />
  22. </el-form-item>
  23. <el-form-item label="结算单位" prop="fCorpid">
  24. <el-select
  25. v-model="tablefilter.fCorpid"
  26. placeholder="请选择结算单位"
  27. filterable
  28. remote
  29. clearable
  30. size="small"
  31. style="width: 200px"
  32. @keyup.enter.native="handleQuery"
  33. :remote-method="corpsRemoteMethod"
  34. >
  35. <el-option
  36. v-for="(dict, index) in fMblnoOptions"
  37. :key="index.fId"
  38. :label="dict.fName"
  39. :value="dict.fId"
  40. ></el-option>
  41. </el-select>
  42. </el-form-item>
  43. <el-form-item label="对账日期" prop="timeInterval">
  44. <el-date-picker
  45. v-model="tablefilter.timeInterval"
  46. size="small"
  47. style="width: 240px"
  48. value-format="yyyy-MM-dd"
  49. type="daterange"
  50. range-separator="-"
  51. start-placeholder="开始日期"
  52. end-placeholder="结束日期"
  53. ></el-date-picker>
  54. </el-form-item>
  55. <el-form-item label="系统编号" prop="fBillno">
  56. <el-input
  57. v-model="tablefilter.fBillno"
  58. placeholder="请输入系统编号"
  59. clearable
  60. size="small"
  61. style="width: 200px"
  62. @keyup.enter.native="handleQuery"
  63. />
  64. </el-form-item>
  65. <el-form-item>
  66. <el-button
  67. type="cyan"
  68. icon="el-icon-search"
  69. size="mini"
  70. @click="handleQuery"
  71. >搜索</el-button
  72. >
  73. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  74. >重置</el-button
  75. >
  76. </el-form-item>
  77. </el-form>
  78. <el-row :gutter="10" class="mb8">
  79. <el-col :span="1.5">
  80. <el-button
  81. type="primary"
  82. icon="el-icon-plus"
  83. size="mini"
  84. @click="handleAdd"
  85. v-hasPermi="['finance:contrast:add']"
  86. >新增</el-button
  87. >
  88. </el-col>
  89. <el-col :span="1.5">
  90. <el-button
  91. type="success"
  92. icon="el-icon-edit"
  93. size="mini"
  94. :disabled="single"
  95. @click="handleUpdate"
  96. v-hasPermi="['warehouse:contrast:edit']"
  97. >修改</el-button
  98. >
  99. </el-col>
  100. <el-col :span="1.5">
  101. <el-button
  102. type="warning"
  103. icon="el-icon-download"
  104. size="mini"
  105. @click="handleExport"
  106. v-hasPermi="['finance:contrast:export']"
  107. >导出</el-button
  108. >
  109. </el-col>
  110. <div class="tabSetting">
  111. <right-toolbar
  112. :showSearch.sync="showSearch"
  113. @queryTable="getList"
  114. ></right-toolbar>
  115. <div style="margin: 0 12px">
  116. <el-button
  117. icon="el-icon-setting"
  118. size="mini"
  119. circle
  120. @click="showSetting = !showSetting"
  121. ></el-button>
  122. </div>
  123. </div>
  124. </el-row>
  125. <el-dialog
  126. title="提示"
  127. :visible.sync="showSetting"
  128. width="700px"
  129. v-dialogDrag
  130. >
  131. <template slot="title">
  132. <div class="avue-crud__dialog__header">
  133. <span class="el-dialog__title">
  134. <span
  135. style="
  136. display: inline-block;
  137. width: 3px;
  138. height: 20px;
  139. margin-right: 5px;
  140. float: left;
  141. margin-top: 2px;
  142. "
  143. ></span>
  144. </span>
  145. </div>
  146. </template>
  147. <div>配置排序列数据(拖动调整顺序)</div>
  148. <div style="margin-left: 17px">
  149. <el-checkbox
  150. v-model="allCheck"
  151. label="全选"
  152. @change="allChecked"
  153. ></el-checkbox>
  154. </div>
  155. <div style="padding: 4px; display: flex; justify-content: center">
  156. <draggable
  157. v-model="setRowList"
  158. group="site"
  159. animation="300"
  160. @start="onStart"
  161. @end="onEnd"
  162. handle=".indraggable"
  163. >
  164. <transition-group>
  165. <div
  166. v-for="item in setRowList"
  167. :key="item.surface"
  168. class="listStyle"
  169. >
  170. <div style="width: 500px" class="indraggable">
  171. <div class="progress" :style="{ width: item.width + 'px' }">
  172. <el-checkbox
  173. :label="item.name"
  174. v-model="item.checked"
  175. :true-label="0"
  176. :false-label="1"
  177. >{{ item.name }}
  178. </el-checkbox>
  179. </div>
  180. </div>
  181. <el-input-number
  182. v-model.number="item.width"
  183. controls-position="right"
  184. :min="1"
  185. :max="500"
  186. size="mini"
  187. ></el-input-number>
  188. </div>
  189. </transition-group>
  190. </draggable>
  191. </div>
  192. <span slot="footer" class="dialog-footer">
  193. <el-button @click="showSetting = false">取 消</el-button>
  194. <el-button type="primary" @click="save()">确 定</el-button>
  195. </span>
  196. </el-dialog>
  197. <el-table
  198. v-loading="loading"
  199. :data="contrastList"
  200. @selection-change="handleSelectionChange"
  201. show-summary
  202. :summary-method="listTotal"
  203. >
  204. <el-table-column width="100" align="center" type="selection" />
  205. <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
  206. <el-table-column label="行号" align="center" type="index" />
  207. <el-table-column
  208. v-for="(item, index) in getRowList"
  209. :key="index"
  210. :label="item.name"
  211. :width="item.width"
  212. :prop="item.label"
  213. align="center"
  214. :fixed="item.fixed"
  215. />
  216. <!-- <el-table-column label="系统编号" align="center" prop="fBillno" show-overflow-tooltip width="120"/>-->
  217. <!-- <el-table-column label="货权方" sortable align="center" show-overflow-tooltip prop="fCtrlcorpid" width="220"/>-->
  218. <!-- <el-table-column label="结算单位" sortable align="center" prop="fCorpidName" show-overflow-tooltip width="220"/>-->
  219. <!-- <el-table-column label="账单日期" sortable align="center" prop="fAccbilldate" width="120">-->
  220. <!-- <template slot-scope="scope">-->
  221. <!-- <span>{{ parseTime(scope.row.fAccbilldate, "{y}-{m}-{d}") }}</span>-->
  222. <!-- </template>-->
  223. <!-- </el-table-column>-->
  224. <!-- <el-table-column label="提单号" sortable align="center" prop="tMblno" width="216"/>-->
  225. <!-- <el-table-column label="金额" align="center" prop="fAmtdr" width="120"/>-->
  226. <!-- <el-table-column label="对账金额" align="center" prop="fAmtcr" width="120"/>-->
  227. <!-- &lt;!&ndash; <el-table-column label="单据类型" align="center" prop="fBilltype" />&ndash;&gt;-->
  228. <!-- <el-table-column label="备注" align="center" show-overflow-tooltip prop="fRemarks" width="120"/>-->
  229. <!-- <el-table-column label="状态" align="center" prop="fBillstatus" width="120">-->
  230. <!-- <template slot-scope="scope">-->
  231. <!-- <span v-if="scope.row.fBillstatus == '1'">保存</span>-->
  232. <!-- <span v-else-if="scope.row.fBillstatus == '2'">暂存</span>-->
  233. <!-- <span v-else-if="scope.row.fBillstatus == '3'">审批驳回</span>-->
  234. <!-- <span v-else-if="scope.row.fBillstatus == '4'">提交审核</span>-->
  235. <!-- <span v-else-if="scope.row.fBillstatus == '5'">审核中</span>-->
  236. <!-- <span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>-->
  237. <!-- </template>-->
  238. <!-- </el-table-column>-->
  239. <!-- <el-table-column label="制单部门" align="center" prop="fDeptid" /> -->
  240. <el-table-column
  241. label="操作"
  242. align="center"
  243. class-name="small-padding fixed-width"
  244. min-width="180"
  245. >
  246. <template slot-scope="scope">
  247. <el-button
  248. size="mini"
  249. type="text"
  250. icon="el-icon-view"
  251. @click="check(scope.row, 0)"
  252. v-hasPermi="['finance:contrast:edit']"
  253. >查看</el-button
  254. >
  255. <el-button
  256. size="mini"
  257. type="text"
  258. icon="el-icon-view"
  259. @click="check(scope.row, 1)"
  260. v-hasPermi="['finance:contrast:edit']"
  261. v-if="scope.row.fBillstatus == 4 || scope.row.fBillstatus == 5"
  262. >审批进度</el-button
  263. >
  264. <el-button
  265. size="mini"
  266. type="text"
  267. icon="el-icon-edit"
  268. @click="handleUpdate(scope.row)"
  269. v-hasPermi="['finance:contrast:edit']"
  270. v-if="scope.row.fBillstatus <= 3"
  271. >
  272. 修改</el-button
  273. >
  274. <el-button
  275. size="mini"
  276. type="text"
  277. icon="el-icon-delete"
  278. @click="handleDelete(scope.row)"
  279. v-hasPermi="['finance:contrast:remove']"
  280. v-if="scope.row.fBillstatus <= 3"
  281. >删除</el-button
  282. >
  283. </template>
  284. </el-table-column>
  285. </el-table>
  286. <pagination
  287. v-show="total > 0"
  288. :total="total"
  289. :page.sync="queryParams.pageNum"
  290. :limit.sync="queryParams.pageSize"
  291. @pagination="getList"
  292. />
  293. <!-- 对账表 -->
  294. <el-dialog
  295. v-dialogDrag
  296. :fullscreen="dialogFull"
  297. :visible.sync="open"
  298. width="70%"
  299. append-to-body
  300. :close-on-click-modal="false"
  301. :show-close="colseButton"
  302. >
  303. <template slot="title">
  304. <div class="avue-crud__dialog__header">
  305. <span class="el-dialog__title">
  306. <span
  307. style="
  308. display: inline-block;
  309. width: 3px;
  310. height: 20px;
  311. margin-right: 5px;
  312. float: left;
  313. margin-top: 2px;
  314. "
  315. ></span>
  316. </span>
  317. <div class="avue-crud__dialog__menu enlarge" @click="full">
  318. <i style="cursor: pointer;display: block;width:12px;height:12px;border:1px solid #909399;border-top:3px solid #909399;margin-top: -3px;"></i>
  319. </div>
  320. </div>
  321. </template>
  322. <el-form
  323. ref="ruless"
  324. :model="queryParams"
  325. :rules="ruless"
  326. label-width="68px"
  327. :inline="true"
  328. v-show="showSearch"
  329. >
  330. <el-form-item label="货权方" prop="fCtrlcorpid">
  331. <el-input
  332. v-model="queryParams.fCtrlcorpid"
  333. clearable
  334. size="small"
  335. style="width: 200px"
  336. @keyup.enter.native="handleQuery"
  337. :disabled="notChange"
  338. placeholder="请输入客户名称"
  339. />
  340. </el-form-item>
  341. <el-form-item label="结算单位" label-width="78px" prop="fCorpid">
  342. <el-select
  343. v-model="queryParams.fCorpid"
  344. placeholder="请选择结算单位"
  345. filterable
  346. remote
  347. clearable
  348. :disabled="doNot"
  349. style="width: 200px"
  350. size="small"
  351. @keyup.enter.native="handleQuery"
  352. :remote-method="corpsRemoteMethod"
  353. >
  354. <el-option
  355. v-for="(dict, index) in fMblnoOptions"
  356. :key="index.fId"
  357. :label="dict.fName"
  358. :value="dict.fId"
  359. ></el-option>
  360. </el-select>
  361. </el-form-item>
  362. <!-- <el-form-item label="提单号" prop="tMblno">
  363. <el-input v-model="TWareHouseFees.tMblno" placeholder="" :disabled="true"/>
  364. </el-form-item> -->
  365. <el-form-item label="对账日期" prop="fAccbilldate" label-width="78px">
  366. <el-date-picker
  367. v-model="queryParams.fAccbilldate"
  368. size="small"
  369. style="width: 200px"
  370. value-format="yyyy-MM-dd"
  371. type="date"
  372. :disabled="notChange"
  373. placeholder="选择账单日期"
  374. >
  375. </el-date-picker>
  376. </el-form-item>
  377. <el-form-item label="系统编号" prop="fBillno">
  378. <el-input
  379. v-model="queryParams.fBillno"
  380. placeholder=""
  381. clearable
  382. size="small"
  383. :disabled="true"
  384. style="width: 200px"
  385. @keyup.enter.native="handleQuery"
  386. />
  387. </el-form-item>
  388. <el-form-item label="录入人" prop="createBy">
  389. <el-input v-model="queryParams.createBy" disabled />
  390. </el-form-item>
  391. <el-form-item label="备注" prop="fRemarks">
  392. <el-input
  393. v-model="queryParams.fRemarks"
  394. size="small"
  395. style="width: 200px"
  396. :disabled="notChange"
  397. />
  398. </el-form-item>
  399. <el-form-item label="业务类型">
  400. <el-select
  401. v-model="typevalue"
  402. placeholder="请选择业务类型"
  403. size="small"
  404. style="width: 200px"
  405. >
  406. <el-option
  407. v-for="item in typeoptions"
  408. :key="item.value"
  409. :label="item.label"
  410. :value="item.value"
  411. >
  412. </el-option>
  413. </el-select>
  414. </el-form-item>
  415. <div style="width: 100%">
  416. <el-button
  417. type="warning"
  418. size="small"
  419. @click="reconciliation"
  420. :disabled="notChange"
  421. v-if="queryParams.fBillstatus < '4'"
  422. >对账</el-button
  423. >
  424. <el-button
  425. type="primary"
  426. size="small"
  427. @click="confirmReconciliation"
  428. :disabled="notChange"
  429. v-if="queryParams.fBillstatus < '4'"
  430. >确认对账</el-button
  431. >
  432. <el-button type="warning" size="small" @click="handleExportItems"
  433. >导出</el-button
  434. >
  435. <el-button
  436. type="success"
  437. size="small"
  438. @click="backrRconciliation"
  439. v-if="queryParams.fBillstatus === '6'"
  440. >撤销对账</el-button
  441. >
  442. <!-- <el-button type="info" size="small" @click="exportData">导出</el-button>-->
  443. <el-button
  444. type="danger"
  445. size="small"
  446. :disabled="disappear"
  447. v-if="queryParams.fBillstatus === '4'"
  448. @click="backApproval"
  449. >撤销审批</el-button
  450. >
  451. </div>
  452. <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
  453. </el-form>
  454. <el-table
  455. v-loading="loading"
  456. :data="DzfeeList"
  457. @selection-change="handleSelectionChange_s"
  458. >
  459. <el-table-column label="行号" align="center" type="index" />
  460. <el-table-column label="提单号" align="center" prop="fMblno" />
  461. <el-table-column label="业务日期" align="center" prop="fBsdate">
  462. <template slot-scope="scope">
  463. <span v-if="scope.row.fBsdate === undefined">无</span>
  464. <span v-else>{{ scope.row.fBsdate.slice(0, 10) }}</span>
  465. </template>
  466. </el-table-column>
  467. <el-table-column label="费用名称" align="center" prop="fFeeName" />
  468. <el-table-column label="收/付" align="center" prop="fSrcdc">
  469. <template slot-scope="scope">
  470. <span v-if="scope.row.fSrcdc == 'D'">收</span>
  471. <span v-else-if="scope.row.fSrcdc == 'C'">付</span>
  472. </template>
  473. </el-table-column>
  474. <el-table-column label="金额" align="center" prop="fAmtdr" />
  475. <el-table-column label="计价单位" align="center" prop="fFeeunitid" />
  476. <el-table-column label="数量" align="center" prop="fQty" />
  477. <el-table-column label="单价" align="center" prop="fUnitprice" />
  478. <el-table-column label="本次金额" align="center" prop="fAmt" />
  479. <el-table-column label="作业类型" align="center" prop="fBusinessType" />
  480. <el-table-column label="业务类型" align="center" prop="fBilltype">
  481. <template slot-scope="scope">
  482. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  483. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  484. <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>
  485. <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>
  486. <span v-else-if="scope.row.fBilltype == 'JSCCF'">仓储费</span>
  487. <span v-else>{{ scope.row.fBilltype }}</span>
  488. </template>
  489. </el-table-column>
  490. <el-table-column label="来源编号" align="center" prop="srcBillNo" />
  491. <el-table-column label="提单号" align="center" prop="fMblno" />
  492. <el-table-column label="货物品名" align="center" prop="fProductName" />
  493. <el-table-column label="品牌" align="center" prop="fMarks" />
  494. <el-table-column label="计费起始日期" align="center" prop="fChargedate">
  495. <template slot-scope="scope">
  496. <span v-if="scope.row.fChargedate === undefined">无</span>
  497. <span v-else>{{ scope.row.fChargedate.slice(0, 10) }}</span>
  498. </template>
  499. </el-table-column>
  500. <el-table-column
  501. label="计费截止日期"
  502. align="center"
  503. prop="fBillingDeadline"
  504. >
  505. <template slot-scope="scope">
  506. <span v-if="scope.row.fBillingDeadline === undefined">无</span>
  507. <span v-else>{{ scope.row.fBillingDeadline.slice(0, 10) }}</span>
  508. </template>
  509. </el-table-column>
  510. <el-table-column label="计费天数" align="center" prop="fBillingDays" />
  511. <el-table-column
  512. label="库存天数"
  513. align="center"
  514. prop="fInventoryDays"
  515. />
  516. <el-table-column label="备注" align="center" prop="fRemarks" />
  517. <el-table-column
  518. label="操作"
  519. align="center"
  520. class-name="small-padding fixed-width"
  521. >
  522. <template slot-scope="scope">
  523. <el-button
  524. size="mini"
  525. type="text"
  526. icon="el-icon-delete"
  527. :disabled="notChange"
  528. @click.native.prevent="deleteRow(scope.$index, DzfeeList)"
  529. >删除
  530. </el-button>
  531. </template>
  532. </el-table-column>
  533. </el-table>
  534. <div slot="footer" class="dialog-footer">
  535. <add-or-update
  536. v-if="addOrUpdateVisible"
  537. ref="addOrUpdate"
  538. @refreshDataList="getDataList"
  539. ></add-or-update>
  540. <approval-comments
  541. v-if="addOrUpdateVisib"
  542. ref="ApprovalComments"
  543. @refreshDataList="returnData"
  544. ></approval-comments>
  545. <el-button v-if="approve === true" @click="goApproval">审批</el-button>
  546. <el-button
  547. type="primary"
  548. v-if="queryParams.fBillstatus >= '3'"
  549. @click="addOrUpdateHandle()"
  550. >查看审批流</el-button
  551. >
  552. <el-button
  553. type="primary"
  554. @click="submitForm(typevalue)"
  555. :disabled="notChange"
  556. >保 存</el-button
  557. >
  558. <el-button v-if="cancelButton === true" @click="cancel"
  559. >取 消</el-button
  560. >
  561. <el-button v-if="cancelButton === false" @click="homePage"
  562. >取消</el-button
  563. >
  564. </div>
  565. <!-- 添加或修改财务数据主对话框 -->
  566. <el-dialog
  567. v-dialogDrag
  568. :fullscreen="dialogFull"
  569. :close-on-click-modal="false"
  570. width="70%"
  571. :title="title"
  572. :visible.sync="innerVisible"
  573. append-to-body
  574. >
  575. <template slot="title">
  576. <div class="avue-crud__dialog__header">
  577. <span class="el-dialog__title">
  578. <span
  579. style="
  580. display: inline-block;
  581. width: 3px;
  582. height: 20px;
  583. margin-right: 5px;
  584. float: left;
  585. margin-top: 2px;
  586. "
  587. ></span>
  588. </span>
  589. <div class="avue-crud__dialog__menu enlarge" @click="full">
  590. <i style="cursor: pointer;display: block;width:12px;height:12px;border:1px solid #909399;border-top:3px solid #909399;margin-top: -3px;"></i>
  591. </div>
  592. </div>
  593. </template>
  594. <el-form
  595. :model="TWareHouseFees"
  596. ref="feeListRules"
  597. :rules="feeListRules"
  598. label-width="80px"
  599. :inline="true"
  600. >
  601. <el-form-item label="货权方" prop="fCorpid">
  602. <el-select
  603. v-model="TWareHouseFees.fCorpid"
  604. filterable
  605. remote
  606. clearable
  607. size="small"
  608. style="width: 200px"
  609. @keyup.enter.native="handleQuery"
  610. :remote-method="corpsRemoteMethod"
  611. placeholder="请输入客户名称"
  612. >
  613. <el-option
  614. v-for="(dict, index) in fMblnoOptions"
  615. :key="index.fId"
  616. :label="dict.fName"
  617. :value="dict.fId"
  618. ></el-option>
  619. </el-select>
  620. </el-form-item>
  621. <el-form-item label="结算单位" prop="fToCorpid">
  622. <el-select
  623. v-model="TWareHouseFees.fToCorpid"
  624. placeholder="请选择结算单位"
  625. :disabled="doNot"
  626. filterable
  627. remote
  628. clearable
  629. style="width: 200px"
  630. size="small"
  631. @keyup.enter.native="handleQuery"
  632. :remote-method="corpsRemoteMethod"
  633. >
  634. <el-option
  635. v-for="(dict, index) in fMblnoOptions"
  636. :key="index.fId"
  637. :label="dict.fName"
  638. :value="dict.fId"
  639. ></el-option>
  640. </el-select>
  641. </el-form-item>
  642. <el-form-item label="提单号" prop="fMblno">
  643. <el-input
  644. clearable
  645. v-model="TWareHouseFees.fMblno"
  646. placeholder="请输入提单号"
  647. style="width: 200px"
  648. size="small"
  649. />
  650. </el-form-item>
  651. <el-form-item label="收付" prop="fDc">
  652. <el-col :span="8">
  653. <el-select
  654. v-model="TWareHouseFees.fDc"
  655. size="small"
  656. style="width: 200px"
  657. >
  658. <el-option label="收" value="D" />
  659. <el-option label="付" value="C" />
  660. </el-select>
  661. </el-col>
  662. </el-form-item>
  663. <el-form-item label="是否对账" prop="fReconciliation">
  664. <el-col :span="8">
  665. <el-select
  666. v-model="TWareHouseFees.fReconciliation"
  667. size="small"
  668. style="width: 200px"
  669. >
  670. <el-option label="是" value="1" />
  671. <el-option label="否" value="0" />
  672. </el-select>
  673. </el-col>
  674. </el-form-item>
  675. <el-form-item label="费用名称" prop="fFeeid">
  676. <template>
  677. <el-select
  678. v-model="TWareHouseFees.fFeeid"
  679. filterable
  680. :disabled="browseStatus"
  681. remote
  682. size="small"
  683. style="width: 200px"
  684. :remote-method="fWRemoteMethod"
  685. placeholder="费用名称"
  686. multiple
  687. >
  688. <el-option
  689. v-for="item in fWbuOptions"
  690. :key="item.fId"
  691. :label="item.fName"
  692. :value="item.fId"
  693. >
  694. </el-option>
  695. </el-select>
  696. </template>
  697. </el-form-item>
  698. <el-form-item label="仓储业务" prop="fFeeid">
  699. <el-select
  700. v-model="TWareHouseFees.fBilltype"
  701. size="small"
  702. style="width: 200px"
  703. @change="changefBilltype"
  704. placeholder="请选择仓储业务"
  705. >
  706. <el-option label="入库" value="SJRK"></el-option>
  707. <el-option label="出库" value="SJCK"></el-option>
  708. <el-option label="货权转移" value="HQZY"></el-option>
  709. </el-select>
  710. </el-form-item>
  711. <el-form-item label="作业类型" prop="fBusinessType">
  712. <el-select
  713. v-model="TWareHouseFees.fBusinessType"
  714. filterable
  715. :disabled="browseStatus"
  716. remote
  717. size="small"
  718. style="width: 200px"
  719. placeholder="作业类型"
  720. multiple
  721. >
  722. <el-option
  723. v-for="dict in businessTypeOption"
  724. :key="dict.dictValue"
  725. :label="dict.dictLabel"
  726. :value="dict.dictValue"
  727. >
  728. </el-option>
  729. </el-select>
  730. </el-form-item>
  731. <el-form-item
  732. label="审核日期"
  733. prop="timeExamine"
  734. v-if="typevalue == 1"
  735. >
  736. <el-date-picker
  737. style="width: 240px"
  738. size="small"
  739. v-model="TWareHouseFees.timeExamine"
  740. type="daterange"
  741. start-placeholder="开始日期"
  742. end-placeholder="结束日期"
  743. value-format="yyyy-MM-dd"
  744. :default-time="['00:00:00', '23:59:59']"
  745. >
  746. </el-date-picker>
  747. </el-form-item>
  748. <el-form-item
  749. label="对账日期"
  750. label-width="85px"
  751. prop="timeReconci"
  752. v-if="TWareHouseFees.fReconciliation == '1'"
  753. >
  754. <el-date-picker
  755. v-model="TWareHouseFees.timeReconci"
  756. size="small"
  757. style="width: 240px"
  758. value-format="yyyy-MM-dd"
  759. type="daterange"
  760. start-placeholder="开始日期"
  761. end-placeholder="结束日期"
  762. :default-time="['00:00:00', '23:59:59']"
  763. ></el-date-picker>
  764. </el-form-item>
  765. <el-form-item>
  766. <!-- <el-button class="btnColor" type="info" size="mini">导入</el-button> -->
  767. <el-button type="cyan" size="mini" @click="searchFee(typevalue)"
  768. >搜索</el-button
  769. >
  770. <el-button type="info" size="mini" @click="resetQuery_s"
  771. >重置</el-button
  772. >
  773. </el-form-item>
  774. <el-table
  775. v-loading="loading"
  776. :data="feeList"
  777. ref="feeList"
  778. show-summary
  779. :summary-method="getSum"
  780. @selection-change="handleSelectionChange_s"
  781. >
  782. <el-table-column type="selection" width="55" align="center" />
  783. <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
  784. <el-table-column label="行号" align="center" type="index" />
  785. <el-table-column
  786. label="货权方"
  787. align="center"
  788. prop="fName"
  789. show-overflow-tooltip
  790. />
  791. <el-table-column
  792. label="结算单位"
  793. align="center"
  794. prop="fFeesName"
  795. show-overflow-tooltip
  796. />
  797. <!-- <el-table-column label="账单日期" align="center" prop="fAccbilldate"/> -->
  798. <el-table-column label="提单号" align="center" prop="fMblno" />
  799. <el-table-column label="品名" align="center" prop="fProductName" />
  800. <el-table-column label="业务日期" align="center" prop="fBsdate" />
  801. <el-table-column label="业务类型" align="center" prop="fBilltype">
  802. <template slot-scope="scope">
  803. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  804. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  805. <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>
  806. <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>
  807. <span v-else-if="scope.row.fBilltype == 'JSCCF'">仓储费</span>
  808. <span v-else-if="scope.row.fBilltype == '1000'">计划下达</span>
  809. <span v-else-if="scope.row.fBilltype == '1010'">业务调度</span>
  810. <span v-else-if="scope.row.fBilltype == '1020'">车队派车</span>
  811. <span v-else-if="scope.row.fBilltype == '1030'">司机接单</span>
  812. <span v-else-if="scope.row.fBilltype == '1080'">司机出车</span>
  813. <span v-else-if="scope.row.fBilltype == '1040'">司机提箱</span>
  814. <span v-else-if="scope.row.fBilltype == '1050'">司机装卸柜</span>
  815. <span v-else-if="scope.row.fBilltype == '1060'">司机还卸柜</span>
  816. <span v-else-if="scope.row.fBilltype == '1070'">司机回单</span>
  817. <span v-else-if="scope.row.fBilltype == '1090'">费用补充</span>
  818. </template>
  819. </el-table-column>
  820. <el-table-column
  821. label="作业类型"
  822. align="center"
  823. prop="fBusinessType"
  824. />
  825. <!-- <el-table-column label="单据类型" align="center" prop="fBilltype" />-->
  826. <el-table-column
  827. label="审核日期"
  828. align="center"
  829. prop="fReviewDate"
  830. />
  831. <el-table-column label="金额" align="center" prop="fAmtdr" />
  832. <el-table-column
  833. label="本次金额"
  834. align="center"
  835. prop="fAmt"
  836. width="100"
  837. >
  838. <template slot-scope="scope">
  839. <el-input
  840. v-model="scope.row.fAmt"
  841. placeholder="请输入本次金额"
  842. clearable
  843. size="small"
  844. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  845. @change="imgChangeI(scope.row)"
  846. />
  847. </template>
  848. </el-table-column>
  849. <el-table-column label="费用名称" align="center" prop="fFeeName" />
  850. <el-table-column label="备注" align="center" prop="fRemarks">
  851. <template slot-scope="scope">
  852. <el-input
  853. v-model="scope.row.fRemarks"
  854. placeholder="请输入备注"
  855. clearable
  856. size="small"
  857. width="100"
  858. />
  859. </template>
  860. </el-table-column>
  861. </el-table>
  862. </el-form>
  863. <div slot="footer" class="dialog-footer">
  864. <el-button type="primary" @click="confirmImport">确 定</el-button>
  865. <el-button @click="signOut">取 消</el-button>
  866. </div>
  867. </el-dialog>
  868. </el-dialog>
  869. <!-- 打印页面 -->
  870. <!-- <el-dialog-->
  871. <!-- :visible.sync="openPrint"-->
  872. <!-- width="80%"-->
  873. <!-- append-to-body-->
  874. <!-- :close-on-click-modal="false"-->
  875. <!-- title="对账单"-->
  876. <!-- >-->
  877. <!-- <el-table-->
  878. <!-- ref="table"-->
  879. <!-- id="print_area2"-->
  880. <!-- v-loading="loading"-->
  881. <!-- :data="printObject"-->
  882. <!-- @selection-change="handleSelectionChange_s">-->
  883. <!-- <el-table-column label="行号" align="center" type="index" width="70"/>-->
  884. <!-- <el-table-column label="提单号" align="center" prop="fMblno" />-->
  885. <!-- <el-table-column label="业务日期" align="center" prop="fBsdate">-->
  886. <!-- <template slot-scope="scope">-->
  887. <!-- <span>{{scope.row.fBsdate.slice(0,10)}}</span>-->
  888. <!-- </template>-->
  889. <!-- </el-table-column>-->
  890. <!-- <el-table-column label="费用名称" align="center" prop="fFeeName" />-->
  891. <!-- <el-table-column label="收/付" align="center" prop="fSrcdc">-->
  892. <!-- <template slot-scope="scope">-->
  893. <!-- <span v-if="scope.row.fSrcdc == 'D'">收</span>-->
  894. <!-- <span v-else-if="scope.row.fSrcdc == 'C'">付</span>-->
  895. <!-- </template>-->
  896. <!-- </el-table-column>-->
  897. <!-- <el-table-column label="金额" align="center" prop="fAmtdr" />-->
  898. <!-- <el-table-column label="本次金额" align="center" prop="fAmt"/>-->
  899. <!-- <el-table-column label="业务类型" align="center" prop="fBilltype">-->
  900. <!-- <template slot-scope="scope">-->
  901. <!-- <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>-->
  902. <!-- <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>-->
  903. <!-- <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>-->
  904. <!-- <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>-->
  905. <!-- <span v-else>{{scope.row.fBilltype}}</span>-->
  906. <!-- </template>-->
  907. <!-- </el-table-column>-->
  908. <!-- </el-table>-->
  909. <!-- <span slot="footer" class="dialog-footer">-->
  910. <!-- <el-button type="primary" style="marginTop:10px" @click="printSomething">打印</el-button>-->
  911. <!-- <el-button @click="openPrint = false">取消</el-button>-->
  912. <!-- </span>-->
  913. <!-- </el-dialog>-->
  914. </div>
  915. </template>
  916. <script>
  917. import {
  918. RevocationApproval,
  919. backFee,
  920. detailFee,
  921. Cfee,
  922. listFee,
  923. getFee,
  924. delFee,
  925. addFee,
  926. updateFee,
  927. exportFee,
  928. importFee,
  929. exportWarehousebillsitems,
  930. importFleet,
  931. addFleet,
  932. listFleet,
  933. getFleet,
  934. delFleet,
  935. detailFleet
  936. } from "@/api/finance/contrast";
  937. import { listCorps } from "@/api/basicdata/corps";
  938. import { listFees } from "@/api/basicdata/fees";
  939. import AddOrUpdate from "@/views/viewApproval";
  940. import { queryUserVal } from "@/api/warehouseBusiness/agreement";
  941. import moment from "moment";
  942. import print from "print-js";
  943. import ApprovalComments from "@/views/startApproval";
  944. import Global from "@/layout/components/global";
  945. import Cookies from "js-cookie";
  946. import { addSet, select } from "@/api/system/set";
  947. import draggable from "vuedraggable";
  948. import Vue from "vue";
  949. Vue.directive("dialogDrag", {
  950. bind(el, binding, vnode, oldVnode) {
  951. const dialogHeaderEl = el.querySelector(".el-dialog__header");
  952. const dragDom = el.querySelector(".el-dialog");
  953. const enlarge = el.querySelector(".enlarge");
  954. dialogHeaderEl.style.cursor = "move";
  955. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  956. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
  957. if (enlarge) {
  958. enlarge.onclick = (e) => {
  959. dragDom.style.top = "0px";
  960. dragDom.style.left = "0px";
  961. };
  962. }
  963. dialogHeaderEl.onmousedown = (e) => {
  964. // 鼠标按下,计算当前元素距离可视区的距离
  965. const disX = e.clientX - dialogHeaderEl.offsetLeft;
  966. const disY = e.clientY - dialogHeaderEl.offsetTop;
  967. // 获取到的值带px 正则匹配替换
  968. let styL, styT;
  969. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  970. if (sty.left.includes("%")) {
  971. styL =
  972. +document.body.clientWidth * (+sty.left.replace(/\%/g, "") / 100);
  973. styT =
  974. +document.body.clientHeight * (+sty.top.replace(/\%/g, "") / 100);
  975. } else {
  976. styL = +sty.left.replace(/\px/g, "");
  977. styT = +sty.top.replace(/\px/g, "");
  978. }
  979. document.onmousemove = function (e) {
  980. // 通过事件委托,计算移动的距离
  981. const l = e.clientX - disX;
  982. const t = e.clientY - disY;
  983. // 移动当前元素
  984. if (t + styT >= 0) {
  985. dragDom.style.top = `${t + styT}px`;
  986. }
  987. dragDom.style.left = `${l + styL}px`;
  988. // 将此时的位置传出去
  989. // binding.value({x:e.pageX,y:e.pageY})
  990. };
  991. document.onmouseup = function (e) {
  992. document.onmousemove = null;
  993. document.onmouseup = null;
  994. };
  995. };
  996. },
  997. });
  998. export default {
  999. name: "Fee",
  1000. data() {
  1001. return {
  1002. //全屏放大
  1003. dialogFull: false,
  1004. drag: false,
  1005. typeoptions: [
  1006. {
  1007. value: "1",
  1008. label: "仓储",
  1009. },
  1010. {
  1011. value: "2",
  1012. label: "车队",
  1013. },
  1014. ],
  1015. typevalue: "",
  1016. setRowList: [
  1017. {
  1018. surface: "1",
  1019. label: "fBillno",
  1020. name: "系统编号",
  1021. checked: 0,
  1022. fixed: "fixed",
  1023. width: null,
  1024. },
  1025. {
  1026. surface: "2",
  1027. label: "fCtrlcorpid",
  1028. name: "货权方",
  1029. checked: 0,
  1030. width: null,
  1031. },
  1032. {
  1033. surface: "3",
  1034. label: "fCorpidName",
  1035. name: "结算单位",
  1036. checked: 0,
  1037. fixed: "fixed",
  1038. width: null,
  1039. },
  1040. {
  1041. surface: "4",
  1042. label: "fAccbilldate",
  1043. name: "账单日期",
  1044. checked: 0,
  1045. width: null,
  1046. },
  1047. {
  1048. surface: "5",
  1049. label: "tMblno",
  1050. name: "提单号",
  1051. checked: 0,
  1052. width: null,
  1053. },
  1054. {
  1055. surface: "6",
  1056. label: "fAmtdr",
  1057. name: "金额",
  1058. checked: 0,
  1059. width: null,
  1060. },
  1061. {
  1062. surface: "7",
  1063. label: "fAmtcr",
  1064. name: "对账金额",
  1065. checked: 0,
  1066. width: null,
  1067. },
  1068. {
  1069. surface: "8",
  1070. label: "fRemarks",
  1071. name: "备注",
  1072. checked: 0,
  1073. width: null,
  1074. },
  1075. {
  1076. surface: "9",
  1077. label: "fBillstatus",
  1078. name: "状态",
  1079. checked: 0,
  1080. width: null,
  1081. },
  1082. ],
  1083. getRowList: [
  1084. {
  1085. surface: "1",
  1086. label: "fBillno",
  1087. name: "系统编号",
  1088. checked: 0,
  1089. fixed: "fixed",
  1090. width: null,
  1091. },
  1092. {
  1093. surface: "2",
  1094. label: "fCtrlcorpid",
  1095. name: "货权方",
  1096. checked: 0,
  1097. width: null,
  1098. },
  1099. {
  1100. surface: "3",
  1101. label: "fCorpidName",
  1102. name: "结算单位",
  1103. checked: 0,
  1104. fixed: "fixed",
  1105. width: null,
  1106. },
  1107. {
  1108. surface: "4",
  1109. label: "fAccbilldate",
  1110. name: "账单日期",
  1111. checked: 0,
  1112. width: null,
  1113. },
  1114. {
  1115. surface: "5",
  1116. label: "tMblno",
  1117. name: "提单号",
  1118. checked: 0,
  1119. width: null,
  1120. },
  1121. {
  1122. surface: "6",
  1123. label: "fAmtdr",
  1124. name: "金额",
  1125. checked: 0,
  1126. width: null,
  1127. },
  1128. {
  1129. surface: "7",
  1130. label: "fAmtcr",
  1131. name: "对账金额",
  1132. checked: 0,
  1133. width: null,
  1134. },
  1135. {
  1136. surface: "8",
  1137. label: "fRemarks",
  1138. name: "备注",
  1139. checked: 0,
  1140. width: null,
  1141. },
  1142. {
  1143. surface: "9",
  1144. label: "fBillstatus",
  1145. name: "状态",
  1146. checked: 0,
  1147. width: null,
  1148. },
  1149. ],
  1150. allCheck: false,
  1151. showSetting: false,
  1152. //控制结算单位是否可操作
  1153. doNot: false,
  1154. jFeetunitOptions: [],
  1155. // 总条数
  1156. total: 0,
  1157. totAL: 0,
  1158. Ttime: 0,
  1159. colseButton: true,
  1160. approval: [],
  1161. disappear: false,
  1162. addIndex: [],
  1163. addOrUpdateVisible: false,
  1164. addOrUpdateVisib: false,
  1165. contrastId: 210,
  1166. // 审批状态
  1167. approve: false,
  1168. // 打印表
  1169. printObject: [],
  1170. //登陆人
  1171. Lander: "",
  1172. openPrint: false,
  1173. statrGo: true,
  1174. state_s: true,
  1175. notChange: false,
  1176. browseStatus: false,
  1177. options: "",
  1178. dateRange: "",
  1179. // 遮罩层
  1180. loading: true,
  1181. fAccbilldate: "",
  1182. // 选中数组
  1183. ids: [],
  1184. // 非单个禁用
  1185. single: true,
  1186. // 非多个禁用
  1187. multiple: true,
  1188. // 显示搜索条件
  1189. showSearch: true,
  1190. // 财务数据主表格数据
  1191. feeList: [],
  1192. // 客户(客户数据)
  1193. fMblnoOptions: [],
  1194. fFeeunitidOptions: [],
  1195. fWbuOptions: [],
  1196. KHblnoOptions: [],
  1197. //打开内部弹窗
  1198. innerVisible: false,
  1199. selection: "",
  1200. // 弹出层标题
  1201. title: "",
  1202. // 操作人
  1203. Operator: "",
  1204. // 是否显示弹出层
  1205. open: false,
  1206. dialogVisible: false,
  1207. // 财务对账表格
  1208. DzfeeList: [],
  1209. // 财务主页面表格
  1210. contrastList: [],
  1211. empty: [],
  1212. nothing: [],
  1213. Fee: [],
  1214. //导入从表传主表
  1215. pass: {
  1216. fAmtdr: "", //应收合计
  1217. fAmtcr: "", //应付合计
  1218. fMblno: "", //提单号
  1219. fName: "", //货权方
  1220. fFeesName: "", //结算单位
  1221. fCorpid: "", //结算单位ID
  1222. },
  1223. hide: false,
  1224. cancelButton: true,
  1225. businessTypeOption: [],
  1226. // 传值对象
  1227. TWareHouseFees: {
  1228. fCorpid: "",
  1229. fToCorpid: "",
  1230. fMblno: "",
  1231. fStatementNo: "",
  1232. fFeeid: "",
  1233. timeExamine: "",
  1234. timeInterval: "",
  1235. fDc: "D",
  1236. fReconciliation: "0",
  1237. timeReconci: "",
  1238. fBusinessType: "",
  1239. fBilltype: "SJRK",
  1240. },
  1241. // 查询参数
  1242. queryParams: {
  1243. pageNum: 1,
  1244. pageSize: 10,
  1245. fBillno: null,
  1246. fCtrlcorpid: null,
  1247. fCorpid: null,
  1248. tMblno: null,
  1249. fAmtdr: null,
  1250. fAmtcr: null,
  1251. fId: null,
  1252. fBilltype: null,
  1253. fBillstatus: null,
  1254. fRemarks: null,
  1255. fAccbilldate: null,
  1256. fDeptid: null,
  1257. createBy: null,
  1258. timeReconci: null,
  1259. },
  1260. // 主表查询参数
  1261. tablefilter: {
  1262. pageNum: 1,
  1263. pageSize: 10,
  1264. fBillno: null,
  1265. fCtrlcorpid: null,
  1266. fId: null,
  1267. fCorpid: null,
  1268. tMblno: null,
  1269. fAmtdr: null,
  1270. fAmtcr: null,
  1271. fBilltype: null,
  1272. fBillstatus: null,
  1273. fRemarks: null,
  1274. fAccbilldate: null,
  1275. fDeptid: null,
  1276. },
  1277. // 表单参数
  1278. form: {},
  1279. // 表单校验
  1280. ruless: {
  1281. fCtrlcorpid: [{ required: true, message: " ", trigger: "blur" }],
  1282. fCorpid: [{ required: true, message: " ", trigger: "blur" }],
  1283. fAccbilldate: [{ required: true, message: " ", trigger: "blur" }],
  1284. },
  1285. feeListRules: {
  1286. fDc: [{ required: true, message: " ", trigger: "blur" }],
  1287. fToCorpid: [{ required: true, message: " ", trigger: "blur" }],
  1288. fReconciliation: [{ required: true, message: " ", trigger: "blur" }],
  1289. timeExamine: [{ required: true, message: " ", trigger: "blur" }],
  1290. },
  1291. };
  1292. },
  1293. components: {
  1294. draggable,
  1295. AddOrUpdate,
  1296. ApprovalComments,
  1297. },
  1298. created() {
  1299. this.getList();
  1300. this.register();
  1301. this.getDicts("data_unitfees").then((response) => {
  1302. this.jFeetunitOptions = response.data;
  1303. });
  1304. this.getDicts("st_in_type").then((response) => {
  1305. this.businessTypeOption = response.data;
  1306. });
  1307. this.getRow();
  1308. },
  1309. activated() {
  1310. this.Jump();
  1311. },
  1312. methods: {
  1313. full() {
  1314. this.dialogFull = !this.dialogFull;
  1315. },
  1316. //列设置全选
  1317. allChecked() {
  1318. if (this.allCheck == true) {
  1319. this.setRowList.map((e) => {
  1320. return (e.checked = 0);
  1321. });
  1322. } else {
  1323. this.setRowList.map((e) => {
  1324. return (e.checked = 1);
  1325. });
  1326. }
  1327. },
  1328. //查询列数据
  1329. getRow() {
  1330. let that = this;
  1331. this.data = {
  1332. tableName: "对账",
  1333. userId: Cookies.get("userName"),
  1334. };
  1335. select(this.data).then((res) => {
  1336. if (res.data.length != 0) {
  1337. this.getRowList = res.data.filter((e) => e.checked == 0);
  1338. this.setRowList = res.data;
  1339. this.setRowList = this.setRowList.reduce((res, item) => {
  1340. res.push({
  1341. surface: item.surface,
  1342. label: item.label,
  1343. name: item.name,
  1344. checked: item.checked,
  1345. width: item.width,
  1346. });
  1347. return res;
  1348. }, []);
  1349. }
  1350. });
  1351. },
  1352. //保存列设置
  1353. save() {
  1354. this.showSetting = false;
  1355. this.data = {
  1356. tableName: "对账",
  1357. userId: Cookies.get("userName"),
  1358. sysTableSetList: this.setRowList,
  1359. };
  1360. addSet(this.data).then((res) => {
  1361. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  1362. });
  1363. },
  1364. //开始拖拽事件
  1365. onStart() {
  1366. this.drag = true;
  1367. },
  1368. //拖拽结束事件
  1369. onEnd() {
  1370. this.drag = false;
  1371. },
  1372. //对账页面合计
  1373. listTotal(param) {
  1374. const { columns, data } = param;
  1375. const sums = [];
  1376. columns.forEach((column, index) => {
  1377. if (index === 0) {
  1378. sums[index] = "合计";
  1379. } else if (index === 7 || index === 8) {
  1380. const values = data.map((item) => Number(item[column.property]));
  1381. if (!values.every((value) => isNaN(value))) {
  1382. sums[index] = values.reduce((prev, curr) => {
  1383. const value = Number(curr);
  1384. if (!isNaN(value)) {
  1385. return prev + curr;
  1386. } else {
  1387. return prev;
  1388. }
  1389. }, 0);
  1390. }
  1391. }
  1392. });
  1393. return sums;
  1394. },
  1395. //财务主取消
  1396. signOut() {
  1397. if (this.DzfeeList.length == 0) {
  1398. this.doNot = false;
  1399. } else {
  1400. this.doNot = true;
  1401. }
  1402. this.innerVisible = false;
  1403. this.feeList = [];
  1404. },
  1405. // 审批跳转
  1406. Jump() {
  1407. this.approval = this.$route.query.data;
  1408. if (this.approval) {
  1409. this.colseButton = false;
  1410. this.approval = JSON.parse(this.approval);
  1411. this.hide = false;
  1412. this.doNot = true;
  1413. this.notChange = true;
  1414. this.approve = true;
  1415. this.disappear = true;
  1416. this.cancelButton = false;
  1417. this.reset();
  1418. this.pass = {
  1419. fAmtdr: "", //应收合计
  1420. fAmtcr: "", //应付合计
  1421. fMblno: "", //提单号
  1422. fName: "", //货权方
  1423. fFeesName: "", //结算单位
  1424. fCorpid: "", //结算单位ID
  1425. };
  1426. getFee(this.approval.billId).then((response) => {
  1427. this.Operator = response.data.tFee.createBy;
  1428. this.DzfeeList = response.data.feeDoList;
  1429. this.fWbuOptions = response.data.feesList;
  1430. this.queryParams = response.data.tFee;
  1431. this.fWbuOptions = response.data.feesList;
  1432. this.fMblnoOptions = response.data.corps;
  1433. this.open = true;
  1434. this.title = "修改财务数据主";
  1435. });
  1436. }
  1437. },
  1438. homepaGe() {
  1439. let view = {
  1440. fullPath: "/finance/contrast",
  1441. hash: "",
  1442. matched: Array(2),
  1443. meta: Object,
  1444. name: "Contrast",
  1445. params: Object,
  1446. path: "/finance/contrast",
  1447. query: Object,
  1448. title: "对账",
  1449. };
  1450. this.$router.push({ path: "/index" });
  1451. this.$store
  1452. .dispatch("tagsView/delView", view)
  1453. .then(({ visitedViews }) => {
  1454. if (this.isActive(view)) {
  1455. this.toLastView(visitedViews, view);
  1456. }
  1457. });
  1458. Global.$emit("removeCache", "closeSelectedTag", view);
  1459. },
  1460. homePage() {
  1461. this.open = false;
  1462. let view = {
  1463. fullPath: "/finance/contrast",
  1464. hash: "",
  1465. matched: Array(2),
  1466. meta: Object,
  1467. name: "Contrast",
  1468. params: Object,
  1469. path: "/finance/contrast",
  1470. query: Object,
  1471. title: "对账",
  1472. };
  1473. this.$router.push({ path: "/index" });
  1474. this.$store
  1475. .dispatch("tagsView/delView", view)
  1476. .then(({ visitedViews }) => {
  1477. if (this.isActive(view)) {
  1478. this.toLastView(visitedViews, view);
  1479. }
  1480. });
  1481. Global.$emit("removeCache", "closeSelectedTag", view);
  1482. },
  1483. // 撤销审批
  1484. backApproval() {
  1485. let data = {
  1486. id: this.queryParams.fId,
  1487. actId: this.contrastId,
  1488. billId: this.queryParams.fId,
  1489. };
  1490. RevocationApproval(data).then((response) => {
  1491. this.msgSuccess("撤销审批成功");
  1492. this.disappear = true;
  1493. this.open = false;
  1494. this.getList();
  1495. });
  1496. },
  1497. returnData() {
  1498. this.addOrUpdateVisib = false;
  1499. this.open = false;
  1500. this.homepaGe();
  1501. },
  1502. getDataList() {
  1503. this.addOrUpdateVisible = false;
  1504. },
  1505. // 审批按钮
  1506. goApproval() {
  1507. this.addOrUpdateVisib = true;
  1508. this.$nextTick(() => {
  1509. this.$refs.ApprovalComments.init(this.queryParams.fId, this.contrastId);
  1510. });
  1511. },
  1512. // 查看审批流
  1513. addOrUpdateHandle() {
  1514. this.addOrUpdateVisible = true;
  1515. this.addOrUpdateVisib = false;
  1516. let id = "448";
  1517. let actId = "110";
  1518. this.$nextTick(() => {
  1519. this.$refs.addOrUpdate.init(this.queryParams.fId, this.contrastId);
  1520. });
  1521. },
  1522. // 撤销对账
  1523. backrRconciliation() {
  1524. this.queryParams.fBillstatus = "1";
  1525. let formDate = new window.FormData();
  1526. formDate.append("tFee", JSON.stringify(this.queryParams));
  1527. formDate.append("tFeeDo", JSON.stringify(this.DzfeeList));
  1528. backFee(formDate).then((response) => {
  1529. this.msgSuccess("撤回成功");
  1530. this.open = false;
  1531. this.reset();
  1532. this.getList();
  1533. });
  1534. },
  1535. // 打印功能
  1536. printing() {
  1537. if (this.DzfeeList.length !== 0) {
  1538. this.openPrint = true;
  1539. this.printObject = this.DzfeeList;
  1540. } else {
  1541. this.$message.error("无数据,请检查是否有数据");
  1542. }
  1543. },
  1544. // 确认打印
  1545. printSomething() {
  1546. // 此处的style即为打印时的样式
  1547. const style =
  1548. "table tr td,th { border-collapse: collapse;padding:15px;border:.5px #000 solid;text-align:center;}";
  1549. // "@media print {} }";
  1550. print({
  1551. printable: "print_area2",
  1552. type: "html",
  1553. header: "对账表",
  1554. headerStyle: "text-align:center;color:#000;width:100%;",
  1555. style: style, // 亦可使用引入的外部css;
  1556. scanStyles: false,
  1557. });
  1558. },
  1559. // 确认对账按钮功能
  1560. confirmReconciliation() {
  1561. this.$refs["ruless"].validate((valid) => {
  1562. if (valid) {
  1563. if (this.DzfeeList.length) {
  1564. // this.queryParams.fBillstatus = '4'
  1565. let formDate = new window.FormData();
  1566. formDate.append("tFee", JSON.stringify(this.queryParams));
  1567. formDate.append("tFeeDo", JSON.stringify(this.DzfeeList));
  1568. Cfee(formDate).then((response) => {
  1569. this.open = false;
  1570. this.msgSuccess("操作成功");
  1571. this.getList();
  1572. });
  1573. } else {
  1574. this.$message.error("表单为空不允许操作");
  1575. }
  1576. }
  1577. });
  1578. },
  1579. //导出
  1580. handleExportItems() {
  1581. const fIds = this.queryParams.fId;
  1582. if (fIds !== null) {
  1583. this.$confirm("是否确认导出所有计费物资明细数据?", "警告", {
  1584. confirmButtonText: "确定",
  1585. cancelButtonText: "取消",
  1586. type: "warning",
  1587. })
  1588. .then(function () {
  1589. return exportWarehousebillsitems(fIds);
  1590. })
  1591. .then((response) => {
  1592. this.download(response.msg);
  1593. });
  1594. } else {
  1595. this.$message("请先保存");
  1596. }
  1597. },
  1598. // 对账按钮功能
  1599. reconciliation() {
  1600. if (!this.typevalue) {
  1601. return this.$message("请先选择业务类型");
  1602. }
  1603. this.queryParameter = {
  1604. fToCorpid: this.queryParams.fCorpid,
  1605. };
  1606. this.innerVisible = true;
  1607. this.feeList = [];
  1608. this.TWareHouseFees = {
  1609. fCorpid: "",
  1610. fToCorpid: this.queryParams.fCorpid,
  1611. fMblno: "",
  1612. fStatementNo: "",
  1613. fFeeid: "",
  1614. timeExamine: "",
  1615. timeInterval: "",
  1616. fSrcdc: "",
  1617. fReconciliation: "0",
  1618. timeReconci: "",
  1619. fDc: "D",
  1620. fBilltype: "",
  1621. };
  1622. if (this.queryParams.fCorpid) {
  1623. this.doNot = true;
  1624. }
  1625. },
  1626. // 默认录入人
  1627. register() {
  1628. queryUserVal().then((response) => {
  1629. this.Lander = response.user.userName;
  1630. });
  1631. },
  1632. // 合计
  1633. getSum(param) {
  1634. const { columns, data } = param;
  1635. const sums = [];
  1636. columns.forEach((column, index) => {
  1637. sums[0] = "合计";
  1638. sums[10] = this.totAL.toFixed(2);
  1639. sums[9] = this.Ttime.toFixed(2);
  1640. });
  1641. return sums;
  1642. },
  1643. // 导入多选框
  1644. handleSelectionChange_s(selection) {
  1645. this.totAL = 0;
  1646. this.Ttime = 0;
  1647. this.selection = selection;
  1648. if (this.selection.length == 0) {
  1649. for (let item in this.feeList) {
  1650. this.totAL += Number(this.feeList[item].fAmt);
  1651. this.Ttime += Number(this.feeList[item].fAmtdr);
  1652. }
  1653. } else {
  1654. for (let index in selection) {
  1655. this.totAL += Number(selection[index].fAmt);
  1656. this.Ttime += Number(selection[index].fAmtdr);
  1657. }
  1658. }
  1659. },
  1660. // 多选框选中数据
  1661. handleSelectionChange(selection) {
  1662. this.totAL = 0;
  1663. this.ids = selection.map((item) => item.fId);
  1664. this.single =
  1665. selection.length !== 1 ||
  1666. selection.map((item) => item.fBillstatus) == 4 ||
  1667. selection.map((item) => item.fBillstatus) == 6;
  1668. this.multiple = !selection.length;
  1669. },
  1670. // 金额筛选
  1671. imgChangeI(row) {
  1672. if (row.fAmt && Number(row.fAmt) > Number(row.fAmtdr)) {
  1673. this.$set(row, "fAmt", row.fAmtdr);
  1674. this.state_s = true;
  1675. }
  1676. if (this.selection.length !== 0) {
  1677. this.totAL = 0;
  1678. this.Ttime = 0;
  1679. for (let item in this.selection) {
  1680. this.totAL += Number(this.selection[item].fAmt);
  1681. this.Ttime += Number(this.selection[item].fAmtdr);
  1682. }
  1683. } else {
  1684. this.totAL = 0;
  1685. this.Ttime = 0;
  1686. for (let item in this.feeList) {
  1687. this.totAL += Number(this.feeList[item].fAmt);
  1688. this.Ttime += Number(this.feeList[item].fAmtdr);
  1689. }
  1690. }
  1691. },
  1692. /* 添加财务数据主 导入*/
  1693. confirmImport() {
  1694. this.doNot = true;
  1695. this.hide = true;
  1696. this.pass.fAmtdr = 0;
  1697. this.pass.fAmtcr = 0;
  1698. for (let item in this.selection) {
  1699. this.pass.fAmtcr = Number(this.pass.fAmtcr);
  1700. this.pass.fAmtdr = Number(this.pass.fAmtdr);
  1701. this.pass.fAmtcr += Number(this.selection[item].fAmt);
  1702. this.pass.fAmtdr += Number(this.selection[item].fAmtdr.toFixed(2));
  1703. }
  1704. this.pass.fAmtcr.toFixed(2);
  1705. if (this.state_s == true) {
  1706. if (this.selection.length == "0") {
  1707. this.$message.error("未选择导入行");
  1708. } else {
  1709. for (let item in this.selection) {
  1710. this.empty.push(this.selection[item].fMblno);
  1711. this.nothing.push(this.selection[item].fName);
  1712. if (this.DzfeeList.length === 0) {
  1713. this.DzfeeList = this.DzfeeList.concat(this.selection);
  1714. //去重提单号
  1715. this.empty = new Set(this.empty);
  1716. this.empty = Array.from(this.empty);
  1717. //去重货权方
  1718. this.nothing = new Set(this.nothing);
  1719. this.nothing = Array.from(this.nothing);
  1720. if (this.empty.length <= 1) {
  1721. this.pass.fMblno = this.empty[0];
  1722. } else {
  1723. this.pass.fMblno = this.empty[0] + "...";
  1724. }
  1725. if (this.nothing.length <= 1) {
  1726. this.pass.fName = this.nothing[0];
  1727. } else {
  1728. this.pass.fName = this.nothing[0] + "...";
  1729. }
  1730. // this.DzfeeList = this.DzfeeList.concat(this.Fee)
  1731. this.queryParams.tMblno = this.pass.fMblno; //提单号
  1732. this.queryParams.fCorpid = this.TWareHouseFees.fToCorpid;
  1733. this.queryParams.fCtrlcorpid = this.pass.fName;
  1734. this.queryParams.fAmtcr = this.pass.fAmtcr;
  1735. this.queryParams.fAmtdr = this.pass.fAmtdr;
  1736. this.innerVisible = false;
  1737. this.feeList = [];
  1738. // this.feeList = this.DzfeeList
  1739. this.TWareHouseFees = {
  1740. fCorpid: "",
  1741. fToCorpid: "",
  1742. fMblno: "",
  1743. fStatementNo: "",
  1744. fFeeid: "",
  1745. timeExamine: "",
  1746. timeInterval: "",
  1747. fSrcdc: "",
  1748. fReconciliation: "0",
  1749. timeReconci: "",
  1750. fDc: "D",
  1751. };
  1752. return;
  1753. } else {
  1754. for (let li in this.DzfeeList) {
  1755. if (this.selection[item].fSrcid !== this.DzfeeList[li].fSrcid) {
  1756. this.Fee = this.DzfeeList.concat(this.selection);
  1757. console.log(this.Fee);
  1758. let result = [];
  1759. let obj = {};
  1760. for (let lis in this.Fee) {
  1761. if (!obj[this.Fee[lis].fSrcid]) {
  1762. result.push(this.Fee[lis]);
  1763. obj[this.Fee[lis].fSrcid] = true;
  1764. }
  1765. }
  1766. //去重提单号
  1767. this.empty = new Set(this.empty);
  1768. this.empty = Array.from(this.empty);
  1769. //去重货权方
  1770. this.nothing = new Set(this.nothing);
  1771. this.nothing = Array.from(this.nothing);
  1772. if (this.empty.length <= 1) {
  1773. this.pass.fMblno = this.empty[0];
  1774. } else {
  1775. this.pass.fMblno = this.empty[0] + "...";
  1776. }
  1777. if (this.nothing.length <= 1) {
  1778. this.pass.fName = this.nothing[0];
  1779. } else {
  1780. this.pass.fName = this.nothing[0] + "...";
  1781. }
  1782. // this.DzfeeList = this.DzfeeList.concat(this.Fee)
  1783. this.queryParams.tMblno = this.pass.fMblno; //提单号
  1784. this.queryParams.fCorpid = this.TWareHouseFees.fToCorpid;
  1785. this.queryParams.fCtrlcorpid = this.pass.fName;
  1786. this.queryParams.fAmtcr = this.pass.fAmtcr;
  1787. this.queryParams.fAmtdr = this.pass.fAmtdr;
  1788. this.innerVisible = false;
  1789. this.feeList = [];
  1790. // this.feeList = this.DzfeeList
  1791. this.TWareHouseFees = {
  1792. fCorpid: "",
  1793. fToCorpid: "",
  1794. fMblno: "",
  1795. fStatementNo: "",
  1796. fFeeid: "",
  1797. timeExamine: "",
  1798. timeInterval: "",
  1799. fSrcdc: "",
  1800. fReconciliation: "0",
  1801. timeReconci: "",
  1802. fDc: "D",
  1803. };
  1804. this.DzfeeList = result;
  1805. } else {
  1806. let i = Number(item) + 1;
  1807. this.$message.error("行号为" + i + "重复");
  1808. }
  1809. }
  1810. }
  1811. }
  1812. }
  1813. } else if (this.state_s == false) {
  1814. this.$message.error("本次金额不能大于原定金额");
  1815. }
  1816. },
  1817. // imgChangeI(fAmtdr,fAmt){
  1818. // if (fAmt <= fAmtdr){
  1819. // this.state_s = true
  1820. // }else if(fAmt > fAmtdr){
  1821. // this.$message.error('本次金额不能大于原定金额');
  1822. // this.state_s = false
  1823. // }
  1824. // },
  1825. // 导入搜索
  1826. searchFee(type) {
  1827. this.feeList = [];
  1828. this.$refs["feeListRules"].validate((valid) => {
  1829. if (valid) {
  1830. if (type == 1) {
  1831. importFee(this.TWareHouseFees).then((response) => {
  1832. this.feeList = response.rows;
  1833. if (this.feeList.length !== 0) {
  1834. this.$message.success("查询成功");
  1835. this.totAL = 0;
  1836. this.Ttime = 0;
  1837. for (let item in this.feeList) {
  1838. this.totAL += Number(this.feeList[item].fAmt);
  1839. this.Ttime += Number(this.feeList[item].fAmtdr);
  1840. this.$set(this.feeList[item], 'fBsdate', this.feeList[item].fBsdate.substring(0, 10))
  1841. }
  1842. } else {
  1843. this.$message.error("暂无数据");
  1844. }
  1845. });
  1846. } else {
  1847. importFleet(this.TWareHouseFees).then((response) => {
  1848. this.feeList = response.rows;
  1849. if (this.feeList.length !== 0) {
  1850. this.$message.success("查询成功");
  1851. this.totAL = 0;
  1852. this.Ttime = 0;
  1853. for (let item in this.feeList) {
  1854. this.totAL += Number(this.feeList[item].fAmt);
  1855. this.Ttime += Number(this.feeList[item].fAmtdr);
  1856. this.$set(this.feeList[item], 'fBsdate', this.feeList[item].fBsdate.substring(0, 10))
  1857. }
  1858. } else {
  1859. this.$message.error("暂无数据");
  1860. }
  1861. });
  1862. }
  1863. }
  1864. });
  1865. },
  1866. /** 打开导入表弹窗 */
  1867. openImportTable() {
  1868. this.$refs.import.show();
  1869. },
  1870. /** 查询财务数据主列表 */
  1871. getList() {
  1872. this.loading = true;
  1873. this.getDicts("approval_process").then((response) => {
  1874. // this.feeList = response.rows;
  1875. this.options = response.data;
  1876. });
  1877. // listFee(this.tablefilter).then((response) => {
  1878. // this.contrastList = response.rows;
  1879. // this.total = response.total;
  1880. // this.loading = false;
  1881. // });
  1882. listFleet(this.tablefilter).then((response) => {
  1883. this.contrastList = response.rows;
  1884. this.total = response.total;
  1885. this.loading = false;
  1886. });
  1887. },
  1888. // 取消按钮
  1889. cancel() {
  1890. this.open = false;
  1891. // this.feeList = []
  1892. this.reset();
  1893. this.getList();
  1894. this.typevalue = "";
  1895. },
  1896. // 表单重置
  1897. reset() {
  1898. this.form = {
  1899. fId: null,
  1900. fBillno: null,
  1901. fCtrlcorpid: null,
  1902. fCorpid: null,
  1903. tMblno: null,
  1904. fAmtdr: null,
  1905. fAmtcr: null,
  1906. fBilltype: null,
  1907. fBillstatus: "0",
  1908. fRemarks: null,
  1909. fAccbilldate: null,
  1910. delFlag: null,
  1911. createBy: null,
  1912. fDeptid: null,
  1913. createTime: null,
  1914. updateBy: null,
  1915. updateTime: null,
  1916. };
  1917. this.resetForm("form");
  1918. },
  1919. /** 搜索按钮操作 */
  1920. handleQuery() {
  1921. this.queryParams.pageNum = 1;
  1922. this.getList();
  1923. // this.searchFee()
  1924. },
  1925. changefBilltype() {
  1926. this.businessTypeOption = [];
  1927. if (this.TWareHouseFees.fBilltype == "SJRK") {
  1928. this.getDicts("st_in_type").then((response) => {
  1929. this.businessTypeOption = response.data;
  1930. });
  1931. } else if (this.TWareHouseFees.fBilltype == "SJCK") {
  1932. this.getDicts("st_out_type").then((response) => {
  1933. this.businessTypeOption = response.data;
  1934. });
  1935. } else if (this.TWareHouseFees.fBilltype == "HQZY") {
  1936. this.getDicts("st_trans_type").then((response) => {
  1937. this.businessTypeOption = response.data;
  1938. });
  1939. }
  1940. },
  1941. /** 重置按钮操作 */
  1942. resetQuery() {
  1943. // this.resetForm("queryParams_s");
  1944. this.tablefilter = {
  1945. pageNum: 1,
  1946. pageSize: 10,
  1947. fBillno: null,
  1948. fCtrlcorpid: null,
  1949. fCorpid: null,
  1950. timeInterval: null,
  1951. };
  1952. this.handleQuery();
  1953. this.TWareHouseFees = {
  1954. fCorpid: "",
  1955. fToCorpid: "",
  1956. fMblno: "",
  1957. fStatementNo: "",
  1958. fFeeid: "",
  1959. timeExamine: "",
  1960. timeInterval: "",
  1961. fSrcdc: "",
  1962. fReconciliation: "0",
  1963. };
  1964. },
  1965. //导入重置按钮
  1966. resetQuery_s() {
  1967. this.TWareHouseFees = {
  1968. fCorpid: "",
  1969. fToCorpid: "",
  1970. fMblno: "",
  1971. fStatementNo: "",
  1972. fFeeid: "",
  1973. timeExamine: "",
  1974. timeInterval: "",
  1975. fDc: "D",
  1976. fReconciliation: "0",
  1977. };
  1978. },
  1979. // 多选框选中数据
  1980. // handleSelectionChange(selection) {
  1981. // this.ids = selection.map(item => item.fId)
  1982. // this.single = selection.length!==1
  1983. // this.multiple = !selection.length
  1984. // },
  1985. // handleSelectionChanGe(selection){
  1986. // if(selection.length > 0) {
  1987. // this.statrGo = false
  1988. // }else{
  1989. // this.statrGo = true
  1990. // }
  1991. // },
  1992. /** 新增按钮操作 */
  1993. handleAdd() {
  1994. queryUserVal().then((response) => {
  1995. this.queryParams.createBy = response.user.userName;
  1996. });
  1997. this.typevalue = "";
  1998. this.doNot = false;
  1999. this.notChange = false;
  2000. this.hide = true;
  2001. this.reset();
  2002. this.DzfeeList = [];
  2003. this.pass = {
  2004. fAmtdr: "", //应收合计
  2005. fAmtcr: "", //应付合计
  2006. fMblno: "", //提单号
  2007. fName: "", //货权方
  2008. fFeesName: "", //结算单位
  2009. fCorpid: "", //结算单位ID
  2010. };
  2011. this.open = true;
  2012. this.title = "添加财务数据主";
  2013. this.queryParams = {
  2014. pageNum: 1,
  2015. pageSize: 10,
  2016. fBillno: null,
  2017. fCtrlcorpid: null,
  2018. fCorpid: null,
  2019. tMblno: null,
  2020. fAmtdr: null,
  2021. fId: null,
  2022. fAmtcr: null,
  2023. fBilltype: null,
  2024. fBillstatus: null,
  2025. fRemarks: null,
  2026. fAccbilldate: null,
  2027. fDeptid: null,
  2028. createBy: null,
  2029. timeReconci: null,
  2030. };
  2031. },
  2032. // 查看按钮
  2033. check(row, res) {
  2034. this.doNot = true;
  2035. this.notChange = true;
  2036. // getFee(row.fId).then((response) => {
  2037. // this.Operator = response.data.tFee.createBy;
  2038. // this.DzfeeList = response.data.feeDoList;
  2039. // this.fWbuOptions = response.data.feesList;
  2040. // this.queryParams = response.data.tFee;
  2041. // this.fWbuOptions = response.data.feesList;
  2042. // this.fMblnoOptions = response.data.corps;
  2043. // this.open = true;
  2044. // this.disappear = true;
  2045. // this.title = "修改财务数据主";
  2046. // if (res == 1) {
  2047. // this.notChange = true;
  2048. // if (this.Operator == this.Lander) {
  2049. // this.disappear = false;
  2050. // this.reset();
  2051. // this.pass = {
  2052. // fAmtdr: "", //应收合计
  2053. // fAmtcr: "", //应付合计
  2054. // fMblno: "", //提单号
  2055. // fName: "", //货权方
  2056. // fFeesName: "", //结算单位
  2057. // fCorpid: "", //结算单位ID
  2058. // };
  2059. // const fId = row.fId || this.ids;
  2060. // getFee(fId).then((response) => {
  2061. // this.DzfeeList = response.data.feeDoList;
  2062. // this.fWbuOptions = response.data.feesList;
  2063. // this.queryParams = response.data.tFee;
  2064. // this.fWbuOptions = response.data.feesList;
  2065. // this.fMblnoOptions = response.data.corps;
  2066. // this.open = true;
  2067. // });
  2068. // } else {
  2069. // this.notChange = true;
  2070. // }
  2071. // } else {
  2072. // this.notChange = true;
  2073. // this.reset();
  2074. // this.pass = {
  2075. // fAmtdr: "", //应收合计
  2076. // fAmtcr: "", //应付合计
  2077. // fMblno: "", //提单号
  2078. // fName: "", //货权方
  2079. // fFeesName: "", //结算单位
  2080. // fCorpid: "", //结算单位ID
  2081. // };
  2082. // const fId = row.fId || this.ids;
  2083. // getFee(fId).then((response) => {
  2084. // this.DzfeeList = response.data.feeDoList;
  2085. // this.fWbuOptions = response.data.feesList;
  2086. // this.queryParams = response.data.tFee;
  2087. // this.fWbuOptions = response.data.feesList;
  2088. // this.fMblnoOptions = response.data.corps;
  2089. // this.open = true;
  2090. // this.open = true;
  2091. // });
  2092. // }
  2093. // });
  2094. getFleet(row.fId).then((response) => {
  2095. this.Operator = response.data.tFee.createBy;
  2096. this.DzfeeList = response.data.feeDoList;
  2097. this.fWbuOptions = response.data.feesList;
  2098. this.queryParams = response.data.tFee;
  2099. this.fWbuOptions = response.data.feesList;
  2100. this.fMblnoOptions = response.data.corps;
  2101. this.open = true;
  2102. this.disappear = true;
  2103. this.title = "修改财务数据主";
  2104. if (res == 1) {
  2105. this.notChange = true;
  2106. if (this.Operator == this.Lander) {
  2107. this.disappear = false;
  2108. this.reset();
  2109. this.pass = {
  2110. fAmtdr: "", //应收合计
  2111. fAmtcr: "", //应付合计
  2112. fMblno: "", //提单号
  2113. fName: "", //货权方
  2114. fFeesName: "", //结算单位
  2115. fCorpid: "", //结算单位ID
  2116. };
  2117. const fId = row.fId || this.ids;
  2118. getFleet(fId).then((response) => {
  2119. this.DzfeeList = response.data.feeDoList;
  2120. this.fWbuOptions = response.data.feesList;
  2121. this.queryParams = response.data.tFee;
  2122. this.fWbuOptions = response.data.feesList;
  2123. this.fMblnoOptions = response.data.corps;
  2124. this.open = true;
  2125. });
  2126. } else {
  2127. this.notChange = true;
  2128. }
  2129. } else {
  2130. this.notChange = true;
  2131. this.reset();
  2132. this.pass = {
  2133. fAmtdr: "", //应收合计
  2134. fAmtcr: "", //应付合计
  2135. fMblno: "", //提单号
  2136. fName: "", //货权方
  2137. fFeesName: "", //结算单位
  2138. fCorpid: "", //结算单位ID
  2139. };
  2140. const fId = row.fId || this.ids;
  2141. getFleet(fId).then((response) => {
  2142. this.DzfeeList = response.data.feeDoList;
  2143. this.fWbuOptions = response.data.feesList;
  2144. this.queryParams = response.data.tFee;
  2145. this.fWbuOptions = response.data.feesList;
  2146. this.fMblnoOptions = response.data.corps;
  2147. this.open = true;
  2148. this.open = true;
  2149. });
  2150. }
  2151. });
  2152. },
  2153. /** 修改按钮操作 */
  2154. handleUpdate(row) {
  2155. this.notChange = false;
  2156. this.hide = false;
  2157. this.reset();
  2158. this.pass = {
  2159. fAmtdr: "", //应收合计
  2160. fAmtcr: "", //应付合计
  2161. fMblno: "", //提单号
  2162. fName: "", //货权方
  2163. fFeesName: "", //结算单位
  2164. fCorpid: "", //结算单位ID
  2165. };
  2166. const fId = row.fId || this.ids;
  2167. // getFee(fId).then((response) => {
  2168. // this.Operator = response.data.tFee.createBy;
  2169. // this.DzfeeList = response.data.feeDoList;
  2170. // this.fWbuOptions = response.data.feesList;
  2171. // this.queryParams = response.data.tFee;
  2172. // this.fMblnoOptions = response.data.corps;
  2173. // this.open = true;
  2174. // this.title = "修改财务数据主";
  2175. // if (this.DzfeeList) {
  2176. // this.doNot = true;
  2177. // } else {
  2178. // this.doNot = false;
  2179. // }
  2180. // });
  2181. getFleet(fId).then((response) => {
  2182. this.Operator = response.data.tFee.createBy;
  2183. this.DzfeeList = response.data.feeDoList;
  2184. this.fWbuOptions = response.data.feesList;
  2185. this.queryParams = response.data.tFee;
  2186. this.fMblnoOptions = response.data.corps;
  2187. this.open = true;
  2188. this.title = "修改财务数据主";
  2189. if (this.DzfeeList) {
  2190. this.doNot = true;
  2191. } else {
  2192. this.doNot = false;
  2193. }
  2194. });
  2195. },
  2196. /** 远程模糊查询用户 */
  2197. corpsRemoteMethod(name) {
  2198. if (name == null || name === "") {
  2199. return false;
  2200. }
  2201. let queryParams = { pageNum: 1, pageSize: 10, fName: name, type: 1 };
  2202. listCorps(queryParams).then((response) => {
  2203. this.fMblnoOptions = response.rows;
  2204. this.KHblnoOptions = response.rows;
  2205. });
  2206. },
  2207. /** 提交按钮 */
  2208. submitForm(type) {
  2209. this.$refs["ruless"].validate((valid) => {
  2210. if (valid) {
  2211. if (!this.queryParams.fId) {
  2212. this.queryParams.fBillstatus = "1";
  2213. let formData = new window.FormData();
  2214. formData.append("tFee", JSON.stringify(this.queryParams));
  2215. formData.append("tFeeDo", JSON.stringify(this.DzfeeList));
  2216. if (type == 1) {
  2217. updateFee(formData).then((response) => {
  2218. console.log(response);
  2219. this.queryParams = response.data.tFee;
  2220. this.msgSuccess("新增成功");
  2221. // this.DzfeeList = []
  2222. // this.open = false;
  2223. this.getList();
  2224. this.typevalue = "";
  2225. });
  2226. } else {
  2227. addFleet(formData).then((response) => {
  2228. console.log(response);
  2229. this.queryParams = response.data.tFee;
  2230. this.msgSuccess("新增成功");
  2231. // this.DzfeeList = []
  2232. // this.open = false;
  2233. this.getList();
  2234. this.typevalue = "";
  2235. });
  2236. }
  2237. } else {
  2238. this.pass.fAmtcr = 0;
  2239. this.pass.fAmtdr = 0;
  2240. for (let item in this.DzfeeList) {
  2241. this.pass.fAmtcr += Number(this.DzfeeList[item].fAmt);
  2242. this.pass.fAmtdr += Number(this.DzfeeList[item].fAmtdr);
  2243. }
  2244. this.queryParams.fAmtcr = Number(this.pass.fAmtcr.toFixed(2));
  2245. this.queryParams.fAmtdr = Number(this.pass.fAmtdr.toFixed(2));
  2246. this.pass.fAmtcr.toFixed(2);
  2247. this.queryParams.fBillstatus = "1";
  2248. let formData = new window.FormData();
  2249. formData.append("tFee", JSON.stringify(this.queryParams));
  2250. formData.append("tFeeDo", JSON.stringify(this.DzfeeList));
  2251. if (type == 1) {
  2252. addFee(formData).then((response) => {
  2253. this.msgSuccess("修改成功");
  2254. this.getList();
  2255. });
  2256. } else {
  2257. addFleet(formData).then((response) => {
  2258. this.msgSuccess("修改成功");
  2259. this.getList();
  2260. });
  2261. }
  2262. }
  2263. }
  2264. });
  2265. },
  2266. /** 删除按钮操作 */
  2267. handleDelete(row) {
  2268. const fIds = row.fId || this.ids;
  2269. let tips = "";
  2270. detailFleet(fIds).then((res) => {
  2271. switch (res.msg) {
  2272. case "0": {
  2273. this.$message.error("当前数据已被其他操作员操作,请刷新页面");
  2274. break;
  2275. }
  2276. case "1": {
  2277. tips = "当前主表有数据,从表无数据,确认是否删除?";
  2278. this.delete_s(fIds, tips);
  2279. break;
  2280. }
  2281. case "2": {
  2282. tips = "当前主表有数据,从表有数据,确认是否删除?";
  2283. this.delete_s(fIds, tips);
  2284. break;
  2285. }
  2286. default: {
  2287. return this.$message.error("未知错误,无状态");
  2288. }
  2289. }
  2290. });
  2291. // detailFee(fIds).then((res) => {
  2292. // switch (res.msg) {
  2293. // case "0": {
  2294. // this.$message.error("当前数据已被其他操作员操作,请刷新页面");
  2295. // break;
  2296. // }
  2297. // case "1": {
  2298. // tips = "当前主表有数据,从表无数据,确认是否删除?";
  2299. // this.delete_s(fIds, tips);
  2300. // break;
  2301. // }
  2302. // case "2": {
  2303. // tips = "当前主表有数据,从表有数据,确认是否删除?";
  2304. // this.delete_s(fIds, tips);
  2305. // break;
  2306. // }
  2307. // default: {
  2308. // return this.$message.error("未知错误,无状态");
  2309. // }
  2310. // }
  2311. // });
  2312. },
  2313. delete_s(fIds, tips) {
  2314. this.$confirm(tips, "警告", {
  2315. confirmButtonText: "确定",
  2316. cancelButtonText: "取消",
  2317. type: "warning",
  2318. })
  2319. .then(function () {
  2320. // return delFee(fIds);
  2321. return delFleet(fIds);
  2322. })
  2323. .then(() => {
  2324. this.getList();
  2325. this.msgSuccess("删除成功");
  2326. });
  2327. },
  2328. // 远程模糊查询费用名称
  2329. fWRemoteMethod(name) {
  2330. this.fWbuOptions = [];
  2331. if (name == null || name === "") {
  2332. return false;
  2333. }
  2334. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2335. listFees(queryParams).then((response) => {
  2336. this.fWbuOptions = response.rows;
  2337. });
  2338. },
  2339. /** 导出按钮操作 */
  2340. handleExport() {
  2341. const queryParams = this.queryParams;
  2342. this.$confirm("是否确认导出所有财务数据主数据项?", "警告", {
  2343. confirmButtonText: "确定",
  2344. cancelButtonText: "取消",
  2345. type: "warning",
  2346. })
  2347. .then(function () {
  2348. return exportFee(queryParams);
  2349. })
  2350. .then((response) => {
  2351. this.download(response.msg);
  2352. });
  2353. },
  2354. exportData() {
  2355. // 在这里判断筛选DzfeeList={}
  2356. const DzfeeList = this.DzfeeList;
  2357. this.$confirm("是否确认导出所有财务数据主数据项?", "警告", {
  2358. confirmButtonText: "确定",
  2359. cancelButtonText: "取消",
  2360. type: "warning",
  2361. })
  2362. .then(function () {
  2363. return;
  2364. })
  2365. .then(function () {
  2366. this.download(response.msg);
  2367. });
  2368. },
  2369. //清空一行
  2370. deleteRow(index, rows) {
  2371. this.queryParams.fAmtdr = 0;
  2372. this.queryParams.fAmtcr = 0;
  2373. rows.splice(index, 1);
  2374. for (let item in this.DzfeeList) {
  2375. this.queryParams.fAmtcr = this.DzfeeList[item].fAmt;
  2376. this.queryParams.fAmtdr = this.DzfeeList[item].fAmtdr;
  2377. }
  2378. if (this.DzfeeList == 0) {
  2379. console.log("111");
  2380. this.doNot = false;
  2381. } else {
  2382. this.doNot = true;
  2383. }
  2384. },
  2385. },
  2386. };
  2387. </script>
  2388. <style lang="scss" scoped>
  2389. .tabSetting {
  2390. display: flex;
  2391. justify-content: flex-end;
  2392. }
  2393. .listStyle {
  2394. display: flex;
  2395. border-top: 1px solid #dcdfe6;
  2396. border-left: 1px solid #dcdfe6;
  2397. border-right: 1px solid #dcdfe6;
  2398. }
  2399. .listStyle:last-child {
  2400. border-bottom: 1px solid #dcdfe6;
  2401. }
  2402. .progress {
  2403. display: flex;
  2404. align-items: center;
  2405. padding: 2px;
  2406. background-color: rgba(0, 0, 0, 0.05);
  2407. height: 100%;
  2408. }
  2409. .avue-crud__dialog__header {
  2410. display: -webkit-box;
  2411. display: -ms-flexbox;
  2412. display: flex;
  2413. -webkit-box-align: center;
  2414. -ms-flex-align: center;
  2415. align-items: center;
  2416. -webkit-box-pack: justify;
  2417. -ms-flex-pack: justify;
  2418. justify-content: space-between;
  2419. }
  2420. .el-dialog__title {
  2421. color: rgba(0, 0, 0, 0.85);
  2422. font-weight: 500;
  2423. word-wrap: break-word;
  2424. }
  2425. .avue-crud__dialog__menu {
  2426. padding-right: 20px;
  2427. float: left;
  2428. }
  2429. .avue-crud__dialog__menu i {
  2430. color: #909399;
  2431. font-size: 15px;
  2432. }
  2433. .el-icon-full-screen {
  2434. cursor: pointer;
  2435. }
  2436. .el-icon-full-screen:before {
  2437. content: "\e719";
  2438. }
  2439. </style>