index.vue 109 KB

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