Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
| | |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import {defineEmits, onMounted, reactive, ref, watch} from "vue" |
| | | import {changeFilterEvent} from "@/hook" |
| | | import request from "@/utils/request"; |
| | | import request from "@/utils/request" |
| | | import exportExcel from "@/hook/exportExcel" |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | const xGrid = ref() |
| | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [], |
| | | slots: { |
| | | tools: 'toolbar_buttons' |
| | | }, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #toolbar_buttons> |
| | | <vxe-button style="margin-right: 0.5rem" |
| | | @click="exportExcel(props.childrenData.exportUrl, |
| | | props.childrenData.exportName, |
| | | basicProp.selectDate)"> |
| | | 导出</vxe-button> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <!-- 'PrevJump','NextJump', --> |
New file |
| | |
| | | import request from "@/utils/request" |
| | | import {ElMessage} from "element-plus" |
| | | |
| | | |
| | | export default function exportExcel(url, fileName,date) { |
| | | if(date===null){ |
| | | ElMessage.warning("请先选择日期") |
| | | 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("导出的筛选时间不能超过180天") |
| | | return |
| | | } |
| | | request.post(url,date,{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) |
| | | } |
| | | |
| | | }) |
| | | } |
| | | |
| | |
| | | //cellarea.value = newElement |
| | | //添加多选列 |
| | | nextTick(() => { |
| | | window.addEventListener("keypress", (event)=>{ |
| | | destroyAreaBox() |
| | | }) |
| | | window.addEventListener("mousedown", tableOutDestroyAreaBox)//给window添加鼠标按下事件,判断是否在表格外,是销毁 |
| | | window.addEventListener("mouseup", tbodymouseup)//给window添加鼠标松开事件 |
| | | let tbody = getTablexGrid().$el.querySelector(".vxe-table--main-wrapper table tbody")//获取tbody区域 |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | //表格外销毁范围框 |
| | | const tableOutDestroyAreaBox = (event: MouseEvent) => { |
| | | var element = getTablexGrid().$el.querySelector(".vxe-table--render-wrapper") |
| | |
| | | }, |
| | | order:{ |
| | | orderHomePage:'Order Home Page', |
| | | orderReport:'Order Report', |
| | | orderReport:'Order Detail Report', |
| | | project:'Project', |
| | | orderId:'Order ID', |
| | | money:'Total Amount', |
| | |
| | | |
| | | order:{ |
| | | orderHomePage:'订单首页', |
| | | orderReport:'订单报表', |
| | | orderReport:'订单明细报表', |
| | | project:'项目名称', |
| | | orderId:'销售单号', |
| | | money:'总金额', |
| | |
| | | component: () => import('../views/sd/order/OrderReport.vue'), |
| | | }, |
| | | { |
| | | path: 'orderProductSummaryReport', |
| | | name: 'orderProductSummaryReport', |
| | | component: () => import('../views/sd/order/OrderProductSummaryReport.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/order/selectOrder' |
| | | } |
| | |
| | | component: () => import('../views/sd/delivery/DeliveryReport.vue'), |
| | | }, |
| | | { |
| | | path: 'deliveryProductReport', |
| | | name: 'deliveryProductReport', |
| | | component: () => import('../views/sd/delivery/DeliveryProductReport.vue'), |
| | | }, |
| | | { |
| | | path: 'createDelivery', |
| | | name: 'createDelivery', |
| | | component: () => import('../views/sd/delivery/CreateDelivery.vue'), |
| | |
| | | let res = response.data |
| | | //传递报错信息,把报错信息传递到pinia中 |
| | | userStore.setResponseCode(parseInt(res.code),res.msg) |
| | | if(res.code!=='200'){ |
| | | return Promise.reject(res.code) |
| | | if(res.code!=='200' ){ |
| | | if(response.config.responseType !== 'blob'){ |
| | | return Promise.reject(res.code) |
| | | } |
| | | } |
| | | |
| | | // 如果是返回的文件 |
| | |
| | | ElMessage.success('保存成功') |
| | | emit('gaveParent', true) |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | } |
| | | const updateBasicData = () =>{ |
| | |
| | | ElMessage.success('修改成功') |
| | | emit('gaveParent', true) |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | } |
| | | |
| | |
| | | } |
| | | case 'delete': { |
| | | request.post(`/BasicWarehouse/deleteBasicWarehouse`,row).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('searchOrder.msgDeleteSuccess')) |
| | | router.push({ |
| | | path:'/main/warehouseBasicData/warehouseSearchBasicData', |
| | |
| | | }else{ |
| | | ElMessage.warning(t('searchOrder.msgDeleteFail')) |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | break |
| | | } |
| | |
| | | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | | console.log(titleSelectJson.value) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | |
| | | |
| | | if(isBool){ |
| | | request.post("/MaterialStore/saveMaterialStore", materialStore).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | resetForm() |
| | | ElMessage.success('保存成功') |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("保存失败") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | } |
| | | |
| | |
| | | id: row.id |
| | | }) |
| | | request.post("/MaterialStore/deleteMaterialStore",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success("删除成功") |
| | | router.push({path:'/main/ingredients/SelectIngredients',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("删除失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | return |
| | | } |
| | |
| | | |
| | | }) |
| | | request.post("/MaterialInventory/updateMaterialOutboundToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.code == 200 && res.data===true) { |
| | | ElMessage.success(t('basicData.msg.ReviewSuccess')) |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("审核失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | break |
| | | } |
| | |
| | | |
| | | }) |
| | | request.post("/MaterialInventory/updateMaterialOutboundToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.code == 200 && res.data===true) { |
| | | ElMessage.success(t('basicData.msg.cancelReviewSuccess')) |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("反审失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | break |
| | | } |
| | |
| | | materialOutboundId:row.materialOutboundId |
| | | }) |
| | | request.post("/MaterialInventory/deleteMaterialOutbound",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('searchOrder.msgDeleteSuccess')) |
| | | router.push({path:'/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("删除失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | |
| | | return |
| | |
| | | |
| | | }) |
| | | request.post("/MaterialInventory/saveReturningWarehouse", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success('保存成功') |
| | | router.push({path: '/main/ingredientsStock/ReturnToStorage', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("保存失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | break |
| | | } |
| | |
| | | |
| | | }) |
| | | request.post("/MaterialInventory/updateReturningWarehouseToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.code == 200 && res.data===true) { |
| | | ElMessage.success(t('basicData.msg.ReviewSuccess')) |
| | | router.push({path: '/main/ingredientsStock/ReturnToStorage', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("审核失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | break |
| | | } |
| | |
| | | |
| | | }) |
| | | request.post("/MaterialInventory/updateReturningWarehouseToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.code == 200 && res.data===true) { |
| | | ElMessage.success(t('basicData.msg.cancelReviewSuccess')) |
| | | router.push({path: '/main/ingredientsStock/ReturnToStorage', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("反审失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | break |
| | | } |
| | |
| | | |
| | | |
| | | let arr = [ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '60'}, |
| | | {type:'expand',fixed:"left",width: '60'}, |
| | | { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | {field: 'inventoryOrganization', width:'150', title: '库存组织', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged }, |
| | |
| | | }) |
| | | |
| | | request.post("/FinishedGoodsInventory/addSelectWarehousing",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('productStock.receivedSuccessfully')) |
| | | router.push({path:'/main/productStock/CreateProductStock',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("入库失败") |
| | | router.push("/login") |
| | | } |
| | | }) |
| | |
| | | |
| | | }) |
| | | request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryTakeOut",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('productStock.successfullyRetrieved')) |
| | | router.push({path:'/main/productStock/FinishedGoodsIssue',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("领出失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | |
| | | return |
| | |
| | | orderDetail: selectRecords |
| | | }) |
| | | request.post("/FinishedGoodsInventory/addDeliveryDetail", orderDetailData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.code == 200 && res.data===true) { |
| | | ElMessage.success(t('productStock.deliverySuccessful')) |
| | | router.push({path: '/main/productStock/FinishedProductOut', query: {random: Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("发货失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | |
| | | } |
| | |
| | | |
| | | }) |
| | | request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryRework", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.code == 200 && res.data===true) { |
| | | ElMessage.success(t('productStock.reworkSuccessful')) |
| | | router.push({path:'/main/productStock/FinishedProductRework',query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("返工失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | |
| | | |
| | |
| | | orderDetail: selectRecords |
| | | }) |
| | | request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryAllocate", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.code == 200 && res.data===true) { |
| | | |
| | | ElMessage.success(t('productStock.transferSuccessful')) |
| | | router.push({path:'/main/productStock/OrderAllocation',query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("调拨失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | |
| | | return; |
| | |
| | | |
| | | }) |
| | | request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryCounterExamination",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('productStock.reverseReviewSuccessful')) |
| | | router.push({path:'/main/productStock/ReworkRecord',query:{random:Math.random()}}) |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("反审失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | } |
| | | return; |
| | |
| | | |
| | | }) |
| | | request.post("/FinishedGoodsInventory/cancelFinishedGoodsInventoryStorage",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('productStock.invalidSuccessfully')) |
| | | router.push({path:'/main/productStock/storageRecord',query:{random:Math.random(),storageType: type.value}}) |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("反作废失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | } |
| | | return; |
| | |
| | | |
| | | }) |
| | | request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryToExamine",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('productStock.reviewSuccessful')) |
| | | router.push({path:'/main/productStock/TakeOutRecord',query:{random:Math.random()}}) |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("审核失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | } |
| | | return; |
| | |
| | | |
| | | }) |
| | | request.post("/FinishedGoodsInventory/cancelFinishedGoodsInventoryToExamine",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('productStock.invalidSuccessfully')) |
| | | router.push({path:'/main/productStock/TakeOutRecord',query:{random:Math.random()}}) |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("作废失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | } |
| | | return; |
| | |
| | | |
| | | }) |
| | | request.post("/FinishedGoodsInventory/updateFinishedGoodsInventoryCounterExamination",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('productStock.reverseReviewSuccessful')) |
| | | router.push({path:'/main/productStock/TransferRecord',query:{random:Math.random()}}) |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("反审失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | } |
| | | return; |
| | |
| | | |
| | | }) |
| | | request.post("/Replenish/saveReplenish", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({path:'/main/Replenish/AddReplenish',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("保存失败") |
| | | router.push("/login") |
| | | } |
| | | }) |
| | |
| | | |
| | | }) |
| | | request.post("/Replenish/updateReplenish",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('basicData.msg.ReviewSuccess')) |
| | | router.push({path:'/main/Replenish/SelectReplenish',query:{random:Math.random()}}) |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("审核失败") |
| | | router.push("/login") |
| | | } |
| | | }) |
| | |
| | | ElMessage.success(t('workOrder.deleteOk')) |
| | | router.push({path: '/main/reportingWorks/SelectReportingWorks', query: {random:Math.random()}}) |
| | | } else { |
| | | |
| | | ElMessage.warning('删除失败,检查下工序是否已报工') |
| | | |
| | | } |
| | | }) |
| | | break |
| | |
| | | |
| | | }) |
| | | request.post("/rework/saveRework", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({path:'/main/rework/AddRework',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("保存失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | break |
| | | } |
| | |
| | | |
| | | }) |
| | | request.post("/rework/updateRework",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('basicData.msg.ReviewSuccess')) |
| | | router.push({path:'/main/rework/SelectRework',query:{random:Math.random()}}) |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("审核失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | } |
| | | return; |
| | |
| | | }) |
| | | |
| | | request.post("/customer/insertCustomer", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | resetForm() |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("保存失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | |
| | | } |
| | |
| | | const { t } = useI18n() |
| | | |
| | | const userStore = useUserInfoStore() |
| | | console.log(userStore.user.permissions) |
| | | const username = userStore.user.userName |
| | | const userid = userStore.user.userId |
| | | let router=useRouter() |
| | |
| | | }) |
| | | |
| | | request.post("/customer/deleteCustomer", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success("删除成功") |
| | | router.push({path:'/main/customer/selectCustomer',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("删除失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | break |
| | | } |
| | |
| | | custom: true |
| | | }, |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['deliveryDetail.quantity','quantity'] |
| | | //let footList=['deliveryDetail.quantity','quantity'] |
| | | let footList=[] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | console.log(column.field) |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | } |
| | |
| | | |
| | | }) |
| | | request.post("/Delivery/insertDelivery", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('delivery.deliveryNoteSubmittedSuccessfully')) |
| | | router.push({path: '/main/delivery/selectDelivery', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("保存失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | break |
| | | } |
| | |
| | | |
| | | }) |
| | | request.post("/Delivery/updateDeliveryToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.code == 200 && res.data===true) { |
| | | ElMessage.success(t('basicData.msg.ReviewSuccess')) |
| | | router.push({path: '/main/delivery/selectDelivery', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("审核失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | break |
| | | } |
| | |
| | | |
| | | }) |
| | | request.post("/Delivery/updateDeliveryToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | if (res.code == 200 && res.data===true) { |
| | | ElMessage.success(t('basicData.msg.cancelReviewSuccess')) |
| | | router.push({path: '/main/delivery/selectDelivery', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("审核失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | break |
| | | } |
| | |
| | | <script setup> |
| | | import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue" |
| | | import {ArrowDown, ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue" |
| | | |
| | | import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router"; |
| | | import { useI18n } from 'vue-i18n' |
| | |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | } |
| | | |
| | | const handleCommand = (command) => { |
| | | router.push({ |
| | | path: command |
| | | }) |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/delivery/selectDelivery' }">{{$t('delivery.shippingHomepage')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/delivery/selectOrderList' }">{{$t('delivery.orderShipment')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/delivery/deliveryReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">{{$t('productStock.reportForms')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item |
| | | @click="changeRouter(3)" |
| | | :class="indexFlag===3?'indexTag':''" |
| | | > |
| | | <el-dropdown @command="handleCommand"> |
| | | <span class="el-dropdown-link" style="font-weight: 700;outline: none;"> |
| | | 报表 |
| | | <el-icon class="el-icon--right"> |
| | | <arrow-down /> |
| | | </el-icon> |
| | | </span> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item command="/main/delivery/deliveryReport" >发货明细报表</el-dropdown-item> |
| | | <el-dropdown-item command="/main/delivery/deliveryProductReport">发货产品分类报表</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | | |
| | | </el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | |
New file |
| | |
| | | <script setup> |
| | | |
| | | import BasicTable from "@/components/BasicTable.vue" |
| | | import request from "@/utils/request" |
| | | import { ref} from "vue" |
| | | |
| | | const childrenData = ref({ |
| | | columns:[ |
| | | {type:'expand',fixed:"left",width: 80}, |
| | | {type: 'seq',fixed:"left", title: '自序', width: 80 }, |
| | | {field: 'deliveryId',width:120, title: '发货单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'deliveryNumber',width:120, title: '发货序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.productId',width:120, title: '产品编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.productName',width:120, title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.paymentTerms',width:120, title: '付款条件',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.project',width:140, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'quantity',width:120, title: '数量', sortable: true}, |
| | | {field: 'area',width:120, title: '面积', sortable: true}, |
| | | {field: 'money',width:120, title: '金额', sortable: true}, |
| | | {field: 'delivery.customerId',width:120, title: '客户编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.customerName',width:120, title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.deliveryDate',width:120, title: '送货日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.payMethod',width:120, title: '支付方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.payDate',width:120, title: '支付日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.salesman',width:120, title: '销售员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.creator',width:120, title: '发货员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.contacts',width:120, title: '联系人',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.contactNumber',width:120, title: '联系电话',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.deliveryAddress',width:150, title: '送货地址',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderId',width:120, title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderNumber',width:120, title: '订单序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'deliveryDetailRemakes',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'createTime',width:120, title: '报表日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | |
| | | ],//表格表头字段 |
| | | data:[],//表格数据 |
| | | url :'/Delivery/getSelectDeliveryDetailProductReport', |
| | | footList:['quantity','area','money'] |
| | | }) |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <basic-table |
| | | :childrenData="childrenData"/> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | </style> |
| | |
| | | deliveryId:row.deliveryId |
| | | }) |
| | | request.post("/Delivery/deleteDelivery",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('searchOrder.msgDeleteSuccess')) |
| | | router.push({path:'/main/delivery/selectDelivery',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | ElMessage.warning("删除失败") |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error('系统错误') |
| | | router.push("/login") |
| | | }) |
| | | |
| | | |
| | | return |
| | | } |
| | | } |
| | |
| | | const xGrid = ref() |
| | | let cellArea = ref() |
| | | const shapeList = ref([ |
| | | {name:'普形',value:1}, {name:'异形',value:2} |
| | | {label:'普形',value:'1'}, {label:'异形',value:'2'} |
| | | ]) |
| | | |
| | | // 定义表头上传数据 |
| | |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | mouseConfig:{selected: true},//鼠标选中 |
| | | keyboardConfig:{isArrow: true, isDel: true, isEnter: true, isTab: true, isEdit: true, isChecked: true}, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | trigger: 'dblclick', |
| | | mode: 'cell', |
| | | showStatus: true, |
| | | showIcon:false |
| | |
| | | title: t('order.shape'), |
| | | editRender: { name: 'input'}, |
| | | filters:[{ data: '' }], |
| | | slots: { filter: 'num1_filter',edit:'shape_edit' }, sortable: true,filterMethod:filterChanged}, |
| | | slots: { filter: 'num1_filter',edit:'shape_edit',default:'default_shape' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'bendRadius',width:160, title: t('order.bendRadius'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'edgingType',width:160, title: t('order.edgingType'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'processingNote',width:200, title: t('order.processingNote'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | |
| | | } |
| | | }, |
| | | cellDblclick (params) {//表格内容双击打开产品界面 |
| | | const { row } = params |
| | | productVisible.value = true |
| | | rowIndex=row |
| | | const { row,column } = params |
| | | console.log(column) |
| | | if(column.field==='productName' || column.field==='productId'){ |
| | | productVisible.value = true |
| | | rowIndex=row |
| | | } |
| | | |
| | | }, |
| | | cellClick({ row }){ |
| | | rowClickIndex.value = row |
| | |
| | | if(history.state.type=='copy'){ |
| | | xGrid.value.reloadData(res.data.orderDetails) |
| | | } |
| | | gridOptions.loading = false |
| | | return |
| | | } |
| | | //取消工艺按钮禁用 |
| | |
| | | item.otherColumns = JSON.parse(item.otherColumns) |
| | | }) |
| | | otherMoney.value =res.data.orderOtherMoneyList |
| | | |
| | | //加载副表数据 |
| | | xGrid.value.reloadData(orderDetails) |
| | | gridOptions.loading = false |
| | | |
| | | }else{ |
| | | ElMessage.error(res.msg) |
| | | } |
| | |
| | | <vxe-button @click="importTemplate">{{$t('order.template')}}</vxe-button> |
| | | <vxe-button @click="importEvent">{{$t('order.import')}}</vxe-button> |
| | | </template> |
| | | <template #default_shape="{ row }"> |
| | | <span>{{ row.shape=='1'?'普形':row.shape=='2'?'异形':null }}</span> |
| | | </template> |
| | | <template #shape_edit="{ row }"> |
| | | <vxe-select v-model="row.shape" transfer> |
| | | <vxe-option v-for="item in shapeList" :key="item" :value="item.value" :label="item.name" /> |
| | | </vxe-select> |
| | | <vxe-select v-model="row.shape" transfer :options="shapeList" placeholder=" "/> |
| | | </template> |
| | | |
| | | |
| | |
| | | <script setup> |
| | | import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue" |
| | | import {ArrowDown, ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue" |
| | | import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router" |
| | | import {useI18n} from "vue-i18n" |
| | | const { t } = useI18n() |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | const handleCommand = (command) => { |
| | | router.push({ |
| | | path: command |
| | | }) |
| | | } |
| | | |
| | | |
| | | </script> |
| | |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/order/selectOrder' }">{{$t('order.orderHomePage')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/order/createOrder' }">{{$t('basicData.create')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/order/orderReport' }">{{$t('order.orderReport')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">报表</el-breadcrumb-item> |
| | | <el-breadcrumb-item |
| | | @click="changeRouter(3)" |
| | | :class="indexFlag===3?'indexTag':''" |
| | | > |
| | | <el-dropdown @command="handleCommand"> |
| | | <span class="el-dropdown-link" style="font-weight: 700;outline: none;"> |
| | | 报表 |
| | | <el-icon class="el-icon--right"> |
| | | <arrow-down /> |
| | | </el-icon> |
| | | </span> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item command="/main/order/orderReport" >{{ $t('order.orderReport') }}</el-dropdown-item> |
| | | <el-dropdown-item command="/main/order/orderProductSummaryReport">订单明细汇总</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | | |
| | | </el-breadcrumb-item> |
| | | |
| | | </el-breadcrumb> |
| | | </div> |
| | | |
| | |
| | | :deep(.indexTag .el-breadcrumb__inner){ |
| | | color: #5CADFE !important; |
| | | } |
| | | |
| | | .example-showcase .el-dropdown-link { |
| | | cursor: pointer; |
| | | color: var(--el-color-primary); |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | import BasicTable from "@/components/BasicTable.vue" |
| | | import { ref} from "vue" |
| | | import request from "@/utils/request" |
| | | const childrenData = ref({ |
| | | columns:[ |
| | | {type:'expand',fixed:"left",width: 80,slots: { content:'content' }}, |
| | | {type: 'seq',fixed:"left", title: '自序', width: 80 }, |
| | | {field: 'order.orderType',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.customerName',width:120, title: '客户名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.project',width:120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.orderId',width:120, title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.batch',width:120, title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'productId',width:120, title: '产品编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'productName',width:120, title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | //{field: 'orderNumber',width:120, title: '订单序号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | // {field: 'buildingNumber',width:120, title: '楼号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | //{field: 'width',width:120, title: '宽',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | //{field: 'height',width:120, title: '高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'quantity',width:120, title: '数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | //{field: 'bendRadius',width:120, title: '弯钢弧度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'grossArea',width:120, title: '实际面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'computeGrossArea',width:150, title: '结算总面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | //{field: 'shape',width:120, title: '形状',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | //{field: 'edgingType',width:120, title: '磨边类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | //{field: 'order.processingNote',width:140, title: '主加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | //{field: 'processingNote',width:120, title: '加工要求',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | //{field: 'order.remarks',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.icon',width:120, title: '商标选项',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.packType',width:120, title: '包装方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | // {field: 'prodID',width:120, title: '工艺流程',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'perimeter',width:120, title: '周长',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'price',width:120, title: '单价',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'grossAmount',width:120, title: '金额',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.alType',width:120, title: '铝条方式',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | // {field: 'prodID',width:120, title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.salesman',width:120, title: '业务员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.deliveryAddress',width:120, title: '送货地址',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.creator',width:120, title: '制单员',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'createTime',width:120, title: '建立时间',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'totalThickness',width:120, title: '总厚度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'levelOne',width:120, title: '产品大类',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'levelTwo',width:120, title: '产品小类',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.customerBatch',width:120, title: '客户批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | ],//表格表头字段 |
| | | data:[],//表格数据 |
| | | url :'/order/getOrderProductSummary', |
| | | footList:['quantity','grossArea','computeGrossArea','perimeter','price','grossAmount'] |
| | | }) |
| | | |
| | | request.post('/order/exportOrderReport',null,{responseType :'blob'}).then(res => { |
| | | const blob = new Blob([res]) |
| | | // console.log(blob) |
| | | // if ('download' in document.createElement('a')) { // 非IE下载 |
| | | // const elink = document.createElement('a') |
| | | // elink.download = 'a.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) |
| | | // } |
| | | |
| | | }) |
| | | </script> |
| | | |
| | | <template> |
| | | <basic-table |
| | | :childrenData="childrenData"/> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | </style> |
| | |
| | | ],//表格表头字段 |
| | | data:[],//表格数据 |
| | | url :'/order/getOrderReport', |
| | | exportUrl :'/order/exportOrderReport', |
| | | exportName:'订单明细报表', |
| | | footList:['quantity','grossArea','computeGrossArea','perimeter','price','grossAmount'] |
| | | }) |
| | | |
| | | request.post('/order/exportOrderReport',null,{responseType :'blob'}).then(res => { |
| | | const blob = new Blob([res]) |
| | | // console.log(blob) |
| | | // if ('download' in document.createElement('a')) { // 非IE下载 |
| | | // const elink = document.createElement('a') |
| | | // elink.download = 'a.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) |
| | | // } |
| | | |
| | | }) |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | }) |
| | | |
| | | |
| | | let initTime = null |
| | | nextTick(() => { |
| | | // 加载完成之后在绑定拖动事件 |
| | | initTime = setTimeout(() => { |
| | | columnDrop2(xGrid.value) |
| | | }, 500) |
| | | }) |
| | | |
| | | onUnmounted(() => { |
| | | clearTimeout(initTime) |
| | | if (sortable2) { |
| | | sortable2.destroy() |
| | | } |
| | | }) |
| | | // let initTime = null |
| | | // nextTick(() => { |
| | | // // 加载完成之后在绑定拖动事件 |
| | | // initTime = setTimeout(() => { |
| | | // columnDrop2(xGrid.value) |
| | | // }, 500) |
| | | // }) |
| | | // |
| | | // onUnmounted(() => { |
| | | // clearTimeout(initTime) |
| | | // if (sortable2) { |
| | | // sortable2.destroy() |
| | | // } |
| | | // }) |
| | | |
| | | </script> |
| | | |
| | |
| | | @SaCheckPermission("CreateProductStock.add") |
| | | @PostMapping("/addSelectWarehousing") |
| | | public Result addSelectWarehousing( @RequestBody Map<String,Object> object){ |
| | | if(finishedGoodsInventoryService.addSelectWarehousing(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"入库失败"); |
| | | return Result.seccess(finishedGoodsInventoryService.addSelectWarehousing(object)); |
| | | |
| | | } |
| | | } |
| | | |
| | | /*查询可发货的成品数据*/ |
| | |
| | | @SaCheckPermission("FinishedProductOut.add") |
| | | @PostMapping("/addDeliveryDetail") |
| | | public Result addDeliveryDetail( @RequestBody Map<String,Object> object){ |
| | | if(finishedGoodsInventoryService.addDeliveryDetail(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"出库失败"); |
| | | |
| | | } |
| | | return Result.seccess(finishedGoodsInventoryService.addDeliveryDetail(object)); |
| | | } |
| | | |
| | | /* 调拨查询*/ |
| | |
| | | @SaCheckPermission("OrderAllocation.add") |
| | | @PostMapping("/updateFinishedGoodsInventoryAllocate") |
| | | public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object> object){ |
| | | if(finishedGoodsInventoryService.updateFinishedGoodsInventoryAllocate(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"调拨失败,请检查订单输入是否正确"); |
| | | |
| | | } |
| | | return Result.seccess(finishedGoodsInventoryService.updateFinishedGoodsInventoryAllocate(object)); |
| | | } |
| | | |
| | | /*调拨记录查询*/ |
| | |
| | | @SaCheckPermission("FinishedGoodsIssue.add") |
| | | @PostMapping("/updateFinishedGoodsInventoryTakeOut") |
| | | public Result updateFinishedGoodsInventoryTakeOut( @RequestBody Map<String,Object> object){ |
| | | |
| | | if(finishedGoodsInventoryService.updateFinishedGoodsInventoryTakeOut(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"领出失败"); |
| | | |
| | | } |
| | | return Result.seccess(finishedGoodsInventoryService.updateFinishedGoodsInventoryTakeOut(object)); |
| | | } |
| | | |
| | | /*领出记录查询*/ |
| | |
| | | @ApiOperation("订单返工查询接口") |
| | | @PostMapping("/updateFinishedGoodsInventoryRework") |
| | | public Result updateFinishedGoodsInventoryRework( @RequestBody Map<String,Object> object){ |
| | | |
| | | if(finishedGoodsInventoryService.updateFinishedGoodsInventoryRework(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"返工失败"); |
| | | |
| | | } |
| | | return Result.seccess(finishedGoodsInventoryService.updateFinishedGoodsInventoryRework(object)); |
| | | } |
| | | |
| | | |
| | |
| | | @SaCheckPermission("TakeOutRecord.review") |
| | | @PostMapping("/updateFinishedGoodsInventoryToExamine") |
| | | public Result updateFinishedGoodsInventoryToExamine( @RequestBody Map<String,Object> object){ |
| | | |
| | | if(finishedGoodsInventoryService.updateFinishedGoodsInventoryToExamine(object,"审核")){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"领出失败"); |
| | | |
| | | } |
| | | return Result.seccess(finishedGoodsInventoryService.updateFinishedGoodsInventoryToExamine(object,"审核")); |
| | | } |
| | | /*订单反审*/ |
| | | @ApiOperation("订单反审接口") |
| | | @SaCheckPermission("TakeOutRecord.review") |
| | | @PostMapping("/updateFinishedGoodsInventoryCounterExamination") |
| | | public Result updateFinishedGoodsInventoryCounterExamination( @RequestBody Map<String,Object> object){ |
| | | |
| | | if(finishedGoodsInventoryService.updateFinishedGoodsInventoryToExamine(object,"反审")){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"领出失败"); |
| | | |
| | | } |
| | | return Result.seccess(finishedGoodsInventoryService.updateFinishedGoodsInventoryToExamine(object,"反审")); |
| | | } |
| | | |
| | | /*订单作废*/ |
| | |
| | | @SaCheckPermission("TakeOutRecord.update") |
| | | @PostMapping("/cancelFinishedGoodsInventoryToExamine") |
| | | public Result cancelFinishedGoodsInventoryToExamine( @RequestBody Map<String,Object> object){ |
| | | |
| | | if(finishedGoodsInventoryService.cancelFinishedGoodsInventoryToExamine(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"领出失败"); |
| | | |
| | | } |
| | | return Result.seccess(finishedGoodsInventoryService.cancelFinishedGoodsInventoryToExamine(object)); |
| | | } |
| | | |
| | | /*出入库记录查询*/ |
| | |
| | | /*出入库返回*/ |
| | | @ApiOperation("出入库返回接口") |
| | | @SaCheckPermission("storageRecord.update") |
| | | @PostMapping("/cancelFinishedGoodsInventoryStorage") |
| | | @PostMapping("/cancelFini shedGoodsInventoryStorage") |
| | | public Result cancelFinishedGoodsInventoryStorage( @RequestBody Map<String,Object> object){ |
| | | |
| | | if(finishedGoodsInventoryService.cancelFinishedGoodsInventoryStorage(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"返回失败"); |
| | | |
| | | } |
| | | return Result.seccess(finishedGoodsInventoryService.cancelFinishedGoodsInventoryStorage(object)); |
| | | } |
| | | |
| | | @ApiOperation("成品库存记录查询接口") |
| | |
| | | @SaCheckPermission("CreateOutbound.review") |
| | | @PostMapping("/updateMaterialOutboundToExamine") |
| | | public Result updateMaterialOutboundToExamine( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.updateMaterialOutboundToExamine(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"审核失败"); |
| | | |
| | | } |
| | | return Result.seccess(materialInventoryService.updateMaterialOutboundToExamine(object)); |
| | | } |
| | | |
| | | @ApiOperation("材料出库删除接口") |
| | | @SaCheckPermission("MaterialOutbound.delete") |
| | | @PostMapping("/deleteMaterialOutbound") |
| | | public Result deleteMaterialOutbound( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.deleteMaterialOutbound(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | |
| | | } |
| | | return Result.seccess(materialInventoryService.deleteMaterialOutbound(object)); |
| | | } |
| | | |
| | | @ApiOperation("物料返库新增接口") |
| | | @SaCheckPermission("ReturnToStorageCreate.add") |
| | | @PostMapping("/saveReturningWarehouse") |
| | | public Result saveReturningWarehouse( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.saveReturningWarehouse(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | | |
| | | } |
| | | return Result.seccess(materialInventoryService.saveReturningWarehouse(object)); |
| | | } |
| | | |
| | | @ApiOperation("物料返库新增查询接口") |
| | |
| | | @SaCheckPermission("ReturnToStorageCreate.review") |
| | | @PostMapping("/updateReturningWarehouseToExamine") |
| | | public Result updateReturningWarehouseToExamine( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.updateReturningWarehouseToExamine(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"审核失败"); |
| | | |
| | | } |
| | | return Result.seccess(materialInventoryService.updateReturningWarehouseToExamine(object)); |
| | | } |
| | | |
| | | |
| | |
| | | @SaCheckPermission("CreateIngredients.add") |
| | | @PostMapping("/saveMaterialStore") |
| | | public Result saveMaterialStore( @RequestBody Map<String,Object> object){ |
| | | if(materialStoreService.saveMaterialStore(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | | |
| | | } |
| | | return Result.seccess(materialStoreService.saveMaterialStore(object)); |
| | | } |
| | | |
| | | @ApiOperation("物料查询接口") |
| | |
| | | @SaCheckPermission("SelectIngredients.delete") |
| | | @PostMapping("/deleteMaterialStore") |
| | | public Result deleteMaterialStore( @RequestBody Map<String,Object> object){ |
| | | if(materialStoreService.deleteMaterialStore(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | |
| | | } |
| | | return Result.seccess(materialStoreService.deleteMaterialStore(object)); |
| | | } |
| | | |
| | | |
| | |
| | | @SaCheckPermission("AddReplenish.add") |
| | | @PostMapping("/saveReplenish") |
| | | public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object> object){ |
| | | if(replenishService.saveReplenish(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"补片失败"); |
| | | |
| | | } |
| | | return Result.seccess(replenishService.saveReplenish(object)); |
| | | } |
| | | |
| | | @ApiOperation("补片审核接口") |
| | | @SaCheckPermission("SelectReplenish.review") |
| | | @PostMapping("/updateReplenish") |
| | | public Result updateReplenish( @RequestBody Map<String,Object> object){ |
| | | if(replenishService.updateReplenish(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"审核失败"); |
| | | |
| | | } |
| | | return Result.seccess(replenishService.updateReplenish(object)); |
| | | } |
| | | } |
| | |
| | | @SaCheckPermission("AddRework.add") |
| | | @PostMapping("/saveRework") |
| | | public Result updateFinishedGoodsInventoryAllocate( @RequestBody Map<String,Object> object){ |
| | | if(reworkService.saveRework(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"返工失败"); |
| | | |
| | | } |
| | | return Result.seccess(reworkService.saveRework(object)); |
| | | } |
| | | |
| | | @ApiOperation("返工审核接口") |
| | | @SaCheckPermission("SelectRework.review") |
| | | @PostMapping("/updateRework") |
| | | public Result updateRework( @RequestBody Map<String,Object> object){ |
| | | if(reworkService.updateRework(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"审核失败"); |
| | | |
| | | } |
| | | return Result.seccess(reworkService.updateRework(object)); |
| | | } |
| | | } |
| | |
| | | @SaCheckPermission("CreateCustomer.add") |
| | | @PostMapping("/insertCustomer") |
| | | public Result insertCustomer( @RequestBody Map<String,Object> object){ |
| | | if(customerService.insertCustomer(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"客户新增/修改失败"); |
| | | |
| | | } |
| | | return Result.seccess(customerService.insertCustomer(object)); |
| | | } |
| | | |
| | | @ApiOperation("客户删除接口") |
| | | @SaCheckPermission("selectCustomer.delete") |
| | | @PostMapping("/deleteCustomer") |
| | | public Result deleteCustomer( @RequestBody Map<String,Object> object){ |
| | | if(customerService.deleteCustomer(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"客户删除失败"); |
| | | |
| | | } |
| | | return Result.seccess(customerService.deleteCustomer(object)); |
| | | } |
| | | |
| | | @ApiOperation("客户订单查询接口") |
| | |
| | | return Result.seccess(deliveryService.getSelectDeliveryDetailReport(pageNum,pageSize,selectDate,deliveryDetail)); |
| | | } |
| | | |
| | | /*发货报表查询*/ |
| | | @ApiOperation("发货产品分类报表查询接口") |
| | | @SaCheckPermission("deliveryReport.search") |
| | | @PostMapping("/getSelectDeliveryDetailProductReport/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectDeliveryDetailProductReport(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody DeliveryDetail deliveryDetail){ |
| | | return Result.seccess(deliveryService.getSelectDeliveryDetailProductReport(pageNum,pageSize,selectDate,deliveryDetail)); |
| | | } |
| | | |
| | | /*发货订单明细查询*/ |
| | | @ApiOperation("发货编辑订单明细查询接口") |
| | | @SaCheckPermission("createDelivery.search") |
| | |
| | | @SaCheckPermission("createDelivery.add") |
| | | @PostMapping("/insertDelivery") |
| | | public Result insertDelivery( @RequestBody Map<String,Object> object){ |
| | | if(deliveryService.insertDelivery(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"发货失败"); |
| | | |
| | | } |
| | | return Result.seccess(deliveryService.insertDelivery(object)); |
| | | } |
| | | @ApiOperation("发货审核修改接口") |
| | | @SaCheckPermission("createDelivery.review") |
| | | @PostMapping("/updateDeliveryToExamine") |
| | | public Result updateDeliveryToExamine( @RequestBody Map<String,Object> object){ |
| | | if(deliveryService.updateDeliveryToExamine(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"审核失败"); |
| | | |
| | | } |
| | | return Result.seccess(deliveryService.updateDeliveryToExamine(object)); |
| | | } |
| | | |
| | | @ApiOperation("发货删除接口") |
| | | @SaCheckPermission("selectDelivery.delete") |
| | | @PostMapping("/deleteDelivery") |
| | | public Result deleteDelivery( @RequestBody Map<String,Object> object){ |
| | | if(deliveryService.deleteDelivery(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | |
| | | } |
| | | return Result.seccess(deliveryService.deleteDelivery(object)); |
| | | } |
| | | |
| | | @ApiOperation("发货订单查询接口") |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.time.LocalDate; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | return Result.seccess(orderService.getOrderReport(pageNum,pageSize,selectDate,orderDetail)); |
| | | |
| | | } |
| | | |
| | | //@SaCheckPermission("orderProductSummary.search") |
| | | @ApiOperation("查询订单产品汇总报表") |
| | | @PostMapping("/getOrderProductSummary/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getOrderProductSummary(@PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable List<String> selectDate, |
| | | @RequestBody OrderDetail orderDetail) { |
| | | return Result.seccess(orderService.getOrderProductSummary(pageNum,pageSize,selectDate,orderDetail)); |
| | | |
| | | } |
| | | @ApiOperation("订单报表导出") |
| | | @PostMapping("/exportOrderReport") |
| | | public void exportOrderReport(HttpServletResponse response) throws IOException, IllegalAccessException, InstantiationException { |
| | | DownExcel.download(response,Order.class, orderService.exportOrderReport(),"orderReport"); |
| | | public void exportOrderReport(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | | |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response,Order.class, orderService.exportOrderReport(dates),"orderReport"); |
| | | } |
| | | } |
| | |
| | | |
| | | Map<String,Integer> getSelectDeliveryDetailReportPageTotal(Integer offset, Integer pageSize,String startDate, String endDate, DeliveryDetail deliveryDetail); |
| | | |
| | | List<DeliveryDetail> getSelectDeliveryDetailProductReport(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("deliveryDetail") DeliveryDetail deliveryDetail); |
| | | |
| | | Map<String,Integer> getSelectDeliveryDetailProductReportPageTotal(Integer offset, Integer pageSize,String startDate, String endDate, DeliveryDetail deliveryDetail); |
| | | |
| | | List<DeliveryDetail> getSelectShippingOrderDetails(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("orderDetail") OrderDetail orderDetail); |
| | |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | |
| | | List<OrderDetail> getOrderReport(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail); |
| | | |
| | | Map<String,Integer> getOrderReportTotal(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail); |
| | | //type为了区别需不需要根据产品分类 |
| | | Map<String,Integer> getOrderReportTotal(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail, String type); |
| | | |
| | | List<Order> exportOrderReport(); |
| | | List<Order> exportOrderReport(List<LocalDate> dates); |
| | | |
| | | List<OrderDetail> getOrderProductSummary(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail); |
| | | |
| | | Map<String,Integer> getOrderProductSummaryTotal(Integer offset, Integer pageSize, String startDate, String endDate, OrderDetail orderDetail, String product); |
| | | } |
| | |
| | | |
| | | Boolean saveBatch(List<PermissionRole> permissionRoles); |
| | | |
| | | List<String> getUserEditPermission(Integer loginId); |
| | | List<String> getUserEditPermission(Integer loginId, Boolean userIsAdmin); |
| | | } |
| | |
| | | |
| | | @Mapper |
| | | public interface UserRoleMapper extends BaseMapper<UserRole> { |
| | | Boolean getUserIsAdmin(Integer id); |
| | | } |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getSelectDeliveryDetailProductReport(Integer pageNum, Integer pageSize,List<String> selectDate, DeliveryDetail deliveryDetail) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | String endDate = LocalDate.now().toString(); |
| | | String startDate = LocalDate.now().minusDays(15).toString(); |
| | | if(selectDate !=null && selectDate.size()==2){ |
| | | if(!selectDate.get(0).isEmpty()){ |
| | | startDate = selectDate.get(0); |
| | | } |
| | | if(!selectDate.get(1).isEmpty()){ |
| | | endDate = selectDate.get(1); |
| | | } |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", deliveryDetailMapper.getSelectDeliveryDetailProductReport(offset, pageSize,startDate,endDate, deliveryDetail)); |
| | | map.put("total", deliveryDetailMapper.getSelectDeliveryDetailProductReportPageTotal(offset, pageSize,startDate,endDate, deliveryDetail)); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getSelectShippingOrderDetail(Integer pageNum, Integer pageSize, OrderDetail orderDetail) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | |
| | |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.mapper.sd.*; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",orderDetailMapper.getOrderReport(offset, pageSize, startDate, endDate, orderDetail)); |
| | | map.put("total",orderDetailMapper.getOrderReportTotal(offset, pageSize, startDate, endDate, orderDetail)); |
| | | map.put("total",orderDetailMapper.getOrderReportTotal(offset, pageSize, startDate, endDate, orderDetail,"order")); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | |
| | | return map; |
| | | } |
| | | |
| | | public List<Order> exportOrderReport() { |
| | | return orderDetailMapper.exportOrderReport(); |
| | | public List<Order> exportOrderReport(List<LocalDate> dates) { |
| | | return orderDetailMapper.exportOrderReport(dates); |
| | | } |
| | | |
| | | public Map<String,Object> getOrderProductSummary(Integer pageNum, Integer pageSize, List<String> selectDate, OrderDetail orderDetail) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | String endDate = LocalDate.now().toString(); |
| | | String startDate = LocalDate.now().minusDays(15).toString(); |
| | | if(selectDate !=null && selectDate.size()==2){ |
| | | if(!selectDate.get(0).isEmpty()){ |
| | | startDate = selectDate.get(0); |
| | | } |
| | | if(!selectDate.get(1).isEmpty()){ |
| | | endDate = selectDate.get(1); |
| | | } |
| | | } |
| | | |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",orderDetailMapper.getOrderProductSummary(offset, pageSize, startDate, endDate, orderDetail)); |
| | | map.put("total",orderDetailMapper.getOrderProductSummaryTotal(offset, pageSize, startDate, endDate, orderDetail, "product")); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | // map.put("total",orderMapper.getPageTotal(offset, pageSize, startDate, endDate, orderDetail)); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | import com.example.erp.entity.userInfo.PermissionBasic; |
| | | import com.example.erp.entity.userInfo.Role; |
| | | import com.example.erp.entity.userInfo.User; |
| | | import com.example.erp.mapper.userInfo.PermissionBasicMapper; |
| | | import com.example.erp.mapper.userInfo.PermissionRoleMapper; |
| | | import com.example.erp.mapper.userInfo.RoleMapper; |
| | | import com.example.erp.mapper.userInfo.UserMapper; |
| | | import com.example.erp.mapper.userInfo.*; |
| | | import com.example.erp.tools.TokenTools; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.cache.annotation.CacheEvict; |
| | |
| | | |
| | | private final UserMapper userMapper; |
| | | private final RoleMapper roleMapper; |
| | | private final UserRoleMapper userRoleMapper; |
| | | |
| | | private final PermissionRoleMapper permissionRoleMapper; |
| | | |
| | | public UserService(UserMapper userMapper, RoleMapper roleMapper, PermissionRoleMapper permissionRoleMapper) { |
| | | public UserService(UserMapper userMapper, RoleMapper roleMapper, PermissionRoleMapper permissionRoleMapper, UserRoleMapper userRoleMapper) { |
| | | this.userMapper = userMapper; |
| | | this.roleMapper = roleMapper; |
| | | this.permissionRoleMapper = permissionRoleMapper; |
| | | this.userRoleMapper = userRoleMapper; |
| | | } |
| | | |
| | | |
| | |
| | | userDTO.setId(user.getId()); |
| | | userDTO.setUserName(user.getUserName()); |
| | | userDTO.setToken(StpUtil.getTokenValue()); |
| | | userDTO.setPermissions(permissionRoleMapper.getUserEditPermission(user.getId())); |
| | | Boolean userIsAdmin= userRoleMapper.getUserIsAdmin(user.getId()); |
| | | userDTO.setPermissions(permissionRoleMapper.getUserEditPermission(user.getId(),userIsAdmin)); |
| | | return userDTO; |
| | | }else{ |
| | | return null; |
| | |
| | | b.salesman |
| | | from |
| | | sd.customer as a |
| | | left join (select o.project,o.salesman_id,o.salesman,o.customer_id |
| | | from sd.order as o |
| | | group by o.customer_id |
| | | order by o.id desc) as b |
| | | left join (SELECT |
| | | t.* |
| | | FROM |
| | | ( |
| | | SELECT |
| | | ROW_NUMBER() over ( PARTITION BY o.customer_id ORDER BY o.id DESC ) AS rn, |
| | | o.id, |
| | | o.project, |
| | | o.salesman_id, |
| | | o.salesman, |
| | | o.customer_id |
| | | FROM |
| | | sd.ORDER AS o |
| | | ) t |
| | | WHERE |
| | | rn = 1) as b |
| | | on a.id = b.customer_id |
| | | |
| | | </select> |
| | |
| | | <result column="creator" property="delivery.creator"/> |
| | | <result column="salesman" property="delivery.salesman"/> |
| | | |
| | | <result column="product_id" property="orderDetail.productId"/> |
| | | <result column="product_name" property="orderDetail.productName"/> |
| | | |
| | | |
| | | |
| | | </resultMap> |
| | |
| | | order by dd.delivery_id,dd.delivery_number |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectDeliveryDetailProductReport" resultMap="selectDeliveryDetail"> |
| | | select dd.delivery_id, |
| | | dd.delivery_number, |
| | | od.product_id, |
| | | od.product_name, |
| | | d.payment_terms, |
| | | d.project, |
| | | d.customer_id, |
| | | d.customer_name, |
| | | d.delivery_date, |
| | | d.pay_method, |
| | | d.pay_date, |
| | | d.salesman, |
| | | d.creator, |
| | | d.contacts, |
| | | d.contact_number, |
| | | d.delivery_address, |
| | | dd.order_id, |
| | | dd.order_number, |
| | | sum(dd.area) as area, |
| | | sum(dd.money) as money, |
| | | sum(dd.quantity) as quantity, |
| | | dd.delivery_detail_remakes, |
| | | dd.create_time |
| | | from sd.delivery_detail dd left join delivery d on dd.delivery_id=d.delivery_id |
| | | left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | | <where> |
| | | and date(dd.create_time)>=#{startDate} and date(dd.create_time) <= #{endDate} |
| | | <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.deliveryNumber != null and deliveryDetail.deliveryNumber != ''"> |
| | | and dd.delivery_number like concat('%',#{deliveryDetail.deliveryNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.orderId != null and deliveryDetail.orderId != ''"> |
| | | and dd.order_id like concat('%', #{deliveryDetail.orderId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.orderNumber != null and deliveryDetail.orderNumber != ''"> |
| | | and dd.order_number like concat('%', #{deliveryDetail.orderNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.area != null and deliveryDetail.area != ''"> |
| | | and dd.area like concat('%', #{deliveryDetail.area},'%') |
| | | </if> |
| | | <if test="deliveryDetail.money != null and deliveryDetail.money != ''"> |
| | | and dd.money like concat('%', #{deliveryDetail.money},'%') |
| | | </if> |
| | | <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''"> |
| | | and dd.quantity like concat('%', #{deliveryDetail.quantity},'%') |
| | | </if> |
| | | <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes like concat('%', #{deliveryDetail.deliveryDetailRemakes},'%') |
| | | </if> |
| | | <if test="deliveryDetail.createTime != null and deliveryDetail.createTime != ''"> |
| | | and dd.create_time like concat('%', #{deliveryDetail.createTime},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.paymentTerms != null and deliveryDetail.delivery.paymentTerms != '')"> |
| | | and d.payment_terms like concat('%', #{deliveryDetail.delivery.paymentTerms},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.project != null and deliveryDetail.delivery.project != '')"> |
| | | and d.project like concat('%', #{deliveryDetail.delivery.project},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.customerId != null and deliveryDetail.delivery.customerId != '')"> |
| | | and d.customer_id like concat('%', #{deliveryDetail.delivery.customerId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.customerName != null and deliveryDetail.delivery.customerName != '')"> |
| | | and d.customer_name like concat('%', #{deliveryDetail.delivery.customerName},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.deliveryDate != null and deliveryDetail.delivery.deliveryDate != '')"> |
| | | and d.delivery_date like concat('%', #{deliveryDetail.delivery.deliveryDate},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.payMethod != null and deliveryDetail.delivery.payMethod != '')"> |
| | | and d.pay_method like concat('%', #{deliveryDetail.delivery.payMethod},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.payDate != null and deliveryDetail.delivery.payDate != '')"> |
| | | and d.pay_date like concat('%', #{deliveryDetail.delivery.payDate},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.salesman != null and deliveryDetail.delivery.salesman != '')"> |
| | | and d.salesman like concat('%', #{deliveryDetail.delivery.salesman},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.creator != null and deliveryDetail.delivery.creator != '')"> |
| | | and d.creator like concat('%', #{deliveryDetail.delivery.creator},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.contacts != null and deliveryDetail.delivery.contacts != '')"> |
| | | and d.contacts like concat('%', #{deliveryDetail.delivery.contacts},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.contactNumber != null and deliveryDetail.delivery.contactNumber != '')"> |
| | | and d.contact_number like concat('%', #{deliveryDetail.delivery.contactNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.deliveryAddress != null and deliveryDetail.delivery.deliveryAddress != '')"> |
| | | and d.delivery_address like concat('%', #{deliveryDetail.delivery.deliveryAddress},'%') |
| | | </if> |
| | | <if test="deliveryDetail.orderDetail!=null and (deliveryDetail.orderDetail.productName != null and deliveryDetail.orderDetail.productName != '')"> |
| | | and od.product_id like concat('%', #{deliveryDetail.orderDetail.productName},'%') |
| | | </if> |
| | | <if test="deliveryDetail.orderDetail!=null and (deliveryDetail.orderDetail.productId != null and deliveryDetail.orderDetail.productId != '')"> |
| | | and od.product_name like concat('%', #{deliveryDetail.orderDetail.productId},'%') |
| | | </if> |
| | | |
| | | </where> |
| | | group by dd.delivery_id,od.product_id |
| | | order by dd.delivery_id,dd.delivery_number |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectDeliveryDetailProductReportPageTotal"> |
| | | select |
| | | CEILING(count(zu.id)/#{pageSize}) as 'pageTotal', |
| | | count(zu.id) as 'total' from ( |
| | | select dd.id as id |
| | | from sd.delivery_detail dd left join delivery d on dd.delivery_id=d.delivery_id |
| | | left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | | <where> |
| | | and date(dd.create_time)>=#{startDate} and date(dd.create_time) <= #{endDate} |
| | | <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''"> |
| | | and dd.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.deliveryNumber != null and deliveryDetail.deliveryNumber != ''"> |
| | | and dd.delivery_number like concat('%',#{deliveryDetail.deliveryNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.orderId != null and deliveryDetail.orderId != ''"> |
| | | and dd.order_id like concat('%', #{deliveryDetail.orderId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.orderNumber != null and deliveryDetail.orderNumber != ''"> |
| | | and dd.order_number like concat('%', #{deliveryDetail.orderNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.area != null and deliveryDetail.area != ''"> |
| | | and dd.area like concat('%', #{deliveryDetail.area},'%') |
| | | </if> |
| | | <if test="deliveryDetail.money != null and deliveryDetail.money != ''"> |
| | | and dd.money like concat('%', #{deliveryDetail.money},'%') |
| | | </if> |
| | | <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''"> |
| | | and dd.quantity like concat('%', #{deliveryDetail.quantity},'%') |
| | | </if> |
| | | <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes like concat('%', #{deliveryDetail.deliveryDetailRemakes},'%') |
| | | </if> |
| | | <if test="deliveryDetail.createTime != null and deliveryDetail.createTime != ''"> |
| | | and dd.create_time like concat('%', #{deliveryDetail.createTime},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.paymentTerms != null and deliveryDetail.delivery.paymentTerms != '')"> |
| | | and d.payment_terms like concat('%', #{deliveryDetail.delivery.paymentTerms},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.project != null and deliveryDetail.delivery.project != '')"> |
| | | and d.project like concat('%', #{deliveryDetail.delivery.project},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.customerId != null and deliveryDetail.delivery.customerId != '')"> |
| | | and d.customer_id like concat('%', #{deliveryDetail.delivery.customerId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.customerName != null and deliveryDetail.delivery.customerName != '')"> |
| | | and d.customer_name like concat('%', #{deliveryDetail.delivery.customerName},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.deliveryDate != null and deliveryDetail.delivery.deliveryDate != '')"> |
| | | and d.delivery_date like concat('%', #{deliveryDetail.delivery.deliveryDate},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.payMethod != null and deliveryDetail.delivery.payMethod != '')"> |
| | | and d.pay_method like concat('%', #{deliveryDetail.delivery.payMethod},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.payDate != null and deliveryDetail.delivery.payDate != '')"> |
| | | and d.pay_date like concat('%', #{deliveryDetail.delivery.payDate},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.salesman != null and deliveryDetail.delivery.salesman != '')"> |
| | | and d.salesman like concat('%', #{deliveryDetail.delivery.salesman},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.creator != null and deliveryDetail.delivery.creator != '')"> |
| | | and d.creator like concat('%', #{deliveryDetail.delivery.creator},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.contacts != null and deliveryDetail.delivery.contacts != '')"> |
| | | and d.contacts like concat('%', #{deliveryDetail.delivery.contacts},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.contactNumber != null and deliveryDetail.delivery.contactNumber != '')"> |
| | | and d.contact_number like concat('%', #{deliveryDetail.delivery.contactNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.deliveryAddress != null and deliveryDetail.delivery.deliveryAddress != '')"> |
| | | and d.delivery_address like concat('%', #{deliveryDetail.delivery.deliveryAddress},'%') |
| | | </if> |
| | | <if test="deliveryDetail.orderDetail!=null and (deliveryDetail.orderDetail.productName != null and deliveryDetail.orderDetail.productName != '')"> |
| | | and od.product_id like concat('%', #{deliveryDetail.orderDetail.productName},'%') |
| | | </if> |
| | | <if test="deliveryDetail.orderDetail!=null and (deliveryDetail.orderDetail.productId != null and deliveryDetail.orderDetail.productId != '')"> |
| | | and od.product_name like concat('%', #{deliveryDetail.orderDetail.productId},'%') |
| | | </if> |
| | | |
| | | </where> |
| | | group by dd.delivery_id,od.product_id) as zu |
| | | </select> |
| | | |
| | | <select id="getSelectDeliveryPrinting" resultMap="selectDeliveryDetailOrderDetail" > |
| | | select dd.delivery_id,od.order_id,od.product_id,od.product_name,sum(dd.area) as area,sum(dd.money) as money,sum(dd.quantity) as quantity from |
| | | delivery_detail dd left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerBatch != null and orderDetail.order.customerBatch != ''"> |
| | | and b.customer_batch like concat('%',#{orderDetail.order.customerBatch},'%') |
| | | </if> |
| | | order by a.id desc |
| | | </select> |
| | | |
| | | <select id="exportOrderReport"> |
| | |
| | | on d.type_id = c.type_id |
| | | left join sd.basic_glass_type as e |
| | | on e.type_id = d.belong |
| | | where date(a.create_time)>=#{dates[0]} and date(a.create_time) <= #{dates[1]} |
| | | |
| | | </select> |
| | | |
| | | |
| | | <!--获取订单产品汇总--> |
| | | |
| | | <select id="getOrderProductSummary" resultMap="orderMap"> |
| | | SELECT |
| | | b.order_type, |
| | | b.customer_name, |
| | | b.project, |
| | | a.order_id, |
| | | b.batch, |
| | | a.product_id, |
| | | a.product_name, |
| | | sum(a.quantity) as quantity, |
| | | sum(a.gross_area) as gross_area, |
| | | sum(a.compute_gross_area) as compute_gross_area, |
| | | a.edging_type, |
| | | b.pack_type, |
| | | round(sum(a.perimeter),2) as perimeter, |
| | | a.price, |
| | | sum(a.gross_amount ) as gross_amount, |
| | | b.al_type, |
| | | b.salesman, |
| | | b.delivery_address, |
| | | b.creator, |
| | | a.create_time, |
| | | b.customer_batch, |
| | | |
| | | |
| | | |
| | | |
| | | c.*, |
| | | a.create_time as createTime, |
| | | d.type_name as levelOne, |
| | | e.type_name as levelTwo |
| | | from order_detail as a |
| | | left join sd.`order` as b |
| | | on b.order_id = a.order_id |
| | | left join sd.product as c |
| | | on c.id = a.product_id |
| | | left join sd.basic_glass_type as d |
| | | on d.type_id = c.type_id |
| | | left join sd.basic_glass_type as e |
| | | on e.type_id = d.belong |
| | | where date(b.create_time)>=#{startDate} and date(b.create_time) <= #{endDate} |
| | | |
| | | <if test="orderDetail.order!=null and (orderDetail.order.orderType != null and orderDetail.order.orderType != '')"> |
| | | and b.order_type like concat('%',#{orderDetail.order.orderType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and b.customer_id like concat('%',#{orderDetail.order.customerId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and b.project like concat('%',#{orderDetail.order.project},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.orderId != null and orderDetail.order.orderId != ''"> |
| | | and b.order_id like concat('%',#{orderDetail.order.orderId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and b.batch like concat('%',#{orderDetail.order.batch},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and a.product_id like concat('%',#{orderDetail.productId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and a.product_name like concat('%',#{orderDetail.productName},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''"> |
| | | and a.order_number like concat('%',#{orderDetail.orderNumber},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and a.width like concat('%',#{orderDetail.width},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and a.height like concat('%',#{orderDetail.height},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | | and a.quantity like concat('%',#{orderDetail.quantity},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.bendRadius != null and orderDetail.bendRadius != ''"> |
| | | and a.bend_radius like concat('%',#{orderDetail.bendRadius},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and a.gross_area like concat('%',#{orderDetail.grossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and a.shape like concat('%',#{orderDetail.shape},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''"> |
| | | and a.edging_type like concat('%',#{orderDetail.edgingType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.processingNote != null and orderDetail.order.processingNote != ''"> |
| | | and b.processing_note like concat('%',#{orderDetail.order.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''"> |
| | | and a.processing_note like concat('%',#{orderDetail.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.icon != null and orderDetail.order.icon != ''"> |
| | | and b.icon like concat('%',#{orderDetail.order.icon},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.packType != null and orderDetail.order.packType != ''"> |
| | | and b.pack_type like concat('%',#{orderDetail.order.packType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''"> |
| | | and a.perimeter like concat('%',#{orderDetail.perimeter},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.price != null and orderDetail.price != ''"> |
| | | and a.price like concat('%',#{orderDetail.price},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''"> |
| | | and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.alType != null and orderDetail.order.alType != ''"> |
| | | and b.al_type like concat('%',#{orderDetail.order.alType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.salesman != null and orderDetail.order.salesman != ''"> |
| | | and b.salesman like concat('%',#{orderDetail.order.salesman},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.deliveryAddress != null and orderDetail.order.deliveryAddress != ''"> |
| | | and b.delivery_address like concat('%',#{orderDetail.order.deliveryAddress},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.creator != null and orderDetail.order.creator != ''"> |
| | | and b.creator like concat('%',#{orderDetail.order.creator},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.totalThickness != null and orderDetail.totalThickness != ''"> |
| | | and c.total_thickness like concat('%',#{orderDetail.totalThickness},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelOne != null and orderDetail.levelOne != ''"> |
| | | and d.type_name like concat('%',#{orderDetail.levelOne},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelTwo != null and orderDetail.levelTwo != ''"> |
| | | and e.type_name like concat('%',#{orderDetail.levelTwo},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerBatch != null and orderDetail.order.customerBatch != ''"> |
| | | and b.customer_batch like concat('%',#{orderDetail.order.customerBatch},'%') |
| | | </if> |
| | | group by b.order_id,a.product_id |
| | | order by b.order_id desc |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | |
| | | |
| | | <select id="getOrderProductSummaryTotal" > |
| | | select ss.pageTotal,count(ss.total) as 'total' from( SELECT |
| | | CEILING(count(a.id)/#{pageSize}) as 'pageTotal', |
| | | count(a.id) as 'total' |
| | | from order_detail as a |
| | | left join sd.`order` as b |
| | | on b.order_id = a.order_id |
| | | left join sd.product as c |
| | | on c.id = a.product_id |
| | | left join sd.basic_glass_type as d |
| | | on d.type_id = c.type_id |
| | | left join sd.basic_glass_type as e |
| | | on e.type_id = d.belong |
| | | where date(b.create_time)>=#{startDate} and date(b.create_time) <= #{endDate} |
| | | <if test="orderDetail.order!=null and (orderDetail.order.orderType != null and orderDetail.order.orderType != '')"> |
| | | and b.order_type like concat('%',#{orderDetail.order.orderType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerId != null and orderDetail.order.customerId != ''"> |
| | | and b.customer_id like concat('%',#{orderDetail.order.customerId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.project != null and orderDetail.order.project != ''"> |
| | | and b.project like concat('%',#{orderDetail.order.project},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.orderId != null and orderDetail.order.orderId != ''"> |
| | | and b.order_id like concat('%',#{orderDetail.order.orderId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.batch != null and orderDetail.order.batch != ''"> |
| | | and b.batch like concat('%',#{orderDetail.order.batch},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and a.product_id like concat('%',#{orderDetail.productId},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and a.product_name like concat('%',#{orderDetail.productName},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''"> |
| | | and a.order_number like concat('%',#{orderDetail.orderNumber},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and a.width like concat('%',#{orderDetail.width},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and a.height like concat('%',#{orderDetail.height},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | | and a.quantity like concat('%',#{orderDetail.quantity},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.bendRadius != null and orderDetail.bendRadius != ''"> |
| | | and a.bend_radius like concat('%',#{orderDetail.bendRadius},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and a.gross_area like concat('%',#{orderDetail.grossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | | and a.shape like concat('%',#{orderDetail.shape},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.edgingType != null and orderDetail.edgingType != ''"> |
| | | and a.edging_type like concat('%',#{orderDetail.edgingType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.processingNote != null and orderDetail.order.processingNote != ''"> |
| | | and b.processing_note like concat('%',#{orderDetail.order.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.processingNote != null and orderDetail.processingNote != ''"> |
| | | and a.processing_note like concat('%',#{orderDetail.processingNote},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.icon != null and orderDetail.order.icon != ''"> |
| | | and b.icon like concat('%',#{orderDetail.order.icon},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.packType != null and orderDetail.order.packType != ''"> |
| | | and b.pack_type like concat('%',#{orderDetail.order.packType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.perimeter != null and orderDetail.perimeter != ''"> |
| | | and a.perimeter like concat('%',#{orderDetail.perimeter},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.price != null and orderDetail.price != ''"> |
| | | and a.price like concat('%',#{orderDetail.price},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''"> |
| | | and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.alType != null and orderDetail.order.alType != ''"> |
| | | and b.al_type like concat('%',#{orderDetail.order.alType},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.salesman != null and orderDetail.order.salesman != ''"> |
| | | and b.salesman like concat('%',#{orderDetail.order.salesman},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.deliveryAddress != null and orderDetail.order.deliveryAddress != ''"> |
| | | and b.delivery_address like concat('%',#{orderDetail.order.deliveryAddress},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.creator != null and orderDetail.order.creator != ''"> |
| | | and b.creator like concat('%',#{orderDetail.order.creator},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.totalThickness != null and orderDetail.totalThickness != ''"> |
| | | and c.total_thickness like concat('%',#{orderDetail.totalThickness},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelOne != null and orderDetail.levelOne != ''"> |
| | | and d.type_name like concat('%',#{orderDetail.levelOne},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.levelTwo != null and orderDetail.levelTwo != ''"> |
| | | and e.type_name like concat('%',#{orderDetail.levelTwo},'%') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.customerBatch != null and orderDetail.order.customerBatch != ''"> |
| | | and b.customer_batch like concat('%',#{orderDetail.order.customerBatch},'%') |
| | | </if> |
| | | group by b.order_id,a.product_id |
| | | ) as ss |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | if(d.page=null || d.page='','',concat(d.page, '.')), |
| | | d.permission |
| | | ) as 'permission' |
| | | <if test="loginId!=1"> |
| | | <if test="userIsAdmin==false"> |
| | | from user as a |
| | | left join user_role as e |
| | | on e.user_id = a.id |
| | |
| | | where a.id = #{loginId} |
| | | |
| | | </if> |
| | | <if test="loginId==1"> |
| | | <if test="userIsAdmin==true"> |
| | | from permission_basic d |
| | | where d.permission='edit' |
| | | </if> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.userInfo.UserRoleMapper"> |
| | | <select id="getUserIsAdmin"> |
| | | SELECT count(*) |
| | | FROM user_role |
| | | where |
| | | user_id = #{id} |
| | | and |
| | | role_id = 1 |
| | | </select> |
| | | </mapper> |