index.vue 46 KB

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