index.vue 123 KB

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