index.vue 113 KB

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