| | |
| | | <script setup> |
| | | import {onMounted, reactive, ref, watch} from "vue"; |
| | | import {computed, onMounted, reactive, ref, watch} from "vue"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import footSum from "@/hook/footSum" |
| | | import {useI18n} from "vue-i18n" |
| | | import request from "@/utils/request" |
| | | import {ElMessage} from "element-plus" |
| | |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | showOverflow:true, |
| | | showFooter: true,//显示脚 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | virtualScroll: true, // 开启虚拟滚动功能 |
| | | id: 'Order_Process', |
| | |
| | | } |
| | | return null |
| | | }, |
| | | |
| | | |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | if (list.value.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | }) |
| | | const list = ref([]) |
| | | |
| | | let props = defineProps({ |
| | | orderId:null |
| | |
| | | {field: 'glass_child',width: 130, title: t('reportingWorks.glassChild') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order_type', width: 120,title: t('order.orderType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'process_id',width: 110, title: t('processCard.processId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | |
| | | {field: 'technology_number', width: 90,title: t('processCard.technologyNumber'),showOverflow:"ellipsis"}, |
| | | {field: 'quantity', width: 90,title: t('order.quantity')}, |
| | | {field: 'gross_area', width: 90,title: t('order.area')}, |
| | |
| | | getWorkOrder() |
| | | }) |
| | | |
| | | |
| | | |
| | | const getWorkOrder = () => { |
| | | request.post(`/report/processCardProgress/${props.orderId}`,column).then((res) => { |
| | | request.post(`/report/processCardProgress/${props.orderId}`,column).then(async (res) => { |
| | | if (res.code == 200) { |
| | | |
| | | gridOptions.columns = JSON.parse(JSON.stringify(columns)) |
| | | gridOptions.columns.forEach(item =>{ |
| | | item.filterMethod = filterChanged |
| | | }) |
| | | res.data.title.forEach(item =>{ |
| | | let column = {slots: { default: 'quantitySum' }, width: 90,title: item.process} |
| | | list.value = ['quantity'] |
| | | res.data.title.forEach((item,index) =>{ |
| | | list.value.push('reportWorkQuantity.'+item.process) |
| | | let column = {slots: { default: 'quantitySum'}, |
| | | width: 90, |
| | | title: item.process, |
| | | field:'reportWorkQuantity.'+item.process} |
| | | gridOptions.columns.push(column) |
| | | }) |
| | | res.data.data.forEach(item => { |
| | |
| | | item.reportWorkQuantityCount=JSON.parse(item.reportWorkQuantityCount) |
| | | }) |
| | | //gridOptions.mergeCells= res.data.mergeCells |
| | | xGrid.value.loadData(res.data.data) |
| | | await xGrid.value.loadData(res.data.data) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |