Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | let key = item._X_ROW_KEY |
| | | delete item._X_ROW_KEY |
| | | if (item.baiscQuantity === 0) { |
| | | $grid.remove(checkedList) |
| | | $grid.remove(item) |
| | | } |
| | | $gridLeft.insertAt(item) |
| | | //重新赋值key |
| | | item._X_ROW_KEY = key |
| | | }) |
| | | |
| | | |
| | | |
| | | //清除两边复选框 |
| | | $gridLeft.clearCheckboxRow() |
| | |
| | | let key = item._X_ROW_KEY |
| | | delete item._X_ROW_KEY |
| | | if (item.baiscQuantity === 0) { |
| | | $grid.remove(checkedList) |
| | | $grid.remove(item) |
| | | } |
| | | item._X_ROW_KEY = key |
| | | } else { |
| | |
| | | } else if (checkedNum.value === '') {//判断数量输入框无输入数字 |
| | | |
| | | checkedList.forEach((item) => { |
| | | //右侧表格 |
| | | let rightData = $grid.getTableData().fullData |
| | | let filterIndex = rightData.findIndex(item1 => item1.orderNumber === item.orderNumber) |
| | | //左侧表格 |
| | | let leftData = $gridLeft.getTableData().fullData |
| | | let leftfilterIndex = leftData.findIndex(item1 => item1.orderNumber === item.orderNumber) |
| | | //无输入并且如果右边表格数据中存在当前数据则数量相加 |
| | | if (filterIndex > -1) { |
| | | rightData[filterIndex].baiscQuantity = rightData[filterIndex].baiscQuantity * 1 + item.quantity * 1 |
| | |
| | | rightData[filterIndex].computeGrossArea=(rightData[filterIndex].width*rightData[filterIndex].height*rightData[filterIndex].baiscQuantity/1000000).toFixed(2) |
| | | |
| | | } else { |
| | | delete item._X_ROW_KEY |
| | | console.log(item) |
| | | //$grid.insert(item) |
| | | |
| | | |
| | | item.baiscQuantity = item.baiscQuantity * 1 + leftData[leftfilterIndex].quantity * 1 |
| | | item.computeGrossArea=(item.width*item.height*item.baiscQuantity/1000000).toFixed(2) |
| | | //item.computeGrossArea=(item.width*item.height*item.baiscQuantity/1000000).toFixed(2) |
| | | // for (let i = 0; i <checkedList.length ; i++) { |
| | | // |
| | | // if (checkedList[i].orderNumber === item.orderNumber){ |
| | | // console.log(item.baiscQuantity +"---"+ checkedList[i].quantity ) |
| | | // item.baiscQuantity = item.baiscQuantity * 1 + checkedList[i].quantity * 1 |
| | | // } |
| | | // } |
| | | |
| | | delete item._X_ROW_KEY |
| | | $grid.insert(item) |
| | | |
| | | |
| | | } |
| | | |
| | | $gridLeft.remove(item) |
| | |
| | | leftData[filterIndex].computeGrossArea=(leftData[filterIndex].computeGrossArea-leftData[filterIndex].width*leftData[filterIndex].height*leftData[filterIndex].baiscQuantity/1000000).toFixed(2) |
| | | |
| | | if (item.baiscQuantity === 0) { |
| | | $grid.remove(checkedList) |
| | | $grid.remove(item) |
| | | } |
| | | //delete item._X_ROW_KEY |
| | | } else { |
| | |
| | | item.landingSequence = checkedListLeft[0].landingSequence |
| | | // /item.computeGrossArea=item.computeGrossArea |
| | | if (item.baiscQuantity === 0) { |
| | | $grid.remove(checkedList) |
| | | $grid.remove(item) |
| | | |
| | | } |
| | | for (let i = 0; i < leftData.length; i++) { |
| | |
| | | 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" |
| | |
| | | let router = useRouter() |
| | | const dialogTableVisible = ref(false) |
| | | const dialogTableVisibleLabel = 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 pageTotal = ref('') |
| | | //定义数据返回结果 |
| | | let produceList = ref([]) |
| | | //定义数据返回结果 |
| | | let produceDetailList = ref([]) |
| | | //定义当前页数 |
| | | let pageNum = $ref(1) |
| | | let pageState = null |
| | |
| | | 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}, |
| | | { |
| | |
| | | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {code: 'print', name: '打印流程卡', status: 'primary'}, |
| | | {code: 'printLabel', name: '打印标签', 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 '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 |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | } |
| | | |
| | | |
| | | 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 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> |
| | |
| | | title="流程卡打印" |
| | | style="width: 80%;height:75% "> |
| | | <PrintProcess :printList="selectRecords" |
| | | style="width: 100%;height: 100%" /> |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | |
| | | <el-dialog |
| | |
| | | title="标签打印" |
| | | style="width: 80%;height:75% "> |
| | | <PrintLabel :printList="selectRecords" |
| | | style="width: 100%;height: 100%" /> |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | |
| | | <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"> |
| | | |
| | | <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> |
| | |
| | | const data = ref({ |
| | | printList: [] |
| | | }) |
| | | const setupData = ref({ |
| | | }) |
| | | let printSetupData = { |
| | | printState:'' |
| | | } |
| | | |
| | | const {currentRoute} = useRouter() |
| | | const route = currentRoute.value |
| | |
| | | } |
| | | |
| | | ) |
| | | |
| | | request.post(`/processCard/printSetup`, setupData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | printSetupData = deepClone(res.data.data) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | |
| | | <el-button id="printButton" @click="printFlowCard();">打印</el-button> |
| | | <div id="printFlowCard" > |
| | | <div id="entirety" v-for="(item,id) in labelList" > |
| | | <div class="row1">{{ item.customer_name }}</div> |
| | | <div class="row2">{{ item.order_id }} {{ item.type_name }}</div> |
| | | <div class="row3">{{item.child_width}}*{{item.child_height}}={{item.quantity}}</div> |
| | | <div class="row5">{{item.project}} {{ item.remarks }}</div> |
| | | <div class="row6">{{item.glass_child}} {{item.processing_note}}</div> |
| | | <div v-show="printSetupData[0].printState" class="row1">{{ item.customer_name }}</div> |
| | | <div v-show="printSetupData[6].printState || printSetupData[7].printState" class="row2"> |
| | | <span v-show="printSetupData[6].printState">{{ item.order_id }}</span> |
| | | <span v-show="printSetupData[7].printState">{{ item.type_name }}</span> |
| | | </div> |
| | | <div v-show="printSetupData[2].printState" class="row3">{{item.child_width}}*{{item.child_height}}={{item.quantity}}</div> |
| | | <div v-show="printSetupData[1].printState || printSetupData[3].printState" class="row5"> |
| | | <span v-show="printSetupData[1].printState">{{item.project}}</span> |
| | | <span v-show="printSetupData[3].printState">{{ item.remarks }}</span> |
| | | </div> |
| | | <div v-show="printSetupData[5].printState || printSetupData[4].printState" class="row6"> |
| | | <span v-show="printSetupData[5].printState">{{item.glass_child}}</span> |
| | | <span v-show="printSetupData[4].printState">{{item.processing_note}}</span></div> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | font-weight: bold; |
| | | height: 16px; |
| | | } |
| | | span { |
| | | font-size: 8pt; |
| | | font-weight: bold; |
| | | } |
| | | |
| | | .row3 { |
| | | margin-top: -5px; |
| | |
| | | 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 '' |
| | | }) |
| | | ] |
| | | } |
| | | |
| | | }) |
| | | |
| | |
| | | gridOptions.toolbarConfig.buttons[2].disabled = false |
| | | router.push({ |
| | | path: '/main/processCard/ProductionScheduling', |
| | | query: { random: Math.random()} |
| | | query: {random: Math.random()} |
| | | }) |
| | | } else { |
| | | // 启用保存 |
| | |
| | | } |
| | | } |
| | | }, |
| | | 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) { |
| | | if (selectRecords.scheduling_quantity > selectRecords.pendingProductionQuantity && selectState == 1) { |
| | | ElMessage.warning("排产数量不能大于待排产数量") |
| | | //禁用保存按钮 |
| | | //gridOptions.toolbarConfig.buttons[2].disabled = true |
| | |
| | | |
| | | /> |
| | | |
| | | <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-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; |
| | |
| | | const checkPassword = (rule: any, value: any, callback: any) => { |
| | | if (value.trim() === '') { |
| | | callback(new Error('新密码不能为空')) |
| | | }else if(value.length>16 || value.length<5){ |
| | | callback(new Error('密码长度不能低于5或超过16')) |
| | | }else if(value.length>16 || value.length<6){ |
| | | callback(new Error('密码长度不能低于6或超过16')) |
| | | }else{ |
| | | callback() |
| | | } |
| | |
| | | callback(new Error('确认密码不能为空')) |
| | | }else if(value !== register.password){ |
| | | callback(new Error('两次密码不相同')) |
| | | }else if(value.length>16 || value.length<5){ |
| | | callback(new Error('密码长度不能低于5或超过16')) |
| | | }else if(value.length>16 || value.length<6){ |
| | | callback(new Error('密码长度不能低于6或超过16')) |
| | | }else{ |
| | | callback() |
| | | } |
| | |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | #main-div{ |
| | | width: 1000px; |
| | | height: 600px; |
| | | margin: auto; |
| | | } |
| | | h2{ |
| | | text-align: center; |
| | | width: 100vw; |
| | |
| | | <div id="div-title"> |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/userPassWord/updateUserPassWord' }">修改密码</el-breadcrumb-item> |
| | | <el-breadcrumb-item v-show="false" @click="changeRouter(2)" :class="indexFlag===2?'indexTag':''" :to="{ path: '/main/order/createOrder' }">{{$t('basicData.create')}}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | |
| | |
| | | import cn.dev33.satoken.annotation.SaCheckPermission; |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.PrintSetup; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.common.Result; |
| | |
| | | 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("打印标签设置查询") |
| | | @SaCheckPermission("PrintFlowCard.search") |
| | | @PostMapping ("/printSetup") |
| | | public Result printSetup(@RequestBody PrintSetup printSetup){ |
| | | return Result.seccess(flowCardService.printSetup(printSetup)); |
| | | |
| | | } |
| | | } |
| | |
| | | //点击查询排版数据 |
| | | @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)); |
| | | |
| | | } |
| | | |
| | |
| | | private String founder; |
| | | //分架时间 |
| | | private LocalDate splitFrameTime; |
| | | //排序 |
| | | private Integer sort; |
| | | //建立时间 |
| | | private LocalDate createTime; |
| | | //修改时间 |
New file |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class PrintSetup { |
| | | //自增id |
| | | private Integer id; |
| | | //打印标签类型 |
| | | private String printType; |
| | | //打印标签名称 |
| | | private String printTypeName; |
| | | //状态 |
| | | private String printState; |
| | | |
| | | } |
| | |
| | | |
| | | 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; |
| | | } |
| | |
| | | Boolean updateComposing(String processId); |
| | | |
| | | 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); |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | |
| | | 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; |
| | | } |
| | | } |
| | |
| | | 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; |
| | | } |
| | | |
| | |
| | | strict: false #设置严格模式,默认false不启动. 启动后在未匹配到指定数据源时候回抛出异常,不启动会使用默认数据源. |
| | | datasource: |
| | | user_info: |
| | | url: jdbc:mysql://10.153.19.150:3306/erp_user_info?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://192.168.1.108:3306/erp_user_info?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | sd: |
| | | url: jdbc:mysql://10.153.19.150:3306/sd?serverTimezone=GMT%2b8&allowMultiQueries=true |
| | | url: jdbc:mysql://192.168.1.108:3306/sd?serverTimezone=GMT%2b8&allowMultiQueries=true |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | mm: |
| | | url: jdbc:mysql://10.153.19.150:3306/mm?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://192.168.1.108:3306/mm?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | | pp: |
| | | url: jdbc:mysql://10.153.19.150:3306/pp?serverTimezone=GMT%2b8 |
| | | url: jdbc:mysql://192.168.1.108:3306/pp?serverTimezone=GMT%2b8 |
| | | username: root |
| | | password: beibo.123/ |
| | | driver-class-name: com.mysql.cj.jdbc.Driver |
| | |
| | | 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"> |
| | |
| | | group by a.glass_child, a.child_width, a.child_height |
| | | order by d.technology_number |
| | | </select> |
| | | |
| | | <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, |
| | | print_state as printState |
| | | from pp.print_setup |
| | | </select> |
| | | </mapper> |
| | |
| | | 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> |