¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card :bordered="false"> |
| | | <div> |
| | | <a-table ref="table" size="middle" bordered rowKey="id" :scroll="{ x: true }" :columns="columns" |
| | | :dataSource="dataSource" :pagination="ipagination" :loading="loading" @change="handleTableChange"> |
| | | <span slot="num" slot-scope="text, record" class="fontweight"> |
| | | {{ record.num }} |
| | | </span> |
| | | |
| | | </a-table> |
| | | <template v-for="col in columns" :slot="col.dataIndex" slot-scope="text, record, index"> |
| | | </template> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | export default { |
| | | name: "ToolsStocktaKingBoundDetail", |
| | | components: { |
| | | Tooltip, |
| | | }, |
| | | mixins: [JeecgListMixin], |
| | | props: { |
| | | mainId: { |
| | | type: String, |
| | | default: '', |
| | | required: false |
| | | } |
| | | }, |
| | | watch: { |
| | | mainId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if (!this.mainId) { |
| | | this.clearList() |
| | | } else { |
| | | this.queryParam['stocktakingBoundId'] = val; |
| | | this.queryParam['delFlag'] = 0; |
| | | this.loadData(1); |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | }, |
| | | width: 50 |
| | | }, |
| | | |
| | | |
| | | { |
| | | title: 'åå
·ç¼å·', |
| | | dataIndex: 'toolCode', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'å·¥å
፱Ȍ', |
| | | dataIndex: 'applicationType_dictText', |
| | | align: 'center', |
| | | |
| | | }, |
| | | |
| | | { |
| | | title: '䏿åç§°', |
| | | dataIndex: 'chineseName', |
| | | align: 'center' |
| | | }, |
| | | |
| | | { |
| | | title: 'åå·/å¾å·', |
| | | dataIndex: 'toolModel', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'åå
·ææ', |
| | | dataIndex: 'toolMaterial', |
| | | align: 'center' |
| | | |
| | | }, |
| | | { |
| | | title: 'é¶ä»¶ææ', |
| | | dataIndex: 'partMaterial', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'åå®¶', |
| | | dataIndex: 'supplierId', |
| | | align: 'center' |
| | | |
| | | }, |
| | | { |
| | | title: 'åå¨ä½ç½®(åºä½å·)', |
| | | dataIndex: 'goodsShelvesId', |
| | | align: 'center' |
| | | }, |
| | | |
| | | { |
| | | title: 'è´¦é¢æ°é', |
| | | dataIndex: 'bookQuantity', |
| | | align: 'center' |
| | | |
| | | }, |
| | | { |
| | | title: 'å¯ç¨æ°é', |
| | | dataIndex: 'availableQuantity', |
| | | align: 'center' |
| | | |
| | | }, |
| | | { |
| | | title: 'å®çæ°é', |
| | | dataIndex: 'practicalQuantity', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'å·®å¼å¼', |
| | | dataIndex: 'differenceValue', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'çäºçç', |
| | | dataIndex: 'surplusDeficit_dictText', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: 'çåºæ¶é´', |
| | | dataIndex: 'stocktakingDate', |
| | | align: 'center' |
| | | }, |
| | | { |
| | | title: '夿³¨', |
| | | dataIndex: 'remark', |
| | | align: 'center' |
| | | } |
| | | ], |
| | | url: { |
| | | list: "/tms/toolsStocktakingBound/listToolsStocktakingBoundControllerDetailsByMainId", |
| | | }, |
| | | /* å页忰 */ |
| | | ipagination: { |
| | | current: 1, |
| | | pageSize: 20, |
| | | pageSizeOptions: ['5', '10', '20', '50'], |
| | | showTotal: (total, range) => { |
| | | return range[0] + '-' + range[1] + ' å
±' + total + 'æ¡' |
| | | }, |
| | | showQuickJumper: true, |
| | | showSizeChanger: true, |
| | | total: 0 |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | }, |
| | | methods: { |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | loadData(arg) { |
| | | if (!this.url.list) { |
| | | this.$message.error("请设置url.list屿§!") |
| | | return |
| | | } |
| | | //å è½½æ°æ® è¥ä¼ å
¥åæ°1åå 载第ä¸é¡µçå
容 |
| | | if (arg === 1) { |
| | | this.ipagination.current = 1; |
| | | } |
| | | var params = this.getQueryParams();//æ¥è¯¢æ¡ä»¶ |
| | | 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; |
| | | } |
| | | //update-end---author:zhangyafei Date:20201118 forï¼éé
ä¸åé¡µçæ°æ®å表------------ |
| | | } else { |
| | | this.$message.warning(res.message) |
| | | } |
| | | }).finally(() => { |
| | | this.loading = false |
| | | }) |
| | | }, |
| | | |
| | | |
| | | } |
| | | } |
| | | </script> |
| | | <style lang="less" scoped> |
| | | @import '~@assets/less/common.less'; |
| | | |
| | | .fontweight { |
| | | font-weight: bold; |
| | | } |
| | | |
| | | /deep/ .frozenRowClass { |
| | | color: #c9c9c9; |
| | | } |
| | | |
| | | .success { |
| | | color: green; |
| | | } |
| | | |
| | | .error { |
| | | color: red; |
| | | } |
| | | </style> |