index.vue 117 KB

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