index.vue 83 KB

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