index.vue 80 KB

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