index.vue 50 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577
  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="dateRange">
  44. <el-date-picker
  45. v-model="tablefilter.dateRange"
  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:fee:edit']"
  97. >修改</el-button
  98. >
  99. </el-col>
  100. <!-- <el-col :span="1.5">-->
  101. <!-- <el-button-->
  102. <!-- type="danger"-->
  103. <!-- icon="el-icon-delete"-->
  104. <!-- size="mini"-->
  105. <!-- :disabled="multiple"-->
  106. <!-- @click="handleDelete"-->
  107. <!-- v-hasPermi="['finance:contrast:remove']"-->
  108. <!-- >删除</el-button-->
  109. <!-- >-->
  110. <!-- </el-col>-->
  111. <el-col :span="1.5">
  112. <el-button
  113. type="warning"
  114. icon="el-icon-download"
  115. size="mini"
  116. @click="handleExport"
  117. v-hasPermi="['finance:contrast:export']"
  118. >导出</el-button
  119. >
  120. </el-col>
  121. <right-toolbar
  122. :showSearch.sync="showSearch"
  123. @queryTable="getList"
  124. ></right-toolbar>
  125. </el-row>
  126. <el-table
  127. v-loading="loading"
  128. :data="contrastList"
  129. @selection-change="handleSelectionChange"
  130. >
  131. <el-table-column width="50" align="center" type="selection"/>
  132. <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
  133. <el-table-column label="行号" align="center" type="index"/>
  134. <el-table-column label="系统编号" align="center" prop="fBillno" show-overflow-tooltip width="120"/>
  135. <el-table-column label="货权方" align="center" show-overflow-tooltip prop="fCtrlcorpid" width="120"/>
  136. <el-table-column label="结算单位" align="center" prop="fCorpidName" show-overflow-tooltip width="120"/>
  137. <el-table-column label="账单日期" align="center" prop="fAccbilldate" width="120">
  138. <template slot-scope="scope">
  139. <span>{{ parseTime(scope.row.fAccbilldate, "{y}-{m}-{d}") }}</span>
  140. </template>
  141. </el-table-column>
  142. <el-table-column label="提单号" align="center" prop="tMblno" width="120"/>
  143. <el-table-column label="应收金额" align="center" prop="fAmtdr" width="120"/>
  144. <el-table-column label="应付金额" align="center" prop="fAmtcr" width="120"/>
  145. <!-- <el-table-column label="单据类型" align="center" prop="fBilltype" />-->
  146. <el-table-column label="备注" align="center" show-overflow-tooltip prop="fRemarks" width="120"/>
  147. <el-table-column label="状态" align="center" prop="fBillstatus" width="120">
  148. <template slot-scope="scope">
  149. <span v-if="scope.row.fBillstatus == '1'">保存</span>
  150. <span v-else-if="scope.row.fBillstatus == '2'">暂存</span>
  151. <span v-else-if="scope.row.fBillstatus == '3'">审批驳回</span>
  152. <span v-else-if="scope.row.fBillstatus == '4'">提交审核</span>
  153. <span v-else-if="scope.row.fBillstatus == '5'">审核中</span>
  154. <span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>
  155. </template>
  156. </el-table-column>
  157. <!-- <el-table-column label="制单部门" align="center" prop="fDeptid" /> -->
  158. <el-table-column
  159. label="操作"
  160. align="center"
  161. class-name="small-padding fixed-width"
  162. >
  163. <template slot-scope="scope">
  164. <el-button
  165. size="mini"
  166. type="text"
  167. icon="el-icon-view"
  168. @click="check(scope.row,0)"
  169. v-hasPermi="['finance:contrast:edit']"
  170. >查看</el-button
  171. >
  172. <el-button
  173. size="mini"
  174. type="text"
  175. icon="el-icon-view"
  176. @click="check(scope.row,1)"
  177. v-hasPermi="['finance:contrast:edit']"
  178. v-if="scope.row.fBillstatus == 4 || scope.row.fBillstatus == 5"
  179. >审批进度</el-button>
  180. <el-button
  181. size="mini"
  182. type="text"
  183. icon="el-icon-edit"
  184. @click="handleUpdate(scope.row)"
  185. v-hasPermi="['finance:contrast:edit']"
  186. v-if="scope.row.fBillstatus <= 3">
  187. 修改</el-button>
  188. <el-button
  189. size="mini"
  190. type="text"
  191. icon="el-icon-delete"
  192. @click="handleDelete(scope.row)"
  193. v-hasPermi="['finance:contrast:remove']"
  194. v-if="scope.row.fBillstatus <= 3"
  195. >删除</el-button
  196. >
  197. </template>
  198. </el-table-column>
  199. </el-table>
  200. <pagination
  201. v-show="total > 0"
  202. :total="total"
  203. :page.sync="queryParams.pageNum"
  204. :limit.sync="queryParams.pageSize"
  205. @pagination="getList"
  206. />
  207. <!-- 对账表 -->
  208. <el-dialog
  209. :visible.sync="open"
  210. width="70%"
  211. append-to-body
  212. :close-on-click-modal="false"
  213. :show-close="colseButton"
  214. >
  215. <el-form
  216. ref="ruless"
  217. :model="queryParams"
  218. :rules="ruless"
  219. label-width="68px"
  220. :inline="true"
  221. v-show="showSearch"
  222. >
  223. <el-form-item label="货权方" prop="fCtrlcorpid">
  224. <el-input
  225. v-model="queryParams.fCtrlcorpid"
  226. clearable
  227. size="small"
  228. style="width:200px"
  229. @keyup.enter.native="handleQuery"
  230. :disabled="notChange"
  231. placeholder="请输入客户名称"
  232. />
  233. </el-form-item>
  234. <el-form-item label="结算单位" label-width="78px" prop="fCorpid">
  235. <el-select
  236. v-model="queryParams.fCorpid"
  237. placeholder="请选择结算单位"
  238. filterable
  239. remote
  240. clearable
  241. :disabled="notChange"
  242. style="width: 200px"
  243. size="small"
  244. @keyup.enter.native="handleQuery"
  245. :remote-method="corpsRemoteMethod"
  246. >
  247. <el-option
  248. v-for="(dict, index) in fMblnoOptions"
  249. :key="index.fId"
  250. :label="dict.fName"
  251. :value="dict.fId"
  252. ></el-option>
  253. </el-select>
  254. </el-form-item>
  255. <!-- <el-form-item label="提单号" prop="tMblno">
  256. <el-input v-model="TWareHouseFees.tMblno" placeholder="" :disabled="true"/>
  257. </el-form-item> -->
  258. <el-form-item label="对账日期" prop="fAccbilldate" label-width="78px">
  259. <el-date-picker
  260. v-model="queryParams.fAccbilldate"
  261. size="small"
  262. style="width: 200px"
  263. value-format="yyyy-MM-dd"
  264. type="date"
  265. :disabled="notChange"
  266. placeholder="选择账单日期"
  267. >
  268. </el-date-picker>
  269. </el-form-item>
  270. <el-form-item label="系统编号" prop="fBillno">
  271. <el-input
  272. v-model="queryParams.fBillno"
  273. placeholder=""
  274. clearable
  275. size="small"
  276. :disabled="true"
  277. style="width: 200px"
  278. @keyup.enter.native="handleQuery"
  279. />
  280. </el-form-item>
  281. <el-form-item label="录入人" prop="createBy">
  282. <el-input v-model="queryParams.createBy" disabled/>
  283. </el-form-item>
  284. <el-form-item label="备注" prop="fRemarks">
  285. <el-input v-model="queryParams.fRemarks" size="small" style="width:200px" :disabled="notChange"/>
  286. </el-form-item>
  287. <div style="width: 100%">
  288. <el-button type="warning" size="small" @click="reconciliation" :disabled="notChange" v-if="queryParams.fBillstatus < '4'"
  289. >对账</el-button>
  290. <el-button type="primary" size="small" @click="confirmReconciliation" :disabled="notChange" v-if="queryParams.fBillstatus < '4'">确认对账</el-button>
  291. <el-button type="success" size="small" @click="backrRconciliation" v-if="queryParams.fBillstatus === '6'">撤销对账</el-button>
  292. <!-- <el-button type="info" size="small" @click="exportData">导出</el-button>-->
  293. <el-button type="danger" size="small" :disabled="disappear" v-if="queryParams.fBillstatus === '4'" @click="backApproval">撤销审批</el-button>
  294. </div>
  295. <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
  296. </el-form>
  297. <el-table
  298. v-loading="loading"
  299. :data="DzfeeList"
  300. @selection-change="handleSelectionChange_s"
  301. >
  302. <el-table-column label="行号" align="center" type="index" />
  303. <el-table-column label="提单号" align="center" prop="fMblno" />
  304. <el-table-column label="业务日期" align="center" prop="fBsdate">
  305. <template slot-scope="scope">
  306. <span>{{scope.row.fBsdate.slice(0,10)}}</span>
  307. </template>
  308. </el-table-column>
  309. <el-table-column label="费用名称" align="center" prop="fFeeName" />
  310. <el-table-column label="收/付" align="center" prop="fSrcdc">
  311. <template slot-scope="scope">
  312. <span v-if="scope.row.fSrcdc == 'D'">收</span>
  313. <span v-else-if="scope.row.fSrcdc == 'C'">付</span>
  314. </template>
  315. </el-table-column>
  316. <el-table-column label="金额" align="center" prop="fAmtdr" />
  317. <el-table-column label="本次金额" align="center" prop="fAmt" />
  318. <el-table-column label="业务类型" align="center" prop="fBilltype">
  319. <template slot-scope="scope">
  320. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  321. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  322. <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>
  323. <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>
  324. <span v-else>{{scope.row.fBilltype}}</span>
  325. </template>
  326. </el-table-column>
  327. <el-table-column label="备注" align="center" prop="fRemarks"/>
  328. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  329. <template slot-scope="scope">
  330. <el-button
  331. size="mini"
  332. type="text"
  333. icon="el-icon-delete"
  334. :disabled="notChange"
  335. @click.native.prevent="deleteRow(scope.$index,DzfeeList)"
  336. >删除
  337. </el-button>
  338. </template>
  339. </el-table-column>
  340. </el-table>
  341. <div slot="footer" class="dialog-footer">
  342. <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
  343. <approval-comments v-if="addOrUpdateVisib" ref="ApprovalComments" @refreshDataList="returnData"></approval-comments>
  344. <el-button v-if="approve === true" @click="goApproval">审批</el-button>
  345. <el-button type="primary" v-if="notChange" @click="addOrUpdateHandle()">查看审批流</el-button>
  346. <el-button type="primary" @click="submitForm" :disabled="notChange">保 存</el-button>
  347. <el-button v-if="cancelButton === true" @click="cancel">取 消</el-button>
  348. <el-button v-if="cancelButton === false" @click="homePage">取消</el-button>
  349. </div>
  350. <!-- 添加或修改财务数据主对话框 -->
  351. <el-dialog
  352. :close-on-click-modal="false"
  353. width="70%"
  354. :title="title"
  355. :visible.sync="innerVisible"
  356. append-to-body
  357. >
  358. <el-form
  359. :model="TWareHouseFees"
  360. ref="feeListRules"
  361. :rules="feeListRules"
  362. label-width="80px"
  363. :inline="true"
  364. >
  365. <el-form-item
  366. label="货权方"
  367. prop="fCorpid"
  368. >
  369. <el-select
  370. v-model="TWareHouseFees.fCorpid"
  371. filterable
  372. remote
  373. clearable
  374. size="small"
  375. style="width: 200px"
  376. @keyup.enter.native="handleQuery"
  377. :remote-method="corpsRemoteMethod"
  378. placeholder="请输入客户名称"
  379. >
  380. <el-option
  381. v-for="(dict, index) in fMblnoOptions"
  382. :key="index.fId"
  383. :label="dict.fName"
  384. :value="dict.fId"
  385. ></el-option>
  386. </el-select>
  387. </el-form-item>
  388. <el-form-item label="结算单位" prop="fToCorpid">
  389. <el-select
  390. v-model="TWareHouseFees.fToCorpid"
  391. placeholder="请选择结算单位"
  392. filterable
  393. remote
  394. clearable
  395. style="width: 200px"
  396. size="small"
  397. @keyup.enter.native="handleQuery"
  398. :remote-method="corpsRemoteMethod"
  399. >
  400. <el-option
  401. v-for="(dict, index) in fMblnoOptions"
  402. :key="index.fId"
  403. :label="dict.fName"
  404. :value="dict.fId"
  405. ></el-option>
  406. </el-select>
  407. </el-form-item>
  408. <el-form-item label="提单号" prop="fMblno">
  409. <el-input
  410. clearable
  411. v-model="TWareHouseFees.fMblno"
  412. placeholder="请输入提单号"
  413. style="width: 200px"
  414. size="small"
  415. />
  416. </el-form-item>
  417. <el-form-item label="收付" prop="fDc">
  418. <el-col :span="8">
  419. <el-select v-model="TWareHouseFees.fDc" size="small" style="width: 200px">
  420. <el-option label="收" value="D" />
  421. <el-option label="付" value="C" />
  422. </el-select>
  423. </el-col>
  424. </el-form-item>
  425. <el-form-item label="是否对账" prop="fReconciliation">
  426. <el-col :span="8">
  427. <el-select
  428. v-model="TWareHouseFees.fReconciliation"
  429. size="small"
  430. style="width: 200px"
  431. >
  432. <el-option label="是" value="1" />
  433. <el-option label="否" value="0" />
  434. </el-select>
  435. </el-col>
  436. </el-form-item>
  437. <el-form-item label="费用名称" prop="fFeeid">
  438. <template>
  439. <el-select
  440. v-model="TWareHouseFees.fFeeid"
  441. filterable
  442. :disabled="browseStatus"
  443. remote
  444. size="small"
  445. style="width:200px"
  446. :remote-method="fWRemoteMethod"
  447. placeholder="费用名称"
  448. multiple
  449. >
  450. <el-option
  451. v-for="item in fWbuOptions"
  452. :key="item.fId"
  453. :label="item.fName"
  454. :value="item.fId"
  455. >
  456. </el-option>
  457. </el-select>
  458. </template>
  459. </el-form-item>
  460. <el-form-item label="审核日期" prop="timeExamine">
  461. <el-date-picker
  462. style="width: 240px"
  463. size="small"
  464. v-model="TWareHouseFees.timeExamine"
  465. type="daterange"
  466. start-placeholder="开始日期"
  467. end-placeholder="结束日期"
  468. value-format="yyyy-MM-dd"
  469. :default-time="['00:00:00', '23:59:59']"
  470. >
  471. </el-date-picker>
  472. </el-form-item>
  473. <el-form-item label="对账日期" label-width="85px" prop="timeReconci" v-if="TWareHouseFees.fReconciliation == '1'">
  474. <el-date-picker
  475. v-model="TWareHouseFees.timeReconci"
  476. size="small"
  477. style="width: 240px"
  478. value-format="yyyy-MM-dd"
  479. type="daterange"
  480. start-placeholder="开始日期"
  481. end-placeholder="结束日期"
  482. :default-time="['00:00:00', '23:59:59']"
  483. ></el-date-picker>
  484. </el-form-item>
  485. <el-form-item>
  486. <!-- <el-button class="btnColor" type="info" size="mini">导入</el-button> -->
  487. <el-button
  488. type="cyan"
  489. size="mini"
  490. @click="searchFee"
  491. >搜索</el-button
  492. >
  493. <el-button
  494. type="info"
  495. size="mini"
  496. @click="resetQuery_s"
  497. >重置</el-button
  498. >
  499. </el-form-item>
  500. <el-table
  501. v-loading="loading"
  502. :data="feeList"
  503. ref="feeList"
  504. show-summary
  505. :summary-method="getSum"
  506. @selection-change="handleSelectionChange_s"
  507. >
  508. <el-table-column type="selection" width="55" align="center" />
  509. <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
  510. <el-table-column label="行号" align="center" type="index"/>
  511. <el-table-column label="货权方" align="center" prop="fName" show-overflow-tooltip/>
  512. <el-table-column label="结算单位" align="center" prop="fFeesName" show-overflow-tooltip/>
  513. <!-- <el-table-column label="账单日期" align="center" prop="fAccbilldate"/> -->
  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="fBsdate" />
  517. <el-table-column label="业务类型" align="center" prop="fBilltype">
  518. <template slot-scope="scope">
  519. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  520. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  521. <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>
  522. <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>
  523. </template>
  524. </el-table-column>
  525. <!-- <el-table-column label="单据类型" align="center" prop="fBilltype" />-->
  526. <el-table-column
  527. label="审核日期"
  528. align="center"
  529. prop="fReviewDate"
  530. />
  531. <el-table-column label="金额" align="center" prop="fAmtdr" />
  532. <el-table-column label="本次金额" align="center" prop="fAmt" width="100">
  533. <template slot-scope="scope">
  534. <el-input
  535. v-model="scope.row.fAmt"
  536. placeholder="请输入本次金额"
  537. clearable
  538. size="small"
  539. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  540. @change="imgChangeI(scope.row)"
  541. />
  542. </template>
  543. </el-table-column>
  544. <el-table-column label="费用名称" align="center" prop="fFeeName" />
  545. <el-table-column label="备注" align="center" prop="fRemarks">
  546. <template slot-scope="scope">
  547. <el-input
  548. v-model="scope.row.fRemarks"
  549. placeholder="请输入备注"
  550. clearable
  551. size="small"
  552. width="100"
  553. />
  554. </template>
  555. </el-table-column>
  556. </el-table>
  557. </el-form>
  558. <div slot="footer" class="dialog-footer">
  559. <el-button type="primary" @click="confirmImport">确 定</el-button>
  560. <el-button @click="signOut">取 消</el-button>
  561. </div>
  562. </el-dialog>
  563. </el-dialog>
  564. <!-- 打印页面 -->
  565. <!-- <el-dialog-->
  566. <!-- :visible.sync="openPrint"-->
  567. <!-- width="80%"-->
  568. <!-- append-to-body-->
  569. <!-- :close-on-click-modal="false"-->
  570. <!-- title="对账单"-->
  571. <!-- >-->
  572. <!-- <el-table-->
  573. <!-- ref="table"-->
  574. <!-- id="print_area2"-->
  575. <!-- v-loading="loading"-->
  576. <!-- :data="printObject"-->
  577. <!-- @selection-change="handleSelectionChange_s">-->
  578. <!-- <el-table-column label="行号" align="center" type="index" width="70"/>-->
  579. <!-- <el-table-column label="提单号" align="center" prop="fMblno" />-->
  580. <!-- <el-table-column label="业务日期" align="center" prop="fBsdate">-->
  581. <!-- <template slot-scope="scope">-->
  582. <!-- <span>{{scope.row.fBsdate.slice(0,10)}}</span>-->
  583. <!-- </template>-->
  584. <!-- </el-table-column>-->
  585. <!-- <el-table-column label="费用名称" align="center" prop="fFeeName" />-->
  586. <!-- <el-table-column label="收/付" align="center" prop="fSrcdc">-->
  587. <!-- <template slot-scope="scope">-->
  588. <!-- <span v-if="scope.row.fSrcdc == 'D'">收</span>-->
  589. <!-- <span v-else-if="scope.row.fSrcdc == 'C'">付</span>-->
  590. <!-- </template>-->
  591. <!-- </el-table-column>-->
  592. <!-- <el-table-column label="金额" align="center" prop="fAmtdr" />-->
  593. <!-- <el-table-column label="本次金额" align="center" prop="fAmt"/>-->
  594. <!-- <el-table-column label="业务类型" align="center" prop="fBilltype">-->
  595. <!-- <template slot-scope="scope">-->
  596. <!-- <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>-->
  597. <!-- <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>-->
  598. <!-- <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>-->
  599. <!-- <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>-->
  600. <!-- <span v-else>{{scope.row.fBilltype}}</span>-->
  601. <!-- </template>-->
  602. <!-- </el-table-column>-->
  603. <!-- </el-table>-->
  604. <!-- <span slot="footer" class="dialog-footer">-->
  605. <!-- <el-button type="primary" style="marginTop:10px" @click="printSomething">打印</el-button>-->
  606. <!-- <el-button @click="openPrint = false">取消</el-button>-->
  607. <!-- </span>-->
  608. <!-- </el-dialog>-->
  609. </div>
  610. </template>
  611. <script>
  612. import { RevocationApproval, backFee, detailFee, Cfee, listFee, getFee, delFee, addFee, updateFee, exportFee, importFee} from "@/api/finance/contrast";
  613. import { listCorps } from '@/api/basicdata/corps'
  614. import { listFees } from '@/api/basicdata/fees'
  615. import AddOrUpdate from '@/views/viewApproval'
  616. import { queryUserVal } from '@/api/warehouseBusiness/agreement'
  617. import moment from 'moment'
  618. import print from "print-js"
  619. import ApprovalComments from '@/views/startApproval'
  620. import Global from '@/layout/components/global'
  621. export default {
  622. name: "Fee",
  623. data() {
  624. return {
  625. // 总条数
  626. total: 0,
  627. totAL:0,
  628. Ttime:0,
  629. colseButton:true,
  630. approval:[],
  631. disappear:false,
  632. addIndex:[],
  633. addOrUpdateVisible: false,
  634. addOrUpdateVisib:false,
  635. contrastId:210,
  636. // 审批状态
  637. approve:false,
  638. // 打印表
  639. printObject:[],
  640. //登陆人
  641. Lander:'',
  642. openPrint:false,
  643. statrGo:true,
  644. state_s: true,
  645. notChange:false,
  646. browseStatus:false,
  647. options:'',
  648. dateRange:"",
  649. // 遮罩层
  650. loading: true,
  651. fAccbilldate: '',
  652. // 选中数组
  653. ids: [],
  654. // 非单个禁用
  655. single: true,
  656. // 非多个禁用
  657. multiple: true,
  658. // 显示搜索条件
  659. showSearch: true,
  660. // 财务数据主表格数据
  661. feeList: [],
  662. // 客户(客户数据)
  663. fMblnoOptions: [],
  664. fFeeunitidOptions: [],
  665. fWbuOptions: [],
  666. KHblnoOptions: [],
  667. //打开内部弹窗
  668. innerVisible: false,
  669. selection: '',
  670. // 弹出层标题
  671. title: "",
  672. // 操作人
  673. Operator:'',
  674. // 是否显示弹出层
  675. open: false,
  676. dialogVisible: false,
  677. // 财务对账表格
  678. DzfeeList: [],
  679. // 财务主页面表格
  680. contrastList: [],
  681. empty:[],
  682. nothing:[],
  683. //导入从表传主表
  684. pass:{
  685. fAmtdr:'', //应收合计
  686. fAmtcr:'', //应付合计
  687. fMblno:'', //提单号
  688. fName:'', //货权方
  689. fFeesName:'', //结算单位
  690. fCorpid:'' //结算单位ID
  691. },
  692. hide:false,
  693. cancelButton:true,
  694. // 传值对象
  695. TWareHouseFees:{
  696. fCorpid:'',
  697. fToCorpid:'',
  698. fMblno:'',
  699. fStatementNo:'',
  700. fFeeid :'',
  701. timeExamine:'',
  702. timeInterval:'',
  703. fDc:'D',
  704. fReconciliation:'0',
  705. timeReconci:'',
  706. },
  707. // 查询参数
  708. queryParams: {
  709. pageNum: 1,
  710. pageSize: 10,
  711. fBillno: null,
  712. fCtrlcorpid: null,
  713. fCorpid: null,
  714. tMblno: null,
  715. fAmtdr: null,
  716. fAmtcr: null,
  717. fId:null,
  718. fBilltype: null,
  719. fBillstatus: null,
  720. fRemarks: null,
  721. fAccbilldate: null,
  722. fDeptid: null,
  723. createBy: null,
  724. timeReconci: null
  725. },
  726. // 主表查询参数
  727. tablefilter: {
  728. pageNum: 1,
  729. pageSize: 10,
  730. fBillno: null,
  731. fCtrlcorpid: null,
  732. fId:null,
  733. fCorpid: null,
  734. tMblno: null,
  735. fAmtdr: null,
  736. fAmtcr: null,
  737. fBilltype: null,
  738. fBillstatus: null,
  739. fRemarks: null,
  740. fAccbilldate: null,
  741. fDeptid: null
  742. },
  743. // 表单参数
  744. form: {},
  745. // 表单校验
  746. ruless:{
  747. fCtrlcorpid: [
  748. { required: true, message: ' ', trigger: 'blur' }
  749. ],
  750. fCorpid: [
  751. { required: true, message: ' ', trigger: 'blur' }
  752. ],
  753. fAccbilldate: [
  754. { required: true, message: ' ', trigger: 'blur' }
  755. ]
  756. },
  757. feeListRules: {
  758. fDc: [
  759. { required:true,message: ' ', trigger:'blur' }
  760. ],
  761. fToCorpid: [
  762. { required:true,message:' ', trigger:'blur'}
  763. ],
  764. fReconciliation: [
  765. { required:true,message:' ', trigger:'blur'}
  766. ],
  767. timeExamine: [
  768. { required: true, message: ' ', trigger: 'blur' }
  769. ]
  770. }
  771. };
  772. },
  773. components: {
  774. AddOrUpdate,
  775. ApprovalComments
  776. },
  777. created() {
  778. this.getList()
  779. this.register()
  780. },
  781. activated(){
  782. this.Jump()
  783. },
  784. methods: {
  785. //财务主取消
  786. signOut(){
  787. this.innerVisible = false
  788. this.feeList = []
  789. },
  790. // 审批跳转
  791. Jump(){
  792. this.approval = this.$route.query.data
  793. if(this.approval){
  794. this.colseButton = false
  795. this.approval = JSON.parse(this.approval)
  796. this.hide = false
  797. this.notChange = true
  798. this.approve = true
  799. this.disappear = true
  800. this.cancelButton = false
  801. this.reset()
  802. this.pass = {
  803. fAmtdr: '', //应收合计
  804. fAmtcr: '', //应付合计
  805. fMblno: '', //提单号
  806. fName: '', //货权方
  807. fFeesName: '', //结算单位
  808. fCorpid: '' //结算单位ID
  809. }
  810. getFee(this.approval.billId).then(response => {
  811. this.Operator = response.data.tFee.createBy
  812. this.DzfeeList = response.data.feeDoList
  813. this.fWbuOptions = response.data.feesList
  814. this.queryParams = response.data.tFee
  815. this.fWbuOptions = response.data.feesList
  816. this.fMblnoOptions = response.data.corps
  817. this.open = true;
  818. this.title = "修改财务数据主"
  819. })
  820. }
  821. },
  822. homepaGe(){
  823. let view = {
  824. fullPath: "/finance/contrast",
  825. hash: "",
  826. matched: Array(2),
  827. meta: Object,
  828. name: "Contrast",
  829. params: Object,
  830. path: "/finance/contrast",
  831. query: Object,
  832. title: "对账"
  833. }
  834. this.$router.push({ path: '/index'})
  835. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  836. if (this.isActive(view)) {
  837. this.toLastView(visitedViews, view)
  838. }
  839. })
  840. Global.$emit("removeCache", "closeSelectedTag", view);
  841. },
  842. homePage() {
  843. this.open = false
  844. let view = {
  845. fullPath: "/finance/contrast",
  846. hash: "",
  847. matched: Array(2),
  848. meta: Object,
  849. name: "Contrast",
  850. params: Object,
  851. path: "/finance/contrast",
  852. query: Object,
  853. title: "对账"
  854. }
  855. this.$router.push({ path: '/index' })
  856. this.$store.dispatch('tagsView/delView', view).then(({ visitedViews }) => {
  857. if (this.isActive(view)) {
  858. this.toLastView(visitedViews, view)
  859. }
  860. })
  861. Global.$emit("removeCache", "closeSelectedTag", view);
  862. },
  863. // 撤销审批
  864. backApproval(){
  865. let data = {
  866. id:this.queryParams.fId,
  867. actId:this.contrastId,
  868. billId:this.queryParams.fId
  869. }
  870. RevocationApproval(data).then(response => {
  871. this.msgSuccess("撤销审批成功")
  872. this.disappear = true
  873. this.open = false
  874. this.getList()
  875. })
  876. },
  877. returnData(){
  878. this.addOrUpdateVisib = false
  879. this.open = false
  880. this.homepaGe()
  881. },
  882. getDataList(){
  883. this.addOrUpdateVisible = false
  884. },
  885. // 审批按钮
  886. goApproval(){
  887. this.addOrUpdateVisib = true
  888. this.$nextTick(() => {
  889. this.$refs.ApprovalComments.init(this.queryParams.fId,this.contrastId)
  890. })
  891. },
  892. // 查看审批流
  893. addOrUpdateHandle(){
  894. this.addOrUpdateVisible = true
  895. this.addOrUpdateVisib = false
  896. let id = '448'
  897. let actId = '110'
  898. this.$nextTick(() => {
  899. this.$refs.addOrUpdate.init(this.queryParams.fId,this.contrastId)
  900. })
  901. },
  902. // 撤销对账
  903. backrRconciliation(){
  904. this.queryParams.fBillstatus = '1'
  905. let formDate = new window.FormData()
  906. formDate.append('tFee',JSON.stringify(this.queryParams))
  907. formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
  908. backFee(formDate).then(response=>{
  909. this.msgSuccess("撤回成功")
  910. })
  911. // this.open = false
  912. this.getList()
  913. },
  914. // 打印功能
  915. printing() {
  916. if(this.DzfeeList.length !== 0){
  917. this.openPrint = true
  918. this.printObject = this.DzfeeList
  919. }else {
  920. this.$message.error('无数据,请检查是否有数据');
  921. }
  922. },
  923. // 确认打印
  924. printSomething() {
  925. // 此处的style即为打印时的样式
  926. const style ='table tr td,th { border-collapse: collapse;padding:15px;border:.5px #000 solid;text-align:center;}'
  927. // "@media print {} }";
  928. print({
  929. printable: "print_area2",
  930. type: "html",
  931. header:"对账表",
  932. headerStyle: 'text-align:center;color:#000;width:100%;',
  933. style: style,// 亦可使用引入的外部css;
  934. scanStyles: false,
  935. });
  936. },
  937. // 确认对账按钮功能
  938. confirmReconciliation(){
  939. this.$refs['ruless'].validate(valid => {
  940. if(valid){
  941. if(this.DzfeeList.length){
  942. this.queryParams.fBillstatus = '4'
  943. let formDate = new window.FormData()
  944. formDate.append('tFee',JSON.stringify(this.queryParams))
  945. formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
  946. Cfee(formDate).then(response=>{
  947. this.open = false
  948. this.msgSuccess("操作成功")
  949. this.getList()
  950. })
  951. }else{
  952. this.$message.error('表单为空不允许操作');
  953. }
  954. }
  955. })
  956. },
  957. // 对账按钮功能
  958. reconciliation(){
  959. this.queryParameter = {
  960. fToCorpid: this.queryParams.fCorpid,
  961. }
  962. this.innerVisible = true
  963. this.feeList = []
  964. // this.TWareHouseFees.fToCorpid = this.queryParams.fCorpid
  965. // this.TWareHouseFees = {
  966. // fCorpid:'',
  967. // fToCorpid:'',
  968. // fMblno:'',
  969. // fStatementNo:'',
  970. // fFeeid :'',
  971. // timeExamine:'',
  972. // timeInterval:'',
  973. // fDc:'D',
  974. // fReconciliation:'0',
  975. // timeReconci:'',
  976. // }
  977. },
  978. // 默认录入人
  979. register() {
  980. queryUserVal().then((response)=>{
  981. this.Lander = response.user.userName
  982. // console.log(response)
  983. // this.Lander = response.user.userName
  984. // this.queryParams_s.createBy = response.user.userName
  985. // this.queryParams.createBy = response.user.userName
  986. // console.log(this.DzfeeList.createBy)
  987. // console.log(response.user.userName)
  988. })
  989. },
  990. // 合计
  991. getSum(param){
  992. const {columns,data} = param;
  993. const sums = [];
  994. columns.forEach((column, index) => {
  995. sums[0] = '合计'
  996. sums[10] = this.totAL.toFixed(2)
  997. sums[9] = this.Ttime.toFixed(2)
  998. });
  999. return sums;
  1000. },
  1001. // 导入多选框
  1002. handleSelectionChange_s(selection) {
  1003. this.totAL = 0
  1004. this.Ttime = 0
  1005. this.selection = selection
  1006. if(this.selection.length == 0){
  1007. for (let item in this.feeList){
  1008. this.totAL += Number(this.feeList[item].fAmt)
  1009. console.log(this.feeList[item].fAmt)
  1010. this.Ttime += Number(this.feeList[item].fAmtdr)
  1011. }
  1012. }else{
  1013. for (let index in selection){
  1014. this.totAL += Number(selection[index].fAmt)
  1015. this.Ttime += Number(selection[index].fAmtdr)
  1016. }
  1017. }
  1018. },
  1019. // 多选框选中数据
  1020. handleSelectionChange(selection) {
  1021. this.totAL = 0
  1022. this.ids = selection.map(item => item.fId)
  1023. this.single = selection.length !== 1
  1024. this.multiple = !selection.length
  1025. },
  1026. // 金额筛选
  1027. imgChangeI(row){
  1028. if (row.fAmt && Number(row.fAmt) > Number(row.fAmtdr)){
  1029. this.$set(row, 'fAmt', row.fAmtdr)
  1030. this.state_s = true
  1031. }
  1032. if (this.selection.length !== 0){
  1033. this.totAL = 0
  1034. this.Ttime = 0
  1035. for (let item in this.selection){
  1036. this.totAL += Number(this.selection[item].fAmt)
  1037. this.Ttime += Number(this.selection[item].fAmtdr)
  1038. }
  1039. }else {
  1040. this.totAL = 0
  1041. this.Ttime = 0
  1042. for (let item in this.feeList){
  1043. this.totAL += Number(this.feeList[item].fAmt)
  1044. this.Ttime += Number(this.feeList[item].fAmtdr)
  1045. }
  1046. }
  1047. },
  1048. /* 添加财务数据主 导入*/
  1049. confirmImport(){
  1050. this.hide = true
  1051. this.pass.fAmtdr = 0
  1052. this.pass.fAmtcr = 0
  1053. for (let item in this.selection) {
  1054. this.pass.fAmtcr = Number(this.pass.fAmtcr)
  1055. this.pass.fAmtdr = Number(this.pass.fAmtdr)
  1056. this.pass.fAmtcr += Number(this.selection[item].fAmt.toFixed(2))
  1057. this.pass.fAmtdr += Number(this.selection[item].fAmtdr.toFixed(2))
  1058. }
  1059. console.log(this.pass.fAmtdr)
  1060. console.log(this.pass.fAmtcr)
  1061. if(this.state_s == true) {
  1062. if (this.selection.length == '0') {
  1063. this.$message.error('未选择导入行');
  1064. } else {
  1065. for (let item in this.selection){
  1066. this.empty.push(this.selection[item].fMblno)
  1067. this.nothing.push(this.selection[item].fName)
  1068. }
  1069. //去重提单号
  1070. this.empty = new Set(this.empty)
  1071. this.empty = Array.from(this.empty)
  1072. //去重货权方
  1073. this.nothing = new Set(this.nothing)
  1074. this.nothing = Array.from(this.nothing)
  1075. if(this.empty.length <= 1){
  1076. this.pass.fMblno = this.empty[0]
  1077. }else {
  1078. this.pass.fMblno = this.empty[0] + "..."
  1079. }
  1080. if (this.nothing.length <= 1){
  1081. this.pass.fName = this.nothing[0]
  1082. }else {
  1083. this.pass.fName = this.nothing[0] + "..."
  1084. }
  1085. this.DzfeeList = this.DzfeeList.concat(this.selection)
  1086. this.queryParams.tMblno = this.pass.fMblno //提单号
  1087. this.queryParams.fCorpid = this.TWareHouseFees.fToCorpid
  1088. this.queryParams.fCtrlcorpid = this.pass.fName
  1089. this.queryParams.fAmtcr = this.pass.fAmtcr
  1090. this.queryParams.fAmtdr = this.pass.fAmtdr
  1091. this.innerVisible = false
  1092. this.feeList = []
  1093. // this.feeList = this.DzfeeList
  1094. this.TWareHouseFees = {
  1095. fCorpid:'',
  1096. fToCorpid:'',
  1097. fMblno:'',
  1098. fStatementNo:'',
  1099. fFeeid :'',
  1100. timeExamine:'',
  1101. timeInterval:'',
  1102. fSrcdc:'',
  1103. fReconciliation:'1',
  1104. timeReconci: '',
  1105. fDc:'D'
  1106. }
  1107. }
  1108. }else if(this.state_s == false){
  1109. this.$message.error('本次金额不能大于原定金额');
  1110. }
  1111. },
  1112. // imgChangeI(fAmtdr,fAmt){
  1113. // if (fAmt <= fAmtdr){
  1114. // console.log("小了!")
  1115. // this.state_s = true
  1116. // }else if(fAmt > fAmtdr){
  1117. // console.log("大了!")
  1118. // this.$message.error('本次金额不能大于原定金额');
  1119. // this.state_s = false
  1120. // }
  1121. // },
  1122. // 导入搜索
  1123. searchFee() {
  1124. this.feeList = []
  1125. this.$refs['feeListRules'].validate(valid => {
  1126. if (valid){
  1127. importFee(this.TWareHouseFees).then(response =>{
  1128. this.feeList = response.rows
  1129. this.totAL = 0
  1130. this.Ttime = 0
  1131. for (let item in this.feeList){
  1132. this.totAL += Number(this.feeList[item].fAmt)
  1133. this.Ttime += Number(this.feeList[item].fAmtdr)
  1134. }
  1135. })
  1136. }
  1137. })
  1138. },
  1139. /** 打开导入表弹窗 */
  1140. openImportTable() {
  1141. this.$refs.import.show();
  1142. },
  1143. /** 查询财务数据主列表 */
  1144. getList() {
  1145. this.loading = true;
  1146. this.getDicts("approval_process").then(response => {
  1147. // this.feeList = response.rows;
  1148. this.options = response.data
  1149. });
  1150. listFee(this.tableFilter).then(response => {
  1151. this.contrastList = response.rows
  1152. this.total = response.total
  1153. this.loading = false
  1154. })
  1155. },
  1156. // 取消按钮
  1157. cancel() {
  1158. this.open = false;
  1159. // this.feeList = []
  1160. this.reset();
  1161. this.getList()
  1162. },
  1163. // 表单重置
  1164. reset() {
  1165. this.form = {
  1166. fId: null,
  1167. fBillno: null,
  1168. fCtrlcorpid: null,
  1169. fCorpid: null,
  1170. tMblno: null,
  1171. fAmtdr: null,
  1172. fAmtcr: null,
  1173. fBilltype: null,
  1174. fBillstatus: "0",
  1175. fRemarks: null,
  1176. fAccbilldate: null,
  1177. delFlag: null,
  1178. createBy: null,
  1179. fDeptid: null,
  1180. createTime: null,
  1181. updateBy: null,
  1182. updateTime: null
  1183. };
  1184. this.resetForm("form");
  1185. },
  1186. /** 搜索按钮操作 */
  1187. handleQuery() {
  1188. this.queryParams.pageNum = 1;
  1189. this.getList();
  1190. // this.searchFee()
  1191. },
  1192. /** 重置按钮操作 */
  1193. resetQuery() {
  1194. // this.resetForm("queryParams_s");
  1195. this.tableFilter ={
  1196. pageNum: 1,
  1197. pageSize: 10,
  1198. fBillno: null,
  1199. fCtrlcorpid: null,
  1200. fId:null,
  1201. fCorpid: null,
  1202. tMblno: null,
  1203. fAmtdr: null,
  1204. fAmtcr: null,
  1205. fBilltype: null,
  1206. fBillstatus: null,
  1207. fRemarks: null,
  1208. fAccbilldate: null,
  1209. fDeptid: null,
  1210. }
  1211. this.queryParams_s = {
  1212. pageNum: 1,
  1213. pageSize: 10,
  1214. fBillno: null,
  1215. fCtrlcorpid: null,
  1216. fId:null,
  1217. fCorpid: null,
  1218. tMblno: null,
  1219. fAmtdr: null,
  1220. fAmtcr: null,
  1221. fBilltype: null,
  1222. fBillstatus: null,
  1223. fRemarks: null,
  1224. fAccbilldate: null,
  1225. fDeptid: null
  1226. }
  1227. this.handleQuery();
  1228. this.TWareHouseFees={
  1229. fCorpid:'',
  1230. fToCorpid:'',
  1231. fMblno:'',
  1232. fStatementNo:'',
  1233. fFeeid :'',
  1234. timeExamine:'',
  1235. timeInterval:'',
  1236. fSrcdc:'',
  1237. fReconciliation:'1'
  1238. }
  1239. },
  1240. //导入重置按钮
  1241. resetQuery_s() {
  1242. this.TWareHouseFees = {
  1243. fCorpid: '',
  1244. fToCorpid: '',
  1245. fMblno: '',
  1246. fStatementNo: '',
  1247. fFeeid: '',
  1248. timeExamine: '',
  1249. timeInterval: '',
  1250. fDc:'D',
  1251. fReconciliation:'0'
  1252. }
  1253. },
  1254. // 多选框选中数据
  1255. // handleSelectionChange(selection) {
  1256. // this.ids = selection.map(item => item.fId)
  1257. // this.single = selection.length!==1
  1258. // this.multiple = !selection.length
  1259. // },
  1260. // handleSelectionChanGe(selection){
  1261. // if(selection.length > 0) {
  1262. // this.statrGo = false
  1263. // }else{
  1264. // this.statrGo = true
  1265. // }
  1266. // },
  1267. /** 新增按钮操作 */
  1268. handleAdd() {
  1269. this.notChange = false
  1270. this.hide = true
  1271. this.reset();
  1272. this.DzfeeList = []
  1273. this.pass={
  1274. fAmtdr:'', //应收合计
  1275. fAmtcr:'', //应付合计
  1276. fMblno:'', //提单号
  1277. fName:'', //货权方
  1278. fFeesName:'', //结算单位
  1279. fCorpid:'' //结算单位ID
  1280. },
  1281. this.open = true;
  1282. this.title = "添加财务数据主";
  1283. this.queryParams = {
  1284. pageNum: 1,
  1285. pageSize: 10,
  1286. fBillno: null,
  1287. fCtrlcorpid: null,
  1288. fCorpid: null,
  1289. tMblno: null,
  1290. fAmtdr: null,
  1291. fId:null,
  1292. fAmtcr: null,
  1293. fBilltype: null,
  1294. fBillstatus: null,
  1295. fRemarks: null,
  1296. fAccbilldate: null,
  1297. fDeptid: null,
  1298. createBy: null,
  1299. timeReconci: null
  1300. }
  1301. },
  1302. // 查看按钮
  1303. check(row,res) {
  1304. this.notChange = true
  1305. getFee(row.fId).then(response => {
  1306. this.Operator = response.data.tFee.createBy
  1307. this.DzfeeList = response.data.feeDoList
  1308. this.fWbuOptions = response.data.feesList
  1309. this.queryParams = response.data.tFee
  1310. this.fWbuOptions = response.data.feesList
  1311. this.fMblnoOptions = response.data.corps
  1312. this.open = true;
  1313. this.disappear = true
  1314. this.title = "修改财务数据主";
  1315. if (res == 1) {
  1316. this.notChange = true
  1317. if (this.Operator == this.Lander) {
  1318. this.disappear = false
  1319. this.reset()
  1320. this.pass = {
  1321. fAmtdr: '', //应收合计
  1322. fAmtcr: '', //应付合计
  1323. fMblno: '', //提单号
  1324. fName: '', //货权方
  1325. fFeesName: '', //结算单位
  1326. fCorpid: '' //结算单位ID
  1327. }
  1328. const fId = row.fId || this.ids
  1329. getFee(fId).then(response => {
  1330. this.DzfeeList = response.data.feeDoList
  1331. this.fWbuOptions = response.data.feesList
  1332. this.queryParams = response.data.tFee
  1333. this.fWbuOptions = response.data.feesList
  1334. this.fMblnoOptions = response.data.corps
  1335. this.open = true;
  1336. });
  1337. } else {
  1338. this.notChange = true
  1339. }
  1340. } else {
  1341. this.notChange = true
  1342. this.reset()
  1343. this.pass = {
  1344. fAmtdr: '', //应收合计
  1345. fAmtcr: '', //应付合计
  1346. fMblno: '', //提单号
  1347. fName: '', //货权方
  1348. fFeesName: '', //结算单位
  1349. fCorpid: '' //结算单位ID
  1350. }
  1351. const fId = row.fId || this.ids
  1352. getFee(fId).then(response => {
  1353. this.DzfeeList = response.data.feeDoList
  1354. this.fWbuOptions = response.data.feesList
  1355. this.queryParams = response.data.tFee
  1356. this.fWbuOptions = response.data.feesList
  1357. this.fMblnoOptions = response.data.corps
  1358. this.open = true;
  1359. })
  1360. }
  1361. })
  1362. },
  1363. /** 修改按钮操作 */
  1364. handleUpdate(row) {
  1365. this.notChange = false
  1366. this.hide = false
  1367. this.reset();
  1368. this.pass={
  1369. fAmtdr:'', //应收合计
  1370. fAmtcr:'', //应付合计
  1371. fMblno:'', //提单号
  1372. fName:'', //货权方
  1373. fFeesName:'', //结算单位
  1374. fCorpid:'' //结算单位ID
  1375. }
  1376. const fId = row.fId || this.ids
  1377. getFee(fId).then(response => {
  1378. this.Operator = response.data.tFee.createBy
  1379. this.DzfeeList = response.data.feeDoList
  1380. this.fWbuOptions = response.data.feesList
  1381. this.queryParams = response.data.tFee
  1382. this.fMblnoOptions = response.data.corps
  1383. this.open = true;
  1384. this.title = "修改财务数据主";
  1385. });
  1386. },
  1387. /** 远程模糊查询用户 */
  1388. corpsRemoteMethod(name) {
  1389. if (name == null || name === "") {
  1390. return false;
  1391. }
  1392. let queryParams = { pageNum: 1, pageSize: 10, fName: name, type: 1 };
  1393. listCorps(queryParams).then((response) => {
  1394. this.fMblnoOptions = response.rows;
  1395. this.KHblnoOptions = response.rows;
  1396. });
  1397. },
  1398. /** 提交按钮 */
  1399. submitForm() {
  1400. this.$refs["ruless"].validate(valid => {
  1401. if (valid) {
  1402. if (!this.queryParams.fId) {
  1403. this.queryParams.fBillstatus = '1'
  1404. let formDate = new window.FormData()
  1405. formDate.append('tFee',JSON.stringify(this.queryParams))
  1406. formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
  1407. updateFee(formDate).then(response => {
  1408. this.queryParams = response.data.tFee
  1409. this.msgSuccess("新增成功");
  1410. // this.DzfeeList = []
  1411. // this.open = false;
  1412. this.getList();
  1413. });
  1414. } else {
  1415. this.queryParams.fBillstatus = '1'
  1416. let formDate = new window.FormData()
  1417. formDate.append('tFee',JSON.stringify(this.queryParams))
  1418. formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
  1419. addFee(formDate).then(response => {
  1420. this.msgSuccess("修改成功");
  1421. // this.DzfeeList = []
  1422. // this.open = false;
  1423. this.getList();
  1424. });
  1425. }
  1426. }
  1427. });
  1428. },
  1429. /** 删除按钮操作 */
  1430. handleDelete(row) {
  1431. const fIds = row.fId || this.ids;
  1432. let tips = ''
  1433. detailFee(fIds).then(res => {
  1434. switch (res.msg) {
  1435. case '0':{
  1436. this.$message.error("当前数据已被其他操作员操作,请刷新页面")
  1437. break
  1438. }
  1439. case '1':{
  1440. tips="当前主表有数据,从表无数据,确认是否删除?"
  1441. this.delete_s(fIds,tips)
  1442. break
  1443. }
  1444. case '2':{
  1445. tips="当前主表有数据,从表有数据,确认是否删除?"
  1446. this.delete_s(fIds,tips)
  1447. break
  1448. }
  1449. default:{
  1450. return this.$message.error("未知错误,无状态")
  1451. }
  1452. }
  1453. })
  1454. },
  1455. delete_s(fIds,tips){
  1456. this.$confirm(tips, "警告", {
  1457. confirmButtonText: "确定",
  1458. cancelButtonText: "取消",
  1459. type: "warning"
  1460. }).then(function() {
  1461. return delFee(fIds);
  1462. }).then(() => {
  1463. this.getList();
  1464. this.msgSuccess("删除成功");
  1465. })
  1466. },
  1467. // 远程模糊查询费用名称
  1468. fWRemoteMethod(name) {
  1469. this.fWbuOptions = []
  1470. if (name == null || name === "") {
  1471. return false;
  1472. }
  1473. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  1474. listFees(queryParams).then((response) => {
  1475. this.fWbuOptions = response.rows
  1476. });
  1477. },
  1478. /** 导出按钮操作 */
  1479. handleExport() {
  1480. const queryParams = this.queryParams;
  1481. this.$confirm('是否确认导出所有财务数据主数据项?', "警告", {
  1482. confirmButtonText: "确定",
  1483. cancelButtonText: "取消",
  1484. type: "warning"
  1485. }).then(function() {
  1486. return exportFee(queryParams);
  1487. }).then(response => {
  1488. this.download(response.msg);
  1489. })
  1490. },
  1491. exportData(){
  1492. // 在这里判断筛选DzfeeList={}
  1493. const DzfeeList = this.DzfeeList
  1494. this.$confirm('是否确认导出所有财务数据主数据项?', "警告", {
  1495. confirmButtonText: "确定",
  1496. cancelButtonText: "取消",
  1497. type: "warning"
  1498. }).then(function(){
  1499. return
  1500. }).then(function(){
  1501. this.download(response.msg);
  1502. })
  1503. },
  1504. //清空一行
  1505. deleteRow(index, rows) {
  1506. this.queryParams.fAmtdr = 0
  1507. this.queryParams.fAmtcr = 0
  1508. rows.splice(index, 1)
  1509. for(let item in this.DzfeeList) {
  1510. this.queryParams.fAmtcr = this.DzfeeList[item].fAmt
  1511. this.queryParams.fAmtdr = this.DzfeeList[item].fAmtdr
  1512. }
  1513. },
  1514. },
  1515. };
  1516. </script>
  1517. <style lang="scss" scoped>
  1518. </style>