index.vue 123 KB

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