index.vue 25 KB

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