index.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765
  1. <template>
  2. <div class="app-container">
  3. <div v-if="login == 3">
  4. <kaihe-generalLedgerDr />
  5. </div>
  6. <div v-else>
  7. <el-form
  8. :model="queryParams"
  9. ref="queryForm"
  10. :inline="true"
  11. v-show="showSearch"
  12. label-width="68px"
  13. >
  14. <el-form-item label="结算单位" prop="fToCorpid">
  15. <el-select
  16. v-model="queryParams.fToCorpid"
  17. placeholder="请选择结算单位"
  18. filterable
  19. remote
  20. clearable
  21. style="width: 200px"
  22. @keyup.enter.native="handleQuery"
  23. :remote-method="corpsRemoteMethod"
  24. >
  25. <el-option
  26. v-for="(dict, index) in fMblnoOptions"
  27. :key="index.fId"
  28. :label="dict.fName"
  29. :value="dict.fId"
  30. ></el-option>
  31. </el-select>
  32. </el-form-item>
  33. <el-form-item label="费用状态" prop="isReviewed">
  34. <el-select
  35. v-model="queryParams.isReviewed"
  36. clearable
  37. size="small"
  38. @keyup.enter.native="handleQuery"
  39. @change="reviewedChange"
  40. >
  41. <el-option label="录入" :value="0" />
  42. <el-option label="审核通过" :value="1" />
  43. </el-select>
  44. </el-form-item>
  45. <el-form-item label="审核日期" prop="timeExamine">
  46. <el-date-picker
  47. v-model="queryParams.timeExamine"
  48. type="daterange"
  49. value-format="yyyy-MM-dd"
  50. range-separator="至"
  51. start-placeholder="开始日期"
  52. end-placeholder="结束日期"
  53. :clearable="false"
  54. @keyup.enter.native="handleQuery"
  55. :picker-options="pickerOptions"
  56. unlink-panels
  57. >
  58. </el-date-picker>
  59. </el-form-item>
  60. <el-form-item>
  61. <el-button
  62. type="cyan"
  63. icon="el-icon-search"
  64. size="mini"
  65. @click="handleQuery"
  66. >搜索</el-button
  67. >
  68. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
  69. >重置</el-button
  70. >
  71. </el-form-item>
  72. </el-form>
  73. <el-row :gutter="10" class="mb8">
  74. <div class="tabSetting">
  75. <el-col :span="1.5">
  76. <el-button
  77. type="warning"
  78. icon="el-icon-download"
  79. size="mini"
  80. @click="handleExport"
  81. v-hasPermi="['warehouseBusiness:receivable:export']"
  82. >导出</el-button
  83. >
  84. </el-col>
  85. <right-toolbar
  86. :showSearch.sync="showSearch"
  87. @queryTable="getList"
  88. ></right-toolbar>
  89. <div style="margin: 0 12px">
  90. <el-button
  91. icon="el-icon-setting"
  92. size="mini"
  93. circle
  94. @click="showSetting = !showSetting"
  95. ></el-button>
  96. </div>
  97. </div>
  98. </el-row>
  99. <el-dialog title="自定义列显示" :visible.sync="showSetting" width="700px">
  100. <div>配置排序列数据(拖动调整顺序)</div>
  101. <div style="margin-left: 17px">
  102. <el-checkbox
  103. v-model="allCheck"
  104. label="全选"
  105. @change="allChecked"
  106. ></el-checkbox>
  107. </div>
  108. <div style="padding: 4px; display: flex; justify-content: center">
  109. <draggable
  110. v-model="setRowList"
  111. group="site"
  112. animation="300"
  113. @start="onStart"
  114. @end="onEnd"
  115. handle=".indraggable"
  116. >
  117. <transition-group>
  118. <div
  119. v-for="item in setRowList"
  120. :key="item.surface"
  121. class="listStyle"
  122. >
  123. <div style="width: 500px" class="indraggable">
  124. <div class="progress" :style="{ width: item.width + 'px' }">
  125. <el-checkbox
  126. :label="item.name"
  127. v-model="item.checked"
  128. :true-label="0"
  129. :false-label="1"
  130. >{{ item.name }}
  131. </el-checkbox>
  132. </div>
  133. </div>
  134. <el-input-number
  135. v-model.number="item.width"
  136. controls-position="right"
  137. :min="1"
  138. :max="500"
  139. size="mini"
  140. ></el-input-number>
  141. </div>
  142. </transition-group>
  143. </draggable>
  144. </div>
  145. <span slot="footer" class="dialog-footer">
  146. <el-button @click="showSetting = false">取 消</el-button>
  147. <el-button @click="delRow" type="danger">重 置</el-button>
  148. <el-button type="primary" @click="save()">确 定</el-button>
  149. </span>
  150. </el-dialog>
  151. <el-table
  152. v-loading="loading"
  153. :data="receivableList"
  154. show-summary
  155. :summary-method="getSum"
  156. ref="table"
  157. :height="tableHeight"
  158. >
  159. <!-- <el-table-column type="selection" width="55" align="center" /> -->
  160. <el-table-column
  161. type="index"
  162. label="行号"
  163. align="center"
  164. width="80"
  165. fixed
  166. />
  167. <el-table-column
  168. v-for="(item, index) in getRowList"
  169. :key="index"
  170. :label="item.name"
  171. :width="item.width"
  172. :prop="item.label"
  173. align="center"
  174. :show-overflow-tooltip="true"
  175. sortable
  176. :fixed="item.fixed"
  177. >
  178. <template slot-scope="scope">
  179. <span v-if="item.label == 'ffeesName'">
  180. <el-link :underline="false" type="primary"
  181. ><div @click="goDetail(scope.row)">
  182. {{ scope.row.ffeesName }}
  183. </div></el-link
  184. >
  185. </span>
  186. <span v-else>{{ scope.row[item.label] }}</span>
  187. </template>
  188. </el-table-column>
  189. </el-table>
  190. <pagination
  191. v-show="total > 0"
  192. :total="total"
  193. :page.sync="queryParams.pageNum"
  194. :limit.sync="queryParams.pageSize"
  195. :page-sizes="[50, 100, 200, 500, 1000]"
  196. @pagination="getList"
  197. />
  198. <!-- 添加或修改库存总账对话框 -->
  199. <!-- <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>-->
  200. <!-- <el-form ref="form" :model="form" :rules="rules" label-width="80px">-->
  201. <!-- <el-form-item label="原始入库业务编号" prop="fOriginalbillno">-->
  202. <!-- <el-input v-model="form.fOriginalbillno" placeholder="请输入原始入库业务编号" />-->
  203. <!-- </el-form-item>-->
  204. <!-- <el-form-item label="上期件数" prop="fPreqty">-->
  205. <!-- <el-input v-model="form.fPreqty" placeholder="请输入上期件数" />-->
  206. <!-- </el-form-item>-->
  207. <!-- <el-form-item label="上期毛重,单位为吨,保留6位小数" prop="fPregrossweight">-->
  208. <!-- <el-input v-model="form.fPregrossweight" placeholder="请输入上期毛重,单位为吨,保留6位小数" />-->
  209. <!-- </el-form-item>-->
  210. <!-- <el-form-item label="上期净重," prop="fPrenetweight">-->
  211. <!-- <el-input v-model="form.fPrenetweight" placeholder="请输入上期净重," />-->
  212. <!-- </el-form-item>-->
  213. <!-- <el-form-item label="入库件数" prop="fQtyd">-->
  214. <!-- <el-input v-model="form.fQtyd" placeholder="请输入入库件数" />-->
  215. <!-- </el-form-item>-->
  216. <!-- <el-form-item label="入库尺码" prop="fVolumnd">-->
  217. <!-- <el-input v-model="form.fVolumnd" placeholder="请输入入库尺码" />-->
  218. <!-- </el-form-item>-->
  219. <!-- <el-form-item label="入库毛重" prop="fGrossweightd">-->
  220. <!-- <el-input v-model="form.fGrossweightd" placeholder="请输入入库毛重" />-->
  221. <!-- </el-form-item>-->
  222. <!-- <el-form-item label="入库净重" prop="fNetweightd">-->
  223. <!-- <el-input v-model="form.fNetweightd" placeholder="请输入入库净重" />-->
  224. <!-- </el-form-item>-->
  225. <!-- <el-form-item label="出口尺码" prop="fVolumnc">-->
  226. <!-- <el-input v-model="form.fVolumnc" placeholder="请输入出口尺码" />-->
  227. <!-- </el-form-item>-->
  228. <!-- <el-form-item label="出库件数" prop="fQtyc">-->
  229. <!-- <el-input v-model="form.fQtyc" placeholder="请输入出库件数" />-->
  230. <!-- </el-form-item>-->
  231. <!-- <el-form-item label="结余件数" prop="fQtyblc">-->
  232. <!-- <el-input v-model="form.fQtyblc" placeholder="请输入结余件数" />-->
  233. <!-- </el-form-item>-->
  234. <!-- <el-form-item label="出库毛重,单位为吨" prop="fGrossweightc">-->
  235. <!-- <el-input v-model="form.fGrossweightc" placeholder="请输入出库毛重,单位为吨" />-->
  236. <!-- </el-form-item>-->
  237. <!-- <el-form-item label="出库净重" prop="fNetweightc">-->
  238. <!-- <el-input v-model="form.fNetweightc" placeholder="请输入出库净重" />-->
  239. <!-- </el-form-item>-->
  240. <!-- <el-form-item label="结余毛重" prop="fGrossweightblc">-->
  241. <!-- <el-input v-model="form.fGrossweightblc" placeholder="请输入结余毛重" />-->
  242. <!-- </el-form-item>-->
  243. <!-- <el-form-item label="结余净重" prop="fNetweightblc">-->
  244. <!-- <el-input v-model="form.fNetweightblc" placeholder="请输入结余净重" />-->
  245. <!-- </el-form-item>-->
  246. <!-- <el-form-item label="箱号" prop="fCntrno">-->
  247. <!-- <el-input v-model="form.fCntrno" placeholder="请输入箱号" />-->
  248. <!-- </el-form-item>-->
  249. <!-- <el-form-item label="状态,默认 T ,正常T 停用F 下拉选择">-->
  250. <!-- <el-radio-group v-model="form.fStatus">-->
  251. <!-- <el-radio label="1">请选择字典生成</el-radio>-->
  252. <!-- </el-radio-group>-->
  253. <!-- </el-form-item>-->
  254. <!-- <el-form-item label="删除状态" prop="delFlag">-->
  255. <!-- <el-input v-model="form.delFlag" placeholder="请输入删除状态" />-->
  256. <!-- </el-form-item>-->
  257. <!-- <el-form-item label="唛头" prop="fMarks">-->
  258. <!-- <el-input v-model="form.fMarks" placeholder="请输入唛头" />-->
  259. <!-- </el-form-item>-->
  260. <!-- <el-form-item label="备注" prop="remark">-->
  261. <!-- <el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />-->
  262. <!-- </el-form-item>-->
  263. <!-- </el-form>-->
  264. <!-- <div slot="footer" class="dialog-footer">-->
  265. <!-- <el-button type="primary" @click="submitForm">确 定</el-button>-->
  266. <!-- <el-button @click="cancel">取 消</el-button>-->
  267. <!-- </div>-->
  268. <!-- </el-dialog>-->
  269. </div>
  270. </div>
  271. </template>
  272. <script>
  273. import {
  274. listWhgenleg,
  275. getWhgenleg,
  276. delWhgenleg,
  277. addWhgenleg,
  278. updateWhgenleg,
  279. exporReceivable,
  280. } from "@/api/reportManagement/receivable";
  281. import { listWarehouse } from "@/api/basicdata/warehouse";
  282. import { listArea } from "@/api/basicdata/area";
  283. import { listGoods } from "@/api/basicdata/goods";
  284. import { listCorps } from "@/api/basicdata/corps";
  285. import { addSet, select, resetModule } from "@/api/system/set";
  286. import Cookies from "js-cookie";
  287. import draggable from "vuedraggable";
  288. import kaiheGeneralLedgerDr from "../kaihe-generalLedgerDr/index";
  289. export default {
  290. name: "generalLedgerDr",
  291. components: { draggable, kaiheGeneralLedgerDr },
  292. data() {
  293. return {
  294. login: Cookies.get("sysType"),
  295. pickerOptions: {
  296. shortcuts: [
  297. {
  298. text: "最近一周",
  299. onClick(picker) {
  300. const end = new Date();
  301. const start = new Date();
  302. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  303. picker.$emit("pick", [start, end]);
  304. },
  305. },
  306. {
  307. text: "最近一个月",
  308. onClick(picker) {
  309. const end = new Date();
  310. const start = new Date();
  311. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  312. picker.$emit("pick", [start, end]);
  313. },
  314. },
  315. {
  316. text: "最近三个月",
  317. onClick(picker) {
  318. const end = new Date();
  319. const start = new Date();
  320. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  321. picker.$emit("pick", [start, end]);
  322. },
  323. },
  324. ],
  325. },
  326. tableHeight: "0",
  327. // 货权方(客户数据)
  328. fMblnoOptions: [],
  329. // 贸易方式(数据字典),对应t_trademodels 字典
  330. fTrademodeidOptions: [],
  331. // 货物
  332. goodsOptions: [],
  333. // 仓库(仓库数据)
  334. warehouseOptions: [],
  335. kqhouseOptions: [],
  336. // 遮罩层
  337. loading: true,
  338. // 显示搜索条件
  339. showSearch: true,
  340. // 总条数
  341. total: 0,
  342. // 库存总账表格数据
  343. receivableList: [],
  344. // 弹出层标题
  345. title: "",
  346. // 是否显示弹出层
  347. open: false,
  348. // 查询参数
  349. queryParams: {
  350. pageNum: 1,
  351. pageSize: 50,
  352. fCorpid: null,
  353. fMblno: null,
  354. timeExamine: null,
  355. fToCorpid: null,
  356. fProductName: null,
  357. fMarks: null,
  358. fReconciliation: null,
  359. fBillstatus: null,
  360. },
  361. // 表单参数
  362. form: {},
  363. // 表单校验
  364. rules: {
  365. fMarks: [{ required: true, message: "唛头不能为空", trigger: "blur" }],
  366. },
  367. showSetting: false,
  368. drag: false,
  369. setRowList: [],
  370. getRowList: [],
  371. tableDate: [
  372. {
  373. surface: "1",
  374. label: "ffeesName",
  375. name: "结算单位",
  376. checked: 0,
  377. width: 180,
  378. },
  379. {
  380. surface: "2",
  381. label: "famount",
  382. name: "应收金额",
  383. checked: 0,
  384. width: 130,
  385. },
  386. {
  387. surface: "3",
  388. label: "fstlamount",
  389. name: "实收金额",
  390. checked: 0,
  391. width: 130,
  392. },
  393. {
  394. surface: "4",
  395. label: "nnfinished",
  396. name: "未收金额",
  397. checked: 0,
  398. width: 130,
  399. },
  400. ],
  401. allCheck: false,
  402. defaultTime: null,
  403. };
  404. },
  405. created() {
  406. let date = new Date();
  407. let year = parseInt(date.getFullYear());
  408. let month = parseInt(date.getMonth() + 1);
  409. let currentMonth = date.getMonth();
  410. let nextMonth = ++currentMonth;
  411. let nextMonthFirstDay = new Date(date.getFullYear(), nextMonth, 1); // 下个月的第一天
  412. let oneDay = 1000 * 60 * 60 * 24;
  413. let lastTime = new Date(nextMonthFirstDay - oneDay); // 下个月的第一天减去一天,就是上个月的最后一天
  414. let day = lastTime.getDate();
  415. if (day < 10) {
  416. day = "0" + day;
  417. }
  418. this.defaultTime = [
  419. year + "-" + month + "-" + "01 00:00:00",
  420. year + "-" + month + "-" + day + " 23:59:59",
  421. ];
  422. this.queryParams.timeExamine = this.defaultTime;
  423. this.setRowList = this.tableDate;
  424. this.getRowList = this.tableDate;
  425. this.getList();
  426. this.getDicts("data_trademodes").then((response) => {
  427. this.fTrademodeidOptions = response.data;
  428. });
  429. this.getRow();
  430. },
  431. mounted() {
  432. this.$nextTick(() => {
  433. // 监听浏览器高度变化,改变表格高度
  434. window.onresize = () => {
  435. this.tableHeight =
  436. window.innerHeight - this.$refs.table.$el.offsetTop - 70;
  437. };
  438. });
  439. },
  440. methods: {
  441. //列设置全选
  442. allChecked() {
  443. if (this.allCheck == true) {
  444. this.setRowList.map((e) => {
  445. return (e.checked = 0);
  446. });
  447. } else {
  448. this.setRowList.map((e) => {
  449. return (e.checked = 1);
  450. });
  451. }
  452. },
  453. //查询列数据
  454. getRow() {
  455. let that = this;
  456. this.data = {
  457. tableName: "应收总账",
  458. userId: Cookies.get("userName"),
  459. };
  460. select(this.data).then((res) => {
  461. if (res.data.length != 0) {
  462. this.getRowList = res.data.filter((e) => e.checked == 0);
  463. this.setRowList = res.data;
  464. this.setRowList = this.setRowList.reduce((res, item) => {
  465. res.push({
  466. surface: item.surface,
  467. label: item.label,
  468. name: item.name,
  469. checked: item.checked,
  470. width: item.width,
  471. fixed: item.fixed,
  472. });
  473. return res;
  474. }, []);
  475. }
  476. });
  477. },
  478. delRow() {
  479. this.data = {
  480. tableName: "应收总账",
  481. userId: Cookies.get("userName"),
  482. };
  483. resetModule(this.data).then((res) => {
  484. if (res.code == 200) {
  485. this.showSetting = false;
  486. this.setRowList = this.tableDate;
  487. this.getRowList = this.tableDate;
  488. }
  489. });
  490. },
  491. //保存列设置
  492. save() {
  493. this.showSetting = false;
  494. this.data = {
  495. tableName: "应收总账",
  496. userId: Cookies.get("userName"),
  497. sysTableSetList: this.setRowList,
  498. };
  499. addSet(this.data).then((res) => {
  500. if (res.code == 200) {
  501. this.showSetting = false;
  502. this.getRowList = this.setRowList.filter((e) => e.checked == 0);
  503. }
  504. });
  505. },
  506. //开始拖拽事件
  507. onStart() {
  508. this.drag = true;
  509. },
  510. //拖拽结束事件
  511. onEnd() {
  512. this.drag = false;
  513. },
  514. getSum(param) {
  515. const { columns, data } = param;
  516. const sums = [];
  517. columns.forEach((column, index) => {
  518. if (index === 0) {
  519. sums[index] = "总计";
  520. } else if (index === 2 || index === 3 || index === 4) {
  521. const values = data.map((item) => Number(item[column.property]));
  522. if (!values.every((value) => isNaN(value))) {
  523. sums[index] = values.reduce((prev, curr) => {
  524. const value = Number(curr);
  525. if (!isNaN(value)) {
  526. return (Number(prev) + Number(curr)).toFixed(2);
  527. } else {
  528. return Number(prev).toFixed(2);
  529. }
  530. }, 0);
  531. }
  532. }
  533. });
  534. return sums;
  535. },
  536. // 贸易方式(数据字典),对���t_trademodels 字典翻译
  537. fTrademodeidFormat(row, column) {
  538. return this.selectDictLabel(this.fTrademodeidOptions, row.fTrademodeid);
  539. },
  540. /* 远程模糊查询仓库 */
  541. warehouseRemoteMethod(name) {
  542. if (name == null || name === "") {
  543. return false;
  544. }
  545. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  546. listWarehouse(queryParams).then((response) => {
  547. this.warehouseOptions = response.rows;
  548. });
  549. },
  550. /* 远程模糊查询库区 */
  551. kqhouseRemoteMethod(name) {
  552. if (name == null || name === "") {
  553. return false;
  554. }
  555. if (!this.queryParams.fWarehouseid) {
  556. this.$message.error("请输入仓库!");
  557. return false;
  558. }
  559. let queryParams = {
  560. pageNum: 1,
  561. pageSize: 10,
  562. fWarehouseid: this.queryParams.fWarehouseid,
  563. fName: name,
  564. };
  565. listArea(queryParams).then((response) => {
  566. this.kqhouseOptions = response.rows;
  567. });
  568. },
  569. /* 远程模糊查询商品 */
  570. goodsRemoteMethod(name) {
  571. if (name == null || name === "") {
  572. return false;
  573. }
  574. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  575. listGoods(queryParams).then((response) => {
  576. this.goodsOptions = response.rows;
  577. });
  578. },
  579. /* 远程模糊查询用户 */
  580. corpsRemoteMethod(name) {
  581. if (name == null || name === "") {
  582. return false;
  583. }
  584. let queryParams = { pageNum: 1, pageSize: 10, fName: name };
  585. listCorps(queryParams).then((response) => {
  586. this.fMblnoOptions = response.rows;
  587. this.KHblnoOptions = response.rows;
  588. });
  589. },
  590. /** 查询库存总账列表 */
  591. getList() {
  592. this.loading = true;
  593. this.getDicts("approval_process").then((response) => {
  594. this.options = response.data;
  595. });
  596. listWhgenleg(this.queryParams).then((response) => {
  597. this.receivableList = response.rows;
  598. this.total = response.total;
  599. this.loading = false;
  600. // 根据浏览器高度设置初始高度
  601. setTimeout(() => {
  602. this.tableHeight =
  603. window.innerHeight - this.$refs.table.$el.offsetTop - 70;
  604. }, 300);
  605. });
  606. },
  607. // 取消按钮
  608. cancel() {
  609. this.open = false;
  610. this.reset();
  611. },
  612. // 表单重置
  613. reset() {
  614. this.form = {
  615. fAccyear: null,
  616. fId: null,
  617. fAccmonth: null,
  618. fCorpid: null,
  619. fMblno: null,
  620. fOriginalbillno: null,
  621. fWarehouseLocationid: null,
  622. fGoodsid: null,
  623. fTrademodeid: null,
  624. fPreqty: null,
  625. fPregrossweight: null,
  626. fPrenetweight: null,
  627. fQtyd: null,
  628. fVolumnd: null,
  629. fGrossweightd: null,
  630. fNetweightd: null,
  631. fVolumnc: null,
  632. fQtyc: null,
  633. fQtyblc: null,
  634. fGrossweightc: null,
  635. fNetweightc: null,
  636. fGrossweightblc: null,
  637. fNetweightblc: null,
  638. fCntrno: null,
  639. fStatus: "0",
  640. delFlag: null,
  641. createBy: null,
  642. fMarks: null,
  643. createTime: null,
  644. updateBy: null,
  645. updateTime: null,
  646. remark: null,
  647. };
  648. this.resetForm("form");
  649. },
  650. /** 搜索按钮操作 */
  651. handleQuery() {
  652. this.queryParams.pageNum = 1;
  653. this.getList();
  654. },
  655. /** 重置按钮操作 */
  656. resetQuery() {
  657. // this.resetForm("queryForm");
  658. this.resetQueryParams();
  659. this.handleQuery();
  660. },
  661. // 搜索重置
  662. resetQueryParams() {
  663. this.queryParams = {
  664. pageNum: 1,
  665. pageSize: 50,
  666. fCorpid: null,
  667. fMblno: null,
  668. timeExamine: this.defaultTime,
  669. fToCorpid: null,
  670. fProductName: null,
  671. fMarks: null,
  672. fReconciliation: null,
  673. fBillstatus: null,
  674. };
  675. },
  676. /** 新增按钮操作 */
  677. handleAdd() {
  678. this.reset();
  679. this.open = true;
  680. this.title = "添加库存总账";
  681. },
  682. /** 提交按钮 */
  683. submitForm() {
  684. this.$refs["form"].validate((valid) => {
  685. if (valid) {
  686. if (this.form.fAccyear != null) {
  687. updateWhgenleg(this.form).then((response) => {
  688. this.msgSuccess("修改成功");
  689. this.open = false;
  690. this.getList();
  691. });
  692. } else {
  693. addWhgenleg(this.form).then((response) => {
  694. this.msgSuccess("新增成功");
  695. this.open = false;
  696. this.getList();
  697. });
  698. }
  699. }
  700. });
  701. },
  702. /** 导出按钮操作 */
  703. handleExport() {
  704. const queryParams = this.queryParams;
  705. this.$confirm("是否确认导出所有应收总账数据项?", "警告", {
  706. confirmButtonText: "确定",
  707. cancelButtonText: "取消",
  708. type: "warning",
  709. })
  710. .then(function () {
  711. return exporReceivable(queryParams);
  712. })
  713. .then((response) => {
  714. this.download(response.msg);
  715. });
  716. },
  717. reviewedChange() {
  718. this.getList();
  719. },
  720. goDetail(row) {
  721. this.$router.push({
  722. path: "/analysis/DrDetail",
  723. query: {
  724. fCorpId: row.fCorpid,
  725. // fMblNo: row.fmblno,
  726. fAuditList: this.queryParams.timeExamine,
  727. isReviewed: this.queryParams.isReviewed,
  728. },
  729. });
  730. },
  731. },
  732. };
  733. </script>
  734. <style lang="scss">
  735. .tabSetting {
  736. display: flex;
  737. justify-content: flex-end;
  738. }
  739. .listStyle {
  740. display: flex;
  741. border-top: 1px solid #dcdfe6;
  742. border-left: 1px solid #dcdfe6;
  743. border-right: 1px solid #dcdfe6;
  744. }
  745. .listStyle:last-child {
  746. border-bottom: 1px solid #dcdfe6;
  747. }
  748. .progress {
  749. display: flex;
  750. align-items: center;
  751. padding: 2px;
  752. background-color: rgba(0, 0, 0, 0.05);
  753. height: 100%;
  754. }
  755. </style>