Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
53个文件已修改
2 文件已重命名
13个文件已添加
| | |
| | | |
| | | # Ignore .idea files |
| | | **/.idea/ |
| | | ../idea/* |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project version="4"> |
| | | <component name="dataSourceStorageLocal" created-in="IU-232.8660.185"> |
| | | <component name="dataSourceStorageLocal" created-in="IU-232.9559.62"> |
| | | <data-source name="@localhost [2]" uuid="165c5447-d19a-4aaf-af5f-cee92ae696c2"> |
| | | <database-info product="MySQL" version="8.0.22" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.22" exact-driver-version="8.0"> |
| | | <extra-name-characters>#@</extra-name-characters> |
| | |
| | | <database-info product="MySQL" version="8.0.19" jdbc-version="4.2" driver-name="MySQL Connector/J" driver-version="mysql-connector-java-8.0.25 (Revision: 08be9e9b4cba6aa115f9b27b215887af40b159e0)" dbms="MYSQL" exact-version="8.0.19" exact-driver-version="8.0"> |
| | | <extra-name-characters>#@</extra-name-characters> |
| | | <identifier-quote-string>`</identifier-quote-string> |
| | | <jdbc-catalog-is-schema>true</jdbc-catalog-is-schema> |
| | | </database-info> |
| | | <case-sensitivity plain-identifiers="lower" quoted-identifiers="lower" /> |
| | | <secret-storage>master_key</secret-storage> |
| | |
| | | msgDeleteSuccess:'Successfully delete', |
| | | deleteConfirm:'Confirm order deletion?', |
| | | orderType:'Order Type', |
| | | processFlows:'Process flows:', |
| | | copy:'Copy', |
| | | copyTitle:'Copy Title', |
| | | msgList:{ |
| | | checkOrder:'No order information is found. Please click Order first' |
| | | } |
| | | }, |
| | | craft:{ |
| | | glassAddress:'Glass Address', |
| | |
| | | msgDeleteSuccess:'删除成功', |
| | | deleteConfirm:'确认删除订单?', |
| | | orderType:'订单类型', |
| | | processFlows:'流程卡进度', |
| | | copy:'复制订单', |
| | | copyTitle:'复制表头', |
| | | msgList:{ |
| | | checkOrder:'未查询到订单信息,请先单击订单' |
| | | } |
| | | |
| | | }, |
| | | craft:{ |
| | |
| | | import { createRouter, createWebHistory } from 'vue-router' |
| | | import {createRouter, createWebHashHistory, createWebHistory} from 'vue-router' |
| | | import HomeView from '../views/HomeView.vue' |
| | | |
| | | const router = createRouter({ |
| | | history: createWebHistory(import.meta.env.BASE_URL), |
| | | history: createWebHashHistory(), |
| | | //history: createWebHistory(import.meta.env.BASE_URL), |
| | | routes: [ |
| | | { |
| | | path: '/', |
| | |
| | | children:[ |
| | | //sd模块 |
| | | { |
| | | path:'orderBasicData', |
| | | name: 'orderBasicData', |
| | | component: () => import('../views/sd/basicData/BasicData.vue'), |
| | | children:[ |
| | | { |
| | | path: 'searchBasicData', |
| | | name: 'searchBasicData', |
| | | component: () => import('../views/sd/basicData/SearchBasicData.vue') |
| | | }, |
| | | { |
| | | name: 'OrderBasicData', |
| | | path: '', |
| | | redirect:'/main/orderBasicData/searchBasicData' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: 'product',//产品 |
| | | name: 'product', |
| | | component: () => import('../views/sd/product/Product.vue'), |
| | |
| | | } |
| | | console.log(materialStore) |
| | | if(isBool){ |
| | | request.post("/Material/saveMaterialStore", materialStore).then((res) => { |
| | | request.post("/MaterialStore/saveMaterialStore", materialStore).then((res) => { |
| | | if(res.code==200){ |
| | | resetForm() |
| | | ElMessage.success('保存成功') |
| | |
| | | } |
| | | |
| | | |
| | | onMounted(()=>{ |
| | | |
| | | |
| | | //获取传过来的数据进行判断 |
| | | const str = route.query.id |
| | | if (typeof str != 'undefined' && str != null && str !== '' && str !== '\n' && str !== '\r'){ |
| | | ruleForm.value.id = Number(str) |
| | | |
| | | request.post(`/Material/getSelectMaterialStore/1/100`,ruleForm.value).then((res) => { |
| | | request.post(`/MaterialStore/getSelectMaterialStore/1/100`,ruleForm.value).then((res) => { |
| | | if(res.code==200){ |
| | | ruleForm.value=deepClone(res.data.data[0]) |
| | | value.value=ruleForm.value.type |
| | |
| | | }) |
| | | } |
| | | |
| | | |
| | | }) |
| | | |
| | | |
| | | </script> |
| | |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {useRouter} from "vue-router"; |
| | | import GlassType from '@/components/basic/product/GlassType.vue' |
| | | import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router"; |
| | | import { useI18n } from 'vue-i18n' |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let indexFlag=$ref(1) |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | |
| | | </div> |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | <router-view :key="route.fullPath" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | let flowData = ref({ |
| | | id: row.id |
| | | }) |
| | | request.post("/Material/deleteMaterialStore",flowData.value).then((res) => { |
| | | request.post("/MaterialStore/deleteMaterialStore",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success("删除成功") |
| | | router.push({path:'/main/ingredients/SelectIngredients',query:{random:Math.random()}}) |
| | |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 2 |
| | | pageSize : 10 |
| | | }) |
| | | |
| | | let filterData = ref({ |
| | |
| | | let materialStore= ref([]) |
| | | |
| | | let arr = [ |
| | | {type:'expand',fixed:'left',slots: { content:'content' },width: '50'}, |
| | | {type:'expand',fixed:'left',slots: { content:'content' },width: '60'}, |
| | | {title: '操作', width: '110', slots: { default: 'button_slot' },fixed:'left'}, |
| | | { type: 'seq',fixed:'left', title: '自序', width: '80' }, |
| | | {field: 'id', width: '150',title: '物料编码', sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged} |
| | | ] |
| | | |
| | | /*//第一次加载默认 |
| | | //第一次加载默认 |
| | | value.value='原片' |
| | | filterData.value.type='原片' |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/${value.value}`).then((res) => { |
| | |
| | | console.log(res.data) |
| | | BasicData.value = res.data |
| | | //添加列 |
| | | gridOptions.columns=arr |
| | | gridOptions.columns=arr.slice() |
| | | |
| | | for (let i=0;i<BasicData.value.length;i++){ |
| | | let aa={field: BasicData.value[i].OperateType, width: '150',title: BasicData.value[i].OperateTypeName, sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged} |
| | | console.log(gridOptions.columns) |
| | | gridOptions.columns.push(aa) |
| | | |
| | | } |
| | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | })*/ |
| | | }) |
| | | |
| | | |
| | | //列查询 |
| | |
| | | //数据绑定 |
| | | const getWorks = () => { |
| | | console.log(filterData.value) |
| | | request.post(`/Material/getSelectMaterialStore/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | request.post(`/MaterialStore/getSelectMaterialStore/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data.data) |
| | | console.log(res.data) |
| | | materialStore.value=[] |
| | | for (let i=0;i<res.data.data.length;i++){ |
| | | materialStore.value[i]= JSON.parse(res.data.data[i].json) |
| | | materialStore.value[i].id= res.data.data[i].id |
| | | } |
| | | console.log(materialStore) |
| | | |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | |
| | | //分页查询 |
| | | const getWorkPaging = () => { |
| | | console.log(filterData.value) |
| | | request.post(`/Material/getSelectMaterialStore/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | request.post(`/MaterialStore/getSelectMaterialStore/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data.data) |
| | |
| | | materialStore.value[i]= JSON.parse(res.data.data[i].json) |
| | | materialStore.value[i].id= res.data.data[i].id |
| | | } |
| | | |
| | | |
| | | produceList = deepClone(materialStore.value) |
| | | xGrid.value.loadData(produceList) |
| | |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/${value.value}`).then((res) => { |
| | | if(res.code==200){ |
| | | gridOptions.columns.splice(0,gridOptions.columns.length) |
| | | console.log(res.data) |
| | | BasicData.value = res.data |
| | | //添加列 |
| | | gridOptions.columns=arr |
| | | gridOptions.columns=arr.slice() |
| | | |
| | | for (let i=0;i<BasicData.value.length;i++){ |
| | | let aa={field: BasicData.value[i].OperateType, width: '150',title: BasicData.value[i].OperateTypeName, sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged} |
| | | console.log(gridOptions.columns) |
| | | gridOptions.columns.push(aa) |
| | | |
| | | } |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | getWorkPaging() |
| | | |
| | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | |
| | | import: false, |
| | | /*import: false, |
| | | export: true, |
| | | print: true, |
| | | print: true,*/ |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | |
| | | <script setup> |
| | | |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | let router=useRouter() |
| | | import {onMounted, reactive, ref} from "vue"; |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {useRoute, useRouter} from "vue-router" |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import VXETable from "vxe-table"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | |
| | | const { t } = useI18n() |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | const userid = userStore.user.userId |
| | | let produceList = ref([]) |
| | | let cellArea = ref() |
| | | |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | } |
| | | } |
| | | |
| | | const hasDecimal=(value)=>{ |
| | | const regex=/\./ // 定义正则表达式,查找小数点 |
| | | return regex.test(value) //返回true/false |
| | | } |
| | | |
| | | const hasDecimalhtml=(item,row)=>{ |
| | | let aa=item.split('.').length |
| | | if (aa===2){ |
| | | return row[item.split('.')[0]][item.split('.')[1]] |
| | | }else if(aa===3){ |
| | | return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]] |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | outboundType:"" |
| | | }) |
| | | |
| | | // 定义表头上传数据 |
| | | let titleUploadData = ref({ |
| | | outboundType:'', |
| | | materialOutboundId:'', |
| | | materialRequisitionPersonnel:'', |
| | | materialRequisitionTeam:'', |
| | | orderId:'', |
| | | materialRequisitionDate:'', |
| | | reviewedState:'', |
| | | reviewed:'', |
| | | warehouseManager:userStore.user.userName |
| | | }) |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | |
| | | |
| | | }) |
| | | |
| | | let BasicData = ref([]) |
| | | let materialStore= ref([]) |
| | | |
| | | let arr = [ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '60'}, |
| | | {field: 'select',type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | {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: '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: '' } }}, |
| | | {field: 'singlePieceArea', width: '100',title: '单片面积', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'dateOfManufacture',width: '100', title: '生产日期', sortable: true}, |
| | | {field: 'inventoryArea',width: '100', title: '库存区域', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'remarks',width: '80', title: '备注', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | ] |
| | | |
| | | |
| | | //页面第一次加载 |
| | | request.get(`/BasicWarehouse/BasicWarehouseTypes/材料出库类型`).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | | const today = new Date |
| | | today.setTime(today.getTime() + (15 * 24 * 60 * 60 * 1000)) |
| | | titleUploadData.value.materialRequisitionDate = today.getFullYear() + |
| | | '-' + ("0" + (today.getMonth() + 1)).slice(-2) |
| | | + '-' + ("0" + today.getDate()).slice(-2) |
| | | getWork() |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | //列查询 |
| | | const getWork = () => { |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/原片|辅料`).then((res) => { |
| | | if(res.code==200){ |
| | | gridOptions.columns=[] |
| | | BasicData.value = res.data |
| | | //添加列 |
| | | gridOptions.columns=arr.slice() |
| | | |
| | | for (let i=0;i<BasicData.value.length;i++){ |
| | | let column={field: "json."+BasicData.value[i].OperateType, |
| | | width: '150',title: BasicData.value[i].OperateTypeName, |
| | | sortable: true,showOverflow:'ellipsis' , |
| | | filters:[{ data: '' }], |
| | | slots: { filter: 'num1_filter' }, |
| | | filterMethod:filterChanged} |
| | | |
| | | gridOptions.columns.push(column) |
| | | |
| | | } |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | const number = ref(); |
| | | |
| | | onMounted(()=>{ |
| | | //启用表格拖动选中 |
| | | addListener(xGrid.value,gridOptions,cellArea.value) |
| | | //出库新增 |
| | | const id = route.query.id |
| | | if (typeof id !== 'undefined' && id !== null && id !== '' && id !== '\n' && id !== '\r'){ |
| | | 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){ |
| | | |
| | | 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) |
| | | //第一次调用 |
| | | request.post("/MaterialInventory/getSelectMaterialOutbound/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | titleUploadData.value=deepClone(res.data.materialOutbound) |
| | | //根据审核状态显示审核按钮或者是反审按钮 |
| | | console.log(res.data.data) |
| | | if(titleUploadData.value.reviewedState!==0){ |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | |
| | | |
| | | } |
| | | if(titleUploadData.value.reviewedState===0){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } |
| | | |
| | | 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) |
| | | //隐藏复选框 |
| | | /*xGrid.value.hideColumn("select") |
| | | gridOptions.loading=false*/ |
| | | xGrid.value.showColumn("select") |
| | | gridOptions.loading=false |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | }) |
| | | |
| | | |
| | | const gridEvents = { |
| | | async toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'add': { |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | console.log(selectRecords) |
| | | if (selectRecords.length === 0) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | const errMap = await $grid.validate(selectRecords) |
| | | if (errMap) { |
| | | ElMessage.warning(t('productStock.dataVerificationFailed')) |
| | | return |
| | | } |
| | | //表头数据校验 |
| | | const outboundType = titleUploadData.value.outboundType |
| | | if(outboundType === null || outboundType === undefined || outboundType === ''){ |
| | | ElMessage.error("请选择出库类型") |
| | | return |
| | | } |
| | | const materialRequisitionPersonnel = titleUploadData.value.materialRequisitionPersonnel |
| | | if(materialRequisitionPersonnel === null || materialRequisitionPersonnel === undefined || materialRequisitionPersonnel === ''){ |
| | | ElMessage.error("请输入领料员") |
| | | return |
| | | } |
| | | const materialRequisitionTeam = titleUploadData.value.materialRequisitionTeam |
| | | if(materialRequisitionTeam === null || materialRequisitionTeam === undefined || materialRequisitionTeam === ''){ |
| | | ElMessage.error("请输入领料班组") |
| | | return |
| | | } |
| | | const orderId = titleUploadData.value.orderId |
| | | if(orderId === null || orderId === undefined || orderId === ''){ |
| | | ElMessage.error("请输入销售单号") |
| | | return |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | let flowData = ref({ |
| | | materialOutboundDetail: selectRecords, |
| | | title: titleUploadData.value, |
| | | materialOutboundId: route.query.materialOutboundId |
| | | |
| | | }) |
| | | console.log(flowData) |
| | | request.post("/MaterialInventory/saveMaterialOutbound", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success('保存成功') |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | case 'toExamine': { |
| | | let flowData = ref({ |
| | | materialOutboundId: route.query.materialOutboundId, |
| | | reviewed:userStore.user.userName, |
| | | type: 1 |
| | | |
| | | }) |
| | | console.log(flowData.value) |
| | | request.post("/MaterialInventory/updateMaterialOutboundToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('basicData.msg.ReviewSuccess')) |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | case 'CounterExamination': { |
| | | let flowData = ref({ |
| | | materialOutboundId: route.query.materialOutboundId, |
| | | type: 0 |
| | | |
| | | }) |
| | | request.post("/MaterialInventory/updateMaterialOutboundToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('basicData.msg.cancelReviewSuccess')) |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | menuClick ({ menu, row, column }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (menu.code) { |
| | | |
| | | case 'copyChecked' :{ |
| | | let result = toolbarButtonClickEvent() |
| | | if(result){ |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | let firstVal=null; |
| | | if(result.cell.indexOf('.')>-1){ |
| | | firstVal = eval("dataList["+result.start +"]."+result.cell) |
| | | }else { |
| | | firstVal=dataList[result.start][result.cell]; |
| | | } |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | if(result.cell.indexOf('.')>-1){ |
| | | const columnArr = result.cell.split('.') |
| | | item[columnArr[0]][columnArr[1]] = firstVal |
| | | }else{ |
| | | item[result.cell] = firstVal |
| | | } |
| | | |
| | | } |
| | | }) |
| | | } |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //子组件接收参数 |
| | | |
| | | const xGrid = ref(); |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '50'}, |
| | | { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | // { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | {title: '操作', width: '110', slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'MaterialCode', width: '150',title: '物料编码', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'MaterialName', width: '120',title: '物料名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'InventoryCount',width: '100', title: '库存数量', sortable: true}, |
| | | {field: 'OutNum', width:'150', title: '出库数量', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'Origin', width: '100',title: '产地', sortable: true}, |
| | | {field: 'Width', width: '80',title: '宽度', sortable: true}, |
| | | {field: 'Height',width: '100', title: '高度', sortable: true}, |
| | | {field: 'Thickness', width: '100',title: '厚度', sortable: true}, |
| | | {field: 'MainUnit',width: '100', title: '单位', sortable: true}, |
| | | {field: 'SafetyStock', width: '100',title: '单片面积', sortable: true}, |
| | | {field: 'AvailableInventory', width: '100',title: '换算率', sortable: true}, |
| | | {field: 'UnclaimedQuantity',width: '140', title: '未领取数量', sortable: true}, |
| | | {field: 'TotalArea',width: '100', title: '库区', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'ProductionDate',width: '100', title: '库位', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'ShelfLife',width: '100', title: '工程单号', sortable: true}, |
| | | {field: 'LocationNumber',width: '100', title: '生产日期', sortable: true}, |
| | | {field: 'remark',width: '80', title: '备注', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {'name': '提交',status:'primary'}, |
| | | {'name': '审核',status:'primary', 'disabled': true} |
| | | {'code': 'add', 'name': t('basicData.save'),status: 'primary',icon: 'vxe-icon-save'}, |
| | | {'code': 'toExamine', 'name': t('basicData.review'),status: 'primary'}, |
| | | {'code': 'CounterExamination', 'name': t('basicData.cancelReview'),status: 'primary'} |
| | | ], |
| | | import: false, |
| | | /*import: false, |
| | | export: true, |
| | | print: true, |
| | | print: true,*/ |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | }) |
| | | |
| | | |
| | | /*数据校验*/ |
| | | const validRules = ref({ |
| | | |
| | | outboundQuantity: [{ |
| | | validator (e) { |
| | | if (e.row.outboundQuantity > e.row.availableQuantity) { |
| | | return new Error("出库数量不能大于可用数量") |
| | | }else if (e.row.outboundQuantity ==="") { |
| | | return new Error("出库数量不能为空或者是等于0") |
| | | } |
| | | const regex = /^[1-9]\d*$/g |
| | | if ( !regex.test(e.row.outboundQuantity) ) { |
| | | return new Error(t('productStock.pleaseEnterAPositiveInteger')) |
| | | } |
| | | |
| | | } |
| | | |
| | | }] |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <el-row gutter="10" > |
| | | <el-col :span="2.5"> |
| | | <div class="label-text">领料日期</div> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-date-picker |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | style="width: 200px;height: 30px" |
| | | /> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-input v-model="productName" placeholder="请输入领料员名称" style="width: 200px; height: 30px;" /> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-input v-model="banzu" placeholder="请输入领料班组" style="width: 200px; height: 30px;" /> |
| | | </el-col> |
| | | <el-col :span="7"> |
| | | 仓管员<el-input v-model="banzu" placeholder="王翠兰" style="width: 200px; height: 30px;" /> |
| | | </el-col> |
| | | <!-- <el-col span="4">--> |
| | | <!-- <el-button id="searchButton" type="primary" :icon="Search">查询报表</el-button>--> |
| | | <!-- </el-col>--> |
| | | </el-row> |
| | | <div class="main-div"> |
| | | <div class="order-primary" style="background-color: white"> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>领料日期:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.materialRequisitionDate" :readonly="true" ></el-input></el-col> |
| | | <el-col :span="2"><el-text>领料员:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.materialRequisitionPersonnel" /></el-col> |
| | | <el-col :span="2"><el-text>领料班组:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.materialRequisitionTeam" /></el-col> |
| | | |
| | | <el-row gutter="10" > |
| | | <el-col :span="2.5"> |
| | | <div class="label-text">库存组织</div> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-dropdown> |
| | | <el-button type="primary"> |
| | | 请选择库存组织<el-icon class="el-icon--right" style="width: 66px;height: 30px"><arrow-down /></el-icon> |
| | | </el-button> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item>人工库</el-dropdown-item> |
| | | <el-dropdown-item>计划库</el-dropdown-item> |
| | | <el-dropdown-item>自动化库</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>出库类型:</el-text></el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="titleUploadData.outboundType" clearable placeholder="" > |
| | | <el-option |
| | | v-for="item in titleSelectJson['outboundType']" |
| | | :key="item.id" |
| | | :label="item.operateTypeName" |
| | | :value="item.operateTypeName" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>销售单号:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.orderId" /></el-col> |
| | | <el-col :span="2"><el-text>仓管员:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.warehouseManager" :readonly="true" /></el-col> |
| | | |
| | | <el-col :span="4"> |
| | | <el-dropdown> |
| | | <el-button type="primary"> |
| | | 请选择出库类型<el-icon class="el-icon--right" style="width:66px;"><arrow-down /></el-icon> |
| | | </el-button> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item>标准出库</el-dropdown-item> |
| | | <el-dropdown-item>补单领料</el-dropdown-item> |
| | | <el-dropdown-item>返工领料</el-dropdown-item> |
| | | </el-dropdown-menu> |
| | | </template> |
| | | </el-dropdown> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-input v-model="banzu" placeholder="请输入销售单号" style="width: 200px; height: 30px;" /> |
| | | </el-col> |
| | | <!-- <el-col span="4">--> |
| | | <!-- <el-button id="searchButton" type="primary" :icon="Search">提交</el-button>--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col span="4">--> |
| | | <!-- <el-button id="searchButton" type="primary" :icon="Search">查询报表</el-button>--> |
| | | <!-- </el-col>--> |
| | | </el-row> |
| | | </el-row> |
| | | </div> |
| | | |
| | | |
| | | |
| | | <div class="main-div-customer"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | :edit-rules="validRules" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | width: 99%; |
| | | .main-div { |
| | | width: 100%; |
| | | height: 100%; |
| | | } |
| | | .el-col{ |
| | | border: #181818 1px solid; |
| | | } |
| | | :deep(.el-input__wrapper) { |
| | | box-shadow: 0 0 0 0 var(--el-input-border-color, var(--el-border-color)) inset; |
| | | cursor: default; |
| | | border: none !important; |
| | | background-color: transparent; |
| | | } |
| | | .order-primary{ |
| | | width: 100%; |
| | | } |
| | | .main-div-customer{ |
| | | width: 100%; |
| | | height: 70%; |
| | | } |
| | | .vxe-grid { |
| | | /* 禁用浏览器默认选中 */ |
| | | -webkit-user-select: none; |
| | | -moz-user-select: none; |
| | | -ms-user-select: none; |
| | | user-select: none; |
| | | } |
| | | </style> |
| | |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {useRouter} from "vue-router"; |
| | | import GlassType from '@/components/basic/product/GlassType.vue' |
| | | import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router"; |
| | | import { useI18n } from 'vue-i18n' |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let indexFlag=$ref(1) |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | |
| | | </div> |
| | | |
| | | <div id="main-body"> |
| | | <router-view /> |
| | | <router-view :key="route.fullPath" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | let router=useRouter() |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import {toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | |
| | | const router = useRouter() |
| | | let produceList = ref([]) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/ingredientsStock/CreateOutbound', query: { id: row.id }}) |
| | | router.push({path: '/main/ingredientsStock/CreateOutbound', query: { materialOutboundId: row.materialOutboundId }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | let flowData = ref({ |
| | | materialOutboundId:row.materialOutboundId |
| | | }) |
| | | request.post("/MaterialInventory/deleteMaterialOutbound",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success(t('searchOrder.msgDeleteSuccess')) |
| | | router.push({path:'/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | return |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | const hasDecimal=(value)=>{ |
| | | const regex=/\./ // 定义正则表达式,查找小数点 |
| | | return regex.test(value) //返回true/false |
| | | } |
| | | |
| | | const hasDecimalhtml=(item,row)=>{ |
| | | let aa=item.split('.').length |
| | | if (aa===2){ |
| | | return row[item.split('.')[0]][item.split('.')[1]] |
| | | }else if(aa===3){ |
| | | return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]] |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | }) |
| | | |
| | | let filterData = ref({ |
| | | |
| | | }) |
| | | |
| | | let selectDate = ref(["",""]) |
| | | |
| | | |
| | | request.post(`/MaterialInventory/getSelectMaterialOutboundDate/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | selectDate.value = res.data.selectDate |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | 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(`/MaterialInventory/getSelectMaterialOutboundDate/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | selectDate.value = res.data.selectDate |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.post(`/MaterialInventory/getSelectMaterialOutboundDate/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | selectDate.value = res.data.selectDate |
| | | |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const changeDate = ()=>{ |
| | | selectOrderList() |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | } |
| | | |
| | | |
| | | //子组件接收参数 |
| | | |
| | | const xGrid = ref(); |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '50'}, |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '60'}, |
| | | {title: '操作', width: '110', slots: { default: 'button_slot' },fixed:"left"}, |
| | | // { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | |
| | | {title: '审核', width: 50, slots: { default: 'state' },}, |
| | | |
| | | {field: 'InventoryOrganization', width:'150', title: '库存组织', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'MaterialCode', width: '150',title: '物料编码', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'MaterialName', width: '120',title: '物料名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'InventoryCount',width: '100', title: '库存数量', sortable: true}, |
| | | {field: 'OutNum', width:'150', title: '出库数量', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'Origin', width: '100',title: '产地', sortable: true}, |
| | | {field: 'InventoryNumber',width: '100', title: '库存编号', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'Width', width: '80',title: '宽度', sortable: true}, |
| | | {field: 'Height',width: '100', title: '高度', sortable: true}, |
| | | {field: 'Thickness', width: '100',title: '厚度', sortable: true}, |
| | | {field: 'MainUnit',width: '100', title: '主单位', sortable: true}, |
| | | {field: 'SafetyStock', width: '100',title: '安全库存', sortable: true}, |
| | | {field: 'AvailableInventory', width: '100',title: '可用库存', sortable: true}, |
| | | {field: 'UnclaimedQuantity',width: '140', title: '未领取数量', sortable: true}, |
| | | {field: 'TotalArea',width: '100', title: '总面积', sortable: true}, |
| | | {field: 'ProductionDate',width: '100', title: '生产日期', sortable: true}, |
| | | {field: 'ShelfLife',width: '100', title: '保质期', sortable: true}, |
| | | {field: 'LocationNumber',width: '100', title: '库位编号', sortable: true}, |
| | | {field: 'StorageArea',width: '100', title: '存储区域', sortable: true}, |
| | | {field: 'Location',width: '100', title: '库位', sortable: true}, |
| | | {field: 'BacklogInventory',width: '100', title: '积压库存', sortable: true}, |
| | | {field: 'remark',width: '80', title: '备注', sortable: true}, |
| | | {field: 'reviewedState',title: '审核', width: 50, slots: { default: 'state' },}, |
| | | {field: 'materialOutboundId', width:'150', title: '出库单号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'materialRequisitionPersonnel', width: '150',title: '领料员', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'materialRequisitionTeam', width: '120',title: '领料班组', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderId', width:'150', title: '销售单号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'outboundType', width: '100',title: '出库类型', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'warehouseManager',width: '100', title: '仓管员', sortable: true,showOverflow:"ellipsis",filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'materialRequisitionDate', width: '80',title: '领料日期', sortable: true}, |
| | | {field: 'reviewed',width: '100', title: '审核员', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'reviewedTime', width: '100',title: '审核时间', sortable: true}, |
| | | {field: 'createTime',width: '100', title: '创建时间', sortable: true}, |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [{ |
| | | code:'add','name': '出库新增',status:'primary' |
| | | }], |
| | | import: false, |
| | | |
| | | /*import: false, |
| | | export: true, |
| | | print: true, |
| | | print: true,*/ |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | "InventoryOrganization": "人工库", |
| | | "MaterialCode": "700900000000115", |
| | | "MaterialName": "冬装170", |
| | | "Origin": "China", |
| | | "InventoryNumber": "KC2006891", |
| | | "Width": '', |
| | | "Height": "", |
| | | "Thickness": "", |
| | | "MainUnit": "件", |
| | | "SafetyStock": "5", |
| | | "InventoryCount": "20", |
| | | "AvailableInventory": "9", |
| | | "UnclaimedQuantity": "2", |
| | | "TotalArea": "0", |
| | | "ProductionDate": "2016-10-17", |
| | | "ShelfLife": "0", |
| | | "LocationNumber": "0", |
| | | "StorageArea": "0", |
| | | "Location": "0", |
| | | "BacklogInventory": "40", |
| | | "remark": "测试", |
| | | }, |
| | | { |
| | | "InventoryOrganization": "人工库", |
| | | "MaterialCode": "700900000000115", |
| | | "MaterialName": "冬装175", |
| | | "Origin": "China", |
| | | "InventoryNumber": "KC2006891", |
| | | "Width": '', |
| | | "Height": "", |
| | | "Thickness": "", |
| | | "MainUnit": "件", |
| | | "SafetyStock": "5", |
| | | "InventoryCount": "20", |
| | | "AvailableInventory": "9", |
| | | "UnclaimedQuantity": "2", |
| | | "TotalArea": "0", |
| | | "ProductionDate": "2016-10-17", |
| | | "ShelfLife": "0", |
| | | "LocationNumber": "0", |
| | | "StorageArea": "0", |
| | | "Location": "0", |
| | | "BacklogInventory": "40", |
| | | "remark": "测试", |
| | | },{ |
| | | "InventoryOrganization": "人工库", |
| | | "MaterialCode": "700900000000115", |
| | | "MaterialName": "冬装180", |
| | | "Origin": "China", |
| | | "InventoryNumber": "KC2006891", |
| | | "Width": '', |
| | | "Height": "", |
| | | "Thickness": "", |
| | | "MainUnit": "件", |
| | | "SafetyStock": "2", |
| | | "InventoryCount": "23", |
| | | "AvailableInventory": "4", |
| | | "UnclaimedQuantity": "3", |
| | | "TotalArea": "0", |
| | | "ProductionDate": "2016-10-17", |
| | | "ShelfLife": "0", |
| | | "LocationNumber": "0", |
| | | "StorageArea": "0", |
| | | "Location": "0", |
| | | "BacklogInventory": "40", |
| | | "remark": "测试", |
| | | }, |
| | | ],//table body实际数据 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | |
| | | |
| | | }) |
| | | |
| | | const xGrid = ref(); |
| | | const gridEvents = { |
| | | toolbarButtonClick({ code }) { |
| | | const $grid = xGrid.value |
| | | if($grid){ |
| | | switch (code){ |
| | | case 'add':{ |
| | | /*VXETable.modal.confirm('点击了库存调拨');*/ |
| | | router.push({path: '/main/ingredientsStock/CreateOutbound'}); |
| | | return; |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <el-date-picker |
| | | v-model="selectDate" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">查询</el-button> |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">编辑</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button> |
| | | <!-- <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">删除</el-button>--> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <template #state="{ row}"> |
| | | <el-checkbox checked/> |
| | | <template #state="{ row,column}"> |
| | | <el-checkbox @click.native.prevent :checked="row[column.field]===1"/> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | | </template> |
| | |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | let router=useRouter() |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import {toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | |
| | | const router = useRouter() |
| | | let produceList = ref([]) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/ingredientsStock/CreateOutbound', query: { id: row.id }}) |
| | | router.push({path: '/main/ingredientsStock/ReturnToStorageCreate', query: { returningId: row.returningId }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | |
| | | } |
| | | } |
| | | |
| | | const hasDecimal=(value)=>{ |
| | | const regex=/\./ // 定义正则表达式,查找小数点 |
| | | return regex.test(value) //返回true/false |
| | | } |
| | | |
| | | const hasDecimalhtml=(item,row)=>{ |
| | | let aa=item.split('.').length |
| | | if (aa===2){ |
| | | return row[item.split('.')[0]][item.split('.')[1]] |
| | | }else if(aa===3){ |
| | | return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]] |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 4 |
| | | }) |
| | | |
| | | let filterData = ref({ |
| | | |
| | | }) |
| | | |
| | | let selectDate = ref(["",""]) |
| | | |
| | | |
| | | request.post(`/MaterialInventory/getSelectReturningWarehouseDate/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | pageNum.value=1 |
| | | selectDate.value = res.data.selectDate |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | /*使用筛选,后端获取数据*/ |
| | | 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(`/MaterialInventory/getSelectReturningWarehouseDate/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | selectDate.value = res.data.selectDate |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.post(`/MaterialInventory/getSelectReturningWarehouseDate/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | selectDate.value = res.data.selectDate |
| | | |
| | | |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const changeDate = ()=>{ |
| | | selectOrderList() |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList() |
| | | } |
| | | |
| | | |
| | | const gridEvents = { |
| | | async toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'add': { |
| | | |
| | | router.push({path: '/main/ingredientsStock/ReturnToStorageCreate'}) |
| | | |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | //子组件接收参数 |
| | | |
| | | const xGrid = ref(); |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '50'}, |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '60'}, |
| | | {title: '操作', width: '110', slots: { default: 'button_slot' },fixed:"left"}, |
| | | // { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | |
| | | {title: '审核', width: 50, slots: { default: 'state' },}, |
| | | |
| | | {field: 'ReturnNum', width:'150', title: '返库编号', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'SalesNum', width: '150',title: '销售单号', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'ReturnType', width: '120',title: '返库类型', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'DocumentType',width: '100', title: '单据类型', sortable: true}, |
| | | {field: 'ProjectName', width:'150', title: '项目名称', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'MaterialCode', width: '100',title: '物料编码', sortable: true}, |
| | | {field: 'MaterialName',width: '100', title: '物料名称', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'Width', width: '80',title: '宽度', sortable: true}, |
| | | {field: 'Height',width: '100', title: '高度', sortable: true}, |
| | | {field: 'Thickness', width: '100',title: '厚度', sortable: true}, |
| | | {field: 'OriginPlace',width: '100', title: '产地', sortable: true}, |
| | | {field: 'SaveQuantity', width: '100',title: '节约数量', sortable: true}, |
| | | {field: 'Type', width: '100',title: '类型', sortable: true}, |
| | | {field: 'Supplier',width: '140', title: '领料员/供应商', sortable: true}, |
| | | {field: 'ClassGroup',width: '100', title: '班组/供应商', sortable: true}, |
| | | {field: 'WarehouseKeeper',width: '100', title: '仓管员', sortable: true}, |
| | | {field: 'Remark',width: '100', title: '备注', sortable: true}, |
| | | {field: 'MakingData',width: '100', title: '制单日期', sortable: true}, |
| | | {field: 'reviewedState',title: '审核', width: 50, slots: { default: 'state' },}, |
| | | {field: 'returningId', width:'150', title: '返库单号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'materialRequisitionPersonnel', width: '150',title: '领料员/供应商', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'materialRequisitionTeam', width: '120',title: '领料班组/供应商', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'orderId', width:'150', title: '销售单号', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'project', width:'150', title: '项目名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'batch', width:'150', title: '批次', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'returningType', width: '100',title: '返库类型', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'warehouseManager',width: '100', title: '仓管员', sortable: true,showOverflow:"ellipsis",filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'reviewed',width: '100', title: '审核员', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'reviewedTime', width: '100',title: '审核时间', sortable: true}, |
| | | {field: 'createTime',width: '100', title: '制单日期', sortable: true}, |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [{ |
| | | code:'add','name': '返库新增',status:'primary' |
| | | }], |
| | | import: false, |
| | | buttons: [ |
| | | {'code': 'add', 'name': '返库新增',status: 'primary'}, |
| | | ], |
| | | /*import: false, |
| | | export: true, |
| | | print: true, |
| | | print: true,*/ |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | "ReturnNum": "FK24010811", |
| | | "SalesNum": "运输材料破损", |
| | | "ReturnType": "采购破损", |
| | | "DocumentType": "审核", |
| | | "ProjectName": "", |
| | | "MaterialCode": "80010128003308035401530000", |
| | | "MaterialName": "白玻-3厘-制镜-优质加工级", |
| | | "Width": '3540.00', |
| | | "Height": "1530.00", |
| | | "Thickness": "3.00", |
| | | "OriginPlace": "广西南宁", |
| | | "SaveQuantity": "1.000", |
| | | "Type": "直接返库", |
| | | "Supplier": "广西南宁伏法", |
| | | "ClassGroup": "曲惠霞", |
| | | "WarehouseKeeper": "曲惠霞", |
| | | "Remark": "2401060345", |
| | | "MakingData": "2024-01-08 08:41:09", |
| | | }, |
| | | { |
| | | "ReturnNum": "FK24010811", |
| | | "SalesNum": "运输材料破损", |
| | | "ReturnType": "采购破损", |
| | | "DocumentType": "审核", |
| | | "ProjectName": "", |
| | | "MaterialCode": "80010128003308035401530000", |
| | | "MaterialName": "白玻-3厘-制镜-优质加工级", |
| | | "Width": '3540.00', |
| | | "Height": "1530.00", |
| | | "Thickness": "3.00", |
| | | "OriginPlace": "广西南宁", |
| | | "SaveQuantity": "1.000", |
| | | "Type": "直接返库", |
| | | "Supplier": "广西南宁伏法", |
| | | "ClassGroup": "曲惠霞", |
| | | "WarehouseKeeper": "曲惠霞", |
| | | "Remark": "2401060345", |
| | | "MakingData": "2024-01-08 08:41:09", |
| | | }, |
| | | { |
| | | "ReturnNum": "FK24010811", |
| | | "SalesNum": "运输材料破损", |
| | | "ReturnType": "采购破损", |
| | | "DocumentType": "审核", |
| | | "ProjectName": "", |
| | | "MaterialCode": "80010128003308035401530000", |
| | | "MaterialName": "白玻-3厘-制镜-优质加工级", |
| | | "Width": '3540.00', |
| | | "Height": "1530.00", |
| | | "Thickness": "3.00", |
| | | "OriginPlace": "广西南宁", |
| | | "SaveQuantity": "1.000", |
| | | "Type": "直接返库", |
| | | "Supplier": "广西南宁伏法", |
| | | "ClassGroup": "曲惠霞", |
| | | "WarehouseKeeper": "曲惠霞", |
| | | "Remark": "2401060345", |
| | | "MakingData": "2024-01-08 08:41:09", |
| | | }, |
| | | |
| | | ],//table body实际数据 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | |
| | | |
| | | }) |
| | | |
| | | const xGrid = ref(); |
| | | const gridEvents = { |
| | | toolbarButtonClick({ code }) { |
| | | const $grid = xGrid.value |
| | | if($grid){ |
| | | switch (code){ |
| | | case 'add':{ |
| | | /*VXETable.modal.confirm('点击了库存调拨');*/ |
| | | router.push({path: '/main/ingredientsStock/ReturnToStorageCreate'}); |
| | | return; |
| | | break |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <el-row gutter="10" > |
| | | <el-col :span="2.5"> |
| | | <div class="label-text">优化日期</div> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-date-picker |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | style="width: 200px;" |
| | | /> |
| | | </el-col> |
| | | <el-col span="4"> |
| | | <el-button id="searchButton" type="primary" :icon="Search">查询</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-date-picker |
| | | v-model="selectDate" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">查询</el-button> |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <template #state="{ row}"> |
| | | <el-checkbox checked/> |
| | | <template #state="{ row,column}"> |
| | | <el-checkbox @click.native.prevent :checked="row[column.field]===1"/> |
| | | </template> |
| | | |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | |
| | | <script setup> |
| | | import {reactive, ref} from "vue" |
| | | import {VXETable} from "vxe-table" |
| | | import {useRouter} from "vue-router" |
| | | import {onMounted, reactive, ref} from "vue"; |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import {useRoute, useRouter} from "vue-router" |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import VXETable from "vxe-table"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | |
| | | const { t } = useI18n() |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | const userStore = useUserInfoStore() |
| | | const username = userStore.user.userName |
| | | const userid = userStore.user.userId |
| | | let produceList = ref([]) |
| | | let cellArea = ref() |
| | | |
| | | |
| | | const hasDecimal=(value)=>{ |
| | | const regex=/\./ // 定义正则表达式,查找小数点 |
| | | return regex.test(value) //返回true/false |
| | | } |
| | | |
| | | const hasDecimalhtml=(item,row)=>{ |
| | | let aa=item.split('.').length |
| | | if (aa===2){ |
| | | return row[item.split('.')[0]][item.split('.')[1]] |
| | | }else if(aa===3){ |
| | | return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]] |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | returningType:"", |
| | | inventoryOrganization:"" |
| | | }) |
| | | |
| | | // 定义表头上传数据 |
| | | let titleUploadData = ref({ |
| | | returningType:'', |
| | | returningId:'', |
| | | materialRequisitionPersonnel:'', |
| | | materialRequisitionTeam:'', |
| | | orderId:'', |
| | | batch:'', |
| | | project:'', |
| | | reviewedState:'', |
| | | reviewed:'', |
| | | createTime:'', |
| | | warehouseManager:userStore.user.userName |
| | | }) |
| | | |
| | | //筛选条件,有外键需要先定义明细里面的数据 |
| | | let filterData = ref({ |
| | | |
| | | |
| | | }) |
| | | |
| | | let BasicData = ref([]) |
| | | let materialStore= ref([]) |
| | | |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: '原片', |
| | | label: '原片' |
| | | }, |
| | | { |
| | | value: '辅料', |
| | | label: '辅料', |
| | | } |
| | | ] |
| | | |
| | | let arr = [ |
| | | {field: 'select',type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | {field: 'returnQuantity', width:'150', title: '返库数量', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'dateOfManufacture', width:'150', title: '生产日期', sortable: true,editRender: {name: 'input', attrs: {placeholder: '', type: 'date'}},}, |
| | | |
| | | {field: 'inventoryOrganization', width:'150', title: '库存组织', sortable: true,folding: true,slots: { edit: 'inventoryOrganization'},editRender: { name: '$select', attrs: { placeholder: '' } }}, |
| | | {field: 'producer', width:'150', title: '产地', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'qualityGuaranteePeriod', width:'150', title: '保质期', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'inventoryArea', width:'150', title: '库存区域',sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | |
| | | {field: 'remarks',width: '80', title: '备注', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } }}, |
| | | {field: 'id', width: '150',title: '物料编码', sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged} |
| | | ] |
| | | |
| | | |
| | | |
| | | |
| | | //页面第一次加载 |
| | | request.get(`/BasicWarehouse/BasicWarehouseTypes/材料返库类型`).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | | const today = new Date |
| | | today.setTime(today.getTime() + (15 * 24 * 60 * 60 * 1000)) |
| | | titleUploadData.value.createTime = today.getFullYear() + |
| | | '-' + ("0" + (today.getMonth() + 1)).slice(-2) |
| | | + '-' + ("0" + today.getDate()).slice(-2) |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | const number = ref(); |
| | | |
| | | onMounted(()=>{ |
| | | //启用表格拖动选中 |
| | | addListener(xGrid.value,gridOptions,cellArea.value) |
| | | |
| | | |
| | | //返库编辑 |
| | | const str = route.query.returningId |
| | | if (typeof str != 'undefined' && str != null && str !== '' && str !== '\n' && str !== '\r'){ |
| | | filterData.value.returningId=str |
| | | console.log(filterData.value) |
| | | //第一次调用 |
| | | request.post("/MaterialInventory/getSelectReturningWarehouse/1/100",filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | titleUploadData.value=deepClone(res.data.returningWarehouse) |
| | | //根据审核状态显示审核按钮或者是反审按钮 |
| | | value.value='原片|辅料' |
| | | getStoreWork() |
| | | console.log(res.data) |
| | | if(titleUploadData.value.reviewedState!==0){ |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | gridOptions.toolbarConfig.buttons[0].disabled = true |
| | | |
| | | |
| | | } |
| | | if(titleUploadData.value.reviewedState===0){ |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | } |
| | | |
| | | 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) |
| | | //隐藏复选框 |
| | | /*xGrid.value.hideColumn("select") |
| | | gridOptions.loading=false*/ |
| | | xGrid.value.showColumn("select") |
| | | gridOptions.loading=false |
| | | |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | }else{ |
| | | //返库新增 |
| | | request.post(`/MaterialStore/getSelectMaterialStore/1/100`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | |
| | | console.log(res.data.data) |
| | | titleUploadData.value.warehouseManager=userStore.user.userName |
| | | titleUploadData.value.returningType = titleSelectJson.value.returningType[0].operateTypeName |
| | | |
| | | //禁用按钮 |
| | | gridOptions.toolbarConfig.buttons[1].disabled = true |
| | | gridOptions.toolbarConfig.buttons[2].disabled = true |
| | | //显示复选框 |
| | | xGrid.value.showColumn("select") |
| | | |
| | | value.value='原片' |
| | | getStoreWork() |
| | | |
| | | getStoreWorks() |
| | | getInventoryOrganization() |
| | | |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | }) |
| | | |
| | | //库存组织 |
| | | const getInventoryOrganization=()=>{ |
| | | //页面第一次加载 |
| | | request.get(`/BasicWarehouse/BasicWarehouseTypes/库存组织`).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | | // for(let i=0;i<titleSelectJson.value.inventoryOrganization.length;i++){ |
| | | // this.$set(this.produceList[i], "inventoryOrganization", titleSelectJson.value["inventoryOrganization"][i].operateTypeName); |
| | | // } |
| | | |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //列查询 |
| | | const getStoreWork = () => { |
| | | filterData.value.type=value.value |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/${value.value}`).then((res) => { |
| | | if(res.code==200){ |
| | | gridOptions.columns=[] |
| | | BasicData.value = res.data |
| | | //添加列 |
| | | gridOptions.columns=arr.slice() |
| | | |
| | | for (let i=0;i<BasicData.value.length;i++){ |
| | | let column={field: "json."+BasicData.value[i].OperateType, |
| | | width: '150',title: BasicData.value[i].OperateTypeName, |
| | | sortable: true,showOverflow:'ellipsis' , |
| | | filters:[{ data: '' }], |
| | | slots: { filter: 'num1_filter' }, |
| | | filterMethod:filterChanged} |
| | | |
| | | gridOptions.columns.push(column) |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //数据绑定 |
| | | const getStoreWorks = () => { |
| | | console.log(filterData.value) |
| | | request.post(`/MaterialStore/getSelectMaterialStore/1/100`,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)) |
| | | |
| | | } |
| | | materialStore.value.forEach(item => { |
| | | item['inventoryOrganization'] = titleSelectJson.value["inventoryOrganization"][0].operateTypeName |
| | | }) |
| | | |
| | | |
| | | produceList = deepClone(materialStore.value) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | const gridEvents = { |
| | | async toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'add': { |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | console.log(selectRecords) |
| | | if (selectRecords.length === 0) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | const errMap = await $grid.validate(selectRecords) |
| | | if (errMap) { |
| | | ElMessage.warning(t('productStock.dataVerificationFailed')) |
| | | return |
| | | } |
| | | //表头数据校验 |
| | | const returningType = titleUploadData.value.returningType |
| | | if(returningType === null || returningType === undefined || returningType === ''){ |
| | | ElMessage.error("请选择返库类型") |
| | | return |
| | | } |
| | | const materialRequisitionPersonnel = titleUploadData.value.materialRequisitionPersonnel |
| | | if(materialRequisitionPersonnel === null || materialRequisitionPersonnel === undefined || materialRequisitionPersonnel === ''){ |
| | | ElMessage.error("请输入领料员") |
| | | return |
| | | } |
| | | const materialRequisitionTeam = titleUploadData.value.materialRequisitionTeam |
| | | if(materialRequisitionTeam === null || materialRequisitionTeam === undefined || materialRequisitionTeam === ''){ |
| | | ElMessage.error("请输入领料班组") |
| | | return |
| | | } |
| | | const orderId = titleUploadData.value.orderId |
| | | if(orderId === null || orderId === undefined || orderId === ''){ |
| | | ElMessage.error("请输入销售单号") |
| | | return |
| | | } |
| | | const project = titleUploadData.value.project |
| | | if(project === null || project === undefined || project === ''){ |
| | | ElMessage.error("请输入项目名称") |
| | | return |
| | | } |
| | | const batch = titleUploadData.value.batch |
| | | if(batch === null || batch === undefined || batch === ''){ |
| | | ElMessage.error("请输入批次") |
| | | return |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | let flowData = ref({ |
| | | returningWarehouseDetail: selectRecords, |
| | | title: titleUploadData.value, |
| | | returningId: route.query.returningId |
| | | |
| | | }) |
| | | console.log(flowData) |
| | | request.post("/MaterialInventory/saveReturningWarehouse", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success('保存成功') |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | case 'toExamine': { |
| | | let flowData = ref({ |
| | | returningId: route.query.returningId, |
| | | reviewed:userStore.user.userName, |
| | | type: 1 |
| | | |
| | | }) |
| | | console.log(flowData.value) |
| | | request.post("/MaterialInventory/updateReturningWarehouseToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('basicData.msg.ReviewSuccess')) |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | case 'CounterExamination': { |
| | | let flowData = ref({ |
| | | returningId: route.query.returningId, |
| | | type: 0 |
| | | |
| | | }) |
| | | console.log(flowData.value) |
| | | request.post("/MaterialInventory/updateReturningWarehouseToExamine", flowData.value).then((res) => { |
| | | if (res.code == 200) { |
| | | ElMessage.success(t('basicData.msg.cancelReviewSuccess')) |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | menuClick ({ menu, row, column }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (menu.code) { |
| | | |
| | | case 'copyChecked' :{ |
| | | let result = toolbarButtonClickEvent() |
| | | if(result){ |
| | | const dataList = xGrid.value.getTableData().visibleData |
| | | let firstVal=null; |
| | | if(result.cell.indexOf('.')>-1){ |
| | | firstVal = eval("dataList["+result.start +"]."+result.cell) |
| | | }else { |
| | | firstVal=dataList[result.start][result.cell]; |
| | | } |
| | | dataList.forEach((item,index) =>{ |
| | | if(index>=result.start && index<=result.end){ |
| | | if(result.cell.indexOf('.')>-1){ |
| | | const columnArr = result.cell.split('.') |
| | | item[columnArr[0]][columnArr[1]] = firstVal |
| | | }else{ |
| | | item[result.cell] = firstVal |
| | | } |
| | | |
| | | } |
| | | }) |
| | | } |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type: 'seq',fixed:"left", title: '自序', width: 80 }, |
| | | {field: 'orderID',width:120, title: '物料编码',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '物料名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '产地',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '宽度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '高度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '厚度',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '库存编号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '等级',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '面积',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '换算率',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '未领数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '返库数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '总数量',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '库区',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '库位',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '工程单号',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '生产日期',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderID',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {'code': 'add', 'name': t('basicData.save'),status: 'primary',icon: 'vxe-icon-save'}, |
| | | {'code': 'toExamine', 'name': t('basicData.review'),status: 'primary'}, |
| | | {'code': 'CounterExamination', 'name': t('basicData.cancelReview'),status: 'primary'} |
| | | ], |
| | | import: false, |
| | | /*import: false, |
| | | export: true, |
| | | print: true, |
| | | print: true,*/ |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | |
| | | }) |
| | | |
| | | const gridEvents = { |
| | | toolbarButtonClick ({ code }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'Craft': { |
| | | router.push({path: '/main/order/updateOrderCraft', query: { orderID: 12123 }}) |
| | | break |
| | | } |
| | | const validRules = ref({ |
| | | |
| | | returnQuantity: [{ |
| | | validator (e) { |
| | | if (e.row.returnQuantity ==="") { |
| | | return new Error("返库数量不能为空或者是等于0") |
| | | } |
| | | const regex = /^[1-9]\d*$/g |
| | | if ( !regex.test(e.row.returnQuantity) ) { |
| | | return new Error(t('productStock.pleaseEnterAPositiveInteger')) |
| | | } |
| | | |
| | | } |
| | | } |
| | | } |
| | | |
| | | }] |
| | | |
| | | }) |
| | | |
| | | </script> |
| | | |
| | |
| | | |
| | | <div class="order-primary" style="background-color: white"> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>交货日期:</el-text></el-col> |
| | | <el-col :span="4"> |
| | | <el-date-picker |
| | | type="week" |
| | | format="[Week] ww" |
| | | placeholder="选择日期"/> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>*退料员/供应商:</el-text></el-col> |
| | | <el-col :span="4"><el-input/></el-col> |
| | | <el-col :span="2"><el-text>*退料班组:</el-text></el-col> |
| | | <el-col :span="4"> |
| | | <el-select clearable placeholder=" " > |
| | | <el-option/> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>*制单员:</el-text></el-col> |
| | | <el-col :span="4"> |
| | | <el-select clearable placeholder=" " > |
| | | <el-option /> |
| | | </el-select> |
| | | </el-col> |
| | | |
| | | <!-- <el-col :span="2"><el-text /></el-col>--> |
| | | <el-col :span="2"><el-text>返库日期:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.createTime" :readonly="true" ></el-input></el-col> |
| | | <el-col :span="2"><el-text>领料员/供应商:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.materialRequisitionPersonnel" /></el-col> |
| | | <el-col :span="2"><el-text>领料班组/供应商:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.materialRequisitionTeam" /></el-col> |
| | | <el-col :span="2"><el-text>仓管员:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.warehouseManager" :readonly="true" /></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>*出库类型:</el-text></el-col> |
| | | <el-col :span="4"> |
| | | <el-select clearable placeholder=" " > |
| | | <el-option/> |
| | | <el-col :span="2"><el-text>返库类型:</el-text></el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="titleUploadData.returningType" clearable placeholder="" > |
| | | <el-option |
| | | v-for="item in titleSelectJson['returningType']" |
| | | :key="item.id" |
| | | :label="item.operateTypeName" |
| | | :value="item.operateTypeName" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>订单编号:</el-text></el-col> |
| | | <el-col :span="4"><el-text /></el-col> |
| | | <el-col :span="2"><el-text>项目名称:</el-text></el-col> |
| | | <el-col :span="4"><el-text /></el-col> |
| | | <el-col :span="2"><el-text>批次号:</el-text></el-col> |
| | | <el-col :span="4"><el-text /></el-col> |
| | | <el-col :span="2"><el-text>销售单号:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.orderId" /></el-col> |
| | | <el-col :span="2"><el-text>项目名称:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.project" /></el-col> |
| | | <el-col :span="2"><el-text>批次:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.batch" /></el-col> |
| | | |
| | | |
| | | </el-row> |
| | | |
| | | |
| | | <el-row> |
| | | <el-select v-model="value" placeholder="请选择类别" @change="getStoreWork" style="margin-top: 10px;border: #181818 1px solid;"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-row> |
| | | </div> |
| | | |
| | | |
| | | <div class="order-detail"> |
| | | |
| | | <vxe-grid |
| | | max-height="97%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | :edit-rules="validRules" |
| | | > |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <template #inventoryOrganization="{ row }"> |
| | | <vxe-select v-model="row.inventoryOrganization" transfer > |
| | | <vxe-option v-for="item in titleSelectJson['inventoryOrganization']" :key="item.ID" :label="item.operateTypeName" :value="item.operateTypeName"/> |
| | | </vxe-select> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | <el-row justify="center"> |
| | | <el-button id="searchButton" type="primary" :icon="Search" style="margin-right:20px;">清除</el-button> |
| | | <el-button id="searchButton" type="primary" :icon="save" style="margin-left:20px;">确定</el-button> |
| | | </el-row> |
| | | </div> |
| | | </div> |
| | | </template> |
| | |
| | | <script setup> |
| | | |
| | | import {reactive} from "vue"; |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | let router=useRouter() |
| | | import request from "@/utils/request"; |
| | | import deepClone from "@/utils/deepClone"; |
| | | import useUserInfoStore from "@/stores/userInfo"; |
| | | import {ElMessage} from "element-plus"; |
| | | import {Search} from "@element-plus/icons-vue"; |
| | | import { useI18n } from 'vue-i18n' |
| | | import {toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | |
| | | const router = useRouter() |
| | | let produceList = ref([]) |
| | | let produceLists = ref([]) |
| | | let dialogTableVisible = ref(false) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | |
| | | } |
| | | } |
| | | |
| | | const hasDecimal=(value)=>{ |
| | | const regex=/\./ // 定义正则表达式,查找小数点 |
| | | return regex.test(value) //返回true/false |
| | | } |
| | | |
| | | const hasDecimalhtml=(item,row)=>{ |
| | | let aa=item.split('.').length |
| | | if (aa===2){ |
| | | return row[item.split('.')[0]][item.split('.')[1]] |
| | | }else if(aa===3){ |
| | | return row[item.split('.')[0]][item.split('.')[1]][item.split('.')[2]] |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 10 |
| | | }) |
| | | |
| | | let filterData = ref({ |
| | | |
| | | }) |
| | | |
| | | let selectDate = ref(["",""]) |
| | | let BasicData = ref([]) |
| | | let materialStore= ref([]) |
| | | |
| | | |
| | | let arr = [ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '60'}, |
| | | { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | {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: 'id',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}, |
| | | {field: 'totalArea',width: '100', title: '总面积', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'dateOfManufacture',width: '100', title: '生产日期', sortable: true}, |
| | | {field: 'qualityGuaranteePeriod',width: '100', title: '保质期', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'inventoryArea',width: '100', title: '库存区域', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | //{field: 'deadStock',width: '100', title: '积压库存', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'createTime',width: '100', title: '入库时间', sortable: true}, |
| | | {field: 'remarks',width: '80', title: '备注', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | ] |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/原片|辅料`).then((res) => { |
| | | if(res.code==200){ |
| | | gridOptions.columns.splice(0,gridOptions.columns.length) |
| | | BasicData.value = res.data |
| | | //添加列 |
| | | gridOptions.columns=arr.slice() |
| | | |
| | | for (let i=0;i<BasicData.value.length;i++){ |
| | | let aa={field: "json."+BasicData.value[i].OperateType, width: '150',title: BasicData.value[i].OperateTypeName, sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged} |
| | | gridOptions.columns.push(aa) |
| | | |
| | | } |
| | | getInventoryWorks() |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | const getInventoryWorks = () => { |
| | | request.post(`/MaterialInventory/getSelectMaterialInventoryDate/1/${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 getInventoryWorkPaging = () => { |
| | | console.log(filterData.value) |
| | | request.post(`/MaterialInventory/getSelectMaterialInventoryDate/${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)) |
| | | } |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | produceList = deepClone(materialStore.value) |
| | | selectDate.value = res.data.selectDate |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/原片|辅料`).then((res) => { |
| | | if(res.code==200){ |
| | | gridOptions.columns.splice(0,gridOptions.columns.length) |
| | | BasicData.value = res.data |
| | | //添加列 |
| | | gridOptions.columns=arr.slice() |
| | | |
| | | for (let i=0;i<BasicData.value.length;i++){ |
| | | let aa={field: "json."+BasicData.value[i].OperateType, width: '150',title: BasicData.value[i].OperateTypeName, sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged} |
| | | gridOptions.columns.push(aa) |
| | | |
| | | } |
| | | getInventoryWorkPaging() |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const changeDate = ()=>{ |
| | | selectOrderList() |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | selectOrderList() |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | } |
| | | |
| | | |
| | | |
| | | //子组件接收参数 |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: '50'}, |
| | | // { type: 'checkbox',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | // {title: '操作', width: '110', slots: { default: 'button_slot' },fixed:"left"}, |
| | | {field: 'InventoryOrganization', width:'150', title: '库存组织', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'MaterialCode', width: '150',title: '物料编码', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'MaterialName', width: '120',title: '物料名称', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'Origin', width: '100',title: '产地', sortable: true}, |
| | | {field: 'InventoryNumber',width: '100', title: '库存编号', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'Width', width: '80',title: '宽度', sortable: true}, |
| | | {field: 'Height',width: '100', title: '高度', sortable: true}, |
| | | {field: 'Thickness', width: '100',title: '厚度', sortable: true}, |
| | | {field: 'MainUnit',width: '100', title: '主单位', sortable: true}, |
| | | {field: 'SafetyStock', width: '100',title: '安全库存', sortable: true}, |
| | | {field: 'InventoryCount',width: '100', title: '库存数量', sortable: true}, |
| | | {field: 'AvailableInventory', width: '100',title: '可用库存', sortable: true}, |
| | | {field: 'UnclaimedQuantity',width: '140', title: '未领取数量', sortable: true}, |
| | | {field: 'TotalArea',width: '100', title: '总面积', sortable: true}, |
| | | {field: 'ProductionDate',width: '100', title: '生产日期', sortable: true}, |
| | | {field: 'ShelfLife',width: '100', title: '保质期', sortable: true}, |
| | | {field: 'LocationNumber',width: '100', title: '库位编号', sortable: true}, |
| | | {field: 'StorageArea',width: '100', title: '存储区域', sortable: true}, |
| | | {field: 'Location',width: '100', title: '库位', sortable: true}, |
| | | {field: 'BacklogInventory',width: '100', title: '积压库存', sortable: true}, |
| | | {field: 'remark',width: '80', title: '备注', sortable: true}, |
| | | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | // buttons: [{ |
| | | // 'name': '新增' |
| | | // }], |
| | | import: false, |
| | | buttons: [ |
| | | {'code': 'out', 'name': '物料出库',status: 'primary'}, |
| | | {'code': 'add', 'name': '物料新增',status: 'primary'}, |
| | | ], |
| | | /*import: false, |
| | | export: true, |
| | | print: true, |
| | | print: true,*/ |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | "InventoryOrganization": "人工库", |
| | | "MaterialCode": "700900000000115", |
| | | "MaterialName": "冬装170", |
| | | "Origin": "China", |
| | | "InventoryNumber": "KC2006891", |
| | | "Width": '', |
| | | "Height": "", |
| | | "Thickness": "", |
| | | "MainUnit": "件", |
| | | "SafetyStock": "5", |
| | | "InventoryCount": "20", |
| | | "AvailableInventory": "9", |
| | | "UnclaimedQuantity": "2", |
| | | "TotalArea": "0", |
| | | "ProductionDate": "2016-10-17", |
| | | "ShelfLife": "0", |
| | | "LocationNumber": "0", |
| | | "StorageArea": "0", |
| | | "Location": "0", |
| | | "BacklogInventory": "40", |
| | | "remark": "测试", |
| | | }, |
| | | { |
| | | "InventoryOrganization": "人工库", |
| | | "MaterialCode": "700900000000115", |
| | | "MaterialName": "冬装175", |
| | | "Origin": "China", |
| | | "InventoryNumber": "KC2006891", |
| | | "Width": '', |
| | | "Height": "", |
| | | "Thickness": "", |
| | | "MainUnit": "件", |
| | | "SafetyStock": "5", |
| | | "InventoryCount": "20", |
| | | "AvailableInventory": "9", |
| | | "UnclaimedQuantity": "2", |
| | | "TotalArea": "0", |
| | | "ProductionDate": "2016-10-17", |
| | | "ShelfLife": "0", |
| | | "LocationNumber": "0", |
| | | "StorageArea": "0", |
| | | "Location": "0", |
| | | "BacklogInventory": "40", |
| | | "remark": "测试", |
| | | },{ |
| | | "InventoryOrganization": "人工库", |
| | | "MaterialCode": "700900000000115", |
| | | "MaterialName": "冬装180", |
| | | "Origin": "China", |
| | | "InventoryNumber": "KC2006891", |
| | | "Width": '', |
| | | "Height": "", |
| | | "Thickness": "", |
| | | "MainUnit": "件", |
| | | "SafetyStock": "2", |
| | | "InventoryCount": "23", |
| | | "AvailableInventory": "4", |
| | | "UnclaimedQuantity": "3", |
| | | "TotalArea": "0", |
| | | "ProductionDate": "2016-10-17", |
| | | "ShelfLife": "0", |
| | | "LocationNumber": "0", |
| | | "StorageArea": "0", |
| | | "Location": "0", |
| | | "BacklogInventory": "40", |
| | | "remark": "测试", |
| | | }, |
| | | ],//table body实际数据 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | |
| | | }) |
| | | |
| | | |
| | | const gridEvents = { |
| | | async toolbarButtonClick({code}) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'out': { |
| | | const selectRecords = $grid.getCheckboxRecords() |
| | | |
| | | |
| | | if (selectRecords.length === 0) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | let id = "" |
| | | const array = []; |
| | | for (let i = 0; i < selectRecords.length; i++) { |
| | | array.push(selectRecords[i].id) |
| | | if (i + 1 === selectRecords.length) { |
| | | id += selectRecords[i].id |
| | | } else { |
| | | id += selectRecords[i].id + "|" |
| | | } |
| | | } |
| | | |
| | | router.push({path: '/main/ingredientsStock/CreateOutbound', query: {id: id}}) |
| | | break |
| | | |
| | | |
| | | } |
| | | case 'add': { |
| | | dialogTableVisible.value=true |
| | | select() |
| | | //第一次加载默认 |
| | | value.value='原片' |
| | | filterData.value.type='原片' |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/${value.value}`).then((res) => { |
| | | if(res.code==200){ |
| | | gridOption.columns.splice(0,gridOption.columns.length) |
| | | console.log(res.data) |
| | | BasicData.value = res.data |
| | | //添加列 |
| | | gridOption.columns=arr.slice() |
| | | |
| | | for (let i=0;i<BasicData.value.length;i++){ |
| | | let aa={field: BasicData.value[i].OperateType, width: '150',title: BasicData.value[i].OperateTypeName, sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged} |
| | | gridOption.columns.push(aa) |
| | | |
| | | } |
| | | getStoreWork() |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | break |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | let arrs = [ |
| | | { type: 'radio',fixed:"left", title: '选择', width: '80' }, |
| | | { type: 'seq',fixed:'left', title: '自序', width: '80' }, |
| | | {field: 'id', width: '150',title: '物料编码', sortable: true,showOverflow:'ellipsis' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged} |
| | | ] |
| | | |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: '原片', |
| | | label: '原片' |
| | | }, |
| | | { |
| | | value: '辅料', |
| | | label: '辅料', |
| | | } |
| | | ] |
| | | |
| | | let filterDatas = ref({ |
| | | type:'' |
| | | |
| | | }) |
| | | let BasicDatas = ref([]) |
| | | let materialStores= ref([]) |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | inventoryOrganization:"" |
| | | }) |
| | | |
| | | // 定义表头上传数据 |
| | | let titleUploadData = ref({ |
| | | producer:'', |
| | | dateOfManufacture:'', |
| | | qualityGuaranteePeriod:'', |
| | | inventoryOrganization:'', |
| | | inventoryArea:'', |
| | | inventoryQuantity:'', |
| | | remarks:'' |
| | | }) |
| | | |
| | | |
| | | |
| | | //物料新增 |
| | | const xGrids = ref() |
| | | const gridOption = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 50},//鼠标移动或选择高亮 |
| | | id: 'CustomerList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | //remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {'code': 'add', 'name': t('basicData.save'),status: 'primary',icon: 'vxe-icon-save'}, |
| | | ], |
| | | } |
| | | |
| | | }) |
| | | |
| | | const select=() =>{ |
| | | request.get(`/BasicWarehouse/BasicWarehouseTypes/库存组织`).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | | titleUploadData.value.inventoryOrganization=titleSelectJson.value.inventoryOrganization[0].operateTypeName |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //列查询 |
| | | const getStoreWork = () => { |
| | | filterDatas.value.type=value.value |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/${value.value}`).then((res) => { |
| | | if(res.code==200){ |
| | | gridOption.columns=[] |
| | | BasicData.value = res.data |
| | | //添加列 |
| | | gridOption.columns=arrs.slice() |
| | | |
| | | for (let i=0;i<BasicData.value.length;i++){ |
| | | let column={field: BasicData.value[i].OperateType, |
| | | width: '150',title: BasicData.value[i].OperateTypeName, |
| | | sortable: true,showOverflow:'ellipsis' , |
| | | filters:[{ data: '' }], |
| | | slots: { filter: 'num1_filter' }, |
| | | filterMethod:filterChanged} |
| | | |
| | | gridOption.columns.push(column) |
| | | |
| | | } |
| | | getStoreWorks() |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //数据绑定 |
| | | const getStoreWorks = () => { |
| | | console.log(filterDatas.value) |
| | | request.post(`/MaterialStore/getSelectMaterialStore/1/${total.pageSize}`,filterDatas.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data) |
| | | materialStores.value=[] |
| | | for (let i=0;i<res.data.data.length;i++){ |
| | | materialStores.value[i]=JSON.parse(res.data.data[i].json) |
| | | materialStores.value[i].id=(res.data.data[i].id) |
| | | |
| | | } |
| | | |
| | | |
| | | produceLists = deepClone(materialStores.value) |
| | | xGrids.value.loadData(produceLists) |
| | | gridOption.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | const gridEvent = { |
| | | async toolbarButtonClick({code}) { |
| | | const $grid = xGrids.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'add': { |
| | | const selectRecords = $grid.getRadioRecord() |
| | | console.log(selectRecords) |
| | | if (selectRecords == null) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | const errMap = await $grid.validate(selectRecords) |
| | | if (errMap) { |
| | | ElMessage.warning(t('productStock.dataVerificationFailed')) |
| | | return |
| | | } |
| | | //表头数据校验 |
| | | const outboundType = titleUploadData.value.inventoryOrganization |
| | | if(outboundType === null || outboundType === undefined || outboundType === ''){ |
| | | ElMessage.error("请选择库存组织") |
| | | return |
| | | } |
| | | const materialRequisitionPersonnel = titleUploadData.value.inventoryQuantity |
| | | if(materialRequisitionPersonnel === null || materialRequisitionPersonnel === undefined || materialRequisitionPersonnel === ''){ |
| | | ElMessage.error("请输入数量") |
| | | return |
| | | } |
| | | const dateOfManufacture= titleUploadData.value.dateOfManufacture |
| | | if(dateOfManufacture === null || dateOfManufacture === undefined || dateOfManufacture === ''){ |
| | | titleUploadData.value.dateOfManufacture=null |
| | | } |
| | | |
| | | const inventoryArea = titleUploadData.value.inventoryArea |
| | | if(inventoryArea === null || inventoryArea === undefined || inventoryArea === ''){ |
| | | ElMessage.error("请输入库存区域") |
| | | return |
| | | } |
| | | |
| | | |
| | | let flowData = ref({ |
| | | totalArea: selectRecords.height*selectRecords.width/100000*titleUploadData.value.inventoryQuantity, |
| | | singlePieceArea: selectRecords.height*selectRecords.width/100000, |
| | | title: titleUploadData.value, |
| | | materialCode: selectRecords.id |
| | | |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | | console.log(flowData) |
| | | request.post("/MaterialInventory/saveMaterialInventory", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success('保存成功') |
| | | router.push({path: '/main/ingredientsStock/SelectIngredientsStock', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <el-date-picker |
| | | v-model="selectDate" |
| | | type="daterange" |
| | | start-placeholder="开始时间" |
| | | end-placeholder="结束时间" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">查询</el-button> |
| | | |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | |
| | | <ul class="expand-wrapper"> |
| | | <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined "> |
| | | <span style="font-weight: bold">{{item.title+': '}}</span> |
| | | <span>{{ row[item.field] }}</span> |
| | | <span v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <template #pager> |
| | | <!--使用 pager 插槽--> |
| | | <vxe-pager |
| | | @page-change="handlePageChange" |
| | | :layouts="[ 'PrevPage', 'Jump','PageCount', 'NextPage', 'Total']" |
| | | v-model:current-page="pageNum" |
| | | v-model:page-size="total.pageSize" |
| | | v-model:pager-count="total.pageTotal" |
| | | :total="total.dataTotal" |
| | | > |
| | | </vxe-pager> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | |
| | | <el-dialog v-model="dialogTableVisible" title="物料新增" style="width: 70%;height:75% "> |
| | | <div class="order-primary" > |
| | | <el-row> |
| | | <el-col :span="2"><el-text>生产日期:</el-text></el-col> |
| | | <el-col :span="4"> |
| | | <el-date-picker |
| | | v-model="titleUploadData.dateOfManufacture" |
| | | type="date" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | placeholder="请选择生产日期"/> |
| | | </el-col> |
| | | |
| | | <el-col :span="2"><el-text>保质期:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.qualityGuaranteePeriod" /></el-col> |
| | | <el-col :span="1"><el-text>产地:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.producer" /></el-col> |
| | | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>库存组织:</el-text></el-col> |
| | | <el-col :span="4"> |
| | | <el-select v-model="titleUploadData.inventoryOrganization" clearable placeholder="" > |
| | | <el-option |
| | | v-for="item in titleSelectJson['inventoryOrganization']" |
| | | :key="item.id" |
| | | :label="item.operateTypeName" |
| | | :value="item.operateTypeName" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-col :span="2"><el-text>库存区域:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.inventoryArea" /></el-col> |
| | | <el-col :span="1"><el-text>数量:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.inventoryQuantity" /></el-col> |
| | | <el-col :span="1"><el-text>备注:</el-text></el-col> |
| | | <el-col :span="3"><el-input v-model="titleUploadData.remarks" /></el-col> |
| | | |
| | | </el-row> |
| | | </div> |
| | | <div> |
| | | <el-row> |
| | | <el-select v-model="value" placeholder="请选择类别" @change="getStoreWork"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-row> |
| | | </div> |
| | | <div class="main-div-customers"> |
| | | <vxe-grid |
| | | height="400px" |
| | | class="mytable-scrollbar" |
| | | ref="xGrids" |
| | | v-bind="gridOption" |
| | | v-on="gridEvent" |
| | | |
| | | > |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | </vxe-grid> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | .main-div-customers{ |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | .el-col{ |
| | | margin-left: 15px; |
| | | margin-bottom: 5px; |
| | | } |
| | | .order-primary{ |
| | | width: 100%; |
| | | } |
| | | </style> |
| | |
| | | request.post(`/FinishedGoodsInventory/getSelectAllocate/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | request.post(`/FinishedGoodsInventory/getSelectDeliveryDetail/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | request.post(`/FinishedGoodsInventory/getSelectAllocate/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | request.post(`/FinishedGoodsInventory/getSelectAllocate/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | request.post(`/FinishedGoodsInventory/getSelect/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | const selectOrderList = ()=>{ |
| | | request.post(`/FinishedGoodsInventory/getSelectOperateRecord/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | selectDate.value = res.data.selectDate |
| | | |
| | | pageNum.value=1 |
| | |
| | | request.post(`/FinishedGoodsInventory/getSelectStorageRecord/${pageNum.value}/${total.pageSize}/${selectDate.value}/${type.value}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | selectDate.value = res.data.selectDate |
| | | |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | |
| | | selectDate.value = res.data.selectDate |
| | | |
| | | pageNum.value=1 |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | request.post(`/FinishedGoodsInventory/getSelectAllocateFinishedOperateLog/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | selectDate.value = res.data.selectDate |
| | | pageNum.value=1 |
| | | produceList = deepClone(res.data.data) |
| | |
| | | const selectOrderList = ()=>{ |
| | | request.post(`/Replenish/SelectReplenish/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | selectDate.value = res.data.selectDate |
| | | |
| | | produceList = deepClone(res.data.data) |
| | |
| | | <script setup> |
| | | |
| | | 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 useUserInfoStore from "@/stores/userInfo"; |
| | | import {changeFilterEvent, filterChanged} from "@/hook" |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | |
| | | import { useI18n } from 'vue-i18n' |
| | | //语言获取 |
| | | const { t } = useI18n() |
| | | let router=useRouter() |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/reportingWorks/ReportingWorkDetail', query: { id: row.id }}) |
| | | break |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | } |
| | | case 'setType':{ |
| | | alert('我接收到子组件传送的反审状态') |
| | | break |
| | | } |
| | | |
| | | let props = defineProps({ |
| | | orderId:null |
| | | }) |
| | | onMounted(()=>{ |
| | | if(props.orderId===null || props.orderId===undefined || props.orderId===''){ |
| | | return |
| | | } |
| | | } |
| | | form.orderId = props.orderId |
| | | getWorkOrder() |
| | | }) |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | |
| | | computeGrossArea: '', |
| | | processingNote: '', |
| | | } |
| | | |
| | | }) |
| | | |
| | | |
| | | const columns = [ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {field: 'product_name', width: 150, title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'glass_child',width: 130, title: '单片名称' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'order_type', width: 120,title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'process_id',width: 110, title: '流程卡号',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: 'technology_number', width: 90,title: '标记',showOverflow:"ellipsis"}, |
| | | {field: 'quantity', width: 90,title: '数量'}, |
| | | {field: 'broken_num',width: 90, title: '次破数量'}, |
| | | {field: 'inventoryArea',width: 120, title: '入库面积'}, |
| | | ] |
| | | //需要合并的列 |
| | | let column = [1,3,8] |
| | | //点击查询 |
| | | const getWorkOrder = () => { |
| | | let inputVal = form.orderId |
| | | |
| | | request.post(`/processCard/flowCard/${inputVal}`, filterData.value).then((res) => { |
| | | request.post(`/report/processCardProgress/${form.orderId}`,column).then((res) => { |
| | | if (res.code == 200) { |
| | | |
| | | pageTotal.value = res.data.total |
| | | if(res.data.data.length===0){ |
| | | ElMessage.warning('未查询到此订单流程卡数据') |
| | | return |
| | | } |
| | | gridOptions.columns = JSON.parse(JSON.stringify(columns)) |
| | | res.data.title.forEach(item =>{ |
| | | let column = {slots: { default: 'quantitySum' }, width: 90,title: item.process} |
| | | gridOptions.columns.push(column) |
| | | }) |
| | | res.data.data.forEach(item => { |
| | | item.reportWorkQuantity=JSON.parse(item.reportWorkQuantity) |
| | | item.reportWorkQuantityCount=JSON.parse(item.reportWorkQuantityCount) |
| | | }) |
| | | mergeCells.value = res.data.mergeCell |
| | | console.log(res.data.title) |
| | | xGrid.value.loadData(res.data.data) |
| | | gridOptions.loading = false |
| | | } else { |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | const quantitySum = ( row,column )=>{ |
| | | const reportWorkQuantity = row.reportWorkQuantity[column.title] || 0 |
| | | const reportWorkQuantityCount = row.reportWorkQuantityCount[column.title] || 0 |
| | | if(reportWorkQuantity===reportWorkQuantityCount){ |
| | | return reportWorkQuantity |
| | | } |
| | | |
| | | return (reportWorkQuantity |
| | | +'(' |
| | | +reportWorkQuantityCount |
| | | +')' ) |
| | | //return |
| | | } |
| | | |
| | | |
| | |
| | | return regex.test(value); // 返回true/false |
| | | } |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | columns:[ |
| | | {type:'expand',fixed:"left",slots: { content:'content' },width: 50}, |
| | | {field: '1', width: 150, title: '产品名称',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: '2',width: 130, title: '单片名称' ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: '3', width: 120,title: '订单类型',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: '4',width: 110, title: '流程卡号',filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged}, |
| | | {field: '5', width: 90,title: '标记',showOverflow:"ellipsis"}, |
| | | {field: '6', width: 90,title: '数量'}, |
| | | {field: '7',width: 90, title: '次破数量'}, |
| | | |
| | | {field: '8',width: 120, title: '切割'}, |
| | | {field: '9',width: 120, title: '磨边'}, |
| | | {field: '10',width: 120, title: '钢化'}, |
| | | {field: '11',width: 120, title: '入库面积'}, |
| | | ],//表头按钮 |
| | | columns:[],//表头按钮 |
| | | |
| | | toolbarConfig: { |
| | | // buttons: [{ |
| | | // |
| | | // }], |
| | | import: false, |
| | | export: true, |
| | | print: true, |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | |
| | | }) |
| | | |
| | | const mergeCells = ref([ |
| | | { row: 0, col: 1, rowspan: 3, colspan: 0}, |
| | | { row: 3, col: 1, rowspan: 3, colspan: 0}, |
| | | |
| | | { row: 0, col: 6, rowspan: 3, colspan: 0}, |
| | | { row: 3, col: 6, rowspan: 3, colspan: 0}, |
| | | |
| | | ]) |
| | | |
| | |
| | | <div class="main-div-customer" > |
| | | <div id="selectForm"> |
| | | <el-row :gutter="0"> |
| | | <el-input v-model="form.orderId" clearable :placeholder="$t('order.orderId')" style="width: 130px"></el-input> |
| | | <el-input |
| | | v-model="form.orderId" |
| | | clearable |
| | | :disabled="props.orderId" |
| | | :placeholder="$t('order.orderId')" |
| | | style="width: 130px"></el-input> |
| | | |
| | | <el-button |
| | | :disabled="props.orderId" |
| | | @click="getWorkOrder" |
| | | id="select" |
| | | type="primary" :icon="Search">{{$t('basicData.search')}} |
| | |
| | | </div> |
| | | </template> |
| | | |
| | | <template #quantitySum="{ row,column }"> |
| | | <span>{{ quantitySum(row,column) }} </span> |
| | | </template> |
| | | |
| | | |
| | | </vxe-grid> |
| | | </div> |
| | |
| | | const selectOrderList = ()=>{ |
| | | request.post(`/rework/SelectRework/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | if(res.code==200){ |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | selectDate.value = res.data.selectDate |
| | | |
| | | produceList = deepClone(res.data.data) |
New file |
| | |
| | | <script setup> |
| | | import {ArrowLeftBold, ArrowRight, Search} from "@element-plus/icons-vue" |
| | | import {useRouter,useRoute,onBeforeRouteUpdate} from "vue-router" |
| | | import {useI18n} from "vue-i18n" |
| | | const { t } = useI18n() |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let indexFlag=$ref(1) |
| | | function changeRouter(index){ |
| | | indexFlag=index |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div id="main-div"> |
| | | <div id="div-title"> |
| | | <el-breadcrumb :separator-icon="ArrowRight"> |
| | | <el-breadcrumb-item @click="changeRouter(1)" :class="indexFlag===1?'indexTag':''" :to="{ path: '/main/orderBasicData/searchBasicData' }">基础数据</el-breadcrumb-item> |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">报表</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | </div> |
| | | |
| | | <div id="main-body"> |
| | | <router-view :key="route.fullPath" /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | #main-div{ |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | #div-title{ |
| | | height: 2%; |
| | | width: 100%; |
| | | } |
| | | #searchButton{ |
| | | margin-top: -5px; |
| | | margin-left: 1rem; |
| | | } |
| | | #searchButton1{ |
| | | //margin-left: 10rem; |
| | | } |
| | | /*main-body样式*/ |
| | | #main-body{ |
| | | width: 100%; |
| | | height: 95%; |
| | | margin-top: 1%; |
| | | } |
| | | #select{ |
| | | margin-left:0.5rem; |
| | | } |
| | | :deep(.indexTag .el-breadcrumb__inner){ |
| | | color: #5CADFE !important; |
| | | } |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | import request from "@/utils/request" |
| | | import {onMounted, ref, watch} from "vue"; |
| | | import {useI18n} from "vue-i18n" |
| | | import {ElMessage} from "element-plus" |
| | | import {useRouter,useRoute} from "vue-router" |
| | | const { t } = useI18n() |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | |
| | | |
| | | let basic = ref({ |
| | | basicType : ['',''], |
| | | input:'' |
| | | }) |
| | | let options=ref([ |
| | | { "label": "订单", |
| | | "value": "order", |
| | | "children": [ |
| | | { |
| | | "label": "订单类型", |
| | | "value": "orderType" |
| | | }, |
| | | { |
| | | "label": "订单分类", |
| | | "value": "orderClassify" |
| | | }, |
| | | { |
| | | "label": "商标选项", |
| | | "value": "icon" |
| | | }, |
| | | { |
| | | "label": "包装方式", |
| | | "value": "packType" |
| | | }, |
| | | { |
| | | "label": "铝条方式", |
| | | "value": "alType" |
| | | }, |
| | | { |
| | | "label": "业务员", |
| | | "value": "saleMan" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "label": "产品", |
| | | "value": "product", |
| | | "children": [ |
| | | { |
| | | "label": "材料厚度", |
| | | "value": "stuffThickness" |
| | | }, |
| | | { |
| | | "label": "材料颜色", |
| | | "value": "stuffColor" |
| | | }, |
| | | { |
| | | "label": "工艺属性", |
| | | "value": "stuffCraft" |
| | | }, |
| | | { |
| | | "label": "玻璃位置", |
| | | "value": "stuffPosition" |
| | | }, |
| | | { |
| | | "label": "lowe", |
| | | "value": "stuffLowE" |
| | | }, |
| | | { |
| | | "label": "夹胶厚度", |
| | | "value": "InterlayerThickness" |
| | | }, |
| | | { |
| | | "label": "夹胶类型", |
| | | "value": "InterlayerType" |
| | | }, |
| | | { |
| | | "label": "夹胶颜色", |
| | | "value": "InterlayerColor" |
| | | }, |
| | | { |
| | | "label": "工艺流程", |
| | | "value": "process" |
| | | }, |
| | | { |
| | | "label": "中空厚度", |
| | | "value": "hollowThickness" |
| | | }, |
| | | { |
| | | "label": "充气方式", |
| | | "value": "hollowGasType" |
| | | }, |
| | | { |
| | | "label": "封胶", |
| | | "value": "hollowType" |
| | | }, |
| | | { |
| | | "label": "默认胶深", |
| | | "value": "hollowGlueDepth" |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | "children": [ |
| | | { |
| | | "label": "付款条件", |
| | | "value": "paymentTerms" |
| | | }, |
| | | { |
| | | "label": "收款方式", |
| | | "value": "payMethod" |
| | | } |
| | | ], |
| | | "label": "送货", |
| | | "value": "delivery" |
| | | } |
| | | ]) |
| | | |
| | | let props = defineProps({ |
| | | rowIndex:{ |
| | | Object, |
| | | default: null |
| | | } |
| | | }) |
| | | onMounted(() =>{ |
| | | if(props.rowIndex){ |
| | | basic.value.basicType[0] = props.rowIndex.basicType |
| | | basic.value.basicType[1] = props.rowIndex.basicCategory |
| | | basic.value.input = props.rowIndex.basicName |
| | | } |
| | | }) |
| | | |
| | | const emit = defineEmits(['gaveParent']) |
| | | const saveBasicData = () =>{ |
| | | request.post(`/basicData/addBasicData`, basic.value).then(res => { |
| | | if (res.data) { |
| | | ElMessage.success('保存成功') |
| | | emit('gaveParent', true) |
| | | } |
| | | }) |
| | | } |
| | | const updateBasicData = () =>{ |
| | | let submitArr = props.rowIndex |
| | | submitArr.basicType = basic.value.basicType[0] |
| | | submitArr.basicCategory = basic.value.basicType[1] |
| | | submitArr.basicName = basic.value.input |
| | | request.post(`/basicData/updateBasicData`, submitArr).then(res => { |
| | | if (res.data) { |
| | | ElMessage.success('修改成功') |
| | | emit('gaveParent', true) |
| | | } |
| | | }) |
| | | |
| | | } |
| | | |
| | | const handleChange = (value) => { |
| | | const filterArr = options.value.filter((item) =>item.value === value[0] |
| | | ).map((item) =>item.children.filter((item) =>item.value === value[1])) |
| | | console.log(filterArr) |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <el-row> |
| | | <el-col :span="4">基础类型:</el-col> |
| | | <el-col :span="12"> |
| | | <el-cascader |
| | | v-model="basic.basicType" |
| | | @change="handleChange" |
| | | :options="options" |
| | | clearable |
| | | placeholder="" |
| | | :disabled="props.rowIndex" |
| | | /> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="4">名称:</el-col> |
| | | <el-col :span="12"> |
| | | <el-input v-model="basic.input"/> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="4"></el-col> |
| | | <el-col :span="12"> |
| | | <el-button v-show="!props.rowIndex" @click="saveBasicData" type="primary">新增</el-button> |
| | | <el-button v-show="props.rowIndex" @click="updateBasicData" type="primary">修改</el-button> |
| | | |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | div{ |
| | | text-align: center; |
| | | } |
| | | .el-row{ |
| | | margin-top: 10px; |
| | | } |
| | | </style> |
New file |
| | |
| | | <script setup> |
| | | import {reactive, ref} from "vue"; |
| | | import {VXETable} from "vxe-table"; |
| | | import {ElMessage} from "element-plus"; |
| | | import request from "@/utils/request" |
| | | import CreateBasicData from "@/views/sd/basicData/CreateBasicData.vue" |
| | | import {useRouter,useRoute} from "vue-router" |
| | | import {useI18n} from "vue-i18n" |
| | | const { t } = useI18n() |
| | | |
| | | let dialogTableVisible = ref(false) |
| | | const router = useRouter() |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'OrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | columnConfig: { |
| | | resizable: true, |
| | | useKey: true |
| | | }, |
| | | filterConfig: { //筛选配置项 |
| | | remote: true |
| | | }, |
| | | customConfig: { |
| | | storage: true |
| | | }, |
| | | editConfig: { |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | }, |
| | | |
| | | //表头参数 |
| | | columns:[ |
| | | {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' },fixed:"left",}, |
| | | {type: 'seq', title: '序号', width: 80 ,fixed:"left",}, |
| | | {field:'basicName',title: '名称'}, |
| | | {field:'createTime',title: '创建日期'}, |
| | | |
| | | |
| | | ], |
| | | |
| | | //表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {'code': 'add', 'name': '新增',status: 'primary'}, |
| | | ], |
| | | |
| | | // import: false, |
| | | // export: true, |
| | | // print: true, |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | // if (columnIndex === 0) { |
| | | // return t('basicData.total') |
| | | // } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | return '' |
| | | }) |
| | | ] |
| | | } |
| | | |
| | | }) |
| | | const gridEvents = { |
| | | toolbarButtonClick ({ code }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'add': { |
| | | rowIndex.value = null |
| | | dialogTableVisible.value = true |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | menuClick ({ menu, row, column }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (menu.code) { |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | request.get('/basicData/getBasicData').then(res => { |
| | | if(res.code==='200'){ |
| | | xGrid.value.reloadData(res.data) |
| | | } |
| | | }) |
| | | |
| | | const getChildrenFunction = (flag) => { |
| | | if(flag){ |
| | | router.push({ |
| | | path:'/main/orderBasicData/searchBasicData', |
| | | query:{random:Math.random() |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | |
| | | let rowIndex = ref(null) |
| | | const getTableRow = (row,type) => { |
| | | switch (type) { |
| | | case 'edit': { |
| | | rowIndex.value = row |
| | | dialogTableVisible.value = true |
| | | break |
| | | } |
| | | case 'delete': { |
| | | request.post(`/basicData/deleteBasicData`,row).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success(t('searchOrder.msgDeleteSuccess')) |
| | | router.push({ |
| | | path:'/main/orderBasicData/searchBasicData', |
| | | query:{random:Math.random() |
| | | } |
| | | }) |
| | | }else{ |
| | | ElMessage.warning(t('searchOrder.msgDeleteFail')) |
| | | } |
| | | }) |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <vxe-grid |
| | | style="width: 40vw;" |
| | | class="mytable-scrollbar" |
| | | max-height="500px" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | > |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{ $t('basicData.edit') }}</el-button> |
| | | <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')"> |
| | | <template #reference> |
| | | <el-button link type="primary" size="small">{{ $t('basicData.delete') }}</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | </template> |
| | | |
| | | </vxe-grid> |
| | | <el-dialog |
| | | v-model="dialogTableVisible" |
| | | destroy-on-close |
| | | style="width: 30%;height:30% "> |
| | | <create-basic-data :rowIndex="rowIndex" @gaveParent='getChildrenFunction'/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | |
| | | 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.deliveryDate = today.getFullYear() + |
| | |
| | | <el-col :span="5"><el-input v-model="titleUploadData.project" :readonly="true"></el-input></el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="2"><el-text>{{$t('order.project')}}:</el-text></el-col> |
| | | <el-col :span="2"><el-text>{{$t('delivery.paymentTerms')}}:</el-text></el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="titleUploadData.paymentTerms" clearable placeholder="" > |
| | | <el-option |
| | |
| | | <el-date-picker |
| | | v-model="titleUploadData.payDate" |
| | | type="date" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | :placeholder="$t('delivery.selectDate')"/> |
| | | </el-col> |
| | | |
| | |
| | | <el-date-picker |
| | | v-model="titleUploadData.deliveryDate" |
| | | type="date" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | :placeholder="$t('delivery.selectDate')"/> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | request.post(`/Delivery/getSelectShippingOrder/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | request.post(`/Delivery/getSelectOrderInventory/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | if (res.data.total!=null){ |
| | | total.dataTotal = res.data.total.total*1 |
| | | total.pageTotal= res.data.total.pageTotal |
| | | } |
| | | produceList = deepClone(res.data.data) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | |
| | | onMounted(()=>{ |
| | | //启用表格拖动选中 |
| | | addListener(xGrid.value,gridOptions) |
| | | const str = route.query.orderId |
| | | const str = route.query.orderId || history.state.orderId |
| | | if (typeof str === 'undefined' || str === null || str === '' || str === '\n' || str === '\r'){ |
| | | return |
| | | } |
| | | request.post(`/order/getOrderById/${str}`).then((res) => { |
| | | if(res.code==200){ |
| | | titleUploadData.value = res.data.order |
| | | if(history.state.orderId!=null){ |
| | | titleUploadData.value.orderId='' |
| | | titleUploadData.value.id=null |
| | | titleUploadData.value.processReview=null |
| | | titleUploadData.value.orderReview=null |
| | | titleUploadData.value.productionOrder=null |
| | | titleUploadData.value.processingCard=null |
| | | titleUploadData.value.warehousing=null |
| | | titleUploadData.value.delivery=null |
| | | titleUploadData.value.createTime=null |
| | | |
| | | if(history.state.type=='copy'){ |
| | | xGrid.value.reloadData(res.data.orderDetails) |
| | | } |
| | | return |
| | | } |
| | | //取消工艺按钮禁用 |
| | | gridOptions.toolbarConfig.buttons[1].disabled = false |
| | | //工艺审核后保存按钮禁用 |
| | | if(res.data.order.processReview === 2){ |
| | | gridOptions.toolbarConfig.buttons[4].disabled = true |
| | | |
| | | } |
| | | //取消审核按钮禁用 |
| | | if(res.data.order.processReview === 2 && res.data.order.orderReview === 0){ |
| | |
| | | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | | //进入页面下拉框设置默认值 |
| | | titleUploadData.value.orderType = titleSelectJson.value.orderType[0].basicName |
| | | titleUploadData.value.orderClassify = titleSelectJson.value.orderClassify[0].basicName |
| | | titleUploadData.value.icon = titleSelectJson.value.icon[0].basicName |
| | |
| | | request.post(`/order/updateOrderMoney`,updateData).then(res => { |
| | | if (res.code == 200){ |
| | | ElMessage.success( t('order.msg.updateAmountSuccessfully') ) |
| | | router.push({path:'/main/order/createOrder',query:{orderId:titleUploadData.value.orderId,random:Math.random()}}) |
| | | router.push({path:'/main/order/createOrder', |
| | | query:{ |
| | | orderId:titleUploadData.value.orderId, |
| | | random:Math.random() |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }) |
| | |
| | | import {ElMessage} from "element-plus" |
| | | import {VXETable} from "vxe-table" |
| | | import {useI18n} from "vue-i18n" |
| | | import {toolbarButtonClickEvent} from "@/hook/mouseMove"; |
| | | const { t } = useI18n() |
| | | const router = useRouter() |
| | | |
| | | let rowClickIndex = ref(null) |
| | | const dialogTableVisible = ref(false) |
| | | let orderType = ref("2") |
| | | let selectDate = ref(["",""]) |
| | | let filterData = ref({}) |
| | | let orderList = ref([]) |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 100 |
| | | }) |
| | | |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | |
| | | trigger: 'click', |
| | | mode: 'row', |
| | | showStatus: true |
| | | },//表头参数 |
| | | }, |
| | | menuConfig: { |
| | | body: { |
| | | options: [ |
| | | [ |
| | | { code: 'copy', name: t('searchOrder.copy'), prefixIcon: 'vxe-icon-copy', visible: true}, |
| | | { code: 'copyTitle', name: t('searchOrder.copyTitle'), prefixIcon: 'vxe-icon-copy', visible: true}, |
| | | { code: 'getProcessList', name: t('searchOrder.processFlows'), prefixIcon: 'vxe-icon-file-txt', visible: true} |
| | | ] |
| | | ] |
| | | } |
| | | }, |
| | | //表头参数 |
| | | columns:[ |
| | | {type:'expand',slots: { content:'content' },width: 50,fixed:"left",}, |
| | | {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' },fixed:"left",}, |
| | |
| | | //{field: '14',width:120, title: '备注',filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'deliveryAddress',width:120, title: t('order.deliveryAddress'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | |
| | | ],//表头按钮 |
| | | ], |
| | | |
| | | //表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | |
| | |
| | | if ($grid) { |
| | | switch (code) { |
| | | case 'checkList': { |
| | | if($grid.getCheckboxRecords().length==0){ |
| | | if($grid.getCheckboxRecords().length===0){ |
| | | VXETable.modal.message( t('searchOrder.msg')) |
| | | return |
| | | } |
| | |
| | | } |
| | | } |
| | | }, |
| | | menuClick ({ menu, row, column }) { |
| | | const $grid = xGrid.value |
| | | if ($grid) { |
| | | switch (menu.code) { |
| | | case 'getProcessList': { |
| | | if(rowClickIndex.value===null){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | dialogTableVisible.value = true |
| | | break |
| | | } |
| | | case 'copy': { |
| | | if(rowClickIndex.value===null){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | router.push({path:'/main/order/createOrder', |
| | | state:{ |
| | | orderId:rowClickIndex.value.orderId, |
| | | type:'copy' |
| | | }}) |
| | | break |
| | | } |
| | | case 'copyTitle': { |
| | | if(rowClickIndex.value===null){ |
| | | ElMessage.warning(t('searchOrder.msgList.checkOrder')) |
| | | return |
| | | } |
| | | router.push({path:'/main/order/createOrder', |
| | | state:{ |
| | | orderId:rowClickIndex.value.orderId, |
| | | type:'copyTitle' |
| | | }}) |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | | }, |
| | | cellClick({ row }){ |
| | | rowClickIndex.value = row |
| | | } |
| | | } |
| | | const dialogTableVisible = ref(false) |
| | | let orderType = ref("2") |
| | | let selectDate = ref(["",""]) |
| | | let filterData = ref({}) |
| | | let orderList = ref([]) |
| | | let pageNum=ref(1) |
| | | let total = reactive({ |
| | | pageTotal : 0, |
| | | dataTotal : 0, |
| | | pageSize : 100 |
| | | }) |
| | | |
| | | //加载请求 |
| | | request.post(`/order/getOrderList/1/${total.pageSize}/${orderType.value}/${selectDate.value}`,filterData).then((res) => { |
| | | if(res.code==200){ |
| | |
| | | } |
| | | |
| | | //双击表格行 |
| | | const cellClickEvent =()=>{ |
| | | dialogTableVisible.value = true |
| | | } |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.post(`/order/getOrderList/${pageNum.value}/${total.pageSize}/${orderType.value}/${selectDate.value}` |
| | | ,filterData).then((res) => { |
| | |
| | | break |
| | | } |
| | | case 'delete': { |
| | | if (row.processReview === 2) { |
| | | if (Math.abs(row.processReview) === 2) { |
| | | ElMessage.warning(t('searchOrder.msgDelete')) |
| | | return |
| | | } |
| | |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{ $t('basicData.search') }}</el-button> |
| | | <vxe-grid |
| | | @filter-change="filterChanged" |
| | | @cell-dblclick="cellClickEvent" |
| | | max-height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | > |
| | | <!-- 下拉显示所有信息插槽--> |
| | |
| | | </template> |
| | | </vxe-grid> |
| | | |
| | | <el-dialog v-model="dialogTableVisible" title="流程卡进度" style="width: 80%;height:75% "> |
| | | <ProcessCardProgress style="width: 100%;height: 100%" /> |
| | | <el-dialog |
| | | v-model="dialogTableVisible" |
| | | destroy-on-close |
| | | :title="$t('searchOrder.processFlows')" |
| | | style="width: 80%;height:75% "> |
| | | <ProcessCardProgress |
| | | :orderId="rowClickIndex.orderId" |
| | | style="width: 100%;height: 100%" /> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | import {addListener,toolbarButtonClickEvent} from "@/hook/mouseMove" |
| | | import {useI18n} from "vue-i18n" |
| | | import {Flag, Location} from "@element-plus/icons-vue"; |
| | | const { t } = useI18n() |
| | | |
| | | const router = useRouter() |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const tagCheck = (state) => { |
| | | if(typeof trademarkAttr.value.location === 'string'){ |
| | | return false |
| | | } |
| | | const filterArr = trademarkAttr.value.location.filter((item) =>{ |
| | | return item === state |
| | | }) |
| | | return filterArr.length > 0 |
| | | |
| | | } |
| | | </script> |
| | | |
| | | <template> |
| | |
| | | :title="'商标参数'" |
| | | :close-on-click-modal="false" |
| | | :close-on-press-escape="false" |
| | | style="width: 60%;height:60% ; |
| | | style="width: 922px;height:443px ; |
| | | position: relative;" > |
| | | <el-row> |
| | | <el-col :span="2">商标选项:</el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="trademarkAttr.trademark" |
| | | > |
| | | <el-option :value="item.basicName" v-for="item in trademarkList" /> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | <div style="width: 50%;height: 100%;float: left"> |
| | | <el-row style=""> |
| | | <el-col :span="4">商标选项:</el-col> |
| | | <el-col :span="6"> |
| | | <el-select v-model="trademarkAttr.trademark" |
| | | > |
| | | <el-option :value="item.basicName" v-for="item in trademarkList" /> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="2">X轴镜像:</el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="trademarkAttr.xImage"> |
| | | <el-option :value="true"/> |
| | | <el-option :value="false"/> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="4">X轴镜像:</el-col> |
| | | <el-col :span="6"> |
| | | <el-select v-model="trademarkAttr.xImage"> |
| | | <el-option :value="true" :label="'是'"/> |
| | | <el-option :value="false" :label="'否'"/> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="2">Y轴镜像:</el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="trademarkAttr.yImage"> |
| | | <el-option :value="true"/> |
| | | <el-option :value="false"/> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="4">Y轴镜像:</el-col> |
| | | <el-col :span="6"> |
| | | <el-select v-model="trademarkAttr.yImage"> |
| | | <el-option :value="true" :label="'是'"/> |
| | | <el-option :value="false" :label="'否'"/> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="2">打标使能:</el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="trademarkAttr.tag"> |
| | | <el-option :value="true"/> |
| | | <el-option :value="false"/> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="4">打标使能:</el-col> |
| | | <el-col :span="6"> |
| | | <el-select v-model="trademarkAttr.tag"> |
| | | <el-option :value="true" :label="'是'"/> |
| | | <el-option :value="false" :label="'否'"/> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="2">标签2使能:</el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="trademarkAttr.tag2"> |
| | | <el-option :value="true"/> |
| | | <el-option :value="false"/> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="4">二维码打印:</el-col> |
| | | <el-col :span="6"> |
| | | <el-select v-model="trademarkAttr.tag2"> |
| | | <el-option :value="true" :label="'是'"/> |
| | | <el-option :value="false" :label="'否'"/> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="2">标签3使能:</el-col> |
| | | <el-col :span="3"> |
| | | <el-select v-model="trademarkAttr.tag3"> |
| | | <el-option :value="true"/> |
| | | <el-option :value="false"/> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="4">标签3使能:</el-col> |
| | | <el-col :span="6"> |
| | | <el-select v-model="trademarkAttr.tag3"> |
| | | <el-option :value="true" :label="'是'"/> |
| | | <el-option :value="false" :label="'否'"/> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="2">X轴边距:</el-col> |
| | | <el-col :span="3"> |
| | | <el-input-number v-model="trademarkAttr.xMargin"/> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="4">X轴边距:</el-col> |
| | | <el-col :span="6"> |
| | | <el-input-number v-model="trademarkAttr.xMargin"/> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="2">Y轴边距:</el-col> |
| | | <el-col :span="3"> |
| | | <el-input-number v-model="trademarkAttr.yMargin"/> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="4">Y轴边距:</el-col> |
| | | <el-col :span="6"> |
| | | <el-input-number v-model="trademarkAttr.yMargin"/> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col :span="2">商标位置:</el-col> |
| | | <el-col :span="8"> |
| | | <el-checkbox v-model="trademarkAttr.location" v-for="item in trademarkLocation" :label="item" /> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="4">商标位置:</el-col> |
| | | <el-col :span="16"> |
| | | <el-checkbox v-model="trademarkAttr.location" v-for="item in trademarkLocation" :label="item" /> |
| | | </el-col> |
| | | </el-row> |
| | | |
| | | <el-row> |
| | | <el-col > |
| | | <el-button @click="changeTrademark" style="float:right;" type="primary" >{{$t('craft.sure')}}</el-button> |
| | | <el-button style="float:right;margin-right: 0.5rem" type="primary" >{{$t('craft.reset')}}</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row> |
| | | <el-col > |
| | | <el-button @click="changeTrademark" style="float:right;" type="primary" >{{$t('craft.sure')}}</el-button> |
| | | <el-button style="float:right;margin-right: 0.5rem" type="primary" >{{$t('craft.reset')}}</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | <div style="width: 400px;height: 250px;border: 2px solid #000;float: left;position: relative;"> |
| | | <div |
| | | v-if="tagCheck('左上')" |
| | | style="float: left;width: 60px;height: 60px;margin-left: 1rem"> |
| | | <el-row> |
| | | <el-col :span="20"><el-icon :size="20"><Location /></el-icon></el-col> |
| | | </el-row> |
| | | <el-row > |
| | | <el-col :span="5" >X:</el-col> |
| | | <el-col :span="2" >{{trademarkAttr.xMargin}}</el-col> |
| | | </el-row> |
| | | <el-row > |
| | | <el-col :span="5" >Y:</el-col> |
| | | <el-col :span="2" >{{trademarkAttr.yMargin}}</el-col> |
| | | </el-row> |
| | | </div> |
| | | |
| | | <div |
| | | v-if="tagCheck('右上')" |
| | | style="float: right;width: 60px;height: 60px;margin-right: 1rem"> |
| | | <el-row> |
| | | <el-col :span="20"><el-icon :size="20"><Location /></el-icon></el-col> |
| | | </el-row> |
| | | <el-row > |
| | | <el-col :span="5" >X:</el-col> |
| | | <el-col :span="2" >{{trademarkAttr.xMargin}}</el-col> |
| | | </el-row> |
| | | <el-row > |
| | | <el-col :span="5" >Y:</el-col> |
| | | <el-col :span="2" >{{trademarkAttr.yMargin}}</el-col> |
| | | </el-row> |
| | | </div> |
| | | |
| | | <div |
| | | v-if="tagCheck('左下')" |
| | | style="width: 60px;height: 60px;margin-left: 1rem;float: left;position: absolute;bottom: 8px"> |
| | | <el-row> |
| | | <el-col :span="20"><el-icon :size="20"><Location /></el-icon></el-col> |
| | | </el-row> |
| | | <el-row > |
| | | <el-col :span="5" >X:</el-col> |
| | | <el-col :span="2" >{{trademarkAttr.xMargin}}</el-col> |
| | | </el-row> |
| | | <el-row > |
| | | <el-col :span="5" >Y:</el-col> |
| | | <el-col :span="2" >{{trademarkAttr.yMargin}}</el-col> |
| | | </el-row> |
| | | </div> |
| | | |
| | | <div |
| | | v-if="tagCheck('右下')" |
| | | style="width: 60px;height: 60px;position: absolute;bottom: 8px;right: 1rem"> |
| | | <el-row> |
| | | <el-col :span="20"><el-icon :size="20"><Location /></el-icon></el-col> |
| | | </el-row> |
| | | <el-row > |
| | | <el-col :span="5" >X:</el-col> |
| | | <el-col :span="2" >{{trademarkAttr.xMargin}}</el-col> |
| | | </el-row> |
| | | <el-row > |
| | | <el-col :span="5" >Y:</el-col> |
| | | <el-col :span="2" >{{trademarkAttr.yMargin}}</el-col> |
| | | </el-row> |
| | | </div> |
| | | |
| | | |
| | | |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | </div> |
| | |
| | | } |
| | | .order-detail{ |
| | | width: 100%; |
| | | height: 90%; |
| | | height: 85%; |
| | | } |
| | | #trademark .el-row,#trademark .el-col{ |
| | | border: 0 |
| | |
| | | return Result.seccess(basicWarehouseTypeService.getBasicWarehouseType(type)); |
| | | } |
| | | |
| | | @GetMapping("/BasicWarehouseTypes/{type}") |
| | | public Result getBasicWarehouseTypes(@PathVariable String type){ |
| | | return Result.seccess(basicWarehouseTypeService.getBasicWarehouseTypes(type)); |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.controller.mm; |
| | | |
| | | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.mm.*; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.mm.MaterialInventoryService; |
| | | import com.example.erp.service.mm.MaterialStoreService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/MaterialInventory") |
| | | @Api(value="物料库存controller",tags={"物料库存操作接口"}) |
| | | public class MaterialInventoryController { |
| | | @Autowired |
| | | MaterialInventoryService materialInventoryService; |
| | | |
| | | @ApiOperation("物料出库新增接口") |
| | | @PostMapping("/saveMaterialOutbound") |
| | | public Result saveMaterialOutbound( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.saveMaterialOutbound(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("物料新增接口") |
| | | @PostMapping("/saveMaterialInventory") |
| | | public Result saveMaterialInventory( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.saveMaterialInventory(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("物料库存加时间查询接口") |
| | | @PostMapping("/getSelectMaterialInventoryDate/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectMaterialInventoryDate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> selectDate, @RequestBody MaterialInventory materialInventory){ |
| | | return Result.seccess(materialInventoryService.getSelectMaterialInventoryDate(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("/getSelectMaterialOutboundDate/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectMaterialOutboundDate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> selectDate, @RequestBody MaterialOutbound materialOutbound){ |
| | | return Result.seccess(materialInventoryService.getSelectMaterialOutboundDate(pageNum,pageSize,selectDate, materialOutbound)); |
| | | } |
| | | |
| | | @ApiOperation("材料出库查询接口") |
| | | @PostMapping("/getSelectMaterialOutbound/{pageNum}/{pageSize}") |
| | | public Result getSelectMaterialOutbound(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody MaterialOutboundDetail materialOutboundDetail){ |
| | | return Result.seccess(materialInventoryService.getSelectMaterialOutbound(pageNum,pageSize,materialOutboundDetail)); |
| | | } |
| | | |
| | | @ApiOperation("材料出库审核接口") |
| | | @PostMapping("/updateMaterialOutboundToExamine") |
| | | public Result updateMaterialOutboundToExamine( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.updateMaterialOutboundToExamine(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"审核失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("物料删除接口") |
| | | @PostMapping("/deleteMaterialOutbound") |
| | | public Result deleteMaterialOutbound( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.deleteMaterialOutbound(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("物料返库新增接口") |
| | | @PostMapping("/saveReturningWarehouse") |
| | | public Result saveReturningWarehouse( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.saveReturningWarehouse(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation("物料返库新增查询接口") |
| | | @PostMapping("/getSelectReturningWarehouse/{pageNum}/{pageSize}") |
| | | public Result getSelectReturningWarehouse(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody ReturningWarehouseDetail returningWarehouseDetail){ |
| | | return Result.seccess(materialInventoryService.getSelectReturningWarehouse(pageNum,pageSize,returningWarehouseDetail)); |
| | | } |
| | | |
| | | @ApiOperation("物料返库审核接口") |
| | | @PostMapping("/updateReturningWarehouseToExamine") |
| | | public Result updateReturningWarehouseToExamine( @RequestBody Map<String,Object> object){ |
| | | if(materialInventoryService.updateReturningWarehouseToExamine(object)){ |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"审核失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | @ApiOperation("物料返库查询接口") |
| | | @PostMapping("/getSelectReturningWarehouseDate/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectReturningWarehouseDate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> selectDate, @RequestBody ReturningWarehouse returningWarehouse){ |
| | | return Result.seccess(materialInventoryService.getSelectReturningWarehouseDate(pageNum,pageSize,selectDate, returningWarehouse)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
File was renamed from north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialController.java |
| | |
| | | |
| | | import com.example.erp.common.Constants; |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.mm.MaterialStore; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Customer; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.exception.ServiceException; |
| | | import com.example.erp.service.mm.FinishedGoodsInventoryService; |
| | | import com.example.erp.service.mm.MaterialService; |
| | | import com.example.erp.service.mm.MaterialStoreService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/Material") |
| | | @RequestMapping("/MaterialStore") |
| | | @Api(value="物料controller",tags={"物料操作接口"}) |
| | | public class MaterialController { |
| | | public class MaterialStoreController { |
| | | @Autowired |
| | | MaterialService faterialService; |
| | | MaterialStoreService materialStoreService; |
| | | |
| | | @ApiOperation("物料新增接口") |
| | | @PostMapping("/saveMaterialStore") |
| | | public Result saveMaterialStore( @RequestBody Map<String,Object> object){ |
| | | if(faterialService.saveMaterialStore(object)){ |
| | | if(materialStoreService.saveMaterialStore(object)){ |
| | | return Result.seccess(); |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"保存失败"); |
| | |
| | | @ApiOperation("物料查询接口") |
| | | @PostMapping("/getSelectMaterialStore/{pageNum}/{pageSize}") |
| | | public Result getSelectMaterialStore(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @RequestBody MaterialStore materialStore){ |
| | | return Result.seccess(faterialService.getSelectMaterialStore(pageNum,pageSize,materialStore)); |
| | | return Result.seccess(materialStoreService.getSelectMaterialStore(pageNum,pageSize,materialStore)); |
| | | } |
| | | |
| | | @ApiOperation("物料删除接口") |
| | | @PostMapping("/deleteMaterialStore") |
| | | public Result deleteMaterialStore( @RequestBody Map<String,Object> object){ |
| | | if(faterialService.deleteMaterialStore(object)){ |
| | | if(materialStoreService.deleteMaterialStore(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @Api(value="生产报表controller",tags={"生产报表操作接口"}) |
| | | @RequestMapping("/report") |
| | | public class ReportController { |
| | | @Autowired |
| | | ReportService reportService; |
| | | private final ReportService reportService; |
| | | |
| | | public ReportController(ReportService reportService) { |
| | | this.reportService = reportService; |
| | | } |
| | | |
| | | //流程卡进度 |
| | | @ApiOperation("流程卡进度") |
| | | @PostMapping ("/processCardProgress/{orderId}") |
| | | public Result processCardProgress( |
| | | @PathVariable String orderId, |
| | | @RequestBody FlowCard flowCard){ |
| | | return Result.seccess(reportService.processCardProgressSv(orderId,flowCard)); |
| | | public Result processCardProgress(@PathVariable String orderId, @RequestBody List<Integer> columns){ |
| | | return Result.seccess(reportService.processCardProgressSv(orderId,columns)); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.example.erp.controller.sd; |
| | | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import com.example.erp.service.sd.BasicDateService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | public Result getBasicDataByTypeAndChildType(@PathVariable String type,@PathVariable String childType){ |
| | | return Result.seccess(basicDateService.getBasicDataByTypeAndChildType(type,childType)); |
| | | } |
| | | @GetMapping("/getBasicData") |
| | | public Result getBasicData(){ |
| | | return Result.seccess(basicDateService.getBasicData()); |
| | | } |
| | | @GetMapping("/getBasicDataType") |
| | | public Result getBasicDataType(){ |
| | | return Result.seccess(basicDateService.getBasicDataType()); |
| | | } |
| | | |
| | | @PostMapping("addBasicData") |
| | | public Result addBasicData(@RequestBody Map<String,Object> map){ |
| | | return Result.seccess(basicDateService.addBasicData(map)); |
| | | } |
| | | @PostMapping("updateBasicData") |
| | | public Result updateBasicData(@RequestBody BasicData basicData){ |
| | | return Result.seccess(basicDateService.updateBasicData(basicData)); |
| | | } |
| | | |
| | | @PostMapping("deleteBasicData") |
| | | public Result deleteBasicData(@RequestBody BasicData basicData){ |
| | | return Result.seccess(basicDateService.deleteBasicData(basicData)); |
| | | } |
| | | } |
New file |
| | |
| | | package com.example.erp.entity.mm; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class MaterialInventory { |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private String inventoryOrganization; |
| | | private Long materialCode; |
| | | private String materialName; |
| | | private String producer; |
| | | private String stockId; |
| | | private Double width; |
| | | private Double height; |
| | | private Double thickness; |
| | | private String unit; |
| | | private Integer inventoryQuantity; |
| | | private Integer availableQuantity; |
| | | private Integer safetyStock; |
| | | private Double totalArea; |
| | | private Double singlePieceArea; |
| | | private LocalDate dateOfManufacture; |
| | | private String qualityGuaranteePeriod; |
| | | private String inventoryArea; |
| | | private Integer deadStock; |
| | | private String remarks; |
| | | private LocalDate createTime; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.entity.mm; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class MaterialOutbound { |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private String materialOutboundId; |
| | | private String materialRequisitionPersonnel; |
| | | private String materialRequisitionTeam; |
| | | private String orderId; |
| | | private String outboundType; |
| | | private String warehouseManager; |
| | | private LocalDate materialRequisitionDate; |
| | | private String reviewed; |
| | | private LocalDate reviewedTime; |
| | | private Integer reviewedState; |
| | | private LocalDate createTime; |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.entity.mm; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class MaterialOutboundDetail { |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private Long inventoryId; |
| | | private String materialOutboundId; |
| | | private Long materialOutboundNumber; |
| | | private String inventoryOrganization; |
| | | private String materialName; |
| | | private String materialCode; |
| | | private String producer; |
| | | private Double width; |
| | | private Double height; |
| | | private Double thickness; |
| | | private String unit; |
| | | private Integer outboundQuantity; |
| | | private Double singlePieceArea; |
| | | private String inventoryArea; |
| | | private LocalDate dateOfManufacture; |
| | | private String remarks; |
| | | private MaterialInventory materialInventory; |
| | | private MaterialOutbound materialOutbound; |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.entity.mm; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class ReturningWarehouse { |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private String returningId; |
| | | private String returningType; |
| | | private String materialRequisitionPersonnel; |
| | | private String materialRequisitionTeam; |
| | | private String orderId; |
| | | private String project; |
| | | private String batch; |
| | | private String warehouseManager; |
| | | private String reviewed; |
| | | private LocalDate reviewedTime; |
| | | private Integer reviewedState; |
| | | private LocalDate createTime; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.entity.mm; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | | import java.time.LocalDate; |
| | | |
| | | @Data |
| | | public class ReturningWarehouseDetail { |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private Long inventoryId; |
| | | private String returningId; |
| | | private Integer returningNumber; |
| | | private Long materialCode; |
| | | private Integer returnQuantity; |
| | | private LocalDate dateOfManufacture; |
| | | private String inventoryOrganization; |
| | | private String producer; |
| | | private Double totalArea; |
| | | private Double singlePieceArea; |
| | | private String qualityGuaranteePeriod; |
| | | private String inventoryArea; |
| | | private String remarks; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | List<BasicWarehouseType> getBasicWarehouseType(String type); |
| | | |
| | | List<String> getBasicWarehouse(String type); |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.mapper.mm; |
| | | |
| | | import com.example.erp.entity.mm.*; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.repository.CrudRepository; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface MaterialInventoryMapper extends CrudRepository<MaterialInventory,Long> { |
| | | |
| | | List<Map<String,Object>> getSelectMaterialInventoryDate(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("materialInventory") MaterialInventory materialInventory); |
| | | |
| | | |
| | | Map<String,Integer> getSelectMaterialInventoryDatePageTotal(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); |
| | | |
| | | Boolean insertMaterialStore(@Param("type") String type, |
| | | @Param("json") String json); |
| | | |
| | | Boolean updateMaterialStore(@Param("type") String type, |
| | | @Param("json") String json, @Param("id") Long id); |
| | | |
| | | Boolean deleteMaterialOutbound(@Param("materialOutboundId") String materialOutboundId); |
| | | |
| | | Integer getMaximum(@Param("type") String type); |
| | | |
| | | Integer getMaximums(@Param("type") String type); |
| | | |
| | | Integer getMaterialOutboundCount(@Param("materialOutboundId") String materialOutboundId); |
| | | |
| | | Integer getReturningWarehouseCount(@Param("returningId") String returningId); |
| | | |
| | | Integer getMaterialInventoryCount(@Param("materialCode") Long materialCode,@Param("dateOfManufacture") LocalDate dateOfManufacture); |
| | | |
| | | Integer getMaterialInventoryCountNull(@Param("materialCode") Long materialCode); |
| | | |
| | | |
| | | List<MaterialInventory> getMaterialInventoryCountId(@Param("materialCode") Long materialCode,@Param("dateOfManufacture") LocalDate dateOfManufacture); |
| | | |
| | | List<MaterialInventory> getMaterialInventoryCountNullId(@Param("materialCode") Long materialCode); |
| | | |
| | | List<MaterialOutboundDetail> getIsNotMaterialOutboundDetail( @Param("materialOutboundId") String materialOutboundId); |
| | | |
| | | List<ReturningWarehouseDetail> getIsNotReturningWarehouseDetail(@Param("returningId") String returningId); |
| | | |
| | | Boolean insertMaterialOutbound(@Param("materialOutbound") MaterialOutbound materialOutbound, @Param("number") String number); |
| | | |
| | | Boolean insertReturningWarehouse(@Param("returningWarehouse") ReturningWarehouse returningWarehouse, @Param("number") String number); |
| | | |
| | | Integer getMaterialOutboundDetailMaximum(@Param("materialOutboundId") String materialOutboundId); |
| | | |
| | | Integer getReturningWarehouseDetailMaximum(@Param("returningId") String returningId); |
| | | |
| | | Boolean insertMaterialOutboundDetail(@Param("materialOutboundDetail") MaterialOutboundDetail materialOutboundDetail, |
| | | @Param("number") String number, @Param("materialOutboundNumber") Integer materialOutboundNumber); |
| | | |
| | | Boolean insertReturningWarehouseDetail(@Param("returningWarehouseDetail") ReturningWarehouseDetail returningWarehouseDetail, |
| | | @Param("number") String number, @Param("returningWarehouseNumber") Integer returningWarehouseNumber); |
| | | |
| | | Boolean updateReturningWarehouseDetail(@Param("number") String number, @Param("returningWarehouseNumber") Integer returningWarehouseNumber, |
| | | @Param("materialInventoryId") Long materialInventoryId); |
| | | |
| | | |
| | | Boolean updateMaterialInventoryAvailableOut(@Param("inventoryId") Long inventoryId, |
| | | @Param("quantity") Integer quantity); |
| | | Boolean updateMaterialInventoryAvailableInt(@Param("inventoryId") Long inventoryId, |
| | | @Param("quantity") Integer quantity); |
| | | Boolean updateMaterialInventoryInventoryOut(@Param("inventoryId") Long inventoryId, |
| | | @Param("quantity") Integer quantity); |
| | | Boolean updateMaterialInventoryInventoryInt(@Param("inventoryId") Long inventoryId, |
| | | @Param("quantity") Integer quantity); |
| | | |
| | | Boolean updateMaterialInventoryAvailableInventoryOut(@Param("inventoryId") Long inventoryId, |
| | | @Param("quantity") Integer quantity); |
| | | Boolean updateMaterialInventoryAvailableInventoryInt(@Param("inventoryId") Long inventoryId, |
| | | @Param("quantity") Integer quantity); |
| | | |
| | | Boolean deleteMaterialOutboundDetail(@Param("materialOutboundId") String materialOutboundId); |
| | | |
| | | Boolean deleteReturningWarehouseDetail(@Param("returningId") String returningId); |
| | | |
| | | List<MaterialOutbound> getSelectMaterialOutboundDate(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("materialOutbound") MaterialOutbound materialOutbound); |
| | | |
| | | Map<String,Integer> getSelectMaterialOutboundDatePageTotal(Integer offset, Integer pageSize,String startDate, String endDate,MaterialOutbound materialOutbound); |
| | | |
| | | |
| | | List<ReturningWarehouse> getSelectReturningWarehouseDate(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("returningWarehouse") ReturningWarehouse returningWarehouse); |
| | | |
| | | Map<String,Integer> getSelectReturningWarehouseDatePageTotal(Integer offset, Integer pageSize,String startDate, String endDate,ReturningWarehouse returningWarehouse); |
| | | |
| | | |
| | | MaterialOutbound getSelectMaterialOutbound(@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); |
| | | |
| | | Map<String,Integer> getSelectMaterialOutboundDetailPageTotal(Integer offset, Integer pageSize,MaterialOutboundDetail materialOutboundDetail); |
| | | |
| | | ReturningWarehouse getSelectReturningWarehouse(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("returningWarehouseDetail") ReturningWarehouseDetail returningWarehouseDetail); |
| | | |
| | | List<Map<String,Object>> getSelectReturningWarehouseDetail(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("returningWarehouseDetail") ReturningWarehouseDetail returningWarehouseDetail); |
| | | |
| | | Map<String,Integer> getSelectReturningWarehouseDetailPageTotal(Integer offset, Integer pageSize,ReturningWarehouseDetail returningWarehouseDetail); |
| | | |
| | | Boolean updateMaterialOutboundToExamine(@Param("materialOutboundId") String materialOutboundId,@Param("reviewedState") int reviewedState,@Param("reviewed") String reviewed); |
| | | |
| | | Boolean updateMaterialOutboundCounterExamination(@Param("materialOutboundId") String materialOutboundId,@Param("reviewedState") int reviewedState,@Param("reviewed") String reviewed); |
| | | |
| | | Boolean updateReturningWarehouseToExamine(@Param("returningId") String returningId,@Param("reviewedState") int reviewedState,@Param("reviewed") String reviewed); |
| | | |
| | | Boolean updateReturningWarehouseCounterExamination(@Param("returningId") String returningId,@Param("reviewedState") int reviewedState,@Param("reviewed") String reviewed); |
| | | |
| | | Boolean updateMaterialInventory(@Param("materialCode") Long materialCode,@Param("singlePieceArea") Double singlePieceArea, |
| | | @Param("totalArea") Double totalArea, |
| | | @Param("materialInventory") MaterialInventory materialInventory); |
| | | |
| | | Boolean insertMaterialInventory(@Param("materialCode") Long materialCode,@Param("singlePieceArea") Double singlePieceArea, |
| | | @Param("totalArea") Double totalArea, |
| | | @Param("materialInventory") MaterialInventory materialInventory); |
| | | |
| | | Boolean updateMaterialInventoryReturning(@Param("materialCode") Long materialCode,@Param("singlePieceArea") Double singlePieceArea, |
| | | @Param("totalArea") Double totalArea, |
| | | @Param("returningWarehouseDetail") ReturningWarehouseDetail returningWarehouseDetail); |
| | | |
| | | Boolean updateMaterialInventoryReturningNull(@Param("materialCode") Long materialCode,@Param("singlePieceArea") Double singlePieceArea, |
| | | @Param("totalArea") Double totalArea, |
| | | @Param("returningWarehouseDetail") ReturningWarehouseDetail returningWarehouseDetail); |
| | | |
| | | Boolean insertMaterialInventoryReturning(@Param("materialCode") Long materialCode,@Param("singlePieceArea") Double singlePieceArea, |
| | | @Param("totalArea") Double totalArea, |
| | | @Param("returningWarehouseDetail") ReturningWarehouseDetail returningWarehouseDetail); |
| | | |
| | | } |
| | |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("materialStore") MaterialStore materialStore); |
| | | |
| | | MaterialStore getSelectMaterialStoreById(@Param("id") Long id); |
| | | |
| | | |
| | | Map<String,Integer> getSelectMaterialStorePageTotal(Integer offset, Integer pageSize, MaterialStore materialStore); |
| | | |
| | |
| | | @Mapper |
| | | public interface ReportMapper { |
| | | |
| | | List<Map<String, String>> processCardProgressMp(String orderId, FlowCard flowCard); |
| | | List<Map<String, String>> processCardProgressMp(String orderId); |
| | | } |
| | |
| | | package com.example.erp.mapper.sd; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.service.sd.BasicDateService; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface BasicDateMapper { |
| | | public interface BasicDateMapper extends BaseMapper<BasicData> { |
| | | |
| | | List<BasicData> getOrderBasicData(String type); |
| | | List<String> getOrderBasicDataType(String type); |
| | | |
| | | List<BasicData> getOrderBasicDataByTypeAndChildType(String type, String childType); |
| | | |
| | | List<BasicData> getBasicData(); |
| | | |
| | | List<BasicData> getBasicDataFirstType(); |
| | | |
| | | List<BasicData> getBasicDataLastType(); |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | @DS("sd") |
| | |
| | | boolean insertOrderProcessDetail(@Param("processDetailList") List<OrderProcessDetail> processDetailList); |
| | | |
| | | void updateQuantity(String reportingWorkId,String process,String type); |
| | | |
| | | List<Map<String,String>> filterOrderProcess(String orderId); |
| | | |
| | | List<Map<String,Integer>> getGlassLRow(String orderId); |
| | | |
| | | List<Map<String, String>> filterLastProcess(String orderId, String orderNumber, String technologyNumber,String id); |
| | | } |
| | |
| | | List<BasicWarehouseType> basicWarehouseType=basicWarehouseTypeMapper.getBasicWarehouseType(type); |
| | | for (BasicWarehouseType item : basicWarehouseType){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | map.put("id",item.getId()); |
| | | map.put("OperateTypeId",item.getOperateTypeId()); |
| | | map.put("OperateTypeName",item.getOperateTypeName()); |
| | | map.put("OperateType",item.getOperateType()); |
| | |
| | | |
| | | } |
| | | |
| | | public Map<String, List<Object>> getBasicWarehouseTypes(String type){ |
| | | //返回基础数据里的所有类型 |
| | | List<String> orderBasicDataType = basicWarehouseTypeMapper.getBasicWarehouse(type); |
| | | //返回此类型基础数据所有数据 |
| | | List<BasicWarehouseType> orderBasicData = basicWarehouseTypeMapper.getBasicWarehouseType(type); |
| | | Map<String, List<Object>> BasicDataMap = new HashMap<>(); |
| | | //创建List对象 |
| | | |
| | | //遍历订单基本数据类型 |
| | | for(String item :orderBasicDataType){ |
| | | List<Object> orderBasicDataList = new ArrayList<>(); |
| | | //将类型和List对象放入Map中 |
| | | BasicDataMap.put(item,orderBasicDataList); |
| | | } |
| | | //遍历订单基本数据 |
| | | |
| | | for (BasicWarehouseType item : orderBasicData){ |
| | | //将数据放入List中 |
| | | BasicDataMap.get(item.getOperateType()).add(item); |
| | | } |
| | | return BasicDataMap; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | finishedOperateLogMapper.insertOutFinishedOperateLog(orderDetail,userName,oddNumber); |
| | | Integer finishedGoodsInventorycount = finishedGoodsInventoryMapper.findOrderNumberdcount(orderDetail.getDeliveryDetail().getOrderId(),orderDetail.getDeliveryDetail().getOrderNumber()); |
| | | |
| | | |
| | | |
| | | Integer ordersum = finishedGoodsInventoryMapper.findOrderQuantity(orderDetail.getDeliveryDetail().getOrderId()); |
| | | Integer orderDeliveryQuantitySum = finishedGoodsInventoryMapper.findOrderDeliveryQuantitySum(orderDetail.getDeliveryDetail().getOrderId()); |
| | | |
New file |
| | |
| | | package com.example.erp.service.mm; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.mm.*; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.mm.BasicWarehouseTypeMapper; |
| | | import com.example.erp.mapper.mm.MaterialInventoryMapper; |
| | | import com.example.erp.mapper.mm.MaterialStoreMapper; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.text.DecimalFormat; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | | @DS("mm") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class MaterialInventoryService { |
| | | @Autowired |
| | | MaterialInventoryMapper materialInventoryMapper; |
| | | @Autowired |
| | | MaterialStoreMapper materialStoreMapper; |
| | | @Autowired |
| | | BasicWarehouseTypeMapper basicWarehouseTypeMapper; |
| | | @Autowired |
| | | SysErrorService sysErrorService; |
| | | |
| | | public Boolean saveMaterialOutbound(Map<String,Object> object) { |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | String materialOutboundId = ""; |
| | | String oddNumber; |
| | | if (object.get("materialOutboundId") != null) { |
| | | materialOutboundId = object.get("materialOutboundId").toString(); |
| | | } |
| | | try { |
| | | MaterialOutbound materialOutbound = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), MaterialOutbound.class); |
| | | List<MaterialOutboundDetail> materialOutboundDetailList = JSONArray.parseArray(JSONObject.toJSONString(object.get("materialOutboundDetail")), MaterialOutboundDetail.class); |
| | | //查询出库单是否存在 |
| | | Integer MaterialOutboundConut = materialInventoryMapper.getMaterialOutboundCount(materialOutboundId); |
| | | if (MaterialOutboundConut != 0) { |
| | | |
| | | List<MaterialOutboundDetail> materialOutboundDetailLists = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId); |
| | | if (!materialOutboundDetailLists.isEmpty()) { |
| | | for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailLists) { |
| | | //还原物料库存数 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableInt(materialOutboundDetail.getId(), materialOutboundDetail.getOutboundQuantity()); |
| | | } |
| | | } |
| | | //删除材料出库明细的数据 |
| | | materialInventoryMapper.deleteMaterialOutboundDetail(materialOutboundId); |
| | | oddNumber = materialOutboundId; |
| | | } else { |
| | | //获取单号 |
| | | oddNumber = orderNumberSetting("出库"); |
| | | //新增材料出库表数据 |
| | | materialInventoryMapper.insertMaterialOutbound(materialOutbound, oddNumber); |
| | | } |
| | | |
| | | //获取对象集合循环进行新增修改 |
| | | |
| | | if (!materialOutboundDetailList.isEmpty()) { |
| | | for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailList) { |
| | | |
| | | Integer materialOutboundDetailMaximum = materialInventoryMapper.getMaterialOutboundDetailMaximum(oddNumber); |
| | | //新增材料出库明细数据 |
| | | materialInventoryMapper.insertMaterialOutboundDetail(materialOutboundDetail, oddNumber, materialOutboundDetailMaximum + 1); |
| | | //修改物料库存表出库数量 |
| | | System.out.println(materialOutboundDetail.getInventoryId()); |
| | | materialInventoryMapper.updateMaterialInventoryAvailableOut(materialOutboundDetail.getId(), materialOutboundDetail.getOutboundQuantity()); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e.toString()); |
| | | sysError.setFunc("saveOrder"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = false; |
| | | |
| | | } |
| | | return saveState; |
| | | |
| | | } |
| | | |
| | | public Boolean saveMaterialInventory(Map<String,Object> object) { |
| | | boolean saveState = true; |
| | | Double singlePieceArea = 0.0; |
| | | Double totalArea = 0.0; |
| | | Long materialCode = 0L; |
| | | if (object.get("singlePieceArea") != null) { |
| | | singlePieceArea = Double.valueOf(object.get("singlePieceArea").toString()); |
| | | } |
| | | if (object.get("totalArea") != null) { |
| | | totalArea = Double.valueOf(object.get("totalArea").toString()); |
| | | } |
| | | if (object.get("materialCode") != null) { |
| | | materialCode = Long.valueOf(object.get("materialCode").toString()); |
| | | } |
| | | |
| | | MaterialInventory materialInventory = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), MaterialInventory.class); |
| | | |
| | | //查询物料是否存在 |
| | | Integer MaterialInventoryCount = materialInventoryMapper.getMaterialInventoryCount(materialCode,materialInventory.getDateOfManufacture()); |
| | | |
| | | if(MaterialInventoryCount>0){ |
| | | materialInventoryMapper.updateMaterialInventory(materialCode,singlePieceArea,totalArea,materialInventory); |
| | | }else { |
| | | materialInventoryMapper.insertMaterialInventory(materialCode,singlePieceArea,totalArea,materialInventory); |
| | | } |
| | | return saveState; |
| | | |
| | | } |
| | | |
| | | public Map<String, Object> getSelectMaterialInventoryDate(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.getSelectMaterialInventoryDate(offset, pageSize,startDate, endDate, materialInventory)); |
| | | map.put("total", materialInventoryMapper.getSelectMaterialInventoryDatePageTotal(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 Boolean deleteMaterialOutbound(Map<String,Object> object) { |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | String materialOutboundId = ""; |
| | | if (object.get("materialOutboundId") != null) { |
| | | materialOutboundId = object.get("materialOutboundId").toString(); |
| | | } |
| | | if(materialOutboundId!=null){ |
| | | materialInventoryMapper.deleteMaterialOutboundDetail(materialOutboundId); |
| | | materialInventoryMapper.deleteMaterialOutbound(materialOutboundId); |
| | | } |
| | | |
| | | |
| | | |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e.toString()); |
| | | sysError.setFunc("saveOrder"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = false; |
| | | |
| | | } |
| | | return saveState; |
| | | |
| | | } |
| | | |
| | | public Map<String, Object> getSelectMaterialOutboundDate(Integer pageNum, Integer pageSize, List<String> selectDate, MaterialOutbound materialOutbound) { |
| | | 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.getSelectMaterialOutboundDate(offset, pageSize,startDate, endDate, materialOutbound)); |
| | | map.put("total", materialInventoryMapper.getSelectMaterialOutboundDatePageTotal(offset, pageSize,startDate, endDate, materialOutbound)); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | 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); |
| | | map.put("materialOutbound", materialInventoryMapper.getSelectMaterialOutbound(offset, pageSize, materialOutboundDetail)); |
| | | map.put("data", materialInventoryMapper.getSelectMaterialOutboundDetail(offset, pageSize, materialOutboundDetail)); |
| | | map.put("total", materialInventoryMapper.getSelectMaterialOutboundDetailPageTotal(offset, pageSize, materialOutboundDetail)); |
| | | return map; |
| | | } |
| | | |
| | | public Boolean updateMaterialOutboundToExamine(Map<String,Object> object) { |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | String materialOutboundId = ""; |
| | | String reviewed = ""; |
| | | int type =0; |
| | | if (object.get("materialOutboundId") != null) { |
| | | materialOutboundId = object.get("materialOutboundId").toString(); |
| | | } |
| | | |
| | | if (object.get("type") != null) { |
| | | type = Integer.parseInt(object.get("type").toString()); |
| | | } |
| | | if (object.get("reviewed") != null) { |
| | | reviewed = object.get("reviewed").toString(); |
| | | } |
| | | |
| | | if (type==1){ |
| | | List<MaterialOutboundDetail> materialOutboundDetailList = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId); |
| | | if (!materialOutboundDetailList.isEmpty()) { |
| | | for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailList) { |
| | | //修改物料库存数量 |
| | | materialInventoryMapper.updateMaterialInventoryInventoryOut(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity()); |
| | | } |
| | | } |
| | | materialInventoryMapper.updateMaterialOutboundToExamine(materialOutboundId,type,reviewed); |
| | | }else{ |
| | | List<MaterialOutboundDetail> materialOutboundDetailList = materialInventoryMapper.getIsNotMaterialOutboundDetail(materialOutboundId); |
| | | if (!materialOutboundDetailList.isEmpty()) { |
| | | for (MaterialOutboundDetail materialOutboundDetail : materialOutboundDetailList) { |
| | | //修改物料库存数量 |
| | | materialInventoryMapper.updateMaterialInventoryInventoryInt(materialOutboundDetail.getInventoryId(), materialOutboundDetail.getOutboundQuantity()); |
| | | } |
| | | } |
| | | materialInventoryMapper.updateMaterialOutboundCounterExamination(materialOutboundId,type,reviewed); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e.toString()); |
| | | sysError.setFunc("saveOrder"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = false; |
| | | |
| | | } |
| | | return saveState; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | public Boolean saveReturningWarehouse(Map<String,Object> object) { |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | String returningId = ""; |
| | | String oddNumber; |
| | | if (object.get("returningId") != null) { |
| | | returningId = object.get("returningId").toString(); |
| | | } |
| | | ReturningWarehouse returningWarehouse = JSONObject.parseObject(JSONObject.toJSONString(object.get("title")), ReturningWarehouse.class); |
| | | List<ReturningWarehouseDetail> returningWarehouseDetailList = JSONArray.parseArray(JSONObject.toJSONString(object.get("returningWarehouseDetail")), ReturningWarehouseDetail.class); |
| | | //查询出库单是否存在 |
| | | Integer ReturningWarehouseConut = materialInventoryMapper.getReturningWarehouseCount(returningId); |
| | | if (ReturningWarehouseConut != 0) { |
| | | |
| | | List<ReturningWarehouseDetail> returningWarehouseDetailLists = materialInventoryMapper.getIsNotReturningWarehouseDetail(returningId); |
| | | if (!returningWarehouseDetailLists.isEmpty()) { |
| | | for (ReturningWarehouseDetail returningWarehouseDetail : returningWarehouseDetailLists) { |
| | | //还原物料库存数 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableOut(returningWarehouseDetail.getInventoryId(), returningWarehouseDetail.getReturnQuantity()); |
| | | } |
| | | } |
| | | //删除材料出库明细的数据 |
| | | materialInventoryMapper.deleteReturningWarehouseDetail(returningId); |
| | | oddNumber = returningId; |
| | | } else { |
| | | //获取单号 |
| | | oddNumber = orderNumberSetting("返库"); |
| | | //新增材料出库表数据 |
| | | materialInventoryMapper.insertReturningWarehouse(returningWarehouse, oddNumber); |
| | | } |
| | | |
| | | |
| | | //获取对象集合循环进行新增修改 |
| | | if (!returningWarehouseDetailList.isEmpty()) { |
| | | for (ReturningWarehouseDetail returningWarehouseDetail : returningWarehouseDetailList) { |
| | | |
| | | Integer returningWarehouseDetailMaximum = materialInventoryMapper.getReturningWarehouseDetailMaximum(oddNumber); |
| | | //新增材料出库明细数据 |
| | | materialInventoryMapper.insertReturningWarehouseDetail(returningWarehouseDetail, oddNumber, returningWarehouseDetailMaximum + 1); |
| | | |
| | | double singlePieceArea=0.0; |
| | | double totalArea=0.0; |
| | | String json=""; |
| | | MaterialStore materialStore=materialStoreMapper.getSelectMaterialStoreById(returningWarehouseDetail.getId()); |
| | | json=materialStore.getJson().substring(1, materialStore.getJson().length() - 1); |
| | | |
| | | |
| | | double width= convert(json,"\"width\""); |
| | | double height=convert(json,"\"height\""); |
| | | DecimalFormat decimalFormat = new DecimalFormat("#0.00"); |
| | | singlePieceArea= Double.parseDouble(decimalFormat.format(width * height / 100000)); |
| | | totalArea= Double.parseDouble(decimalFormat.format(singlePieceArea * returningWarehouseDetail.getReturnQuantity())); |
| | | |
| | | |
| | | //查询物料是否存在 |
| | | Integer MaterialInventoryCount=0; |
| | | if (returningWarehouseDetail.getDateOfManufacture()!=null){ |
| | | MaterialInventoryCount = materialInventoryMapper.getMaterialInventoryCount(returningWarehouseDetail.getId(),returningWarehouseDetail.getDateOfManufacture()); |
| | | }else{ |
| | | MaterialInventoryCount = materialInventoryMapper.getMaterialInventoryCountNull(returningWarehouseDetail.getId()); |
| | | } |
| | | |
| | | |
| | | if(MaterialInventoryCount>0){ |
| | | if (returningWarehouseDetail.getDateOfManufacture()!=null){ |
| | | materialInventoryMapper.updateMaterialInventoryReturning(returningWarehouseDetail.getId(),singlePieceArea,totalArea,returningWarehouseDetail); |
| | | }else{ |
| | | materialInventoryMapper.updateMaterialInventoryReturningNull(returningWarehouseDetail.getId(),singlePieceArea,totalArea,returningWarehouseDetail); |
| | | } |
| | | |
| | | }else { |
| | | materialInventoryMapper.insertMaterialInventoryReturning(returningWarehouseDetail.getId(),singlePieceArea,totalArea,returningWarehouseDetail); |
| | | } |
| | | |
| | | //获取库存编号添加到返库明细表 |
| | | List<MaterialInventory> MaterialInventoryId; |
| | | if (returningWarehouseDetail.getDateOfManufacture()!=null){ |
| | | MaterialInventoryId = materialInventoryMapper.getMaterialInventoryCountId(returningWarehouseDetail.getId(),returningWarehouseDetail.getDateOfManufacture()); |
| | | }else{ |
| | | MaterialInventoryId = materialInventoryMapper.getMaterialInventoryCountNullId(returningWarehouseDetail.getId()); |
| | | } |
| | | materialInventoryMapper.updateReturningWarehouseDetail(oddNumber, returningWarehouseDetailMaximum + 1,MaterialInventoryId.get(0).getId()); |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | return saveState; |
| | | |
| | | } |
| | | |
| | | |
| | | public Map<String, Object> getSelectReturningWarehouse(Integer pageNum, Integer pageSize, ReturningWarehouseDetail returningWarehouseDetail) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("returningWarehouse", materialInventoryMapper.getSelectReturningWarehouse(offset, pageSize, returningWarehouseDetail)); |
| | | map.put("data", materialInventoryMapper.getSelectReturningWarehouseDetail(offset, pageSize, returningWarehouseDetail)); |
| | | map.put("total", materialInventoryMapper.getSelectReturningWarehouseDetailPageTotal(offset, pageSize, returningWarehouseDetail)); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | public Boolean updateReturningWarehouseToExamine(Map<String,Object> object) { |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | String returningId = ""; |
| | | String reviewed = ""; |
| | | int type =0; |
| | | if (object.get("returningId") != null) { |
| | | returningId = object.get("returningId").toString(); |
| | | } |
| | | |
| | | if (object.get("type") != null) { |
| | | type = Integer.parseInt(object.get("type").toString()); |
| | | } |
| | | if (object.get("reviewed") != null) { |
| | | reviewed = object.get("reviewed").toString(); |
| | | } |
| | | |
| | | if (type==1){ |
| | | List<ReturningWarehouseDetail> returningWarehouseDetailList = materialInventoryMapper.getIsNotReturningWarehouseDetail(returningId); |
| | | if (!returningWarehouseDetailList.isEmpty()) { |
| | | for (ReturningWarehouseDetail returningWarehouseDetail : returningWarehouseDetailList) { |
| | | //修改物料库存数量 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableInt(returningWarehouseDetail.getInventoryId(), returningWarehouseDetail.getReturnQuantity()); |
| | | } |
| | | } |
| | | materialInventoryMapper.updateReturningWarehouseToExamine(returningId,type,reviewed); |
| | | }else{ |
| | | List<ReturningWarehouseDetail> returningWarehouseDetailList = materialInventoryMapper.getIsNotReturningWarehouseDetail(returningId); |
| | | if (!returningWarehouseDetailList.isEmpty()) { |
| | | for (ReturningWarehouseDetail returningWarehouseDetail : returningWarehouseDetailList) { |
| | | //修改物料库存数量 |
| | | materialInventoryMapper.updateMaterialInventoryAvailableOut(returningWarehouseDetail.getInventoryId(), returningWarehouseDetail.getReturnQuantity()); |
| | | } |
| | | } |
| | | materialInventoryMapper.updateReturningWarehouseCounterExamination(returningId,type,reviewed); |
| | | } |
| | | |
| | | } catch (Exception e) { |
| | | TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint); |
| | | //将异常传入数据库 |
| | | SysError sysError = new SysError(); |
| | | sysError.setError(e.toString()); |
| | | sysError.setFunc("saveOrder"); |
| | | sysErrorService.insert(sysError); |
| | | saveState = false; |
| | | |
| | | } |
| | | return saveState; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | public Map<String, Object> getSelectReturningWarehouseDate(Integer pageNum, Integer pageSize, List<String> selectDate, ReturningWarehouse returningWarehouse) { |
| | | 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.getSelectReturningWarehouseDate(offset, pageSize,startDate, endDate, returningWarehouse)); |
| | | map.put("total", materialInventoryMapper.getSelectReturningWarehouseDatePageTotal(offset, pageSize,startDate, endDate, returningWarehouse)); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | return map; |
| | | } |
| | | |
| | | |
| | | |
| | | public String orderNumberSetting(String type) { |
| | | //根据类型自动生成不同的操作单号 |
| | | String alias=""; |
| | | Integer maximum=0; |
| | | if(Objects.equals(type, "出库")){ |
| | | alias="CK"; |
| | | maximum=materialInventoryMapper.getMaximum(type); |
| | | } |
| | | if(Objects.equals(type, "返库")){ |
| | | alias="FK"; |
| | | maximum=materialInventoryMapper.getMaximums(type); |
| | | } |
| | | //查询当天的最大数量 |
| | | |
| | | //设置两位不够补0 |
| | | String formattedNumber = String.format("%02d", maximum+1); |
| | | //格式化当前日期 |
| | | Date currentDate = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yyMMdd"); |
| | | String formattedDate = dateFormat.format(currentDate); |
| | | String oddNumbers = alias+formattedDate+formattedNumber; |
| | | return oddNumbers; |
| | | } |
| | | |
| | | |
| | | public double convert(String json,String string) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | String[] keyValues = json.split(","); |
| | | for (String keyValue : keyValues) { |
| | | String[] pair = keyValue.split(":"); |
| | | if (pair.length == 2) { |
| | | map.put(pair[0], pair[1]); |
| | | } |
| | | } |
| | | double number=0.0; |
| | | if(map.get(string)!=null){ |
| | | String[] widthStrings = map.get(string).toString().split("\\D+"); |
| | | for (String numberString : widthStrings) { |
| | | if (!numberString.isEmpty()) { |
| | | number= Double.parseDouble(numberString); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | return number; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
File was renamed from north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialService.java |
| | |
| | | package com.example.erp.service.mm; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.mm.FinishedGoodsInventory; |
| | | import com.example.erp.entity.mm.FinishedOperateLog; |
| | | import com.example.erp.entity.mm.MaterialStore; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Customer; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import com.example.erp.entity.sd.Product; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.mm.BasicWarehouseTypeMapper; |
| | | import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper; |
| | | import com.example.erp.mapper.mm.FinishedOperateLogMapper; |
| | | import com.example.erp.mapper.mm.MaterialStoreMapper; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.transaction.interceptor.TransactionAspectSupport; |
| | | |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | |
| | | @Service |
| | | @DS("mm") |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public class MaterialService { |
| | | public class MaterialStoreService { |
| | | @Autowired |
| | | MaterialStoreMapper materialStoreMapper; |
| | | @Autowired |
| | |
| | | |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.mapper.pp.ReportMapper; |
| | | import com.example.erp.mapper.sd.OrderProcessDetailMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.sql.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Service |
| | | @DS("sd") |
| | | @DS("pp") |
| | | public class ReportService { |
| | | @Autowired |
| | | ReportMapper reportMapper; |
| | | private final ReportMapper reportMapper; |
| | | |
| | | private final OrderProcessDetailMapper orderProcessDetailMapper; |
| | | |
| | | public Map<String, Object> processCardProgressSv(String orderId, FlowCard flowCard) { |
| | | public ReportService(ReportMapper reportMapper, OrderProcessDetailMapper orderProcessDetailMapper) { |
| | | this.reportMapper = reportMapper; |
| | | this.orderProcessDetailMapper = orderProcessDetailMapper; |
| | | } |
| | | |
| | | //流程卡进度方法 |
| | | public Map<String, Object> processCardProgressSv(String orderId, List<Integer> columns) { |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", reportMapper.processCardProgressMp(orderId, flowCard)); |
| | | //获取表格内容数据 |
| | | map.put("data", reportMapper.processCardProgressMp(orderId)); |
| | | |
| | | //获取表头工序筛选数据 |
| | | List<Map<String,String>> processFilterList = orderProcessDetailMapper.filterOrderProcess(orderId); |
| | | List<Map<String,String>> processList = processFilterList; |
| | | |
| | | List<String> filterList = new ArrayList<>(); |
| | | //循环遍历数组,判断此序号当前的工序 |
| | | for (int i = 1; i < processFilterList.size(); i++) { |
| | | filterList.add(processFilterList.get(i).get("process")); |
| | | List<Map<String,String>> lastProcessList = |
| | | orderProcessDetailMapper.filterLastProcess( |
| | | orderId, |
| | | String.valueOf(processFilterList.get(i).get("order_number")), |
| | | String.valueOf(processFilterList.get(i).get("technology_number")), |
| | | String.valueOf(processFilterList.get(i).get("id")) |
| | | ); |
| | | if(!lastProcessList.isEmpty()){ |
| | | int finalI = i; |
| | | lastProcessList.forEach(lastProcess -> { |
| | | if(filterList.contains(lastProcess.get("process"))){ |
| | | processList.add(lastProcess); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | // 使用HashSet来记录已经遇到的value值 |
| | | Set<String> seenValues = new HashSet<>(); |
| | | // 创建一个新的List来存储结果 |
| | | List<Map<String, String>> uniqueList = new ArrayList<>(); |
| | | |
| | | // 反向遍历原始List |
| | | for (int i = processList.size() - 1; i >= 0; i--) { |
| | | Map<String, String> maps = processList.get(i); |
| | | String value = maps.values().iterator().next(); // 假设每个Map只有一个value |
| | | |
| | | // 如果value还没有被看到过,就添加到结果List和HashSet中 |
| | | if (!seenValues.contains(value)) { |
| | | uniqueList.add(0, maps); // 添加到结果List的开头,以保持原顺序 |
| | | seenValues.add(value); |
| | | } |
| | | } |
| | | map.put("title", uniqueList ); |
| | | |
| | | |
| | | |
| | | |
| | | List<Map<String,Integer>> getRowCount = orderProcessDetailMapper.getGlassLRow(orderId); |
| | | List<Map<String,Integer>> rowCount = new ArrayList<>(); |
| | | columns.forEach(col ->{ |
| | | getRowCount.forEach(row ->{ |
| | | Map<String,Integer> getRow = new HashMap<>(); |
| | | // { row: 0, col: 1, rowspan: 3, colspan: 0}, |
| | | getRow.put("row",row.get("RowNum")); |
| | | getRow.put("col",col); |
| | | getRow.put("rowspan",row.get("rowCount")); |
| | | getRow.put("colspan",0); |
| | | rowCount.add(getRow); |
| | | }); |
| | | }); |
| | | |
| | | |
| | | map.put("mergeCells",rowCount); |
| | | |
| | | return map; |
| | | } |
| | | } |
| | |
| | | return basicDateMapper.getOrderBasicDataByTypeAndChildType(type, childType); |
| | | |
| | | } |
| | | |
| | | public List<BasicData> getBasicData() { |
| | | return basicDateMapper.getBasicData(); |
| | | } |
| | | |
| | | public Object getBasicDataType() { |
| | | List<BasicData> lastType = basicDateMapper.getBasicDataLastType(); |
| | | List<BasicData> firstType= basicDateMapper.getBasicDataFirstType(); |
| | | List<Map<String,Object>> list = new ArrayList<>(); |
| | | if(!firstType.isEmpty()){ |
| | | firstType.forEach(item->{ |
| | | Map<String,Object> map = new HashMap<>(); |
| | | List<Map<String,String>> lastTypeList = new ArrayList<>(); |
| | | lastType.forEach(item1->{ |
| | | Map<String,String> map1 = new HashMap<>(); |
| | | if(Objects.equals(item.getBasicType(), item1.getBasicType())){ |
| | | map1.put("value",item1.getBasicCategory()); |
| | | map1.put("label",item1.getBasicCategory()); |
| | | lastTypeList.add(map1); |
| | | } |
| | | }); |
| | | map.put("children",lastTypeList); |
| | | map.put("value",item.getBasicType()); |
| | | map.put("label",item.getBasicType()); |
| | | list.add(map); |
| | | }); |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | public boolean addBasicData(Map<String, Object> map) { |
| | | List<String> basicTypeList = (List<String>) map.get("basicType"); |
| | | if(basicTypeList.size()==2){ |
| | | BasicData basicData = new BasicData(); |
| | | basicData.setBasicType(basicTypeList.get(0)); |
| | | basicData.setBasicCategory(basicTypeList.get(1)); |
| | | basicData.setBasicName(map.get("input").toString()); |
| | | basicDateMapper.insert(basicData); |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | public int deleteBasicData(BasicData basicData) { |
| | | |
| | | return basicDateMapper.deleteById(basicData.getId()); |
| | | } |
| | | |
| | | public int updateBasicData(BasicData basicData) { |
| | | return basicDateMapper.updateById(basicData); |
| | | } |
| | | } |
| | |
| | | </select> |
| | | |
| | | <select id="getBasicWarehouseType" > |
| | | select * from mm.basic_warehouse_type where type=#{type}; |
| | | select * from mm.basic_warehouse_type where type regexp #{type} group by operate_type_name; |
| | | </select> |
| | | |
| | | <select id="getBasicWarehouse" > |
| | | select operate_type from mm.basic_warehouse_type where type=#{type}; |
| | | </select> |
| | | |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.mm.MaterialInventoryMapper"> |
| | | |
| | | |
| | | |
| | | <select id="getSelectMaterialInventoryDate"> |
| | | select |
| | | mi.id, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | mi.material_code AS materialCode, |
| | | mi.producer, |
| | | mi.inventory_quantity AS inventoryQuantity, |
| | | mi.available_quantity AS availableQuantity, |
| | | 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 mm.material_inventory mi left join mm.material_store ms on mi.material_code=ms.id |
| | | <where> |
| | | date(mi.create_time)>=#{startDate} and date(mi.create_time) <= #{endDate} and mi.available_quantity>0 |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialInventoryDatePageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | mm.material_inventory mi |
| | | <where> |
| | | date(mi.create_time)>=#{startDate} and date(mi.create_time) <= #{endDate} and mi.available_quantity>0 |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectMaterialInventory"> |
| | | select |
| | | mi.id, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | mi.material_code AS materialCode, |
| | | mi.producer, |
| | | mi.inventory_quantity AS inventoryQuantity, |
| | | mi.available_quantity AS availableQuantity, |
| | | 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 mm.material_inventory mi left join mm.material_store ms on mi.material_code=ms.id |
| | | <where> |
| | | <if test="materialInventory.stockId != null and materialInventory.stockId != ''"> |
| | | and mi.id regexp #{materialInventory.stockId} |
| | | </if> |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialInventoryPageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | mm.material_inventory mi |
| | | <where> |
| | | <if test="materialInventory.id != null and materialInventory.id != ''"> |
| | | and mi.id regexp #{materialInventory.id} |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectMaterialOutboundDate"> |
| | | select |
| | | * |
| | | from |
| | | mm.material_outbound mo |
| | | <where> |
| | | date(mo.create_time)>=#{startDate} and date(mo.create_time) <= #{endDate} |
| | | <if test="materialOutbound.materialOutboundId != null and materialOutbound.materialOutboundId != ''"> |
| | | and mo.material_outbound_id regexp #{materialOutbound.materialOutboundId} |
| | | </if> |
| | | <if test="materialOutbound.materialRequisitionPersonnel != null and materialOutbound.materialRequisitionPersonnel != ''"> |
| | | and mo.material_requisition_personnel regexp #{materialOutbound.materialRequisitionPersonnel} |
| | | </if> |
| | | <if test="materialOutbound.materialRequisitionTeam != null and materialOutbound.materialRequisitionTeam != ''"> |
| | | and mo.material_requisition_team regexp #{materialOutbound.materialRequisitionTeam} |
| | | </if> |
| | | <if test="materialOutbound.orderId != null and materialOutbound.orderId != ''"> |
| | | and mo.order_id regexp #{materialOutbound.orderId} |
| | | </if> |
| | | <if test="materialOutbound.outboundType != null and materialOutbound.outboundType != ''"> |
| | | and mo.outbound_type regexp #{materialOutbound.outboundType} |
| | | </if> |
| | | <if test="materialOutbound.warehouseManager != null and materialOutbound.warehouseManager != ''"> |
| | | and mo.warehouse_manager regexp #{materialOutbound.warehouseManager} |
| | | </if> |
| | | <if test="materialOutbound.reviewed != null and materialOutbound.reviewed != ''"> |
| | | and mo.reviewed regexp #{materialOutbound.reviewed} |
| | | </if> |
| | | </where> |
| | | order by mo.reviewed_state desc,mo.create_time desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialOutboundDatePageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | mm.material_outbound mo |
| | | <where> |
| | | date(mo.create_time)>=#{startDate} and date(mo.create_time) <= #{endDate} |
| | | <if test="materialOutbound.materialOutboundId != null and materialOutbound.materialOutboundId != ''"> |
| | | and mo.material_outbound_id regexp #{materialOutbound.materialOutboundId} |
| | | </if> |
| | | <if test="materialOutbound.materialRequisitionPersonnel != null and materialOutbound.materialRequisitionPersonnel != ''"> |
| | | and mo.material_requisition_personnel regexp #{materialOutbound.materialRequisitionPersonnel} |
| | | </if> |
| | | <if test="materialOutbound.materialRequisitionTeam != null and materialOutbound.materialRequisitionTeam != ''"> |
| | | and mo.material_requisition_team regexp #{materialOutbound.materialRequisitionTeam} |
| | | </if> |
| | | <if test="materialOutbound.orderId != null and materialOutbound.orderId != ''"> |
| | | and mo.order_id regexp #{materialOutbound.orderId} |
| | | </if> |
| | | <if test="materialOutbound.outboundType != null and materialOutbound.outboundType != ''"> |
| | | and mo.outbound_type regexp #{materialOutbound.outboundType} |
| | | </if> |
| | | <if test="materialOutbound.warehouseManager != null and materialOutbound.warehouseManager != ''"> |
| | | and mo.warehouse_manager regexp #{materialOutbound.warehouseManager} |
| | | </if> |
| | | <if test="materialOutbound.reviewed != null and materialOutbound.reviewed != ''"> |
| | | and mo.reviewed regexp #{materialOutbound.reviewed} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectReturningWarehouseDate"> |
| | | select |
| | | * |
| | | from |
| | | mm.returning_warehouse rw |
| | | <where> |
| | | date(rw.create_time)>=#{startDate} and date(rw.create_time) <= #{endDate} |
| | | <if test="returningWarehouse.returningId != null and returningWarehouse.returningId != ''"> |
| | | and rw.returning_id regexp #{returningWarehouse.returningId} |
| | | </if> |
| | | <if test="returningWarehouse.materialRequisitionPersonnel != null and returningWarehouse.materialRequisitionPersonnel != ''"> |
| | | and rw.material_requisition_personnel regexp #{returningWarehouse.materialRequisitionPersonnel} |
| | | </if> |
| | | <if test="returningWarehouse.materialRequisitionTeam != null and returningWarehouse.materialRequisitionTeam != ''"> |
| | | and rw.material_requisition_team regexp #{returningWarehouse.materialRequisitionTeam} |
| | | </if> |
| | | <if test="returningWarehouse.orderId != null and returningWarehouse.orderId != ''"> |
| | | and rw.order_id regexp #{returningWarehouse.orderId} |
| | | </if> |
| | | <if test="returningWarehouse.returningType != null and returningWarehouse.returningType != ''"> |
| | | and rw.returning_type regexp #{returningWarehouse.returningType} |
| | | </if> |
| | | <if test="returningWarehouse.warehouseManager != null and returningWarehouse.warehouseManager != ''"> |
| | | and rw.warehouse_manager regexp #{returningWarehouse.warehouseManager} |
| | | </if> |
| | | <if test="returningWarehouse.reviewed != null and returningWarehouse.reviewed != ''"> |
| | | and rw.reviewed regexp #{returningWarehouse.reviewed} |
| | | </if> |
| | | <if test="returningWarehouse.project != null and returningWarehouse.project != ''"> |
| | | and rw.project regexp #{returningWarehouse.project} |
| | | </if> |
| | | <if test="returningWarehouse.batch != null and returningWarehouse.batch != ''"> |
| | | and rw.batch regexp #{returningWarehouse.batch} |
| | | </if> |
| | | |
| | | |
| | | |
| | | </where> |
| | | order by rw.reviewed_state desc,rw.create_time desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectReturningWarehouseDatePageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | mm.returning_warehouse rw |
| | | <where> |
| | | date(rw.create_time)>=#{startDate} and date(rw.create_time) <= #{endDate} |
| | | <if test="returningWarehouse.returningId != null and returningWarehouse.returningId != ''"> |
| | | and rw.returning_id regexp #{returningWarehouse.returningId} |
| | | </if> |
| | | <if test="returningWarehouse.materialRequisitionPersonnel != null and returningWarehouse.materialRequisitionPersonnel != ''"> |
| | | and rw.material_requisition_personnel regexp #{returningWarehouse.materialRequisitionPersonnel} |
| | | </if> |
| | | <if test="returningWarehouse.materialRequisitionTeam != null and returningWarehouse.materialRequisitionTeam != ''"> |
| | | and rw.material_requisition_team regexp #{returningWarehouse.materialRequisitionTeam} |
| | | </if> |
| | | <if test="returningWarehouse.orderId != null and returningWarehouse.orderId != ''"> |
| | | and rw.order_id regexp #{returningWarehouse.orderId} |
| | | </if> |
| | | <if test="returningWarehouse.returningType != null and returningWarehouse.returningType != ''"> |
| | | and rw.returning_type regexp #{returningWarehouse.returningType} |
| | | </if> |
| | | <if test="returningWarehouse.warehouseManager != null and returningWarehouse.warehouseManager != ''"> |
| | | and rw.warehouse_manager regexp #{returningWarehouse.warehouseManager} |
| | | </if> |
| | | <if test="returningWarehouse.reviewed != null and returningWarehouse.reviewed != ''"> |
| | | and rw.reviewed regexp #{returningWarehouse.reviewed} |
| | | </if> |
| | | <if test="returningWarehouse.project != null and returningWarehouse.project != ''"> |
| | | and rw.project regexp #{returningWarehouse.project} |
| | | </if> |
| | | <if test="returningWarehouse.batch != null and returningWarehouse.batch != ''"> |
| | | and rw.batch regexp #{returningWarehouse.batch} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialOutbound"> |
| | | select |
| | | * |
| | | from |
| | | mm.material_outbound mo |
| | | <where> |
| | | <if test="materialOutboundDetail.materialOutboundId != null and materialOutboundDetail.materialOutboundId != ''"> |
| | | and mo.material_outbound_id regexp #{materialOutboundDetail.materialOutboundId} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialOutboundDetail" > |
| | | select |
| | | 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, |
| | | mi.inventory_quantity as inventoryQuantity, |
| | | 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="getSelectMaterialOutboundDetailPageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | 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> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectReturningWarehouse"> |
| | | select |
| | | * |
| | | from |
| | | mm.returning_warehouse rw |
| | | <where> |
| | | <if test="returningWarehouseDetail.returningId != null and returningWarehouseDetail.returningId != ''"> |
| | | and returning_id regexp #{returningWarehouseDetail.returningId} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectReturningWarehouseDetail" > |
| | | select |
| | | rwd.inventory_id as inventoryId, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | rwd.material_code as id, |
| | | mi.producer, |
| | | rwd.return_quantity as returnQuantity, |
| | | date(mi.date_of_manufacture) as dateOfManufacture, |
| | | mi.single_piece_area as singlePieceArea, |
| | | mi.inventory_area as inventoryArea, |
| | | rwd.remarks, |
| | | mi.inventory_quantity as inventoryQuantity, |
| | | ms.json |
| | | from mm.returning_warehouse_detail rwd left join mm.material_inventory mi on rwd.inventory_id=mi.id |
| | | left join mm.returning_warehouse rw on rwd.returning_id=rw.returning_id |
| | | left join mm.material_store ms on rwd.material_code=ms.id |
| | | <where> |
| | | <if test="returningWarehouseDetail.returningId != null and returningWarehouseDetail.returningId != ''"> |
| | | and rwd.returning_id regexp #{returningWarehouseDetail.returningId} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectReturningWarehouseDetailPageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | mm.returning_warehouse_detail rwd |
| | | <where> |
| | | <if test="returningWarehouseDetail.returningId != null and returningWarehouseDetail.returningId != ''"> |
| | | and rwd.returning_id regexp #{returningWarehouseDetail.returningId} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertMaterialStore" useGeneratedKeys="true" > |
| | | insert into mm.material_store (type,json,create_time |
| | | ) |
| | | values ( |
| | | #{type},#{json},now() |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateMaterialStore" > |
| | | update mm.material_store set json=#{json} where id=#{id} |
| | | </update> |
| | | |
| | | <delete id="deleteMaterialOutbound" > |
| | | delete from mm.material_outbound where material_outbound_id=#{materialOutboundId} |
| | | </delete> |
| | | |
| | | <delete id="deleteMaterialOutboundDetail" > |
| | | delete from mm.material_outbound_detail where material_outbound_id=#{materialOutboundId} |
| | | </delete> |
| | | |
| | | <delete id="deleteReturningWarehouseDetail" > |
| | | delete from mm.returning_warehouse_detail where returning_id=#{returningId} |
| | | </delete> |
| | | |
| | | <select id="getMaximum" > |
| | | select count(*) from mm.material_outbound where date(create_time)=CURDATE() |
| | | </select> |
| | | |
| | | <select id="getMaximums" > |
| | | select count(*) from mm.returning_warehouse where date(create_time)=CURDATE() |
| | | </select> |
| | | |
| | | <select id="getMaterialOutboundCount" > |
| | | select count(*) from mm.material_outbound where material_outbound_id=#{materialOutboundId} |
| | | </select> |
| | | |
| | | <select id="getReturningWarehouseCount" > |
| | | select count(*) from mm.returning_warehouse where returning_id=#{returningId} |
| | | </select> |
| | | |
| | | <select id="getMaterialOutboundDetailMaximum" > |
| | | select count(*) from mm.material_outbound_detail where material_outbound_id=#{materialOutboundId} |
| | | </select> |
| | | |
| | | <select id="getReturningWarehouseDetailMaximum" > |
| | | select count(*) from mm.returning_warehouse where returning_id=#{returningId} |
| | | </select> |
| | | |
| | | <select id="getMaterialInventoryCount" > |
| | | select count(*) from mm.material_inventory where material_code=#{materialCode} and date_of_manufacture=#{dateOfManufacture} |
| | | </select> |
| | | |
| | | <select id="getMaterialInventoryCountNull" > |
| | | select count(*) from mm.material_inventory where material_code=#{materialCode} and date_of_manufacture is null |
| | | </select> |
| | | |
| | | <select id="getMaterialInventoryCountId" > |
| | | select id from mm.material_inventory where material_code=#{materialCode} and date_of_manufacture=#{dateOfManufacture} |
| | | </select> |
| | | |
| | | <select id="getMaterialInventoryCountNullId" > |
| | | select id from mm.material_inventory where material_code=#{materialCode} and date_of_manufacture is null |
| | | </select> |
| | | |
| | | <select id="getIsNotMaterialOutboundDetail" > |
| | | select * from mm.material_outbound_detail where material_outbound_id=#{materialOutboundId} |
| | | </select> |
| | | |
| | | <select id="getIsNotReturningWarehouseDetail" > |
| | | select * from mm.returning_warehouse_detail where returning_id=#{returningId} |
| | | </select> |
| | | |
| | | <insert id="insertMaterialOutbound" useGeneratedKeys="true" > |
| | | insert into mm.material_outbound(material_outbound_id,material_requisition_personnel,material_requisition_team,order_id,outbound_type, |
| | | warehouse_manager,material_requisition_date,reviewed_state,create_time) |
| | | values ( |
| | | #{number} ,#{materialOutbound.materialRequisitionPersonnel},#{materialOutbound.materialRequisitionTeam}, |
| | | #{materialOutbound.orderId},#{materialOutbound.outboundType},#{materialOutbound.warehouseManager},#{materialOutbound.materialRequisitionDate}, |
| | | 0,now() |
| | | ) |
| | | </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, |
| | | height,thickness,outbound_quantity,single_piece_area,inventory_area,date_of_manufacture,remarks) |
| | | values ( |
| | | #{number} ,#{materialOutboundNumber},#{materialOutboundDetail.materialCode},#{materialOutboundDetail.materialName},#{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> |
| | | |
| | | <insert id="insertMaterialInventory" useGeneratedKeys="true" > |
| | | insert into mm.material_inventory (inventory_organization, material_code, producer, stock_id, |
| | | inventory_quantity, available_quantity, safety_stock, total_area, single_piece_area, |
| | | date_of_manufacture, quality_guarantee_period, inventory_area, dead_stock, remarks, create_time) |
| | | values ( |
| | | #{materialInventory.inventoryOrganization} ,#{materialCode}, |
| | | #{materialInventory.producer},0,#{materialInventory.inventoryQuantity},#{materialInventory.inventoryQuantity},0, |
| | | #{totalArea},#{singlePieceArea},#{materialInventory.dateOfManufacture},#{materialInventory.qualityGuaranteePeriod}, |
| | | #{materialInventory.inventoryArea},0,#{materialInventory.remarks},now() |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertMaterialInventoryReturning" useGeneratedKeys="true" > |
| | | insert into mm.material_inventory (inventory_organization, material_code, producer, stock_id, |
| | | inventory_quantity, available_quantity, safety_stock, total_area, single_piece_area, |
| | | date_of_manufacture, quality_guarantee_period, inventory_area, dead_stock, remarks, create_time) |
| | | values ( |
| | | #{returningWarehouseDetail.inventoryOrganization} ,#{materialCode}, |
| | | #{returningWarehouseDetail.producer},0,#{returningWarehouseDetail.returnQuantity},0,0, |
| | | #{totalArea},#{singlePieceArea},#{returningWarehouseDetail.dateOfManufacture},#{returningWarehouseDetail.qualityGuaranteePeriod}, |
| | | #{returningWarehouseDetail.inventoryArea},0,#{returningWarehouseDetail.remarks},now() |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <insert id="insertReturningWarehouse" useGeneratedKeys="true" > |
| | | insert into mm.returning_warehouse(returning_id, returning_type, material_requisition_personnel, material_requisition_team, |
| | | warehouse_manager, reviewed_state, order_id, batch, project, create_time) |
| | | values ( |
| | | #{number} ,#{returningWarehouse.returningType},#{returningWarehouse.materialRequisitionPersonnel},#{returningWarehouse.materialRequisitionTeam}, |
| | | #{returningWarehouse.warehouseManager},0,#{returningWarehouse.orderId},#{returningWarehouse.batch},#{returningWarehouse.project},now() |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertReturningWarehouseDetail" useGeneratedKeys="true" > |
| | | insert into mm.returning_warehouse_detail (returning_id, returning_number, inventory_id, material_code, return_quantity,date_of_manufacture, remarks) |
| | | values ( |
| | | #{number} ,#{returningWarehouseNumber},#{returningWarehouseDetail.inventoryId},#{returningWarehouseDetail.id}, |
| | | #{returningWarehouseDetail.returnQuantity},#{returningWarehouseDetail.dateOfManufacture},#{returningWarehouseDetail.remarks} |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateMaterialInventoryAvailableOut"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity-#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableInt"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity+#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryOut"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity-#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryInt"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity+#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableInventoryOut"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity-#{quantity},inventory_quantity=inventory_quantity-#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableInventoryInt"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity+#{quantity},inventory_quantity=inventory_quantity+#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | |
| | | <update id="updateMaterialOutboundToExamine"> |
| | | update mm.material_outbound set reviewed_state=#{reviewedState},reviewed=#{reviewed},reviewed_time=now() |
| | | where material_outbound_id=#{materialOutboundId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialOutboundCounterExamination"> |
| | | update mm.material_outbound set reviewed_state=#{reviewedState} |
| | | where material_outbound_id=#{materialOutboundId} |
| | | </update> |
| | | |
| | | <update id="updateReturningWarehouseToExamine"> |
| | | update mm.returning_warehouse set reviewed_state=#{reviewedState},reviewed=#{reviewed},reviewed_time=now() |
| | | where returning_id=#{returningId} |
| | | </update> |
| | | |
| | | <update id="updateReturningWarehouseCounterExamination"> |
| | | update mm.returning_warehouse set reviewed_state=#{reviewedState} |
| | | where returning_id=#{returningId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventory" > |
| | | update mm.material_inventory set inventory_quantity=inventory_quantity+#{materialInventory.inventoryQuantity}, |
| | | available_quantity=available_quantity+#{materialInventory.inventoryQuantity}, |
| | | total_area=total_area+#{totalArea} |
| | | where material_code=#{materialCode} and date_of_manufacture=#{materialInventory.dateOfManufacture} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryReturning" > |
| | | update mm.material_inventory set inventory_quantity=inventory_quantity+#{returningWarehouseDetail.returnQuantity}, |
| | | total_area=total_area+#{totalArea} |
| | | where material_code=#{materialCode} and |
| | | date_of_manufacture=#{returningWarehouseDetail.dateOfManufacture} |
| | | |
| | | |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryReturningNull" > |
| | | update mm.material_inventory set inventory_quantity=inventory_quantity+#{returningWarehouseDetail.returnQuantity}, |
| | | total_area=total_area+#{totalArea} |
| | | where material_code=#{materialCode} and |
| | | date_of_manufacture is null |
| | | |
| | | |
| | | </update> |
| | | |
| | | <update id="updateReturningWarehouseDetail" > |
| | | update mm.returning_warehouse_detail set inventory_id=#{materialInventoryId} |
| | | where returning_id=#{number} and returning_number=#{returningWarehouseNumber} |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialStoreById"> |
| | | select * from mm.material_store m where id=#{id} |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialStorePageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | |
| | | <if test="materialStore.id != null and materialStore.id != ''"> |
| | | and m.id regexp #{materialStore.id} |
| | | </if> |
| | | |
| | | <if test="materialStore.type != null and materialStore.type != ''"> |
| | | and m.type regexp #{materialStore.type} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | |
| | | |
| | | <!-- 流程卡进度--> |
| | | <select id="processCardProgressMp"> |
| | | select |
| | | a.product_name, |
| | | b.glass_child, |
| | | d.order_type, |
| | | concat(c.process_id,'/',c.technology_number) as process_id, |
| | | c.technology_number, |
| | | c.quantity, |
| | | e.reportWorkQuantity, |
| | | e.reportWorkQuantityCount, |
| | | e.broken_num, |
| | | round(ifnull(f.inventory,0)*a.area,2) as inventoryArea |
| | | |
| | | from |
| | | flow_card as c |
| | | left join |
| | | sd.order_detail as a |
| | | on c.order_id = a.order_id |
| | | and c.order_number = a.order_number |
| | | left join sd.order_glass_detail as b |
| | | on c.order_id = b.order_id |
| | | and b.order_number = c.order_number |
| | | and c.technology_number = b.technology_number |
| | | left join sd.`order` as d |
| | | on c.order_id = d.order_id |
| | | left join mm.finished_goods_inventory as f |
| | | on c.order_id = f.order_id and f.order_number = c.order_number |
| | | left join ( |
| | | SELECT process_id, |
| | | technology_number, |
| | | sum(a.broken_num) as broken_num, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"",process,"\":\"",reporting_work_num,"\"")), |
| | | '}' |
| | | ) as reportWorkQuantity, |
| | | concat('{', |
| | | GROUP_CONCAT(concat("\"",process,"\":\"",reporting_work_num_count,"\"")), |
| | | '}' |
| | | ) as reportWorkQuantityCount |
| | | FROM sd.order_process_detail as a |
| | | where a.order_id=#{orderId} |
| | | GROUP BY process_id,a.technology_number |
| | | ) as e |
| | | on e.process_id = c.process_id |
| | | and e.technology_number = c.technology_number |
| | | |
| | | where a.order_id = #{orderId} |
| | | |
| | | </select> |
| | | </mapper> |
| | |
| | | group by a.basic_category |
| | | |
| | | </select> |
| | | |
| | | <select id="getBasicData"> |
| | | select * from basic_data |
| | | order by id desc |
| | | </select> |
| | | |
| | | <select id="getBasicDataFirstType"> |
| | | select * from basic_data |
| | | group by basic_type |
| | | </select> |
| | | <select id="getBasicDataLastType"> |
| | | select * from basic_data |
| | | group by basic_category |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | </update> |
| | | |
| | | <!--查询筛选后唯一的流程卡号--> |
| | | <select id="filterOrderProcess"> |
| | | select id,process,order_number,technology_number |
| | | from order_process_detail |
| | | where order_id = #{orderId} |
| | | group by process |
| | | |
| | | </select> |
| | | |
| | | <select id="filterLastProcess"> |
| | | select id,process,order_number,technology_number |
| | | from order_process_detail |
| | | where order_id = #{orderId} |
| | | and order_number = #{orderNumber} |
| | | and technology_number = #{technologyNumber} |
| | | and id > #{id} |
| | | group by process |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="getGlassLRow"> |
| | | select |
| | | max(a.technology_number) as rowCount, |
| | | RowNum |
| | | from order_process_detail as a |
| | | left join |
| | | (select min((@i:=@i+1)) AS RowNum,c.* |
| | | from sd.order_glass_detail as c, |
| | | (SELECT @i:=-1) as d |
| | | where order_id = #{orderId} |
| | | GROUP BY order_number |
| | | ) as b |
| | | on b.order_number = a.order_number |
| | | where a.order_id = #{orderId} |
| | | group by a.order_number |
| | | |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | </select> |
| | | |
| | | <select id="getBasicWarehouseType" > |
| | | select * from mm.basic_warehouse_type where type=#{type}; |
| | | select * from mm.basic_warehouse_type where type regexp #{type} group by operate_type_name; |
| | | </select> |
| | | |
| | | <select id="getBasicWarehouse" > |
| | | select operate_type from mm.basic_warehouse_type where type=#{type}; |
| | | </select> |
| | | |
| | | |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8" ?> |
| | | <!DOCTYPE mapper |
| | | PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.example.erp.mapper.mm.MaterialInventoryMapper"> |
| | | |
| | | |
| | | |
| | | <select id="getSelectMaterialInventoryDate"> |
| | | select |
| | | mi.id, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | mi.material_code AS materialCode, |
| | | mi.producer, |
| | | mi.inventory_quantity AS inventoryQuantity, |
| | | mi.available_quantity AS availableQuantity, |
| | | 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 mm.material_inventory mi left join mm.material_store ms on mi.material_code=ms.id |
| | | <where> |
| | | date(mi.create_time)>=#{startDate} and date(mi.create_time) <= #{endDate} and mi.available_quantity>0 |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialInventoryDatePageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | mm.material_inventory mi |
| | | <where> |
| | | date(mi.create_time)>=#{startDate} and date(mi.create_time) <= #{endDate} and mi.available_quantity>0 |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectMaterialInventory"> |
| | | select |
| | | mi.id, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | mi.material_code AS materialCode, |
| | | mi.producer, |
| | | mi.inventory_quantity AS inventoryQuantity, |
| | | mi.available_quantity AS availableQuantity, |
| | | 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 mm.material_inventory mi left join mm.material_store ms on mi.material_code=ms.id |
| | | <where> |
| | | <if test="materialInventory.stockId != null and materialInventory.stockId != ''"> |
| | | and mi.id regexp #{materialInventory.stockId} |
| | | </if> |
| | | |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialInventoryPageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | mm.material_inventory mi |
| | | <where> |
| | | <if test="materialInventory.id != null and materialInventory.id != ''"> |
| | | and mi.id regexp #{materialInventory.id} |
| | | </if> |
| | | |
| | | </where> |
| | | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectMaterialOutboundDate"> |
| | | select |
| | | * |
| | | from |
| | | mm.material_outbound mo |
| | | <where> |
| | | date(mo.create_time)>=#{startDate} and date(mo.create_time) <= #{endDate} |
| | | <if test="materialOutbound.materialOutboundId != null and materialOutbound.materialOutboundId != ''"> |
| | | and mo.material_outbound_id regexp #{materialOutbound.materialOutboundId} |
| | | </if> |
| | | <if test="materialOutbound.materialRequisitionPersonnel != null and materialOutbound.materialRequisitionPersonnel != ''"> |
| | | and mo.material_requisition_personnel regexp #{materialOutbound.materialRequisitionPersonnel} |
| | | </if> |
| | | <if test="materialOutbound.materialRequisitionTeam != null and materialOutbound.materialRequisitionTeam != ''"> |
| | | and mo.material_requisition_team regexp #{materialOutbound.materialRequisitionTeam} |
| | | </if> |
| | | <if test="materialOutbound.orderId != null and materialOutbound.orderId != ''"> |
| | | and mo.order_id regexp #{materialOutbound.orderId} |
| | | </if> |
| | | <if test="materialOutbound.outboundType != null and materialOutbound.outboundType != ''"> |
| | | and mo.outbound_type regexp #{materialOutbound.outboundType} |
| | | </if> |
| | | <if test="materialOutbound.warehouseManager != null and materialOutbound.warehouseManager != ''"> |
| | | and mo.warehouse_manager regexp #{materialOutbound.warehouseManager} |
| | | </if> |
| | | <if test="materialOutbound.reviewed != null and materialOutbound.reviewed != ''"> |
| | | and mo.reviewed regexp #{materialOutbound.reviewed} |
| | | </if> |
| | | </where> |
| | | order by mo.reviewed_state desc,mo.create_time desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialOutboundDatePageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | mm.material_outbound mo |
| | | <where> |
| | | date(mo.create_time)>=#{startDate} and date(mo.create_time) <= #{endDate} |
| | | <if test="materialOutbound.materialOutboundId != null and materialOutbound.materialOutboundId != ''"> |
| | | and mo.material_outbound_id regexp #{materialOutbound.materialOutboundId} |
| | | </if> |
| | | <if test="materialOutbound.materialRequisitionPersonnel != null and materialOutbound.materialRequisitionPersonnel != ''"> |
| | | and mo.material_requisition_personnel regexp #{materialOutbound.materialRequisitionPersonnel} |
| | | </if> |
| | | <if test="materialOutbound.materialRequisitionTeam != null and materialOutbound.materialRequisitionTeam != ''"> |
| | | and mo.material_requisition_team regexp #{materialOutbound.materialRequisitionTeam} |
| | | </if> |
| | | <if test="materialOutbound.orderId != null and materialOutbound.orderId != ''"> |
| | | and mo.order_id regexp #{materialOutbound.orderId} |
| | | </if> |
| | | <if test="materialOutbound.outboundType != null and materialOutbound.outboundType != ''"> |
| | | and mo.outbound_type regexp #{materialOutbound.outboundType} |
| | | </if> |
| | | <if test="materialOutbound.warehouseManager != null and materialOutbound.warehouseManager != ''"> |
| | | and mo.warehouse_manager regexp #{materialOutbound.warehouseManager} |
| | | </if> |
| | | <if test="materialOutbound.reviewed != null and materialOutbound.reviewed != ''"> |
| | | and mo.reviewed regexp #{materialOutbound.reviewed} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectReturningWarehouseDate"> |
| | | select |
| | | * |
| | | from |
| | | mm.returning_warehouse rw |
| | | <where> |
| | | date(rw.create_time)>=#{startDate} and date(rw.create_time) <= #{endDate} |
| | | <if test="returningWarehouse.returningId != null and returningWarehouse.returningId != ''"> |
| | | and rw.returning_id regexp #{returningWarehouse.returningId} |
| | | </if> |
| | | <if test="returningWarehouse.materialRequisitionPersonnel != null and returningWarehouse.materialRequisitionPersonnel != ''"> |
| | | and rw.material_requisition_personnel regexp #{returningWarehouse.materialRequisitionPersonnel} |
| | | </if> |
| | | <if test="returningWarehouse.materialRequisitionTeam != null and returningWarehouse.materialRequisitionTeam != ''"> |
| | | and rw.material_requisition_team regexp #{returningWarehouse.materialRequisitionTeam} |
| | | </if> |
| | | <if test="returningWarehouse.orderId != null and returningWarehouse.orderId != ''"> |
| | | and rw.order_id regexp #{returningWarehouse.orderId} |
| | | </if> |
| | | <if test="returningWarehouse.returningType != null and returningWarehouse.returningType != ''"> |
| | | and rw.returning_type regexp #{returningWarehouse.returningType} |
| | | </if> |
| | | <if test="returningWarehouse.warehouseManager != null and returningWarehouse.warehouseManager != ''"> |
| | | and rw.warehouse_manager regexp #{returningWarehouse.warehouseManager} |
| | | </if> |
| | | <if test="returningWarehouse.reviewed != null and returningWarehouse.reviewed != ''"> |
| | | and rw.reviewed regexp #{returningWarehouse.reviewed} |
| | | </if> |
| | | <if test="returningWarehouse.project != null and returningWarehouse.project != ''"> |
| | | and rw.project regexp #{returningWarehouse.project} |
| | | </if> |
| | | <if test="returningWarehouse.batch != null and returningWarehouse.batch != ''"> |
| | | and rw.batch regexp #{returningWarehouse.batch} |
| | | </if> |
| | | |
| | | |
| | | |
| | | </where> |
| | | order by rw.reviewed_state desc,rw.create_time desc |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectReturningWarehouseDatePageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | mm.returning_warehouse rw |
| | | <where> |
| | | date(rw.create_time)>=#{startDate} and date(rw.create_time) <= #{endDate} |
| | | <if test="returningWarehouse.returningId != null and returningWarehouse.returningId != ''"> |
| | | and rw.returning_id regexp #{returningWarehouse.returningId} |
| | | </if> |
| | | <if test="returningWarehouse.materialRequisitionPersonnel != null and returningWarehouse.materialRequisitionPersonnel != ''"> |
| | | and rw.material_requisition_personnel regexp #{returningWarehouse.materialRequisitionPersonnel} |
| | | </if> |
| | | <if test="returningWarehouse.materialRequisitionTeam != null and returningWarehouse.materialRequisitionTeam != ''"> |
| | | and rw.material_requisition_team regexp #{returningWarehouse.materialRequisitionTeam} |
| | | </if> |
| | | <if test="returningWarehouse.orderId != null and returningWarehouse.orderId != ''"> |
| | | and rw.order_id regexp #{returningWarehouse.orderId} |
| | | </if> |
| | | <if test="returningWarehouse.returningType != null and returningWarehouse.returningType != ''"> |
| | | and rw.returning_type regexp #{returningWarehouse.returningType} |
| | | </if> |
| | | <if test="returningWarehouse.warehouseManager != null and returningWarehouse.warehouseManager != ''"> |
| | | and rw.warehouse_manager regexp #{returningWarehouse.warehouseManager} |
| | | </if> |
| | | <if test="returningWarehouse.reviewed != null and returningWarehouse.reviewed != ''"> |
| | | and rw.reviewed regexp #{returningWarehouse.reviewed} |
| | | </if> |
| | | <if test="returningWarehouse.project != null and returningWarehouse.project != ''"> |
| | | and rw.project regexp #{returningWarehouse.project} |
| | | </if> |
| | | <if test="returningWarehouse.batch != null and returningWarehouse.batch != ''"> |
| | | and rw.batch regexp #{returningWarehouse.batch} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialOutbound"> |
| | | select |
| | | * |
| | | from |
| | | mm.material_outbound mo |
| | | <where> |
| | | <if test="materialOutboundDetail.materialOutboundId != null and materialOutboundDetail.materialOutboundId != ''"> |
| | | and mo.material_outbound_id regexp #{materialOutboundDetail.materialOutboundId} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialOutboundDetail" > |
| | | select |
| | | 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, |
| | | mi.inventory_quantity as inventoryQuantity, |
| | | 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="getSelectMaterialOutboundDetailPageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | 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> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <select id="getSelectReturningWarehouse"> |
| | | select |
| | | * |
| | | from |
| | | mm.returning_warehouse rw |
| | | <where> |
| | | <if test="returningWarehouseDetail.returningId != null and returningWarehouseDetail.returningId != ''"> |
| | | and returning_id regexp #{returningWarehouseDetail.returningId} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectReturningWarehouseDetail" > |
| | | select |
| | | rwd.inventory_id as inventoryId, |
| | | mi.inventory_organization as inventoryOrganization, |
| | | rwd.material_code as id, |
| | | mi.producer, |
| | | rwd.return_quantity as returnQuantity, |
| | | date(mi.date_of_manufacture) as dateOfManufacture, |
| | | mi.single_piece_area as singlePieceArea, |
| | | mi.inventory_area as inventoryArea, |
| | | rwd.remarks, |
| | | mi.inventory_quantity as inventoryQuantity, |
| | | ms.json |
| | | from mm.returning_warehouse_detail rwd left join mm.material_inventory mi on rwd.inventory_id=mi.id |
| | | left join mm.returning_warehouse rw on rwd.returning_id=rw.returning_id |
| | | left join mm.material_store ms on rwd.material_code=ms.id |
| | | <where> |
| | | <if test="returningWarehouseDetail.returningId != null and returningWarehouseDetail.returningId != ''"> |
| | | and rwd.returning_id regexp #{returningWarehouseDetail.returningId} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectReturningWarehouseDetailPageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | mm.returning_warehouse_detail rwd |
| | | <where> |
| | | <if test="returningWarehouseDetail.returningId != null and returningWarehouseDetail.returningId != ''"> |
| | | and rwd.returning_id regexp #{returningWarehouseDetail.returningId} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertMaterialStore" useGeneratedKeys="true" > |
| | | insert into mm.material_store (type,json,create_time |
| | | ) |
| | | values ( |
| | | #{type},#{json},now() |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateMaterialStore" > |
| | | update mm.material_store set json=#{json} where id=#{id} |
| | | </update> |
| | | |
| | | <delete id="deleteMaterialOutbound" > |
| | | delete from mm.material_outbound where material_outbound_id=#{materialOutboundId} |
| | | </delete> |
| | | |
| | | <delete id="deleteMaterialOutboundDetail" > |
| | | delete from mm.material_outbound_detail where material_outbound_id=#{materialOutboundId} |
| | | </delete> |
| | | |
| | | <delete id="deleteReturningWarehouseDetail" > |
| | | delete from mm.returning_warehouse_detail where returning_id=#{returningId} |
| | | </delete> |
| | | |
| | | <select id="getMaximum" > |
| | | select count(*) from mm.material_outbound where date(create_time)=CURDATE() |
| | | </select> |
| | | |
| | | <select id="getMaximums" > |
| | | select count(*) from mm.returning_warehouse where date(create_time)=CURDATE() |
| | | </select> |
| | | |
| | | <select id="getMaterialOutboundCount" > |
| | | select count(*) from mm.material_outbound where material_outbound_id=#{materialOutboundId} |
| | | </select> |
| | | |
| | | <select id="getReturningWarehouseCount" > |
| | | select count(*) from mm.returning_warehouse where returning_id=#{returningId} |
| | | </select> |
| | | |
| | | <select id="getMaterialOutboundDetailMaximum" > |
| | | select count(*) from mm.material_outbound_detail where material_outbound_id=#{materialOutboundId} |
| | | </select> |
| | | |
| | | <select id="getReturningWarehouseDetailMaximum" > |
| | | select count(*) from mm.returning_warehouse where returning_id=#{returningId} |
| | | </select> |
| | | |
| | | <select id="getMaterialInventoryCount" > |
| | | select count(*) from mm.material_inventory where material_code=#{materialCode} and date_of_manufacture=#{dateOfManufacture} |
| | | </select> |
| | | |
| | | <select id="getMaterialInventoryCountNull" > |
| | | select count(*) from mm.material_inventory where material_code=#{materialCode} and date_of_manufacture is null |
| | | </select> |
| | | |
| | | <select id="getMaterialInventoryCountId" > |
| | | select id from mm.material_inventory where material_code=#{materialCode} and date_of_manufacture=#{dateOfManufacture} |
| | | </select> |
| | | |
| | | <select id="getMaterialInventoryCountNullId" > |
| | | select id from mm.material_inventory where material_code=#{materialCode} and date_of_manufacture is null |
| | | </select> |
| | | |
| | | <select id="getIsNotMaterialOutboundDetail" > |
| | | select * from mm.material_outbound_detail where material_outbound_id=#{materialOutboundId} |
| | | </select> |
| | | |
| | | <select id="getIsNotReturningWarehouseDetail" > |
| | | select * from mm.returning_warehouse_detail where returning_id=#{returningId} |
| | | </select> |
| | | |
| | | <insert id="insertMaterialOutbound" useGeneratedKeys="true" > |
| | | insert into mm.material_outbound(material_outbound_id,material_requisition_personnel,material_requisition_team,order_id,outbound_type, |
| | | warehouse_manager,material_requisition_date,reviewed_state,create_time) |
| | | values ( |
| | | #{number} ,#{materialOutbound.materialRequisitionPersonnel},#{materialOutbound.materialRequisitionTeam}, |
| | | #{materialOutbound.orderId},#{materialOutbound.outboundType},#{materialOutbound.warehouseManager},#{materialOutbound.materialRequisitionDate}, |
| | | 0,now() |
| | | ) |
| | | </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, |
| | | height,thickness,outbound_quantity,single_piece_area,inventory_area,date_of_manufacture,remarks) |
| | | values ( |
| | | #{number} ,#{materialOutboundNumber},#{materialOutboundDetail.materialCode},#{materialOutboundDetail.materialName},#{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> |
| | | |
| | | <insert id="insertMaterialInventory" useGeneratedKeys="true" > |
| | | insert into mm.material_inventory (inventory_organization, material_code, producer, stock_id, |
| | | inventory_quantity, available_quantity, safety_stock, total_area, single_piece_area, |
| | | date_of_manufacture, quality_guarantee_period, inventory_area, dead_stock, remarks, create_time) |
| | | values ( |
| | | #{materialInventory.inventoryOrganization} ,#{materialCode}, |
| | | #{materialInventory.producer},0,#{materialInventory.inventoryQuantity},#{materialInventory.inventoryQuantity},0, |
| | | #{totalArea},#{singlePieceArea},#{materialInventory.dateOfManufacture},#{materialInventory.qualityGuaranteePeriod}, |
| | | #{materialInventory.inventoryArea},0,#{materialInventory.remarks},now() |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertMaterialInventoryReturning" useGeneratedKeys="true" > |
| | | insert into mm.material_inventory (inventory_organization, material_code, producer, stock_id, |
| | | inventory_quantity, available_quantity, safety_stock, total_area, single_piece_area, |
| | | date_of_manufacture, quality_guarantee_period, inventory_area, dead_stock, remarks, create_time) |
| | | values ( |
| | | #{returningWarehouseDetail.inventoryOrganization} ,#{materialCode}, |
| | | #{returningWarehouseDetail.producer},0,#{returningWarehouseDetail.returnQuantity},0,0, |
| | | #{totalArea},#{singlePieceArea},#{returningWarehouseDetail.dateOfManufacture},#{returningWarehouseDetail.qualityGuaranteePeriod}, |
| | | #{returningWarehouseDetail.inventoryArea},0,#{returningWarehouseDetail.remarks},now() |
| | | ) |
| | | </insert> |
| | | |
| | | |
| | | <insert id="insertReturningWarehouse" useGeneratedKeys="true" > |
| | | insert into mm.returning_warehouse(returning_id, returning_type, material_requisition_personnel, material_requisition_team, |
| | | warehouse_manager, reviewed_state, order_id, batch, project, create_time) |
| | | values ( |
| | | #{number} ,#{returningWarehouse.returningType},#{returningWarehouse.materialRequisitionPersonnel},#{returningWarehouse.materialRequisitionTeam}, |
| | | #{returningWarehouse.warehouseManager},0,#{returningWarehouse.orderId},#{returningWarehouse.batch},#{returningWarehouse.project},now() |
| | | ) |
| | | </insert> |
| | | |
| | | <insert id="insertReturningWarehouseDetail" useGeneratedKeys="true" > |
| | | insert into mm.returning_warehouse_detail (returning_id, returning_number, inventory_id, material_code, return_quantity,date_of_manufacture, remarks) |
| | | values ( |
| | | #{number} ,#{returningWarehouseNumber},#{returningWarehouseDetail.inventoryId},#{returningWarehouseDetail.id}, |
| | | #{returningWarehouseDetail.returnQuantity},#{returningWarehouseDetail.dateOfManufacture},#{returningWarehouseDetail.remarks} |
| | | ) |
| | | </insert> |
| | | |
| | | <update id="updateMaterialInventoryAvailableOut"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity-#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableInt"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity+#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryOut"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity-#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryInventoryInt"> |
| | | update mm.material_inventory |
| | | set inventory_quantity=inventory_quantity+#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableInventoryOut"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity-#{quantity},inventory_quantity=inventory_quantity-#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryAvailableInventoryInt"> |
| | | update mm.material_inventory |
| | | set available_quantity=available_quantity+#{quantity},inventory_quantity=inventory_quantity+#{quantity} |
| | | where id=#{inventoryId} |
| | | </update> |
| | | |
| | | |
| | | <update id="updateMaterialOutboundToExamine"> |
| | | update mm.material_outbound set reviewed_state=#{reviewedState},reviewed=#{reviewed},reviewed_time=now() |
| | | where material_outbound_id=#{materialOutboundId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialOutboundCounterExamination"> |
| | | update mm.material_outbound set reviewed_state=#{reviewedState} |
| | | where material_outbound_id=#{materialOutboundId} |
| | | </update> |
| | | |
| | | <update id="updateReturningWarehouseToExamine"> |
| | | update mm.returning_warehouse set reviewed_state=#{reviewedState},reviewed=#{reviewed},reviewed_time=now() |
| | | where returning_id=#{returningId} |
| | | </update> |
| | | |
| | | <update id="updateReturningWarehouseCounterExamination"> |
| | | update mm.returning_warehouse set reviewed_state=#{reviewedState} |
| | | where returning_id=#{returningId} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventory" > |
| | | update mm.material_inventory set inventory_quantity=inventory_quantity+#{materialInventory.inventoryQuantity}, |
| | | available_quantity=available_quantity+#{materialInventory.inventoryQuantity}, |
| | | total_area=total_area+#{totalArea} |
| | | where material_code=#{materialCode} and date_of_manufacture=#{materialInventory.dateOfManufacture} |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryReturning" > |
| | | update mm.material_inventory set inventory_quantity=inventory_quantity+#{returningWarehouseDetail.returnQuantity}, |
| | | total_area=total_area+#{totalArea} |
| | | where material_code=#{materialCode} and |
| | | date_of_manufacture=#{returningWarehouseDetail.dateOfManufacture} |
| | | |
| | | |
| | | </update> |
| | | |
| | | <update id="updateMaterialInventoryReturningNull" > |
| | | update mm.material_inventory set inventory_quantity=inventory_quantity+#{returningWarehouseDetail.returnQuantity}, |
| | | total_area=total_area+#{totalArea} |
| | | where material_code=#{materialCode} and |
| | | date_of_manufacture is null |
| | | |
| | | |
| | | </update> |
| | | |
| | | <update id="updateReturningWarehouseDetail" > |
| | | update mm.returning_warehouse_detail set inventory_id=#{materialInventoryId} |
| | | where returning_id=#{number} and returning_number=#{returningWarehouseNumber} |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialStoreById"> |
| | | select * from mm.material_store m where id=#{id} |
| | | </select> |
| | | |
| | | <select id="getSelectMaterialStorePageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | |
| | | <if test="materialStore.id != null and materialStore.id != ''"> |
| | | and m.id regexp #{materialStore.id} |
| | | </if> |
| | | |
| | | <if test="materialStore.type != null and materialStore.type != ''"> |
| | | and m.type regexp #{materialStore.type} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | |
| | | group by a.basic_category |
| | | |
| | | </select> |
| | | |
| | | <select id="getBasicData"> |
| | | select * from basic_data |
| | | order by id desc |
| | | </select> |
| | | |
| | | <select id="getBasicDataFirstType"> |
| | | select * from basic_data |
| | | group by basic_type |
| | | </select> |
| | | <select id="getBasicDataLastType"> |
| | | select * from basic_data |
| | | group by basic_category |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | </update> |
| | | |
| | | <!--查询筛选后唯一的流程卡号--> |
| | | <select id="filterOrderProcess"> |
| | | select id,process,order_number,technology_number |
| | | from order_process_detail |
| | | where order_id = #{orderId} |
| | | group by process |
| | | |
| | | </select> |
| | | |
| | | <select id="filterLastProcess"> |
| | | select id,process,order_number,technology_number |
| | | from order_process_detail |
| | | where order_id = #{orderId} |
| | | and order_number = #{orderNumber} |
| | | and technology_number = #{technologyNumber} |
| | | and id > #{id} |
| | | group by process |
| | | </select> |
| | | |
| | | |
| | | |
| | | <select id="getGlassLRow"> |
| | | select |
| | | max(a.technology_number) as rowCount, |
| | | RowNum |
| | | from order_process_detail as a |
| | | left join |
| | | (select min((@i:=@i+1)) AS RowNum,c.* |
| | | from sd.order_glass_detail as c, |
| | | (SELECT @i:=-1) as d |
| | | where order_id = #{orderId} |
| | | GROUP BY order_number |
| | | ) as b |
| | | on b.order_number = a.order_number |
| | | where a.order_id = #{orderId} |
| | | group by a.order_number |
| | | |
| | | </select> |
| | | |
| | | </mapper> |