Merge branch 'master' of http://bore.pub:10439/r/ERP_override
# Conflicts:
# north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
# north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
# north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
# north-glass-erp/src/main/resources/application.yml
| | |
| | | export default { |
| | | serverUrl:"localhost:8086" |
| | | //serverUrl:"10.153.19.150:8080" |
| | | //serverUrl:"192.168.1.199:8086" |
| | | } |
New file |
| | |
| | | <script setup> |
| | | import {onMounted, ref} from "vue" |
| | | import {VueDraggable} from "vue-draggable-plus" |
| | | import request from "@/utils/request" |
| | | import {ElMessage, ElMessageBox} from "element-plus" |
| | | import {CloseBold, Delete, InfoFilled} from "@element-plus/icons-vue" |
| | | import {useI18n} from "vue-i18n" |
| | | const { t } = useI18n() |
| | | |
| | | const activeName = ref('1') |
| | | |
| | | const list = ref([ |
| | | ]) |
| | | const size = ref([ |
| | | {column:'width',title:null}, |
| | | {column:'height',title:null} |
| | | ]) |
| | | const order = ref({ |
| | | orderId:'order', |
| | | project:'order', |
| | | orderType:'order', |
| | | customers:'order', |
| | | icon:'order', |
| | | orderClassify:'order', |
| | | packType:'order', |
| | | deliveryDate:'order', |
| | | batch:'order', |
| | | calculateType:'order', |
| | | salesman:'order', |
| | | alType:'order', |
| | | money:'order', |
| | | contractId:'order', |
| | | customerBatch:'order', |
| | | contacts:'order', |
| | | contactNumber:'order', |
| | | deliveryAddress:'order', |
| | | processingNote:'order', |
| | | }) |
| | | |
| | | const tags = ref([]) |
| | | const tag = ref({ |
| | | id:null, |
| | | name:null, |
| | | type:1, |
| | | tagWidth:10, |
| | | tagHeight:10, |
| | | value:null, |
| | | size:null |
| | | |
| | | }) |
| | | const clickIndex = ref(-1) |
| | | |
| | | const getTags = () => { |
| | | request.get('tagStyle/getTagList').then(res => { |
| | | tags.value = res.data |
| | | }) |
| | | } |
| | | |
| | | onMounted(() => { |
| | | getTags() |
| | | }) |
| | | |
| | | const saveTag = () => { |
| | | ElMessageBox.prompt( '新增标签名:', { |
| | | confirmButtonText: '保存', |
| | | cancelButtonText: '取消', |
| | | inputPattern:/^.{1,20}$/, |
| | | inputErrorMessage: '请输入20个字符以内的且不为空的字符', |
| | | }).then(({ value }) => { |
| | | tag.value.name = value |
| | | tag.value.value = JSON.stringify(list.value) |
| | | tag.value.size = JSON.stringify(size.value) |
| | | request.post('tagStyle/saveTag',tag.value).then(res => { |
| | | if(res.code === '200' && res.data===true){ |
| | | ElMessage.success("保存成功") |
| | | getTags() |
| | | } |
| | | }) |
| | | }) |
| | | |
| | | } |
| | | |
| | | const changeType = () => { |
| | | if(tag.value.type == 1){ |
| | | tag.value.tagWidth=10 |
| | | tag.value.tagHeight=10 |
| | | size.value=[ |
| | | {column:'width',title:null}, |
| | | {column:'height',title:null} |
| | | ] |
| | | }else if(tag.value.type == 2){ |
| | | tag.value.tagWidth=4 |
| | | tag.value.tagHeight=3 |
| | | size.value=[ |
| | | {column:'childWidth',title:null}, |
| | | {column:'childHeight',title:null} |
| | | ] |
| | | } |
| | | } |
| | | |
| | | const clearList = () => { |
| | | list.value = [] |
| | | } |
| | | |
| | | const searchTag = (getTag,index) => { |
| | | list.value = JSON.parse(getTag.value) |
| | | size.value = JSON.parse(getTag.size) |
| | | tag.value = getTag |
| | | clickIndex.value = index |
| | | } |
| | | |
| | | const close = () => { |
| | | tag.value = { |
| | | id:null, |
| | | name:null, |
| | | type:1, |
| | | tagWidth:10, |
| | | tagHeight:10, |
| | | value:null, |
| | | size:null |
| | | } |
| | | list.value = [] |
| | | size.value = [ |
| | | {column:'width',title:null}, |
| | | {column:'height',title:null} |
| | | ] |
| | | clickIndex.value = -1 |
| | | } |
| | | |
| | | const deleteTag = () => { |
| | | request.post(`tagStyle/deleteTag/${tag.value.id}`).then(res => { |
| | | if(res.code === '200' && res.data===true){ |
| | | ElMessage.success("删除成功") |
| | | getTags() |
| | | close() |
| | | } |
| | | |
| | | }) |
| | | } |
| | | |
| | | const addList = (getTag,from) => { |
| | | list.value.push({ |
| | | name:getTag, |
| | | title:null, |
| | | isFocus:false, |
| | | from:from |
| | | }) |
| | | } |
| | | |
| | | const deleteThis = (index) => { |
| | | list.value.splice(index,1) |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div style="width: 100%;height: 100%;" class="common-layout"> |
| | | <el-container style="width: 100%;height: 100%;"> |
| | | <el-aside width="200px"> |
| | | <el-collapse v-model="activeName" accordion> |
| | | <el-collapse-item title="标签列表" name="1"> |
| | | <div v-for="(tag,index) in tags" |
| | | :class="{'tag-active':index===clickIndex}" |
| | | @dblclick="searchTag(tag,index)"> |
| | | {{tag.name}} |
| | | </div> |
| | | |
| | | </el-collapse-item> |
| | | </el-collapse> |
| | | </el-aside> |
| | | <el-container> |
| | | <el-header > |
| | | <el-row id="el-rows" style="margin-top: 0.5rem"> |
| | | <el-select |
| | | v-model="tag.type" |
| | | @change="changeType" |
| | | placeholder="" > |
| | | <el-option label="成品" :value="1"/> |
| | | <el-option label="半成品" :value="2"/> |
| | | </el-select> |
| | | <el-select placeholder="订单表头"> |
| | | <el-option @click="addList(keys,item)" |
| | | v-for="(item,keys,index) in order" |
| | | :label="$t(item+'.'+keys)" :value="keys"/> |
| | | |
| | | </el-select> |
| | | |
| | | <el-button v-if="tag.id!==null" @click="close" type="primary" circle :icon="CloseBold"/> |
| | | </el-row> |
| | | </el-header> |
| | | <el-main> |
| | | <VueDraggable |
| | | ref="el" |
| | | v-model="list" |
| | | :animation="150" |
| | | ghostClass="ghost" |
| | | style="height: 95%;background-color: white;position: relative;" |
| | | class="flex flex-col gap-2 p-4 w-300px h-300px m-auto bg-gray-500/5 rounded" |
| | | > |
| | | <div |
| | | v-for="(item,index) in list" |
| | | :key="item.id" |
| | | class="cursor-move h-30 bg-gray-500/5 rounded p-3 cursor-move" |
| | | > |
| | | <el-row @mouseenter="item.isfocus=true" @mouseleave="item.isfocus=false" > |
| | | <el-col :span="6"><el-input v-model="item.title"/></el-col> |
| | | <el-col :span="4">{{ item.name }}</el-col> |
| | | <el-col :span="4"> |
| | | <el-button |
| | | size="default" |
| | | v-if="item.isfocus" |
| | | @click="deleteThis(index)" |
| | | :icon="Delete" circle /> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div class="cursor-move h-30 bg-gray-500/5 rounded p-3 cursor-move" |
| | | style="position: absolute;bottom: 0.5rem; " > |
| | | <el-row > |
| | | <el-col :span="6"><el-input v-model="size[0].title"/></el-col> |
| | | <el-col :span="4">{{ size[0].column }}</el-col> |
| | | <el-col :span="6"><el-input v-model="size[1].title"/></el-col> |
| | | <el-col :span="4">{{size[1].column }}</el-col> |
| | | </el-row> |
| | | |
| | | </div> |
| | | </VueDraggable> |
| | | </el-main> |
| | | <el-footer style="padding-top: 0.5rem"> |
| | | <el-popconfirm |
| | | width="220" |
| | | confirm-button-text="确定" |
| | | cancel-button-text="取消" |
| | | :icon="InfoFilled" |
| | | icon-color="#626AEF" |
| | | title="确定删除?" |
| | | @confirm="deleteTag" |
| | | v-if="tag.id!==null" |
| | | > |
| | | <template #reference> |
| | | <el-button type="primary" style="float: left" >删除</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | |
| | | <el-button type="primary" @click="clearList">清空</el-button> |
| | | <el-button v-if="tag.id===null" type="primary" @click="saveTag" >新增</el-button> |
| | | <el-button v-else type="primary" @click="saveTag" >修改</el-button> |
| | | </el-footer> |
| | | </el-container> |
| | | </el-container> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | /*.common-layout .el-aside { |
| | | background-color: var(--el-color-primary-light-8); |
| | | color: var(--el-text-color-primary); |
| | | text-align: center; |
| | | }*/ |
| | | |
| | | .common-layout .el-header, .common-layout .el-footer { |
| | | background-color: var(--el-color-primary-light-9); |
| | | color: var(--el-text-color-primary); |
| | | text-align: center; |
| | | border: var(--el-color-primary-light-7) 1px solid; |
| | | } |
| | | |
| | | .common-layout .el-main { |
| | | background-color: var(--el-color-primary-light-9); |
| | | color: var(--el-text-color-primary); |
| | | text-align: center; |
| | | } |
| | | |
| | | .ghost { |
| | | opacity: 0.5; |
| | | background: #c8ebfb; |
| | | } |
| | | .cursor-move{ |
| | | background-color: #6b72800d; |
| | | margin-bottom: 0.2rem; |
| | | text-align: center; |
| | | height: 2rem; |
| | | width: 50%; |
| | | margin-left: 25%; |
| | | } |
| | | .el-select{ |
| | | width: 8rem |
| | | } |
| | | |
| | | #el-rows > *{ |
| | | margin-right: 0.5rem; |
| | | } |
| | | .tag-active{ |
| | | background-color: #c8ebfb; |
| | | } |
| | | </style> |
| | |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {useI18n} from "vue-i18n" |
| | | import request from "@/utils/request" |
| | | import {ElMessage} from "element-plus"; |
| | | import {ElMessage} from "element-plus" |
| | | const { t } = useI18n() |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {VXETable} from "vxe-table"; |
| | | import {toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import PrintProcess from '@/views/pp/processCard/PrintProcess.vue' |
| | | import PrintLabel from '@/views/pp/processCard/PrintLabel.vue' |
| | | import footSum from "@/hook/footSum" |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | let router = useRouter() |
| | | const dialogTableVisible = ref(false) |
| | | const dialogTableVisibleLabel = ref(false) |
| | | const dialogTableVisibleSetup = ref(false) |
| | | const printVisible= ref(false) |
| | | let selectRecords = ref(null) |
| | | |
| | | //定义滚动条高度 |
| | | 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 |
| | | const xGrid = ref(null) |
| | | const xGridDetail =ref(null) |
| | | |
| | | |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | request.post(`/processCard/printFlowCardDetails/${row.process_id}/${row.technology_number}`,filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | produceDetailList.value = (res.data.data) |
| | | printVisible.value=true |
| | | |
| | | } else { |
| | | |
| | | ElMessage.warning(res.msg) |
| | | |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | |
| | | |
| | | |
| | | }) |
| | | let filterDataPrint =ref( {}) |
| | | let printSetupDate = { |
| | | id:'', |
| | | printType:'', |
| | | printTypeName:'', |
| | | printState:'' |
| | | } |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义数据返回结果 |
| | | let produceDetailList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | |
| | | } |
| | | }) |
| | | |
| | | request.post(`/processCard/printSetup`, filterDataPrint.value).then((res) => { |
| | | if (res.code == 200) { |
| | | printSetupDate = deepClone(res.data.data) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | | border: "full",//表格加边框 |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {title: '操作', width: 55, slots: { default: 'button_slot' },fixed:"left"}, |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check'), width: 80}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | |
| | | }, |
| | | { |
| | | field: 'process_id', |
| | | title: t('processCard.processId'), |
| | | title: '流程卡号', |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | |
| | | }, |
| | | { |
| | | field: 'customer_name', |
| | | title: t('customer.customerName'), |
| | | title: '客户名称', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'project', |
| | | title: t('order.project'), |
| | | title: '项目名称', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'technology_number', title: t('processCard.technologyNumber'), showOverflow: "ellipsis"}, |
| | | {field: 'glass_address', title: t('processCard.glassAddress'),}, |
| | | {field: 'quantity', title: t('order.quantity'),}, |
| | | {field: 'total_area', title: t('order.area'),}, |
| | | {field: 'product_name', title: t('order.product'),}, |
| | | {field: 'glass_child', title: t('reportingWorks.glassChild'),}, |
| | | {field: 'founder', title: t('processCard.founder'),}, |
| | | {field: 'splitFrame_time', title: t('processCard.splitFrameTime'),}, |
| | | {field: 'technology_number', title: '小片顺序', showOverflow: "ellipsis"}, |
| | | {field: 'glass_address', title: '小片标记',}, |
| | | {field: 'quantity', title: '数量',}, |
| | | {field: 'total_area', title: '面积',}, |
| | | {field: 'product_name', title: '产品名称',}, |
| | | {field: 'glass_child', title: '单片名称',}, |
| | | {field: 'founder', title: '分架员',}, |
| | | {field: 'splitFrame_time', title: '分架时间',}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'print', name: t('processCard.print'), status: 'primary'}, |
| | | {code: 'printLabel', name: t('processCard.printLabel'), status: 'primary'}, |
| | | {code: 'printSetup', name: t('processCard.printSetup'),status: 'primary'}, |
| | | {code: 'print', name: '打印流程卡', status: 'primary'}, |
| | | {code: 'printLabel', name: '打印标签', status: 'primary'}, |
| | | ], |
| | | // import: false, |
| | | // export: true, |
| | | //print: true, |
| | | //print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | const gridEvents = { |
| | | toolbarButtonClick ({ code}) { |
| | | const $grid = xGrid.value |
| | | selectRecords = $grid.getCheckboxRecords() |
| | | selectRecords = $grid.getCheckboxRecords() |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'print': { |
| | |
| | | |
| | | break |
| | | } |
| | | case 'printSetup': { |
| | | dialogTableVisibleSetup.value=true |
| | | case 'sort': { |
| | | const $table = xGridDetail.value |
| | | let data = $table.getTableData().fullData |
| | | let flowCardData = ref({ |
| | | flowCard: data, |
| | | }) |
| | | request.post("/processCard/printSort", flowCardData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success("排序成功") |
| | | //router.push('/main/processCard/SplittingDetails?orderId=${orderId}') |
| | | router.push({ |
| | | path: '/main/processCard/PrintFlowCard', |
| | | query: {orderId: orderId,random: Math.random()} |
| | | }) |
| | | |
| | | //location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | |
| | | let checkbox= ref({ |
| | | customerName:0, |
| | | orderId:0, |
| | | typeName:0, |
| | | specifications:0, |
| | | project:0, |
| | | remarks:0, |
| | | glassChild:0, |
| | | processingNote:0, |
| | | |
| | | const detailGridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe: true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮 |
| | | id: 'demo_1', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollX: {enabled: true}, |
| | | scrollY: {enabled: true, gt: 0},//开启虚拟滚动 |
| | | showOverflow: true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns: [ |
| | | {type: 'expand', fixed: "left", slots: {content: 'content'}, width: 50}, |
| | | {type: 'seq', fixed: "left", title: t('basicData.Number'), width: 50}, |
| | | { |
| | | field: 'sort', |
| | | width: 80, |
| | | editRender: {name: 'input', attrs: {placeholder: ''}}, |
| | | title: '排序', |
| | | }, |
| | | { |
| | | field: 'process_id', |
| | | title: '流程卡号', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'order_number', |
| | | title: '序号', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'technology_number', |
| | | title: '小片顺序', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'glass_address', |
| | | title: '小片标记', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'quantity', |
| | | title: '数量', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'child_width', |
| | | title: '宽', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'child_height', |
| | | title: '高', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'area', |
| | | title: '面积', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'sort', name: '排序', status: 'primary'}, |
| | | ], |
| | | // import: false, |
| | | // export: true, |
| | | //print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: null,//表格数据 |
| | | //脚部求和 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = ["quantity",'area',] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | }) |
| | | |
| | | const changeDate = ()=>{ |
| | | |
| | | request.post(`/processCard/updatePrintSetup`, checkbox.value).then((res) => { |
| | | if (res.code == 200) { |
| | | dialogTableVisibleSetup.value=false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | const openedTable = () => { |
| | | let detail =ref(produceDetailList.value) |
| | | xGridDetail.value.reloadData(detail.value) |
| | | } |
| | | |
| | | </script> |
| | |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <!-- v-if="userStore.user.permissions.indexOf('SelectProductionBasicData.edit') > -1"--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'edit')">{{ $t('basicData.edit') }} |
| | | <el-button @click="getTableRow(row,'edit')" |
| | | link |
| | | type="primary" |
| | | size="small"> |
| | | {{ $t('basicData.edit') }} |
| | | </el-button> |
| | | |
| | | </template> |
| | |
| | | <el-dialog |
| | | v-model="dialogTableVisible" |
| | | destroy-on-close |
| | | :title="$t('processCard.print')" |
| | | title="流程卡打印" |
| | | style="width: 80%;height:75% "> |
| | | <PrintProcess :printList="selectRecords" |
| | | style="width: 100%;height: 100%" /> |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | | v-model="dialogTableVisibleLabel" |
| | | destroy-on-close |
| | | :title="$t('processCard.printLabel')" |
| | | title="标签打印" |
| | | style="width: 80%;height:75% "> |
| | | <PrintLabel :printList="selectRecords" |
| | | style="width: 100%;height: 100%" /> |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | <el-dialog v-model="dialogTableVisibleSetup" :title="$t('processCard.printSetup')" style="width: 70%;height:75% "> |
| | | <div> |
| | | <el-button @click="changeDate" id="searchButton" type="primary" >{{ $t('basicData.save') }}</el-button> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | @opened="openedTable" |
| | | v-model="printVisible" |
| | | title="流程卡明细" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | style="width: 80%;height:75% "> |
| | | <vxe-grid |
| | | ref="xGridDetail" |
| | | class="mytable-scrollbar" |
| | | max-height="100%" |
| | | height="600px" |
| | | size="small" |
| | | v-bind="detailGridOptions" |
| | | v-on="gridEvents"> |
| | | |
| | | <div class="order-primary" > |
| | | <el-checkbox v-model="checkbox.customerName" :checked="printSetupDate[0].printState===1">{{ $t('customer.customerName') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.project" :checked="printSetupDate[1].printState===1">{{ $t('order.project') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.orderId" :checked="printSetupDate[6].printState===1">{{ $t('order.orderId') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.specifications" :checked="printSetupDate[2].printState===1">{{ $t('processCard.specificationQuantity') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.remarks" :checked="printSetupDate[3].printState===1">{{ $t('order.floorNumber') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.processingNote" :checked="printSetupDate[4].printState===1">{{ $t('order.processingNote') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.glassChild" :checked="printSetupDate[5].printState===1">{{ $t('processCard.singlePieceProductName') }}</el-checkbox> |
| | | <el-checkbox v-model="checkbox.typeName" :checked="printSetupDate[7].printState===1">{{ $t('processCard.productType') }}</el-checkbox> |
| | | </div> |
| | | <template #content="{ row }"> |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in detailGridOptions.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 #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="text" |
| | | v-model="option.data" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | .main-div-customer { |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | .order-primary{ |
| | | margin-top: 20px; |
| | | width: 100%; |
| | | } |
| | | |
| | | </style> |
| | |
| | | import BasicTable from '@/components/sd/product/BasicTable.vue' |
| | | import {VXETable} from "vxe-table"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import {addListener, toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import {useI18n} from 'vue-i18n' |
| | | import footSum from "@/hook/footSum" |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | const {t} = useI18n() |
| | | |
| | | let router = useRouter() |
| | | const userStore = useUserInfoStore() |
| | |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = $ref(1) |
| | | let pageNum = ref(1) |
| | | let pageState = null |
| | | |
| | | let total = reactive({ |
| | | pageTotal: 0, |
| | | dataTotal: 0, |
| | | pageSize: 100 |
| | | }) |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | |
| | | return [start, end] |
| | | } |
| | | |
| | | onMounted(()=>{ |
| | | onMounted(() => { |
| | | //启用表格拖动选中 |
| | | addListener(xGrid.value,gridOptions) |
| | | addListener(xGrid.value, gridOptions) |
| | | }) |
| | | |
| | | //第一次加载获取近3天时间和默认状态 |
| | |
| | | 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 |
| | | //禁用删除、保存按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | |
| | | if (selectProcesses == '') { |
| | | selectProcesses = null |
| | | } |
| | | if (inputVal == null && selectState == 1) { |
| | | //根据时间查询未排产数据 |
| | | request.post(`/productionScheduling/selectLastScheduling/${startTime}/${endTime}/${selectProcesses}/${inputVal}`, filterData.value).then((res) => { |
| | | // if (inputVal == null && selectState == 1) { |
| | | // //根据时间查询未排产数据 |
| | | // request.post(`/productionScheduling/selectLastScheduling/${startTime}/${endTime}/${selectProcesses}/${inputVal}`, filterData.value).then((res) => { |
| | | // |
| | | // if (res.code == 200) { |
| | | // pageTotal.value = res.data.total |
| | | // xGrid.value.loadData(res.data.data) |
| | | // gridOptions.loading = false |
| | | // //禁用删除、审核按钮 |
| | | // gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | // gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | // //启用保存 |
| | | // gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // } |
| | | // }) |
| | | // } else if (inputVal != null && selectState == 1) { |
| | | //根据工序查询未排产数据 |
| | | request.post(`/productionScheduling/selectScheduling/${pageNum.value}/${total.pageSize}/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, 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) |
| | | console.log(res.data.data) |
| | | gridOptions.loading = false |
| | | //禁用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | //启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | // } else if (inputVal == null && selectState == 2) { |
| | | // //根据时间查询已排产数据 |
| | | // request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | // if (res.code == 200) { |
| | | // pageTotal.value = res.data.total |
| | | // xGrid.value.loadData(res.data.data) |
| | | // gridOptions.loading = false |
| | | // //启用删除、审核按钮 |
| | | // gridOptions.toolbarConfig.buttons[0].disabled = false |
| | | // gridOptions.toolbarConfig.buttons[1].disabled = false |
| | | // //禁用保存 |
| | | // gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // } |
| | | // }) |
| | | // } else if (inputVal != null && selectState == 2) { |
| | | // //根据订单号查询已排产数据 |
| | | // request.post(`/productionScheduling/selectSchedulingNot/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | // if (res.code == 200) { |
| | | // pageTotal.value = res.data.total |
| | | // xGrid.value.loadData(res.data.data) |
| | | // gridOptions.loading = false |
| | | // //启用删除、审核按钮 |
| | | // gridOptions.toolbarConfig.buttons[0].disabled = false |
| | | // gridOptions.toolbarConfig.buttons[1].disabled = false |
| | | // //禁用保存 |
| | | // gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | // } else { |
| | | // ElMessage.warning(res.msg) |
| | | // } |
| | | // }) |
| | | // } |
| | | |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //禁用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | //启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } else if (inputVal != null && selectState == 1) { |
| | | //根据工序查询未排产数据 |
| | | request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //禁用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | //启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } else if (inputVal == null && selectState == 2) { |
| | | //根据时间查询已排产数据 |
| | | request.post(`/productionScheduling/selectScheduling/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //启用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = false |
| | | gridOptions.toolbarConfig.buttons[1].disabled = false |
| | | //禁用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } else if (inputVal != null && selectState == 2) { |
| | | //根据订单号查询已排产数据 |
| | | request.post(`/productionScheduling/selectSchedulingNot/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //启用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = false |
| | | gridOptions.toolbarConfig.buttons[1].disabled = false |
| | | //禁用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | 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] |
| | | let selectProcesses = value.value |
| | | let selectState = stateValue.value |
| | | let inputVal = form.orderId |
| | | if (inputVal == '') { |
| | | inputVal = null |
| | | } |
| | | if (selectProcesses == '') { |
| | | selectProcesses = null |
| | | } |
| | | |
| | | request.post(`/productionScheduling/selectScheduling/1/${total.pageSize}/${startTime}/${endTime}/${inputVal}/${selectProcesses}/${selectState}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | total.dataTotal = res.data.total.total * 1 |
| | | total.pageTotal = parseInt(res.data.total) |
| | | pageNum.value = 1 |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | //禁用删除、审核按钮 |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | //启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | /*后端返回结果多层嵌套展示*/ |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | // remote: true |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | |
| | | editConfig: { |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | |
| | | body: { |
| | | options: [ |
| | | [ |
| | | { code: 'copyChecked', name: t('basicData.selectSame'), prefixIcon: 'vxe-icon-copy', visible: true, disabled: false }, |
| | | { code: 'copyAll', name: t('basicData.sameAfterwards'), prefixIcon: 'vxe-icon-feedback', visible: true, disabled: false }, |
| | | { code: 'clearChecked', name: t('basicData.clearSelection'), prefixIcon: 'vxe-icon-indicator', visible: true, disabled: false }, |
| | | { |
| | | code: 'copyChecked', |
| | | name: t('basicData.selectSame'), |
| | | prefixIcon: 'vxe-icon-copy', |
| | | visible: true, |
| | | disabled: false |
| | | }, |
| | | { |
| | | code: 'copyAll', |
| | | name: t('basicData.sameAfterwards'), |
| | | prefixIcon: 'vxe-icon-feedback', |
| | | visible: true, |
| | | disabled: false |
| | | }, |
| | | { |
| | | code: 'clearChecked', |
| | | name: t('basicData.clearSelection'), |
| | | prefixIcon: 'vxe-icon-indicator', |
| | | visible: true, |
| | | disabled: false |
| | | }, |
| | | ] |
| | | ] |
| | | } |
| | |
| | | }, |
| | | // {field: '排产编号', title: '排产编号', width: 120 }, |
| | | { |
| | | field: 'order_id', |
| | | field: 'orderGlassDetail.orderId', |
| | | title: t('order.orderId'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | width: 100, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'customer_name', |
| | | field: 'order.customerName', |
| | | title: t('processCard.customerName'), |
| | | width: 110, |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'project', |
| | | field: 'order.project', |
| | | title: t('order.project'), |
| | | width: 100, |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'order_number', |
| | | field: 'orderNumber', |
| | | title: t('order.OrderNum'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | width: 70, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'technology_number', |
| | | field: 'technologyNumber', |
| | | title: t('processCard.technologyNumber'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | width: 70, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'child_width', |
| | | field: 'orderGlassDetail.childWidth', |
| | | title: t('order.width'), |
| | | width: 60, |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'child_height', |
| | | field: 'orderGlassDetail.childHeight', |
| | | title: t('order.height'), |
| | | width: 60, |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'quantity', title: t('processCard.orderQuantity'), width: 70}, |
| | | {field: 'area', title: t('processCard.orderArea'), width: 90}, |
| | | {field: 'orderDetail.quantity', title: t('processCard.orderQuantity'), width: 70}, |
| | | {field: 'orderGlassDetail.area', title: t('processCard.orderArea'), width: 90}, |
| | | { |
| | | field: 'scheduling_quantity', |
| | | field: 'schedulingQuantity', |
| | | width: 120, |
| | | editRender: {name: 'input', attrs: {placeholder: ''}}, |
| | | title: t('processCard.productionSchedulingQuantity'), |
| | |
| | | {field: 'pendingProductionArea', title: t('processCard.areaToScheduled'), width: 120}, |
| | | {field: 'productionScheduledQuantity', title: t('processCard.plannedProductionQuantity'), width: 120}, |
| | | {field: 'productionScheduledArea', title: t('processCard.plannedProductionArea'), width: 120}, |
| | | {field: 'review_status', title: t('processCard.reviewedState'), width: 140}, |
| | | {field: 'reviewStatus', title: t('processCard.reviewedState'), width: 140}, |
| | | {field: 'reviewer', title: t('processCard.reviewed'), width: 140}, |
| | | {field: 'glass_child', title: t('order.product'), width: 140}, |
| | | {field: 'shape', title: t('order.shape'), width: 80}, |
| | | {field: 'orderGlassDetail.glassChild', title: t('order.product'), width: 140}, |
| | | {field: 'orderDetail.shape', title: t('order.shape'), width: 80}, |
| | | {field: 'notes', title: t('processCard.notes'), editRender: {name: 'input', attrs: {placeholder: ''}}, width: 120}, |
| | | {field: 'scheduling_id', title: t('processCard.schedulingId'), width: 120}, |
| | | {field: 'schedulingId', title: t('processCard.schedulingId'), width: 120}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | }, |
| | | 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 '' |
| | | // }) |
| | | // ] |
| | | // } |
| | | footerMethod({columns, data}) {//页脚函数 |
| | | return [ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return t('basicData.total') |
| | | } |
| | | const List = |
| | | ["orderDetail.quantity", 'orderGlassDetail.area', 'pendingProductionQuantity', |
| | | 'pendingProductionArea', 'productionScheduledQuantity', 'productionScheduledArea'] |
| | | if (List.includes(column.field)) { |
| | | return footSum(data, column.field) |
| | | } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | |
| | | }) |
| | | |
| | |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | if (selectRecords.length == 0) { |
| | | ElMessage.warning(t('processCard.checkProductionScheduling')) |
| | | ElMessage.warning("请勾选排产数据") |
| | | return; |
| | | } |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | |
| | | let number = selectRecords[i].scheduling_quantity |
| | | //计划开始、结束时间,排产数量不能为空 |
| | | if (start == null || end == null || number == null) { |
| | | ElMessage.warning(t('processCard.saveCorrespondingValues')) |
| | | ElMessage.warning("请填入对应的值再进行保存") |
| | | return; |
| | | } |
| | | } |
| | | let selectProcesses = value.value |
| | | if (selectProcesses == null || selectProcesses == "") { |
| | | ElMessage.warning(t('processCard.selectProductionSchedulingProcess')) |
| | | ElMessage.warning("请选择排产工序") |
| | | return; |
| | | } |
| | | |
| | |
| | | //保存排产数据 |
| | | request.post("/productionScheduling/addScheduling", schedulingData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | ElMessage.success("保存成功") |
| | | // 启用保存 |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | router.push({ |
| | | path: '/main/processCard/ProductionScheduling', |
| | | query: { random: Math.random()} |
| | | query: {random: Math.random()} |
| | | }) |
| | | } else { |
| | | // 启用保存 |
| | |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | if ($table) { |
| | | if (selectRecords.length == 0) { |
| | | ElMessage.warning(t('processCard.checkProductionScheduling')) |
| | | ElMessage.warning("请勾选排产数据") |
| | | return; |
| | | } |
| | | const type = await VXETable.modal.confirm(t('processCard.deleteThisData')) |
| | | const type = await VXETable.modal.confirm('您确定要删除该数据?') |
| | | if (type === 'confirm') { |
| | | let schedulingData = ref({ |
| | | scheduling: selectRecords, |
| | |
| | | |
| | | request.post("/productionScheduling/deleteScheduling", schedulingData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('basicData.msg.deleteSuccess')) |
| | | ElMessage.success("删除成功") |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | if ($table) { |
| | | if (selectRecords.length == 0) { |
| | | ElMessage.warning(t('processCard.checkProductionScheduling')) |
| | | ElMessage.warning("请勾选排产数据") |
| | | return; |
| | | } |
| | | let schedulingData = ref({ |
| | |
| | | }) |
| | | request.post("/productionScheduling/examineScheduling", schedulingData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('basicData.msg.ReviewSuccess')) |
| | | ElMessage.success("审核成功") |
| | | location.reload(); |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | |
| | | } |
| | | } |
| | | }, |
| | | menuClick ({ menu, row, column }) { |
| | | menuClick({menu, row, column}) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (menu.code) { |
| | | case 'copyChecked' :{ |
| | | case 'copyChecked' : { |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "scheduled_start_time" ||result.cell === "plan_end_time"){ |
| | | if(result){ |
| | | if (result.cell === "scheduled_start_time" || result.cell === "plan_end_time") { |
| | | if (result) { |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | const val = dataList[result.start][result.cell] |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | dataList.forEach((item, index) => { |
| | | if (index >= result.start && index <= result.end) { |
| | | item[result.cell] = val |
| | | } |
| | | }) |
| | |
| | | |
| | | break |
| | | } |
| | | case 'copyAll' :{ |
| | | case 'copyAll' : { |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "scheduled_start_time" ||result.cell === "plan_end_time") { |
| | | if (result.cell === "scheduled_start_time" || result.cell === "plan_end_time") { |
| | | if (result) { |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | const val = dataList[result.start][result.cell] |
| | |
| | | } |
| | | break |
| | | } |
| | | case 'clearChecked' :{ |
| | | case 'clearChecked' : { |
| | | let result = toolbarButtonClickEvent() |
| | | if (result.cell === "scheduled_start_time" ||result.cell === "plan_end_time") { |
| | | if (result.cell === "scheduled_start_time" || result.cell === "plan_end_time") { |
| | | if (result) { |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | dataList.forEach((item, index) => { |
| | |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | let selectState = stateValue.value |
| | | table.forEach((selectRecords) => { |
| | | if (selectRecords.scheduling_quantity > selectRecords.pendingProductionQuantity && selectState==1) { |
| | | ElMessage.warning(t('processCard.schedulingQuantityNoQuantityScheduled')) |
| | | if (selectRecords.scheduling_quantity > selectRecords.pendingProductionQuantity && selectState == 1) { |
| | | ElMessage.warning("排产数量不能大于待排产数量") |
| | | //禁用保存按钮 |
| | | //gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } |
| | |
| | | <el-date-picker |
| | | v-model="form.date1" |
| | | :default-time="defaultTime" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | end-placeholder="结束时间" |
| | | format="YYYY/MM/DD" |
| | | start-placeholder="开始时间" |
| | | type="daterange" |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | |
| | | <el-input v-model="form.orderId" clearable :placeholder="$t('order.orderId')" style="width: 110px"></el-input> |
| | | <el-input v-model="form.orderId" :placeholder="$t('order.orderId')" clearable style="width: 110px"></el-input> |
| | | |
| | | <el-select v-model="value" clearable default-value="default_city" style="width: 120px"> |
| | | <el-option |
| | |
| | | /> |
| | | </el-select> |
| | | |
| | | <el-select v-model="stateValue" class="m-2" :placeholder="$t('processCard.whetherToScheduleProduction')" style="width: 120px"> |
| | | <el-select v-model="stateValue" class="m-2" placeholder="是否排产" style="width: 120px"> |
| | | <el-option |
| | | v-for="item in stateOptions" |
| | | :key="item.value" |
| | |
| | | <el-button |
| | | id="select" |
| | | :icon="Search" |
| | | type="primary" @click="getWorkOrder">{{$t('basicData.search')}} |
| | | type="primary" @click="getWorkOrder">{{ $t('basicData.search') }} |
| | | </el-button> |
| | | </el-row> |
| | | |
| | |
| | | <vxe-grid |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | height="100%" |
| | | height="500px" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <!-- 'PrevJump','NextJump', --> |
| | | <vxe-pager |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | :total="total.dataTotal" |
| | | @page-change="handlePageChange" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | <div class="vxe-table--cell-area" ref="cellArea" > |
| | | <span class="vxe-table--cell-main-area" ></span> |
| | | <div ref="cellArea" class="vxe-table--cell-area"> |
| | | <span class="vxe-table--cell-main-area"></span> |
| | | |
| | | <span class="vxe-table--cell-active-area" ></span> |
| | | <span class="vxe-table--cell-active-area"></span> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | height: 6%; |
| | | text-align: center; |
| | | } |
| | | |
| | | .vxe-grid { |
| | | /* 禁用浏览器默认选中 */ |
| | | -webkit-user-select: none; |
| | |
| | | import {useI18n} from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import footSum from "@/hook/footSum" |
| | | import TagStyle from "@/components/mm/TagStyle.vue" |
| | | //语言获取 |
| | | const {t} = useI18n() |
| | | |
| | | let router = useRouter() |
| | | |
| | | |
| | | //定义页面总页数 |
| | | let pageTotal = ref('') |
| | | |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | | let titleStyleVisible = ref(false) |
| | | |
| | | |
| | | const form = reactive({ |
| | | date1: '', |
| | |
| | | }) |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | buttons: [], |
| | | import: false, |
| | | // export: true, |
| | | // print: true, |
| | | buttons: [ |
| | | {'code': 'titleStyle', 'name': '标签样式',status: 'primary'} |
| | | ], |
| | | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | } |
| | | |
| | | }) |
| | | |
| | | const gridEvents = { |
| | | async toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'titleStyle': { |
| | | titleStyleVisible.value = true |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | |
| | | height="100%" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | |
| | | |
| | | |
| | | </vxe-grid> |
| | | <el-dialog |
| | | id="titleStyle" |
| | | :title="'标签样式'" |
| | | style="width: 70%;height:70% " |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | v-model="titleStyleVisible"> |
| | | <tag-style style="width: 100%;height: 100%"/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | #selectForm { |
| | | width: 60%; |
| | | } |
| | | |
| | | :deep(#titleStyle .el-dialog__body){ |
| | | height: 90%; |
| | | width: 100%; |
| | | } |
| | | |
| | | </style> |
| | |
| | | </div> |
| | | <div class="order-detail"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | <el-input v-model="productTotal.totalThickness" size="small" disabled /> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <el-col :span="8"> |
| | | <div class="grid-content ep-bg-purple" > |
| | | <el-text class="mx-1" |
| | | style="margin-left: 0.5rem;text-align: center"> |
| | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | const userStore = useUserInfoStore() |
| | | |
| | | console.log(userStore.user.id) |
| | | //注册用户参数 |
| | | const register = reactive({ |
| | | userId: userStore.user.id, |
| | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @Api(value="流程卡controller",tags={"流程卡操作接口"}) |
| | | @Api(value = "流程卡controller", tags = {"流程卡操作接口"}) |
| | | @RequestMapping("/processCard") |
| | | public class ProcessCardController { |
| | | @Autowired |
| | |
| | | //流程卡管理查询 |
| | | @ApiOperation("流程卡管理查询接口") |
| | | @SaCheckPermission("SelectProcessCard.search") |
| | | @PostMapping ("/flowCard/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}") |
| | | @PostMapping("/flowCard/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}") |
| | | public Result dateProcess( |
| | | @PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.selectProcessCard(pageNum,pageSize,selectTime1,selectTime2,flowCard)); |
| | | |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.selectProcessCard(pageNum, pageSize, selectTime1, selectTime2, flowCard)); |
| | | |
| | | } |
| | | |
| | | //分架查询 |
| | | @ApiOperation("分架查询接口") |
| | | @SaCheckPermission("SelectAddProcess.search") |
| | | @PostMapping ("/selectAddProcess/{selectTime1}/{selectTime2}") |
| | | @PostMapping("/selectAddProcess/{selectTime1}/{selectTime2}") |
| | | public Result selectAddProcess( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.selectAddProcess(selectTime1,selectTime2,flowCard)); |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.selectAddProcess(selectTime1, selectTime2, flowCard)); |
| | | } |
| | | |
| | | //分架明细查询 |
| | | @ApiOperation("分架明细查询接口") |
| | | @SaCheckPermission("SplittingDetails.search") |
| | | @PostMapping ("/detailsSelect/{orderId}") |
| | | @PostMapping("/detailsSelect/{orderId}") |
| | | public Result detailsSelect( |
| | | @PathVariable String orderId, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.detailsSelectSv(orderId,flowCard)); |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.detailsSelectSv(orderId, flowCard)); |
| | | |
| | | } |
| | | |
| | |
| | | public Result deleteOrderWork( |
| | | @PathVariable String orderId, |
| | | @PathVariable String processId |
| | | ){ |
| | | ) { |
| | | // if(flowCardService.deleteFlowCardSv(orderId,processId)){ |
| | | // return Result.seccess(); |
| | | // }else { |
| | | // throw new ServiceException(Constants.Code_500,"删除失败,请检查是否已报工"); |
| | | // |
| | | // } |
| | | return Result.seccess(flowCardService.deleteFlowCardSv(orderId,processId)); |
| | | return Result.seccess(flowCardService.deleteFlowCardSv(orderId, processId)); |
| | | } |
| | | |
| | | //修改排版状态 |
| | |
| | | public Result updateLayoutStatus( |
| | | @PathVariable String processId, |
| | | @PathVariable Integer state |
| | | ){ |
| | | if(flowCardService.updateLayoutStatusSv(processId,state)){ |
| | | ) { |
| | | if (flowCardService.updateLayoutStatusSv(processId, state)) { |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"修改失败"); |
| | | } else { |
| | | throw new ServiceException(Constants.Code_500, "修改失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | //分架新增明细查询 |
| | | @ApiOperation("分架明细新增接口") |
| | | @PostMapping ("/selectNoCard/{orderId}/{productionId}") |
| | | @PostMapping("/selectNoCard/{orderId}/{productionId}") |
| | | public Result SelectNoCard( |
| | | @PathVariable String orderId, |
| | | @PathVariable String productionId, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.selectNoCardSv(orderId,productionId,flowCard)); |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.selectNoCardSv(orderId, productionId, flowCard)); |
| | | |
| | | } |
| | | |
| | |
| | | @ApiOperation("流程卡创建接口") |
| | | @SaCheckPermission("AddProcessCard.add") |
| | | @PostMapping("/addFlowCard") |
| | | public Result AddOrderWork( @RequestBody Map<String,Object> object){ |
| | | if(flowCardService.addFlowCardSv(object)){ |
| | | public Result AddOrderWork(@RequestBody Map<String, Object> object) { |
| | | if (flowCardService.addFlowCardSv(object)) { |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | | } else { |
| | | throw new ServiceException(Constants.Code_500, "保存失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | //查询第一次排产数据 |
| | | @ApiOperation("排产界面加载查询接口") |
| | | @PostMapping ("/selectLastScheduling/{selectTime1}/{selectTime2}") |
| | | @PostMapping("/selectLastScheduling/{selectTime1}/{selectTime2}") |
| | | public Result selectLastScheduling( |
| | | @PathVariable String selectTime1, |
| | | @PathVariable String selectTime2, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.selectLastScheduling(selectTime1,selectTime2,flowCard)); |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.selectLastScheduling(selectTime1, selectTime2, flowCard)); |
| | | |
| | | } |
| | | |
| | | //查询排产数据 |
| | | @ApiOperation("排产点击按钮查询接口") |
| | | @PostMapping ("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") |
| | | @PostMapping("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") |
| | | public Result selectScheduling( |
| | | @PathVariable String selectTime1, |
| | | @PathVariable String selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String processes, |
| | | @PathVariable Integer state, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.selectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,flowCard)); |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.selectSchedulingSv(selectTime1, selectTime2, orderId, processes, state, flowCard)); |
| | | |
| | | } |
| | | |
| | | //流程卡明细查询 |
| | | @ApiOperation("流程卡明细查询接口") |
| | | @SaCheckPermission("SelectDetailProcessCard.search") |
| | | @PostMapping ("/flowCardDetail/{processId}") |
| | | @PostMapping("/flowCardDetail/{processId}") |
| | | public Result flowCardDetail( |
| | | @PathVariable String processId, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.flowCardDetailSv(processId,flowCard)); |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.flowCardDetailSv(processId, flowCard)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("流程卡打印查询接口") |
| | | @SaCheckPermission("SelectPrintFlowCard.search") |
| | | @PostMapping ("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}") |
| | | @PostMapping("/selectPrintFlowCard/{selectTime1}/{selectTime2}/{orderId}/{project}") |
| | | public Result selectPrintFlowCard( |
| | | @PathVariable Date selectTime1, |
| | | @PathVariable Date selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String project, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1,selectTime2,orderId,project,flowCard)); |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.selectPrintFlowCardSv(selectTime1, selectTime2, orderId, project, flowCard)); |
| | | } |
| | | |
| | | @ApiOperation("流程卡明细查询接口") |
| | | @SaCheckPermission("PrintFlowCard.search") |
| | | @PostMapping ("/selectPrint/{orderId}") |
| | | @PostMapping("/selectPrint/{orderId}") |
| | | public Result selectPrint( |
| | | @PathVariable String orderId, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(flowCardService.selectPrintSv(orderId,flowCard)); |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.selectPrintSv(orderId, flowCard)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("打印流程卡数据查询接口") |
| | | @PostMapping("/getSelectPrinting") |
| | | public Result getSelectPrinting( @RequestBody Map<String,Object> object){ |
| | | public Result getSelectPrinting(@RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.getSelectPrintingSv(object)); |
| | | } |
| | | |
| | | @ApiOperation("打印标签数据查询接口") |
| | | @PostMapping("/getSelectPrintLabel") |
| | | public Result getSelectPrintLabel( @RequestBody Map<String,Object> object){ |
| | | public Result getSelectPrintLabel(@RequestBody Map<String, Object> object) { |
| | | return Result.seccess(flowCardService.getSelectPrintLabelSv(object)); |
| | | } |
| | | |
| | |
| | | @SaCheckPermission("SelectProcessCard.review") |
| | | @PostMapping("/updateComposing") |
| | | public Result updateComposing( |
| | | @RequestBody Map<String,Object> object |
| | | ){ |
| | | @RequestBody Map<String, Object> object |
| | | ) { |
| | | |
| | | return Result.seccess(flowCardService.updateComposingSv(object)); |
| | | return Result.seccess(flowCardService.updateComposingSv(object)); |
| | | } |
| | | |
| | | @ApiOperation("流程卡打印明细数据查询接口") |
| | | @PostMapping("/printFlowCardDetails/{processId}/{technologyNumber}") |
| | | public Result printFlowCardDetails(@PathVariable String processId, |
| | | @PathVariable String technologyNumber, |
| | | @RequestBody FlowCard flowCard) { |
| | | return Result.seccess(flowCardService.printFlowCardDetailsSv(processId, technologyNumber, flowCard)); |
| | | } |
| | | |
| | | @ApiOperation("保存打印排序接口") |
| | | @PostMapping("/printSort") |
| | | public Result printSort(@RequestBody Map<String, Object> object) { |
| | | if (flowCardService.printSortSv(object)) { |
| | | return Result.seccess(); |
| | | } else { |
| | | throw new ServiceException(Constants.Code_500, "保存失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("打印标签设置查询") |
| | |
| | | //点击查询排版数据 |
| | | @ApiOperation("点击查询排版数据接口") |
| | | @SaCheckPermission("ProductionScheduling.search") |
| | | @PostMapping ("/selectScheduling/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") |
| | | @PostMapping ("/selectScheduling/{pageNum}/{pageSize}/{selectTime1}/{selectTime2}/{orderId}/{processes}/{state}") |
| | | public Result selectScheduling( |
| | | @PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable String selectTime1, |
| | | @PathVariable String selectTime2, |
| | | @PathVariable String orderId, |
| | | @PathVariable String processes, |
| | | @PathVariable Integer state, |
| | | @RequestBody ProductionScheduling productionScheduling){ |
| | | return Result.seccess(productionSchedulingService.selectSchedulingSv(selectTime1,selectTime2,orderId,processes,state,productionScheduling)); |
| | | |
| | | return Result.seccess(productionSchedulingService.selectSchedulingSv(pageNum, pageSize,selectTime1,selectTime2,orderId,processes,state,productionScheduling)); |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.example.erp.controller.pp; |
| | | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.pp.TagStyle; |
| | | import com.example.erp.service.pp.TagStyleService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("tagStyle") |
| | | public class TagStyleController { |
| | | private final TagStyleService tagStyleService; |
| | | |
| | | public TagStyleController(TagStyleService tagStyleService) { |
| | | this.tagStyleService = tagStyleService; |
| | | } |
| | | |
| | | @PostMapping("saveTag") |
| | | public Result saveTag(@RequestBody TagStyle tagStyle){ |
| | | return Result.seccess(tagStyleService.saveTag(tagStyle)); |
| | | } |
| | | |
| | | @GetMapping("getTagList") |
| | | public Result getTagList(){ |
| | | return Result.seccess(tagStyleService.getTagList()); |
| | | } |
| | | @GetMapping("getTagById/{id}") |
| | | public Result getTagById(@PathVariable("id") Integer id){ |
| | | return Result.seccess(tagStyleService.getTagById(id)); |
| | | } |
| | | |
| | | @PostMapping("deleteTag/{id}") |
| | | public Result deleteTag(@PathVariable("id") Integer id){ |
| | | return Result.seccess(tagStyleService.deleteTag(id)); |
| | | } |
| | | |
| | | |
| | | @PostMapping("updateTag") |
| | | public Result updateTag(TagStyle tagStyle){ |
| | | return Result.seccess(tagStyleService.updateTag(tagStyle)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | private String founder; |
| | | //分架时间 |
| | | private LocalDate splitFrameTime; |
| | | //排序 |
| | | private Integer sort; |
| | | //建立时间 |
| | | private LocalDate createTime; |
| | | //修改时间 |
| | |
| | | |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | |
| | | //创建时间 |
| | | private LocalDate createTime; |
| | | |
| | | private Integer pendingProductionQuantity; |
| | | |
| | | private Double pendingProductionArea; |
| | | |
| | | private Integer productionScheduledQuantity; |
| | | |
| | | private Double productionScheduledArea; |
| | | |
| | | |
| | | //外键订单表 |
| | | private Order order; |
| | | //外键订单明细表 |
| | | private OrderDetail orderDetail; |
| | | //外键订单明细表 |
| | | private OrderGlassDetail orderGlassDetail; |
| | | } |
New file |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDateTime; |
| | | |
| | | @Data |
| | | public class TagStyle { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | private Integer type; |
| | | private String name; |
| | | private Double tagWidth; |
| | | private Double tagHeight; |
| | | private String value; |
| | | private String size; |
| | | private LocalDateTime createTime; |
| | | |
| | | } |
| | |
| | | private Double computeGrossArea; |
| | | private String processingNote; |
| | | private String remarks; |
| | | private Integer bendRadius; |
| | | private Double bendRadius; |
| | | private String edgingType; |
| | | private Double weight; |
| | | private Double perimeter; |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.PrintSetup; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.sql.Date; |
| | |
| | | |
| | | List<Map<String, String>> getPrintLabel(String processId, Integer technologyNumber); |
| | | |
| | | List<Map<String, String>> printFlowCardDetailsMp(String processId, String technologyNumber, FlowCard flowCard); |
| | | |
| | | Boolean printSortMp(String processId, Integer orderNumber, Integer technologyNumber, Integer sort); |
| | | |
| | | List<Map<String, String>> selectPrintSetup(PrintSetup printSetup); |
| | | |
| | | Boolean updatePrintSetup(String alias,Integer printState); |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.pp.BasicDataProduce; |
| | | import com.example.erp.entity.pp.ProductionScheduling; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.sql.Date; |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | |
| | | public interface ProductionSchedulingMapper extends BaseMapper<ProductionScheduling> { |
| | | |
| | | |
| | | List<Map<String,String>> selectOkSchedulingMp(String selectTime1, String selectTime2,String orderId,String processes, ProductionScheduling productionScheduling); |
| | | List<Map<String,String>> selectOkSchedulingMp(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling); |
| | | |
| | | List<Map<String,String>> selectNoSchedulingMp(String selectTime1, String selectTime2,String orderId,String processes, ProductionScheduling productionScheduling); |
| | | List<ProductionScheduling> selectNoSchedulingMp(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling); |
| | | |
| | | List<Map<String,String>> selectLastSchedulingMp(String selectTime1, String selectTime2,String processes,String orderId, ProductionScheduling productionScheduling); |
| | | |
| | |
| | | |
| | | List<Map<String,String>> selectProcess(); |
| | | |
| | | Map<String, Integer> getPageTotal(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling); |
| | | |
| | | // Integer selectNumberMp(String orderId, String orderNumber, String processes); |
| | | } |
New file |
| | |
| | | package com.example.erp.mapper.pp; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.pp.TagStyle; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | @Mapper |
| | | public interface TagStyleMapper extends BaseMapper<TagStyle> { |
| | | } |
| | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.PrintSetup; |
| | | import com.example.erp.entity.pp.ProductionScheduling; |
| | | import com.example.erp.entity.sd.OrderGlassDetail; |
| | | import com.example.erp.entity.sd.OrderProcessDetail; |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> printFlowCardDetailsSv(String processId, String technologyNumber, FlowCard flowCard) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.printFlowCardDetailsMp(processId, technologyNumber, flowCard)); |
| | | return map; |
| | | } |
| | | |
| | | public Boolean printSortSv(Map<String, Object> object) { |
| | | List<FlowCard> FlowCardList = JSONArray.parseArray(JSONObject.toJSONString(object.get("flowCard")), FlowCard.class); |
| | | if (!FlowCardList.isEmpty()) { |
| | | for (FlowCard flowCard : FlowCardList) { |
| | | flowCardMapper.printSortMp(flowCard.getProcessId(),flowCard.getOrderNumber(),flowCard.getTechnologyNumber(),flowCard.getSort()); |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | public Map<String, Object> printSetup(PrintSetup printSetup) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", flowCardMapper.selectPrintSetup(printSetup)); |
| | | return map; |
| | | } |
| | | |
| | | public Boolean updatePrintSetup(Map<String, Object> object) { |
| | | System.out.println(object); |
| | | boolean saveState = true; |
| | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.example.erp.entity.pp.ProductionScheduling; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.mapper.pp.ProductionSchedulingMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | ProductionSchedulingMapper productionSchedulingMapper; |
| | | |
| | | //未排产查询 |
| | | public Map<String, Object> selectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, ProductionScheduling productionScheduling ) { |
| | | public Map<String, Object> selectSchedulingSv(Integer pageNum, Integer pageSize, String selectTime1, String selectTime2, String orderId, String processes, Integer state, ProductionScheduling productionScheduling ) { |
| | | |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if("null".equals(orderId)){ |
| | | orderId=""; |
| | |
| | | } |
| | | |
| | | if (state==2){//已排产 |
| | | map.put("data", productionSchedulingMapper.selectOkSchedulingMp(selectTime1, selectTime2,orderId,processes, productionScheduling)); |
| | | map.put("data", productionSchedulingMapper.selectOkSchedulingMp(offset, pageSize,selectTime1, selectTime2,orderId,processes, productionScheduling)); |
| | | |
| | | }else if (state==1){//未排产 |
| | | map.put("data", productionSchedulingMapper.selectNoSchedulingMp(selectTime1, selectTime2,orderId,processes, productionScheduling)); |
| | | |
| | | map.put("data", productionSchedulingMapper.selectNoSchedulingMp(offset, pageSize,selectTime1, selectTime2,orderId,processes, productionScheduling)); |
| | | } |
| | | |
| | | map.put("total", productionSchedulingMapper.getPageTotal(offset, pageSize,selectTime1, selectTime2,orderId,processes, productionScheduling)); |
| | | return map; |
| | | } |
| | | |
New file |
| | |
| | | package com.example.erp.service.pp; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.pp.TagStyle; |
| | | import com.example.erp.mapper.pp.TagStyleMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | @DS("pp") |
| | | public class TagStyleService { |
| | | private final TagStyleMapper tagStyleMapper; |
| | | |
| | | public TagStyleService(TagStyleMapper tagStyleMapper) { |
| | | this.tagStyleMapper = tagStyleMapper; |
| | | } |
| | | |
| | | public Boolean saveTag(TagStyle tagStyle) { |
| | | if(tagStyle.getId()==null){ |
| | | return tagStyleMapper.insert(tagStyle)>0; |
| | | }else { |
| | | return tagStyleMapper.updateById(tagStyle)>0; |
| | | } |
| | | |
| | | } |
| | | |
| | | public List<TagStyle> getTagList() { |
| | | return tagStyleMapper.selectList(null); |
| | | } |
| | | |
| | | public boolean deleteTag(Integer id) { |
| | | return tagStyleMapper.deleteById(id)>0; |
| | | } |
| | | |
| | | public Boolean updateTag(TagStyle tagStyle) { |
| | | return tagStyleMapper.updateById(tagStyle)>0; |
| | | } |
| | | |
| | | public TagStyle getTagById(Integer id) { |
| | | return tagStyleMapper.selectById(id); |
| | | } |
| | | } |
| | |
| | | where fc.process_id = #{processId} |
| | | and fc.technology_number = #{technologyNumber} |
| | | group by fc.process_id, fc.order_number |
| | | order by fc.order_number |
| | | order by IF(sort!=NULL||sort!='',sort,fc.order_number) |
| | | </select> |
| | | |
| | | <select id="getProcessList"> |
| | |
| | | order by d.technology_number |
| | | </select> |
| | | |
| | | <select id="selectPrintSetup"> |
| | | <select id="printFlowCardDetailsMp"> |
| | | SELECT fc.process_id, |
| | | fc.order_number, |
| | | fc.technology_number, |
| | | ogd.glass_address, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | fc.quantity, |
| | | ROUND(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area |
| | | FROM flow_card AS fc |
| | | LEFT JOIN sd.order_glass_detail AS ogd ON fc.order_id = ogd.order_id |
| | | AND fc.order_number = ogd.order_number |
| | | AND fc.technology_number = ogd.technology_number |
| | | where fc.process_id = #{processId} |
| | | and fc.technology_number = #{technologyNumber} |
| | | </select> |
| | | |
| | | <update id="printSortMp"> |
| | | update flow_card |
| | | set sort = #{sort} |
| | | where process_id = #{processId} |
| | | and order_number=#{orderNumber} |
| | | and technology_number = #{technologyNumber} |
| | | </update> |
| | | |
| | | <select id="selectPrintSetup"> |
| | | select id, |
| | | print_type as printType, |
| | | print_type_name as printTypeName, |
| | |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.pp.ProductionSchedulingMapper"> |
| | | <resultMap id="ProductionSchedulingMap" type="com.example.erp.entity.pp.ProductionScheduling"> |
| | | <resultMap id="productionSchedulingMap" type="com.example.erp.entity.pp.ProductionScheduling"> |
| | | <result column="processes" property="processes"/> |
| | | <result column="scheduling_quantity" property="schedulingQuantity"/> |
| | | <result column="order_number" property="orderNumber"/> |
| | | <result column="scheduling_id" property="schedulingId"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="order_id" property="orderGlassDetail.orderId"/> |
| | | <result column="technology_number" property="technologyNumber"/> |
| | | <result column="pendingProductionQuantity" property="pendingProductionQuantity"/> |
| | | <result column="pendingProductionArea" property="pendingProductionArea"/> |
| | | <result column="productionScheduledQuantity" property="productionScheduledQuantity"/> |
| | | <result column="productionScheduledArea" property="productionScheduledArea"/> |
| | | <result column="review_status" property="reviewStatus"/> |
| | | <!--接收其他外键实体类数据--> |
| | | <association property="order" javaType="com.example.erp.entity.sd.Order"> |
| | | <result column="project" property="project"/> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="customer_name" property="customerName"/> |
| | | <result column="batch" property="batch"/> |
| | | <result column="other_remarks" property="otherRemarks"/> |
| | | <result column="icon" property="icon"/> |
| | | <result column="order_type" property="orderType"/> |
| | | <result column="salesman" property="salesman"/> |
| | | <result column="processing_note" property="processingNote"/> |
| | | <result column="delivery_address" property="deliveryAddress"/> |
| | | </association> |
| | | <association property="orderDetail" javaType="com.example.erp.entity.sd.OrderDetail"> |
| | | <result column="order_id" property="orderId"/> |
| | | <result column="product_id" property="productId"/> |
| | | <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> |
| | | |
| | | |
| | | <result column="project" property="order.project"/> |
| | | <result column="customer_name" property="order.customerName"/> |
| | | <result column="batch" property="order.batch"/> |
| | | <result column="other_remarks" property="order.otherRemarks"/> |
| | | <result column="icon" property="order.icon"/> |
| | | <result column="order_type" property="order.orderType"/> |
| | | <result column="salesman" property="order.salesman"/> |
| | | <result column="processing_note" property="order.processingNote"/> |
| | | <result column="delivery_address" property="order.deliveryAddress"/> |
| | | <result column="product_id" property="orderDetail.productId"/> |
| | | <result column="product_name" property="orderDetail.productName"/> |
| | | <result column="compute_gross_area" property="orderDetail.computeGrossArea"/> |
| | | <result column="quantity" property="orderDetail.quantity"/> |
| | | <result column="perimeter" property="orderDetail.perimeter"/> |
| | | <result column="width" property="orderDetail.width"/> |
| | | <result column="height" property="orderDetail.height"/> |
| | | <result column="shape" property="orderDetail.shape"/> |
| | | <result column="weight" property="orderDetail.weight"/> |
| | | <result column="child_width" property="orderGlassDetail.childWidth"/> |
| | | <result column="child_height" property="orderGlassDetail.childHeight"/> |
| | | <result column="area" property="orderGlassDetail.area"/> |
| | | <result column="glass_child" property="orderGlassDetail.glassChild"/> |
| | | </resultMap> |
| | | |
| | | |
| | |
| | | order by ps.id desc |
| | | </select> |
| | | <!-- 查询未排产数据--> |
| | | <select id="selectNoSchedulingMp"> |
| | | <select id="selectNoSchedulingMp" resultMap="productionSchedulingMap"> |
| | | select ogd.order_id, |
| | | o.customer_name, |
| | | o.project, |
| | | ogd.order_number, |
| | | ogd.technology_number, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.quantity, |
| | | round(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2) as area, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as scheduling_quantity, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as pendingProductionQuantity, |
| | | round(ogd.child_width * ogd.child_height * (od.quantity - IFNULL((ps.schedulingQuantity), 0)) / 1000000, 2) |
| | | as pendingProductionArea, |
| | | IFNULL(ps.schedulingQuantity, 0) as productionScheduledQuantity, |
| | | round(ogd.child_width * ogd.child_height * (IFNULL(ps.schedulingQuantity, 0)) / 1000000, |
| | | 2) as productionScheduledArea, |
| | | ogd.glass_child, |
| | | od.shape |
| | | o.customer_name, |
| | | o.project, |
| | | ogd.order_number, |
| | | ogd.technology_number, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | od.quantity, |
| | | round(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2) as area, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as schedulingQuantity, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as pendingProductionQuantity, |
| | | round(ogd.child_width * ogd.child_height * (od.quantity - IFNULL((ps.schedulingQuantity), 0)) / 1000000, |
| | | 2) |
| | | as pendingProductionArea, |
| | | IFNULL(ps.schedulingQuantity, 0) as productionScheduledQuantity, |
| | | round(ogd.child_width * ogd.child_height * (IFNULL(ps.schedulingQuantity, 0)) / 1000000, |
| | | 2) as productionScheduledArea, |
| | | ogd.glass_child, |
| | | od.shape |
| | | from sd.order_glass_detail as ogd |
| | | |
| | | left join sd.order as o on ogd.order_id = o.order_id |
| | | left join sd.order_detail as od on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | left join sd.order_process_detail as opd on opd.order_id=ogd.order_id and opd.order_number=ogd.order_number and opd.technology_number=ogd.technology_number |
| | | left join |
| | | (select order_id,order_number,technology_number,SUM(scheduling_quantity) as schedulingQuantity from production_scheduling where processes=#{processes} group by order_id,order_number,technology_number) as ps on ps.order_id = ogd.order_id and ps.order_number = ogd.order_number and ps.technology_number=ogd.technology_number |
| | | left join sd.order as o on ogd.order_id = o.order_id |
| | | left join sd.order_detail as od on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | left join sd.order_process_detail as opd |
| | | on opd.order_id = ogd.order_id and opd.order_number = ogd.order_number and |
| | | opd.technology_number = ogd.technology_number |
| | | left join |
| | | (select order_id, order_number, technology_number, SUM(scheduling_quantity) as schedulingQuantity |
| | | from production_scheduling |
| | | where processes = #{processes} |
| | | group by order_id, order_number, technology_number) as ps |
| | | on ps.order_id = ogd.order_id and ps.order_number = ogd.order_number and |
| | | ps.technology_number = ogd.technology_number |
| | | |
| | | where (od.quantity - IFNULL((ps.schedulingQuantity), 0)) > 0 |
| | | and od.create_time between #{selectTime1} and #{selectTime2} and opd.reporting_work_num_count=0 |
| | | and od.create_time between #{selectTime1} and #{selectTime2} |
| | | and opd.reporting_work_num_count = 0 |
| | | |
| | | and position(#{orderId} in ogd.order_id) |
| | | -- and position("切割" in ps.processes) |
| | | |
| | | group by ogd.order_id, ogd.order_number,ogd.technology_number |
| | | and position(#{orderId} in ogd.order_id) |
| | | -- and position("切割" in ps.processes) |
| | | <if test="productionScheduling.orderId != null and productionScheduling.orderId != ''"> |
| | | and ogd.order_id regexp #{productionScheduling.orderId} |
| | | </if> |
| | | <if test="productionScheduling.order.customerName != null and productionScheduling.order.customerName != ''"> |
| | | and o.customer_name regexp #{productionScheduling.order.customerName} |
| | | </if> |
| | | <if test="productionScheduling.order.project != null and productionScheduling.order.project != ''"> |
| | | and o.project regexp #{productionScheduling.order.project} |
| | | </if> |
| | | <if test="productionScheduling.orderNumber != null and productionScheduling.orderNumber != ''"> |
| | | and ogd.order_number regexp #{productionScheduling.orderNumber} |
| | | </if> |
| | | <if test="productionScheduling.technologyNumber != null and productionScheduling.technologyNumber != ''"> |
| | | and ogd.technology_number regexp #{productionScheduling.technologyNumber} |
| | | </if> |
| | | group by ogd.order_id, ogd.order_number, ogd.technology_number |
| | | order by ogd.order_id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | <!-- 首次查询排产数据--> |
| | | <select id="selectLastSchedulingMp"> |
| | |
| | | ogd.child_height, |
| | | od.quantity, |
| | | round(ogd.child_width * ogd.child_height * od.quantity / 1000000, 2) as area, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as scheduling_quantity, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as pendingProductionQuantity, |
| | | round(ogd.child_width * ogd.child_height * (od.quantity - IFNULL((ps.schedulingQuantity), 0)) / 1000000, 2) |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as scheduling_quantity, |
| | | (od.quantity - IFNULL((ps.schedulingQuantity), 0)) as pendingProductionQuantity, |
| | | round(ogd.child_width * ogd.child_height * (od.quantity - IFNULL((ps.schedulingQuantity), 0)) / 1000000, |
| | | 2) |
| | | as pendingProductionArea, |
| | | IFNULL(ps.schedulingQuantity, 0) as productionScheduledQuantity, |
| | | IFNULL(ps.schedulingQuantity, 0) as productionScheduledQuantity, |
| | | round(ogd.child_width * ogd.child_height * (IFNULL(ps.schedulingQuantity, 0)) / 1000000, |
| | | 2) as productionScheduledArea, |
| | | 2) as productionScheduledArea, |
| | | ogd.glass_child, |
| | | od.shape |
| | | from sd.order_glass_detail as ogd |
| | | |
| | | left join sd.order as o on ogd.order_id = o.order_id |
| | | left join sd.order_detail as od on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | left join sd.order_process_detail as opd on opd.order_id=ogd.order_id and opd.order_number=ogd.order_number and opd.technology_number=ogd.technology_number |
| | | left join sd.order_detail as od on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | left join sd.order_process_detail as opd |
| | | on opd.order_id = ogd.order_id and opd.order_number = ogd.order_number and |
| | | opd.technology_number = ogd.technology_number |
| | | left join |
| | | (select order_id,order_number,technology_number,SUM(scheduling_quantity) as schedulingQuantity from production_scheduling where processes=#{processes} group by order_id,order_number,technology_number) as ps on ps.order_id = ogd.order_id and ps.order_number = ogd.order_number and ps.technology_number=ogd.technology_number |
| | | (select order_id, order_number, technology_number, SUM(scheduling_quantity) as schedulingQuantity |
| | | from production_scheduling |
| | | where processes = #{processes} |
| | | group by order_id, order_number, technology_number) as ps |
| | | on ps.order_id = ogd.order_id and ps.order_number = ogd.order_number and |
| | | ps.technology_number = ogd.technology_number |
| | | |
| | | where (od.quantity - IFNULL((ps.schedulingQuantity), 0)) > 0 |
| | | and od.create_time between #{selectTime1} and #{selectTime2} and opd.reporting_work_num_count=0 |
| | | and od.create_time between #{selectTime1} and #{selectTime2} |
| | | and opd.reporting_work_num_count = 0 |
| | | |
| | | and position(#{orderId} in ogd.order_id) |
| | | -- and position("切割" in ps.processes) |
| | | |
| | | group by ogd.order_id, ogd.order_number,ogd.technology_number |
| | | group by ogd.order_id, ogd.order_number, ogd.technology_number |
| | | order by ogd.order_id desc |
| | | </select> |
| | | |
| | |
| | | and bd.basic_type = 'product' |
| | | </select> |
| | | |
| | | <select id="selectNumberMp"> |
| | | <select id="getPageTotal"> |
| | | select CEILING(count(ogd.id)/#{pageSize}) as 'pageTotal', |
| | | count(distinct ogd.id) as 'total' |
| | | from sd.order_glass_detail as ogd |
| | | |
| | | left join sd.order as o on ogd.order_id = o.order_id |
| | | left join sd.order_detail as od on od.order_id = ogd.order_id and od.order_number = ogd.order_number |
| | | left join sd.order_process_detail as opd |
| | | on opd.order_id = ogd.order_id and opd.order_number = ogd.order_number and |
| | | opd.technology_number = ogd.technology_number |
| | | left join |
| | | (select order_id, order_number, technology_number, SUM(scheduling_quantity) as schedulingQuantity |
| | | from production_scheduling |
| | | where processes = #{processes} |
| | | group by order_id, order_number, technology_number) as ps |
| | | on ps.order_id = ogd.order_id and ps.order_number = ogd.order_number and |
| | | ps.technology_number = ogd.technology_number |
| | | |
| | | where (od.quantity - IFNULL((ps.schedulingQuantity), 0)) > 0 |
| | | and od.create_time between #{selectTime1} and #{selectTime2} |
| | | and opd.reporting_work_num_count = 0 |
| | | |
| | | and position(#{orderId} in ogd.order_id) |
| | | -- and position("切割" in ps.processes) |
| | | <if test="productionScheduling.orderId != null and productionScheduling.orderId != ''"> |
| | | and ogd.order_id regexp #{productionScheduling.orderId} |
| | | </if> |
| | | <if test="productionScheduling.order.customerName != null and productionScheduling.order.customerName != ''"> |
| | | and o.customer_name regexp #{productionScheduling.order.customerName} |
| | | </if> |
| | | <if test="productionScheduling.order.project != null and productionScheduling.order.project != ''"> |
| | | and o.project regexp #{productionScheduling.order.project} |
| | | </if> |
| | | <if test="productionScheduling.orderNumber != null and productionScheduling.orderNumber != ''"> |
| | | and ogd.order_number regexp #{productionScheduling.orderNumber} |
| | | </if> |
| | | <if test="productionScheduling.technologyNumber != null and productionScheduling.technologyNumber != ''"> |
| | | and ogd.technology_number regexp #{productionScheduling.technologyNumber} |
| | | </if> |
| | | order by ogd.order_id desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | </mapper> |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.pp.TagStyleMapper"> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | if(pd.glass_sort=1,'(外)',if(pd2.glass_sort=pd.glass_sort,'(内)','')), |
| | | pd.detail, |
| | | if( od.bend_radius!='', |
| | | round(od.width*(od.bend_radius-round(sum(t.thicknessCount),2))/od.bend_radius,0), |
| | | round(od.width*(od.bend_radius-round(sum(t.thicknessCount),2))/od.bend_radius,1), |
| | | od.width |
| | | ), |
| | | od.height, |