| | |
| | | <script setup> |
| | | import {computed, onMounted, reactive, ref, watch} from "vue"; |
| | | import {addListener,destroyAreaBox} from "@/hook/mouseMoveHomePage"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {useI18n} from "vue-i18n" |
| | | import request from "@/utils/request" |
| | | import {ElMessage} from "element-plus" |
| | | import VxeUI from "vxe-pc-ui"; |
| | | import {copyTableCellValue,copyTableCellValueShow} from "@/hook/copyTableCellValue"; |
| | | const { t } = useI18n() |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | }, |
| | | mouseConfig:{selected: true}, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | |
| | | ] |
| | | } |
| | | }) |
| | | const gridEvents = { |
| | | cellDblclick ({row,column}) { |
| | | if(orderType.value===1){ |
| | | copyTableCellValue(row,column) |
| | | }else{ |
| | | copyTableCellValueShow(row,column) |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | const list = ref([]) |
| | | |
| | | let props = defineProps({ |
| | |
| | | {field: 'glassQuantity', width: 90,title: t('order.glassQuantity')}, |
| | | {field: 'grossArea',slots: { default: 'show'}, width: 90,title: t('order.area')}, |
| | | {field: 'shippedQuantity',slots: { default: 'show'},width: 120, title: t('delivery.deliveryQuantity')}, |
| | | {field: 'shippedArea',slots: { default: 'show'},width: 120, title: t('report.shippedArea')}, |
| | | {field: 'Storage',slots: { default: 'show'},width: 120, title: t('report.inventoryNum')}, |
| | | // {field: 'inventoryArea',slots: { default: 'show'},width: 120, title: t('report.inventoryArea')}, |
| | | {field: 'StorageArea',slots: { default: 'show'},width: 120, title: t('report.StorageArea')}, |
| | | {field: 'broken_num',width: 90, title: t('reportingWorks.quantityBroken')}, |
| | | ] |
| | | let column = [0,1,3,8,10,11,12,14] |
| | | let column = [0,1,3,8,10,11,12,13,14] |
| | | let orderType = ref(1) |
| | | |
| | | onMounted(()=>{ |
| | | getWorkOrder() |
| | | //addListener(xGrid.value,gridOptions) |
| | | }) |
| | | |
| | | watch(()=>props.orderId,(newValue)=>{ |
| | |
| | | gridOptions.columns.forEach(item =>{ |
| | | item.filterMethod = filterChanged |
| | | }) |
| | | list.value = ['quantity','Storage','gross_area','shippedQuantity','glassQuantity','StorageArea'] |
| | | list.value = ['quantity','Storage','gross_area','shippedQuantity','shippedArea','glassQuantity','StorageArea'] |
| | | title.value = res.data.title |
| | | res.data.title.forEach((item,index) =>{ |
| | | list.value.push('reportWorkQuantity.'+item.process) |
| | |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | > |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | |
| | | ::v-deep(.vxe-grid .vxe-body--column.row-green) { |
| | | background-color: #D5EAFF; |
| | | } |
| | | .vxe-grid { |
| | | /* 禁用浏览器默认选中 */ |
| | | -webkit-user-select: none; |
| | | -moz-user-select: none; |
| | | -ms-user-select: none; |
| | | user-select: none; |
| | | transform: translateZ(0); |
| | | } |
| | | |
| | | </style> |
| New file |
| | |
| | | import VxeUI from "vxe-pc-ui"; |
| | | |
| | | function copyTableCellValueShow(row, column) { |
| | | if(column.field.indexOf('.')>-1){ |
| | | let array = column.field.split('.') |
| | | if (row[array[0]][array[1]+'Show']!==null){ |
| | | VxeUI.clipboard.copy(row[array[0]+'Show'][array[1]]) |
| | | } |
| | | |
| | | }else { |
| | | if (row[column.field+'Show']!==null){ |
| | | VxeUI.clipboard.copy(row[column.field+'Show']) |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | function copyTableCellValue(row, column) { |
| | | if(column.field.indexOf('.')>-1){ |
| | | let array = column.field.split('.') |
| | | if (row[array[0]][array[1]]!==null){ |
| | | VxeUI.clipboard.copy(row[array[0]][array[1]]) |
| | | } |
| | | |
| | | }else { |
| | | if (row[column.field]!==null){ |
| | | VxeUI.clipboard.copy(row[column.field]) |
| | | } |
| | | |
| | | } |
| | | } |
| | | export {copyTableCellValue,copyTableCellValueShow} |
| | |
| | | finished :'معدل المنتجات النهائية', |
| | | finishedProductReport :'تقرير المنتجات النهائية', |
| | | workProcessName:'在制品名称', |
| | | StorageArea:'入库面积' |
| | | StorageArea:'入库面积', |
| | | shippedArea:'发货面积' |
| | | }, |
| | | productionBasicData:{ |
| | | page:{ |
| | |
| | | finished :'Rate of finished product', |
| | | finishedProductReport :'Finished product report', |
| | | workProcessName:'在制品名称', |
| | | StorageArea:'入库面积' |
| | | StorageArea:'入库面积', |
| | | shippedArea:'发货面积' |
| | | }, |
| | | productionBasicData:{ |
| | | page:{ |
| | |
| | | finished :'양품률', |
| | | finishedProductReport :'완제품 보고서', |
| | | workProcessName:'在制品名称', |
| | | StorageArea:'入库面积' |
| | | StorageArea:'入库面积', |
| | | shippedArea:'发货面积' |
| | | }, |
| | | productionBasicData:{ |
| | | page:{ |
| | |
| | | finished :'Коэффициент готовой продукции', |
| | | finishedProductReport :'Отчет о готовой продукции', |
| | | workProcessName:'在制品名称', |
| | | StorageArea:'入库面积' |
| | | StorageArea:'入库面积', |
| | | shippedArea:'发货面积' |
| | | }, |
| | | productionBasicData:{ |
| | | page:{ |
| | |
| | | finished :'成品率', |
| | | finishedProductReport :'成品报表', |
| | | workProcessName:'在制品名称', |
| | | StorageArea:'入库面积' |
| | | StorageArea:'入库面积', |
| | | shippedArea:'发货面积' |
| | | |
| | | }, |
| | | productionBasicData:{ |
| | |
| | | id="print" |
| | | v-model="dialogTableVisible" |
| | | destroy-on-close |
| | | style="width: 400px;height:40%;" |
| | | style="width: 400px;height:280px;margin-top: 200px" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | > |
| | | <el-form |
| | | ref="ruleFormRef" |
| | | style="max-width: 600px" |
| | | style="max-width: 600px;" |
| | | :model="ruleForm" |
| | | status-icon |
| | | :rules="rules" |
| | |
| | | c.quantity-ifnull(c.termination_quantity,0) as glassQuantity, |
| | | |
| | | c.quantity-ifnull(c.termination_quantity,0) as quantityShow, |
| | | (c.quantity-ifnull(c.termination_quantity,0))*a.compute_area as grossAreaShow, |
| | | round( (c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2) as grossAreaShow, |
| | | ifnull(c.received_quantity, 0) as StorageShow, |
| | | ifnull(dd.quantity, 0) as shippedQuantityShow, -- 发货数量 |
| | | (ifnull(c.received_quantity, 0))*a.compute_area as StorageAreaShow,-- 入库面积 |
| | | round(ifnull(dd.quantity, 0)*a.compute_area,2) as shippedAreaShow, -- 发货面积 |
| | | round((ifnull(c.received_quantity, 0))*a.compute_area,2) as StorageAreaShow,-- 入库面积 |
| | | |
| | | if(c.technology_number=1,(c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,0) as grossArea, |
| | | if(c.technology_number=1, round((c.quantity-ifnull(c.termination_quantity,0))*a.compute_area,2),0) as grossArea, |
| | | if(c.technology_number=1,ifnull(c.received_quantity, 0) ,0) as Storage, |
| | | if(c.technology_number=1,ifnull(dd.quantity, 0) ,0) as shippedQuantity, |
| | | if(c.technology_number=1,(ifnull(c.received_quantity, 0))*a.compute_area,0) as StorageArea, |
| | | if(c.technology_number=1,round(ifnull(dd.quantity, 0)*a.compute_area,2),0) as shippedArea, |
| | | if(c.technology_number=1, round((ifnull(c.received_quantity, 0))*a.compute_area,2),0) as StorageArea, |
| | | |
| | | |
| | | ifnull(JSON_UNQUOTE(JSON_EXTRACT(a.other_columns, '$.S01')),'') AS glassNumber, |