| | |
| | | <script setup> |
| | | import {ArrowLeftBold} from "@element-plus/icons-vue"; |
| | | import {useRouter} from "vue-router"; |
| | | const router = useRouter() |
| | | let flag = $ref(true) |
| | | function intoCreateProduct(){ |
| | | if(flag){ |
| | | router.push('/main/processCard/SplittingDetails') |
| | | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import useProductGlassTypeStore from "@/stores/sd/product/productGlassType" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import GlassType from "@/components/sd/product/GlassType.vue" |
| | | import {useRouter} from 'vue-router' |
| | | import Sortable from 'sortablejs' |
| | | import BasicTable from '@/components/basic/BasicTable.vue' |
| | | import {VXETable} from "vxe-table"; |
| | | |
| | | let productGlassTypeStore = useProductGlassTypeStore() |
| | | let router = useRouter() |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' : { |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}}) |
| | | break |
| | | } |
| | | case 'setType': { |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'delete': { |
| | | request.post(`/processCard/deleteFlowCard/${row.orderId}/${row.processId}`).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("删除成功") |
| | | location.reload(); |
| | | }else { |
| | | router.push('/main/processCard/SplittingDetails') |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | flag=!flag |
| | | }) |
| | | break |
| | | } |
| | | const tableData = [ |
| | | { |
| | | processCard: 'NG231201A01', |
| | | orderSequence: '1', |
| | | landingSequence: '1', |
| | | floorNumber: '14-BSGB05', |
| | | shape: '普形', |
| | | longSide: '5000', |
| | | shortSide: '4400', |
| | | total: '24', |
| | | totalThickness: '26', |
| | | } |
| | | } |
| | | |
| | | |
| | | //定义时间 |
| | | const form = reactive({ |
| | | date1: '', |
| | | }) |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | | list.forEach(item => { |
| | | count += Number(item[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 filterData = ref({ |
| | | product: { |
| | | thickness: '', |
| | | totalThickness:'' |
| | | }, |
| | | { |
| | | processCard: 'NG231201A01', |
| | | orderSequence: '2', |
| | | landingSequence: '2', |
| | | floorNumber: '15-BSGB05', |
| | | shape: '普形', |
| | | longSide: '5000', |
| | | shortSide: '4400', |
| | | total: '24', |
| | | totalThickness: '26', |
| | | orderDetail: { |
| | | orderNumber: '', |
| | | height: '', |
| | | computeGrossArea: '', |
| | | quantity: '', |
| | | shape:'', |
| | | width:'', |
| | | weight:'' |
| | | } |
| | | |
| | | }) |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | | |
| | | let orderId = route.query.orderId |
| | | let productionId = route.query.productionId |
| | | //第一次加载数据 |
| | | |
| | | request.post(`/processCard/selectNoCard/${orderId}/${productionId}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | 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 changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | function padLeftZero(str) { |
| | | return ('00' + str).substr(str.length) |
| | | } |
| | | 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 |
| | | } |
| | | |
| | | |
| | | request.post(`/processCard/selectNoCard/${orderId}/${productionId}`, filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | pageTotal.value=res.data.total |
| | | 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,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | { |
| | | processCard: 'NG231201A02', |
| | | orderSequence: '3', |
| | | landingSequence: '3', |
| | | floorNumber: '16-BSGB05', |
| | | shape: '普形', |
| | | longSide: '5000', |
| | | shortSide: '4400', |
| | | total: '24', |
| | | totalThickness: '26', |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type: 'checkbox', fixed: "left", title: '选择'}, |
| | | {field: 'orderDetail.orderNumber', title: '订序',filters:[{ data: '' }],slots: { filter: 'num1_filter' } }, |
| | | {field: 'orderDetail.shape', title: '形状', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.width', title: '宽', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.height', title: '高',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.quantity', title: '数量', showOverflow:"ellipsis"}, |
| | | {field: 'orderDetail.computeGrossArea', title: '面积'}, |
| | | {field: 'product.totalThickness', title: '总厚度'}, |
| | | {field: 'product.thickness', title: '玻璃厚度'}, |
| | | {field: 'orderDetail.weight', title: '重量'} |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | |
| | | ],//table body实际数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | let footList=['总数量','总面积','分箱数'] |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | } |
| | | if (footList.includes(column.field)) { |
| | | return sumNum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | const tableData2 = [ |
| | | { |
| | | orderSequence: '4', |
| | | floorNumber: '17-BSGB08', |
| | | shape: '普形', |
| | | longSide: '4600', |
| | | shortSide: '3880', |
| | | undividedQuantity: '15', |
| | | undividedArea: '99.84', |
| | | totalThickness:'28', |
| | | glassThickness:'24', |
| | | undividedWeight:'111' |
| | | }, |
| | | { |
| | | orderSequence: '5', |
| | | floorNumber: '18-BSGB08', |
| | | shape: '普形', |
| | | longSide: '4600', |
| | | shortSide: '3880', |
| | | undividedQuantity: '15', |
| | | undividedArea: '99.84', |
| | | totalThickness:'28', |
| | | glassThickness:'24', |
| | | undividedWeight:'111' |
| | | }, |
| | | { |
| | | orderSequence: '6', |
| | | floorNumber: '19-BSGB08', |
| | | shape: '普形', |
| | | longSide: '4600', |
| | | shortSide: '3880', |
| | | undividedQuantity: '15', |
| | | undividedArea: '99.84', |
| | | totalThickness:'28', |
| | | glassThickness:'24', |
| | | undividedWeight:'111' |
| | | }, |
| | | ] |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | <el-main width="12%" style=""> |
| | | <span>未分数量:45</span><br> |
| | | <span>未分重量:333</span><br> |
| | | <span>选中数量:</span><br> |
| | | <span>选中数量:<el-input></el-input></span><br> |
| | | <el-button type="primary"> → </el-button> |
| | | <br> |
| | | <br> |
| | |
| | | </el-main> |
| | | |
| | | <el-aside width="44%" style=""> |
| | | <el-table :data="tableData2" border style="width: 100%" height="100%"> |
| | | <el-table-column prop="orderSequence" label="订序" width="60" /> |
| | | <el-table-column prop="floorNumber" label="楼层编号" :show-overflow-tooltip='true' width="100" /> |
| | | <el-table-column prop="shape" label="形状" width="65" /> |
| | | <el-table-column prop="longSide" label="长边" width="60" /> |
| | | <el-table-column prop="shortSide" label="短边" width="60" /> |
| | | <el-table-column prop="undividedQuantity" label="待分数量" width="85" /> |
| | | <el-table-column prop="undividedArea" label="待分面积" width="85" /> |
| | | <el-table-column prop="totalThickness" label="总厚度" width="75" /> |
| | | <el-table-column prop="glassThickness" label="玻璃厚度" width="85" /> |
| | | <el-table-column prop="undividedWeight" label="待分重量" width="85" /> |
| | | |
| | | </el-table><!-- <h1>{{msg}}</h1> --> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">打印</el-button> |
| | | <el-button @click="getTableRow(row,'setType')" link type="primary" size="small">排版</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </el-aside> |
| | | </el-container> |
| | | </div> |
| | |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime()) |
| | | const end = new Date(new Date().getTime()+ 3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {title: '操作', width: 80, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: 'orderId', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: 'customerName', title: '客户名称', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'project', title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'batch', title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'otherRemarks', title: '原片要求', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'icon', title: '商标选项', sortable: true}, |
| | | {field: 'orderType', title: '订单类型', sortable: true}, |
| | | {field: 'salesman', title: '业务员', sortable: true}, |
| | | {field: 'processingNote', title: '加工要求', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'deliveryAddress', title: '送货地址', sortable: true}, |
| | | {field: 'order.orderId', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: 'order.customerName', title: '客户名称', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.project', title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'order.batch', title: '批次',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.otherRemarks', title: '原片要求', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'order.icon', title: '商标选项', sortable: true}, |
| | | {field: 'order.orderType', title: '订单类型', sortable: true}, |
| | | {field: 'order.salesman', title: '业务员', sortable: true}, |
| | | {field: 'order.processingNote', title: '加工要求', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'order.deliveryAddress', title: '送货地址', sortable: true}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row}"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,key,index) in row"> |
| | | <span style="font-weight: bold">{{key+': '}}</span> |
| | | <span>{{ item }}</span> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | |
| | | </li> |
| | | </ul> |
| | | </template> |
| | |
| | | const getTableRow = (row, type) => { |
| | | switch (type) { |
| | | case 'edit' : { |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/workOrder/addWorkOrder', query: {id: row.id}}) |
| | | router.push({path: '/main/processCard/PrintFlowCard', query: {id: row.id}}) |
| | | break |
| | | } |
| | | case 'setType': { |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'delete': { |
| | | alert('我接收到子组件传送的删除信息') |
| | | request.post(`/processCard/deleteFlowCard/${row.orderId}/${row.processId}`).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("删除成功") |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | } |
| | |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0,10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime()) |
| | | const end = new Date(new Date().getTime()+3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0,10)//默认结束时间当前时间 |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/processCard/AddProcessCard', query: { id: row.id }}) |
| | | router.push({path: '/main/processCard/AddProcessCard', query: { orderId: row.orderId,productionId:row.orderGlassDetail.productionId }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | |
| | | scrollHeight.value = row.$event.target.scrollHeight |
| | | clientHeight.value = row.$event.target.clientHeight |
| | | } |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | order: { |
| | | batch: '' |
| | | }, |
| | | orderDetail: { |
| | | |
| | | orderGlassDetail: { |
| | | productName: '', |
| | | computeArea: '', |
| | | quantity: '', |
| | |
| | | perimeter: '', |
| | | bendRadius: '', |
| | | processingNote: '' |
| | | }, |
| | | orderDetail:{ |
| | | orderDetail:'' |
| | | } |
| | | |
| | | }) |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | 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(`/processCard/selectAddProcess/${startTime}/${endTime}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | |
| | | 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({ |
| | | loading: true, |
| | |
| | | {title: '操作', width: 80, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: 50 }, |
| | | {field: 'orderId', title: '销售单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true, }, |
| | | {field: 'productionId', title: '生产订单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productId', title: '产品编号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'quantity', title: '总数量', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'computeGrossArea', title: '总面积', sortable: true}, |
| | | {field: 'perimeter', title: '周长', sortable: true}, |
| | | {field: 'orderGlassDetail.productionId', title: '生产订单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productId', title: '产品编号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productName', title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderDetail.quantity', title: '总数量', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'orderDetail.computeGrossArea', title: '总面积', sortable: true}, |
| | | {field: 'orderDetail.perimeter', title: '周长', sortable: true}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | |
| | | </li> |
| | | </ul> |
| | | </template> |
| | |
| | | request.post(`/workOrder/addWork/${id}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | console.log(res.data.data) |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | |
| | | } |
| | | }) |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | 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 |
| | | } |
| | | |
| | | |
| | | request.post(`/workOrder/addWork/${id}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | |
| | | count += Number(item[field]) |
| | | }) |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //子组件接收参数 |
| | |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'checkbox', fixed: "left", title: '选择', width: 80}, |
| | | {type: 'seq', fixed: "left", title: '自序', width: 50}, |
| | | {field: 'orderId', title: '销售单号', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true,}, |
| | | { |
| | | field: 'productId', |
| | | title: '产品编号', |
| | | sortable: true, |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'} |
| | | }, |
| | | {field: 'productName', title: '产品名称', filters: [{data: ''}], slots: {filter: 'num1_filter'}, sortable: true}, |
| | | {field: 'quantity', title: '总数量', sortable: true}, |
| | | {field: 'computeGrossArea', title: '总面积', sortable: true}, |
| | | {field: 'perimeter', title: '周长', sortable: true, showOverflow: "ellipsis"}, |
| | | {field: 'orderId', title: '销售单号', filters: [{data: ''}], slots: {filter: 'num1_filter'},}, |
| | | {field: 'productId',title: '产品编号',showOverflow: "ellipsis",filters: [{data: ''}],slots: {filter: 'num1_filter'}}, |
| | | {field: 'productName', title: '产品名称', filters: [{data: ''}], slots: {filter: 'num1_filter'}, }, |
| | | {field: 'quantity', title: '总数量', }, |
| | | {field: 'computeGrossArea', title: '总面积', }, |
| | | {field: 'perimeter', title: '周长', showOverflow: "ellipsis"} |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{ item.title + ': ' }}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | |
| | | </li> |
| | | </ul> |
| | | </template> |
| | |
| | | break |
| | | } |
| | | case 'delete': { |
| | | //console.log(row.orderDetail.productName) |
| | | //request.post('/workOrder/deleteOrderWork/${row.orderId}', ,row.orderDetail.productName).then((res) => { |
| | | request.post(`/workOrder/deleteOrderWork/${row.orderId}/${row.orderDetail.productName}`).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("删除成功") |
| | |
| | | |
| | | |
| | | //定义转单状态 |
| | | const optionVal = ref('0') |
| | | const optionVal = ref('1') |
| | | const options = [ |
| | | { |
| | | value: '0', |
| | |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | const end = new Date(new Date().getTime()) |
| | | const end = new Date(new Date().getTime()+3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10)//默认结束时间当前时间 |
| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.pp.FlowCardService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | @Autowired |
| | | FlowCardService flowCardService; |
| | | |
| | | //流程卡管理查询 |
| | | @PostMapping ("/flowCard/{selectTime1}/{selectTime2}") |
| | | public Result DateProcess( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody FlowCard flowCard){ |
| | | System.out.println(selectTime1+" "+selectTime2+" "+flowCard.toString()); |
| | | return Result.seccess(flowCardService.selectProcessCard(selectTime1,selectTime2,flowCard)); |
| | | |
| | | } |
| | | |
| | | //分架查询 |
| | | @PostMapping ("/selectAddProcess/{selectTime1}/{selectTime2}") |
| | | public Result SelectAddProcess( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody Order order){ |
| | | @RequestBody FlowCard flowCard){ |
| | | // System.out.println(selectTime1+" "+selectTime2+" "+flowCard.toString()); |
| | | return Result.seccess(flowCardService.selectAddProcess(selectTime1,selectTime2,order)); |
| | | return Result.seccess(flowCardService.selectAddProcess(selectTime1,selectTime2,flowCard)); |
| | | |
| | | } |
| | | |
| | | //分架明细查询 |
| | | @PostMapping ("/detailsSelect/{orderId}") |
| | | |
| | | public Result DetailsSelect( |
| | | @PathVariable String orderId, |
| | | @RequestBody OrderDetail orderDetail){ |
| | | return Result.seccess(flowCardService.DetailsSelectSv(orderId,orderDetail)); |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.DetailsSelectSv(orderId,flowCard)); |
| | | |
| | | } |
| | | |
| | | |
| | | //删除工单 |
| | | @PostMapping("/deleteFlowCard/{orderId}/{processId}") |
| | | public Result deleteOrderWork( |
| | | @PathVariable String orderId, |
| | | @PathVariable String processId |
| | | ){ |
| | | if(flowCardService.DeleteFlowCardSv(orderId,processId)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | //分架明细查询 |
| | | @PostMapping ("/selectNoCard/{orderId}/{productionId}") |
| | | |
| | | public Result SelectNoCard( |
| | | @PathVariable String orderId, |
| | | @PathVariable String productionId, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.SelectNoCardSv(orderId,productionId,flowCard)); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | //添加工单 |
| | | @PostMapping("/addOrderWork") |
| | | public Result AddOrderWork( @RequestBody Map<String,Object> object){ |
| | | System.out.println("obj:"+object); |
| | |
| | | } |
| | | } |
| | | |
| | | //删除工单 |
| | | @PostMapping("/deleteOrderWork/{orderId}/{productName}") |
| | | public Result deleteOrderWork( |
| | | @PathVariable String orderId, |
| | |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.Product; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | |
| | | private OrderDetail orderDetail; |
| | | //外键订单工艺审核表 |
| | | private OrderGlassDetail orderGlassDetail; |
| | | |
| | | private Product product; |
| | | } |
| | |
| | | private LocalDate productionTime; |
| | | private LocalDate createTime; |
| | | // @TableField(select = false) |
| | | // private Order order; |
| | | private Order order; |
| | | //@TableField(select = false) |
| | | // @ManyToOne(fetch = FetchType.LAZY) |
| | | private OrderDetail orderDetail; |
| | |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.sql.Date; |
| | |
| | | |
| | | @Mapper |
| | | public interface FlowCardMapper { |
| | | //流程卡管理查询 |
| | | List<FlowCard> selectFlowCard(Date selectTime1, Date selectTime2,FlowCard flowCard); |
| | | |
| | | List<Order> selectFlowCardMp(Date selectTime1, Date selectTime2, Order order); |
| | | //分架数据查询 |
| | | List<FlowCard> selectFlowCardMp(Date selectTime1, Date selectTime2, FlowCard flowCard); |
| | | |
| | | List<OrderDetail> DetailsSelectMp(String orderId, OrderDetail orderDetail); |
| | | // Integer getPageTotal(Integer offset, Integer pageSize, String glassTypeId, Product product); |
| | | //分架明细查询 |
| | | List<FlowCard> DetailsSelectMp(String orderId, FlowCard flowCard); |
| | | |
| | | Boolean DeleteFlowCardMp(String orderId, String processId); |
| | | |
| | | List<FlowCard> SelectNoCardMp(String orderId, String productionId, FlowCard flowCard); |
| | | } |
| | |
| | | |
| | | @Mapper |
| | | public interface WorkOrderMapper { |
| | | //工单管理查询未转工单数据 |
| | | List<OrderGlassDetail> selectWordOrder(Date selectTime1, Date selectTime2, OrderGlassDetail orderGlassDetail); |
| | | |
| | | //查询已转工单数据 |
| | | List<OrderGlassDetail> selectWordOrderNo(Date selectTime1, Date selectTime2, OrderGlassDetail orderGlassDetail); |
| | | |
| | | //查询需要转工单明细 |
| | | List<OrderDetail> addWordOrder(String orderId, OrderDetail orderDetail); |
| | | |
| | | |
| | | //转工单 |
| | | Boolean AddOrderWorkMp(String productIdVl, |
| | | @Param("orderId") String orderId, |
| | | @Param("productId") Integer productId, |
| | | @Param("productName") String productName, |
| | | String userName); |
| | | |
| | | //查询对应订单号订序 |
| | | Integer SelectOrderNumber(String productIdVl); |
| | | |
| | | |
| | | //删除工单,将对应产品生产订单号改为null |
| | | Boolean DeleteOrderWorkMp(String orderId, String productName); |
| | | |
| | | Integer SelectWorkCount(String orderId); |
| | | |
| | | Boolean UpdateWorkType(String orderId, Integer state); |
| | | |
| | | Integer SelectYesWorkCount(String orderId); |
| | | } |
| | |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.mapper.pp.FlowCardMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | |
| | | public Map<String, Object> selectProcessCard(Date selectTime1, Date selectTime2, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | System.out.println(flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard)); |
| | | //System.out.println(flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard)); |
| | | map.put("data", flowCardMapper.selectFlowCard( selectTime1,selectTime2, flowCard)); |
| | | // map.put("total", productMapper.getPageTotal(offset, pageSize, glassTypeId, product)); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | public Map<String, Object> selectAddProcess(Date selectTime1, Date selectTime2, Order order) { |
| | | public Map<String, Object> selectAddProcess(Date selectTime1, Date selectTime2, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | System.out.println(flowCardMapper.selectFlowCardMp( selectTime1,selectTime2, order)); |
| | | map.put("data", flowCardMapper.selectFlowCardMp( selectTime1,selectTime2, order)); |
| | | // map.put("total", productMapper.getPageTotal(offset, pageSize, glassTypeId, product)); |
| | | map.put("data", flowCardMapper.selectFlowCardMp( selectTime1,selectTime2, flowCard)); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> DetailsSelectSv(String orderId, OrderDetail orderDetail) { |
| | | public Map<String, Object> DetailsSelectSv(String orderId, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.DetailsSelectMp( orderId, orderDetail)); |
| | | map.put("data", flowCardMapper.DetailsSelectMp( orderId, flowCard)); |
| | | return map; |
| | | } |
| | | |
| | | // map.put("total", productMapper.getPageTotal(offset, pageSize, glassTypeId, product)); |
| | | public Boolean DeleteFlowCardSv(String orderId, String processId) { |
| | | if (!orderId.isEmpty()&&!processId.isEmpty()){ |
| | | flowCardMapper.DeleteFlowCardMp(orderId, processId); |
| | | return true; |
| | | } |
| | | else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | public Map<String, Object> SelectNoCardSv(String orderId, String productionId, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.SelectNoCardMp( orderId,productionId, flowCard)); |
| | | return map; |
| | | } |
| | | } |
| | |
| | | // System.out.println(workOrderMapper.selectWordOrder( selectTime1,selectTime2,state, orderGlassDetail)); |
| | | if (state==1){ |
| | | map.put("data", workOrderMapper.selectWordOrder(selectTime1, selectTime2, orderGlassDetail)); |
| | | } |
| | | else { |
| | | } else { |
| | | map.put("data", workOrderMapper.selectWordOrderNo(selectTime1, selectTime2, orderGlassDetail)); |
| | | } |
| | | |
| | |
| | | letters = lettr++; |
| | | productIdVl = orderID + letters; |
| | | Integer workCount = workOrderMapper.SelectOrderNumber(productIdVl); |
| | | if (workCount <1) |
| | | { |
| | | if (workCount < 1) { |
| | | break; |
| | | } |
| | | |
| | | } |
| | | System.out.println(productIdVl); |
| | | workOrderMapper.AddOrderWorkMp(productIdVl, orderDetail.getOrderId(), orderDetail.getProductId(), orderDetail.getProductName(),userName); |
| | | Integer State = 2; |
| | | Integer States = 1; |
| | | Integer NoWorkCount = workOrderMapper.SelectWorkCount(orderDetail.getOrderId()); |
| | | System.out.println(NoWorkCount); |
| | | if (NoWorkCount == 0) { |
| | | workOrderMapper.UpdateWorkType(orderDetail.getOrderId(), State); |
| | | } else { |
| | | workOrderMapper.UpdateWorkType(orderDetail.getOrderId(), States); |
| | | } |
| | | } |
| | | |
| | | return true; |
| | | } else { |
| | | return false; |
| | |
| | | public Boolean DeleteOrderWorkSv(String orderId, String productName) { |
| | | if (!orderId.isEmpty()&&!productName.isEmpty()){ |
| | | workOrderMapper.DeleteOrderWorkMp(orderId, productName); |
| | | return true; |
| | | Integer State = 0; |
| | | Integer States = 1; |
| | | Integer NoWorkCount = workOrderMapper.SelectWorkCount(orderId); |
| | | Integer YesWorkCount = workOrderMapper.SelectYesWorkCount(orderId); |
| | | System.out.println(NoWorkCount); |
| | | if (NoWorkCount ==YesWorkCount) { |
| | | workOrderMapper.UpdateWorkType(orderId, State); |
| | | } else { |
| | | workOrderMapper.UpdateWorkType(orderId, States); |
| | | } |
| | | else { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | |
| | | <result column="product_name" property="productName"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="weight" property="weight"/> |
| | | </association> |
| | | <association property="orderGlassDetail" javaType="com.example.erp.entity.sd.OrderGlassDetail"> |
| | | <result column="production_id" property="productionId"/> |
| | | </association> |
| | | <association property="product" javaType="com.example.erp.entity.sd.Product"> |
| | | <result column="total_thickness" property="totalThickness"/> |
| | | <result column="thickness" property="thickness"/> |
| | | </association> |
| | | |
| | | <!--<result column="g_typeId" property="glassTypes.typeId"/> |
| | |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="selectFlowCardMp"> |
| | | <select id="selectFlowCardMp" resultMap="flowCardMap"> |
| | | select o.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | |
| | | o.processing_note, |
| | | o.delivery_address |
| | | from sd.`order` as o |
| | | where o.create_time between #{selectTime1} and #{selectTime2} |
| | | where o.production_order=2 and o.create_time between #{selectTime1} and #{selectTime2} |
| | | <!-- <where>--> |
| | | <!-- <if test="flowCard.orderId != null and flowCard.orderId != ''">--> |
| | | <!-- and a.order_id regexp #{flowCard.orderId}--> |
| | |
| | | <!-- </if>--> |
| | | |
| | | |
| | | <!-- <if test="flowCard.createTime != null and flowCard.createTime != ''">--> |
| | | <!-- and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }--> |
| | | <!-- </if>--> |
| | | |
| | | <!-- </where>--> |
| | | ; |
| | | </select> |
| | | |
| | | <select id="DetailsSelectMp"> |
| | | <select id="DetailsSelectMp" resultMap="flowCardMap"> |
| | | select od.order_id, |
| | | ogd.production_id, |
| | | od.product_id, |
| | |
| | | od.perimeter |
| | | 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 |
| | | on od.order_id = ogd.order_id |
| | | where od.order_id = #{orderId} |
| | | group by od.order_id,ogd.production_id |
| | | </select> |
| | | |
| | | |
| | | <update id="DeleteFlowCardMp"> |
| | | update 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 |
| | | set ogd.production_id=null, |
| | | ogd.production_time=null, |
| | | ogd.founder=null |
| | | where od.order_id = #{orderId} |
| | | and od.product_name = #{productName} |
| | | </update> |
| | | |
| | | <select id="SelectNoCardMp" resultMap="flowCardMap"> |
| | | select |
| | | od.order_number, |
| | | od.width, |
| | | od.height, |
| | | od.shape, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | p.total_thickness, |
| | | p.thickness, |
| | | od.weight |
| | | from |
| | | sd.order_detail as od |
| | | left join sd.order_glass_detail as ogd on od.order_id=ogd.order_id |
| | | left join sd.product as p on od.product_name=p.product_name |
| | | where od.order_id=#{orderId}and ogd.production_id=#{productionId} |
| | | <if test="flowCard.orderDetail.orderNumber != null and flowCard.orderDetail.orderNumber != ''"> |
| | | and od.order_number regexp #{flowCard.orderDetail.orderNumber} |
| | | </if> |
| | | <if test="flowCard.orderDetail.width != null and flowCard.orderDetail.width != ''"> |
| | | and od.width regexp #{flowCard.orderDetail.width} |
| | | </if> |
| | | <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''"> |
| | | and od.height regexp #{flowCard.orderDetail.height} |
| | | </if> |
| | | <if test="flowCard.orderDetail.shape != null and flowCard.orderDetail.shape != ''"> |
| | | and od.shape regexp #{flowCard.orderDetail.shape} |
| | | |
| | | </if> |
| | | GROUP BY od.order_number; |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </resultMap> |
| | | <select id="selectWordOrder" resultMap="wordOrderMap"> |
| | | select |
| | | a.order_id, |
| | | a.production_id, |
| | | c.batch, |
| | | b.product_name, |
| | | b.compute_area, |
| | | b.quantity, |
| | | b.compute_gross_area, |
| | | b.perimeter, |
| | | b.bend_radius, |
| | | b.processing_note |
| | | from order_glass_detail as a |
| | | LEFT JOIN order_detail as b on a.order_id=b.order_id and a.order_number=b.order_number LEFT JOIN |
| | | `order` as c on a.order_id=c.order_id |
| | | where isnull(a.production_id) |
| | | o.order_id, |
| | | ogd.production_id, |
| | | o.batch, |
| | | od.product_name, |
| | | od.compute_area, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | od.perimeter, |
| | | od.bend_radius, |
| | | od.processing_note |
| | | |
| | | from `order` as o left join order_detail as od on o.order_id=od.order_id |
| | | left join order_glass_detail as ogd on o.order_id=ogd.order_id and ogd.order_number=od.order_number |
| | | where isnull(ogd.production_id) and o.order_review=2 and o.production_order!=2 |
| | | <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and a.order_id regexp #{orderGlassDetail.orderId} |
| | | and o.order_id regexp #{orderGlassDetail.orderId} |
| | | </if> |
| | | <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''"> |
| | | and a.production_id regexp #{orderGlassDetail.productionId} |
| | | and ogd.production_id regexp #{orderGlassDetail.productionId} |
| | | </if> |
| | | <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''"> |
| | | and c.batch regexp #{orderGlassDetail.order.batch} |
| | | and o.batch regexp #{orderGlassDetail.order.batch} |
| | | </if> |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and b.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | and od.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | |
| | | group by a.production_id,a.order_number |
| | | order by a.id desc |
| | | group by o.order_id |
| | | order by o.id desc |
| | | |
| | | |
| | | ; |
| | |
| | | |
| | | <select id="selectWordOrderNo" resultMap="wordOrderMap"> |
| | | select |
| | | a.order_id, |
| | | a.production_id, |
| | | c.batch, |
| | | b.product_name, |
| | | b.compute_area, |
| | | b.quantity, |
| | | b.compute_gross_area, |
| | | b.perimeter, |
| | | b.bend_radius, |
| | | b.processing_note |
| | | from order_glass_detail as a |
| | | LEFT JOIN order_detail as b on a.order_id=b.order_id and a.order_number=b.order_number LEFT JOIN |
| | | `order` as c on a.order_id=c.order_id |
| | | where a.production_id IS NOT NULL |
| | | o.order_id, |
| | | ogd.production_id, |
| | | o.batch, |
| | | od.product_name, |
| | | od.compute_area, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | od.perimeter, |
| | | od.bend_radius, |
| | | od.processing_note |
| | | |
| | | from `order` as o left join order_detail as od on o.order_id=od.order_id |
| | | left join order_glass_detail as ogd on o.order_id=ogd.order_id and ogd.order_number=od.order_number |
| | | where ogd.production_id IS NOT NULL |
| | | <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and a.order_id regexp #{orderGlassDetail.orderId} |
| | | and ogd.order_id regexp #{orderGlassDetail.orderId} |
| | | </if> |
| | | <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''"> |
| | | and a.production_id regexp #{orderGlassDetail.productionId} |
| | | and ogd.production_id regexp #{orderGlassDetail.productionId} |
| | | </if> |
| | | <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''"> |
| | | and c.batch regexp #{orderGlassDetail.order.batch} |
| | | and o.batch regexp #{orderGlassDetail.order.batch} |
| | | </if> |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and b.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | and od.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | |
| | | group by a.production_id,a.order_number |
| | | order by a.id desc |
| | | group by ogd.production_id,ogd.order_number |
| | | order by ogd.id desc |
| | | |
| | | |
| | | ; |
| | |
| | | od.perimeter |
| | | from 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 |
| | | where od.order_id = #{orderId} |
| | | and ISNULL(ogd.production_id) |
| | | on od.order_id = ogd.order_id |
| | | where od.order_id = #{orderId} and ISNULL(ogd.production_id) |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and od.order_id regexp #{orderDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | group by od.order_id, od.product_id, od.product_name |
| | | ; |
| | | </select> |
| | | |
| | | <select id="SelectOrderNumber"> |
| | | <select id="SelectOrderNumber" resultMap="wordOrderMap"> |
| | | select count(ogd.production_id) |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = #{productIdVl} |
| | |
| | | where od.order_id = #{orderId} |
| | | and od.product_name = #{productName} |
| | | </update> |
| | | |
| | | <select id="SelectWorkCount"> |
| | | select COUNT(distinct order_number) |
| | | from order_glass_detail |
| | | where ISNULL(production_id) |
| | | and order_id = #{orderId} |
| | | </select> |
| | | |
| | | <select id="SelectYesWorkCount"> |
| | | select COUNT(distinct order_number) |
| | | from order_glass_detail |
| | | where order_id = #{orderId} |
| | | </select> |
| | | |
| | | <update id="UpdateWorkType"> |
| | | update sd.order as o set o.production_order=#{state} where o.order_id=#{orderId} |
| | | </update> |
| | | </mapper> |
| | |
| | | <result column="product_name" property="productName"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="quantity" property="quantity"/> |
| | | <result column="compute_gross_area" property="computeGrossArea"/> |
| | | <result column="perimeter" property="perimeter"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="width" property="width"/> |
| | | <result column="height" property="height"/> |
| | | <result column="shape" property="shape"/> |
| | | <result column="weight" property="weight"/> |
| | | </association> |
| | | <association property="orderGlassDetail" javaType="com.example.erp.entity.sd.OrderGlassDetail"> |
| | | <result column="production_id" property="productionId"/> |
| | | </association> |
| | | <association property="product" javaType="com.example.erp.entity.sd.Product"> |
| | | <result column="total_thickness" property="totalThickness"/> |
| | | <result column="thickness" property="thickness"/> |
| | | </association> |
| | | |
| | | <!--<result column="g_typeId" property="glassTypes.typeId"/> |
| | |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="selectFlowCardMp"> |
| | | <select id="selectFlowCardMp" resultMap="flowCardMap"> |
| | | select o.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | |
| | | o.processing_note, |
| | | o.delivery_address |
| | | from sd.`order` as o |
| | | where o.create_time between #{selectTime1} and #{selectTime2} |
| | | where o.production_order=2 and o.create_time between #{selectTime1} and #{selectTime2} |
| | | <!-- <where>--> |
| | | <!-- <if test="flowCard.orderId != null and flowCard.orderId != ''">--> |
| | | <!-- and a.order_id regexp #{flowCard.orderId}--> |
| | |
| | | <!-- </if>--> |
| | | |
| | | |
| | | <!-- <if test="flowCard.createTime != null and flowCard.createTime != ''">--> |
| | | <!-- and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 }--> |
| | | <!-- </if>--> |
| | | |
| | | <!-- </where>--> |
| | | ; |
| | | </select> |
| | | |
| | | <select id="DetailsSelectMp"> |
| | | <select id="DetailsSelectMp" resultMap="flowCardMap"> |
| | | select od.order_id, |
| | | ogd.production_id, |
| | | od.product_id, |
| | |
| | | od.perimeter |
| | | 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 |
| | | on od.order_id = ogd.order_id |
| | | where od.order_id = #{orderId} |
| | | group by od.order_id,ogd.production_id |
| | | </select> |
| | | |
| | | |
| | | <update id="DeleteFlowCardMp"> |
| | | update 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 |
| | | set ogd.production_id=null, |
| | | ogd.production_time=null, |
| | | ogd.founder=null |
| | | where od.order_id = #{orderId} |
| | | and od.product_name = #{productName} |
| | | </update> |
| | | |
| | | <select id="SelectNoCardMp" resultMap="flowCardMap"> |
| | | select |
| | | od.order_number, |
| | | od.width, |
| | | od.height, |
| | | od.shape, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | p.total_thickness, |
| | | p.thickness, |
| | | od.weight |
| | | from |
| | | sd.order_detail as od |
| | | left join sd.order_glass_detail as ogd on od.order_id=ogd.order_id |
| | | left join sd.product as p on od.product_name=p.product_name |
| | | where od.order_id=#{orderId}and ogd.production_id=#{productionId} |
| | | <if test="flowCard.orderDetail.orderNumber != null and flowCard.orderDetail.orderNumber != ''"> |
| | | and od.order_number regexp #{flowCard.orderDetail.orderNumber} |
| | | </if> |
| | | <if test="flowCard.orderDetail.width != null and flowCard.orderDetail.width != ''"> |
| | | and od.width regexp #{flowCard.orderDetail.width} |
| | | </if> |
| | | <if test="flowCard.orderDetail.height != null and flowCard.orderDetail.height != ''"> |
| | | and od.height regexp #{flowCard.orderDetail.height} |
| | | </if> |
| | | <if test="flowCard.orderDetail.shape != null and flowCard.orderDetail.shape != ''"> |
| | | and od.shape regexp #{flowCard.orderDetail.shape} |
| | | |
| | | </if> |
| | | GROUP BY od.order_number; |
| | | |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </resultMap> |
| | | <select id="selectWordOrder" resultMap="wordOrderMap"> |
| | | select |
| | | a.order_id, |
| | | a.production_id, |
| | | c.batch, |
| | | b.product_name, |
| | | b.compute_area, |
| | | b.quantity, |
| | | b.compute_gross_area, |
| | | b.perimeter, |
| | | b.bend_radius, |
| | | b.processing_note |
| | | from order_glass_detail as a |
| | | LEFT JOIN order_detail as b on a.order_id=b.order_id and a.order_number=b.order_number LEFT JOIN |
| | | `order` as c on a.order_id=c.order_id |
| | | where isnull(a.production_id) |
| | | o.order_id, |
| | | ogd.production_id, |
| | | o.batch, |
| | | od.product_name, |
| | | od.compute_area, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | od.perimeter, |
| | | od.bend_radius, |
| | | od.processing_note |
| | | |
| | | from `order` as o left join order_detail as od on o.order_id=od.order_id |
| | | left join order_glass_detail as ogd on o.order_id=ogd.order_id and ogd.order_number=od.order_number |
| | | where isnull(ogd.production_id) and o.order_review=2 and o.production_order!=2 |
| | | <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and a.order_id regexp #{orderGlassDetail.orderId} |
| | | and o.order_id regexp #{orderGlassDetail.orderId} |
| | | </if> |
| | | <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''"> |
| | | and a.production_id regexp #{orderGlassDetail.productionId} |
| | | and ogd.production_id regexp #{orderGlassDetail.productionId} |
| | | </if> |
| | | <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''"> |
| | | and c.batch regexp #{orderGlassDetail.order.batch} |
| | | and o.batch regexp #{orderGlassDetail.order.batch} |
| | | </if> |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and b.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | and od.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | |
| | | group by a.production_id,a.order_number |
| | | order by a.id desc |
| | | group by o.order_id |
| | | order by o.id desc |
| | | |
| | | |
| | | ; |
| | |
| | | |
| | | <select id="selectWordOrderNo" resultMap="wordOrderMap"> |
| | | select |
| | | a.order_id, |
| | | a.production_id, |
| | | c.batch, |
| | | b.product_name, |
| | | b.compute_area, |
| | | b.quantity, |
| | | b.compute_gross_area, |
| | | b.perimeter, |
| | | b.bend_radius, |
| | | b.processing_note |
| | | from order_glass_detail as a |
| | | LEFT JOIN order_detail as b on a.order_id=b.order_id and a.order_number=b.order_number LEFT JOIN |
| | | `order` as c on a.order_id=c.order_id |
| | | where a.production_id IS NOT NULL |
| | | o.order_id, |
| | | ogd.production_id, |
| | | o.batch, |
| | | od.product_name, |
| | | od.compute_area, |
| | | od.quantity, |
| | | od.compute_gross_area, |
| | | od.perimeter, |
| | | od.bend_radius, |
| | | od.processing_note |
| | | |
| | | from `order` as o left join order_detail as od on o.order_id=od.order_id |
| | | left join order_glass_detail as ogd on o.order_id=ogd.order_id and ogd.order_number=od.order_number |
| | | where ogd.production_id IS NOT NULL |
| | | <if test="orderGlassDetail.orderId != null and orderGlassDetail.orderId != ''"> |
| | | and a.order_id regexp #{orderGlassDetail.orderId} |
| | | and ogd.order_id regexp #{orderGlassDetail.orderId} |
| | | </if> |
| | | <if test="orderGlassDetail.productionId != null and orderGlassDetail.productionId != ''"> |
| | | and a.production_id regexp #{orderGlassDetail.productionId} |
| | | and ogd.production_id regexp #{orderGlassDetail.productionId} |
| | | </if> |
| | | <if test="orderGlassDetail.order.batch != null and orderGlassDetail.order.batch != ''"> |
| | | and c.batch regexp #{orderGlassDetail.order.batch} |
| | | and o.batch regexp #{orderGlassDetail.order.batch} |
| | | </if> |
| | | <if test="orderGlassDetail.orderDetail.productName != null and orderGlassDetail.orderDetail.productName!= ''"> |
| | | and b.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | and od.product_name regexp #{orderGlassDetail.orderDetail.productName} |
| | | </if> |
| | | |
| | | <if test="orderGlassDetail.createTime != ''"> |
| | | and DATE_FORMAT((a.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | and DATE_FORMAT((ogd.create_time),'%Y-%m-%d') BETWEEN #{ selectTime1 } AND #{ selectTime2 } |
| | | </if> |
| | | |
| | | group by a.production_id,a.order_number |
| | | order by a.id desc |
| | | group by ogd.production_id,ogd.order_number |
| | | order by ogd.id desc |
| | | |
| | | |
| | | ; |
| | |
| | | od.perimeter |
| | | from 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 |
| | | where od.order_id = #{orderId} |
| | | and ISNULL(ogd.production_id) |
| | | on od.order_id = ogd.order_id |
| | | where od.order_id = #{orderId} and ISNULL(ogd.production_id) |
| | | <if test="orderDetail.orderId != null and orderDetail.orderId != ''"> |
| | | and od.order_id regexp #{orderDetail.orderId} |
| | | </if> |
| | | <if test="orderDetail.productId != null and orderDetail.productId != ''"> |
| | | and od.product_id regexp #{orderDetail.productId} |
| | | </if> |
| | | <if test="orderDetail.productName != null and orderDetail.productName != ''"> |
| | | and od.product_name regexp #{orderDetail.productName} |
| | | </if> |
| | | group by od.order_id, od.product_id, od.product_name |
| | | ; |
| | | </select> |
| | | |
| | | <select id="SelectOrderNumber"> |
| | | <select id="SelectOrderNumber" resultMap="wordOrderMap"> |
| | | select count(ogd.production_id) |
| | | from sd.order_glass_detail as ogd |
| | | where ogd.production_id = #{productIdVl} |
| | |
| | | where od.order_id = #{orderId} |
| | | and od.product_name = #{productName} |
| | | </update> |
| | | |
| | | <select id="SelectWorkCount"> |
| | | select COUNT(distinct order_number) |
| | | from order_glass_detail |
| | | where ISNULL(production_id) |
| | | and order_id = #{orderId} |
| | | </select> |
| | | |
| | | <select id="SelectYesWorkCount"> |
| | | select COUNT(distinct order_number) |
| | | from order_glass_detail |
| | | where order_id = #{orderId} |
| | | </select> |
| | | |
| | | <update id="UpdateWorkType"> |
| | | update sd.order as o set o.production_order=#{state} where o.order_id=#{orderId} |
| | | </update> |
| | | </mapper> |