From 92ff846fb659c62037a32b1d8c15eae9df9d9b54 Mon Sep 17 00:00:00 2001 From: zenglf <18502938215@163.com> Date: 星期一, 18 九月 2023 13:24:30 +0800 Subject: [PATCH] Merge branch 'develop' of http://117.34.109.166:18448/r/vue_mdc_430 --- src/views/spare/modules/sparePartInventory/SparePartInventoryList.vue | 197 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 197 insertions(+), 0 deletions(-) diff --git a/src/views/spare/modules/sparePartInventory/SparePartInventoryList.vue b/src/views/spare/modules/sparePartInventory/SparePartInventoryList.vue new file mode 100644 index 0000000..8e443b9 --- /dev/null +++ b/src/views/spare/modules/sparePartInventory/SparePartInventoryList.vue @@ -0,0 +1,197 @@ +<template> + <a-card :bordered="false"> + <div> + <a-table + ref="table" + size="middle" + bordered + rowKey="id" + :columns="columns" + :dataSource="dataSource" + :pagination="ipagination" + :loading="loading" + @change="handleTableChange" + > + + </a-table> + </div> + + </a-card> +</template> + +<script> +import { JeecgListMixin } from '@/mixins/JeecgListMixin' +import { getAction, postAction } from '@/api/manage' +import JInput from '@/components/jeecg/JInput' +import Tooltip from 'ant-design-vue/es/tooltip' +import JEllipsis from "@/components/jeecg/JEllipsis"; + +export default { + name: "EquipmentList", + mixins: [JeecgListMixin], + components: { + JInput, + Tooltip, + JEllipsis, + }, + data() { + return { + description: '閫傞厤璁惧', + ipagination:{ + current: 1, + pageSize: 10, + pageSizeOptions: ['10', '20', '30'], + showTotal: (total, range) => { + return range[0] + "-" + range[1] + " 鍏�" + total + "鏉�" + }, + showQuickJumper: true, + showSizeChanger: true, + total: 0 + }, + // 琛ㄥご + columns: [ + { + title: '#', + dataIndex: '', + key: 'rowIndex', + width: 60, + align: "center", + customRender: function (t, r, index) { + return parseInt(index) + 1; + } + }, + { + title: '鎵规鍙�', + align: "center", + dataIndex: 'batchNum', + }, + { + title: '鍗曚綅', + align: "center", + dataIndex: 'mainUnitName', + }, + { + title: '鏁伴噺', + align: "center", + dataIndex: 'mainQuantity', + }, + /* { + title: '杈呭崟浣�', + align: "center", + dataIndex: 'auxiliaryUnitName', + }, + { + title: '杈呮暟閲�', + align: "center", + dataIndex: 'auxiliaryQuantity', + }, */ + { + title: '浠撳簱', + align: "center", + dataIndex: 'warehouseName', + }, + { + title: '搴撳尯', + align: "center", + dataIndex: 'warehouseAreaName', + }, + { + title: '搴撲綅', + align: "center", + dataIndex: 'warehouseLocationNum', + }, + { + title: '鍑哄巶鏃ユ湡', + align: "center", + dataIndex: 'manufactureDate', + customRender: function (text) { + return !text ? "" : (text.length > 10 ? text.substr(0, 10) : text) + } + }, + { + title: '渚涘簲鍟�', + align: "center", + dataIndex: 'supplierName', + }, + { + title: '鏈夋晥鏈�', + align: "center", + dataIndex: 'validityPeriod', + }, + { + title: '澶辨晥棰勮鎶�', + align: "center", + dataIndex: 'validityForecast', + }, + ], + url: { + list: "/spare/SparesPartInventory/getSparePartInventoryList", + }, + sparePartId: '-1', + } + }, + watch: { + sparePartId() { + this.queryParam = {}; + this.queryParam.sparePartId = this.sparePartId; + this.loadData(1); + }, + }, + + methods: { + + loadData(arg) { + if (!this.url.list) { + this.$message.error("璇疯缃畊rl.list灞炴��!") + return + } + if (arg === 1) { + this.ipagination.current = 1; + } + var params = this.getQueryParams();//鏌ヨ鏉′欢 + if (this.sparePartId == '-1') { + params.sparePartId = '-1'; + } + this.loading = true; + getAction(this.url.list, params).then((res) => { + if (res.success) { + this.dataSource = res.result.records || res.result; + if (res.result.total) { + this.ipagination.total = res.result.total; + } else { + this.ipagination.total = 0; + } + } else { + this.$message.warning(res.message) + } + }).finally(() => { + this.loading = false + }) + }, + }, +} +</script> + +<style lang="less" scoped> +@import '~@assets/less/common.less'; +/deep/ .frozenRowClass { + color: #c9c9c9; +} +.success { + color: green; +} +.error { + color: red; +} +.fontweight { + font-weight: bold; +} +.fontweightGreen { + font-weight: bold; + color: green; +} +.ant-card { + margin-left: -30px; + margin-right: -30px; +} +</style> \ No newline at end of file -- Gitblit v1.9.3