| | |
| | | <script lang="ts" setup> |
| | | import {reactive, ref} from 'vue' |
| | | <script setup> |
| | | import BasicTable from "@/components/BrokenReportTemplate.vue" |
| | | import request from "@/utils/request" |
| | | import { ref} from "vue" |
| | | import {useI18n} from "vue-i18n"; |
| | | const {t} = useI18n() |
| | | const childrenData = ref({ |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'orderId', width: 120, title: t('order.orderId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | | { |
| | | field: 'project', |
| | | width: 120, |
| | | title: t('order.project'), |
| | | showOverflow: "ellipsis", |
| | | filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | | {field: 'batch', width: 90, title: t('order.batch')}, |
| | | { |
| | | field: 'processId', width: 130, title: t('processCard.processId'), filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | | { |
| | | field: 'orderNumber', width: 120, title: t('order.OrderNum'),filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | | {field: 'glassNumber', width: 160,title: t('reportingWorks.glassNumber') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | |
| | | |
| | | |
| | | |
| | | const defaultTime = ref<[Date, Date]>([ |
| | | new Date(2000, 1, 1, 0, 0, 0), |
| | | new Date(2000, 2, 1, 23, 59, 59), |
| | | ]) |
| | | // do not use same name with ref |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | { |
| | | field: 'technologyNumber', width: 100, title: t('processCard.technologyNumber'), filters:[{ data: '' }],slots: { filter: 'num1_filter' } |
| | | }, |
| | | { |
| | | field: 'reportingWorkTime', |
| | | width: 100, |
| | | title: t('reportingWorks.reportingWorkTime'), |
| | | type: 'date', |
| | | attrs: {placeholder: '', type: 'date'}, |
| | | }, |
| | | {field: 'responsibleProcess', width: 120, title: t('reportingWorks.responsibleProcess'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, showOverflow: "ellipsis"}, |
| | | {field: 'responsibleTeam', width: 100, title: t('reportingWorks.responsibleTeam'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'responsibleEquipment', width: 120, title: t('reportingWorks.responsibleEquipment'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'breakageType', width: 120, title: t('reportingWorks.breakageType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'breakageReason', width: 120, title: t('reportingWorks.breakageReason'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'thisProcess',width: 120, title: t('reportingWorks.reportingProcess'), sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'creator',width: 120, title: t('product.creator'), sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'childWidth', width: 100, title: t('order.width'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'childHeight', width: 100, title: t('order.height'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'thickness',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 90, title: t('order.totalThickness')}, |
| | | {field: 'breakageQuantity', width: 120, title: t('reportingWorks.quantityBroken')}, |
| | | {field: 'area', width: 120, title: t('reportingWorks.wornArea')}, |
| | | {field: 'personnel', width: 120, title: t('reportingWorks.responsiblePersonnel')}, |
| | | {field: 'glassChild', width: 120, title: t('reportingWorks.glassChild'), filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'reportingWorkId', width: 100,title: t('reportingWorks.reportingWorkId'),filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | ],//表格表头字段 |
| | | data:[],//表格数据 |
| | | url :'/report/damageReport', |
| | | exportUrl :'/report/exportDamageReport', |
| | | exportName:t('report.secondaryBrokenTotal'), |
| | | footList:['breakageQuantity','area'] |
| | | }) |
| | | |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: 'Option1', |
| | | label: 'Option1', |
| | | }, |
| | | { |
| | | value: 'Option2', |
| | | label: 'Option2', |
| | | }, |
| | | { |
| | | value: 'Option3', |
| | | label: 'Option3', |
| | | }, |
| | | ] |
| | | const tableData = [ |
| | | { |
| | | 1:'2023-01-01', |
| | | 2:'钢化', |
| | | 3:'钢化一班', |
| | | 4:'黑金刚', |
| | | 5:'机器', |
| | | 6:'1 ', |
| | | 7:'3.14', |
| | | 8:'89', |
| | | 9:'奔向幕墙', |
| | | 10:'一批', |
| | | 11:'NG20010101', |
| | | 12:'6mm超白平钢', |
| | | 13:'北方', |
| | | |
| | | }, |
| | | ] |
| | | </script> |
| | | <!--次破报表--> |
| | | |
| | | <template> |
| | | <div class="div-main"> |
| | | <div id="selectForm"> |
| | | <el-row :gutter="0"> |
| | | <!-- <el-input placeholder="班组名称" v-model="form.name" style="width: 200px"/>--> |
| | | <!-- --> |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | :default-time="defaultTime" |
| | | /> |
| | | |
| | | <el-select v-model="value" class="m-2" placeholder="查询类型"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <el-button type="primary">查询</el-button> |
| | | </el-row> |
| | | |
| | | </div> |
| | | <div> |
| | | <el-table :data="tableData" border style="width: 100%" height="100%"> |
| | | <el-table-column prop="1" label="报工时间" /> |
| | | <el-table-column prop="2" label="工序"/> |
| | | <el-table-column prop="3" label="责任班组" :show-overflow-tooltip='true' /> |
| | | <el-table-column prop="4" label="责任设备" /> |
| | | <el-table-column prop="5" label="次破原因" /> |
| | | <el-table-column prop="6" label="次破数量" /> |
| | | <el-table-column prop="7" label="次破面积"/> |
| | | <el-table-column prop="8" label="成品率"/> |
| | | <el-table-column prop="9" label="项目名称" :show-overflow-tooltip='true' /> |
| | | <el-table-column prop="10" label="批次" /> |
| | | <el-table-column prop="11" label="销售单号" width="120px" /> |
| | | <el-table-column prop="12" label="单品名称" :show-overflow-tooltip='true' width="150px" /> |
| | | <el-table-column prop="13" label="产地" /> |
| | | </el-table><!-- <h1>{{msg}}</h1> --> |
| | | </div> |
| | | |
| | | </div> |
| | | <basic-table |
| | | :childrenData="childrenData"/> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .div-main{ |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | #selectForm { |
| | | width: 70%; |
| | | text-align: center; |
| | | } |
| | | </style> |