index.vue 110 KB

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