index.vue 45 KB

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