index.vue 81 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="tablefilter"
  5. ref="queryParams_s"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="68px"
  9. >
  10. <el-form-item label="货权方" prop="fCtrlcorpid">
  11. <el-input
  12. v-model="tablefilter.fCtrlcorpid"
  13. placeholder="请输入客户名称"
  14. filterable
  15. remote
  16. clearable
  17. size="small"
  18. style="width: 200px"
  19. @keyup.enter.native="handleQuery"
  20. :remote-method="corpsRemoteMethod"
  21. />
  22. </el-form-item>
  23. <el-form-item label="结算单位" prop="fCorpid">
  24. <el-select
  25. v-model="tablefilter.fCorpid"
  26. placeholder="请选择结算单位"
  27. filterable
  28. remote
  29. clearable
  30. size="small"
  31. style="width: 200px"
  32. @keyup.enter.native="handleQuery"
  33. :remote-method="corpsRemoteMethod"
  34. >
  35. <el-option
  36. v-for="(dict, index) in fMblnoOptions"
  37. :key="index.fId"
  38. :label="dict.fName"
  39. :value="dict.fId"
  40. ></el-option>
  41. </el-select>
  42. </el-form-item>
  43. <el-form-item label="对账日期" prop="timeInterval">
  44. <el-date-picker
  45. v-model="tablefilter.timeInterval"
  46. size="small"
  47. style="width: 240px"
  48. value-format="yyyy-MM-dd"
  49. type="daterange"
  50. range-separator="-"
  51. start-placeholder="开始日期"
  52. end-placeholder="结束日期"
  53. ></el-date-picker>
  54. </el-form-item>
  55. <el-form-item label="系统编号" prop="fBillno">
  56. <el-input
  57. v-model="tablefilter.fBillno"
  58. placeholder="请输入系统编号"
  59. clearable
  60. size="small"
  61. style="width: 200px"
  62. @keyup.enter.native="handleQuery"
  63. />
  64. </el-form-item>
  65. <el-form-item>
  66. <el-button
  67. type="cyan"
  68. icon="el-icon-search"
  69. size="mini"
  70. @click="handleQuery"
  71. >搜索</el-button
  72. >
  73. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  74. >重置</el-button
  75. >
  76. </el-form-item>
  77. </el-form>
  78. <el-row :gutter="10" class="mb8">
  79. <el-col :span="1.5">
  80. <el-button
  81. type="primary"
  82. icon="el-icon-plus"
  83. size="mini"
  84. @click="handleAdd"
  85. v-hasPermi="['finance:contrast:add']"
  86. >新增</el-button
  87. >
  88. </el-col>
  89. <el-col :span="1.5">
  90. <el-button
  91. type="success"
  92. icon="el-icon-edit"
  93. size="mini"
  94. :disabled="single"
  95. @click="handleUpdate"
  96. v-hasPermi="['warehouse:contrast:edit']"
  97. >修改</el-button
  98. >
  99. </el-col>
  100. <el-col :span="1.5">
  101. <el-button
  102. type="warning"
  103. icon="el-icon-download"
  104. size="mini"
  105. @click="handleExport"
  106. v-hasPermi="['finance:contrast:export']"
  107. >导出</el-button
  108. >
  109. </el-col>
  110. <div class="tabSetting">
  111. <right-toolbar
  112. :showSearch.sync="showSearch"
  113. @queryTable="getList"
  114. ></right-toolbar>
  115. <div style="margin: 0 12px">
  116. <el-button
  117. icon="el-icon-setting"
  118. size="mini"
  119. circle
  120. @click="showSetting = !showSetting"
  121. ></el-button>
  122. </div>
  123. </div>
  124. </el-row>
  125. <el-dialog
  126. title="提示"
  127. :visible.sync="showSetting"
  128. width="700px"
  129. v-dialogDrag
  130. >
  131. <template slot="title">
  132. <div class="avue-crud__dialog__header">
  133. <span class="el-dialog__title">
  134. <span
  135. style="
  136. display: inline-block;
  137. width: 3px;
  138. height: 20px;
  139. margin-right: 5px;
  140. float: left;
  141. margin-top: 2px;
  142. "
  143. ></span>
  144. </span>
  145. </div>
  146. </template>
  147. <div>配置排序列数据(拖动调整顺序)</div>
  148. <div style="margin-left: 17px">
  149. <el-checkbox
  150. v-model="allCheck"
  151. label="全选"
  152. @change="allChecked"
  153. ></el-checkbox>
  154. </div>
  155. <div style="padding: 4px; display: flex; justify-content: center">
  156. <draggable
  157. v-model="setRowList"
  158. group="site"
  159. animation="300"
  160. @start="onStart"
  161. @end="onEnd"
  162. handle=".indraggable"
  163. >
  164. <transition-group>
  165. <div
  166. v-for="item in setRowList"
  167. :key="item.surface"
  168. class="listStyle"
  169. >
  170. <div style="width: 500px" class="indraggable">
  171. <div class="progress" :style="{ width: item.width + 'px' }">
  172. <el-checkbox
  173. :label="item.name"
  174. v-model="item.checked"
  175. :true-label="0"
  176. :false-label="1"
  177. >{{ item.name }}
  178. </el-checkbox>
  179. </div>
  180. </div>
  181. <el-input-number
  182. v-model.number="item.width"
  183. controls-position="right"
  184. :min="1"
  185. :max="500"
  186. size="mini"
  187. ></el-input-number>
  188. </div>
  189. </transition-group>
  190. </draggable>
  191. </div>
  192. <span slot="footer" class="dialog-footer">
  193. <el-button @click="showSetting = false">取 消</el-button>
  194. <el-button type="primary" @click="save()">确 定</el-button>
  195. </span>
  196. </el-dialog>
  197. <el-table
  198. v-loading="loading"
  199. :data="contrastList"
  200. @selection-change="handleSelectionChange"
  201. show-summary
  202. :summary-method="listTotal"
  203. >
  204. <el-table-column width="100" align="center" type="selection" />
  205. <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
  206. <el-table-column label="行号" align="center" type="index" fixed="left" />
  207. <el-table-column
  208. v-for="(item, index) in getRowList"
  209. :key="index"
  210. :label="item.name"
  211. :width="item.width"
  212. :prop="item.label"
  213. align="center"
  214. :fixed="item.fixed"
  215. />
  216. <!-- <el-table-column label="系统编号" align="center" prop="fBillno" show-overflow-tooltip width="120"/>-->
  217. <!-- <el-table-column label="货权方" sortable align="center" show-overflow-tooltip prop="fCtrlcorpid" width="220"/>-->
  218. <!-- <el-table-column label="结算单位" sortable align="center" prop="fCorpidName" show-overflow-tooltip width="220"/>-->
  219. <!-- <el-table-column label="账单日期" sortable align="center" prop="fAccbilldate" width="120">-->
  220. <!-- <template slot-scope="scope">-->
  221. <!-- <span>{{ parseTime(scope.row.fAccbilldate, "{y}-{m}-{d}") }}</span>-->
  222. <!-- </template>-->
  223. <!-- </el-table-column>-->
  224. <!-- <el-table-column label="提单号" sortable align="center" prop="tMblno" width="216"/>-->
  225. <!-- <el-table-column label="金额" align="center" prop="fAmtdr" width="120"/>-->
  226. <!-- <el-table-column label="对账金额" align="center" prop="fAmtcr" width="120"/>-->
  227. <!-- &lt;!&ndash; <el-table-column label="单据类型" align="center" prop="fBilltype" />&ndash;&gt;-->
  228. <!-- <el-table-column label="备注" align="center" show-overflow-tooltip prop="fRemarks" width="120"/>-->
  229. <!-- <el-table-column label="状态" align="center" prop="fBillstatus" width="120">-->
  230. <!-- <template slot-scope="scope">-->
  231. <!-- <span v-if="scope.row.fBillstatus == '1'">保存</span>-->
  232. <!-- <span v-else-if="scope.row.fBillstatus == '2'">暂存</span>-->
  233. <!-- <span v-else-if="scope.row.fBillstatus == '3'">审批驳回</span>-->
  234. <!-- <span v-else-if="scope.row.fBillstatus == '4'">提交审核</span>-->
  235. <!-- <span v-else-if="scope.row.fBillstatus == '5'">审核中</span>-->
  236. <!-- <span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>-->
  237. <!-- </template>-->
  238. <!-- </el-table-column>-->
  239. <!-- <el-table-column label="制单部门" align="center" prop="fDeptid" /> -->
  240. <el-table-column
  241. label="操作"
  242. align="center"
  243. class-name="small-padding fixed-width"
  244. min-width="180"
  245. fixed="right"
  246. >
  247. <template slot-scope="scope">
  248. <el-button
  249. size="mini"
  250. type="text"
  251. icon="el-icon-view"
  252. @click="check(scope.row, 0)"
  253. v-hasPermi="['finance:contrast:edit']"
  254. >查看</el-button
  255. >
  256. <el-button
  257. size="mini"
  258. type="text"
  259. icon="el-icon-view"
  260. @click="check(scope.row, 1)"
  261. v-hasPermi="['finance:contrast:edit']"
  262. v-if="
  263. scope.row.fBillstatus == '提交审核' ||
  264. scope.row.fBillstatus == '审核中'
  265. "
  266. >审批进度</el-button
  267. >
  268. <el-button
  269. size="mini"
  270. type="text"
  271. icon="el-icon-edit"
  272. @click="handleUpdate(scope.row)"
  273. v-hasPermi="['finance:contrast:edit']"
  274. v-if="
  275. scope.row.fBillstatus == '保存' ||
  276. scope.row.fBillstatus == '暂存' ||
  277. scope.row.fBillstatus == '审批驳回'
  278. "
  279. >
  280. 修改</el-button
  281. >
  282. <el-button
  283. size="mini"
  284. type="text"
  285. icon="el-icon-delete"
  286. @click="handleDelete(scope.row)"
  287. v-hasPermi="['finance:contrast:remove']"
  288. v-if="
  289. scope.row.fBillstatus == '保存' ||
  290. scope.row.fBillstatus == '暂存' ||
  291. scope.row.fBillstatus == '审批驳回'
  292. "
  293. >删除</el-button
  294. >
  295. </template>
  296. </el-table-column>
  297. </el-table>
  298. <pagination
  299. v-show="total > 0"
  300. :total="total"
  301. :page.sync="queryParams.pageNum"
  302. :limit.sync="queryParams.pageSize"
  303. @pagination="getList"
  304. />
  305. <!-- 对账表 -->
  306. <el-dialog
  307. v-dialogDrag
  308. :fullscreen="dialogFull"
  309. :visible.sync="open"
  310. width="70%"
  311. append-to-body
  312. :close-on-click-modal="false"
  313. :show-close="colseButton"
  314. >
  315. <template slot="title">
  316. <div class="avue-crud__dialog__header">
  317. <span class="el-dialog__title">
  318. <span
  319. style="
  320. display: inline-block;
  321. width: 3px;
  322. height: 20px;
  323. margin-right: 5px;
  324. float: left;
  325. margin-top: 2px;
  326. "
  327. ></span>
  328. </span>
  329. <div class="avue-crud__dialog__menu enlarge" @click="full">
  330. <i
  331. style="
  332. cursor: pointer;
  333. display: block;
  334. width: 12px;
  335. height: 12px;
  336. border: 1px solid #909399;
  337. border-top: 3px solid #909399;
  338. margin-top: -3px;
  339. "
  340. ></i>
  341. </div>
  342. </div>
  343. </template>
  344. <el-form
  345. ref="ruless"
  346. :model="queryParams"
  347. :rules="ruless"
  348. label-width="68px"
  349. :inline="true"
  350. v-show="showSearch"
  351. >
  352. <el-form-item label="货权方" prop="fCtrlcorpid">
  353. <el-input
  354. v-model="queryParams.fCtrlcorpid"
  355. clearable
  356. size="small"
  357. style="width: 200px"
  358. @keyup.enter.native="handleQuery"
  359. :disabled="notChange"
  360. placeholder="请输入客户名称"
  361. />
  362. </el-form-item>
  363. <el-form-item label="结算单位" label-width="78px" prop="fCorpid">
  364. <el-select
  365. v-model="queryParams.fCorpid"
  366. placeholder="请选择结算单位"
  367. filterable
  368. remote
  369. clearable
  370. :disabled="doNot"
  371. style="width: 200px"
  372. size="small"
  373. @keyup.enter.native="handleQuery"
  374. :remote-method="corpsRemoteMethod"
  375. >
  376. <el-option
  377. v-for="(dict, index) in fMblnoOptions"
  378. :key="index.fId"
  379. :label="dict.fName"
  380. :value="dict.fId"
  381. ></el-option>
  382. </el-select>
  383. </el-form-item>
  384. <!-- <el-form-item label="提单号" prop="tMblno">
  385. <el-input v-model="TWareHouseFees.tMblno" placeholder="" :disabled="true"/>
  386. </el-form-item> -->
  387. <el-form-item label="对账日期" prop="fAccbilldate" label-width="78px">
  388. <el-date-picker
  389. v-model="queryParams.fAccbilldate"
  390. size="small"
  391. style="width: 200px"
  392. value-format="yyyy-MM-dd"
  393. type="date"
  394. :disabled="notChange"
  395. placeholder="选择账单日期"
  396. >
  397. </el-date-picker>
  398. </el-form-item>
  399. <el-form-item label="系统编号" prop="fBillno">
  400. <el-input
  401. v-model="queryParams.fBillno"
  402. placeholder=""
  403. clearable
  404. size="small"
  405. :disabled="true"
  406. style="width: 200px"
  407. @keyup.enter.native="handleQuery"
  408. />
  409. </el-form-item>
  410. <el-form-item label="录入人" prop="createBy">
  411. <el-input v-model="queryParams.createBy" disabled />
  412. </el-form-item>
  413. <el-form-item label="备注" prop="fRemarks">
  414. <el-input
  415. v-model="queryParams.fRemarks"
  416. size="small"
  417. style="width: 200px"
  418. :disabled="notChange"
  419. />
  420. </el-form-item>
  421. <el-form-item label="业务类型" prop="fSystemType">
  422. <el-select
  423. v-model="queryParams.fSystemType"
  424. placeholder="请选择业务类型"
  425. size="small"
  426. disabled
  427. style="width: 200px"
  428. >
  429. <el-option
  430. v-for="item in typeoptions"
  431. :key="item.value"
  432. :label="item.label"
  433. :value="item.value"
  434. >
  435. </el-option>
  436. </el-select>
  437. </el-form-item>
  438. <div style="width: 100%">
  439. <el-button
  440. type="warning"
  441. size="small"
  442. @click="reconciliation"
  443. :disabled="notChange"
  444. v-if="queryParams.fBillstatus < '4'"
  445. >对账</el-button
  446. >
  447. <el-button
  448. type="primary"
  449. size="small"
  450. @click="confirmReconciliation"
  451. :disabled="notChange"
  452. v-if="queryParams.fBillstatus < '4'"
  453. >确认对账</el-button
  454. >
  455. <el-button type="warning" size="small" @click="handleExportItems"
  456. >导出</el-button
  457. >
  458. <el-button
  459. type="success"
  460. size="small"
  461. @click="backrRconciliation"
  462. v-if="queryParams.fBillstatus === '6'"
  463. >撤销对账</el-button
  464. >
  465. <!-- <el-button type="info" size="small" @click="exportData">导出</el-button>-->
  466. <el-button
  467. type="danger"
  468. size="small"
  469. :disabled="disappear"
  470. v-if="queryParams.fBillstatus === '4'"
  471. @click="backApproval"
  472. >撤销审批</el-button
  473. >
  474. </div>
  475. <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
  476. </el-form>
  477. <el-table
  478. v-loading="loading"
  479. :data="DzfeeList"
  480. @selection-change="handleSelectionChange_s"
  481. >
  482. <el-table-column label="行号" align="center" type="index" />
  483. <el-table-column label="提单号" align="center" prop="fMblno" />
  484. <el-table-column label="业务日期" align="center" prop="fBsdate">
  485. <template slot-scope="scope">
  486. <span v-if="scope.row.fBsdate === undefined">无</span>
  487. <span v-else>{{ scope.row.fBsdate.slice(0, 10) }}</span>
  488. </template>
  489. </el-table-column>
  490. <el-table-column label="费用名称" align="center" prop="fFeeName" />
  491. <el-table-column label="收/付" align="center" prop="fSrcdc">
  492. <template slot-scope="scope">
  493. <span v-if="scope.row.fSrcdc == 'D'">收</span>
  494. <span v-else-if="scope.row.fSrcdc == 'C'">付</span>
  495. </template>
  496. </el-table-column>
  497. <el-table-column label="金额" align="center" prop="fAmtdr" />
  498. <el-table-column label="计价单位" align="center" prop="fFeeunitid" />
  499. <el-table-column label="数量" align="center" prop="fQty" />
  500. <el-table-column label="单价" align="center" prop="fUnitprice" />
  501. <el-table-column label="本次金额" align="center" prop="fAmt" />
  502. <el-table-column label="作业类型" align="center" prop="fBusinessType" />
  503. <el-table-column label="业务类型" align="center" prop="fBilltype">
  504. <template slot-scope="scope">
  505. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  506. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  507. <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>
  508. <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>
  509. <span v-else-if="scope.row.fBilltype == 'JSCCF'">仓储费</span>
  510. <span v-else>{{ scope.row.fBilltype }}</span>
  511. </template>
  512. </el-table-column>
  513. <el-table-column label="来源编号" align="center" prop="srcBillNo" />
  514. <el-table-column label="提单号" align="center" prop="fMblno" />
  515. <el-table-column label="货物品名" align="center" prop="fProductName" />
  516. <el-table-column label="品牌" align="center" prop="fMarks" />
  517. <el-table-column label="计费起始日期" align="center" prop="fChargedate">
  518. <template slot-scope="scope">
  519. <span v-if="scope.row.fChargedate === undefined">无</span>
  520. <span v-else>{{ scope.row.fChargedate.slice(0, 10) }}</span>
  521. </template>
  522. </el-table-column>
  523. <el-table-column
  524. label="计费截止日期"
  525. align="center"
  526. prop="fBillingDeadline"
  527. >
  528. <template slot-scope="scope">
  529. <span v-if="scope.row.fBillingDeadline === undefined">无</span>
  530. <span v-else>{{ scope.row.fBillingDeadline.slice(0, 10) }}</span>
  531. </template>
  532. </el-table-column>
  533. <el-table-column label="计费天数" align="center" prop="fBillingDays" />
  534. <el-table-column
  535. label="库存天数"
  536. align="center"
  537. prop="fInventoryDays"
  538. />
  539. <el-table-column label="备注" align="center" prop="fRemarks" />
  540. <el-table-column
  541. label="操作"
  542. align="center"
  543. class-name="small-padding fixed-width"
  544. >
  545. <template slot-scope="scope">
  546. <el-button
  547. size="mini"
  548. type="text"
  549. icon="el-icon-delete"
  550. :disabled="notChange"
  551. @click.native.prevent="deleteRow(scope.$index, DzfeeList)"
  552. >删除
  553. </el-button>
  554. </template>
  555. </el-table-column>
  556. </el-table>
  557. <div slot="footer" class="dialog-footer">
  558. <add-or-update
  559. v-if="addOrUpdateVisible"
  560. ref="addOrUpdate"
  561. @refreshDataList="getDataList"
  562. ></add-or-update>
  563. <approval-comments
  564. v-if="addOrUpdateVisib"
  565. ref="ApprovalComments"
  566. @refreshDataList="returnData"
  567. ></approval-comments>
  568. <el-button v-if="approve === true" @click="goApproval">审批</el-button>
  569. <el-button
  570. type="primary"
  571. v-if="queryParams.fBillstatus >= '3'"
  572. @click="addOrUpdateHandle()"
  573. >查看审批流</el-button
  574. >
  575. <el-button
  576. type="primary"
  577. @click="submitForm(typevalue)"
  578. :disabled="notChange"
  579. >保 存</el-button
  580. >
  581. <el-button v-if="cancelButton === true" @click="cancel"
  582. >取 消</el-button
  583. >
  584. <el-button v-if="cancelButton === false" @click="homePage"
  585. >取消</el-button
  586. >
  587. </div>
  588. <!-- 添加或修改财务数据主对话框 -->
  589. <el-dialog
  590. v-dialogDrag
  591. :fullscreen="dialogFull"
  592. :close-on-click-modal="false"
  593. width="70%"
  594. :title="title"
  595. :visible.sync="innerVisible"
  596. append-to-body
  597. >
  598. <template slot="title">
  599. <div class="avue-crud__dialog__header">
  600. <span class="el-dialog__title">
  601. <span
  602. style="
  603. display: inline-block;
  604. width: 3px;
  605. height: 20px;
  606. margin-right: 5px;
  607. float: left;
  608. margin-top: 2px;
  609. "
  610. ></span>
  611. </span>
  612. <div class="avue-crud__dialog__menu enlarge" @click="full">
  613. <i
  614. style="
  615. cursor: pointer;
  616. display: block;
  617. width: 12px;
  618. height: 12px;
  619. border: 1px solid #909399;
  620. border-top: 3px solid #909399;
  621. margin-top: -3px;
  622. "
  623. ></i>
  624. </div>
  625. </div>
  626. </template>
  627. <el-form
  628. :model="TWareHouseFees"
  629. ref="feeListRules"
  630. :rules="feeListRules"
  631. label-width="80px"
  632. :inline="true"
  633. >
  634. <el-form-item label="货权方" prop="fCorpid">
  635. <el-select
  636. v-model="TWareHouseFees.fCorpid"
  637. filterable
  638. remote
  639. clearable
  640. size="small"
  641. style="width: 200px"
  642. @keyup.enter.native="handleQuery"
  643. :remote-method="corpsRemoteMethod"
  644. placeholder="请输入客户名称"
  645. >
  646. <el-option
  647. v-for="(dict, index) in fMblnoOptions"
  648. :key="index.fId"
  649. :label="dict.fName"
  650. :value="dict.fId"
  651. ></el-option>
  652. </el-select>
  653. </el-form-item>
  654. <el-form-item label="结算单位" prop="fToCorpid">
  655. <el-select
  656. v-model="TWareHouseFees.fToCorpid"
  657. placeholder="请选择结算单位"
  658. :disabled="doNot"
  659. filterable
  660. remote
  661. clearable
  662. style="width: 200px"
  663. size="small"
  664. @keyup.enter.native="handleQuery"
  665. :remote-method="corpsRemoteMethod"
  666. >
  667. <el-option
  668. v-for="(dict, index) in fMblnoOptions"
  669. :key="index.fId"
  670. :label="dict.fName"
  671. :value="dict.fId"
  672. ></el-option>
  673. </el-select>
  674. </el-form-item>
  675. <el-form-item label="提单号" prop="fMblno">
  676. <el-input
  677. clearable
  678. v-model="TWareHouseFees.fMblno"
  679. placeholder="请输入提单号"
  680. style="width: 200px"
  681. size="small"
  682. />
  683. </el-form-item>
  684. <el-form-item label="收付" prop="fDc">
  685. <el-col :span="8">
  686. <el-select
  687. v-model="TWareHouseFees.fDc"
  688. size="small"
  689. style="width: 200px"
  690. >
  691. <el-option label="收" value="D" />
  692. <el-option label="付" value="C" />
  693. </el-select>
  694. </el-col>
  695. </el-form-item>
  696. <el-form-item label="是否对账" prop="fReconciliation">
  697. <el-col :span="8">
  698. <el-select
  699. v-model="TWareHouseFees.fReconciliation"
  700. size="small"
  701. style="width: 200px"
  702. >
  703. <el-option label="是" value="1" />
  704. <el-option label="否" value="0" />
  705. </el-select>
  706. </el-col>
  707. </el-form-item>
  708. <el-form-item label="费用名称" prop="fFeeid">
  709. <template>
  710. <el-select
  711. v-model="TWareHouseFees.fFeeid"
  712. filterable
  713. :disabled="browseStatus"
  714. remote
  715. size="small"
  716. style="width: 200px"
  717. :remote-method="fWRemoteMethod"
  718. placeholder="费用名称"
  719. multiple
  720. >
  721. <el-option
  722. v-for="item in fWbuOptions"
  723. :key="item.fId"
  724. :label="item.fName"
  725. :value="item.fId"
  726. >
  727. </el-option>
  728. </el-select>
  729. </template>
  730. </el-form-item>
  731. <el-form-item label="仓储业务" prop="fFeeid" v-if="typevalue == 1">
  732. <el-select
  733. v-model="TWareHouseFees.fBilltype"
  734. size="small"
  735. style="width: 200px"
  736. @change="changefBilltype"
  737. placeholder="请选择仓储业务"
  738. >
  739. <el-option label="入库" value="SJRK"></el-option>
  740. <el-option label="出库" value="SJCK"></el-option>
  741. <el-option label="货权转移" value="HQZY"></el-option>
  742. </el-select>
  743. </el-form-item>
  744. <el-form-item label="作业类型" prop="fBusinessType">
  745. <el-select
  746. v-model="TWareHouseFees.fBusinessType"
  747. filterable
  748. :disabled="browseStatus"
  749. remote
  750. size="small"
  751. style="width: 200px"
  752. placeholder="作业类型"
  753. multiple
  754. >
  755. <el-option
  756. v-for="dict in businessTypeOption"
  757. :key="dict.dictValue"
  758. :label="dict.dictLabel"
  759. :value="dict.dictValue"
  760. >
  761. </el-option>
  762. </el-select>
  763. </el-form-item>
  764. <el-form-item
  765. label="审核日期"
  766. prop="timeExamine"
  767. v-if="typevalue == 1"
  768. >
  769. <el-date-picker
  770. style="width: 240px"
  771. size="small"
  772. v-model="TWareHouseFees.timeExamine"
  773. type="daterange"
  774. start-placeholder="开始日期"
  775. end-placeholder="结束日期"
  776. value-format="yyyy-MM-dd"
  777. :default-time="['00:00:00', '23:59:59']"
  778. >
  779. </el-date-picker>
  780. </el-form-item>
  781. <el-form-item
  782. label="对账日期"
  783. label-width="85px"
  784. prop="timeReconci"
  785. v-if="TWareHouseFees.fReconciliation == '1'"
  786. >
  787. <el-date-picker
  788. v-model="TWareHouseFees.timeReconci"
  789. size="small"
  790. style="width: 240px"
  791. value-format="yyyy-MM-dd"
  792. type="daterange"
  793. start-placeholder="开始日期"
  794. end-placeholder="结束日期"
  795. :default-time="['00:00:00', '23:59:59']"
  796. ></el-date-picker>
  797. </el-form-item>
  798. <el-form-item>
  799. <!-- <el-button class="btnColor" type="info" size="mini">导入</el-button> -->
  800. <el-button type="cyan" size="mini" @click="searchFee(typevalue)"
  801. >搜索</el-button
  802. >
  803. <el-button type="info" size="mini" @click="resetQuery_s"
  804. >重置</el-button
  805. >
  806. </el-form-item>
  807. <el-table
  808. v-loading="loading"
  809. :data="feeList"
  810. ref="feeList"
  811. show-summary
  812. :summary-method="getSum"
  813. @selection-change="handleSelectionChange_s"
  814. >
  815. <el-table-column type="selection" width="55" align="center" />
  816. <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
  817. <el-table-column label="行号" align="center" type="index" />
  818. <el-table-column
  819. label="货权方"
  820. align="center"
  821. prop="fName"
  822. show-overflow-tooltip
  823. />
  824. <el-table-column
  825. label="结算单位"
  826. align="center"
  827. prop="fFeesName"
  828. show-overflow-tooltip
  829. />
  830. <!-- <el-table-column label="账单日期" align="center" prop="fAccbilldate"/> -->
  831. <el-table-column label="提单号" align="center" prop="fMblno" />
  832. <el-table-column label="品名" align="center" prop="fProductName" />
  833. <el-table-column label="业务日期" align="center">
  834. <template slot-scope="scope" v-if="scope.row.fBsdate">
  835. <span>{{ scope.row.fBsdate.slice(0, 10) }}</span>
  836. </template>
  837. </el-table-column>
  838. <el-table-column label="业务类型" align="center" prop="fBilltype">
  839. <template slot-scope="scope">
  840. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  841. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  842. <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>
  843. <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>
  844. <span v-else-if="scope.row.fBilltype == 'JSCCF'">仓储费</span>
  845. <span v-else-if="scope.row.fBilltype == '1000'">计划下达</span>
  846. <span v-else-if="scope.row.fBilltype == '1010'">业务调度</span>
  847. <span v-else-if="scope.row.fBilltype == '1020'">车队派车</span>
  848. <span v-else-if="scope.row.fBilltype == '1030'">司机接单</span>
  849. <span v-else-if="scope.row.fBilltype == '1080'">司机出车</span>
  850. <span v-else-if="scope.row.fBilltype == '1040'">司机提箱</span>
  851. <span v-else-if="scope.row.fBilltype == '1050'"
  852. >司机装卸柜</span
  853. >
  854. <span v-else-if="scope.row.fBilltype == '1060'"
  855. >司机还卸柜</span
  856. >
  857. <span v-else-if="scope.row.fBilltype == '1070'">司机回单</span>
  858. <span v-else-if="scope.row.fBilltype == '1090'">费用补充</span>
  859. </template>
  860. </el-table-column>
  861. <el-table-column
  862. label="作业类型"
  863. align="center"
  864. prop="fBusinessType"
  865. />
  866. <!-- <el-table-column label="单据类型" align="center" prop="fBilltype" />-->
  867. <el-table-column
  868. label="审核日期"
  869. align="center"
  870. prop="fReviewDate"
  871. />
  872. <el-table-column label="金额" align="center" prop="fAmtdr" />
  873. <el-table-column
  874. label="本次金额"
  875. align="center"
  876. prop="fAmt"
  877. width="100"
  878. >
  879. <template slot-scope="scope">
  880. <el-input
  881. v-model="scope.row.fAmt"
  882. placeholder="请输入本次金额"
  883. clearable
  884. size="small"
  885. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  886. @change="imgChangeI(scope.row)"
  887. />
  888. </template>
  889. </el-table-column>
  890. <el-table-column label="费用名称" align="center" prop="fFeeName" />
  891. <el-table-column label="备注" align="center" prop="fRemarks">
  892. <template slot-scope="scope">
  893. <el-input
  894. v-model="scope.row.fRemarks"
  895. placeholder="请输入备注"
  896. clearable
  897. size="small"
  898. width="100"
  899. />
  900. </template>
  901. </el-table-column>
  902. </el-table>
  903. </el-form>
  904. <div slot="footer" class="dialog-footer">
  905. <el-button type="primary" @click="confirmImport">确 定</el-button>
  906. <el-button @click="signOut">取 消</el-button>
  907. </div>
  908. </el-dialog>
  909. </el-dialog>
  910. <!-- 打印页面 -->
  911. <!-- <el-dialog-->
  912. <!-- :visible.sync="openPrint"-->
  913. <!-- width="80%"-->
  914. <!-- append-to-body-->
  915. <!-- :close-on-click-modal="false"-->
  916. <!-- title="对账单"-->
  917. <!-- >-->
  918. <!-- <el-table-->
  919. <!-- ref="table"-->
  920. <!-- id="print_area2"-->
  921. <!-- v-loading="loading"-->
  922. <!-- :data="printObject"-->
  923. <!-- @selection-change="handleSelectionChange_s">-->
  924. <!-- <el-table-column label="行号" align="center" type="index" width="70"/>-->
  925. <!-- <el-table-column label="提单号" align="center" prop="fMblno" />-->
  926. <!-- <el-table-column label="业务日期" align="center" prop="fBsdate">-->
  927. <!-- <template slot-scope="scope">-->
  928. <!-- <span>{{scope.row.fBsdate.slice(0,10)}}</span>-->
  929. <!-- </template>-->
  930. <!-- </el-table-column>-->
  931. <!-- <el-table-column label="费用名称" align="center" prop="fFeeName" />-->
  932. <!-- <el-table-column label="收/付" align="center" prop="fSrcdc">-->
  933. <!-- <template slot-scope="scope">-->
  934. <!-- <span v-if="scope.row.fSrcdc == 'D'">收</span>-->
  935. <!-- <span v-else-if="scope.row.fSrcdc == 'C'">付</span>-->
  936. <!-- </template>-->
  937. <!-- </el-table-column>-->
  938. <!-- <el-table-column label="金额" align="center" prop="fAmtdr" />-->
  939. <!-- <el-table-column label="本次金额" align="center" prop="fAmt"/>-->
  940. <!-- <el-table-column label="业务类型" align="center" prop="fBilltype">-->
  941. <!-- <template slot-scope="scope">-->
  942. <!-- <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>-->
  943. <!-- <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>-->
  944. <!-- <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>-->
  945. <!-- <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>-->
  946. <!-- <span v-else>{{scope.row.fBilltype}}</span>-->
  947. <!-- </template>-->
  948. <!-- </el-table-column>-->
  949. <!-- </el-table>-->
  950. <!-- <span slot="footer" class="dialog-footer">-->
  951. <!-- <el-button type="primary" style="marginTop:10px" @click="printSomething">打印</el-button>-->
  952. <!-- <el-button @click="openPrint = false">取消</el-button>-->
  953. <!-- </span>-->
  954. <!-- </el-dialog>-->
  955. </div>
  956. </template>
  957. <script>
  958. import {
  959. RevocationApproval,
  960. backFee,
  961. detailFee,
  962. Cfee,
  963. listFee,
  964. getFee,
  965. delFee,
  966. addFee,
  967. updateFee,
  968. exportFee,
  969. importFee,
  970. exportWarehousebillsitems,
  971. importFleet,
  972. addFleet,
  973. listFleet,
  974. getFleet,
  975. delFleet,
  976. detailFleet,
  977. confirmFleet,
  978. } from "@/api/finance/contrast";
  979. import { listCorps } from "@/api/basicdata/corps";
  980. import { listFees } from "@/api/basicdata/fees";
  981. import AddOrUpdate from "@/views/viewApproval";
  982. import { queryUserVal } from "@/api/warehouseBusiness/agreement";
  983. import moment from "moment";
  984. import print from "print-js";
  985. import ApprovalComments from "@/views/startApproval";
  986. import Global from "@/layout/components/global";
  987. import Cookies from "js-cookie";
  988. import { addSet, select } from "@/api/system/set";
  989. import draggable from "vuedraggable";
  990. import Vue from "vue";
  991. Vue.directive("dialogDrag", {
  992. bind(el, binding, vnode, oldVnode) {
  993. const dialogHeaderEl = el.querySelector(".el-dialog__header");
  994. const dragDom = el.querySelector(".el-dialog");
  995. const enlarge = el.querySelector(".enlarge");
  996. dialogHeaderEl.style.cursor = "move";
  997. // 获取原有属性 ie dom元素.currentStyle 火狐谷歌 window.getComputedStyle(dom元素, null);
  998. const sty = dragDom.currentStyle || window.getComputedStyle(dragDom, null);
  999. if (enlarge) {
  1000. enlarge.onclick = (e) => {
  1001. dragDom.style.top = "0px";
  1002. dragDom.style.left = "0px";
  1003. };
  1004. }
  1005. dialogHeaderEl.onmousedown = (e) => {
  1006. // 鼠标按下,计算当前元素距离可视区的距离
  1007. const disX = e.clientX - dialogHeaderEl.offsetLeft;
  1008. const disY = e.clientY - dialogHeaderEl.offsetTop;
  1009. // 获取到的值带px 正则匹配替换
  1010. let styL, styT;
  1011. // 注意在ie中 第一次获取到的值为组件自带50% 移动之后赋值为px
  1012. if (sty.left.includes("%")) {
  1013. styL =
  1014. +document.body.clientWidth * (+sty.left.replace(/\%/g, "") / 100);
  1015. styT =
  1016. +document.body.clientHeight * (+sty.top.replace(/\%/g, "") / 100);
  1017. } else {
  1018. styL = +sty.left.replace(/\px/g, "");
  1019. styT = +sty.top.replace(/\px/g, "");
  1020. }
  1021. document.onmousemove = function (e) {
  1022. // 通过事件委托,计算移动的距离
  1023. const l = e.clientX - disX;
  1024. const t = e.clientY - disY;
  1025. // 移动当前元素
  1026. if (t + styT >= 0) {
  1027. dragDom.style.top = `${t + styT}px`;
  1028. }
  1029. dragDom.style.left = `${l + styL}px`;
  1030. // 将此时的位置传出去
  1031. // binding.value({x:e.pageX,y:e.pageY})
  1032. };
  1033. document.onmouseup = function (e) {
  1034. document.onmousemove = null;
  1035. document.onmouseup = null;
  1036. };
  1037. };
  1038. },
  1039. });
  1040. export default {
  1041. name: "Fee",
  1042. data() {
  1043. return {
  1044. //全屏放大
  1045. dialogFull: false,
  1046. drag: false,
  1047. typeoptions: [
  1048. {
  1049. value: "1",
  1050. label: "仓储",
  1051. },
  1052. {
  1053. value: "2",
  1054. label: "车队",
  1055. },
  1056. ],
  1057. typevalue: "",
  1058. setRowList: [
  1059. {
  1060. surface: "1",
  1061. label: "fBillno",
  1062. name: "系统编号",
  1063. checked: 0,
  1064. fixed: "fixed",
  1065. width: null,
  1066. },
  1067. {
  1068. surface: "2",
  1069. label: "fCtrlcorpid",
  1070. name: "货权方",
  1071. checked: 0,
  1072. width: null,
  1073. },
  1074. {
  1075. surface: "3",
  1076. label: "fCorpidName",
  1077. name: "结算单位",
  1078. checked: 0,
  1079. fixed: "fixed",
  1080. width: null,
  1081. },
  1082. {
  1083. surface: "4",
  1084. label: "fAccbilldate",
  1085. name: "账单日期",
  1086. checked: 0,
  1087. width: null,
  1088. },
  1089. {
  1090. surface: "5",
  1091. label: "tMblno",
  1092. name: "提单号",
  1093. checked: 0,
  1094. width: null,
  1095. },
  1096. {
  1097. surface: "6",
  1098. label: "fAmtdr",
  1099. name: "金额",
  1100. checked: 0,
  1101. width: null,
  1102. },
  1103. {
  1104. surface: "7",
  1105. label: "fAmtcr",
  1106. name: "对账金额",
  1107. checked: 0,
  1108. width: null,
  1109. },
  1110. {
  1111. surface: "8",
  1112. label: "fRemarks",
  1113. name: "备注",
  1114. checked: 0,
  1115. width: null,
  1116. },
  1117. {
  1118. surface: "9",
  1119. label: "fBillstatus",
  1120. name: "状态",
  1121. checked: 0,
  1122. width: null,
  1123. },
  1124. ],
  1125. getRowList: [
  1126. {
  1127. surface: "1",
  1128. label: "fBillno",
  1129. name: "系统编号",
  1130. checked: 0,
  1131. fixed: "fixed",
  1132. width: null,
  1133. },
  1134. {
  1135. surface: "2",
  1136. label: "fCtrlcorpid",
  1137. name: "货权方",
  1138. checked: 0,
  1139. width: null,
  1140. },
  1141. {
  1142. surface: "3",
  1143. label: "fCorpidName",
  1144. name: "结算单位",
  1145. checked: 0,
  1146. fixed: "fixed",
  1147. width: null,
  1148. },
  1149. {
  1150. surface: "4",
  1151. label: "fAccbilldate",
  1152. name: "账单日期",
  1153. checked: 0,
  1154. width: null,
  1155. },
  1156. {
  1157. surface: "5",
  1158. label: "tMblno",
  1159. name: "提单号",
  1160. checked: 0,
  1161. width: null,
  1162. },
  1163. {
  1164. surface: "6",
  1165. label: "fAmtdr",
  1166. name: "金额",
  1167. checked: 0,
  1168. width: null,
  1169. },
  1170. {
  1171. surface: "7",
  1172. label: "fAmtcr",
  1173. name: "对账金额",
  1174. checked: 0,
  1175. width: null,
  1176. },
  1177. {
  1178. surface: "8",
  1179. label: "fRemarks",
  1180. name: "备注",
  1181. checked: 0,
  1182. width: null,
  1183. },
  1184. {
  1185. surface: "9",
  1186. label: "fBillstatus",
  1187. name: "状态",
  1188. checked: 0,
  1189. width: null,
  1190. },
  1191. ],
  1192. allCheck: false,
  1193. showSetting: false,
  1194. //控制结算单位是否可操作
  1195. doNot: false,
  1196. jFeetunitOptions: [],
  1197. // 总条数
  1198. total: 0,
  1199. totAL: 0,
  1200. Ttime: 0,
  1201. colseButton: true,
  1202. approval: [],
  1203. disappear: false,
  1204. addIndex: [],
  1205. addOrUpdateVisible: false,
  1206. addOrUpdateVisib: false,
  1207. contrastId: 210,
  1208. // 审批状态
  1209. approve: false,
  1210. // 打印表
  1211. printObject: [],
  1212. //登陆人
  1213. Lander: "",
  1214. openPrint: false,
  1215. statrGo: true,
  1216. state_s: true,
  1217. notChange: false,
  1218. browseStatus: false,
  1219. options: "",
  1220. dateRange: "",
  1221. // 遮罩层
  1222. loading: true,
  1223. fAccbilldate: "",
  1224. // 选中数组
  1225. ids: [],
  1226. // 非单个禁用
  1227. single: true,
  1228. // 非多个禁用
  1229. multiple: true,
  1230. // 显示搜索条件
  1231. showSearch: true,
  1232. // 财务数据主表格数据
  1233. feeList: [],
  1234. // 客户(客户数据)
  1235. fMblnoOptions: [],
  1236. fFeeunitidOptions: [],
  1237. fWbuOptions: [],
  1238. KHblnoOptions: [],
  1239. //打开内部弹窗
  1240. innerVisible: false,
  1241. selection: "",
  1242. // 弹出层标题
  1243. title: "",
  1244. // 操作人
  1245. Operator: "",
  1246. // 是否显示弹出层
  1247. open: false,
  1248. dialogVisible: false,
  1249. // 财务对账表格
  1250. DzfeeList: [],
  1251. // 财务主页面表格
  1252. contrastList: [],
  1253. empty: [],
  1254. nothing: [],
  1255. Fee: [],
  1256. //导入从表传主表
  1257. pass: {
  1258. fAmtdr: "", //应收合计
  1259. fAmtcr: "", //应付合计
  1260. fMblno: "", //提单号
  1261. fName: "", //货权方
  1262. fFeesName: "", //结算单位
  1263. fCorpid: "", //结算单位ID
  1264. },
  1265. hide: false,
  1266. cancelButton: true,
  1267. businessTypeOption: [],
  1268. // 传值对象
  1269. TWareHouseFees: {
  1270. fCorpid: "",
  1271. fToCorpid: "",
  1272. fMblno: "",
  1273. fStatementNo: "",
  1274. fFeeid: "",
  1275. timeExamine: "",
  1276. timeInterval: "",
  1277. fDc: "D",
  1278. fReconciliation: "0",
  1279. timeReconci: "",
  1280. fBusinessType: "",
  1281. fBilltype: "SJRK",
  1282. },
  1283. // 查询参数
  1284. queryParams: {
  1285. pageNum: 1,
  1286. pageSize: 10,
  1287. fBillno: null,
  1288. fCtrlcorpid: null,
  1289. fCorpid: null,
  1290. tMblno: null,
  1291. fAmtdr: null,
  1292. fAmtcr: null,
  1293. fId: null,
  1294. fBilltype: null,
  1295. fBillstatus: null,
  1296. fRemarks: null,
  1297. fAccbilldate: null,
  1298. fDeptid: null,
  1299. createBy: null,
  1300. timeReconci: null,
  1301. },
  1302. // 主表查询参数
  1303. tablefilter: {
  1304. pageNum: 1,
  1305. pageSize: 10,
  1306. fBillno: null,
  1307. fCtrlcorpid: null,
  1308. fId: null,
  1309. fCorpid: null,
  1310. tMblno: null,
  1311. fAmtdr: null,
  1312. fAmtcr: null,
  1313. fBilltype: null,
  1314. fBillstatus: null,
  1315. fRemarks: null,
  1316. fAccbilldate: null,
  1317. fDeptid: null,
  1318. },
  1319. // 表单参数
  1320. form: {},
  1321. // 表单校验
  1322. ruless: {
  1323. fCtrlcorpid: [{ required: true, message: " ", trigger: "blur" }],
  1324. fCorpid: [{ required: true, message: " ", trigger: "blur" }],
  1325. fAccbilldate: [{ required: true, message: " ", trigger: "blur" }],
  1326. },
  1327. feeListRules: {
  1328. fDc: [{ required: true, message: " ", trigger: "blur" }],
  1329. fToCorpid: [{ required: true, message: " ", trigger: "blur" }],
  1330. fReconciliation: [{ required: true, message: " ", trigger: "blur" }],
  1331. timeExamine: [{ required: true, message: " ", trigger: "blur" }],
  1332. },
  1333. };
  1334. },
  1335. components: {
  1336. draggable,
  1337. AddOrUpdate,
  1338. ApprovalComments,
  1339. },
  1340. created() {
  1341. this.typevalue = Cookies.get("sysType");
  1342. this.getList();
  1343. this.register();
  1344. this.getDicts("data_unitfees").then((response) => {
  1345. this.jFeetunitOptions = response.data;
  1346. });
  1347. this.getDicts("st_in_type").then((response) => {
  1348. this.businessTypeOption = response.data;
  1349. });
  1350. this.getRow();
  1351. },
  1352. activated() {
  1353. this.Jump();
  1354. },
  1355. methods: {
  1356. full() {
  1357. this.dialogFull = !this.dialogFull;
  1358. },
  1359. //列设置全选
  1360. allChecked() {
  1361. if (this.allCheck == true) {
  1362. this.setRowList.map((e) => {
  1363. return (e.checked = 0);
  1364. });
  1365. } else {
  1366. this.setRowList.map((e) => {
  1367. return (e.checked = 1);
  1368. });
  1369. }
  1370. },
  1371. //查询列数据
  1372. getRow() {
  1373. let that = this;
  1374. this.data = {
  1375. tableName: "对账",
  1376. userId: Cookies.get("userName"),
  1377. };
  1378. select(this.data).then((res) => {
  1379. if (res.data.length != 0) {
  1380. this.getRowList = res.data.filter((e) => e.checked == 0);
  1381. this.setRowList = res.data;
  1382. this.setRowList = this.setRowList.reduce((res, item) => {
  1383. res.push({
  1384. surface: item.surface,
  1385. label: item.label,
  1386. name: item.name,
  1387. checked: item.checked,
  1388. width: item.width,
  1389. fixed: item.fixed,
  1390. });
  1391. return res;
  1392. }, []);
  1393. }
  1394. });
  1395. },
  1396. //保存列设置
  1397. save() {
  1398. this.showSetting = false;
  1399. this.data = {
  1400. tableName: "对账",
  1401. userId: Cookies.get("userName"),
  1402. sysTableSetList: this.setRowList,
  1403. };
  1404. addSet(this.data).then((res) => {
  1405. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  1406. });
  1407. },
  1408. //开始拖拽事件
  1409. onStart() {
  1410. this.drag = true;
  1411. },
  1412. //拖拽结束事件
  1413. onEnd() {
  1414. this.drag = false;
  1415. },
  1416. //对账页面合计
  1417. listTotal(param) {
  1418. const { columns, data } = param;
  1419. const sums = [];
  1420. columns.forEach((column, index) => {
  1421. if (index === 0) {
  1422. sums[index] = "合计";
  1423. } else if (index === 7 || index === 8) {
  1424. const values = data.map((item) => Number(item[column.property]));
  1425. if (!values.every((value) => isNaN(value))) {
  1426. sums[index] = values.reduce((prev, curr) => {
  1427. const value = Number(curr);
  1428. if (!isNaN(value)) {
  1429. return prev + curr;
  1430. } else {
  1431. return prev;
  1432. }
  1433. }, 0);
  1434. }
  1435. }
  1436. });
  1437. return sums;
  1438. },
  1439. //财务主取消
  1440. signOut() {
  1441. if (this.DzfeeList.length == 0) {
  1442. this.doNot = false;
  1443. } else {
  1444. this.doNot = true;
  1445. }
  1446. this.innerVisible = false;
  1447. this.feeList = [];
  1448. },
  1449. // 审批跳转
  1450. Jump() {
  1451. this.approval = this.$route.query.data;
  1452. if (this.approval) {
  1453. this.colseButton = false;
  1454. this.approval = JSON.parse(this.approval);
  1455. this.hide = false;
  1456. this.doNot = true;
  1457. this.notChange = true;
  1458. this.approve = true;
  1459. this.disappear = true;
  1460. this.cancelButton = false;
  1461. this.reset();
  1462. this.pass = {
  1463. fAmtdr: "", //应收合计
  1464. fAmtcr: "", //应付合计
  1465. fMblno: "", //提单号
  1466. fName: "", //货权方
  1467. fFeesName: "", //结算单位
  1468. fCorpid: "", //结算单位ID
  1469. };
  1470. getFee(this.approval.billId).then((response) => {
  1471. this.Operator = response.data.tFee.createBy;
  1472. this.DzfeeList = response.data.feeDoList;
  1473. this.fWbuOptions = response.data.feesList;
  1474. this.queryParams = response.data.tFee;
  1475. this.fWbuOptions = response.data.feesList;
  1476. this.fMblnoOptions = response.data.corps;
  1477. this.open = true;
  1478. this.title = "修改财务数据主";
  1479. });
  1480. }
  1481. },
  1482. homepaGe() {
  1483. let view = {
  1484. fullPath: "/finance/contrast",
  1485. hash: "",
  1486. matched: Array(2),
  1487. meta: Object,
  1488. name: "Contrast",
  1489. params: Object,
  1490. path: "/finance/contrast",
  1491. query: Object,
  1492. title: "对账",
  1493. };
  1494. this.$router.push({ path: "/index" });
  1495. this.$store
  1496. .dispatch("tagsView/delView", view)
  1497. .then(({ visitedViews }) => {
  1498. if (this.isActive(view)) {
  1499. this.toLastView(visitedViews, view);
  1500. }
  1501. });
  1502. Global.$emit("removeCache", "closeSelectedTag", view);
  1503. },
  1504. homePage() {
  1505. this.open = false;
  1506. let view = {
  1507. fullPath: "/finance/contrast",
  1508. hash: "",
  1509. matched: Array(2),
  1510. meta: Object,
  1511. name: "Contrast",
  1512. params: Object,
  1513. path: "/finance/contrast",
  1514. query: Object,
  1515. title: "对账",
  1516. };
  1517. this.$router.push({ path: "/index" });
  1518. this.$store
  1519. .dispatch("tagsView/delView", view)
  1520. .then(({ visitedViews }) => {
  1521. if (this.isActive(view)) {
  1522. this.toLastView(visitedViews, view);
  1523. }
  1524. });
  1525. Global.$emit("removeCache", "closeSelectedTag", view);
  1526. },
  1527. // 撤销审批
  1528. backApproval() {
  1529. let data = {
  1530. id: this.queryParams.fId,
  1531. actId: this.contrastId,
  1532. billId: this.queryParams.fId,
  1533. };
  1534. RevocationApproval(data).then((response) => {
  1535. this.msgSuccess("撤销审批成功");
  1536. this.disappear = true;
  1537. this.open = false;
  1538. this.getList();
  1539. });
  1540. },
  1541. returnData() {
  1542. this.addOrUpdateVisib = false;
  1543. this.open = false;
  1544. this.homepaGe();
  1545. },
  1546. getDataList() {
  1547. this.addOrUpdateVisible = false;
  1548. },
  1549. // 审批按钮
  1550. goApproval() {
  1551. this.addOrUpdateVisib = true;
  1552. this.$nextTick(() => {
  1553. this.$refs.ApprovalComments.init(this.queryParams.fId, this.contrastId);
  1554. });
  1555. },
  1556. // 查看审批流
  1557. addOrUpdateHandle() {
  1558. this.addOrUpdateVisible = true;
  1559. this.addOrUpdateVisib = false;
  1560. let id = "448";
  1561. let actId = "110";
  1562. this.$nextTick(() => {
  1563. this.$refs.addOrUpdate.init(this.queryParams.fId, this.contrastId);
  1564. });
  1565. },
  1566. // 撤销对账
  1567. backrRconciliation() {
  1568. this.queryParams.fBillstatus = "1";
  1569. let formDate = new window.FormData();
  1570. formDate.append("tFee", JSON.stringify(this.queryParams));
  1571. formDate.append("tFeeDo", JSON.stringify(this.DzfeeList));
  1572. backFee(formDate).then((response) => {
  1573. this.msgSuccess("撤回成功");
  1574. this.open = false;
  1575. this.reset();
  1576. this.getList();
  1577. });
  1578. },
  1579. // 打印功能
  1580. printing() {
  1581. if (this.DzfeeList.length !== 0) {
  1582. this.openPrint = true;
  1583. this.printObject = this.DzfeeList;
  1584. } else {
  1585. this.$message.error("无数据,请检查是否有数据");
  1586. }
  1587. },
  1588. // 确认打印
  1589. printSomething() {
  1590. // 此处的style即为打印时的样式
  1591. const style =
  1592. "table tr td,th { border-collapse: collapse;padding:15px;border:.5px #000 solid;text-align:center;}";
  1593. // "@media print {} }";
  1594. print({
  1595. printable: "print_area2",
  1596. type: "html",
  1597. header: "对账表",
  1598. headerStyle: "text-align:center;color:#000;width:100%;",
  1599. style: style, // 亦可使用引入的外部css;
  1600. scanStyles: false,
  1601. });
  1602. },
  1603. // 确认对账按钮功能
  1604. confirmReconciliation() {
  1605. this.$refs["ruless"].validate((valid) => {
  1606. if (valid) {
  1607. if (this.DzfeeList.length) {
  1608. // this.queryParams.fBillstatus = '4'
  1609. let formDate = new window.FormData();
  1610. formDate.append("tFee", JSON.stringify(this.queryParams));
  1611. formDate.append("tFeeDo", JSON.stringify(this.DzfeeList));
  1612. if (Cookies.get("sysType") == 1) {
  1613. Cfee(formDate).then((response) => {
  1614. this.open = false;
  1615. this.msgSuccess("操作成功");
  1616. this.getList();
  1617. });
  1618. } else if (Cookies.get("sysType") == 2) {
  1619. confirmFleet(formDate).then((response) => {
  1620. this.open = false;
  1621. this.msgSuccess("操作成功");
  1622. this.getList();
  1623. });
  1624. }
  1625. } else {
  1626. this.$message.error("表单为空不允许操作");
  1627. }
  1628. }
  1629. });
  1630. },
  1631. //导出
  1632. handleExportItems() {
  1633. const fIds = this.queryParams.fId;
  1634. if (fIds !== null) {
  1635. this.$confirm("是否确认导出所有计费物资明细数据?", "警告", {
  1636. confirmButtonText: "确定",
  1637. cancelButtonText: "取消",
  1638. type: "warning",
  1639. })
  1640. .then(function () {
  1641. return exportWarehousebillsitems(fIds);
  1642. })
  1643. .then((response) => {
  1644. this.download(response.msg);
  1645. });
  1646. } else {
  1647. this.$message("请先保存");
  1648. }
  1649. },
  1650. // 对账按钮功能
  1651. reconciliation() {
  1652. if (!this.queryParams.fSystemType) {
  1653. return this.$message("请先选择业务类型");
  1654. }
  1655. this.queryParameter = {
  1656. fToCorpid: this.queryParams.fCorpid,
  1657. };
  1658. this.innerVisible = true;
  1659. this.feeList = [];
  1660. this.TWareHouseFees = {
  1661. fCorpid: "",
  1662. fToCorpid: this.queryParams.fCorpid,
  1663. fMblno: "",
  1664. fStatementNo: "",
  1665. fFeeid: "",
  1666. timeExamine: "",
  1667. timeInterval: "",
  1668. fSrcdc: "",
  1669. fReconciliation: "0",
  1670. timeReconci: "",
  1671. fDc: "D",
  1672. fBilltype: "",
  1673. };
  1674. if (this.queryParams.fCorpid) {
  1675. this.doNot = true;
  1676. }
  1677. },
  1678. // 默认录入人
  1679. register() {
  1680. queryUserVal().then((response) => {
  1681. this.Lander = response.user.userName;
  1682. });
  1683. },
  1684. // 合计
  1685. getSum(param) {
  1686. const { columns, data } = param;
  1687. const sums = [];
  1688. columns.forEach((column, index) => {
  1689. sums[0] = "合计";
  1690. sums[10] = this.totAL.toFixed(2);
  1691. sums[9] = this.Ttime.toFixed(2);
  1692. });
  1693. return sums;
  1694. },
  1695. // 导入多选框
  1696. handleSelectionChange_s(selection) {
  1697. this.totAL = 0;
  1698. this.Ttime = 0;
  1699. this.selection = selection;
  1700. if (this.selection.length == 0) {
  1701. for (let item in this.feeList) {
  1702. this.totAL += Number(this.feeList[item].fAmt);
  1703. this.Ttime += Number(this.feeList[item].fAmtdr);
  1704. }
  1705. } else {
  1706. for (let index in selection) {
  1707. this.totAL += Number(selection[index].fAmt);
  1708. this.Ttime += Number(selection[index].fAmtdr);
  1709. }
  1710. }
  1711. },
  1712. // 多选框选中数据
  1713. handleSelectionChange(selection) {
  1714. this.totAL = 0;
  1715. this.ids = selection.map((item) => item.fId);
  1716. this.single =
  1717. selection.length !== 1 ||
  1718. selection.map((item) => item.fBillstatus) == 4 ||
  1719. selection.map((item) => item.fBillstatus) == 6;
  1720. this.multiple = !selection.length;
  1721. },
  1722. // 金额筛选
  1723. imgChangeI(row) {
  1724. if (row.fAmt && Number(row.fAmt) > Number(row.fAmtdr)) {
  1725. this.$set(row, "fAmt", row.fAmtdr);
  1726. this.state_s = true;
  1727. }
  1728. if (this.selection.length !== 0) {
  1729. this.totAL = 0;
  1730. this.Ttime = 0;
  1731. for (let item in this.selection) {
  1732. this.totAL += Number(this.selection[item].fAmt);
  1733. this.Ttime += Number(this.selection[item].fAmtdr);
  1734. }
  1735. } else {
  1736. this.totAL = 0;
  1737. this.Ttime = 0;
  1738. for (let item in this.feeList) {
  1739. this.totAL += Number(this.feeList[item].fAmt);
  1740. this.Ttime += Number(this.feeList[item].fAmtdr);
  1741. }
  1742. }
  1743. },
  1744. /* 添加财务数据主 导入*/
  1745. confirmImport() {
  1746. this.doNot = true;
  1747. this.hide = true;
  1748. this.pass.fAmtdr = 0;
  1749. this.pass.fAmtcr = 0;
  1750. for (let item in this.selection) {
  1751. this.pass.fAmtcr = Number(this.pass.fAmtcr);
  1752. this.pass.fAmtdr = Number(this.pass.fAmtdr);
  1753. this.pass.fAmtcr += Number(this.selection[item].fAmt);
  1754. this.pass.fAmtdr += Number(this.selection[item].fAmtdr.toFixed(2));
  1755. }
  1756. this.pass.fAmtcr.toFixed(2);
  1757. if (this.state_s == true) {
  1758. if (this.selection.length == "0") {
  1759. this.$message.error("未选择导入行");
  1760. } else {
  1761. for (let item in this.selection) {
  1762. this.empty.push(this.selection[item].fMblno);
  1763. this.nothing.push(this.selection[item].fName);
  1764. if (this.DzfeeList.length === 0) {
  1765. this.DzfeeList = this.DzfeeList.concat(this.selection);
  1766. //去重提单号
  1767. this.empty = new Set(this.empty);
  1768. this.empty = Array.from(this.empty);
  1769. //去重货权方
  1770. this.nothing = new Set(this.nothing);
  1771. this.nothing = Array.from(this.nothing);
  1772. if (this.empty.length <= 1) {
  1773. this.pass.fMblno = this.empty[0];
  1774. } else {
  1775. this.pass.fMblno = this.empty[0] + "...";
  1776. }
  1777. if (this.nothing.length <= 1) {
  1778. this.pass.fName = this.nothing[0];
  1779. } else {
  1780. this.pass.fName = this.nothing[0] + "...";
  1781. }
  1782. // this.DzfeeList = this.DzfeeList.concat(this.Fee)
  1783. this.queryParams.tMblno = this.pass.fMblno; //提单号
  1784. this.queryParams.fCorpid = this.TWareHouseFees.fToCorpid;
  1785. this.queryParams.fCtrlcorpid = this.pass.fName;
  1786. this.queryParams.fAmtcr = this.pass.fAmtcr;
  1787. this.queryParams.fAmtdr = this.pass.fAmtdr;
  1788. this.innerVisible = false;
  1789. this.feeList = [];
  1790. // this.feeList = this.DzfeeList
  1791. this.TWareHouseFees = {
  1792. fCorpid: "",
  1793. fToCorpid: "",
  1794. fMblno: "",
  1795. fStatementNo: "",
  1796. fFeeid: "",
  1797. timeExamine: "",
  1798. timeInterval: "",
  1799. fSrcdc: "",
  1800. fReconciliation: "0",
  1801. timeReconci: "",
  1802. fDc: "D",
  1803. };
  1804. return;
  1805. } else {
  1806. for (let li in this.DzfeeList) {
  1807. if (this.selection[item].fSrcid !== this.DzfeeList[li].fSrcid) {
  1808. this.Fee = this.DzfeeList.concat(this.selection);
  1809. console.log(this.Fee);
  1810. let result = [];
  1811. let obj = {};
  1812. for (let lis in this.Fee) {
  1813. if (!obj[this.Fee[lis].fSrcid]) {
  1814. result.push(this.Fee[lis]);
  1815. obj[this.Fee[lis].fSrcid] = true;
  1816. }
  1817. }
  1818. //去重提单号
  1819. this.empty = new Set(this.empty);
  1820. this.empty = Array.from(this.empty);
  1821. //去重货权方
  1822. this.nothing = new Set(this.nothing);
  1823. this.nothing = Array.from(this.nothing);
  1824. if (this.empty.length <= 1) {
  1825. this.pass.fMblno = this.empty[0];
  1826. } else {
  1827. this.pass.fMblno = this.empty[0] + "...";
  1828. }
  1829. if (this.nothing.length <= 1) {
  1830. this.pass.fName = this.nothing[0];
  1831. } else {
  1832. this.pass.fName = this.nothing[0] + "...";
  1833. }
  1834. // this.DzfeeList = this.DzfeeList.concat(this.Fee)
  1835. this.queryParams.tMblno = this.pass.fMblno; //提单号
  1836. this.queryParams.fCorpid = this.TWareHouseFees.fToCorpid;
  1837. this.queryParams.fCtrlcorpid = this.pass.fName;
  1838. this.queryParams.fAmtcr = this.pass.fAmtcr;
  1839. this.queryParams.fAmtdr = this.pass.fAmtdr;
  1840. this.innerVisible = false;
  1841. this.feeList = [];
  1842. // this.feeList = this.DzfeeList
  1843. this.TWareHouseFees = {
  1844. fCorpid: "",
  1845. fToCorpid: "",
  1846. fMblno: "",
  1847. fStatementNo: "",
  1848. fFeeid: "",
  1849. timeExamine: "",
  1850. timeInterval: "",
  1851. fSrcdc: "",
  1852. fReconciliation: "0",
  1853. timeReconci: "",
  1854. fDc: "D",
  1855. };
  1856. this.DzfeeList = result;
  1857. } else {
  1858. let i = Number(item) + 1;
  1859. this.$message.error("行号为" + i + "重复");
  1860. }
  1861. }
  1862. }
  1863. }
  1864. }
  1865. } else if (this.state_s == false) {
  1866. this.$message.error("本次金额不能大于原定金额");
  1867. }
  1868. },
  1869. // imgChangeI(fAmtdr,fAmt){
  1870. // if (fAmt <= fAmtdr){
  1871. // this.state_s = true
  1872. // }else if(fAmt > fAmtdr){
  1873. // this.$message.error('本次金额不能大于原定金额');
  1874. // this.state_s = false
  1875. // }
  1876. // },
  1877. // 导入搜索
  1878. searchFee(type) {
  1879. this.feeList = [];
  1880. this.$refs["feeListRules"].validate((valid) => {
  1881. if (valid) {
  1882. if (type == 1) {
  1883. importFee(this.TWareHouseFees).then((response) => {
  1884. this.feeList = response.rows;
  1885. if (this.feeList.length !== 0) {
  1886. this.$message.success("查询成功");
  1887. this.totAL = 0;
  1888. this.Ttime = 0;
  1889. for (let item in this.feeList) {
  1890. this.totAL += Number(this.feeList[item].fAmt);
  1891. this.Ttime += Number(this.feeList[item].fAmtdr);
  1892. this.$set(
  1893. this.feeList[item],
  1894. "fBsdate",
  1895. this.feeList[item].fBsdate.substring(0, 10)
  1896. );
  1897. }
  1898. } else {
  1899. this.$message.error("暂无数据");
  1900. }
  1901. });
  1902. } else {
  1903. importFleet(this.TWareHouseFees).then((response) => {
  1904. this.feeList = response.rows;
  1905. if (this.feeList.length !== 0) {
  1906. this.$message.success("查询成功");
  1907. this.totAL = 0;
  1908. this.Ttime = 0;
  1909. for (let item in this.feeList) {
  1910. this.totAL += Number(this.feeList[item].fAmt);
  1911. this.Ttime += Number(this.feeList[item].fAmtdr);
  1912. this.$set(
  1913. this.feeList[item],
  1914. "fBsdate",
  1915. this.feeList[item].fBsdate.substring(0, 10)
  1916. );
  1917. }
  1918. } else {
  1919. this.$message.error("暂无数据");
  1920. }
  1921. });
  1922. }
  1923. }
  1924. });
  1925. },
  1926. /** 打开导入表弹窗 */
  1927. openImportTable() {
  1928. this.$refs.import.show();
  1929. },
  1930. /** 查询财务数据主列表 */
  1931. getList() {
  1932. this.loading = true;
  1933. this.getDicts("approval_process").then((response) => {
  1934. // this.feeList = response.rows;
  1935. this.options = response.data;
  1936. });
  1937. if (Cookies.get("sysType") == 1) {
  1938. listFee(this.tablefilter).then((response) => {
  1939. this.contrastList = response.rows;
  1940. this.total = response.total;
  1941. this.loading = false;
  1942. });
  1943. } else if (Cookies.get("sysType") == 2) {
  1944. listFleet(this.tablefilter).then((response) => {
  1945. this.contrastList = response.rows;
  1946. this.total = response.total;
  1947. this.loading = false;
  1948. });
  1949. }
  1950. },
  1951. // 取消按钮
  1952. cancel() {
  1953. this.open = false;
  1954. // this.feeList = []
  1955. this.reset();
  1956. this.getList();
  1957. this.queryParams.fSystemType = "";
  1958. },
  1959. // 表单重置
  1960. reset() {
  1961. this.form = {
  1962. fId: null,
  1963. fBillno: null,
  1964. fCtrlcorpid: null,
  1965. fCorpid: null,
  1966. tMblno: null,
  1967. fAmtdr: null,
  1968. fAmtcr: null,
  1969. fBilltype: null,
  1970. fBillstatus: "0",
  1971. fRemarks: null,
  1972. fAccbilldate: null,
  1973. delFlag: null,
  1974. createBy: null,
  1975. fDeptid: null,
  1976. createTime: null,
  1977. updateBy: null,
  1978. updateTime: null,
  1979. };
  1980. this.resetForm("form");
  1981. },
  1982. /** 搜索按钮操作 */
  1983. handleQuery() {
  1984. this.queryParams.pageNum = 1;
  1985. this.getList();
  1986. // this.searchFee()
  1987. },
  1988. changefBilltype() {
  1989. this.businessTypeOption = [];
  1990. if (this.TWareHouseFees.fBilltype == "SJRK") {
  1991. this.getDicts("st_in_type").then((response) => {
  1992. this.businessTypeOption = response.data;
  1993. });
  1994. } else if (this.TWareHouseFees.fBilltype == "SJCK") {
  1995. this.getDicts("st_out_type").then((response) => {
  1996. this.businessTypeOption = response.data;
  1997. });
  1998. } else if (this.TWareHouseFees.fBilltype == "HQZY") {
  1999. this.getDicts("st_trans_type").then((response) => {
  2000. this.businessTypeOption = response.data;
  2001. });
  2002. }
  2003. },
  2004. /** 重置按钮操作 */
  2005. resetQuery() {
  2006. // this.resetForm("queryParams_s");
  2007. this.tablefilter = {
  2008. pageNum: 1,
  2009. pageSize: 10,
  2010. fBillno: null,
  2011. fCtrlcorpid: null,
  2012. fCorpid: null,
  2013. timeInterval: null,
  2014. };
  2015. this.handleQuery();
  2016. this.TWareHouseFees = {
  2017. fCorpid: "",
  2018. fToCorpid: "",
  2019. fMblno: "",
  2020. fStatementNo: "",
  2021. fFeeid: "",
  2022. timeExamine: "",
  2023. timeInterval: "",
  2024. fSrcdc: "",
  2025. fReconciliation: "0",
  2026. };
  2027. },
  2028. //导入重置按钮
  2029. resetQuery_s() {
  2030. this.TWareHouseFees = {
  2031. fCorpid: "",
  2032. fToCorpid: "",
  2033. fMblno: "",
  2034. fStatementNo: "",
  2035. fFeeid: "",
  2036. timeExamine: "",
  2037. timeInterval: "",
  2038. fDc: "D",
  2039. fReconciliation: "0",
  2040. };
  2041. },
  2042. // 多选框选中数据
  2043. // handleSelectionChange(selection) {
  2044. // this.ids = selection.map(item => item.fId)
  2045. // this.single = selection.length!==1
  2046. // this.multiple = !selection.length
  2047. // },
  2048. // handleSelectionChanGe(selection){
  2049. // if(selection.length > 0) {
  2050. // this.statrGo = false
  2051. // }else{
  2052. // this.statrGo = true
  2053. // }
  2054. // },
  2055. /** 新增按钮操作 */
  2056. handleAdd() {
  2057. queryUserVal().then((response) => {
  2058. this.queryParams.createBy = response.user.userName;
  2059. });
  2060. this.queryParams.fSystemType = "";
  2061. this.doNot = false;
  2062. this.notChange = false;
  2063. this.hide = true;
  2064. this.reset();
  2065. this.DzfeeList = [];
  2066. this.pass = {
  2067. fAmtdr: "", //应收合计
  2068. fAmtcr: "", //应付合计
  2069. fMblno: "", //提单号
  2070. fName: "", //货权方
  2071. fFeesName: "", //结算单位
  2072. fCorpid: "", //结算单位ID
  2073. };
  2074. this.open = true;
  2075. this.title = "添加财务数据主";
  2076. this.queryParams = {
  2077. pageNum: 1,
  2078. pageSize: 10,
  2079. fBillno: null,
  2080. fCtrlcorpid: null,
  2081. fCorpid: null,
  2082. tMblno: null,
  2083. fAmtdr: null,
  2084. fId: null,
  2085. fAmtcr: null,
  2086. fBilltype: null,
  2087. fBillstatus: null,
  2088. fRemarks: null,
  2089. fAccbilldate: null,
  2090. fDeptid: null,
  2091. createBy: null,
  2092. timeReconci: null,
  2093. fSystemType: Cookies.get("sysType"),
  2094. };
  2095. },
  2096. // 查看按钮
  2097. check(row, res) {
  2098. this.doNot = true;
  2099. this.notChange = true;
  2100. if (Cookies.get("sysType") == 1) {
  2101. getFee(row.fId).then((response) => {
  2102. this.Operator = response.data.tFee.createBy;
  2103. this.DzfeeList = response.data.feeDoList;
  2104. this.fWbuOptions = response.data.feesList;
  2105. this.queryParams = response.data.tFee;
  2106. this.queryParams.fSystemType = response.data.tFee.fsystemType;
  2107. this.fWbuOptions = response.data.feesList;
  2108. this.fMblnoOptions = response.data.corps;
  2109. this.open = true;
  2110. this.disappear = true;
  2111. this.title = "修改财务数据主";
  2112. if (res == 1) {
  2113. this.notChange = true;
  2114. if (this.Operator == this.Lander) {
  2115. this.disappear = false;
  2116. this.reset();
  2117. this.pass = {
  2118. fAmtdr: "", //应收合计
  2119. fAmtcr: "", //应付合计
  2120. fMblno: "", //提单号
  2121. fName: "", //货权方
  2122. fFeesName: "", //结算单位
  2123. fCorpid: "", //结算单位ID
  2124. };
  2125. const fId = row.fId || this.ids;
  2126. getFee(fId).then((response) => {
  2127. this.DzfeeList = response.data.feeDoList;
  2128. this.fWbuOptions = response.data.feesList;
  2129. this.queryParams = response.data.tFee;
  2130. this.queryParams.fSystemType = response.data.tFee.fsystemType;
  2131. this.fWbuOptions = response.data.feesList;
  2132. this.fMblnoOptions = response.data.corps;
  2133. this.open = true;
  2134. });
  2135. } else {
  2136. this.notChange = true;
  2137. }
  2138. } else {
  2139. this.notChange = true;
  2140. this.reset();
  2141. this.pass = {
  2142. fAmtdr: "", //应收合计
  2143. fAmtcr: "", //应付合计
  2144. fMblno: "", //提单号
  2145. fName: "", //货权方
  2146. fFeesName: "", //结算单位
  2147. fCorpid: "", //结算单位ID
  2148. };
  2149. const fId = row.fId || this.ids;
  2150. getFee(fId).then((response) => {
  2151. this.DzfeeList = response.data.feeDoList;
  2152. this.fWbuOptions = response.data.feesList;
  2153. this.queryParams = response.data.tFee;
  2154. this.queryParams.fSystemType = response.data.tFee.fsystemType;
  2155. this.fWbuOptions = response.data.feesList;
  2156. this.fMblnoOptions = response.data.corps;
  2157. this.open = true;
  2158. this.open = true;
  2159. });
  2160. }
  2161. });
  2162. } else if (Cookies.get("sysType") == 2) {
  2163. getFleet(row.fId).then((response) => {
  2164. this.Operator = response.data.tFee.createBy;
  2165. this.DzfeeList = response.data.feeDoList;
  2166. this.fWbuOptions = response.data.feesList;
  2167. this.queryParams = response.data.tFee;
  2168. this.fWbuOptions = response.data.feesList;
  2169. this.fMblnoOptions = response.data.corps;
  2170. this.open = true;
  2171. this.disappear = true;
  2172. this.title = "修改财务数据主";
  2173. if (res == 1) {
  2174. this.notChange = true;
  2175. if (this.Operator == this.Lander) {
  2176. this.disappear = false;
  2177. this.reset();
  2178. this.pass = {
  2179. fAmtdr: "", //应收合计
  2180. fAmtcr: "", //应付合计
  2181. fMblno: "", //提单号
  2182. fName: "", //货权方
  2183. fFeesName: "", //结算单位
  2184. fCorpid: "", //结算单位ID
  2185. };
  2186. const fId = row.fId || this.ids;
  2187. getFleet(fId).then((response) => {
  2188. this.DzfeeList = response.data.feeDoList;
  2189. this.fWbuOptions = response.data.feesList;
  2190. this.queryParams = response.data.tFee;
  2191. this.fWbuOptions = response.data.feesList;
  2192. this.fMblnoOptions = response.data.corps;
  2193. this.open = true;
  2194. });
  2195. } else {
  2196. this.notChange = true;
  2197. }
  2198. } else {
  2199. this.notChange = true;
  2200. this.reset();
  2201. this.pass = {
  2202. fAmtdr: "", //应收合计
  2203. fAmtcr: "", //应付合计
  2204. fMblno: "", //提单号
  2205. fName: "", //货权方
  2206. fFeesName: "", //结算单位
  2207. fCorpid: "", //结算单位ID
  2208. };
  2209. const fId = row.fId || this.ids;
  2210. getFleet(fId).then((response) => {
  2211. this.DzfeeList = response.data.feeDoList;
  2212. this.fWbuOptions = response.data.feesList;
  2213. this.queryParams = response.data.tFee;
  2214. this.fWbuOptions = response.data.feesList;
  2215. this.fMblnoOptions = response.data.corps;
  2216. this.open = true;
  2217. this.open = true;
  2218. });
  2219. }
  2220. });
  2221. }
  2222. },
  2223. /** 修改按钮操作 */
  2224. handleUpdate(row) {
  2225. this.notChange = false;
  2226. this.hide = false;
  2227. this.reset();
  2228. this.pass = {
  2229. fAmtdr: "", //应收合计
  2230. fAmtcr: "", //应付合计
  2231. fMblno: "", //提单号
  2232. fName: "", //货权方
  2233. fFeesName: "", //结算单位
  2234. fCorpid: "", //结算单位ID
  2235. };
  2236. const fId = row.fId || this.ids;
  2237. if (Cookies.get("sysType") == 1) {
  2238. getFee(fId).then((response) => {
  2239. this.Operator = response.data.tFee.createBy;
  2240. this.DzfeeList = response.data.feeDoList;
  2241. this.fWbuOptions = response.data.feesList;
  2242. this.queryParams = response.data.tFee;
  2243. this.queryParams.fSystemType = response.data.tFee.fsystemType;
  2244. this.fMblnoOptions = response.data.corps;
  2245. this.open = true;
  2246. this.title = "修改财务数据主";
  2247. if (this.DzfeeList) {
  2248. this.doNot = true;
  2249. } else {
  2250. this.doNot = false;
  2251. }
  2252. });
  2253. } else if (Cookies.get("sysType") == 2) {
  2254. getFleet(fId).then((response) => {
  2255. this.Operator = response.data.tFee.createBy;
  2256. this.DzfeeList = response.data.feeDoList;
  2257. this.fWbuOptions = response.data.feesList;
  2258. this.queryParams = response.data.tFee;
  2259. this.fMblnoOptions = response.data.corps;
  2260. this.open = true;
  2261. this.title = "修改财务数据主";
  2262. if (this.DzfeeList) {
  2263. this.doNot = true;
  2264. } else {
  2265. this.doNot = false;
  2266. }
  2267. });
  2268. }
  2269. },
  2270. /** 远程模糊查询用户 */
  2271. corpsRemoteMethod(name) {
  2272. if (name == null || name === "") {
  2273. return false;
  2274. }
  2275. let queryParams = { pageNum: 1, pageSize: 10, fName: name, type: 1 };
  2276. listCorps(queryParams).then((response) => {
  2277. this.fMblnoOptions = response.rows;
  2278. this.KHblnoOptions = response.rows;
  2279. });
  2280. },
  2281. /** 提交按钮 */
  2282. submitForm(type) {
  2283. this.$refs["ruless"].validate((valid) => {
  2284. if (valid) {
  2285. if (!this.queryParams.fId) {
  2286. this.queryParams.fBillstatus = "1";
  2287. let formData = new window.FormData();
  2288. formData.append("tFee", JSON.stringify(this.queryParams));
  2289. formData.append("tFeeDo", JSON.stringify(this.DzfeeList));
  2290. if (type == 1) {
  2291. updateFee(formData).then((response) => {
  2292. console.log(response);
  2293. this.queryParams = response.data.tFee;
  2294. this.queryParams.fSystemType = response.data.tFee.fsystemType;
  2295. this.msgSuccess("新增成功");
  2296. // this.DzfeeList = []
  2297. // this.open = false;
  2298. this.getList();
  2299. });
  2300. } else {
  2301. addFleet(formData).then((response) => {
  2302. console.log(response);
  2303. this.queryParams = response.data.tFee;
  2304. this.msgSuccess("新增成功");
  2305. // this.DzfeeList = []
  2306. // this.open = false;
  2307. this.getList();
  2308. });
  2309. }
  2310. } else {
  2311. this.pass.fAmtcr = 0;
  2312. this.pass.fAmtdr = 0;
  2313. for (let item in this.DzfeeList) {
  2314. this.pass.fAmtcr += Number(this.DzfeeList[item].fAmt);
  2315. this.pass.fAmtdr += Number(this.DzfeeList[item].fAmtdr);
  2316. }
  2317. this.queryParams.fAmtcr = Number(this.pass.fAmtcr.toFixed(2));
  2318. this.queryParams.fAmtdr = Number(this.pass.fAmtdr.toFixed(2));
  2319. this.pass.fAmtcr.toFixed(2);
  2320. this.queryParams.fBillstatus = "1";
  2321. let formData = new window.FormData();
  2322. formData.append("tFee", JSON.stringify(this.queryParams));
  2323. formData.append("tFeeDo", JSON.stringify(this.DzfeeList));
  2324. if (type == 1) {
  2325. addFee(formData).then((response) => {
  2326. this.msgSuccess("修改成功");
  2327. this.getList();
  2328. });
  2329. } else {
  2330. addFleet(formData).then((response) => {
  2331. this.msgSuccess("修改成功");
  2332. this.getList();
  2333. });
  2334. }
  2335. }
  2336. }
  2337. });
  2338. },
  2339. /** 删除按钮操作 */
  2340. handleDelete(row) {
  2341. const fIds = row.fId || this.ids;
  2342. let tips = "";
  2343. if (Cookies.get("sysType") == 1) {
  2344. detailFee(fIds).then((res) => {
  2345. switch (res.msg) {
  2346. case "0": {
  2347. this.$message.error("当前数据已被其他操作员操作,请刷新页面");
  2348. break;
  2349. }
  2350. case "1": {
  2351. tips = "当前主表有数据,从表无数据,确认是否删除?";
  2352. this.delete_s(fIds, tips);
  2353. break;
  2354. }
  2355. case "2": {
  2356. tips = "当前主表有数据,从表有数据,确认是否删除?";
  2357. this.delete_s(fIds, tips);
  2358. break;
  2359. }
  2360. default: {
  2361. return this.$message.error("未知错误,无状态");
  2362. }
  2363. }
  2364. });
  2365. } else if (Cookies.get("sysType") == 2) {
  2366. detailFleet(fIds).then((res) => {
  2367. switch (res.msg) {
  2368. case "0": {
  2369. this.$message.error("当前数据已被其他操作员操作,请刷新页面");
  2370. break;
  2371. }
  2372. case "1": {
  2373. tips = "当前主表有数据,从表无数据,确认是否删除?";
  2374. this.delete_s(fIds, tips);
  2375. break;
  2376. }
  2377. case "2": {
  2378. tips = "当前主表有数据,从表有数据,确认是否删除?";
  2379. this.delete_s(fIds, tips);
  2380. break;
  2381. }
  2382. default: {
  2383. return this.$message.error("未知错误,无状态");
  2384. }
  2385. }
  2386. });
  2387. }
  2388. },
  2389. delete_s(fIds, tips) {
  2390. this.$confirm(tips, "警告", {
  2391. confirmButtonText: "确定",
  2392. cancelButtonText: "取消",
  2393. type: "warning",
  2394. })
  2395. .then(function () {
  2396. if (Cookies.get("sysType") == 1) {
  2397. return delFee(fIds);
  2398. } else if (Cookies.get("sysType") == 2) {
  2399. return delFleet(fIds);
  2400. }
  2401. })
  2402. .then(() => {
  2403. this.getList();
  2404. this.msgSuccess("删除成功");
  2405. });
  2406. },
  2407. // 远程模糊查询费用名称
  2408. fWRemoteMethod(name) {
  2409. this.fWbuOptions = [];
  2410. if (name == null || name === "") {
  2411. return false;
  2412. }
  2413. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  2414. listFees(queryParams).then((response) => {
  2415. this.fWbuOptions = response.rows;
  2416. });
  2417. },
  2418. /** 导出按钮操作 */
  2419. handleExport() {
  2420. const queryParams = this.queryParams;
  2421. this.$confirm("是否确认导出所有财务数据主数据项?", "警告", {
  2422. confirmButtonText: "确定",
  2423. cancelButtonText: "取消",
  2424. type: "warning",
  2425. })
  2426. .then(function () {
  2427. return exportFee(queryParams);
  2428. })
  2429. .then((response) => {
  2430. this.download(response.msg);
  2431. });
  2432. },
  2433. exportData() {
  2434. // 在这里判断筛选DzfeeList={}
  2435. const DzfeeList = this.DzfeeList;
  2436. this.$confirm("是否确认导出所有财务数据主数据项?", "警告", {
  2437. confirmButtonText: "确定",
  2438. cancelButtonText: "取消",
  2439. type: "warning",
  2440. })
  2441. .then(function () {
  2442. return;
  2443. })
  2444. .then(function () {
  2445. this.download(response.msg);
  2446. });
  2447. },
  2448. //清空一行
  2449. deleteRow(index, rows) {
  2450. this.queryParams.fAmtdr = 0;
  2451. this.queryParams.fAmtcr = 0;
  2452. rows.splice(index, 1);
  2453. for (let item in this.DzfeeList) {
  2454. this.queryParams.fAmtcr = this.DzfeeList[item].fAmt;
  2455. this.queryParams.fAmtdr = this.DzfeeList[item].fAmtdr;
  2456. }
  2457. if (this.DzfeeList == 0) {
  2458. console.log("111");
  2459. this.doNot = false;
  2460. } else {
  2461. this.doNot = true;
  2462. }
  2463. },
  2464. },
  2465. };
  2466. </script>
  2467. <style lang="scss" scoped>
  2468. .tabSetting {
  2469. display: flex;
  2470. justify-content: flex-end;
  2471. }
  2472. .listStyle {
  2473. display: flex;
  2474. border-top: 1px solid #dcdfe6;
  2475. border-left: 1px solid #dcdfe6;
  2476. border-right: 1px solid #dcdfe6;
  2477. }
  2478. .listStyle:last-child {
  2479. border-bottom: 1px solid #dcdfe6;
  2480. }
  2481. .progress {
  2482. display: flex;
  2483. align-items: center;
  2484. padding: 2px;
  2485. background-color: rgba(0, 0, 0, 0.05);
  2486. height: 100%;
  2487. }
  2488. .avue-crud__dialog__header {
  2489. display: -webkit-box;
  2490. display: -ms-flexbox;
  2491. display: flex;
  2492. -webkit-box-align: center;
  2493. -ms-flex-align: center;
  2494. align-items: center;
  2495. -webkit-box-pack: justify;
  2496. -ms-flex-pack: justify;
  2497. justify-content: space-between;
  2498. }
  2499. .el-dialog__title {
  2500. color: rgba(0, 0, 0, 0.85);
  2501. font-weight: 500;
  2502. word-wrap: break-word;
  2503. }
  2504. .avue-crud__dialog__menu {
  2505. padding-right: 20px;
  2506. float: left;
  2507. }
  2508. .avue-crud__dialog__menu i {
  2509. color: #909399;
  2510. font-size: 15px;
  2511. }
  2512. .el-icon-full-screen {
  2513. cursor: pointer;
  2514. }
  2515. .el-icon-full-screen:before {
  2516. content: "\e719";
  2517. }
  2518. </style>