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/sparePartCancellingStocks/SparePartCancellingStocksDetailList.vue | 245 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 245 insertions(+), 0 deletions(-) diff --git a/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksDetailList.vue b/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksDetailList.vue new file mode 100644 index 0000000..ff12c3a --- /dev/null +++ b/src/views/spare/modules/sparePartCancellingStocks/SparePartCancellingStocksDetailList.vue @@ -0,0 +1,245 @@ +<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('璇疯缃畊rl.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> -- Gitblit v1.9.3