Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
# Conflicts:
# north-glass-erp/target/classes/mapper/userInfo/PermissionRoleMapper.xml
29个文件已修改
1 文件已重命名
2个文件已添加
| | |
| | | switch (newVal){ |
| | | case 401:{ |
| | | if(userStore.msg.split('.')[1] === 'search'){ |
| | | router.push({path:'/main/order/notPermission'}); |
| | | router.push({path:'/main/user/notPermission'}); |
| | | }else{ |
| | | ElMessage.warning(t('error.Code_401')) |
| | | } |
| | |
| | | component: () => import('../views/system/user/User.vue'), |
| | | children:[ |
| | | { |
| | | path: 'notPermission', |
| | | name: 'notPermission', |
| | | component: () => import('../views/system/user/NotPermission.vue'), |
| | | }, |
| | | { |
| | | path: 'userList', |
| | | name: 'userList', |
| | | component: () => import('../views/system/user/UserList.vue') |
| | |
| | | name: 'order', |
| | | component: () => import('../views/sd/order/Order.vue'), |
| | | children:[ |
| | | { |
| | | path: 'notPermission', |
| | | name: 'notPermission', |
| | | component: () => import('../views/sd/order/NotPermission.vue'), |
| | | }, |
| | | |
| | | { |
| | | path: 'selectOrder', |
| | | name: 'selectOrder', |
| | |
| | | <script setup> |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | alert('我接收到子组件传送的反审状态') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | let filterData = ref({}) |
| | | //提交的表单 |
| | | const form = reactive({ |
| | | date1: '', |
| | | orderId: '', |
| | | project: '' |
| | | }) |
| | | |
| | | //工序 |
| | | const value = ref('磨边') |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | //定义滚动条高度 |
| | | let scrollTop = ref(null) |
| | | let scrollHeight = ref(null) |
| | | let clientHeight = ref(null) |
| | | const scrollEvnt = (row) => { |
| | | // 内容高度 |
| | | scrollTop.value = row.$event.target.scrollTop |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = ref(1) |
| | | let pageState = null |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime() + 3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | let total = reactive({ |
| | | pageTotal: 0, |
| | | dataTotal: 0, |
| | | pageSize: 100 |
| | | }) |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | | }) |
| | | //第一次加载数据 |
| | | request.post(`/report/selectProcessToBeCompleted/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | // total.dataTotal = res.data.total.total*1 |
| | | // total.pageTotal= res.data.total.pageTotal |
| | | // pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.processType = res.data.process |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //页脚翻页查询 |
| | | const selectPageList = () => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | |
| | | request.post(`/report/selectProcessToBeCompleted/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | request.post(`/report/selectProcessToBeCompleted/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | // total.dataTotal = res.data.total.total*1 |
| | | // total.pageTotal= res.data.total.pageTotal |
| | | // pageTotal.value = res.data.total |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({currentPage, pageSize}) => { |
| | | pageNum.value = currentPage |
| | | total.pageTotal = pageSize |
| | | selectPageList() |
| | | } |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | // const changeFilterEvent = (event, option, $panel,) => { |
| | | // // 手动触发筛选 |
| | | // $panel.changeOption(event, !!option.data, option) |
| | | // } |
| | | |
| | | // function filterChanged(column){ |
| | | // //gridOptions.loading=true |
| | | // //筛选条件发生变化条件发生变化 |
| | | // let value = column.datas[0]!=undefined?column.datas[0]:'' |
| | | // value = value.trim() |
| | | // //判断是否存在外键 |
| | | // if (column.property.indexOf('.')>-1){ |
| | | // const columnArr = column.property.split('.') |
| | | // filterData.value[columnArr[0]] = { |
| | | // [columnArr[1]]:value |
| | | // } |
| | | // }else{ |
| | | // filterData.value[column.property] = value |
| | | // } |
| | | // |
| | | // gridOptions.loading = true |
| | | // |
| | | // } |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | scrollY: {enabled: true},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: '1', title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: '2', title: '单片名称', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '3',title: '未完数', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '4', title: '未完面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'seq', fixed: "left", title: '自序', width: 50}, |
| | | {field: 'create_time', width: 120, title: '下单时间'}, |
| | | {field: 'delivery_date', width: 120, title: '交货日期'}, |
| | | { |
| | | field: 'order_id', width: 120, title: '销售单号', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'process_id', |
| | | width: 120, |
| | | title: '流程卡号', |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'customer_name', width: 130, title: '客户名称', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'project', width: 120, title: '项目名称', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'batch', width: 100, title: '批次', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'order_number', width: 100, title: '序号'}, |
| | | {field: 'technology_number', width: 120, title: '小片顺序', showOverflow: "ellipsis"}, |
| | | {field: 'glass_child', width: 100, title: '单片名称'}, |
| | | {field: 'child_width', width: 120, title: '宽'}, |
| | | {field: 'child_height', width: 120, title: '高'}, |
| | | {field: 'quantity', width: 120, title: '订单数量'}, |
| | | {field: 'childArea', width: 120, title: '单片面积'}, |
| | | {field: 'actualArea', width: 120, title: '实际面积'}, |
| | | {field: 'completeNum', width: 120, title: '已完成数量'}, |
| | | {field: 'completeArea', width: 120, title: '已完成面积'}, |
| | | {field: 'incompleteNum', width: 120, title: '未完成数量'}, |
| | | {field: 'incompleteArea', width: 120, title: '未完成面积'}, |
| | | {field: 'product_name', width: 120, title: '成品名称'}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 1:'新安北玻产业园', |
| | | 2:'19mm超白平钢', |
| | | 3:'1', |
| | | 4:'3.11', |
| | | }, |
| | | { |
| | | 1:'新安北玻产业园', |
| | | 2:'19mm超白平钢', |
| | | 3:'1', |
| | | 4:'3.11', |
| | | }, |
| | | { |
| | | 1:'新安北玻产业园', |
| | | 2:'19mm超白平钢', |
| | | 3:'1', |
| | | 4:'3.11', |
| | | }, |
| | | { |
| | | 1:'新安北玻产业园', |
| | | 2:'19mm超白平钢', |
| | | 3:'1', |
| | | 4:'3.11', |
| | | }, |
| | | ],//table body实际数据 |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['finishedNumber','finishedArea','wornNumber','wornArea'] |
| | | return[ |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = [''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | |
| | | |
| | | }) |
| | | |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: 'Option1', |
| | | label: 'Option1', |
| | | }, |
| | | { |
| | | value: 'Option2', |
| | | label: 'Option2', |
| | | }, |
| | | { |
| | | value: 'Option3', |
| | | label: 'Option3', |
| | | }, |
| | | ] |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | |
| | | }) |
| | | |
| | | </script> |
| | | |
| | |
| | | |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | :default-time="defaultTime" |
| | | format="YYYY/MM/DD" |
| | | start-placeholder="开始时间" |
| | | style="width: 100px" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | /> |
| | | |
| | | <el-select v-model="value" class="m-2" placeholder="查询类型"> |
| | | <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 130px"></el-input> |
| | | |
| | | <el-input v-model="form.project" clearable placeholder="项目名称" style="width: 130px"></el-input> |
| | | |
| | | <el-select v-model="value" clearable default-value="default_city" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | | :label="item.basic_name" |
| | | :value="item.basic_name" |
| | | /> |
| | | </el-select> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button type="primary" @click="getWorkOrder">查询</el-button> |
| | | </el-row> |
| | | |
| | | </div> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | |
| | | > |
| | |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button> |
| | | <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">反审</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'edit')">编辑</el-button> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'setType')">反审</el-button> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'delete')">删除</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | .main-div-customer { |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | |
| | | #selectForm { |
| | | width: 60%; |
| | | text-align: center; |
| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | alert('我接收到子组件传送的反审状态') |
| | | break |
| | | } |
| | | } |
| | | } |
| | | //提交的表单 |
| | | const form = reactive({ |
| | | date1: '', |
| | | orderId: '' |
| | | }) |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | //定义滚动条高度 |
| | | let scrollTop = ref(null) |
| | | let scrollHeight = ref(null) |
| | | let clientHeight = ref(null) |
| | | const scrollEvnt = (row) => { |
| | | // 内容高度 |
| | | scrollTop.value = row.$event.target.scrollTop |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum=ref(1) |
| | | let pageState = null |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime()- 3600 * 1000 * 24 * 7) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0,10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime()+3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0,10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1=getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 100 |
| | | }) |
| | | //第一次加载数据 |
| | | request.post(`/reportingWork/selectReportingWork/1/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //页脚翻页查询 |
| | | const selectPageList = ()=>{ |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | request.post(`/reportingWork/selectReportingWork/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | |
| | | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | request.post(`/reportingWork/selectReportingWork/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | pageNum.value=currentPage |
| | | total.pageTotal = pageSize |
| | | selectPageList() |
| | | } |
| | | |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | function filterChanged(column) { |
| | | gridOptions.loading = true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0] != undefined ? column.datas[0] : '' |
| | | value = value.trim() |
| | | //判断是否存在外键 |
| | | if (column.property.indexOf('.') > -1) { |
| | | const columnArr = column.property.split('.') |
| | | filterData.value[columnArr[0]] = { |
| | | [columnArr[1]]: value |
| | | } |
| | | } else { |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | //获取选中时间 |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | |
| | | request.post(`/reportingWork/selectReportingWork/1/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | pageTotal.value=res.data.total |
| | | total.pageTotal=parseInt(res.data.total) |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 1:'武汉安铭华侨城', |
| | | 2:'23第1批', |
| | | 3:'N0231210', |
| | | 4:'平钢', |
| | | 5:'10mm超白UD60', |
| | | 6:'山东全品', |
| | | 7:'3360', |
| | | 8:'4567', |
| | | 9:'6', |
| | | 10:'22.76', |
| | | 11:'2023-10-22', |
| | | |
| | | }, |
| | | { |
| | | 1:'武汉安铭华侨城', |
| | | 2:'23第1批', |
| | | 3:'N0231210', |
| | | 4:'平钢', |
| | | 5:'10mm超白UD60', |
| | | 6:'山东全品', |
| | | 7:'3360', |
| | | 8:'4567', |
| | | 9:'6', |
| | | 10:'22.76', |
| | | 11:'2023-10-22', |
| | | |
| | | }, |
| | | { |
| | | 1:'武汉安铭华侨城', |
| | | 2:'23第1批', |
| | | 3:'N0231210', |
| | | 4:'平钢', |
| | | 5:'10mm超白UD60', |
| | | 6:'山东全品', |
| | | 7:'3360', |
| | | 8:'4567', |
| | | 9:'6', |
| | | 10:'22.76', |
| | | 11:'2023-10-22', |
| | | |
| | | }, |
| | | { |
| | | 1:'武汉安铭华侨城', |
| | | 2:'23第1批', |
| | | 3:'N0231210', |
| | | 4:'平钢', |
| | | 5:'10mm超白UD60', |
| | | 6:'山东全品', |
| | | 7:'3360', |
| | | 8:'4567', |
| | | 9:'6', |
| | | 10:'22.76', |
| | | 11:'2023-10-22', |
| | | |
| | | }, |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | |
| | | |
| | | }) |
| | | |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: 'Option1', |
| | | label: 'Option1', |
| | | }, |
| | | { |
| | | value: 'Option2', |
| | | label: 'Option2', |
| | | }, |
| | | { |
| | | value: 'Option3', |
| | | label: 'Option3', |
| | | }, |
| | | ] |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | |
| | | }) |
| | | |
| | | </script> |
| | | |
| | |
| | | <el-menu-item index="/main/report/ProcessCardProgress">流程卡进度</el-menu-item> |
| | | <el-menu-item index="/main/report/OrderPlanDecomposition">订单计划分解</el-menu-item> |
| | | </el-sub-menu> |
| | | <el-sub-menu index="2" popper-class="test"> |
| | | <template #title>产量报表</template> |
| | | <el-menu-item index="/main/report/TeamOutput">班组产量</el-menu-item> |
| | | <el-menu-item index="/main/report/EquipmentOutput">设备产量</el-menu-item> |
| | | </el-sub-menu> |
| | | <!-- <el-sub-menu index="2" popper-class="test">--> |
| | | <!-- <template #title>产量报表</template>--> |
| | | <!-- <el-menu-item index="/main/report/TeamOutput">班组产量</el-menu-item>--> |
| | | <!-- <el-menu-item index="/main/report/EquipmentOutput">设备产量</el-menu-item>--> |
| | | <!-- </el-sub-menu>--> |
| | | <el-sub-menu index="3" popper-class="test"> |
| | | <template #title>次破报表</template> |
| | | <el-menu-item index="/main/report/DamageReport">次破报表</el-menu-item> |
| | |
| | | <el-menu-item index="/main/report/RawMaterialRequisition">原片领料</el-menu-item> |
| | | <el-menu-item index="/main/report/QualityReport">品质报表</el-menu-item> |
| | | <el-menu-item index="/main/report/Yield">成品率报表</el-menu-item> |
| | | <el-menu-item index="/main/report/OrderBOMOutside">BOM报表</el-menu-item> |
| | | <!-- <el-menu-item index="/main/report/OrderBOMOutside">BOM报表</el-menu-item>--> |
| | | </el-menu> |
| | | </div> |
| | | |
| | |
| | | <script setup> |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | let router=useRouter() |
| | | import {useRouter} from 'vue-router' |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElDatePicker, ElMessage} from "element-plus"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | let filterData = ref({}) |
| | | //提交的表单 |
| | | const form = reactive({ |
| | | date1: '', |
| | | orderId: '', |
| | | project: '' |
| | | }) |
| | | |
| | | //工序 |
| | | const value = ref('磨边') |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | //定义滚动条高度 |
| | | let scrollTop = ref(null) |
| | | let scrollHeight = ref(null) |
| | | let clientHeight = ref(null) |
| | | const scrollEvnt = (row) => { |
| | | // 内容高度 |
| | | scrollTop.value = row.$event.target.scrollTop |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = ref(1) |
| | | let pageState = null |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime() + 3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | | return [start, end] |
| | | } |
| | | |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | let total = reactive({ |
| | | pageTotal: 0, |
| | | dataTotal: 0, |
| | | pageSize: 100 |
| | | }) |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | processType: [], |
| | | }) |
| | | //第一次加载数据 |
| | | request.post(`/report/workInProgress/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | // total.dataTotal = res.data.total.total*1 |
| | | // total.pageTotal= res.data.total.pageTotal |
| | | // pageTotal.value = res.data.total |
| | | console.log(res.data.data) |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | titleSelectJson.value.processType = res.data.process |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //页脚翻页查询 |
| | | const selectPageList = () => { |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | |
| | | request.post(`/report/selectReportingWork/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | | let selectProcesses = value.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | let inputProject = form.project |
| | | if (inputProject == '') { |
| | | inputProject = null |
| | | } |
| | | console.log(startTime, endTime) |
| | | request.post(`/report/workInProgress/${startTime}/${endTime}/${inputVal}/${inputProject}/${selectProcesses}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | // total.dataTotal = res.data.total.total*1 |
| | | // total.pageTotal= res.data.total.pageTotal |
| | | // pageTotal.value = res.data.total |
| | | console.log(res.data.data) |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.reloadData(produceList) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({currentPage, pageSize}) => { |
| | | pageNum.value = currentPage |
| | | total.pageTotal = pageSize |
| | | selectPageList() |
| | | } |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | // const changeFilterEvent = (event, option, $panel,) => { |
| | | // // 手动触发筛选 |
| | | // $panel.changeOption(event, !!option.data, option) |
| | | // } |
| | | |
| | | // function filterChanged(column){ |
| | | // //gridOptions.loading=true |
| | | // //筛选条件发生变化条件发生变化 |
| | | // let value = column.datas[0]!=undefined?column.datas[0]:'' |
| | | // value = value.trim() |
| | | // //判断是否存在外键 |
| | | // if (column.property.indexOf('.')>-1){ |
| | | // const columnArr = column.property.split('.') |
| | | // filterData.value[columnArr[0]] = { |
| | | // [columnArr[1]]:value |
| | | // } |
| | | // }else{ |
| | | // filterData.value[column.property] = value |
| | | // } |
| | | // |
| | | // gridOptions.loading = true |
| | | // |
| | | // } |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 50},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | scrollY: {enabled: true},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: '1', width: 120, title: '工序',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: '2',width: 120, title: '流程卡号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '3', width: 130,title: '客户名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: '4',width: 120, title: '项目名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: '5', width: 100,title: '批次', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: '6', width: 100,title: '序号', sortable: true}, |
| | | {field: '7',width: 100, title: '形状', sortable: true}, |
| | | {field: '8',width: 120, title: '楼层编号', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: '9', width: 120,title: '工艺流程', sortable: true}, |
| | | {field: '10', width: 120,title: '订单数', sortable: true}, |
| | | {field: '11',width: 120, title: '宽', sortable: true}, |
| | | {field: '12',width: 120, title: '高', sortable: true}, |
| | | {field: '13',width: 120, title: '库存数', sortable: true}, |
| | | {field: '14',width: 120, title: '库存面积', sortable: true}, |
| | | {field: '15',width: 120, title: '成品名称', sortable: true}, |
| | | {field: '16',width: 120, title: '在制品名称', sortable: true}, |
| | | {field: '17',width: 120, title: '弯钢半径', sortable: true}, |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'seq', fixed: "left", title: '自序', width: 50}, |
| | | { |
| | | field: 'thisProcess', width: 120, title: '工序', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'process_id', |
| | | width: 120, |
| | | title: '流程卡号', |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'customer_name', width: 130, title: '客户名称', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'project', width: 120, title: '项目名称', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'batch', width: 100, title: '批次', filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'order_number', width: 100, title: '序号'}, |
| | | {field: 'technology_number', width: 120, title: '小片顺序', showOverflow: "ellipsis"}, |
| | | {field: 'shape', width: 100, title: '形状'}, |
| | | {field: 'process', width: 120, title: '工艺流程'}, |
| | | {field: 'quantity', width: 120, title: '订单数'}, |
| | | {field: 'child_width', width: 120, title: '宽'}, |
| | | {field: 'child_height', width: 120, title: '高'}, |
| | | {field: 'stockNum', width: 120, title: '库存数'}, |
| | | {field: 'stockArea', width: 120, title: '库存面积'}, |
| | | {field: 'product_name', width: 120, title: '成品名称'}, |
| | | {field: 'bend_radius', width: 120, title: '弯钢半径'}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | 1:'磨边', |
| | | 2:'NG22091906A02/1', |
| | | 3:'中国建筑装饰集团有限公司', |
| | | 4:'银川绿地中心南塔(25批2)', |
| | | 5:'25批2', |
| | | 6:'形状', |
| | | 7:'2', |
| | | 8:'25-BL19', |
| | | 9:'切割->镀膜->磨边->钢化->包装', |
| | | 10:'40', |
| | | 11:'1345', |
| | | 12:'1556', |
| | | 13:'1', |
| | | 14:'1.99', |
| | | 15:'8mm超白【LYTM-46】平钢', |
| | | 16:'8mm超白【LYTM-46】平钢', |
| | | 17:'0', |
| | | |
| | | }, |
| | | { |
| | | 1:'磨边', |
| | | 2:'NG22091906A02/1', |
| | | 3:'中国建筑装饰集团有限公司', |
| | | 4:'银川绿地中心南塔(25批2)', |
| | | 5:'25批2', |
| | | 6:'形状', |
| | | 7:'2', |
| | | 8:'25-BL19', |
| | | 9:'切割->镀膜->磨边->钢化->包装', |
| | | 10:'40', |
| | | 11:'1345', |
| | | 12:'1556', |
| | | 13:'1', |
| | | 14:'1.99', |
| | | 15:'8mm超白【LYTM-46】平钢', |
| | | 16:'8mm超白【LYTM-46】平钢', |
| | | 17:'0', |
| | | |
| | | }, |
| | | { |
| | | 1:'磨边', |
| | | 2:'NG22091906A02/1', |
| | | 3:'中国建筑装饰集团有限公司', |
| | | 4:'银川绿地中心南塔(25批2)', |
| | | 5:'25批2', |
| | | 6:'形状', |
| | | 7:'2', |
| | | 8:'25-BL19', |
| | | 9:'切割->镀膜->磨边->钢化->包装', |
| | | 10:'40', |
| | | 11:'1345', |
| | | 12:'1556', |
| | | 13:'1', |
| | | 14:'1.99', |
| | | 15:'8mm超白【LYTM-46】平钢', |
| | | 16:'8mm超白【LYTM-46】平钢', |
| | | 17:'0', |
| | | |
| | | }, |
| | | ],//table body实际数据 |
| | | data: [],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['finishedNumber','finishedArea','wornNumber','wornArea'] |
| | | return[ |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | let footList = [''] |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | |
| | | |
| | | }) |
| | | |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: 'Option1', |
| | | label: 'Option1', |
| | | }, |
| | | { |
| | | value: 'Option2', |
| | | label: 'Option2', |
| | | }, |
| | | { |
| | | value: 'Option3', |
| | | label: 'Option3', |
| | | }, |
| | | ] |
| | | |
| | | const form = reactive({ |
| | | name: '', |
| | | region: '', |
| | | date1: '', |
| | | date2: '', |
| | | delivery: false, |
| | | type: [], |
| | | resource: '', |
| | | desc: '', |
| | | |
| | | }) |
| | | |
| | | </script> |
| | | |
| | |
| | | |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | :default-time="defaultTime" |
| | | format="YYYY/MM/DD" |
| | | start-placeholder="开始时间" |
| | | style="width: 100px" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | /> |
| | | |
| | | <el-select v-model="value" class="m-2" placeholder="查询类型"> |
| | | <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 130px"></el-input> |
| | | |
| | | <el-input v-model="form.project" clearable placeholder="项目名称" style="width: 130px"></el-input> |
| | | |
| | | <el-select v-model="value" clearable default-value="default_city" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | v-for="item in titleSelectJson['processType']" |
| | | :key="item.id" |
| | | :label="item.basic_name" |
| | | :value="item.basic_name" |
| | | /> |
| | | </el-select> |
| | | <el-button type="primary">查询</el-button> |
| | | <el-button type="primary" @click="getWorkOrder">查询</el-button> |
| | | </el-row> |
| | | |
| | | </div> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | |
| | | > |
| | |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button> |
| | | <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">反审</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'edit')">编辑</el-button> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'setType')">反审</el-button> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'delete')">删除</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input v-model="option.data" type="type" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | .main-div-customer { |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | |
| | | #selectForm { |
| | | width: 60%; |
| | | text-align: center; |
| | |
| | | import request from "@/utils/request" |
| | | import {useRouter,useRoute} from "vue-router" |
| | | import {useI18n} from "vue-i18n" |
| | | import i18n from "@/lang/index" |
| | | const lang = i18n.global.locale.value |
| | | import {ElMessage, ElMessageBox} from "element-plus" |
| | | const { t } = useI18n() |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | const dialogVisible = ref(false) |
| | | let selectValue = ref(null) |
| | | let options = ref([]) |
| | | let selectValue = ref([null,null]) |
| | | let options = ref(null) |
| | | let checkId = ref(null) |
| | | |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | |
| | | buttons: [ |
| | | |
| | | ], |
| | | slots:{ |
| | | buttons: "role_add" |
| | | |
| | | }, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | checkboxConfig: { |
| | | checkField:'checked', |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | |
| | | |
| | | //表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | |
| | | ], |
| | | slots:{ |
| | | buttons: "toolbar_buttons" |
| | | buttons: "toolbar_buttons", |
| | | tools:'save_buttons' |
| | | |
| | | }, |
| | | buttons: [ |
| | | ], |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | |
| | | let columnsP = [ |
| | | { type: 'seq', width: 60 }, |
| | | { type: 'checkbox', width: 50 } |
| | | { type: 'checkbox', |
| | | width: 50 , |
| | | field:"checked", |
| | | |
| | | } |
| | | ] |
| | | const columnNameP = { |
| | | id: 'ID', |
| | |
| | | }) |
| | | |
| | | onMounted(()=>{ |
| | | request.get('/role/findAll').then(res=>{ |
| | | request.get(`/role/findAll`).then(res=>{ |
| | | gridOptions.data = res.data |
| | | }) |
| | | request.post('/permission/getPermissionList').then(res=>{ |
| | | request.post(`/permission/getPermissionList/${lang}`).then(res=>{ |
| | | options.value = res.data |
| | | }) |
| | | }) |
| | |
| | | switch (type) { |
| | | case 'edit': { |
| | | dialogVisible.value = true |
| | | checkId.value = row.id |
| | | break |
| | | } |
| | | } |
| | | } |
| | | |
| | | const getPermissionList = () => { |
| | | request.post(`/permission/getPermission/${2}`).then(res=>{ |
| | | permissionOptions.data = res.data |
| | | request.post(`/permission/getPermission/${checkId.value}/${lang}`,selectValue.value).then(res=>{ |
| | | pGrid.value.reloadData(res.data) |
| | | }) |
| | | } |
| | | |
| | | const selectChange = ()=>{ |
| | | console.log(selectValue.value) |
| | | const selectChange = () => { |
| | | getPermissionList() |
| | | } |
| | | |
| | | const saveBatch = () => { |
| | | const $grid = pGrid.value |
| | | if($grid.getCheckboxRecords().length === 0){ |
| | | ElMessage.warning("请先选择权限") |
| | | return |
| | | } |
| | | ElMessageBox.confirm( |
| | | '确认修改角色权限?', |
| | | 'Warning', |
| | | { |
| | | confirmButtonText: '确认', |
| | | cancelButtonText: '取消', |
| | | type: 'warning', |
| | | } |
| | | ).then(() => { |
| | | const permission = { |
| | | id: checkId.value, |
| | | detail: $grid.getCheckboxRecords() |
| | | } |
| | | request.post(`/permissionRole/savePermissionRole`,permission).then(res=>{ |
| | | if(res.data=== true && res.code==='200'){ |
| | | ElMessage.success('保存成功') |
| | | dialogVisible.value = false |
| | | getPermissionList() |
| | | }else{ |
| | | ElMessage.error('保存失败') |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | const addRole = () =>{ |
| | | ElMessageBox.prompt('请输入新角色', '新增角色', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | inputPattern:/^.{1,255}$/, |
| | | inputErrorMessage: '不能为空且长度不能超过255', |
| | | }) |
| | | .then(({ value }) => { |
| | | const role= { |
| | | role: value |
| | | } |
| | | request.post("/role/add",role).then(res=>{ |
| | | if(res.code==='200' && res.data===true){ |
| | | ElMessage.success('新增成功') |
| | | router.push({path:'/main/role/roleList',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.error('新增失败') |
| | | } |
| | | }) |
| | | }) |
| | | } |
| | | |
| | | </script> |
| | |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | > |
| | | <template #role_add> |
| | | <vxe-button |
| | | @click="addRole" |
| | | status='primary' |
| | | style="margin-right: 1rem" |
| | | >角色新增</vxe-button> |
| | | </template> |
| | | |
| | | |
| | | <template #filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | |
| | | @change="selectChange" |
| | | /> |
| | | </template> |
| | | <template #save_buttons> |
| | | <vxe-button |
| | | @click="saveBatch" |
| | | status='primary' |
| | | style="margin-right: 1rem" |
| | | >新增</vxe-button> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | |
| | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.pp.DamageDetails; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.Report; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | |
| | | |
| | | } |
| | | |
| | | @ApiOperation("在制品报表") |
| | | @PostMapping("/workInProgress/{selectTime1}/{selectTime2}/{orderId}/{inputProject}/{selectProcesses}") |
| | | public Result workInProgress( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String inputProject, |
| | | @PathVariable String selectProcesses, |
| | | @RequestBody Report report) { |
| | | return Result.seccess(reportService.workInProgressSv(selectTime1,selectTime2,orderId,inputProject,selectProcesses,report)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("工序待完成报表") |
| | | @PostMapping("/selectProcessToBeCompleted/{selectTime1}/{selectTime2}/{orderId}/{inputProject}/{selectProcesses}") |
| | | public Result selectProcessToBeCompleted( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String inputProject, |
| | | @PathVariable String selectProcesses, |
| | | @RequestBody Report report) { |
| | | return Result.seccess(reportService.selectProcessToBeCompletedSv(selectTime1,selectTime2,orderId,inputProject,selectProcesses,report)); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | package com.example.erp.controller.sd; |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import com.example.erp.service.sd.BasicDateService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/basicData") |
| | | @Api(value="订单基础controller",tags={"订单基础数据操作接口"}) |
| | | public class BasicDataController { |
| | | final |
| | | BasicDateService basicDateService; |
| | |
| | | public Result getBasicDataByTypeAndChildType(@PathVariable String type,@PathVariable String childType){ |
| | | return Result.seccess(basicDateService.getBasicDataByTypeAndChildType(type,childType)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("查询基础数据") |
| | | @SaCheckPermission("searchOrderBasicData.search") |
| | | @GetMapping("/getBasicData") |
| | | public Result getBasicData(){ |
| | | return Result.seccess(basicDateService.getBasicData()); |
| | | } |
| | | @ApiOperation("查询基础数据类型") |
| | | @SaCheckPermission("searchOrderBasicData.search") |
| | | @GetMapping("/getBasicDataType") |
| | | public Result getBasicDataType(){ |
| | | return Result.seccess(basicDateService.getBasicDataType()); |
| | | } |
| | | |
| | | @ApiOperation("新增基础数据") |
| | | @SaCheckPermission("searchOrderBasicData.add") |
| | | @PostMapping("addBasicData") |
| | | public Result addBasicData(@RequestBody Map<String,Object> map){ |
| | | return Result.seccess(basicDateService.addBasicData(map)); |
| | | } |
| | | |
| | | @ApiOperation("更新基础数据") |
| | | @SaCheckPermission("searchOrderBasicData.update") |
| | | @PostMapping("updateBasicData") |
| | | public Result updateBasicData(@RequestBody BasicData basicData){ |
| | | return Result.seccess(basicDateService.updateBasicData(basicData)); |
| | | } |
| | | |
| | | @ApiOperation("删除基础数据") |
| | | @SaCheckPermission("searchOrderBasicData.delete") |
| | | @PostMapping("deleteBasicData") |
| | | public Result deleteBasicData(@RequestBody BasicData basicData){ |
| | | return Result.seccess(basicDateService.deleteBasicData(basicData)); |
| | |
| | | |
| | | @ApiOperation("订单保存") |
| | | @PostMapping("/saveOrder") |
| | | @SaCheckPermission("createOrder.add") |
| | | public Result saveOrder(@RequestBody Map<String, Object> orderMap) throws Exception { |
| | | if(orderService.saveOrder(orderMap)) { |
| | | return Result.seccess(true); |
| | |
| | | } |
| | | |
| | | @ApiOperation("订单作废") |
| | | @SaCheckPermission("createOrder.cancel") |
| | | @PostMapping("/cancelOrder/{id}") |
| | | public Result cancelOrder(@PathVariable String id) { |
| | | return Result.seccess(orderService.cancelOrder(id)); |
| | | } |
| | | |
| | | @ApiOperation("根据id获取订单信息") |
| | | @SaCheckPermission("selectOrder.edit") |
| | | @PostMapping("/getOrderById/{id}") |
| | | public Result getOrderById(@PathVariable String id) { |
| | | return Result.seccess(orderService.getOrderById(id)); |
| | | } |
| | | @ApiOperation("查询订单工艺") |
| | | @SaCheckPermission("updateOrderCraft.search") |
| | | @PostMapping("/getOrderCraftById/{id}") |
| | | public Result getOrderCraftById(@PathVariable String id) { |
| | | return Result.seccess(orderService.getOrderCraftById(id)); |
| | | } |
| | | @ApiOperation("审核订单") |
| | | @SaCheckPermission("createOrder.review") |
| | | @PostMapping("/reviewOrderById/{id}/{status}") |
| | | public Result reviewOrderById(@PathVariable String id,@PathVariable Integer status) { |
| | | return Result.seccess(orderService.reviewOrderById(id,status)); |
| | | } |
| | | |
| | | @ApiOperation("审核工艺") |
| | | @SaCheckPermission("updateOrderCraft.review") |
| | | @PostMapping("/reviewProcessById/{id}/{status}") |
| | | public Result reviewProcessById(@PathVariable String id,@PathVariable Integer status,@RequestBody List<OrderGlassDetail> orderGlassDetails) { |
| | | return Result.seccess(orderService.reviewProcessById(id,status,orderGlassDetails)); |
| | | } |
| | | |
| | | @ApiOperation("更新订单金额单价") |
| | | @SaCheckPermission("createOrder.amountReset") |
| | | @PostMapping("/updateOrderMoney") |
| | | public Result updateOrderMoney(@RequestBody Map<String,Object> map) { |
| | | return Result.seccess(orderService.updateOrderMoney(map)); |
| | | } |
| | | |
| | | @SaCheckPermission("orderReport.search") |
| | | @ApiOperation("查询订单报表") |
| | | @PostMapping("/getOrderReport/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getOrderReport(@PathVariable Integer pageNum, |
| | |
| | | package com.example.erp.controller.sd; |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.Product; |
| | | import com.example.erp.service.sd.ProductService; |
| | |
| | | } |
| | | |
| | | @ApiOperation("产品查询接口") |
| | | @SaCheckPermission("selectProduct.search") |
| | | @PostMapping ("/{pageNum}/{pageSize}/{glassType}") |
| | | public Result defaultDateProduct(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> glassType, @RequestBody Product product){ |
| | | return Result.seccess(productService.defaultDateProduct(pageNum,pageSize,glassType,product)); |
| | | } |
| | | @ApiOperation("产品保存接口") |
| | | @SaCheckPermission("selectProduct.add") |
| | | @PostMapping("/saveProduct") |
| | | public Result saveProduct(@RequestBody Map<String,Object> product){ |
| | | return Result.seccess(productService.saveProduct(product)); |
| | | } |
| | | @ApiOperation("产品删除接口") |
| | | @SaCheckPermission("selectProduct.delete") |
| | | @PostMapping("/deleteProductById/{id}") |
| | | public Result deleteProductById(@PathVariable Integer id){ |
| | | return Result.seccess(productService.deleteProductById(id)); |
| | | } |
| | | |
| | | @ApiOperation("产品审核状态修改接口") |
| | | @SaCheckPermission("selectProduct.review") |
| | | @PostMapping("/updateProductStateById/{id}/{state}") |
| | | public Result updateProductStateById(@PathVariable Integer id,@PathVariable Integer state){ |
| | | return Result.seccess(productService.updateProductStateById(id,state)); |
| | | } |
| | | @ApiOperation("根据产品id查询产品接口") |
| | | @SaCheckPermission("selectProduct.edit") |
| | | @PostMapping("/selectProductById/{id}") |
| | | public Result selectProductById(@PathVariable Integer id){ |
| | | return Result.seccess(productService.selectProductById(id)); |
| | |
| | | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.service.userInfo.PermissionBasicService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping("/permission") |
| | |
| | | this.permissionBasicService = permissionBasicService; |
| | | } |
| | | |
| | | @PostMapping("getPermission/{userId}") |
| | | public Result getPermission(@PathVariable Integer userId){ |
| | | return Result.seccess(permissionBasicService.getPermission(userId)); |
| | | @PostMapping("getPermission/{roleId}/{lang}") |
| | | public Result getPermission(@PathVariable Integer roleId,@PathVariable String lang, @RequestBody List<Integer> selectPageId){ |
| | | return Result.seccess(permissionBasicService.getPermission(roleId,lang,selectPageId)); |
| | | } |
| | | |
| | | @PostMapping("getPermissionList") |
| | | public Result getPermission(){ |
| | | return Result.seccess(permissionBasicService.getPermissionList()); |
| | | @PostMapping("getPermissionList/{lang}") |
| | | public Result getPermission(@PathVariable String lang){ |
| | | return Result.seccess(permissionBasicService.getPermissionList(lang)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.example.erp.controller.userInfo; |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.service.userInfo.PermissionRoleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @Api(value="角色权限controller",tags={"角色权限操作接口"}) |
| | | @RequestMapping("/permissionRole") |
| | | public class PermissionRoleController { |
| | | private final PermissionRoleService permissionRoleService; |
| | | |
| | | public PermissionRoleController(PermissionRoleService permissionRoleService) { |
| | | this.permissionRoleService = permissionRoleService; |
| | | } |
| | | |
| | | |
| | | @ApiOperation("角色权限保存") |
| | | @SaCheckPermission("roleList.update") |
| | | @RequestMapping("/savePermissionRole") |
| | | public Result savePermissionRole(@RequestBody Map<String, Object> permissionRole) { |
| | | return Result.seccess(permissionRoleService.savePermissionRole(permissionRole)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.example.erp.controller.userInfo; |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.userInfo.Role; |
| | | import com.example.erp.service.userInfo.RoleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @Api(value="角色controller",tags={"角色操作接口"}) |
| | | @RequestMapping("/role") |
| | | public class RoleController { |
| | | private final RoleService roleService; |
| | |
| | | this.roleService = roleService; |
| | | } |
| | | |
| | | |
| | | @ApiOperation("查询所有角色") |
| | | @SaCheckPermission("roleList.search") |
| | | @GetMapping("/findAll") |
| | | public Result findAll(){ |
| | | return Result.seccess(roleService.findAll()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("新增角色") |
| | | @SaCheckPermission("roleList.add") |
| | | @PostMapping("/add") |
| | | public Result add(@RequestBody Role role){ |
| | | return Result.seccess(roleService.add(role)); |
| | | |
| | | } |
| | | } |
| | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.controller.dto.UserDTO; |
| | | import com.example.erp.service.userInfo.UserService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @Api(value="用户controller",tags={"用户操作接口"}) |
| | | @RequestMapping("/userInfo") |
| | | public class UserInfoController { |
| | | private final UserService userService; |
| | |
| | | } |
| | | |
| | | @PostMapping("/login") |
| | | @ApiOperation("用户登录") |
| | | public Result login(@RequestBody UserDTO userDTO) { |
| | | return Result.seccess(userService.doLogin(userDTO)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("用户退出") |
| | | @PostMapping("/logout") |
| | | public Result logout() { |
| | | return Result.seccess(userService.logout()); |
| | | } |
| | | |
| | | @ApiOperation("判断用户是否登录") |
| | | @PostMapping("/isLogin") |
| | | public Result isLogin() { |
| | | return Result.seccess(userService.isLogin()); } |
| | | |
| | | @SaCheckLogin |
| | | @ApiOperation("获取用户token") |
| | | @PostMapping("/getTokenInfo") |
| | | public Result userAdd() { |
| | | return Result.seccess(StpUtil.getTokenInfo()); |
| | | } |
| | | |
| | | |
| | | @SaCheckPermission("userList.delete") |
| | | @ApiOperation("删除用户") |
| | | @PostMapping("/userDelete/{id}") |
| | | public Result userDelete(@PathVariable Integer id) { |
| | | return Result.seccess(userService.userDelete(id)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("查询用户列表") |
| | | @SaCheckPermission("userList.search") |
| | | @GetMapping("findAll") |
| | | public Result findAll(){ |
| | | return Result.seccess(userService.findAll()); |
| | |
| | | package com.example.erp.controller.userInfo; |
| | | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.controller.dto.UserDTO; |
| | | import com.example.erp.service.userInfo.UserRoleService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @Api(value="用户角色controller",tags={"用户角色操作接口"}) |
| | | @RequestMapping("/userRole") |
| | | public class UserRoleController { |
| | | private final UserRoleService userRoleService; |
| | |
| | | this.userRoleService = userRoleService; |
| | | } |
| | | |
| | | |
| | | @ApiOperation("更新用户角色") |
| | | @SaCheckPermission("userList.update") |
| | | @PostMapping("/updateUserRole") |
| | | public Result updateUserRole(@RequestBody Map<String,Object> params) { |
| | | return Result.seccess(userRoleService.updateUserRole(params)); |
New file |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class Report { |
| | | @TableId(type = IdType.AUTO) |
| | | //工序 |
| | | private String process; |
| | | //流程卡号 |
| | | private String processId; |
| | | //客户名称 |
| | | private String customerName; |
| | | //项目名称 |
| | | private String project; |
| | | //销售单号 |
| | | private String orderId; |
| | | //批次 |
| | | private String batch; |
| | | //序号 |
| | | private String orderNumber; |
| | | //小片顺序 |
| | | private String technologyNumber; |
| | | //形状 |
| | | private String shape; |
| | | //工艺流程 |
| | | private String technologyFlow; |
| | | //订单数 |
| | | private String orderNum; |
| | | //宽 |
| | | private String childWidth; |
| | | //高 |
| | | private String childHeight; |
| | | //库存数 |
| | | private String stockNum; |
| | | //库存面积 |
| | | private String stockArea; |
| | | //产品名称 |
| | | private String productName; |
| | | //弯钢半径 |
| | | private String bendRadius; |
| | | |
| | | //单片面积 |
| | | private String childArea; |
| | | //实际面积 |
| | | private String actualArea; |
| | | //完成数量 |
| | | private String completeNum; |
| | | //完成面积 |
| | | private String completeArea; |
| | | //未完数量 |
| | | private String incompleteNum; |
| | | //未完面积 |
| | | private String incompleteArea; |
| | | } |
| | |
| | | package com.example.erp.entity.userInfo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String page; |
| | | private String permission; |
| | | private String state; |
| | | @TableField(select = false,exist = false) |
| | | private Boolean checked; |
| | | } |
| | |
| | | private Integer menuID; |
| | | private String itemName; |
| | | private String url; |
| | | private String menu; |
| | | private String languageType; |
| | | private Integer state; |
| | | private Integer listSort; |
| | |
| | | |
| | | |
| | | import com.example.erp.entity.pp.DamageDetails; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.pp.Report; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | |
| | | |
| | | List<DamageDetails> getProcessBreaking(Integer offset, Integer pageSize, String startDate, String endDate, DamageDetails damageDetails); |
| | | |
| | | Map<String,Integer> getProcessBreakingTotal(Integer offset, Integer pageSize, String startDate, String endDate, DamageDetails damageDetails); |
| | | Map<String, Integer> getProcessBreakingTotal(Integer offset, Integer pageSize, String startDate, String endDate, DamageDetails damageDetails); |
| | | |
| | | List<Map<String, String>> workInProgressMp( |
| | | @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2, |
| | | @Param("orderId") String orderId, @Param("inputProject") String inputProject, |
| | | @Param("selectProcesses") String selectProcesses, Report report); |
| | | |
| | | List<Map<String, String>> processToBeCompletedMp(Date selectTime1, Date selectTime2, String orderId, |
| | | String inputProject, String selectProcesses, Report report); |
| | | |
| | | // Map<String, Integer> getWorkInProgressTotal( |
| | | // @Param("selectTime1") Date selectTime1, @Param("selectTime2") Date selectTime2, |
| | | // @Param("orderId") String orderId, @Param("inputProject") String inputProject, |
| | | // @Param("selectProcesses") String selectProcesses, Report report); |
| | | } |
| | |
| | | |
| | | @Mapper |
| | | public interface PermissionBasicMapper extends BaseMapper<PermissionBasic> { |
| | | List<PermissionBasic> getPermission(Integer userId); |
| | | List<PermissionBasic> getPermission(Integer roleId, String lang, Integer id); |
| | | |
| | | List<PermissionBasic> selectOneLevel(); |
| | | List<PermissionBasic> selectOneLevel(String lang); |
| | | |
| | | List<Map<String,Object>> selectTowLevel(String menu); |
| | | List<Map<String,Object>> selectTowLevel(Integer id); |
| | | } |
| | |
| | | @Mapper |
| | | public interface PermissionRoleMapper extends BaseMapper<PermissionRole> { |
| | | List<String> getUserPermission(Integer loginId); |
| | | |
| | | Boolean saveBatch(List<PermissionRole> permissionRoles); |
| | | } |
| | |
| | | |
| | | package com.example.erp.service.pp; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | |
| | | import com.example.erp.entity.pp.DamageDetails; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.Report; |
| | | import com.example.erp.mapper.pp.ProductionSchedulingMapper; |
| | | import com.example.erp.mapper.pp.ReportMapper; |
| | | import com.example.erp.mapper.sd.OrderProcessDetailMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Date; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @DS("pp") |
| | |
| | | private final ReportMapper reportMapper; |
| | | |
| | | private final OrderProcessDetailMapper orderProcessDetailMapper; |
| | | private final ProductionSchedulingMapper productionSchedulingMapper; |
| | | |
| | | |
| | | |
| | | public ReportService(ReportMapper reportMapper, OrderProcessDetailMapper orderProcessDetailMapper) { |
| | | public ReportService(ReportMapper reportMapper, OrderProcessDetailMapper orderProcessDetailMapper,ProductionSchedulingMapper productionSchedulingMapper) { |
| | | this.reportMapper = reportMapper; |
| | | this.orderProcessDetailMapper = orderProcessDetailMapper; |
| | | this.productionSchedulingMapper = productionSchedulingMapper; |
| | | } |
| | | |
| | | //流程卡进度方法 |
| | |
| | | // map.put("total",orderMapper.getPageTotal(offset, pageSize, startDate, endDate, orderDetail)); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String,Object> workInProgressSv(Date selectTime1, Date selectTime2, String orderId, String inputProject, String selectProcesses, Report report) { |
| | | |
| | | if ("null".equals(orderId)) { |
| | | orderId = ""; |
| | | } |
| | | if ("null".equals(inputProject)) { |
| | | inputProject = ""; |
| | | } |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",reportMapper.workInProgressMp( selectTime1, selectTime2,orderId,inputProject,selectProcesses,report)); |
| | | map.put("process", productionSchedulingMapper.selectProcess()); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String,Object> selectProcessToBeCompletedSv(Date selectTime1, Date selectTime2, String orderId, String inputProject, String selectProcesses, Report report) { |
| | | if ("null".equals(orderId)) { |
| | | orderId = ""; |
| | | } |
| | | if ("null".equals(inputProject)) { |
| | | inputProject = ""; |
| | | } |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("data",reportMapper.processToBeCompletedMp( selectTime1, selectTime2,orderId,inputProject,selectProcesses,report)); |
| | | map.put("process", productionSchedulingMapper.selectProcess()); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | package com.example.erp.service.userInfo; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.example.erp.entity.userInfo.PermissionBasic; |
| | | import com.example.erp.mapper.userInfo.PermissionBasicMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | |
| | | this.permissionBasicMapper = permissionBasicMapper; |
| | | } |
| | | |
| | | public List<PermissionBasic> getPermission(Integer userId) { |
| | | return permissionBasicMapper.getPermission(userId); |
| | | public List<PermissionBasic> getPermission(Integer roleId, String lang, List<Integer> selectPageId) { |
| | | return permissionBasicMapper.getPermission(roleId,lang, selectPageId.get(1)); |
| | | } |
| | | |
| | | public Object getPermissionList() { |
| | | List<PermissionBasic> getOne = permissionBasicMapper.selectOneLevel(); |
| | | public Object getPermissionList(String lang) { |
| | | List<PermissionBasic> getOne = permissionBasicMapper.selectOneLevel(lang); |
| | | List<Map<String,Object>> ListOne = new ArrayList<>(); |
| | | |
| | | for(PermissionBasic permissionBasic : getOne){ |
| | | |
| | | System.out.println(permissionBasic.getMenu()); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("value",permissionBasic.getId()); |
| | | map.put("label",permissionBasic.getMenu()); |
| | | map.put("children",permissionBasicMapper.selectTowLevel(permissionBasic.getMenu())); |
| | | map.put("children",permissionBasicMapper.selectTowLevel(permissionBasic.getId())); |
| | | ListOne.add(map); |
| | | } |
| | | |
| | |
| | | package com.example.erp.service.userInfo; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.example.erp.entity.userInfo.PermissionBasic; |
| | | import com.example.erp.entity.userInfo.PermissionRole; |
| | | import com.example.erp.mapper.userInfo.PermissionRoleMapper; |
| | | import com.example.erp.mapper.userInfo.UserMapper; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @DS("user_info") |
| | | @Service |
| | |
| | | public List<String> getUserRole(Integer id) { |
| | | return userMapper.getUserRole(id); |
| | | } |
| | | |
| | | public Boolean savePermissionRole(Map<String, Object> permissionRoleMap) { |
| | | JSONObject permissionRoleJson = new JSONObject(permissionRoleMap); |
| | | List<PermissionBasic> permissionBasics = |
| | | JSONArray.parseArray( |
| | | JSONObject.toJSONString(permissionRoleJson.get("detail")), |
| | | PermissionBasic.class); |
| | | Integer roleId = (Integer) permissionRoleMap.get("id"); |
| | | if(permissionBasics.isEmpty() || roleId == null ){ |
| | | return false; |
| | | } |
| | | |
| | | |
| | | List<PermissionRole> permissionRoles = new ArrayList<>(); |
| | | for (PermissionBasic permissionBasic : permissionBasics) { |
| | | PermissionRole permissionRole = new PermissionRole(); |
| | | permissionRole.setRoleId(roleId); |
| | | permissionRole.setPermissionId(permissionBasic.getId()); |
| | | permissionRoles.add(permissionRole); |
| | | } |
| | | permissionRoleMapper.delete(new QueryWrapper<PermissionRole>().eq("role_id", roleId)); |
| | | return permissionRoleMapper.saveBatch(permissionRoles); |
| | | |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.example.erp.entity.userInfo.Role; |
| | | import com.example.erp.mapper.userInfo.RoleMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | |
| | | .ne("role","admin") |
| | | ); |
| | | } |
| | | |
| | | public Boolean add(Role role) { |
| | | |
| | | return roleMapper.insert(role) > 0; |
| | | } |
| | | } |
| | |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap id="reportMap" type="com.example.erp.entity.pp.Report"> |
| | | <result column="process_id" property="processId"/> |
| | | <result column="customer_name" property="customerName"/> |
| | | <result column="project" property="project"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="batch" property="batch"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="technology_number" property="technologyNumber"/> |
| | | <result column="process" property="technologyFlow"/> |
| | | <result column="quantity" property="orderNum"/> |
| | | <result column="child_width" property="childWidth"/> |
| | | <result column="child_height" property="childHeight"/> |
| | | <result column="stockNum" property="stockNum"/> |
| | | <result column="stockArea" property="stockArea"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="bend_radius" property="bendRadius"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 流程卡进度--> |
| | | <select id="processCardProgressMp"> |
| | | select |
| | |
| | | order by dd.id desc |
| | | </select> |
| | | |
| | | <select id="workInProgressMp"> |
| | | select #{selectProcesses} as thisProcess, |
| | | fc.process_id, |
| | | o.customer_name, |
| | | o.project, |
| | | o.order_id, |
| | | o.batch, |
| | | od.shape, |
| | | ogd.order_number, |
| | | ogd.technology_number, |
| | | ogd.process, |
| | | od.quantity, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num as stockNum, |
| | | ROUND(ogd.child_width * ogd.child_height * |
| | | (odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num) / 1000000, 2) as stockArea, |
| | | od.product_name, |
| | | od.bend_radius |
| | | |
| | | from sd.order_detail AS od |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | | ON od.order_id = ogd.order_id |
| | | AND od.order_number = ogd.order_number |
| | | LEFT JOIN flow_card AS fc |
| | | ON fc.order_id = ogd.order_id |
| | | and fc.production_id = ogd.production_id |
| | | AND fc.order_number = ogd.order_number |
| | | AND fc.technology_number = ogd.technology_number |
| | | left join sd.order_process_detail as odpd |
| | | ON odpd.order_id = fc.order_id |
| | | AND odpd.order_number = fc.order_number |
| | | AND odpd.technology_number = fc.technology_number |
| | | and odpd.process_id = fc.process_id |
| | | left join sd.order_process_detail as odpds |
| | | ON odpds.id = odpd.id - 1 |
| | | left join |
| | | (SELECT sum(rw.rework_num) as 'patchNumSum', |
| | | rw.process_id, |
| | | rw.order_sort, |
| | | rw.technology_number, |
| | | rwk.this_process |
| | | from rework as rw |
| | | LEFT JOIN |
| | | reporting_work as rwk |
| | | on rw.reporting_work_id = rwk.reporting_work_id |
| | | where rwk.this_process = #{selectProcesses} |
| | | and rw.review_status = 1 |
| | | GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c |
| | | on c.process_id = fc.process_id |
| | | and c.order_sort = fc.order_number |
| | | and c.technology_number = fc.technology_number |
| | | left join sd.`order` as o |
| | | on o.order_id = od.order_id |
| | | where LENGTH(fc.process_id) = 14 |
| | | and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num != 0 |
| | | and odpd.process = #{selectProcesses} and o.create_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{orderId} in od.order_id) and position(#{inputProject} in o.project) |
| | | |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | order by fc.process_id, fc.order_number, fc.technology_number |
| | | </select> |
| | | |
| | | <!-- |
| | | <if test="Report.processId != null and Report.processId != ''"> |
| | | and fc.process_id regexp #{Report.processId} |
| | | </if> |
| | | <if test="Report.customerName != null and Report.customerName != ''"> |
| | | and o.customer_name regexp #{Report.customerName} |
| | | </if> |
| | | <if test="Report.project != null and Report.project != ''"> |
| | | and o.project regexp #{Report.project} |
| | | </if> |
| | | <if test="Report.batch != null and Report.batch != ''"> |
| | | and o.batch regexp #{Report.batch} |
| | | </if> |
| | | <if test="Report.shape != null and Report.shape != ''"> |
| | | and od.shape regexp #{Report.shape} |
| | | </if> |
| | | --> |
| | | |
| | | <!-- <select id="getWorkInProgressTotal">--> |
| | | <!-- select CEILING(count(fc.id) / #{pageSize}) as 'pageTotal',--> |
| | | <!-- count(distinct fc.id) as 'total'--> |
| | | |
| | | <!-- from sd.order_detail AS od--> |
| | | <!-- LEFT JOIN sd.order_glass_detail AS ogd--> |
| | | <!-- ON od.order_id = ogd.order_id--> |
| | | <!-- AND od.order_number = ogd.order_number--> |
| | | <!-- LEFT JOIN flow_card AS fc--> |
| | | <!-- ON fc.order_id = ogd.order_id--> |
| | | <!-- and fc.production_id = ogd.production_id--> |
| | | <!-- AND fc.order_number = ogd.order_number--> |
| | | <!-- AND fc.technology_number = ogd.technology_number--> |
| | | <!-- left join sd.order_process_detail as odpd--> |
| | | <!-- ON odpd.order_id = fc.order_id--> |
| | | <!-- AND odpd.order_number = fc.order_number--> |
| | | <!-- AND odpd.technology_number = fc.technology_number--> |
| | | <!-- and odpd.process_id = fc.process_id--> |
| | | <!-- left join sd.order_process_detail as odpds--> |
| | | <!-- ON odpds.id = odpd.id - 1--> |
| | | <!-- left join--> |
| | | <!-- (SELECT sum(rw.rework_num) as 'patchNumSum',--> |
| | | <!-- rw.process_id,--> |
| | | <!-- rw.order_sort,--> |
| | | <!-- rw.technology_number,--> |
| | | <!-- rwk.this_process--> |
| | | <!-- from rework as rw--> |
| | | <!-- LEFT JOIN--> |
| | | <!-- reporting_work as rwk--> |
| | | <!-- on rw.reporting_work_id = rwk.reporting_work_id--> |
| | | <!-- where rwk.this_process = #{selectProcesses}--> |
| | | <!-- and rw.review_status = 1--> |
| | | <!-- GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c--> |
| | | <!-- on c.process_id = fc.process_id--> |
| | | <!-- and c.order_sort = fc.order_number--> |
| | | <!-- and c.technology_number = fc.technology_number--> |
| | | <!-- left join sd.`order` as o--> |
| | | <!-- on o.order_id = od.order_id--> |
| | | <!-- where LENGTH(fc.process_id) = 14--> |
| | | <!-- and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - --> |
| | | <!-- odpd.broken_num != 0--> |
| | | <!-- and odpd.process = #{selectProcesses}--> |
| | | <!-- and o.create_time between #{selectTime1} and #{selectTime2}--> |
| | | <!-- and position(#{orderId} in od.order_id)--> |
| | | <!-- and position(#{inputProject} in o.project)--> |
| | | <!-- group by fc.process_id, fc.order_number, fc.technology_number--> |
| | | <!-- order by fc.process_id, fc.order_number, fc.technology_number--> |
| | | <!-- limit #{offset},#{pageSize};--> |
| | | <!-- </select>--> |
| | | |
| | | <select id="processToBeCompletedMp"> |
| | | select DATE(o.create_time) as create_time, |
| | | DATE(o.delivery_date) as delivery_date, |
| | | o.order_id, |
| | | fc.process_id, |
| | | o.customer_name, |
| | | o.project, |
| | | o.batch, |
| | | od.order_number, |
| | | ogd.technology_number, |
| | | ogd.glass_child, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.quantity, |
| | | ROUND(ogd.child_width * ogd.child_height / 1000000, 2) as childArea, |
| | | ROUND(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2) as actualArea, |
| | | odpd.reporting_work_num as completeNum, |
| | | ROUND(ogd.child_width * ogd.child_height * odpd.reporting_work_num / 1000000, |
| | | 2) as completeArea, |
| | | od.quantity - odpd.reporting_work_num as incompleteNum, |
| | | ROUND(ogd.child_width * ogd.child_height * (od.quantity - odpd.reporting_work_num) / 1000000, |
| | | 2) as incompleteArea, |
| | | od.product_name |
| | | |
| | | from sd.order_detail AS od |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | | ON od.order_id = ogd.order_id |
| | | AND od.order_number = ogd.order_number |
| | | LEFT JOIN flow_card AS fc |
| | | ON fc.order_id = ogd.order_id |
| | | and fc.production_id = ogd.production_id |
| | | AND fc.order_number = ogd.order_number |
| | | AND fc.technology_number = ogd.technology_number |
| | | left join sd.order_process_detail as odpd |
| | | ON odpd.order_id = fc.order_id |
| | | AND odpd.order_number = fc.order_number |
| | | AND odpd.technology_number = fc.technology_number |
| | | and odpd.process_id = fc.process_id |
| | | left join sd.`order` as o |
| | | on o.order_id = od.order_id |
| | | where LENGTH(fc.process_id) = 14 |
| | | and odpd.process = #{selectProcesses} |
| | | and o.create_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} in o.project) |
| | | and od.quantity > odpd.reporting_work_num |
| | | |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | order by fc.process_id, fc.order_number, fc.technology_number |
| | | </select> |
| | | </mapper> |
| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.userInfo.PermissionBasicMapper"> |
| | | <select id="getPermission"> |
| | | select a.*, |
| | | CASE |
| | | WHEN b.id IS NULL THEN 0 |
| | | ELSE 1 |
| | | END |
| | | select a.id, |
| | | <if test="lang=='en'"> |
| | | a.menu, |
| | | </if> |
| | | <if test="lang=='zh'"> |
| | | c.itemName as menu, |
| | | </if> |
| | | a.page, |
| | | a.permission, |
| | | a.state, |
| | | IF(b.id IS NULL, 0, 1) as 'checked' |
| | | from permission_basic as a |
| | | left join permission_role as b |
| | | on a.id = b.permission_id |
| | | left join user_role as c |
| | | on b.role_id = c.role_id |
| | | left join user as d |
| | | on c.user_id = d.id |
| | | and d.id = #{userId} |
| | | on b.permission_id = a.id |
| | | and b.role_id = #{roleId} |
| | | <if test="lang=='zh'"> |
| | | left join sys_menu_item as c |
| | | on c.menu = a.menu |
| | | </if> |
| | | |
| | | where a.id!=1 and a.state=1 |
| | | <if test="id != null and id != ''"> |
| | | and a.page = (select page from permission_basic where id = #{id}) |
| | | </if> |
| | | group by a.id |
| | | </select> |
| | | |
| | | <select id="selectOneLevel"> |
| | | select * |
| | | from permission_basic |
| | | where id!=1 and state=1 |
| | | group by menu |
| | | select a.id, |
| | | <if test="lang=='zh'"> |
| | | b.itemName as menu |
| | | </if> |
| | | <if test="lang=='en'"> |
| | | a.menu |
| | | </if> |
| | | from permission_basic as a |
| | | left join sys_menu_item as b |
| | | on a.menu = b.menu |
| | | where a.id!=1 and a.state=1 |
| | | group by a.menu |
| | | |
| | | </select> |
| | | |
| | |
| | | id as value, |
| | | page as label |
| | | from permission_basic |
| | | where id!=1 and state=1 |
| | | group by menu |
| | | where |
| | | state=1 |
| | | and menu = (select menu from permission_basic where id = #{id}) |
| | | group by page |
| | | |
| | | </select> |
| | | |
| | |
| | | where a.id = #{loginId} |
| | | and d.state = 1 |
| | | </select> |
| | | |
| | | <insert id="saveBatch"> |
| | | insert into |
| | | permission_role( |
| | | role_id, |
| | | permission_id |
| | | ) |
| | | values |
| | | <foreach collection ="permissionRoles" item="permissionRole" separator =","> |
| | | ( |
| | | #{permissionRole.roleId}, |
| | | #{permissionRole.permissionId} |
| | | ) |
| | | </foreach> |
| | | |
| | | </insert> |
| | | |
| | | </mapper> |
| | |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap id="reportMap" type="com.example.erp.entity.pp.Report"> |
| | | <result column="process_id" property="processId"/> |
| | | <result column="customer_name" property="customerName"/> |
| | | <result column="project" property="project"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="batch" property="batch"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="technology_number" property="technologyNumber"/> |
| | | <result column="process" property="technologyFlow"/> |
| | | <result column="quantity" property="orderNum"/> |
| | | <result column="child_width" property="childWidth"/> |
| | | <result column="child_height" property="childHeight"/> |
| | | <result column="stockNum" property="stockNum"/> |
| | | <result column="stockArea" property="stockArea"/> |
| | | <result column="product_name" property="productName"/> |
| | | <result column="bend_radius" property="bendRadius"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <!-- 流程卡进度--> |
| | | <select id="processCardProgressMp"> |
| | | select |
| | |
| | | order by dd.id desc |
| | | </select> |
| | | |
| | | <select id="workInProgressMp"> |
| | | select #{selectProcesses} as thisProcess, |
| | | fc.process_id, |
| | | o.customer_name, |
| | | o.project, |
| | | o.order_id, |
| | | o.batch, |
| | | od.shape, |
| | | ogd.order_number, |
| | | ogd.technology_number, |
| | | ogd.process, |
| | | od.quantity, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num as stockNum, |
| | | ROUND(ogd.child_width * ogd.child_height * |
| | | (odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num) / 1000000, 2) as stockArea, |
| | | od.product_name, |
| | | od.bend_radius |
| | | |
| | | from sd.order_detail AS od |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | | ON od.order_id = ogd.order_id |
| | | AND od.order_number = ogd.order_number |
| | | LEFT JOIN flow_card AS fc |
| | | ON fc.order_id = ogd.order_id |
| | | and fc.production_id = ogd.production_id |
| | | AND fc.order_number = ogd.order_number |
| | | AND fc.technology_number = ogd.technology_number |
| | | left join sd.order_process_detail as odpd |
| | | ON odpd.order_id = fc.order_id |
| | | AND odpd.order_number = fc.order_number |
| | | AND odpd.technology_number = fc.technology_number |
| | | and odpd.process_id = fc.process_id |
| | | left join sd.order_process_detail as odpds |
| | | ON odpds.id = odpd.id - 1 |
| | | left join |
| | | (SELECT sum(rw.rework_num) as 'patchNumSum', |
| | | rw.process_id, |
| | | rw.order_sort, |
| | | rw.technology_number, |
| | | rwk.this_process |
| | | from rework as rw |
| | | LEFT JOIN |
| | | reporting_work as rwk |
| | | on rw.reporting_work_id = rwk.reporting_work_id |
| | | where rwk.this_process = #{selectProcesses} |
| | | and rw.review_status = 1 |
| | | GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c |
| | | on c.process_id = fc.process_id |
| | | and c.order_sort = fc.order_number |
| | | and c.technology_number = fc.technology_number |
| | | left join sd.`order` as o |
| | | on o.order_id = od.order_id |
| | | where LENGTH(fc.process_id) = 14 |
| | | and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - |
| | | odpd.broken_num != 0 |
| | | and odpd.process = #{selectProcesses} and o.create_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{orderId} in od.order_id) and position(#{inputProject} in o.project) |
| | | |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | order by fc.process_id, fc.order_number, fc.technology_number |
| | | </select> |
| | | |
| | | <!-- |
| | | <if test="Report.processId != null and Report.processId != ''"> |
| | | and fc.process_id regexp #{Report.processId} |
| | | </if> |
| | | <if test="Report.customerName != null and Report.customerName != ''"> |
| | | and o.customer_name regexp #{Report.customerName} |
| | | </if> |
| | | <if test="Report.project != null and Report.project != ''"> |
| | | and o.project regexp #{Report.project} |
| | | </if> |
| | | <if test="Report.batch != null and Report.batch != ''"> |
| | | and o.batch regexp #{Report.batch} |
| | | </if> |
| | | <if test="Report.shape != null and Report.shape != ''"> |
| | | and od.shape regexp #{Report.shape} |
| | | </if> |
| | | --> |
| | | |
| | | <!-- <select id="getWorkInProgressTotal">--> |
| | | <!-- select CEILING(count(fc.id) / #{pageSize}) as 'pageTotal',--> |
| | | <!-- count(distinct fc.id) as 'total'--> |
| | | |
| | | <!-- from sd.order_detail AS od--> |
| | | <!-- LEFT JOIN sd.order_glass_detail AS ogd--> |
| | | <!-- ON od.order_id = ogd.order_id--> |
| | | <!-- AND od.order_number = ogd.order_number--> |
| | | <!-- LEFT JOIN flow_card AS fc--> |
| | | <!-- ON fc.order_id = ogd.order_id--> |
| | | <!-- and fc.production_id = ogd.production_id--> |
| | | <!-- AND fc.order_number = ogd.order_number--> |
| | | <!-- AND fc.technology_number = ogd.technology_number--> |
| | | <!-- left join sd.order_process_detail as odpd--> |
| | | <!-- ON odpd.order_id = fc.order_id--> |
| | | <!-- AND odpd.order_number = fc.order_number--> |
| | | <!-- AND odpd.technology_number = fc.technology_number--> |
| | | <!-- and odpd.process_id = fc.process_id--> |
| | | <!-- left join sd.order_process_detail as odpds--> |
| | | <!-- ON odpds.id = odpd.id - 1--> |
| | | <!-- left join--> |
| | | <!-- (SELECT sum(rw.rework_num) as 'patchNumSum',--> |
| | | <!-- rw.process_id,--> |
| | | <!-- rw.order_sort,--> |
| | | <!-- rw.technology_number,--> |
| | | <!-- rwk.this_process--> |
| | | <!-- from rework as rw--> |
| | | <!-- LEFT JOIN--> |
| | | <!-- reporting_work as rwk--> |
| | | <!-- on rw.reporting_work_id = rwk.reporting_work_id--> |
| | | <!-- where rwk.this_process = #{selectProcesses}--> |
| | | <!-- and rw.review_status = 1--> |
| | | <!-- GROUP BY rw.process_id, rw.order_sort, rw.technology_number) as c--> |
| | | <!-- on c.process_id = fc.process_id--> |
| | | <!-- and c.order_sort = fc.order_number--> |
| | | <!-- and c.technology_number = fc.technology_number--> |
| | | <!-- left join sd.`order` as o--> |
| | | <!-- on o.order_id = od.order_id--> |
| | | <!-- where LENGTH(fc.process_id) = 14--> |
| | | <!-- and odpds.reporting_work_num_count + ifnull(c.patchNumSum, 0) - odpd.reporting_work_num_count - --> |
| | | <!-- odpd.broken_num != 0--> |
| | | <!-- and odpd.process = #{selectProcesses}--> |
| | | <!-- and o.create_time between #{selectTime1} and #{selectTime2}--> |
| | | <!-- and position(#{orderId} in od.order_id)--> |
| | | <!-- and position(#{inputProject} in o.project)--> |
| | | <!-- group by fc.process_id, fc.order_number, fc.technology_number--> |
| | | <!-- order by fc.process_id, fc.order_number, fc.technology_number--> |
| | | <!-- limit #{offset},#{pageSize};--> |
| | | <!-- </select>--> |
| | | |
| | | <select id="processToBeCompletedMp"> |
| | | select DATE(o.create_time) as create_time, |
| | | DATE(o.delivery_date) as delivery_date, |
| | | o.order_id, |
| | | fc.process_id, |
| | | o.customer_name, |
| | | o.project, |
| | | o.batch, |
| | | od.order_number, |
| | | ogd.technology_number, |
| | | ogd.glass_child, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.quantity, |
| | | ROUND(ogd.child_width * ogd.child_height / 1000000, 2) as childArea, |
| | | ROUND(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2) as actualArea, |
| | | odpd.reporting_work_num as completeNum, |
| | | ROUND(ogd.child_width * ogd.child_height * odpd.reporting_work_num / 1000000, |
| | | 2) as completeArea, |
| | | od.quantity - odpd.reporting_work_num as incompleteNum, |
| | | ROUND(ogd.child_width * ogd.child_height * (od.quantity - odpd.reporting_work_num) / 1000000, |
| | | 2) as incompleteArea, |
| | | od.product_name |
| | | |
| | | from sd.order_detail AS od |
| | | LEFT JOIN sd.order_glass_detail AS ogd |
| | | ON od.order_id = ogd.order_id |
| | | AND od.order_number = ogd.order_number |
| | | LEFT JOIN flow_card AS fc |
| | | ON fc.order_id = ogd.order_id |
| | | and fc.production_id = ogd.production_id |
| | | AND fc.order_number = ogd.order_number |
| | | AND fc.technology_number = ogd.technology_number |
| | | left join sd.order_process_detail as odpd |
| | | ON odpd.order_id = fc.order_id |
| | | AND odpd.order_number = fc.order_number |
| | | AND odpd.technology_number = fc.technology_number |
| | | and odpd.process_id = fc.process_id |
| | | left join sd.`order` as o |
| | | on o.order_id = od.order_id |
| | | where LENGTH(fc.process_id) = 14 |
| | | and odpd.process = #{selectProcesses} |
| | | and o.create_time between #{selectTime1} and #{selectTime2} |
| | | and position(#{orderId} in od.order_id) |
| | | and position(#{inputProject} in o.project) |
| | | and od.quantity > odpd.reporting_work_num |
| | | |
| | | group by fc.process_id, fc.order_number, fc.technology_number |
| | | order by fc.process_id, fc.order_number, fc.technology_number |
| | | </select> |
| | | </mapper> |
| | |
| | | where a.id = #{loginId} |
| | | and d.state = 1 |
| | | </select> |
| | | |
| | | <insert id="saveBatch"> |
| | | insert into |
| | | permission_role( |
| | | role_id, |
| | | permission_id |
| | | ) |
| | | values |
| | | <foreach collection ="permissionRoles" item="permissionRole" separator =","> |
| | | ( |
| | | #{permissionRole.roleId}, |
| | | #{permissionRole.permissionId} |
| | | ) |
| | | </foreach> |
| | | |
| | | </insert> |
| | | |
| | | </mapper> |