index.vue 115 KB

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