Merge branch 'master' of http://10.153.19.25:10101/r/ERP_override
# Conflicts:
# north-glass-erp/northglass-erp/config.js
5个文件已添加
23个文件已修改
9个文件已删除
9 文件已重命名
| | |
| | | export default { |
| | | serverUrl:"localhost:8080" |
| | | //serverUrl:"res.abeim.cn" |
| | | serverUrl:"localhost:8086" |
| | | //serverUrl:"10.153.19.150:8086" |
| | | } |
| | |
| | | background-color: transparent; |
| | | border-radius: 5px; |
| | | border: 0 solid #F1F1F1; |
| | | transition: background-color 0.5s ease; |
| | | /*box-shadow: inset 0 0 6px rgba(0,0,0,.3);*/ |
| | | } |
| | | .mytable-scrollbar ::-webkit-scrollbar-thumb:hover { |
| | | background-color: #ffffff; |
| | | .mytable-scrollbar:hover ::-webkit-scrollbar-thumb { |
| | | background-color: white; |
| | | box-shadow: inset 0 0 6px rgba(0,0,0,.3); |
| | | } |
| | | .mytable-scrollbar ::-webkit-scrollbar-thumb:active { |
| | | background-color: white; |
| | | } |
| | | /*.mytable-scrollbar:active ::-webkit-scrollbar-thumb {*/ |
| | | /* background-color: white;*/ |
| | | /*}*/ |
| | | /*边角,即两个滚动条的交汇处*/ |
| | | .mytable-scrollbar ::-webkit-scrollbar-corner { |
| | | background-color: #FFFFFF; |
| | |
| | | <script setup> |
| | | import {onMounted, reactive, ref, watch} from "vue" |
| | | import {computed, onMounted, reactive, ref, watch} from "vue" |
| | | import {filterChanged} from "@/hook" |
| | | import {useI18n} from "vue-i18n" |
| | | import {ElMessage} from "element-plus"; |
| | |
| | | // {field: 'buildingNumber',width:120, title: '楼号',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter'}, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'alias', title:'其他加工',editRender: { name: 'input'},minWith:'130'}, |
| | | {field: 'price', title:'单价',editRender: { name: 'input'}}, |
| | | {field: 'quantity', title:'数量',editRender: { name: 'input'} }, |
| | | {field: 'quantity', title:'数量' }, |
| | | {field: 'money', slots:{default:'default'}, title:'金额'} |
| | | ], |
| | | //表单验证 |
| | |
| | | xGrid.value.reloadData(prop.otherMoney) |
| | | }) |
| | | |
| | | const countAmount = (row)=>{ |
| | | const countAmount = computed(() => (row) => { |
| | | const price = row.price===null?0:row.price |
| | | const quantity = row.quantity===null?0:row.quantity |
| | | return parseFloat((row.price * row.quantity).toFixed(2)) |
| | | } |
| | | }) |
| | | |
| | | |
| | | const validate = async () => { |
| | | const errMap = await xGrid.value.validate(true) |
| | |
| | | ] |
| | | }, |
| | | { |
| | | /*----------- 基础数据 ----------------*/ |
| | | path: 'warehouseBasicData', |
| | | name: 'warehouseBasicData', |
| | | component: () => import('../views/mm/basicData/WarehouseBasicData.vue'), |
| | | children: [ |
| | | { |
| | | path: 'warehouseSearchBasicData', |
| | | name: 'warehouseSearchBasicData', |
| | | component: () => import('../views/mm/basicData/WarehouseSearchBasicData.vue'), |
| | | }, |
| | | { |
| | | path: 'warehouseCreateBasicData', |
| | | name: 'warehouseCreateBasicData', |
| | | component: () => import('../views/mm/basicData/WarehouseCreateBasicData.vue'), |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect: '/main/warehouseBasicData/warehouseSearchBasicData' |
| | | } |
| | | ] |
| | | }, |
| | | { |
| | | path: '', |
| | | redirect:'/main/order' |
| | | } |
| | |
| | | <img id="img-pic" src="@/assets/img.png" alt=""> |
| | | </div> |
| | | <div id="div-login"> |
| | | <!-- <el-select--> |
| | | <!-- @change="changeLanguage"--> |
| | | <!-- v-model="language"--> |
| | | <!-- placeholder=" "--> |
| | | <!-- style="float: right;width: 6rem">--> |
| | | <!-- <el-option value="zh" label="中文" />--> |
| | | <!-- <el-option value="en" label="English" />--> |
| | | <!-- </el-select>--> |
| | | <el-select |
| | | @change="changeLanguage" |
| | | v-model="language" |
| | | placeholder=" " |
| | | style="float: right;width: 6rem"> |
| | | <el-option value="zh" label="中文" /> |
| | | <el-option value="en" label="English" /> |
| | | </el-select> |
| | | <h2>{{$t('login.SysName')}}</h2> |
| | | <el-form |
| | | @submit.native.prevent |
| 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/warehouseBasicData/warehouseSearchBasicData' }">基础数据</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({ |
| | | operateType:'', |
| | | type : '', |
| | | input:'' |
| | | }) |
| | | let options=ref([ |
| | | { label: "库存组织", |
| | | value: "inventoryOrganization", |
| | | }, |
| | | { label: "领出", |
| | | value: "takeOut", |
| | | }, |
| | | { label: "材料出库类型", |
| | | value: "outboundType", |
| | | }, |
| | | { label: "材料返库类型", |
| | | value: "returningType", |
| | | }, |
| | | ]) |
| | | |
| | | let props = defineProps({ |
| | | rowIndex:{ |
| | | Object, |
| | | default: null |
| | | } |
| | | }) |
| | | onMounted(() =>{ |
| | | if(props.rowIndex){ |
| | | basic.value.operateType = props.rowIndex.operateType |
| | | basic.value.type = props.rowIndex.type |
| | | basic.value.input = props.rowIndex.operateTypeName |
| | | } |
| | | }) |
| | | |
| | | const emit = defineEmits(['gaveParent']) |
| | | const saveBasicData = () =>{ |
| | | if (basic.value.operateType[0]==='inventoryOrganization'){ |
| | | basic.value.type='库存组织' |
| | | } |
| | | else if(basic.value.operateType[0]==='takeOut'){ |
| | | basic.value.type='领出' |
| | | } |
| | | else if(basic.value.operateType[0]==='outboundType'){ |
| | | basic.value.type='材料出库类型' |
| | | } |
| | | else if(basic.value.operateType[0]==='returningType'){ |
| | | basic.value.type='材料返库类型' |
| | | } |
| | | if(basic.value.operateType[0]==='' || basic.value.input===''){ |
| | | return |
| | | } |
| | | request.post(`/BasicWarehouse/addBasicWarehouse`, basic.value).then(res => { |
| | | if (res.data) { |
| | | ElMessage.success('保存成功') |
| | | emit('gaveParent', true) |
| | | } |
| | | }) |
| | | } |
| | | const updateBasicData = () =>{ |
| | | let submitArr = props.rowIndex |
| | | submitArr.operateType = basic.value.operateType |
| | | submitArr.type = basic.value.type |
| | | submitArr.operateTypeName = basic.value.input |
| | | if(basic.value.input===''){ |
| | | ElMessage.warning('请输入数据') |
| | | }else{ |
| | | request.post(`/BasicWarehouse/updateBasicWarehouse`, 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])) |
| | | } |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div> |
| | | <el-row> |
| | | <el-col :span="4">基础类型:</el-col> |
| | | <el-col :span="12"> |
| | | <el-cascader |
| | | v-model="basic.operateType" |
| | | :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" |
| | | import WarehouseCreateBasicData from "@/views/mm/basicData/WarehouseCreateBasicData.vue"; |
| | | 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:'operateTypeName',title: '名称'}, |
| | | {field:'operateType',title: '别称'}, |
| | | {field:'type',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('/BasicWarehouse/getBasicWarehouse').then(res => { |
| | | if(res.code==='200'){ |
| | | xGrid.value.reloadData(res.data) |
| | | } |
| | | }) |
| | | |
| | | const getChildrenFunction = (flag) => { |
| | | if(flag){ |
| | | router.push({ |
| | | path:'/main/warehouseBasicData/warehouseSearchBasicData', |
| | | 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(`/BasicWarehouse/deleteBasicWarehouse`,row).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success(t('searchOrder.msgDeleteSuccess')) |
| | | router.push({ |
| | | path:'/main/warehouseBasicData/warehouseSearchBasicData', |
| | | 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="确定删除数据?"> |
| | | <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% "> |
| | | <WarehouseCreateBasicData :rowIndex="rowIndex" @gaveParent='getChildrenFunction'/> |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | |
| | | const userinfo=[] |
| | | |
| | | //定义接收加载表头下拉数据 |
| | | const titleSelectJson = ref({ |
| | | }) |
| | | |
| | | //页面第一次加载 |
| | | request.get(`/basicData/BasicDataByType/product/stuffColor`).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | | console.log(titleSelectJson.value) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | |
| | | |
| | | |
| | | |
| | |
| | | <el-row gutter="5" |
| | | v-for="item in BasicData" > |
| | | <el-col :span="4.5" > |
| | | {{item.OperateTypeName}}:<el-input v-model="item.Type" placeholder="请输入数据" style="width: 150px; height: 30px;" /> |
| | | {{item.OperateTypeName}}: |
| | | <el-select filterable v-if="item.OperateTypeName=='膜系'" v-model="item.Type" placeholder="请输入数据" style="width: 150px; height: 30px;" > |
| | | <el-option |
| | | v-for="item in titleSelectJson" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | <el-input v-else v-model="item.Type" placeholder="请输入数据" style="width: 150px; height: 30px;" /> |
| | | |
| | | </el-col> |
| | | |
| | | <el-divider ></el-divider> <!-- 添加分隔线 --> |
| | | |
| | | |
| | |
| | | <td>{{items.money}}</td> |
| | | <td>{{items.processingNote}}</td> |
| | | </tr> |
| | | <tr class="day-in"> |
| | | <tr class="day-in" > |
| | | <td style="font-size: 15px;font-weight: bold;" colspan="3">小计:</td> |
| | | <td>{{item.DeliveryDetail.quantity}}</td> |
| | | <td>{{item.DeliveryDetail.area}}</td> |
| | |
| | | margin-top:8mm; |
| | | |
| | | } |
| | | /*#fen {page-break-after: always;}*/ |
| | | } |
| | | #table1 tr{ |
| | | height: 30px; |
| | |
| | | const route = useRoute() |
| | | const xGrid = ref() |
| | | let cellArea = ref() |
| | | const shapeList = ref(['普形','异形']) |
| | | const shapeList = ref([ |
| | | {name:'普形',value:1}, {name:'异形',value: 2} |
| | | ]) |
| | | |
| | | // 定义表头上传数据 |
| | | const titleUploadData = ref({ |
| | |
| | | let otherMoney = ref(null) |
| | | |
| | | const gridOptions = reactive({ |
| | | loading:false, |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | //virtualScroll: true, // 开启虚拟滚动功能 |
| | | id: 'OrderList', |
| | | showFooter: true,//显示脚 |
| | | printConfig: {}, |
| | | importConfig: {}, |
| | | exportConfig: {}, |
| | | scrollY:{ enabled: true },//开启虚拟滚动 |
| | | scrollY:{ enabled: true,gt:15 },//开启虚拟滚动 |
| | | scrollX:{ enabled: true,gt:30 },//开启虚拟滚动 |
| | | showOverflow:true, |
| | | menuConfig: { |
| | | body: { |
| | |
| | | |
| | | //初始化判断是否有id传入 |
| | | onMounted(()=>{ |
| | | |
| | | //启用表格拖动选中 |
| | | addListener(xGrid.value,gridOptions) |
| | | const str = route.query.orderId || history.state.orderId |
| | |
| | | orderDetails.forEach(item => { |
| | | item.otherColumns = JSON.parse(item.otherColumns) |
| | | }) |
| | | |
| | | //加载副表数据 |
| | | otherMoney.value =res.data.orderOtherMoneyList |
| | | //加载副表数据 |
| | | xGrid.value.reloadData(orderDetails) |
| | | }else{ |
| | | ElMessage.error(res.msg) |
| | |
| | | }) |
| | | }) |
| | | |
| | | //作废订单 |
| | | const cancelOrder = () => { |
| | | request.post(`/order/cancelOrder/${titleUploadData.value.orderId}`).then((res) =>{ |
| | | if (res.code== 200){ |
| | |
| | | list.forEach((item)=>{ |
| | | countMoney += parseFloat(item.grossAmount) |
| | | }) |
| | | otherMoney.value.forEach(item => { |
| | | countMoney+=item.quantity*item.price |
| | | }) |
| | | // otherMoney.value.forEach(item => { |
| | | // countMoney+=item.quantity*item.price |
| | | // }) |
| | | return parseFloat((countMoney).toFixed(2)) |
| | | } |
| | | //导入功能 |
| | |
| | | }else if(column.property === 'computeArea'){ |
| | | row.computeGrossArea=parseFloat((row.computeArea*row.quantity).toFixed(2)) |
| | | row.grossAmount=parseFloat((row.price * row.computeGrossArea).toFixed(2)) |
| | | }else if(column.property.indexOf('otherColumns.M')>-1){ |
| | | let quantity = 0 |
| | | xGrid.value.getTableData().fullData.forEach(item => { |
| | | quantity += item.quantity*(getNestedProperty(item,column.property)*1) |
| | | }) |
| | | if(!isNaN(quantity)){ |
| | | otherMoney.value.forEach(item => { |
| | | if(item.column===column.property.split('.')[1]){ |
| | | item.quantity = quantity |
| | | } |
| | | }) |
| | | } |
| | | } |
| | | // else if(column.property.indexOf('otherColumns.M')>-1){ |
| | | // let quantity = 0 |
| | | // xGrid.value.getTableData().fullData.forEach(item => { |
| | | // let orderQuantity = isNaN(item.quantity) ? 0 : item.quantity |
| | | // let value = isNaN((getNestedProperty(item,column.property)*1)) ? 0 : (getNestedProperty(item,column.property)*1) |
| | | // quantity += orderQuantity*value |
| | | // }) |
| | | // if(!isNaN(quantity)){ |
| | | // otherMoney.value.forEach(item => { |
| | | // if(item.column===column.property.split('.')[1]){ |
| | | // item.quantity = quantity |
| | | // } |
| | | // }) |
| | | // } |
| | | // } |
| | | titleUploadData.value.money=countMoney(xGrid.value.getTableData().fullData).toString() |
| | | |
| | | |
| | |
| | | </template> |
| | | <template #shape_edit="{ row }"> |
| | | <vxe-select v-model="row.shape" transfer> |
| | | <vxe-option v-for="item in shapeList" :key="item" :value="item" :label="item" /> |
| | | <vxe-option v-for="item in shapeList" :key="item" :value="item.value" :label="item.name" /> |
| | | </vxe-select> |
| | | </template> |
| | | |
| | |
| | | package com.example.erp.controller.mm; |
| | | |
| | | import com.example.erp.common.Result; |
| | | import com.example.erp.entity.mm.BasicWarehouseType; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import com.example.erp.service.mm.BasicWarehouseTypeService; |
| | | import com.example.erp.service.sd.BasicDateService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.Map; |
| | | |
| | | @RestController |
| | | @RequestMapping("/BasicWarehouse") |
| | |
| | | return Result.seccess(basicWarehouseTypeService.getBasicWarehouseTypes(type)); |
| | | } |
| | | |
| | | @GetMapping("/getBasicWarehouse") |
| | | public Result getBasicWarehouse(){ |
| | | return Result.seccess(basicWarehouseTypeService.getBasicWarehouse()); |
| | | } |
| | | |
| | | |
| | | @PostMapping("addBasicWarehouse") |
| | | public Result addBasicWarehouse(@RequestBody Map<String,Object> map){ |
| | | return Result.seccess(basicWarehouseTypeService.addBasicWarehouse(map)); |
| | | } |
| | | @PostMapping("updateBasicWarehouse") |
| | | public Result updateBasicWarehouse(@RequestBody BasicWarehouseType basicWarehouseType){ |
| | | return Result.seccess(basicWarehouseTypeService.updateBasicWarehouse(basicWarehouseType)); |
| | | } |
| | | |
| | | @PostMapping("deleteBasicWarehouse") |
| | | public Result deleteBasicWarehouse(@RequestBody BasicWarehouseType basicWarehouseType){ |
| | | return Result.seccess(basicWarehouseTypeService.deleteBasicWarehouse(basicWarehouseType)); |
| | | } |
| | | |
| | | } |
| | |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private Integer operateTypeId; |
| | | private String operateTypeName; |
| | | private String operateType; |
| | | private String type; |
| | |
| | | private Double quantity; |
| | | private Double price; |
| | | private Double money; |
| | | @TableField(select = false,exist= false) |
| | | private String alias; |
| | | private LocalDateTime createTime; |
| | | } |
| | |
| | | |
| | | import com.example.erp.entity.mm.BasicWarehouseType; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | List<String> getBasicWarehouse(String type); |
| | | |
| | | List<BasicWarehouseType> getBasicWarehouseTypeAll(); |
| | | |
| | | Boolean insertBasicWarehouse(@Param("operateTypeName") String operateTypeName, |
| | | @Param("operateType") String operateType, |
| | | @Param("type") String type); |
| | | |
| | | Boolean deleteBasicWarehouse(@Param("id") Long id); |
| | | |
| | | Boolean updateBasicWarehouse(@Param("id") Long id,@Param("operateTypeName") String operateTypeName); |
| | | |
| | | |
| | | } |
| | |
| | | import com.example.erp.entity.sd.BasicOtherMoney; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface BasicOtherMoneyMapper extends BaseMapper<BasicOtherMoney> { |
| | | } |
| | |
| | | import com.example.erp.entity.sd.OrderOtherMoney; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Mapper |
| | | public interface OrderOtherMoneyMapper extends BaseMapper<OrderOtherMoney> { |
| | | |
| | | List<OrderOtherMoney> findById(String orderId); |
| | | } |
| | |
| | | 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()); |
| | | map.put("Type",""); |
| | |
| | | return BasicDataMap; |
| | | } |
| | | |
| | | public List<BasicWarehouseType> getBasicWarehouse() { |
| | | return basicWarehouseTypeMapper.getBasicWarehouseTypeAll(); |
| | | } |
| | | |
| | | |
| | | public boolean addBasicWarehouse(Map<String, Object> map) { |
| | | List<String> basicTypeList = (List<String>) map.get("operateType"); |
| | | basicWarehouseTypeMapper.insertBasicWarehouse(map.get("input").toString(),basicTypeList.get(0),map.get("type").toString()); |
| | | return true; |
| | | } |
| | | |
| | | public boolean deleteBasicWarehouse(BasicWarehouseType basicWarehouseType) { |
| | | return basicWarehouseTypeMapper.deleteBasicWarehouse(basicWarehouseType.getId()); |
| | | } |
| | | |
| | | public boolean updateBasicWarehouse(BasicWarehouseType basicWarehouseType) { |
| | | return basicWarehouseTypeMapper.updateBasicWarehouse(basicWarehouseType.getId(),basicWarehouseType.getOperateTypeName()); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.example.erp.service.sd; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | |
| | | OrderDetails.get(i).setOrderId(orderId); |
| | | OrderDetails.get(i).setPerimeter(OrderDetails.get(i).getWidth()*OrderDetails.get(i).getHeight()*2/1000); |
| | | OrderDetails.get(i).setWeight(1.0); |
| | | Map<String,Double> otherColumns = JSON.parseObject(OrderDetails.get(i).getOtherColumns(), new TypeReference<Map<String, Double>>(){}); |
| | | int finalI = i; |
| | | if(otherColumns!=null){ |
| | | otherColumns.forEach((key, value) ->{ |
| | | orderOtherMoneyList.forEach(orderOtherMoney ->{ |
| | | if(orderOtherMoney.getColumn().equals(key)){ |
| | | orderOtherMoney.setQuantity (orderOtherMoney.getQuantity()==null?0:orderOtherMoney.getQuantity()); |
| | | orderOtherMoney.setQuantity(((value==null?0:value)*OrderDetails.get(finalI).getQuantity())); |
| | | } |
| | | }); |
| | | |
| | | }); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | //往明细表插数据 |
| | | orderDetailMapper.insertBatch(OrderDetails); |
| | | //修改订单主表面积与周长以及重量 |
| | | orderMapper.updateOrderParameter(orderId); |
| | | //往小片表传入产品数据 |
| | | orderGlassDetailMapper.insertOrderGlassDetail(orderId); |
| | | //往订单其他金额副表传入数据 |
| | |
| | | } |
| | | orderOtherMoneyMapper.insert(orderOtherMoney); |
| | | }); |
| | | //修改订单主表面积与周长以及重量 |
| | | orderMapper.updateOrderParameter(orderId); |
| | | |
| | | //查询订单小片表获取工艺传入小片工艺表 |
| | | //List<OrderGlassDetail> orderGlassDetails = orderGlassDetailMapper.selectOrderGlassDetail(orderId); |
| | |
| | | public Map<String,Object> getOrderById(String id) { |
| | | Order order = orderMapper.selectOne(new QueryWrapper<Order>().eq("order_id",id)); |
| | | List<OrderDetail> orderDetails = orderDetailMapper.selectList(new QueryWrapper<OrderDetail>().eq("order_id",id)); |
| | | List<OrderOtherMoney> orderOtherMoneyList = orderOtherMoneyMapper.findById(id); |
| | | Map<String,Object> map = new HashMap<>(); |
| | | map.put("order",order); |
| | | map.put("orderDetails",orderDetails); |
| | | map.put("orderOtherMoneyList",orderOtherMoneyList); |
| | | return map; |
| | | } |
| | | //订单审核 |
| | |
| | | select operate_type from mm.basic_warehouse_type where type regexp #{type}; |
| | | </select> |
| | | |
| | | <select id="getBasicWarehouseTypeAll" > |
| | | select * from mm.basic_warehouse_type where type!='原片' and type!='辅料' order by id desc; |
| | | </select> |
| | | |
| | | <insert id="insertBasicWarehouse" useGeneratedKeys="true" > |
| | | insert into mm.basic_warehouse_type (operate_type_name, operate_type, type, create_time |
| | | ) |
| | | values ( |
| | | #{operateTypeName} ,#{operateType},#{type},now() |
| | | ) |
| | | </insert> |
| | | |
| | | <delete id="deleteBasicWarehouse" > |
| | | delete from mm.basic_warehouse_type where id=#{id} |
| | | </delete> |
| | | |
| | | <update id="updateBasicWarehouse" > |
| | | update mm.basic_warehouse_type set operate_type_name=#{operateTypeName},create_time=now() where id=#{id} |
| | | </update> |
| | | |
| | | |
| | | |
| | | |
| 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.sd.BasicOtherMoneyMapper"> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <update id="updateOrderParameter"> |
| | | update `order` o |
| | | left join |
| | | (select a.order_id,round(sum(a.perimeter),2) as aa,sum(a.quantity) as b,sum(a.compute_gross_area) as c |
| | | from sd.order_detail as a group by a.order_id) od |
| | | (select a.order_id, |
| | | round(sum(a.perimeter),2) as aa, |
| | | sum(a.quantity) as b, |
| | | sum(a.compute_gross_area) as c, |
| | | sum(a.gross_amount) as 'detailAmount' |
| | | from sd.order_detail as a group by a.order_id |
| | | ) as od |
| | | on o.order_id = od.order_id |
| | | left join (select oom.order_id, |
| | | sum(oom.money) as 'money' |
| | | from order_other_money as oom |
| | | where |
| | | oom.order_id = #{orderId} |
| | | group by oom.order_id |
| | | ) as c |
| | | on c.order_id = o.order_id |
| | | set |
| | | o.money = ifnull(od.detailAmount,0)+ifnull(c.money,0), |
| | | o.quantity = od.b, |
| | | o.area = od.c, |
| | | o.perimeter= od.aa |
| 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.sd.OrderOtherMoneyMapper"> |
| | | <select id="findById"> |
| | | select |
| | | a.*, |
| | | b.alias |
| | | from order_other_money as a |
| | | left join basic_other_money as b |
| | | on a.`column` = b.`column` |
| | | where a.order_id = #{orderId} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | select operate_type from mm.basic_warehouse_type where type regexp #{type}; |
| | | </select> |
| | | |
| | | <select id="getBasicWarehouseTypeAll" > |
| | | select * from mm.basic_warehouse_type where type!='原片' and type!='辅料' order by id desc; |
| | | </select> |
| | | |
| | | <insert id="insertBasicWarehouse" useGeneratedKeys="true" > |
| | | insert into mm.basic_warehouse_type (operate_type_name, operate_type, type, create_time |
| | | ) |
| | | values ( |
| | | #{operateTypeName} ,#{operateType},#{type},now() |
| | | ) |
| | | </insert> |
| | | |
| | | <delete id="deleteBasicWarehouse" > |
| | | delete from mm.basic_warehouse_type where id=#{id} |
| | | </delete> |
| | | |
| | | <update id="updateBasicWarehouse" > |
| | | update mm.basic_warehouse_type set operate_type_name=#{operateTypeName},create_time=now() where id=#{id} |
| | | </update> |
| | | |
| | | |
| | | |
| | | |
| | |
| | | <update id="updateOrderParameter"> |
| | | update `order` o |
| | | left join |
| | | (select a.order_id,round(sum(a.perimeter),2) as aa,sum(a.quantity) as b,sum(a.compute_gross_area) as c |
| | | from sd.order_detail as a group by a.order_id) od |
| | | (select a.order_id, |
| | | round(sum(a.perimeter),2) as aa, |
| | | sum(a.quantity) as b, |
| | | sum(a.compute_gross_area) as c, |
| | | sum(a.gross_amount) as 'detailAmount' |
| | | from sd.order_detail as a group by a.order_id |
| | | ) as od |
| | | on o.order_id = od.order_id |
| | | left join (select oom.order_id, |
| | | sum(oom.money) as 'money' |
| | | from order_other_money as oom |
| | | where |
| | | oom.order_id = #{orderId} |
| | | group by oom.order_id |
| | | ) as c |
| | | on c.order_id = o.order_id |
| | | set |
| | | o.money = ifnull(od.detailAmount,0)+ifnull(c.money,0), |
| | | o.quantity = od.b, |
| | | o.area = od.c, |
| | | o.perimeter= od.aa |
| | |
| | | com\example\erp\service\pp\ReplenishService.class |
| | | com\example\erp\entity\sd\OrderDetail.class |
| | | com\example\erp\config\MyCorsConfig$1.class |
| | | com\example\erp\controller\sd\BasicOtherMoneyController.class |
| | | com\example\erp\controller\pp\ProductionSchedulingController.class |
| | | com\example\erp\service\sd\OrderProcessDetailService.class |
| | | com\example\erp\entity\mm\MaterialOutboundDetail.class |
| | |
| | | com\example\erp\mapper\mm\FinishedGoodsInventoryMapper.class |
| | | com\example\erp\service\IOrderService.class |
| | | com\example\erp\service\pp\ReportingWorkService.class |
| | | com\example\erp\tools\DownExcel.class |
| | | com\example\erp\mapper\sd\BasicDateMapper.class |
| | | com\example\erp\controller\pp\ReplenishController.class |
| | | com\example\erp\mapper\sd\OrderGlassDetailMapper.class |
| | | com\example\erp\entity\pp\WorkprogressMonthlySettlement.class |
| | | com\example\erp\entity\mm\FinishedGoodsInventory.class |
| | | com\example\erp\entity\sd\BasicOtherMoney.class |
| | | com\example\erp\mapper\sd\DeliveryDetailMapper.class |
| | | com\example\erp\config\MybatisPlusConfig.class |
| | | com\example\erp\entity\mm\BasicWarehouseType.class |
| | |
| | | com\example\erp\mapper\sd\OrderMapper.class |
| | | com\example\erp\controller\pp\ReportController.class |
| | | com\example\erp\service\mm\BasicWarehouseTypeService.class |
| | | com\example\erp\entity\sd\OrderOtherMoney.class |
| | | com\example\erp\mapper\OrderTestMapper.class |
| | | com\example\erp\mapper\mm\MaterialStoreMapper.class |
| | | com\example\erp\service\pp\ProductionSchedulingService.class |
| | |
| | | com\example\erp\entity\pp\ReportingWork.class |
| | | com\example\erp\tools\netty\MyWebSocketHandler.class |
| | | com\example\erp\entity\mm\MaterialOutbound.class |
| | | com\example\erp\mapper\sd\OrderOtherMoneyMapper.class |
| | | com\example\erp\controller\sd\OrderController.class |
| | | com\example\erp\mapper\pp\ReportMapper.class |
| | | com\example\erp\entity\pp\BasicDataProduce.class |
| | |
| | | com\example\erp\controller\sd\CustomerController.class |
| | | com\example\erp\entity\pp\ProductionScheduling.class |
| | | com\example\erp\common\CacheUtil.class |
| | | com\example\erp\service\sd\BasicOtherMoneyService.class |
| | | com\example\erp\entity\pp\OrderBom.class |
| | | com\example\erp\mapper\sd\DeliveryMapper.class |
| | | com\example\erp\controller\mm\BasicWarehouseTypeController.class |
| | |
| | | com\example\erp\entity\pp\Device.class |
| | | com\example\erp\tools\WebSocketServerPool.class |
| | | com\example\erp\controller\OrderTestController.class |
| | | com\example\erp\mapper\sd\BasicOtherMoneyMapper.class |
| | | com\example\erp\mapper\userInfo\SysMenuMapper.class |
| | | com\example\erp\tools\TokenTools.class |
| | | com\example\erp\controller\mm\MaterialStoreController.class |
| | |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\controller\pp\ProductionSchedulingController.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\mapper\mm\FinishedOperateLogMapper.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\mapper\pp\FlowCardMapper.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\controller\sd\BasicOtherMoneyController.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\tools\TokenTools.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\controller\mm\MaterialInventoryController.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\controller\pp\ReportWorkController.java |
| | |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\service\pp\FlowCardService.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\service\pp\ReworkService.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\entity\OrderTest.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\entity\sd\OrderOtherMoney.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\service\pp\ReportWorkService.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\mapper\sd\BasicDateMapper.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\controller\sd\OrderController.java |
| | |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\entity\userInfo\SysError.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\exception\ServiceException.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\tools\netty\MyChannelHandlerPool.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\entity\sd\BasicOtherMoney.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\config\InterceptorConfig.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\entity\pp\BasicDataProduce.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\service\sd\BasicGlassTypeServise.java |
| | |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\mapper\pp\ReportMapper.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\controller\mm\FinishedGoodsInventoryController.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\service\userInfo\UserService.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\mapper\sd\BasicOtherMoneyMapper.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\mapper\sd\BasicGlassTypeMapper.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\common\Constants.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\mapper\pp\ReportingWorkMapper.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\mapper\pp\PatchLogMapper.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\mapper\userInfo\SysErrorMapper.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\tools\DownExcel.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\entity\sd\DeliveryDetail.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\controller\mm\BasicWarehouseTypeController.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\mapper\pp\DamageDetailsMapper.java |
| | |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\entity\pp\DamageDetails.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\entity\sd\ReturnsDetail.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\ErpApplication.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\mapper\sd\OrderOtherMoneyMapper.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\config\WebSocketConfig.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\controller\pp\BasicDataProduceController.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\mapper\pp\BasicDateProduceMapper.java |
| | |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\entity\sd\OrderProcessDetail.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\entity\mm\BasicWarehouseType.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\controller\pp\ReplenishController.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\service\sd\BasicOtherMoneyService.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\controller\sd\CustomerController.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\mapper\pp\DeviceMaintenanceMapper.java |
| | | D:\Documents\ERP_override\north-glass-erp\src\main\java\com\example\erp\exception\GlobalExceptionHandle.java |