¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <a-card |
| | | :bordered='false' |
| | | :class="'cust-erp-sub-tab'" |
| | | > |
| | | <!-- æ¥è¯¢åºå --> |
| | | <div class='table-page-search-wrapper'> |
| | | <a-form |
| | | layout='inline' |
| | | @keyup.enter.native='searchQuery' |
| | | > |
| | | <a-row :gutter='24'> |
| | | </a-row> |
| | | </a-form> |
| | | </div> |
| | | <div> |
| | | <a-table |
| | | ref='table' |
| | | size='middle' |
| | | bordered |
| | | rowKey='id' |
| | | :scroll="{ x: 'calc(1400px + 50%)', y: 900 }" |
| | | :columns='columns' |
| | | :dataSource='dataSource' |
| | | :pagination='ipagination' |
| | | :loading='loading' |
| | | @change='handleTableChange' |
| | | > |
| | | <span |
| | | slot='status' |
| | | slot-scope='text, record' |
| | | > |
| | | <span v-if="record.status == '0'">æªå
¥åº</span> |
| | | <span |
| | | v-if="record.status == '1'" |
| | | style='color: red' |
| | | >å·²å
¥åº</span> |
| | | </span> |
| | | |
| | | <span slot='action' slot-scope='text, record'> |
| | | <a-popconfirm v-if="record.cancellingStatus === '2' && record.status == 0" title='ç¹å»ç¡®è®¤åï¼å°ç´æ¥ä¸æ¶ä¿®æ¹åºå?' |
| | | @confirm='() => handleGround(record)'> |
| | | <a>䏿¶</a> |
| | | </a-popconfirm> |
| | | </span> |
| | | </a-table> |
| | | </div> |
| | | </a-card> |
| | | </template> |
| | | |
| | | <script> |
| | | import { JeecgListMixin } from '@/mixins/JeecgListMixin' |
| | | import { getAction, requestPut } from '@/api/manage' |
| | | import Tooltip from 'ant-design-vue/es/tooltip' |
| | | |
| | | export default { |
| | | name: 'SparePartCancellingStocksDetailList', |
| | | mixins: [JeecgListMixin], |
| | | components: { |
| | | Tooltip |
| | | }, |
| | | props: { |
| | | sparePartCancellingId: { |
| | | type: String, |
| | | default: '-1', |
| | | required: false |
| | | } |
| | | }, |
| | | watch: { |
| | | sparePartCancellingId: { |
| | | immediate: true, |
| | | handler(val) { |
| | | if (!this.sparePartCancellingId) { |
| | | this.clearList() |
| | | } else { |
| | | this.queryParam['sparePartCancellingId'] = val |
| | | this.loadData(1) |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | columns: [ |
| | | { |
| | | title: '#', |
| | | dataIndex: '', |
| | | key: 'rowIndex', |
| | | width: 60, |
| | | align: 'center', |
| | | customRender: function(t, r, index) { |
| | | return parseInt(index) + 1 |
| | | } |
| | | }, |
| | | { |
| | | title: 'ç¶æ', |
| | | align: 'center', |
| | | dataIndex: 'status', |
| | | scopedSlots: { customRender: 'status' } |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶ç¼ç ', |
| | | align: 'center', |
| | | dataIndex: 'num' |
| | | }, |
| | | { |
| | | title: 'å¤ä»¶åç§°', |
| | | align: 'center', |
| | | dataIndex: 'name' |
| | | }, |
| | | { |
| | | title: 'åå·', |
| | | align: 'center', |
| | | dataIndex: 'model' |
| | | }, |
| | | { |
| | | title: 'è§æ ¼', |
| | | align: 'center', |
| | | dataIndex: 'specification' |
| | | |
| | | }, |
| | | { |
| | | title: 'æ¹æ¬¡å·', |
| | | align: 'center', |
| | | dataIndex: 'batchNum' |
| | | |
| | | }, |
| | | { |
| | | 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: 'mainUnitName' |
| | | }, |
| | | /* { |
| | | title: 'è¾
åä½', |
| | | align: 'center', |
| | | dataIndex: 'auxiliaryUnitName' |
| | | }, */ |
| | | { |
| | | title: 'åºåºæ°é', |
| | | align: 'center', |
| | | dataIndex: 'outboundMainQuantity' |
| | | }, |
| | | { |
| | | title: 'éåºæ°é', |
| | | align: 'center', |
| | | dataIndex: 'mainQuantity' |
| | | }, |
| | | { |
| | | title: 'åºåº', |
| | | align: 'center', |
| | | dataIndex: 'warehouseAreaName' |
| | | }, |
| | | { |
| | | title: 'åºä½', |
| | | align: 'center', |
| | | dataIndex: 'warehouseLocationNum' |
| | | }, |
| | | { |
| | | title: 'æä½', |
| | | dataIndex: 'action', |
| | | align: 'center', |
| | | fixed: 'right', |
| | | scopedSlots: { customRender: 'action' }, |
| | | width: 150 |
| | | } |
| | | ], |
| | | url: { |
| | | list: '/spare/sparePartCancellingStocks/getSparePartCancellingStocksDetailsById', |
| | | ground: '/spare/sparePartCancellingStocks/sparePartGround' |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | clearList() { |
| | | this.dataSource = [] |
| | | this.selectedRowKeys = [] |
| | | this.ipagination.current = 1 |
| | | }, |
| | | handleGround(record) { |
| | | const that = this |
| | | requestPut(that.url.ground, record).then((res) => { |
| | | console.log(record) |
| | | if (res.success) { |
| | | that.$message.success('å
¥åºæå!') |
| | | that.$bus.$emit('outGroundSuccess', 1) |
| | | that.loadData() |
| | | } else { |
| | | that.$message.warning('å
¥åºå¤±è´¥!') |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | |
| | | |
| | | |
| | | 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 scoped> |
| | | @import '~@assets/less/common.less'; |
| | | </style> |