index.vue 126 KB

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