| | |
| | | <script setup> |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | alert('我接收到子组件传送的反审状态') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | import {onMounted, reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElCheckbox, ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import footSum from "@/hook/footSum" |
| | | import {addListener} from "@/hook/mouseMove"; |
| | | import {VxeUI} from "vxe-pc-ui"; |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | let filterData = ref({}) |
| | | //提交的表单 |
| | | const form = reactive({ |
| | | date1: '', |
| | | orderId: '', |
| | | project: '' |
| | | }) |
| | | |
| | | //工序 |
| | | const valueProcess = ref() |
| | | //终止状态 |
| | | let terminationVal = ref(1) |
| | | |
| | | //根据以下字段汇总查询 |
| | | const stateValue = ref('') |
| | | const stateOptions = [ |
| | | { |
| | | value: 1, |
| | | label: t('order.orderId'), |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: t('processCard.processId'), |
| | | }, |
| | | // { |
| | | // value: 3, |
| | | // label: t('order.project'), |
| | | // }, |
| | | { |
| | | value: 4, |
| | | label: t('processCard.technologyNumber'), |
| | | }, |
| | | ] |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | //定义滚动条高度 |
| | | let scrollTop = ref(null) |
| | | let scrollHeight = ref(null) |
| | | let clientHeight = ref(null) |
| | | const scrollEvnt = (row) => { |
| | | // 内容高度 |
| | | scrollTop.value = row.$event.target.scrollTop |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = ref(1) |
| | | let pageState = null |
| | | |
| | | onMounted(() => { |
| | | //启用表格拖动选中 |
| | | addListener(xGrid.value, gridOptions) |
| | | }) |
| | | |
| | | //第一次加载 |
| | | let selectProcesses = valueProcess.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | let total = reactive({ |
| | | pageTotal: 0, |
| | | dataTotal: 0, |
| | | pageSize: 100 |
| | | }) |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | | }) |
| | | let optionVal=stateValue.value |
| | | if (optionVal == '') { |
| | | optionVal = null |
| | | } |
| | | //第一次加载数据 |
| | | request.post(`/report/workInProgressCombinationProcess/1/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | // total.dataTotal = res.data.total.total*1 |
| | | // total.pageTotal= res.data.total.pageTotal |
| | | // pageTotal.value = res.data.total |
| | | total.value = res.data.total |
| | | //produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.processType = res.data.process |
| | | titleSelectJson.value.processType.splice(0,1) |
| | | //xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //页脚翻页查询 |
| | | const selectPageList = () => { |
| | | let inputVal = form.orderId |
| | | let selectProcesses = valueProcess.value |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | let optionVal=stateValue.value |
| | | if (optionVal == '') { |
| | | optionVal = null |
| | | } |
| | | let terminationVals = terminationVal.value |
| | | if (terminationVals == '') { |
| | | terminationVals = null |
| | | } |
| | | request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | total.value = res.data.total |
| | | produceList = deepClone(res.data.data) |
| | | produceList.forEach(item => { |
| | | // 如果 shape 可能是字符串就用 ==,如果一定是数字就用 === |
| | | item.shape = (item.shape == 2) ? t('order.alien') : t('order.universalShape'); |
| | | }); |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | gridOptions.loading = true |
| | | let selectProcesses = valueProcess.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | let optionVal=stateValue.value |
| | | if (optionVal == '') { |
| | | optionVal = null |
| | | } |
| | | let terminationVals = terminationVal.value |
| | | if (terminationVals == '') { |
| | | terminationVals = null |
| | | } |
| | | request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | total.value = res.data.total; |
| | | total.dataTotal = res.data.total.total * 1; |
| | | total.pageTotal = res.data.total.pageTotal; |
| | | pageTotal.value = res.data.total; |
| | | res.data.data.forEach(item => { |
| | | // 如果 shape 可能是字符串就用 ==,如果一定是数字就用 === |
| | | item.shape = (item.shape == 2) ? t('order.alien') : t('order.universalShape'); |
| | | }); |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | //handleUpdateData(produceList) |
| | | }) |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({currentPage, pageSize}) => { |
| | | pageNum.value = currentPage |
| | | total.pageTotal = pageSize |
| | | selectPageList() |
| | | } |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | function filterChanged(column){ |
| | | gridOptions.loading = true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0]!=undefined?column.datas[0]:'' |
| | | value = value.trim() |
| | | //判断是否存在外键 |
| | | if (column.property.indexOf('.')>-1){ |
| | | const columnArr = column.property.split('.') |
| | | filterData.value[columnArr[0]] = { |
| | | [columnArr[1]]:value |
| | | } |
| | | }else{ |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | let selectProcesses = valueProcess.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | let optionVal=stateValue.value |
| | | if (optionVal == '') { |
| | | optionVal = null |
| | | } |
| | | let terminationVals = terminationVal.value |
| | | if (terminationVals == '') { |
| | | terminationVals = null |
| | | } |
| | | request.post(`/report/workInProgress/${pageNum.value}/${total.pageSize}/${inputVal}/${inputProject}/${selectProcesses}/${optionVal}/${terminationVals}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | total.value = res.data.total; |
| | | total.dataTotal = res.data.total.total * 1; |
| | | total.pageTotal = res.data.total.pageTotal; |
| | | pageTotal.value = res.data.total; |
| | | produceList = deepClone(res.data.data) |
| | | produceList.forEach(item => { |
| | | // 如果 shape 可能是字符串就用 ==,如果一定是数字就用 === |
| | | item.shape = (item.shape == 2) ? t('order.alien') : t('order.universalShape'); |
| | | }); |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | //handleUpdateData(produceList) |
| | | }) |
| | | |
| | | |
| | | } |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'WorkInProgress', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | scrollY: {enabled: true},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: '1', width: 120, title: '工序',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: '2',width: 120, title: '流程卡号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '3', width: 130,title: '客户名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '4',width: 120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '5', width: 100,title: '批次', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: '6', width: 100,title: '序号', sortable: true}, |
| | | {field: '7',width: 100, title: '形状', sortable: true}, |
| | | {field: '8',width: 120, title: '楼层编号', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: '9', width: 120,title: '工艺流程', sortable: true}, |
| | | {field: '10', width: 120,title: '订单数', sortable: true}, |
| | | {field: '11',width: 120, title: '宽', sortable: true}, |
| | | {field: '12',width: 120, title: '高', sortable: true}, |
| | | {field: '13',width: 120, title: '库存数', sortable: true}, |
| | | {field: '14',width: 120, title: '库存面积', sortable: true}, |
| | | {field: '15',width: 120, title: '成品名称', sortable: true}, |
| | | {field: '16',width: 120, title: '在制品名称', sortable: true}, |
| | | {field: '17',width: 120, title: '弯钢半径', sortable: true}, |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'thisProcess', width: 120, title: t('report.workingProcedure'), |
| | | visible: true,filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | |
| | | }, |
| | | { |
| | | field: 'orderId', |
| | | width: 120, |
| | | title: t('order.orderId'), |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | visible: true |
| | | }, |
| | | { |
| | | field: 'processId', |
| | | width: 140, |
| | | title: t('processCard.processId'), |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | visible: true |
| | | }, |
| | | { |
| | | field: 'customerName', width: 130, title: t('customer.customerName'), filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | visible: true |
| | | }, |
| | | { |
| | | field: 'project', width: 120, title: t('order.project'), filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | visible: true |
| | | }, |
| | | { |
| | | field: 'batch', width: 100, title: t('order.batch'), filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | visible: true |
| | | }, |
| | | {field: 'glassNumber', width: 110,title: t('reportingWorks.glassNumber'),showOverflow:"ellipsis",filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}}, |
| | | {field: 'orderNumber', width: 100, title: t('order.OrderNum'),visible: true,filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, showOverflow: "ellipsis"}, |
| | | {field: 'technologyNumber', width: 120, title: t('processCard.technologyNumber'),filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, showOverflow: "ellipsis",visible: true}, |
| | | {field: 'shape', width: 100, title: t('order.shape'),visible: true}, |
| | | {field: 'process', width: 120, title: t('craft.process'),visible: true}, |
| | | {field: 'quantity', width: 120, title: t('order.quantity'),visible: true,filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'},}, |
| | | {field: 'childWidth', width: 120, title: t('order.width'),visible: true,filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'},}, |
| | | {field: 'childHeight', width: 120, title: t('order.height'),visible: true,filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'},}, |
| | | {field: 'thickness',width: 90, title: t('order.totalThickness'),visible: true}, |
| | | {field: 'stockNum', width: 120, title: t('productStock.inventoryQuantity'),visible: true,filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'},}, |
| | | {field: 'stockArea', width: 120, title: t('report.inventoryArea'),visible: true,filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'},}, |
| | | {field: 'productName', width: 120, title: t('order.product'),visible: true}, |
| | | {field: 'glassName', width: 120, title: t('report.workProcessName'),visible: true}, |
| | | {field: 'bendRadius', width: 120, title: t('order.bendRadius'),visible: true}, |
| | | {field: 'teamsGroupsName', width: 110,title: t('report.teamsGroupsName'),showOverflow:"ellipsis",filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 1:'磨边', |
| | | 2:'NG22091906A02/1', |
| | | 3:'中国建筑装饰集团有限公司', |
| | | 4:'银川绿地中心南塔(25批2)', |
| | | 5:'25批2', |
| | | 6:'形状', |
| | | 7:'2', |
| | | 8:'25-BL19', |
| | | 9:'切割->镀膜->磨边->钢化->包装', |
| | | 10:'40', |
| | | 11:'1345', |
| | | 12:'1556', |
| | | 13:'1', |
| | | 14:'1.99', |
| | | 15:'8mm超白【LYTM-46】平钢', |
| | | 16:'8mm超白【LYTM-46】平钢', |
| | | 17:'0', |
| | | |
| | | }, |
| | | { |
| | | 1:'磨边', |
| | | 2:'NG22091906A02/1', |
| | | 3:'中国建筑装饰集团有限公司', |
| | | 4:'银川绿地中心南塔(25批2)', |
| | | 5:'25批2', |
| | | 6:'形状', |
| | | 7:'2', |
| | | 8:'25-BL19', |
| | | 9:'切割->镀膜->磨边->钢化->包装', |
| | | 10:'40', |
| | | 11:'1345', |
| | | 12:'1556', |
| | | 13:'1', |
| | | 14:'1.99', |
| | | 15:'8mm超白【LYTM-46】平钢', |
| | | 16:'8mm超白【LYTM-46】平钢', |
| | | 17:'0', |
| | | |
| | | }, |
| | | { |
| | | 1:'磨边', |
| | | 2:'NG22091906A02/1', |
| | | 3:'中国建筑装饰集团有限公司', |
| | | 4:'银川绿地中心南塔(25批2)', |
| | | 5:'25批2', |
| | | 6:'形状', |
| | | 7:'2', |
| | | 8:'25-BL19', |
| | | 9:'切割->镀膜->磨边->钢化->包装', |
| | | 10:'40', |
| | | 11:'1345', |
| | | 12:'1556', |
| | | 13:'1', |
| | | 14:'1.99', |
| | | 15:'8mm超白【LYTM-46】平钢', |
| | | 16:'8mm超白【LYTM-46】平钢', |
| | | 17:'0', |
| | | |
| | | }, |
| | | ],//table body实际数据 |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['finishedNumber','finishedArea','wornNumber','wornArea'] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | return t('basicData.total') |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | const List = ["quantity",'stockNum','stockArea',] |
| | | if (List.includes(column.field)) { |
| | | //return footSum(data, column.field) |
| | | return total.value?.[column.field] ?? 0 |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | }, |
| | | |
| | | }) |
| | | |
| | | function exportExcel(url, fileName,date) { |
| | | let processes = valueProcess.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | let terminationVals = terminationVal.value |
| | | if (terminationVals == '') { |
| | | terminationVals = null |
| | | } |
| | | if(date===null){ |
| | | ElMessage.warning(t('report.pleaseSelectADateFirst')) |
| | | return |
| | | } |
| | | |
| | | }) |
| | | if(processes===null){ |
| | | ElMessage.warning(t('report.pleaseSelectAProcessFirst')) |
| | | return |
| | | } |
| | | gridOptions.loading = true |
| | | const date1 = new Date(date[0]); |
| | | const date2 = new Date(date[1]); |
| | | const timeDiff = Math.abs(date2.getTime() - date1.getTime()); |
| | | const daysDiff = timeDiff / (1000 * 3600 * 24); |
| | | if(Math.floor(daysDiff)>180){ |
| | | ElMessage.warning(t('report.theFilteringTimeForExportCannotExceed180Days')) |
| | | return |
| | | } |
| | | let dataMp = ref({ |
| | | date: date, |
| | | processes: processes, |
| | | orderId: inputVal, |
| | | project: inputProject, |
| | | terminationVals:terminationVals |
| | | }) |
| | | request.post(url,dataMp.value,{responseType :'blob'}).then(res => { |
| | | const blob = new Blob([res]) |
| | | if ('download' in document.createElement('a')) { // 非IE下载 |
| | | const elink = document.createElement('a') |
| | | elink.download = `${fileName}.xlsx` |
| | | elink.style.display = 'none' |
| | | elink.href = URL.createObjectURL(blob) |
| | | document.body.appendChild(elink) |
| | | elink.click() |
| | | URL.revokeObjectURL(elink.href) // 释放URL 对象 |
| | | document.body.removeChild(elink) |
| | | gridOptions.loading = false |
| | | } else { // IE10+下载 |
| | | navigator.msSaveBlob(blob, fileName) |
| | | } |
| | | |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: 'Option1', |
| | | label: 'Option1', |
| | | }, |
| | | { |
| | | value: 'Option2', |
| | | label: 'Option2', |
| | | }, |
| | | { |
| | | value: 'Option3', |
| | | label: 'Option3', |
| | | }, |
| | | ] |
| | | }) |
| | | } |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | const handleUpdateData = (data) =>{ |
| | | |
| | | }) |
| | | // const usedColumns = new Set(); |
| | | // data.forEach(row => { |
| | | // Object.keys(row).forEach(key => { |
| | | // usedColumns.add(key); |
| | | // }); |
| | | // }); |
| | | // // 更新 columns 数组的 visible 属性来控制列的显示 |
| | | // gridOptions.columns.forEach(column => { |
| | | // |
| | | // column.visible = usedColumns.has(column.field); |
| | | // }); |
| | | |
| | | //const columns = gridOptions.columns; |
| | | // const ageColumn = columns.find(col => col.property === 'age'); |
| | | // if (ageColumn) { |
| | | // ageColumn.visible = !ageColumn.visible; |
| | | // VXETable.updateColumns(tableRef.value, columns); |
| | | // } |
| | | } |
| | | |
| | | const handleCellDblClick = ({ row, column, cell, $event }) => { |
| | | VxeUI.clipboard.copy(row[column.property]) |
| | | } |
| | | function onlandingTerminationChange(checked) { |
| | | terminationVal.value = checked ? 0 : 1 |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <div id="selectForm"> |
| | | <el-row :gutter="0"> |
| | | <!-- <el-input placeholder="销售单号" v-model="form.name" style="width: 150px"/>--> |
| | | <!-- <el-input placeholder="项目名称" v-model="form.name" style="width: 150px"/>--> |
| | | <div style="width: 100%;height: 100%"> |
| | | <div class="head"> |
| | | |
| | | <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 130px;display: none"></el-input> |
| | | |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | :default-time="defaultTime" |
| | | style="width: 100px" |
| | | /> |
| | | |
| | | <el-select v-model="value" class="m-2" placeholder="查询类型"> |
| | | <el-input v-model="form.project" clearable :placeholder="$t('order.project')" style="width: 130px;display: none"></el-input> |
| | | |
| | | <el-select v-model="stateValue" class="m-2" :placeholder="$t('processCard.pleaseSelect')" clearable allow-create filterable style="width: 140px;display: none"> |
| | | <el-option |
| | | v-for="item in options" |
| | | v-for="item in stateOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | <el-button type="primary">查询</el-button> |
| | | </el-row> |
| | | |
| | | {{$t('report.workingProcedure')}}: |
| | | <el-select v-model="valueProcess" clearable :placeholder="$t('reportingWorks.selectProcess')" default-value="default_city" style="width: 120px"> |
| | | <el-option |
| | | :label="t('report.allProcess')" |
| | | :value="'all'" |
| | | /> |
| | | <el-option |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | | :label="item.basic_name" |
| | | :value="item.basic_name" |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-checkbox |
| | | :model-value="terminationVal === 0" |
| | | @change="onlandingTerminationChange" |
| | | > |
| | | {{ t('processCard.termination') }} |
| | | </el-checkbox> |
| | | |
| | | <el-button type="primary" @click="getWorkOrder">{{$t('basicData.search')}}</el-button> |
| | | </div> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | <div class="main-table"> |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | height="100%" |
| | | v-bind="gridOptions" |
| | | :optimize="true" |
| | | @filter-change="filterChanged" |
| | | @cell-dblclick="handleCellDblClick" |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row}"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,key,index) in row"> |
| | | <span style="font-weight: bold">{{key+': '}}</span> |
| | | <span>{{ item }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'edit')">{{$t('basicData.edit')}}</el-button> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'setType')">{{$t('basicData.cancelReview')}}</el-button> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'delete')">{{$t('basicData.delete')}}</el-button> |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button> |
| | | <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">反审</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input v-model="option.data" type="text" |
| | | @keyup.enter.native="$panel.confirmFilter()" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </template> |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <!-- 'PrevJump','NextJump', --> |
| | | <vxe-pager |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | :total="total.dataTotal" |
| | | @page-change="handlePageChange" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | <template #toolbar_buttons> |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel('/report/exportWorkInProgress', |
| | | t('report.workInProgressReport'), |
| | | form.date1)"> |
| | | {{t('basicData.export')}}</vxe-button> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </vxe-grid> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | width: 99%; |
| | | height: 100%; |
| | | .head{ |
| | | width: 100%; |
| | | height: 35px; |
| | | } |
| | | #selectForm { |
| | | width: 60%; |
| | | text-align: center; |
| | | |
| | | .main-table{ |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | | } |
| | | .vxe-grid { |
| | | /* 禁用浏览器默认选中 */ |
| | | -webkit-user-select: none; |
| | | -moz-user-select: none; |
| | | -ms-user-select: none; |
| | | user-select: none; |
| | | } |
| | | </style> |