index.vue 100 KB

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