index.vue 38 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208
  1. <template>
  2. <div class="app-container">
  3. <el-form
  4. :model="queryParams_s"
  5. ref="TWareHouseFees"
  6. :inline="true"
  7. v-show="showSearch"
  8. label-width="68px"
  9. >
  10. <el-form-item label="货权方" prop="fCorpid">
  11. <el-select
  12. v-model="queryParams_s.fCorpid"
  13. placeholder="请输入客户名称"
  14. clearable
  15. size="small"
  16. @keyup.enter.native="handleQuery"
  17. :remote-method="corpsRemoteMethod"
  18. >
  19. <el-option
  20. v-for="(dict, index) in fMblnoOptions"
  21. :key="index.fId"
  22. :label="dict.fName"
  23. :value="dict.fId"
  24. ></el-option>
  25. </el-select>
  26. </el-form-item>
  27. <el-form-item label="结算单位" prop="fCorpid">
  28. <el-select
  29. v-model="queryParams_s.fCorpid"
  30. placeholder="请选择结算单位"
  31. filterable
  32. remote
  33. clearable
  34. style="width: 200px"
  35. @keyup.enter.native="handleQuery"
  36. :remote-method="corpsRemoteMethod"
  37. >
  38. <el-option
  39. v-for="(dict, index) in fMblnoOptions"
  40. :key="index.fId"
  41. :label="dict.fName"
  42. :value="dict.fId"
  43. ></el-option>
  44. </el-select>
  45. </el-form-item>
  46. <el-form-item label="录入人" prop="createBy">
  47. <el-input
  48. v-model="queryParams_s.createBy"
  49. placeholder="请输入录入人"
  50. clearable
  51. size="small"
  52. />
  53. </el-form-item>
  54. <!-- <el-form-item label="提单号" prop="tMblno">
  55. <el-input
  56. v-model="queryParams.tMblno"
  57. placeholder="请输入提单号"
  58. clearable
  59. size="small"
  60. @keyup.enter.native="handleQuery"
  61. />
  62. </el-form-item>-->
  63. <!-- <el-form-item label="应收合计" prop="fAmtdr">
  64. <el-input
  65. v-model="queryParams.fAmtdr"
  66. placeholder="请输入应收合计"
  67. clearable
  68. size="small"
  69. @keyup.enter.native="handleQuery"
  70. />
  71. </el-form-item> -->
  72. <!-- <el-form-item label="应付合计" prop="fAmtcr">
  73. <el-input
  74. v-model="queryParams.fAmtcr"
  75. placeholder="请输入应付合计"
  76. clearable
  77. size="small"
  78. @keyup.enter.native="handleQuery"
  79. />
  80. </el-form-item> -->
  81. <!-- <el-form-item label="单据类型" prop="fBilltype">
  82. <el-select v-model="queryParams.fBilltype" placeholder="请选择单据类型" clearable size="small">
  83. <el-option label="请选择字典生成" value="" />
  84. </el-select>
  85. </el-form-item> -->
  86. <el-form-item label="对账日期" prop="fAccbilldate">
  87. <el-date-picker
  88. v-model="dateRange"
  89. size="small"
  90. style="width: 240px"
  91. value-format="yyyy-MM-dd"
  92. type="daterange"
  93. range-separator="-"
  94. start-placeholder="开始日期"
  95. end-placeholder="结束日期"
  96. ></el-date-picker>
  97. </el-form-item>
  98. <el-form-item label="状态" prop="fBillstatus">
  99. <el-select v-model="queryParams_s.fBillstatus" placeholder="请选择">
  100. <el-option
  101. v-for="item in options"
  102. :key="item.value"
  103. :label="item.dictLabel"
  104. :value="item.dictValue"
  105. >
  106. </el-option>
  107. </el-select>
  108. </el-form-item>
  109. <!-- <el-form-item label="备注" prop="fRemarks">
  110. <el-input
  111. v-model="queryParams.fRemarks"
  112. placeholder="请输入备注"
  113. clearable
  114. size="small"
  115. @keyup.enter.native="handleQuery"
  116. />
  117. </el-form-item>-->
  118. <el-form-item label="系统编号" prop="fBillno">
  119. <el-input
  120. v-model="queryParams_s.fBillno"
  121. placeholder="请输入系统编号"
  122. clearable
  123. size="small"
  124. @keyup.enter.native="handleQuery"
  125. />
  126. </el-form-item>
  127. <!-- <el-form-item label="制单部门" prop="fDeptid">
  128. <el-input label="请选择字典生成" value="" v-model="queryParams.fDeptid" placeholder="请选择制单部门" clearable size="small"/>
  129. </el-form-item> -->
  130. <el-form-item>
  131. <el-button
  132. type="cyan"
  133. icon="el-icon-search"
  134. size="mini"
  135. @click="handleQuery"
  136. >搜索</el-button
  137. >
  138. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  139. >重置</el-button
  140. >
  141. </el-form-item>
  142. </el-form>
  143. <el-row :gutter="10" class="mb8">
  144. <el-col :span="1.5">
  145. <el-button
  146. type="primary"
  147. icon="el-icon-plus"
  148. size="mini"
  149. @click="handleAdd"
  150. v-hasPermi="['finance:contrast:add']"
  151. >新增</el-button
  152. >
  153. </el-col>
  154. <el-col :span="1.5">
  155. <el-button
  156. type="success"
  157. icon="el-icon-edit"
  158. size="mini"
  159. :disabled="single"
  160. @click="handleUpdate"
  161. v-hasPermi="['warehouse:fee:edit']"
  162. >修改</el-button
  163. >
  164. </el-col>
  165. <el-col :span="1.5">
  166. <el-button
  167. type="danger"
  168. icon="el-icon-delete"
  169. size="mini"
  170. :disabled="multiple"
  171. @click="handleDelete"
  172. v-hasPermi="['finance:contrast:remove']"
  173. >删除</el-button
  174. >
  175. </el-col>
  176. <el-col :span="1.5">
  177. <el-button
  178. type="warning"
  179. icon="el-icon-download"
  180. size="mini"
  181. @click="handleExport"
  182. v-hasPermi="['finance:contrast:export']"
  183. >导出</el-button
  184. >
  185. </el-col>
  186. <right-toolbar
  187. :showSearch.sync="showSearch"
  188. @queryTable="getList"
  189. ></right-toolbar>
  190. </el-row>
  191. <el-table
  192. v-loading="loading"
  193. :data="contrastList"
  194. @selection-change="handleSelectionChange"
  195. >
  196. <el-table-column width="55" align="center" type="selection" />
  197. <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
  198. <el-table-column label="行号" align="center" type="index" width="55" />
  199. <el-table-column label="系统编号" align="center" prop="fBillno" />
  200. <el-table-column label="货权方" align="center" show-overflow-tooltip prop="fCtrlcorpid" />
  201. <el-table-column label="结算单位" align="center" prop="fCorpid" />
  202. <el-table-column label="账单日期" align="center" prop="fAccbilldate">
  203. <template slot-scope="scope">
  204. <span>{{ parseTime(scope.row.fAccbilldate, "{y}-{m}-{d}") }}</span>
  205. </template>
  206. </el-table-column>
  207. <el-table-column label="提单号" align="center" prop="tMblno" />
  208. <el-table-column label="应收合计" align="center" prop="fAmtdr" />
  209. <el-table-column label="应付合计" align="center" prop="fAmtcr" />
  210. <!-- <el-table-column label="单据类型" align="center" prop="fBilltype" />-->
  211. <el-table-column label="备注" align="center" show-overflow-tooltip prop="fRemarks" />
  212. <el-table-column label="状态" align="center" prop="fBillstatus">
  213. <template slot-scope="scope">
  214. <span v-if="scope.row.fBillstatus == '1'">新建</span>
  215. <span v-else-if="scope.row.fBillstatus == '2'">暂存</span>
  216. <span v-else-if="scope.row.fBillstatus == '3'">审批驳回</span>
  217. <span v-else-if="scope.row.fBillstatus == '4'">提交审核</span>
  218. <span v-else-if="scope.row.fBillstatus == '5'">审核中</span>
  219. <span v-else-if="scope.row.fBillstatus == '6'">审核完成</span>
  220. </template>
  221. </el-table-column>
  222. <!-- <el-table-column label="制单部门" align="center" prop="fDeptid" /> -->
  223. <el-table-column
  224. label="操作"
  225. align="center"
  226. class-name="small-padding fixed-width"
  227. >
  228. <template slot-scope="scope">
  229. <el-button
  230. size="mini"
  231. type="text"
  232. icon="el-icon-edit"
  233. @click="handleUpdate(scope.row)"
  234. v-hasPermi="['finance:contrast:edit']"
  235. >修改</el-button
  236. >
  237. <el-button
  238. size="mini"
  239. type="text"
  240. icon="el-icon-delete"
  241. @click="handleDelete(scope.row)"
  242. v-hasPermi="['finance:contrast:remove']"
  243. >删除</el-button
  244. >
  245. </template>
  246. </el-table-column>
  247. </el-table>
  248. <pagination
  249. v-show="total > 0"
  250. :total="total"
  251. :page.sync="queryParams.pageNum"
  252. :limit.sync="queryParams.pageSize"
  253. @pagination="getList"
  254. />
  255. <!-- 对账表 -->
  256. <el-dialog
  257. :visible.sync="open"
  258. width="70%"
  259. append-to-body
  260. :close-on-click-modal="false"
  261. >
  262. <el-form
  263. ref="ruless"
  264. :model="queryParams"
  265. :rules="ruless"
  266. label-width="68px"
  267. :inline="true"
  268. v-show="showSearch"
  269. >
  270. <el-form-item label="货权方" prop="fCtrlcorpid">
  271. <el-input
  272. v-model="queryParams.fCtrlcorpid"
  273. clearable
  274. size="small"
  275. @keyup.enter.native="handleQuery"
  276. placeholder="请输入客户名称"
  277. />
  278. </el-form-item>
  279. <el-form-item label="结算单位" label-width="78px" prop="fCorpid">
  280. <el-select
  281. v-model="queryParams.fCorpid"
  282. placeholder="请选择结算单位"
  283. filterable
  284. remote
  285. clearable
  286. style="width: 200px"
  287. @keyup.enter.native="handleQuery"
  288. :remote-method="corpsRemoteMethod"
  289. >
  290. <el-option
  291. v-for="(dict, index) in fMblnoOptions"
  292. :key="index.fId"
  293. :label="dict.fName"
  294. :value="dict.fId"
  295. ></el-option>
  296. </el-select>
  297. </el-form-item>
  298. <!-- <el-form-item label="提单号" prop="tMblno">
  299. <el-input v-model="TWareHouseFees.tMblno" placeholder="" :disabled="true"/>
  300. </el-form-item> -->
  301. <el-form-item label="对账日期" prop="fAccbilldate">
  302. <el-date-picker
  303. v-model="queryParams.fAccbilldate"
  304. size="small"
  305. style="width: 200px"
  306. value-format="yyyy-MM-dd"
  307. type="date"
  308. placeholder="选择账单日期"
  309. >
  310. </el-date-picker>
  311. </el-form-item>
  312. <!-- <el-form-item label="单据日期">
  313. <el-date-picker
  314. v-model="value4"
  315. size="small"
  316. style="width: 240px"
  317. value-format="yyyy-MM-dd"
  318. type="date">
  319. </el-date-picker>
  320. </el-form-item> -->
  321. <el-form-item label="系统编号" prop="fBillno">
  322. <el-input
  323. v-model="queryParams.fBillno"
  324. placeholder=""
  325. clearable
  326. size="small"
  327. :disabled="true"
  328. @keyup.enter.native="handleQuery"
  329. />
  330. </el-form-item>
  331. <el-form-item label="录入人" prop="createBy">
  332. <el-input v-model="queryParams.createBy" disabled/>
  333. </el-form-item>
  334. <el-form-item label="备注" prop="fRemarks">
  335. <el-input v-model="queryParams.fRemarks"/>
  336. </el-form-item>
  337. <div style="width: 100%">
  338. <el-button type="warning" size="small" @click="innerVisible = true"
  339. >对账</el-button
  340. >
  341. <el-button type="primary" size="small">确认对账</el-button>
  342. <el-button type="success" size="small">导出</el-button>
  343. <el-button type="info" size="small">打印</el-button>
  344. <el-button type="danger" size="small">删除</el-button>
  345. </div>
  346. <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
  347. </el-form>
  348. <el-table
  349. v-loading="loading"
  350. :data="DzfeeList"
  351. @selection-change="handleSelectionChange_s"
  352. >
  353. <el-table-column type="selection" width="55" align="center" />
  354. <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
  355. <el-table-column label="行号" align="center" type="index" />
  356. <el-table-column label="提单号" align="center" prop="fMblno" />
  357. <el-table-column label="业务日期" align="center" prop="fBsdate">
  358. <template slot-scope="scope">
  359. <span>{{scope.row.fBsdate.slice(0,10)}}</span>
  360. </template>
  361. </el-table-column>
  362. <el-table-column label="费用名称" align="center" prop="fFeeName" />
  363. <el-table-column label="收/付" align="center" prop="fSrcdc">
  364. <template slot-scope="scope">
  365. <span v-if="scope.row.fSrcdc == 'D'">收</span>
  366. <span v-else-if="scope.row.fSrcdc == 'C'">付</span>
  367. </template>
  368. </el-table-column>
  369. <el-table-column label="金额" align="center" prop="fAmt" />
  370. <el-table-column label="业务1类型" align="center" prop="fBilltype">
  371. <template slot-scope="scope">
  372. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  373. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  374. <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>
  375. <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>
  376. <span v-else>{{scope.row.fBilltype}}</span>
  377. </template>
  378. </el-table-column>
  379. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  380. <template slot-scope="scope">
  381. <el-button
  382. size="mini"
  383. type="text"
  384. icon="el-icon-delete"
  385. @click.native.prevent="deleteRow(scope.$index,DzfeeList)"
  386. >删除
  387. </el-button>
  388. </template>
  389. </el-table-column>
  390. </el-table>
  391. <div slot="footer" class="dialog-footer">
  392. <el-button type="primary" @click="submitForm">保 存</el-button>
  393. <el-button @click="cancel">取 消</el-button>
  394. </div>
  395. <!-- 添加或修改财务数据主对话框 -->
  396. <el-dialog
  397. :close-on-click-modal="false"
  398. width="70%"
  399. :title="title"
  400. :visible.sync="innerVisible"
  401. append-to-body
  402. >
  403. <el-form
  404. :model="TWareHouseFees"
  405. ref="feeListRules"
  406. :rules="feeListRules"
  407. label-width="80px"
  408. :inline="true"
  409. >
  410. <!-- <el-form-item label="业务编号" prop="fBillno">
  411. <el-input v-model="form.fBillno" placeholder="请输入业务编号" />
  412. </el-form-item> -->
  413. <el-form-item
  414. class="el-form-item__label"
  415. label="货权方"
  416. prop="fCorpid"
  417. >
  418. <el-select
  419. v-model="TWareHouseFees.fCorpid"
  420. filterable
  421. remote
  422. clearable
  423. style="width: 200px"
  424. @keyup.enter.native="handleQuery"
  425. :remote-method="corpsRemoteMethod"
  426. placeholder="请输入客户名称"
  427. >
  428. <el-option
  429. v-for="(dict, index) in fMblnoOptions"
  430. :key="index.fId"
  431. :label="dict.fName"
  432. :value="dict.fId"
  433. ></el-option>
  434. </el-select>
  435. </el-form-item>
  436. <el-form-item label="结算单位" prop="fToCorpid">
  437. <el-select
  438. v-model="TWareHouseFees.fToCorpid"
  439. placeholder="请选择结算单位"
  440. filterable
  441. remote
  442. clearable
  443. style="width: 200px"
  444. @keyup.enter.native="handleQuery"
  445. :remote-method="corpsRemoteMethod"
  446. >
  447. <el-option
  448. v-for="(dict, index) in fMblnoOptions"
  449. :key="index.fId"
  450. :label="dict.fName"
  451. :value="dict.fId"
  452. ></el-option>
  453. </el-select>
  454. </el-form-item>
  455. <el-form-item label="提单号" prop="fMblno">
  456. <el-input
  457. v-model="TWareHouseFees.fMblno"
  458. placeholder="请输入提单号"
  459. style="width: 200px"
  460. />
  461. </el-form-item>
  462. <el-form-item label="收付" prop="fDc">
  463. <el-col :span="8">
  464. <el-select v-model="TWareHouseFees.fDc" style="width: 200px">
  465. <el-option label="收" value="D" />
  466. <el-option label="付" value="C" />
  467. </el-select>
  468. </el-col>
  469. </el-form-item>
  470. <el-form-item label="是否对账" prop="fReconciliation">
  471. <el-col :span="8">
  472. <el-select
  473. v-model="TWareHouseFees.fReconciliation"
  474. style="width: 200px"
  475. >
  476. <el-option label="是" value="1" />
  477. <el-option label="否" value="0" />
  478. </el-select>
  479. </el-col>
  480. </el-form-item>
  481. <el-form-item label="费用名称" prop="fFeeid">
  482. <template>
  483. <el-select
  484. v-model="TWareHouseFees.fFeeid"
  485. filterable
  486. :disabled="browseStatus"
  487. remote
  488. :remote-method="fWRemoteMethod"
  489. placeholder="费用名称"
  490. multiple
  491. >
  492. <el-option
  493. v-for="item in fWbuOptions"
  494. :key="item.fId"
  495. :label="item.fName"
  496. :value="item.fId"
  497. >
  498. </el-option>
  499. </el-select>
  500. </template>
  501. </el-form-item>
  502. <el-form-item label="审核日期" prop="timeExamine">
  503. <el-date-picker
  504. style="width: 200px"
  505. size="small"
  506. v-model="TWareHouseFees.timeExamine"
  507. type="daterange"
  508. start-placeholder="开始日期"
  509. end-placeholder="结束日期"
  510. value-format="yyyy-MM-dd"
  511. :default-time="['00:00:00', '23:59:59']"
  512. >
  513. </el-date-picker>
  514. </el-form-item>
  515. <el-form-item label="对账日期" label-width="85px" prop="timeReconci" v-if="TWareHouseFees.fReconciliation == '1'">
  516. <el-date-picker
  517. v-model="TWareHouseFees.timeReconci"
  518. size="small"
  519. style="width: 200px"
  520. value-format="yyyy-MM-dd"
  521. type="daterange"
  522. start-placeholder="开始日期"
  523. end-placeholder="结束日期"
  524. :default-time="['00:00:00', '23:59:59']"
  525. ></el-date-picker>
  526. </el-form-item>
  527. <el-form-item>
  528. <!-- <el-button class="btnColor" type="info" size="mini">导入</el-button> -->
  529. <el-button
  530. type="cyan"
  531. size="mini"
  532. @click="searchFee"
  533. >搜索</el-button
  534. >
  535. <el-button
  536. type="info"
  537. size="mini"
  538. @click="resetQuery_s"
  539. >重置</el-button
  540. >
  541. </el-form-item>
  542. <el-table
  543. v-loading="loading"
  544. :data="feeList"
  545. show-summary
  546. :summary-method="getSummaries"
  547. @selection-change="handleSelectionChange_s"
  548. >
  549. <el-table-column type="selection" width="55" align="center" />
  550. <!-- <el-table-column label="制单部门" align="center" prop="fId" /> -->
  551. <el-table-column label="行号" align="center" type="index" />
  552. <el-table-column label="货权方" align="center" prop="fName" />
  553. <el-table-column label="结算单位" align="center" prop="fFeesName" />
  554. <!-- <el-table-column label="账单日期" align="center" prop="fAccbilldate"/> -->
  555. <el-table-column label="提单号" align="center" prop="fMblno" />
  556. <el-table-column label="品名" align="center" prop="fProductName" />
  557. <el-table-column label="业务日期" align="center" prop="fBsdate" />
  558. <el-table-column label="业务类型" align="center" prop="fBilltype">
  559. <template slot-scope="scope">
  560. <span v-if="scope.row.fBilltype == 'SJRK'">入库</span>
  561. <span v-else-if="scope.row.fBilltype == 'SJCK'">出库</span>
  562. <span v-else-if="scope.row.fBilltype == 'CKDB'">调拨</span>
  563. <span v-else-if="scope.row.fBilltype == 'HQZY'">货权转移</span>
  564. </template>
  565. </el-table-column>
  566. <!-- <el-table-column label="单据类型" align="center" prop="fBilltype" />-->
  567. <el-table-column
  568. label="审核日期"
  569. align="center"
  570. prop="fReviewDate"
  571. />
  572. <el-table-column label="金额" align="center" prop="fAmtdr" />
  573. <el-table-column label="本次金额" align="center" prop="fAmt">
  574. <template slot-scope="scope">
  575. <el-input
  576. v-model="scope.row.fAmt"
  577. placeholder="请输入本次金额"
  578. clearable
  579. size="small"
  580. oninput='this.value=this.value.replace(/[^\-?\d.]/g,"").replace(/^(\-)*(\d+)\.(\d\d).*$/, "$1$2.$3")'
  581. @change="imgChange1(scope.row)"
  582. />
  583. </template>
  584. </el-table-column>
  585. <el-table-column label="费用名称" align="center" prop="fFeeName" />
  586. <el-table-column label="备1注" align="center" prop="fRemarks">
  587. <template slot-scope="scope">
  588. <el-input
  589. v-model="scope.row.fRemarks"
  590. placeholder="请输入备注"
  591. clearable
  592. size="small"
  593. />
  594. </template>
  595. </el-table-column>
  596. </el-table>
  597. <!-- <el-form-item label="应收合计" prop="fAmtdr">
  598. <el-input v-model="form.fAmtdr" placeholder="请输入应收合计" />
  599. </el-form-item>
  600. <el-form-item label="应付合计" prop="fAmtcr">
  601. <el-input v-model="form.fAmtcr" placeholder="请输入应付合计" />
  602. </el-form-item>
  603. <el-form-item label="单据类型" prop="fBilltype">
  604. <el-select v-model="form.fBilltype" placeholder="请选择单据类型">
  605. <el-option label="请选择字典生成" value="" />
  606. </el-select>
  607. </el-form-item>
  608. <el-form-item label="状态">
  609. <el-radio-group v-model="form.fBillstatus">
  610. <el-radio label="1">请选择字典生成</el-radio>
  611. </el-radio-group>
  612. </el-form-item>
  613. <el-form-item label="备注" prop="fRemarks">
  614. <el-input v-model="form.fRemarks" placeholder="请输入备注" />
  615. </el-form-item>
  616. <el-form-item label="账单日期" prop="fAccbilldate">
  617. <el-date-picker clearable size="small" style="width: 200px"
  618. v-model="form.fAccbilldate"
  619. type="date"
  620. value-format="yyyy-MM-dd"
  621. placeholder="选择账单日期">
  622. </el-date-picker>
  623. </el-form-item>
  624. <el-form-item label="删除状态" prop="delFlag">
  625. <el-input v-model="form.delFlag" placeholder="请输入删除状态" />
  626. </el-form-item>
  627. <el-form-item label="制单部门" prop="fDeptid">
  628. <el-select v-model="form.fDeptid" placeholder="请选择制单部门">
  629. <el-option label="请选择字典生成" value="" />
  630. </el-select>
  631. </el-form-item> -->
  632. </el-form>
  633. <div slot="footer" class="dialog-footer">
  634. <el-button type="primary" @click="confirmImport">确 定</el-button>
  635. <el-button @click="innerVisible = false">取 消</el-button>
  636. </div>
  637. </el-dialog>
  638. </el-dialog>
  639. </div>
  640. </template>
  641. <script>
  642. import { listFee, getFee, delFee, addFee, updateFee, exportFee, importFee} from "@/api/finance/contrast";
  643. import { listCorps } from '@/api/basicdata/corps'
  644. import { listFees } from '@/api/basicdata/fees'
  645. import { queryUserVal } from '@/api/warehouseBusiness/agreement'
  646. import moment from 'moment'
  647. export default {
  648. name: "Fee",
  649. components: {
  650. },
  651. data() {
  652. return {
  653. state_s: true,
  654. browseStatus:false,
  655. options:'',
  656. value1:"",
  657. value2:"",
  658. value3:"",
  659. value4:"",
  660. dateRange:"",
  661. // 遮罩层
  662. loading: true,
  663. fAccbilldate: '',
  664. // 选中数组
  665. ids: [],
  666. // 非单个禁用
  667. single: true,
  668. // 非多个禁用
  669. multiple: true,
  670. // 显示搜索条件
  671. showSearch: true,
  672. // 总条数
  673. total: 0,
  674. // 财务数据主表格数据
  675. feeList: [],
  676. // 客户(客户数据)
  677. fMblnoOptions: [],
  678. fFeeunitidOptions: [],
  679. fWbuOptions: [],
  680. KHblnoOptions: [],
  681. //打开内部弹窗
  682. innerVisible: false,
  683. selection: '',
  684. // 弹出层标题
  685. title: "",
  686. // // 录入人
  687. // createBy:response.user.userName,
  688. // 是否显示弹出层
  689. open: false,
  690. dialogVisible: false,
  691. // 财务对账表格
  692. DzfeeList: [],
  693. // 财务主页面表格
  694. contrastList: [],
  695. //导入从表传主表
  696. pass:{
  697. fAmtdr:'', //应收合计
  698. fAmtcr:'', //应付合计
  699. fMblno:'', //提单号
  700. fName:'' //货权方
  701. },
  702. // 传值对象
  703. TWareHouseFees:{
  704. fCorpid:'',
  705. fToCorpid:'',
  706. fMblno:'',
  707. fStatementNo:'',
  708. fFeeid :'',
  709. timeExamine:'',
  710. timeInterval:'',
  711. fDc:'',
  712. fReconciliation:'',
  713. timeReconci:'',
  714. },
  715. // 查询参数
  716. queryParams: {
  717. pageNum: 1,
  718. pageSize: 10,
  719. fBillno: null,
  720. fCtrlcorpid: null,
  721. fCorpid: null,
  722. tMblno: null,
  723. fAmtdr: null,
  724. fAmtcr: null,
  725. fId:null,
  726. fBilltype: null,
  727. fBillstatus: null,
  728. fRemarks: null,
  729. fAccbilldate: null,
  730. fDeptid: null,
  731. createBy: null,
  732. timeReconci: null
  733. },
  734. // 主表查询参数
  735. queryParams_s: {
  736. pageNum: 1,
  737. pageSize: 10,
  738. fBillno: null,
  739. fCtrlcorpid: null,
  740. fId:null,
  741. fCorpid: null,
  742. tMblno: null,
  743. fAmtdr: null,
  744. fAmtcr: null,
  745. fBilltype: null,
  746. fBillstatus: null,
  747. fRemarks: null,
  748. fAccbilldate: null,
  749. fDeptid: null
  750. },
  751. // 表单参数
  752. form: {},
  753. // 表单校验
  754. ruless:{
  755. fCtrlcorpid: [
  756. { required: true, message: '货权方不能为空', trigger: 'blur' }
  757. ],
  758. fCorpid: [
  759. { required: true, message: '结算单位不能为空', trigger: 'blur' }
  760. ],
  761. fAccbilldate: [
  762. { required: true, message: '对账日期不能为空', trigger: 'blur' }
  763. ]
  764. },
  765. feeListRules: {
  766. // fCtrlcorpid: [
  767. // { required:true, message: '不能为空', trigger: 'blur'}
  768. // ],
  769. fDc: [
  770. { required:true,message: '不能为空', trigger:'blur' }
  771. ],
  772. fToCorpid: [
  773. { required:true,message:'不能为空', trigger:'blur'}
  774. ],
  775. fReconciliation: [
  776. { required:true,message:'不能为空', trigger:'blur'}
  777. ],
  778. timeExamine: [
  779. { required: true, message: '审核日期不能为空', trigger: 'blur' }
  780. ]
  781. // fBilltype: [
  782. // { required: true, message: "单据类型(对账单 收费 付费 付费申请 收费申请,发票申请 销项发票 进项发票)不能为空", trigger: "change" }
  783. // ],
  784. // fBillstatus: [
  785. // { required: true, message: "状态不能为空", trigger: "blur" }
  786. // ]
  787. // fDeptid: [
  788. // { required: true, message: "制单部门不能为空", trigger: "change" }
  789. // ],
  790. }
  791. };
  792. },
  793. created() {
  794. this.getList();
  795. this.register()
  796. },
  797. methods: {
  798. // 默认录入人
  799. register() {
  800. queryUserVal().then((response)=>{
  801. this.contrastList.createBy = response.user.userName
  802. console.log(response.user.userName)
  803. })
  804. },
  805. getSummaries(param) {
  806. const { columns, data } = param;
  807. const sums = [];
  808. columns.forEach((column, index) => {
  809. const values = data.map(item => Number(item[column.property]));
  810. if (!values.every(value => isNaN(value))) {
  811. sums[index] = values.reduce((prev, curr) => {
  812. const value = Number(curr);
  813. if (!isNaN(value)) {
  814. return prev + curr;
  815. } else {
  816. return prev;
  817. }
  818. }, 0);
  819. sums[0] = '合计';
  820. } else {
  821. sums[4] = '';
  822. this.pass.fAmtdr = sums[9]
  823. this.pass.fAmtcr = sums[10]
  824. }
  825. })
  826. return sums;
  827. },
  828. // 金额筛选
  829. imgChange1(row){
  830. if (row.fAmt && Number(row.fAmt) > Number(row.fAmtdr)){
  831. this.$set(row, 'fAmt', row.fAmtdr)
  832. this.state_s = true
  833. }
  834. },
  835. // imgChange1(fAmtdr,fAmt){
  836. // if (fAmt <= fAmtdr){
  837. // console.log("小了!")
  838. // this.state_s = true
  839. // }else if(fAmt > fAmtdr){
  840. // console.log("大了!")
  841. // this.$message.error('本次金额不能大于原定金额');
  842. // this.state_s = false
  843. // }
  844. // },
  845. // 导入搜索
  846. searchFee() {
  847. console.log(this.TWareHouseFees)
  848. // this.feeList = []
  849. this.$refs['feeListRules'].validate(valid => {
  850. console.log(valid)
  851. if (valid){
  852. importFee(this.TWareHouseFees).then(response =>{
  853. console.log(response)
  854. this.feeList = response.rows
  855. })
  856. }
  857. })
  858. },
  859. /** 打开导入表弹窗 */
  860. openImportTable() {
  861. this.$refs.import.show();
  862. },
  863. /** 查询财务数据主列表 */
  864. getList() {
  865. console.log(this)
  866. this.loading = true;
  867. this.getDicts("approval_process").then(response => {
  868. // this.feeList = response.rows;
  869. this.options = response.data
  870. });
  871. listFee(this.queryParams_s).then(response => {
  872. console.log(response)
  873. this.contrastList = response.rows
  874. this.total = response.total
  875. this.loading = false
  876. })
  877. },
  878. // 取消按钮
  879. cancel() {
  880. this.open = false;
  881. // this.feeList = []
  882. this.reset();
  883. },
  884. // 表单重置
  885. reset() {
  886. this.form = {
  887. fId: null,
  888. fBillno: null,
  889. fCtrlcorpid: null,
  890. fCorpid: null,
  891. tMblno: null,
  892. fAmtdr: null,
  893. fAmtcr: null,
  894. fBilltype: null,
  895. fBillstatus: "0",
  896. fRemarks: null,
  897. fAccbilldate: null,
  898. delFlag: null,
  899. createBy: null,
  900. fDeptid: null,
  901. createTime: null,
  902. updateBy: null,
  903. updateTime: null
  904. };
  905. this.resetForm("form");
  906. },
  907. /** 搜索按钮操作 */
  908. handleQuery() {
  909. this.queryParams.pageNum = 1;
  910. this.getList();
  911. // this.searchFee()
  912. },
  913. /** 重置按钮操作 */
  914. resetQuery() {
  915. this.resetForm("queryParams_s");
  916. this.handleQuery();
  917. this.TWareHouseFees={
  918. fCorpid:'',
  919. fToCorpid:'',
  920. fMblno:'',
  921. fStatementNo:'',
  922. fFeeid :'',
  923. timeExamine:'',
  924. timeInterval:'',
  925. fSrcdc:'',
  926. fReconciliation:''
  927. }
  928. },
  929. //导入重置按钮
  930. resetQuery_s() {
  931. this.TWareHouseFees = {
  932. fCorpid: '',
  933. fToCorpid: '',
  934. fMblno: '',
  935. fStatementNo: '',
  936. fFeeid: '',
  937. timeExamine: '',
  938. timeInterval: ''
  939. }
  940. },
  941. // 多选框选中数据
  942. handleSelectionChange(selection) {
  943. this.ids = selection.map(item => item.fId)
  944. this.single = selection.length!==1
  945. this.multiple = !selection.length
  946. },
  947. /** 新增按钮操作 */
  948. handleAdd() {
  949. this.reset();
  950. this.DzfeeList = []
  951. this.open = true;
  952. this.title = "添加财务数据主";
  953. this.queryParams = {
  954. pageNum: 1,
  955. pageSize: 10,
  956. fBillno: null,
  957. fCtrlcorpid: null,
  958. fCorpid: null,
  959. tMblno: null,
  960. fAmtdr: null,
  961. fId:null,
  962. fAmtcr: null,
  963. fBilltype: null,
  964. fBillstatus: null,
  965. fRemarks: null,
  966. fAccbilldate: null,
  967. fDeptid: null,
  968. createBy: null,
  969. timeReconci: null
  970. }
  971. queryUserVal().then((response)=>{
  972. this.contrastList.createBy = response.user.userName
  973. console.log(response.user.userName)
  974. this.queryParams = {
  975. pageNum: 1,
  976. pageSize: 10,
  977. fBillno: null,
  978. fCtrlcorpid: null,
  979. fCorpid: null,
  980. tMblno: null,
  981. fAmtdr: null,
  982. fId:null,
  983. fAmtcr: null,
  984. fBilltype: null,
  985. fBillstatus: null,
  986. fRemarks: null,
  987. fAccbilldate: null,
  988. fDeptid: null,
  989. createBy: response.user.userName,
  990. timeReconci: null
  991. }
  992. })
  993. },
  994. /** 修改按钮操作 */
  995. handleUpdate(row) {
  996. this.reset();
  997. const fId = row.fId || this.ids
  998. console.log(fId)
  999. getFee(fId).then(response => {
  1000. console.log(this.DzfeeList)
  1001. console.log(response)
  1002. this.DzfeeList = response.data.feeDoList
  1003. this.fWbuOptions = response.data.feesList
  1004. this.queryParams = response.data.tFee
  1005. console.log(this.queryParams)
  1006. this.fMblnoOptions = response.data.corps
  1007. this.open = true;
  1008. this.title = "修改财务数据主";
  1009. });
  1010. console.log(this.queryParams)
  1011. },
  1012. /** 远程模糊查询用户 */
  1013. corpsRemoteMethod(name) {
  1014. if (name == null || name === "") {
  1015. return false;
  1016. }
  1017. let queryParams = { pageNum: 1, pageSize: 10, fName: name, type: 1 };
  1018. listCorps(queryParams).then((response) => {
  1019. this.fMblnoOptions = response.rows;
  1020. this.KHblnoOptions = response.rows;
  1021. });
  1022. },
  1023. /** 提交按钮 */
  1024. submitForm() {
  1025. console.log(this.queryParams)
  1026. // console.log(this.feeList)
  1027. this.$refs["ruless"].validate(valid => {
  1028. if (valid) {
  1029. if (!this.queryParams.fId) {
  1030. console.log(this.queryParams)
  1031. this.queryParams.fBillstatus = '1'
  1032. let formDate = new window.FormData()
  1033. formDate.append('tFee',JSON.stringify(this.queryParams))
  1034. formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
  1035. updateFee(formDate).then(response => {
  1036. this.msgSuccess("新增成功");
  1037. this.DzfeeList = []
  1038. this.open = false;
  1039. this.getList();
  1040. });
  1041. } else {
  1042. this.queryParams.fBillstatus = '1'
  1043. let formDate = new window.FormData()
  1044. formDate.append('tFee',JSON.stringify(this.queryParams))
  1045. formDate.append("tFeeDo", JSON.stringify(this.DzfeeList))
  1046. console.log(this.queryParams)
  1047. addFee(formDate).then(response => {
  1048. this.msgSuccess("修改成功");
  1049. this.DzfeeList = []
  1050. this.open = false;
  1051. this.getList();
  1052. });
  1053. }
  1054. }
  1055. });
  1056. },
  1057. // 导入多选框
  1058. handleSelectionChange_s(selection) {
  1059. this.selection = selection
  1060. },
  1061. // 多选框选中数据
  1062. handleSelectionChange(selection) {
  1063. this.ids = selection.map(item => item.fId)
  1064. this.single = selection.length !== 1
  1065. this.multiple = !selection.length
  1066. },
  1067. /* 添加财务数据主 导入*/
  1068. confirmImport(){
  1069. if(this.state_s == true) {
  1070. if (this.selection.length == '0') {
  1071. console.log('未选择')//写入提示
  1072. this.$message.error('未选择导入行');
  1073. } else {
  1074. console.log(this.selection[0].fMblno)
  1075. for (let item in this.selection){
  1076. console.log(this.selection[item])
  1077. console.log(this.selection[item].fMblno)
  1078. if(item >= 1){
  1079. this.pass.fMblno = this.selection[item].fMblno + "..."
  1080. this.pass.fName = this.selection[item].fName + "..."
  1081. }else if(item == 0){
  1082. this.pass.fMblno = this.selection[item].fMblno
  1083. this.pass.fName = this.selection[item].fName
  1084. }
  1085. }
  1086. console.log(this.pass)
  1087. this.DzfeeList = this.selection
  1088. this.queryParams.tMblno = this.pass.fMblno //提单号
  1089. this.queryParams.fCtrlcorpid = this.pass.fName
  1090. this.queryParams.fAmtcr = this.pass.fAmtcr
  1091. this.queryParams.fAmtdr = this.pass.fAmtdr
  1092. console.log(this.TWareHouseFees)
  1093. this.innerVisible = false
  1094. this.feeList = []
  1095. // this.feeList = this.DzfeeList
  1096. this.TWareHouseFees = {
  1097. fCorpid:'',
  1098. fToCorpid:'',
  1099. fMblno:'',
  1100. fStatementNo:'',
  1101. fFeeid :'',
  1102. timeExamine:'',
  1103. timeInterval:'',
  1104. fSrcdc:'',
  1105. fReconciliation:'',
  1106. timeReconci: ''
  1107. }
  1108. }
  1109. }else if(this.state_s == false){
  1110. this.$message.error('本次金额不能大于原定金额');
  1111. }
  1112. },
  1113. /** 删除按钮操作 */
  1114. handleDelete(row) {
  1115. const fIds = row.fId || this.ids;
  1116. this.$confirm('是否确认删除财务数据主编号为"' + fIds + '"的数据项?', "警告", {
  1117. confirmButtonText: "确定",
  1118. cancelButtonText: "取消",
  1119. type: "warning"
  1120. }).then(function() {
  1121. return delFee(fIds);
  1122. }).then(() => {
  1123. this.getList();
  1124. this.msgSuccess("删除成功");
  1125. })
  1126. },
  1127. // 远程模糊查询费用名称
  1128. fWRemoteMethod(name) {
  1129. this.fWbuOptions = []
  1130. if (name == null || name === "") {
  1131. return false;
  1132. }
  1133. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  1134. listFees(queryParams).then((response) => {
  1135. console.log(response)
  1136. console.log("1111")
  1137. this.fWbuOptions = response.rows
  1138. console.log(this.fWbuOptions)
  1139. });
  1140. },
  1141. /** 导出按钮操作 */
  1142. handleExport() {
  1143. const queryParams = this.queryParams;
  1144. this.$confirm('是否确认导出所有财务数据主数据项?', "警告", {
  1145. confirmButtonText: "确定",
  1146. cancelButtonText: "取消",
  1147. type: "warning"
  1148. }).then(function() {
  1149. return exportFee(queryParams);
  1150. }).then(response => {
  1151. this.download(response.msg);
  1152. })
  1153. },
  1154. //清空一行
  1155. deleteRow(index, rows) {
  1156. rows.splice(index, 1);
  1157. },
  1158. },
  1159. };
  1160. </script>
  1161. <style lang="scss" scoped>
  1162. </style>