Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
# Conflicts:
# north-glass-erp/target/classes/mapper/pp/Report.xml
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | warehouseManager:userStore.user.userName |
| | | }) |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | |
| | | |
| | | }) |
| | | |
| | | let optimizeUse = ref({ |
| | | id:0 |
| | | }) |
| | | |
| | | let BasicData = ref([]) |
| | |
| | | {field: 'inventoryOrganization', width:'150', title: '库存组织', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged }, |
| | | {field: 'materialCode', width: '150',title: '物料编码', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'producer', width: '100',title: '产地', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'projectNo', width: '100',title: '工程号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'inventoryQuantity',width: '100', title: '库存数量', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'availableQuantity', width: '100',title: '可用库存', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'outboundQuantity', width:'150', title: '出库数量', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | |
| | | request.get(`/BasicWarehouse/BasicWarehouseTypes/材料出库类型`).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | |
| | | titleSelectJson.value=deepClone(res.data) |
| | | console.log(titleSelectJson.value) |
| | | const today = new Date |
| | | today.setTime(today.getTime() + (15 * 24 * 60 * 60 * 1000)) |
| | | titleUploadData.value.materialRequisitionDate = today.getFullYear() + |
| | |
| | | addListener(xGrid.value,gridOptions,cellArea.value) |
| | | //出库新增 |
| | | const id = route.query.id |
| | | const type = route.query.type |
| | | if (typeof id !== 'undefined' && id !== null && id !== '' && id !== '\n' && id !== '\r'){ |
| | | |
| | | if(type==='库存'){ |
| | | filterData.value.stockId=id |
| | | number.value=id |
| | | console.log(filterData.value) |
| | | //第一次调用 |
| | | request.post("/MaterialInventory/getSelectMaterialInventory/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | }else{ |
| | | optimizeUse.value.rawStockCode=id |
| | | console.log(optimizeUse.value) |
| | | number.value=id |
| | | request.post("/MaterialInventory/getSelectMaterialInventoryEngineering/1/100",optimizeUse.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | |
| | | console.log(res.data.data) |
| | | titleUploadData.value.warehouseManager=userStore.user.userName |
| | | titleUploadData.value.outboundType = titleSelectJson.value.outboundType[0].operateTypeName |
| | | materialStore.value=[] |
| | | for (let i=0;i<res.data.data.length;i++){ |
| | | materialStore.value[i]=(res.data.data[i]) |
| | | materialStore.value[i].json=(JSON.parse(res.data.data[i].json)) |
| | | |
| | | } |
| | | |
| | | produceList = deepClone(materialStore.value) |
| | | xGrid.value.loadData(produceList) |
| | | |
| | | |
| | | //禁用按钮 |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | //显示复选框 |
| | | xGrid.value.showColumn("select") |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | } |
| | | //出库编辑 |
| | | const str = route.query.materialOutboundId |
| | | |
| | | if (typeof str != 'undefined' && str != null && str !== '' && str !== '\n' && str !== '\r'){ |
| | | |
| | | filterData.value.materialOutboundId=str |
| | | console.log(filterData.value) |
| | | //第一次调用 |
| | |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'OrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | |
| | | }) |
| | | |
| | | const values = ref('') |
| | | const selectOptions = [ |
| | | { |
| | | value: '库存', |
| | | label: '库存' |
| | | }, |
| | | { |
| | | value: '工程', |
| | | label: '工程', |
| | | } |
| | | ] |
| | | |
| | | let selectDate = ref(["",""]) |
| | | let BasicData = ref([]) |
| | | let materialStore= ref([]) |
| | |
| | | {field: 'materialCode', width: '150',title: '物料编码', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'producer', width: '100',title: '产地', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'id',width: '100', title: '库存编号', sortable: true,showOverflow:"ellipsis",filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'projectNo',width: '100', title: '工程号', sortable: true,showOverflow:"ellipsis",filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | //{field: 'safetyStock', width: '100',title: '安全库存', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'inventoryQuantity',width: '100', title: '库存数量', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'availableQuantity', width: '100',title: '可用库存', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | |
| | | gridOptions.columns.push(aa) |
| | | |
| | | } |
| | | values.value='库存' |
| | | getInventoryWorks() |
| | | |
| | | }else{ |
| | |
| | | |
| | | |
| | | const getInventoryWorks = () => { |
| | | |
| | | request.post(`/MaterialInventory/getSelectMaterialInventoryDate/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | |
| | | }) |
| | | } |
| | | |
| | | const selectInventoryWork = () => { |
| | | if(values.value==='库存'){ |
| | | getInventoryWorks() |
| | | }else{ |
| | | getInventoryEngineeringWork() |
| | | } |
| | | } |
| | | |
| | | const getInventoryEngineeringWork = () => { |
| | | |
| | | request.post(`/MaterialInventory/getSelectMaterialInventoryEngineeringDate/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | materialStore.value=[] |
| | | for (let i=0;i<res.data.data.length;i++){ |
| | | materialStore.value[i]=(res.data.data[i]) |
| | | materialStore.value[i].json=(JSON.parse(res.data.data[i].json)) |
| | | |
| | | } |
| | | |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | selectDate.value = res.data.selectDate |
| | | produceList = deepClone(materialStore.value) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | |
| | | gridOptions.columns.push(aa) |
| | | |
| | | } |
| | | if(values.value==='库存'){ |
| | | getInventoryWorkPaging() |
| | | }else{ |
| | | getInventoryEngineeringWork() |
| | | } |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | console.log(selectRecords) |
| | | let id = "" |
| | | const array = []; |
| | | if (values.value==='库存'){ |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | array.push(selectRecords[i].id) |
| | | if (i + 1 === selectRecords.length) { |
| | |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | }else{ |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | array.push(selectRecords[i].useId) |
| | | if (i + 1 === selectRecords.length) { |
| | | id += selectRecords[i].useId |
| | | } else { |
| | | id += selectRecords[i].useId + "|" |
| | | } |
| | | } |
| | | } |
| | | |
| | | router.push({path: '/main/ingredientsStock/CreateOutbound', query: {id: id}}) |
| | | |
| | | |
| | | |
| | | router.push({path: '/main/ingredientsStock/CreateOutbound', query: {id: id,type:values.value}}) |
| | | break |
| | | |
| | | |
| | |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | |
| | | |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">查询</el-button> |
| | | |
| | | <div> |
| | | <el-row> |
| | | <el-select v-model="values" placeholder="请选择类别" @change="selectInventoryWork"> |
| | | <el-option |
| | | v-for="item in selectOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-row> |
| | | </div> |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | //首次加载 |
| | | request.post(`/maintenance/selectMaintenance`).then((res) => { |
| | | if (res.code === 200) { |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | |
| | | {type: 'checkbox', fixed: "left", title: t('basicData.check')}, |
| | | { |
| | | field: 'orderNumber', |
| | | title: t('basicData.check'), |
| | | title: t('order.OrderNum'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | |
| | | }, |
| | | { |
| | | field: 'landingSequence', |
| | | title: t('processCard.technologyNumber'), |
| | | title: '落架顺序', |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | |
| | | |
| | | //获取七天前到当前时间 |
| | | function getNowTime() { |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 7) |
| | | const start = new Date(new Date().getTime() - 3600 * 1000 * 24 * 3) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | | .slice(0, 10) //默认开始时间7天前 |
| | | .slice(0, 10) //默认开始时间3天前 |
| | | const end = new Date(new Date().getTime() + 3600 * 1000 * 24) |
| | | .toISOString() |
| | | .replace('T', ' ') |
| | |
| | | addListener(xGrid.value,gridOptions) |
| | | }) |
| | | |
| | | //第一次加载获取近七天时间和默认状态 |
| | | //第一次加载获取近3天时间和默认状态 |
| | | form.date1 = getNowTime() |
| | | let startTime = form.date1[0] |
| | | let endTime = form.date1[1] |
| | |
| | | } |
| | | }) |
| | | } |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | break |
| | | } |
| | | case 'copyAll' :{ |
| | |
| | | } |
| | | }) |
| | | } |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | break |
| | | } |
| | | case 'clearChecked' :{ |
| | |
| | | } |
| | | }) |
| | | } |
| | | gridOptions.menuConfig.body.options[0][5].disabled=false |
| | | break |
| | | } |
| | | } |
| | |
| | | {field: 'order_number', title: '订单序号' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },}, |
| | | {field: 'technology_number', title: '小片顺序' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },}, |
| | | {field: 'quantity', title: '数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, width: 80}, |
| | | {field: 'child_width', title: '宽', }, |
| | | {field: 'child_height', title: '高', }, |
| | | {field: 'area', title: '面积' ,showOverflow:"ellipsis"}, |
| | | {field: 'product_name', title: '产品名称', }, |
| | | {field: 'glass_child', title: '单片名称', }, |
| | |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElDatePicker, ElMessage} from "element-plus" |
| | | import useProductGlassTypeStore from "@/stores/sd/product/productGlassType" |
| | | import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue" |
| | | import {Search} from "@element-plus/icons-vue" |
| | | import GlassType from "@/components/sd/product/GlassType.vue" |
| | | import {useRouter} from 'vue-router' |
| | | import Sortable from 'sortablejs' |
| | | import BasicTable from '@/components/basic/BasicTable.vue' |
| | | import {VXETable} from "vxe-table"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | let router=useRouter() |
| | |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/processCard/AddProcessCard', query: { orderId: row.orderId,productionId:row.orderGlassDetail.productionId }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | alert('我接收到子组件传送的排版状态') |
| | | router.push({ |
| | | path: '/main/processCard/AddProcessCard', |
| | | query: {orderId: row.orderId, productionId: row.orderGlassDetail.productionId} |
| | | }) |
| | | break |
| | | } |
| | | } |
| | |
| | | |
| | | let id=route.query.orderId |
| | | |
| | | // 第一次加载查询 |
| | | request.post(`/processCard/detailsSelect/${id}`, filterData.value).then((res) => { |
| | | |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | produceList = produceList.value.concat(deepClone(res.data.data)) |
| | | console.log('produceList', produceList) |
| | | xGrid.value.reloadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | |
| | | } |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | const changeFilterEvent = (event, option, $panel,) => { |
| | | // 手动触发筛选 |
| | | $panel.changeOption(event, !!option.data, option) |
| | | } |
| | | |
| | | function filterChanged(column) { |
| | | gridOptions.loading = true |
| | | //筛选条件发生变化条件发生变化 |
| | | let value = column.datas[0] != undefined ? column.datas[0] : '' |
| | | value = value.trim() |
| | | //判断是否存在外键 |
| | | if (column.property.indexOf('.') > -1) { |
| | | const columnArr = column.property.split('.') |
| | | filterData.value[columnArr[0]] = { |
| | | [columnArr[1]]: value |
| | | } |
| | | } else { |
| | | filterData.value[column.property] = value |
| | | } |
| | | |
| | | request.post(`/processCard/detailsSelect/${id}`, filterData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | pageTotal.value = res.data.total |
| | | produceList = deepClone(res.data.data) |
| | | |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | //子组件接收参数 |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | loading: true, |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | // remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {title: t('basicData.operate'), width: 80, slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: t('basicData.Number'), width: 50 }, |
| | | {field: 'orderId', title: t('order.orderId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, }, |
| | | {field: 'orderGlassDetail.productionId', title: t('workOrder.productionId'), showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productId', title: t('order.productId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderDetail.productName', title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },}, |
| | | {field: 'orderDetail.quantity', title: t('order.quantity'),showOverflow:"ellipsis"}, |
| | | {field: 'orderDetail.computeGrossArea', title: t('order.area'), }, |
| | | {field: 'orderDetail.perimeter', title: t('workOrder.perimeter'),}, |
| | | { |
| | | field: 'order_id', |
| | | title: t('order.orderId'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'production_id', |
| | | title: t('workOrder.productionId'), |
| | | showOverflow: "ellipsis", |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'product_id', |
| | | title: t('order.productId'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | { |
| | | field: 'product_name', |
| | | title: t('order.product'), |
| | | filters: [{data: ''}], |
| | | slots: {filter: 'num1_filter'}, |
| | | filterMethod: filterChanged |
| | | }, |
| | | {field: 'quantity', title: t('order.quantity'), showOverflow: "ellipsis"}, |
| | | {field: 'compute_gross_area', title: t('order.area'),}, |
| | | {field: 'perimeter', title: t('workOrder.perimeter'),}, |
| | | ],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | height="600px" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | class="mytable-scrollbar" |
| | | height="600px" |
| | | max-height="100%" |
| | | v-bind="gridOptions" |
| | | |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <el-button link size="small" type="primary" @click="getTableRow(row,'edit')">{{ $t('basicData.edit') }} |
| | | </el-button> |
| | | |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input type="text" |
| | | v-model="option.data" |
| | | @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | return count.toFixed(2) |
| | | } |
| | | |
| | | const hasDecimal = (value) => { |
| | | const regex = /\./; // 定义正则表达式,查找小数点 |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //首次加载 |
| | | request.post(`/basicDataProduce/selectBasic`).then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {title: '操作', width: 140, slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'id', width: 60, title: 'id',filters:[{ data: '' }],slots: { filter: 'num1_filter' },}, |
| | | {field: 'basic_type',width: 370, title: '类型', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'basic_name', width: 330,title: '名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'd_basic_name',width: 330, title: '类别',filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'id', width: 60, title: 'id',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged,}, |
| | | {field: 'basic_type',width: 370, title: '类型', showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'basic_name', width: 330,title: '名称', filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'd_basic_name',width: 330, title: '类别'}, |
| | | ], |
| | | //表头按钮 |
| | | toolbarConfig: { |
| | |
| | | <div class="main-div-customer"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <input type="text" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.mm.*; |
| | | import com.example.erp.entity.pp.OptimizeUse; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.mm.MaterialInventoryService; |
| | | import com.example.erp.service.mm.MaterialStoreService; |
| | |
| | | return Result.seccess(materialInventoryService.getSelectMaterialInventoryDate(pageNum,pageSize,selectDate,materialInventory)); |
| | | } |
| | | |
| | | @ApiOperation("物料库存工程加时间查询接口") |
| | | @PostMapping("/getSelectMaterialInventoryEngineeringDate/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectMaterialInventoryEngineeringDate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> selectDate, @RequestBody MaterialInventory materialInventory){ |
| | | return Result.seccess(materialInventoryService.getSelectMaterialInventoryEngineeringDate(pageNum,pageSize,selectDate,materialInventory)); |
| | | } |
| | | |
| | | @ApiOperation("物料库存查询接口") |
| | | @PostMapping("/getSelectMaterialInventory/{pageNum}/{pageSize}") |
| | | public Result getSelectMaterialInventory(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody MaterialInventory materialInventory){ |
| | | return Result.seccess(materialInventoryService.getSelectMaterialInventory(pageNum,pageSize,materialInventory)); |
| | | } |
| | | |
| | | @ApiOperation("物料库存工程查询接口") |
| | | @PostMapping("/getSelectMaterialInventoryEngineering/{pageNum}/{pageSize}") |
| | | public Result getSelectMaterialInventoryEngineering(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody OptimizeUse optimizeUse){ |
| | | return Result.seccess(materialInventoryService.getSelectMaterialInventoryEngineering(pageNum,pageSize,optimizeUse)); |
| | | } |
| | | |
| | | @ApiOperation("材料出库查询接口") |
| | |
| | | return Result.seccess(materialInventoryService.getSelectMaterialOutbound(pageNum,pageSize,materialOutboundDetail)); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("材料出库审核接口") |
| | | @PostMapping("/updateMaterialOutboundToExamine") |
| | | public Result updateMaterialOutboundToExamine( @RequestBody Map<String,Object> object){ |
| | |
| | | private String inventoryOrganization; |
| | | private String materialName; |
| | | private String materialCode; |
| | | private Integer useId; |
| | | private String producer; |
| | | private Double width; |
| | | private Double height; |
New file |
| | |
| | | package com.example.erp.entity.pp; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | @TableName("pp.`optimize_use`") |
| | | public class OptimizeUse { |
| | | @TableId(type = IdType.AUTO) |
| | | private Integer id; |
| | | private Integer projectNo; |
| | | private String rawStockCode; |
| | | private String stockCode; |
| | | private Integer type; |
| | | private Double width; |
| | | private Double height; |
| | | private Integer useCount; |
| | | private Integer notUseCount; |
| | | private LocalDate createTime; |
| | | |
| | | |
| | | } |
| | |
| | | package com.example.erp.mapper.mm; |
| | | |
| | | import com.example.erp.entity.mm.*; |
| | | import com.example.erp.entity.pp.OptimizeUse; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | |
| | | |
| | | Map<String,Integer> getSelectMaterialInventoryDatePageTotal(Integer offset, Integer pageSize,String startDate, String endDate, MaterialInventory materialInventory); |
| | | |
| | | List<Map<String,Object>> getSelectMaterialInventoryEngineeringDate(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("materialInventory") MaterialInventory materialInventory); |
| | | |
| | | |
| | | Map<String,Integer> getSelectMaterialInventoryEngineeringDatePageTotal(Integer offset, Integer pageSize,String startDate, String endDate, MaterialInventory materialInventory); |
| | | |
| | | |
| | | |
| | | |
| | | List<Map<String,Object>> getSelectMaterialInventory(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("materialInventory") MaterialInventory materialInventory); |
| | | |
| | | |
| | | Map<String,Integer> getSelectMaterialInventoryPageTotal(Integer offset, Integer pageSize, MaterialInventory materialInventory); |
| | | |
| | | List<Map<String,Object>> getSelectMaterialInventoryEngineering(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("optimizeUse") OptimizeUse optimizeUse); |
| | | |
| | | |
| | | Map<String,Integer> getSelectMaterialInventoryEngineeringPageTotal(Integer offset, Integer pageSize, OptimizeUse optimizeUse); |
| | | |
| | | Boolean insertMaterialStore(@Param("type") String type, |
| | | @Param("json") String json); |
| | |
| | | Boolean updateReturningWarehouseDetail(@Param("number") String number, @Param("returningWarehouseNumber") Integer returningWarehouseNumber, |
| | | @Param("materialInventoryId") Long materialInventoryId); |
| | | |
| | | Boolean updateMaterialInventoryAvailableOptOut(@Param("useId") Integer useId, |
| | | @Param("quantity") Integer quantity); |
| | | Boolean updateMaterialInventoryAvailableOptInt(@Param("useId") Integer useId, |
| | | @Param("quantity") Integer quantity); |
| | | |
| | | Boolean updateMaterialInventoryAvailableOut(@Param("inventoryId") Long inventoryId, |
| | | @Param("quantity") Integer quantity); |
| | |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("materialOutboundDetail") MaterialOutboundDetail materialOutboundDetail); |
| | | |
| | | List<MaterialOutboundDetail> SelectMaterialOutboundDetail(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("materialOutboundDetail") MaterialOutboundDetail materialOutboundDetail); |
| | | List<Map<String,Object>> getSelectMaterialOutboundDetail(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("materialOutboundDetail") MaterialOutboundDetail materialOutboundDetail); |
| | | |
| | | List<Map<String,Object>> getSelectMaterialOutboundEngineering(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("materialOutboundDetail") MaterialOutboundDetail materialOutboundDetail); |
| | | |
| | | Map<String,Integer> getSelectMaterialOutboundDetailPageTotal(Integer offset, Integer pageSize,MaterialOutboundDetail materialOutboundDetail); |
| | | |
| | | ReturningWarehouse getSelectReturningWarehouse(@Param("offset") Integer offset, |
| | |
| | | List<FlowCard> selectFlowCardMp(Date selectTime1, Date selectTime2, FlowCard flowCard); |
| | | |
| | | //分架明细查询 |
| | | List<FlowCard> detailsSelectMp(String orderId, FlowCard flowCard); |
| | | List<Map<String, String>> detailsSelectMp(String orderId, FlowCard flowCard); |
| | | |
| | | //删除流程卡 |
| | | Boolean deleteFlowCardMp(String orderId, String processId); |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.mm.*; |
| | | import com.example.erp.entity.pp.OptimizeUse; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | |
| | | List<MaterialOutboundDetail> materialOutboundDetailLists = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId); |
| | | if (!materialOutboundDetailLists.isEmpty()) { |
| | | for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailLists) { |
| | | if(materialOutboundDetail.getUseId()!=null){ |
| | | //还原优化工程库存数 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableOptInt(materialOutboundDetail.getUseId(), materialOutboundDetail.getOutboundQuantity()); |
| | | }else{ |
| | | //还原物料库存数 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableInt(materialOutboundDetail.getId(), materialOutboundDetail.getOutboundQuantity()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | //删除材料出库明细的数据 |
| | |
| | | Integer materialOutboundDetailMaximum = materialInventoryMapper.getMaterialOutboundDetailMaximum(oddNumber); |
| | | //新增材料出库明细数据 |
| | | materialInventoryMapper.insertMaterialOutboundDetail(materialOutboundDetail, oddNumber, materialOutboundDetailMaximum + 1); |
| | | if(materialOutboundDetail.getUseId()!=null){ |
| | | //修改优化工程表出库数量 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableOptOut(materialOutboundDetail.getUseId(), materialOutboundDetail.getOutboundQuantity()); |
| | | }else{ |
| | | //修改物料库存表出库数量 |
| | | System.out.println(materialOutboundDetail.getInventoryId()); |
| | | materialInventoryMapper.updateMaterialInventoryAvailableOut(materialOutboundDetail.getId(), materialOutboundDetail.getOutboundQuantity()); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getSelectMaterialInventoryEngineeringDate(Integer pageNum, Integer pageSize, List<String> selectDate, MaterialInventory materialInventory) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | String endDate = LocalDate.now().toString(); |
| | | String startDate = LocalDate.now().minusDays(15).toString(); |
| | | if(selectDate !=null && selectDate.size()==2){ |
| | | if(!selectDate.get(0).isEmpty()){ |
| | | startDate = selectDate.get(0); |
| | | } |
| | | if(!selectDate.get(1).isEmpty()){ |
| | | endDate = selectDate.get(1); |
| | | } |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", materialInventoryMapper.getSelectMaterialInventoryEngineeringDate(offset, pageSize,startDate, endDate, materialInventory)); |
| | | map.put("total", materialInventoryMapper.getSelectMaterialInventoryEngineeringDatePageTotal(offset, pageSize,startDate, endDate, materialInventory)); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getSelectMaterialInventory(Integer pageNum, Integer pageSize, MaterialInventory materialInventory) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", materialInventoryMapper.getSelectMaterialInventory(offset, pageSize, materialInventory)); |
| | | map.put("total", materialInventoryMapper.getSelectMaterialInventoryPageTotal(offset, pageSize, materialInventory)); |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getSelectMaterialInventoryEngineering(Integer pageNum, Integer pageSize, OptimizeUse optimizeUse) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | System.out.println(optimizeUse); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", materialInventoryMapper.getSelectMaterialInventoryEngineering(offset, pageSize, optimizeUse)); |
| | | map.put("total", materialInventoryMapper.getSelectMaterialInventoryEngineeringPageTotal(offset, pageSize, optimizeUse)); |
| | | return map; |
| | | } |
| | | |
| | |
| | | public Map<String, Object> getSelectMaterialOutbound(Integer pageNum, Integer pageSize, MaterialOutboundDetail materialOutboundDetail) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | System.out.println("数据"+materialOutboundDetail); |
| | | List<MaterialOutboundDetail> materialOutboundDetailList= materialInventoryMapper.SelectMaterialOutboundDetail(offset, pageSize, materialOutboundDetail); |
| | | if(materialOutboundDetailList.get(0).getUseId()==null){ |
| | | map.put("materialOutbound", materialInventoryMapper.getSelectMaterialOutbound(offset, pageSize, materialOutboundDetail)); |
| | | map.put("data", materialInventoryMapper.getSelectMaterialOutboundDetail(offset, pageSize, materialOutboundDetail)); |
| | | map.put("total", materialInventoryMapper.getSelectMaterialOutboundDetailPageTotal(offset, pageSize, materialOutboundDetail)); |
| | | }else{ |
| | | map.put("materialOutbound", materialInventoryMapper.getSelectMaterialOutbound(offset, pageSize, materialOutboundDetail)); |
| | | map.put("data", materialInventoryMapper.getSelectMaterialOutboundEngineering(offset, pageSize, materialOutboundDetail)); |
| | | map.put("total", materialInventoryMapper.getSelectMaterialOutboundDetailPageTotal(offset, pageSize, materialOutboundDetail)); |
| | | } |
| | | |
| | | return map; |
| | | } |
| | | |
| | | |
| | | |
| | | public Boolean updateMaterialOutboundToExamine(Map<String,Object> object) { |
| | | boolean saveState = true; |
| | |
| | | List<MaterialOutboundDetail> materialOutboundDetailList = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId); |
| | | if (!materialOutboundDetailList.isEmpty()) { |
| | | for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailList) { |
| | | if(materialOutboundDetail.getUseId()==null){ |
| | | //修改物料库存数量 |
| | | materialInventoryMapper.updateMaterialInventoryInventoryOut(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | materialInventoryMapper.updateMaterialOutboundToExamine(materialOutboundId,type,reviewed); |
| | |
| | | List<MaterialOutboundDetail> materialOutboundDetailList = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId); |
| | | if (!materialOutboundDetailList.isEmpty()) { |
| | | for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailList) { |
| | | if(materialOutboundDetail.getUseId()==null){ |
| | | //修改物料库存数量 |
| | | materialInventoryMapper.updateMaterialInventoryInventoryInt(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity()); |
| | | } |
| | | |
| | | } |
| | | } |
| | | materialInventoryMapper.updateMaterialOutboundCounterExamination(materialOutboundId,type,reviewed); |
| | | } |
| | |
| | | //未排产查询 |
| | | public Map<String, Object> selectSchedulingSv(String selectTime1, String selectTime2, String orderId,String processes, Integer state, ProductionScheduling productionScheduling ) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(orderId.equals("null")){ |
| | | if("null".equals(orderId)){ |
| | | orderId=""; |
| | | } |
| | | if (processes.equals("null")){ |
| | | if ("null".equals(processes)){ |
| | | |
| | | processes=""; |
| | | } |
| | |
| | | //首次查询排产数据 |
| | | public Map<String, Object> selectLastScheduling(String selectTime1, String selectTime2,String processes,String orderId,ProductionScheduling productionScheduling ) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | if(orderId.equals("null")){ |
| | | if("null".equals(orderId)){ |
| | | orderId=""; |
| | | } |
| | | if (processes.equals("null")){ |
| | | if ("null".equals(processes)){ |
| | | |
| | | processes=""; |
| | | } |
| | |
| | | //报工管理查询 |
| | | public Map<String, Object> selectReportingWorkSv(Integer pageNum, Integer pageSize, java.sql.Date selectTime1, java.sql.Date selectTime2, String orderId, ReportingWork reportingWork) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | if (orderId.equals("null")) { |
| | | if ("null".equals(orderId)) { |
| | | orderId = ""; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | //查询质检审核 |
| | | public Map<String, Object> selectQualityTestingSv(Integer pageNum, Integer pageSize, java.sql.Date selectTime1, java.sql.Date selectTime2, Integer state, String processId, ReportingWork reportingWork) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | if (processId.equals("null")) { |
| | | if ("null".equals(processId)) { |
| | | processId = ""; |
| | | } |
| | | Map<String, Object> map = new HashMap<>(); |
| | |
| | | if (!orderId.isEmpty() && !productName.isEmpty()) { |
| | | //删除订单小片表生产订单号 |
| | | workOrderMapper.deleteOrderWorkMp(orderId, productName); |
| | | Integer state = 0; |
| | | Integer states = 1; |
| | | int state = 0; |
| | | int states = 1; |
| | | //查询该订单未转生产订单的条数 |
| | | Integer noWorkCount = workOrderMapper.selectWorkCount(orderId); |
| | | //查询该订单转生产订单的条数 |
| | | Integer yesWorkCount = workOrderMapper.selectYesWorkCount(orderId); |
| | | if (noWorkCount == yesWorkCount) { |
| | | if (noWorkCount.equals(yesWorkCount)) { |
| | | workOrderMapper.updateWorkType(orderId, state); |
| | | } else { |
| | | workOrderMapper.updateWorkType(orderId, states); |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectMaterialInventoryEngineeringDate"> |
| | | select |
| | | ou.id as useId, |
| | | ou.project_no as projectNo, |
| | | ou.use_count AS inventoryQuantity, |
| | | ou.not_use_count AS availableQuantity, |
| | | mi.id, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | mi.material_code AS materialCode, |
| | | mi.producer, |
| | | mi.safety_stock AS safetyStock, |
| | | mi.total_area AS totalArea, |
| | | mi.single_piece_area singlePieceArea, |
| | | date(mi.date_of_manufacture) AS dateOfManufacture, |
| | | mi.quality_guarantee_period qualityGuaranteePeriod, |
| | | mi.inventory_area AS inventoryArea, |
| | | mi.dead_stock AS deadStock, |
| | | mi.remarks, |
| | | date(mi.create_time) AS createTime, |
| | | ms.json from pp.optimize_use ou left join mm.material_inventory mi on ou.stock_code=mi.id left join mm.material_store ms on mi.material_code=ms.id |
| | | <where> |
| | | ou.not_use_count>0 and ou.state=1 and |
| | | date(ou.create_time)>=#{startDate} and date(ou.create_time) <= #{endDate} |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialInventoryEngineeringDatePageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | pp.optimize_use ou |
| | | <where> |
| | | ou.not_use_count>0 and ou.state=1 and |
| | | date(ou.create_time)>=#{startDate} and date(ou.create_time) <= #{endDate} |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectMaterialInventory"> |
| | | select |
| | | mi.id, |
| | |
| | | <where> |
| | | <if test="materialInventory.id != null and materialInventory.id != ''"> |
| | | and mi.id regexp #{materialInventory.id} |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialInventoryEngineering"> |
| | | select |
| | | ou.id as useId, |
| | | ou.project_no as projectNo, |
| | | ou.use_count AS inventoryQuantity, |
| | | ou.not_use_count AS availableQuantity, |
| | | mi.id, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | mi.material_code AS materialCode, |
| | | mi.producer, |
| | | mi.safety_stock AS safetyStock, |
| | | mi.total_area AS totalArea, |
| | | mi.single_piece_area singlePieceArea, |
| | | date(mi.date_of_manufacture) AS dateOfManufacture, |
| | | mi.quality_guarantee_period qualityGuaranteePeriod, |
| | | mi.inventory_area AS inventoryArea, |
| | | mi.dead_stock AS deadStock, |
| | | mi.remarks, |
| | | date(mi.create_time) AS createTime, |
| | | ms.json from pp.optimize_use ou left join mm.material_inventory mi on ou.stock_code=mi.id left join mm.material_store ms on mi.material_code=ms.id |
| | | |
| | | <where> |
| | | <if test="optimizeUse.rawStockCode != null and optimizeUse.rawStockCode != ''"> |
| | | and ou.id regexp #{optimizeUse.rawStockCode} |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialInventoryEngineeringPageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | pp.optimize_use ou |
| | | <where> |
| | | <if test="optimizeUse.rawStockCode != null and optimizeUse.rawStockCode != ''"> |
| | | and ou.id regexp #{optimizeUse.rawStockCode} |
| | | </if> |
| | | |
| | | </where> |
| | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="SelectMaterialOutboundDetail" > |
| | | select |
| | | * |
| | | from mm.material_outbound_detail modd |
| | | <where> |
| | | <if test="materialOutboundDetail.materialOutboundId != null and materialOutboundDetail.materialOutboundId != ''"> |
| | | and modd.material_outbound_id regexp #{materialOutboundDetail.materialOutboundId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialOutboundDetail" > |
| | | select |
| | | modd.use_id as useId, |
| | | modd.inventory_id as id, |
| | | modd.inventory_organization as inventoryOrganization, |
| | | modd.material_code as materialCode, |
| | |
| | | if(mo.reviewed_state!=1,modd.outbound_quantity+mi.available_quantity,mi.available_quantity) as availableQuantity, |
| | | ms.json |
| | | from mm.material_outbound_detail modd left join mm.material_inventory mi on modd.inventory_id=mi.id |
| | | left join mm.material_outbound mo on modd.material_outbound_id=mo.material_outbound_id |
| | | left join mm.material_store ms on modd.material_code=ms.id |
| | | <where> |
| | | <if test="materialOutboundDetail.materialOutboundId != null and materialOutboundDetail.materialOutboundId != ''"> |
| | | and modd.material_outbound_id regexp #{materialOutboundDetail.materialOutboundId} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialOutboundEngineering" > |
| | | select |
| | | ou.project_no as projectNo, |
| | | modd.inventory_id as id, |
| | | modd.inventory_organization as inventoryOrganization, |
| | | modd.material_code as materialCode, |
| | | modd.material_name as materialName, |
| | | modd.producer, |
| | | modd.width, |
| | | modd.height, |
| | | modd.thickness, |
| | | modd.unit, |
| | | modd.outbound_quantity as outboundQuantity, |
| | | date(modd.date_of_manufacture) as dateOfManufacture, |
| | | modd.single_piece_area as singlePieceArea, |
| | | modd.inventory_area as inventoryArea, |
| | | modd.remarks, |
| | | ou.use_count as inventoryQuantity, |
| | | if(mo.reviewed_state!=1,modd.outbound_quantity+ou.not_use_count,ou.not_use_count) as availableQuantity, |
| | | ms.json |
| | | from mm.material_outbound_detail modd left join pp.optimize_use ou on modd.use_id=ou.id |
| | | left join mm.material_outbound mo on modd.material_outbound_id=mo.material_outbound_id |
| | | left join mm.material_store ms on modd.material_code=ms.id |
| | | <where> |
| | |
| | | </insert> |
| | | |
| | | <insert id="insertMaterialOutboundDetail" useGeneratedKeys="true" > |
| | | insert into mm.material_outbound_detail (material_outbound_id,material_outbound_number,material_code,material_name,inventory_id,inventory_organization,producer,unit,width, |
| | | insert into mm.material_outbound_detail (material_outbound_id,material_outbound_number,material_code,material_name,use_id,inventory_id,inventory_organization,producer,unit,width, |
| | | height,thickness,outbound_quantity,single_piece_area,inventory_area,date_of_manufacture,remarks) |
| | | values ( |
| | | #{number} ,#{materialOutboundNumber},#{materialOutboundDetail.materialCode},#{materialOutboundDetail.materialName},#{materialOutboundDetail.id}, |
| | | #{number} ,#{materialOutboundNumber},#{materialOutboundDetail.materialCode},#{materialOutboundDetail.materialName},#{materialOutboundDetail.useId},#{materialOutboundDetail.id}, |
| | | #{materialOutboundDetail.inventoryOrganization},#{materialOutboundDetail.producer},#{materialOutboundDetail.unit}, |
| | | #{materialOutboundDetail.width},#{materialOutboundDetail.height},#{materialOutboundDetail.thickness},#{materialOutboundDetail.outboundQuantity}, |
| | | #{materialOutboundDetail.singlePieceArea},#{materialOutboundDetail.inventoryArea},#{materialOutboundDetail.dateOfManufacture},#{materialOutboundDetail.remarks} |
| | |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateMaterialInventoryAvailableOptOut"> |
| | | update pp.optimize_use |
| | | set not_use_count=not_use_count-#{quantity} |
| | | where id=#{useId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableOptInt"> |
| | | update pp.optimize_use |
| | | set not_use_count=not_use_count+#{quantity} |
| | | where id=#{useId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableOut"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity-#{quantity} |
| | |
| | | </select> |
| | | |
| | | <!-- 分架明细查询--> |
| | | <select id="detailsSelectMp" resultMap="flowCardMap"> |
| | | <select id="detailsSelectMp"> |
| | | select od.order_id, |
| | | ogd.production_id, |
| | | od.product_id, |
| | |
| | | GROUP BY order_id,order_number |
| | | ) as ogd on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | where od.order_id = #{orderId} and ogd.splitting_status=0 |
| | | <if test="flowCard.orderId != null and flowCard.orderId != ''"> |
| | | and od.order_id regexp #{flowCard.orderId} |
| | | </if> |
| | | <if test="flowCard.orderGlassDetail.productionId != null and flowCard.orderGlassDetail.productionId != ''"> |
| | | and ogd.production_id regexp #{flowCard.orderGlassDetail.productionId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and od.product_id regexp #{flowCard.orderDetail.productId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | |
| | | group by od.order_id, ogd.production_id |
| | | order by od.id desc |
| | | </select> |
| | |
| | | fc.order_number, |
| | | fc.technology_number, |
| | | fc.quantity, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | round(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area, |
| | | od.product_name, |
| | | ogd.glass_child, |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectMaterialInventoryEngineeringDate"> |
| | | select |
| | | ou.id as useId, |
| | | ou.project_no as projectNo, |
| | | ou.use_count AS inventoryQuantity, |
| | | ou.not_use_count AS availableQuantity, |
| | | mi.id, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | mi.material_code AS materialCode, |
| | | mi.producer, |
| | | mi.safety_stock AS safetyStock, |
| | | mi.total_area AS totalArea, |
| | | mi.single_piece_area singlePieceArea, |
| | | date(mi.date_of_manufacture) AS dateOfManufacture, |
| | | mi.quality_guarantee_period qualityGuaranteePeriod, |
| | | mi.inventory_area AS inventoryArea, |
| | | mi.dead_stock AS deadStock, |
| | | mi.remarks, |
| | | date(mi.create_time) AS createTime, |
| | | ms.json from pp.optimize_use ou left join mm.material_inventory mi on ou.stock_code=mi.id left join mm.material_store ms on mi.material_code=ms.id |
| | | <where> |
| | | ou.not_use_count>0 and ou.state=1 and |
| | | date(ou.create_time)>=#{startDate} and date(ou.create_time) <= #{endDate} |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialInventoryEngineeringDatePageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | pp.optimize_use ou |
| | | <where> |
| | | ou.not_use_count>0 and ou.state=1 and |
| | | date(ou.create_time)>=#{startDate} and date(ou.create_time) <= #{endDate} |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectMaterialInventory"> |
| | | select |
| | | mi.id, |
| | |
| | | <where> |
| | | <if test="materialInventory.id != null and materialInventory.id != ''"> |
| | | and mi.id regexp #{materialInventory.id} |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialInventoryEngineering"> |
| | | select |
| | | ou.id as useId, |
| | | ou.project_no as projectNo, |
| | | ou.use_count AS inventoryQuantity, |
| | | ou.not_use_count AS availableQuantity, |
| | | mi.id, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | mi.material_code AS materialCode, |
| | | mi.producer, |
| | | mi.safety_stock AS safetyStock, |
| | | mi.total_area AS totalArea, |
| | | mi.single_piece_area singlePieceArea, |
| | | date(mi.date_of_manufacture) AS dateOfManufacture, |
| | | mi.quality_guarantee_period qualityGuaranteePeriod, |
| | | mi.inventory_area AS inventoryArea, |
| | | mi.dead_stock AS deadStock, |
| | | mi.remarks, |
| | | date(mi.create_time) AS createTime, |
| | | ms.json from pp.optimize_use ou left join mm.material_inventory mi on ou.stock_code=mi.id left join mm.material_store ms on mi.material_code=ms.id |
| | | |
| | | <where> |
| | | <if test="optimizeUse.rawStockCode != null and optimizeUse.rawStockCode != ''"> |
| | | and ou.id regexp #{optimizeUse.rawStockCode} |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialInventoryEngineeringPageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | pp.optimize_use ou |
| | | <where> |
| | | <if test="optimizeUse.rawStockCode != null and optimizeUse.rawStockCode != ''"> |
| | | and ou.id regexp #{optimizeUse.rawStockCode} |
| | | </if> |
| | | |
| | | </where> |
| | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="SelectMaterialOutboundDetail" > |
| | | select |
| | | * |
| | | from mm.material_outbound_detail modd |
| | | <where> |
| | | <if test="materialOutboundDetail.materialOutboundId != null and materialOutboundDetail.materialOutboundId != ''"> |
| | | and modd.material_outbound_id regexp #{materialOutboundDetail.materialOutboundId} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialOutboundDetail" > |
| | | select |
| | | modd.use_id as useId, |
| | | modd.inventory_id as id, |
| | | modd.inventory_organization as inventoryOrganization, |
| | | modd.material_code as materialCode, |
| | |
| | | if(mo.reviewed_state!=1,modd.outbound_quantity+mi.available_quantity,mi.available_quantity) as availableQuantity, |
| | | ms.json |
| | | from mm.material_outbound_detail modd left join mm.material_inventory mi on modd.inventory_id=mi.id |
| | | left join mm.material_outbound mo on modd.material_outbound_id=mo.material_outbound_id |
| | | left join mm.material_store ms on modd.material_code=ms.id |
| | | <where> |
| | | <if test="materialOutboundDetail.materialOutboundId != null and materialOutboundDetail.materialOutboundId != ''"> |
| | | and modd.material_outbound_id regexp #{materialOutboundDetail.materialOutboundId} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialOutboundEngineering" > |
| | | select |
| | | ou.project_no as projectNo, |
| | | modd.inventory_id as id, |
| | | modd.inventory_organization as inventoryOrganization, |
| | | modd.material_code as materialCode, |
| | | modd.material_name as materialName, |
| | | modd.producer, |
| | | modd.width, |
| | | modd.height, |
| | | modd.thickness, |
| | | modd.unit, |
| | | modd.outbound_quantity as outboundQuantity, |
| | | date(modd.date_of_manufacture) as dateOfManufacture, |
| | | modd.single_piece_area as singlePieceArea, |
| | | modd.inventory_area as inventoryArea, |
| | | modd.remarks, |
| | | ou.use_count as inventoryQuantity, |
| | | if(mo.reviewed_state!=1,modd.outbound_quantity+ou.not_use_count,ou.not_use_count) as availableQuantity, |
| | | ms.json |
| | | from mm.material_outbound_detail modd left join pp.optimize_use ou on modd.use_id=ou.id |
| | | left join mm.material_outbound mo on modd.material_outbound_id=mo.material_outbound_id |
| | | left join mm.material_store ms on modd.material_code=ms.id |
| | | <where> |
| | |
| | | </insert> |
| | | |
| | | <insert id="insertMaterialOutboundDetail" useGeneratedKeys="true" > |
| | | insert into mm.material_outbound_detail (material_outbound_id,material_outbound_number,material_code,material_name,inventory_id,inventory_organization,producer,unit,width, |
| | | insert into mm.material_outbound_detail (material_outbound_id,material_outbound_number,material_code,material_name,use_id,inventory_id,inventory_organization,producer,unit,width, |
| | | height,thickness,outbound_quantity,single_piece_area,inventory_area,date_of_manufacture,remarks) |
| | | values ( |
| | | #{number} ,#{materialOutboundNumber},#{materialOutboundDetail.materialCode},#{materialOutboundDetail.materialName},#{materialOutboundDetail.id}, |
| | | #{number} ,#{materialOutboundNumber},#{materialOutboundDetail.materialCode},#{materialOutboundDetail.materialName},#{materialOutboundDetail.useId},#{materialOutboundDetail.id}, |
| | | #{materialOutboundDetail.inventoryOrganization},#{materialOutboundDetail.producer},#{materialOutboundDetail.unit}, |
| | | #{materialOutboundDetail.width},#{materialOutboundDetail.height},#{materialOutboundDetail.thickness},#{materialOutboundDetail.outboundQuantity}, |
| | | #{materialOutboundDetail.singlePieceArea},#{materialOutboundDetail.inventoryArea},#{materialOutboundDetail.dateOfManufacture},#{materialOutboundDetail.remarks} |
| | |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateMaterialInventoryAvailableOptOut"> |
| | | update pp.optimize_use |
| | | set not_use_count=not_use_count-#{quantity} |
| | | where id=#{useId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableOptInt"> |
| | | update pp.optimize_use |
| | | set not_use_count=not_use_count+#{quantity} |
| | | where id=#{useId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableOut"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity-#{quantity} |
| | |
| | | </select> |
| | | |
| | | <!-- 分架明细查询--> |
| | | <select id="detailsSelectMp" resultMap="flowCardMap"> |
| | | <select id="detailsSelectMp"> |
| | | select od.order_id, |
| | | ogd.production_id, |
| | | od.product_id, |
| | |
| | | GROUP BY order_id,order_number |
| | | ) as ogd on od.order_id=ogd.order_id and od.order_number=ogd.order_number |
| | | where od.order_id = #{orderId} and ogd.splitting_status=0 |
| | | <if test="flowCard.orderId != null and flowCard.orderId != ''"> |
| | | and od.order_id regexp #{flowCard.orderId} |
| | | </if> |
| | | <if test="flowCard.orderGlassDetail.productionId != null and flowCard.orderGlassDetail.productionId != ''"> |
| | | and ogd.production_id regexp #{flowCard.orderGlassDetail.productionId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productId != null and flowCard.orderDetail.productId != ''"> |
| | | and od.product_id regexp #{flowCard.orderDetail.productId} |
| | | </if> |
| | | <if test="flowCard.orderDetail.productName != null and flowCard.orderDetail.productName != ''"> |
| | | and od.product_name regexp #{flowCard.orderDetail.productName} |
| | | </if> |
| | | |
| | | group by od.order_id, ogd.production_id |
| | | order by od.id desc |
| | | </select> |
| | |
| | | fc.order_number, |
| | | fc.technology_number, |
| | | fc.quantity, |
| | | ogd.child_width, |
| | | ogd.child_height, |
| | | round(ogd.child_width * ogd.child_height * fc.quantity / 1000000, 2) as area, |
| | | od.product_name, |
| | | ogd.glass_child, |