| | |
| | | import useOrderInfoStore from "@/stores/sd/order/orderInfo" |
| | | import {Printer} from "@element-plus/icons-vue/global"; |
| | | import SelectProcessCardDetail from "@/components/pp/SelectProcessCardDetail.vue"; |
| | | import OrderProcessCollect from "@/components/sd/order/OrderProcessCollect.vue"; |
| | | |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | |
| | | |
| | | let productGlassTypeStore = useProductGlassTypeStore() |
| | | const dialogTableVisible = ref(false) |
| | | const dialogProcess = ref(false) |
| | | let router = useRouter() |
| | | let props = defineProps({ |
| | | rowIndex: {} |
| | |
| | | } |
| | | |
| | | }) |
| | | //流程卡进度用值 |
| | | let processVal = ref({ |
| | | orderId:null, |
| | | row: {}, |
| | | processId:null//用于后端数据返回,结果筛选 |
| | | }) |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | |
| | | }) |
| | | |
| | | const getFlowCardList = async () => { |
| | | gridOptions.loading = true |
| | | //第一次加载数据 |
| | | await request.post(`/processCard/flowCard/1/${total.pageSize}/${orderInfo.workOrderDate}`, filterData.value).then((res) => { |
| | | |
| | |
| | | total.pageTotal = res.data.total.pageTotal |
| | | orderInfo.workOrderDate = res.data.selectDate |
| | | pageTotal.value = res.data.total |
| | | total.value = res.data.total |
| | | produceList.value = produceList.value.concat(deepClone(res.data.data)) |
| | | produceList.value.forEach(item => { |
| | | switch (item.layoutStatus) { |
| | |
| | | } |
| | | }); |
| | | xGrid.value.loadData(produceList.value) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | gridOptions.loading = false |
| | | } |
| | | }) |
| | | } |
| | |
| | | }) |
| | | //页脚翻页查询 |
| | | const selectPageList = () => { |
| | | gridOptions.loading = true |
| | | request.post(`/processCard/flowCard/${pageNum.value}/${total.pageSize}/${orderInfo.workOrderDate}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | |
| | | } |
| | | }); |
| | | xGrid.value.loadData(produceList.value) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | gridOptions.loading = false |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | gridOptions.loading = true |
| | | request.post(`/processCard/flowCard/${pageNum.value}/${total.pageSize}/${orderInfo.workOrderDate}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total * 1 |
| | | total.pageTotal = res.data.total.pageTotal |
| | | orderInfo.workOrderDate = res.data.selectDate |
| | | pageTotal.value = res.data.total |
| | | total.value = res.data.total |
| | | res.data.data.forEach(item => { |
| | | switch (item.layoutStatus) { |
| | | case "0": |
| | |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | gridOptions.loading = false |
| | | } |
| | | }) |
| | | } |
| | |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal=parseInt(res.data.total) |
| | | pageNum.value=1 |
| | | total.value = res.data.total |
| | | produceList.value = deepClone(res.data.data) |
| | | produceList.value.forEach(item => { |
| | | switch (item.layoutStatus) { |
| | |
| | | orderInfo.selectProcessCardFilter.data = filterData.value |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | gridOptions.loading = false |
| | | } |
| | | }) |
| | | } |
| | |
| | | }, |
| | | {field: 'order.project', title: t('order.project'), showOverflow: "ellipsis"}, |
| | | {field: 'quantity', title: t('order.quantity'),}, |
| | | {field: 'orderDetail.computeGrossArea', title: t('order.area'),}, |
| | | {field: 'computeGrossArea', title: t('order.area'),}, |
| | | {field: 'founder', title: t('processCard.founder'),}, |
| | | {field: 'orderDetail.processingNote', title: t('order.processingNote'),}, |
| | | |
| | | {field: 'order.createTime', title: t('report.orderTime'),width: 110}, |
| | | {field: 'order.updateTime', title: t('productStock.approvedDate'),width: 110}, |
| | | {field: 'layoutStatus',width:100, title: t('processCard.layoutStatus'), filters: [{data: ''}], slots: {filter: 'select_filter'}}, |
| | | {field: 'merge',width:100, title: t('processCard.mergeState'), filters: [{data: ''}], slots: {filter: 'num1_filter'}}, |
| | | {field: 'rack',width:100, title:t('processCard.shelfNumber'), filters: [{data: ''}], slots: {filter: 'num1_filter'}} |
| | |
| | | {code: 'delete', name: t('basicData.delete'), status: 'primary'}, |
| | | {code: 'rack', name: t('processCard.combinedFrame'), status: 'primary'}, |
| | | ], |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | | import: false, |
| | | // export: true, |
| | | // print: true, |
| | |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["quantity",'orderDetail.computeGrossArea'] |
| | | const List = ["quantity",'computeGrossArea'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | //return footSum(data, column.field) |
| | | return total.value?.[column.field] ?? 0 |
| | | } |
| | | return '' |
| | | }) |
| | |
| | | |
| | | let composingData = ref({ |
| | | composing: selectRecords, |
| | | userId: user.user.userId, |
| | | userName:user.user.userName |
| | | }) |
| | | |
| | | //修改排版状态 |
| | |
| | | composing: selectRecords, |
| | | }) |
| | | selectRecords.forEach(item => { |
| | | if (item.layoutStatus == "已排版"){ |
| | | if (item.layoutStatus == t('processCard.typesetter')){ |
| | | ElMessage.warning(t('processCard.notSelectTheOptionData')) |
| | | return; |
| | | } |
| | |
| | | }) |
| | | } else { |
| | | |
| | | ElMessage.warning("撤销失败,请检查是否已生成工程号") |
| | | ElMessage.warning(t('processCard.msg.msg7')) |
| | | |
| | | } |
| | | }) |
| | |
| | | reserve: true |
| | | } |
| | | |
| | | function exportExcel(url, fileName,date) { |
| | | if(date===null){ |
| | | ElMessage.warning(t('report.pleaseSelectADateFirst')) |
| | | return |
| | | } |
| | | |
| | | |
| | | 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, |
| | | }) |
| | | 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) |
| | | } else { // IE10+下载 |
| | | navigator.msSaveBlob(blob, fileName) |
| | | } |
| | | |
| | | }) |
| | | } |
| | | |
| | | const onCellDblClick = ({ row, column }) => { |
| | | processVal.value.orderId = row.orderId |
| | | processVal.value.processId = row.processId |
| | | dialogProcess.value = true |
| | | }; |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | @filter-change="filterChanged" |
| | | @cell-dblclick="onCellDblClick" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | <template #toolbar_buttons> |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel('/processCard/exportDateProcess', |
| | | t('order.processCard'), |
| | | orderInfo.workOrderDate)"> |
| | | {{t('basicData.export')}}</vxe-button> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | id="sizePrintCalrd" |
| | | v-model="dialogProcess" |
| | | :title="$t('order.processCardCollect')" |
| | | destroy-on-close |
| | | style="width: 75%;height:75% "> |
| | | <order-process-collect |
| | | :orderId="processVal.orderId" |
| | | :processId="processVal.processId" |
| | | :row="processVal.row" |
| | | style="width: 100%;height: 100%" |
| | | /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | id="sizePrintCalrd" |
| | | v-model="dialogTableVisible" |
| | | :title="$t('流程卡合架')" |
| | | :title="$t('processCard.combinedFrame')" |
| | | destroy-on-close |
| | | style="width: 75%;height:75% "> |
| | | <select-process-card-detail |
| | |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | | } |
| | | |
| | | :deep(.el-dialog__body){ |
| | | height: 90%; |
| | | width: 100%; |
| | | } |
| | | </style> |