| | |
| | | confirmOutbound:'Delivery Confirmation', |
| | | confirmReceiptOfGoods:'Warehousing Confirmation', |
| | | quantityToBeStockedIn:'Quantity To Be Stocked In', |
| | | return:'Return', |
| | | reverseReviewList:'Reverse Review List', |
| | | |
| | | receivedSuccessfully:'Successfully entered the warehouse', |
| | | deliverySuccessful:"Successfully transferred out of warehouse ", |
| | |
| | | customerName:"Customer", |
| | | customerHomePage:'Customer Homepage', |
| | | increaseCustomers:'Increase Customers', |
| | | resetting:'Resetting', |
| | | resetting:'Revoke', |
| | | |
| | | }, |
| | | delivery:{ |
| | |
| | | confirmOutbound:'确认出库', |
| | | confirmReceiptOfGoods:'确认入库', |
| | | quantityToBeStockedIn:'待入库数量', |
| | | return:'返回', |
| | | reverseReviewList:'反审列表', |
| | | |
| | | |
| | | |
| | |
| | | totalArea:'总面积', |
| | | singlePieceArea:'单片面积', |
| | | perimeter:'周长', |
| | | returnToWarehouse:'退回', |
| | | returnToWarehouse:'撤销', |
| | | |
| | | |
| | | }, |
| | |
| | | <!-- 物料资料新增原片 --> |
| | | |
| | | |
| | | <script lang="ts" setup> |
| | | import {ref} from "vue"; |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElMessage} from "element-plus" |
| | | import {computed, onMounted, ref} from "vue" |
| | | import {useRoute, useRouter} from "vue-router" |
| | | import useUserInfo from "@/stores/userInfo" |
| | | import GlassType from "@/components/sd/product/GlassType.vue" |
| | | import useProductGlassTypeStore from "@/stores/sd/product/productGlassType" |
| | | |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | |
| | | label: '辅料', |
| | | } |
| | | ] |
| | | |
| | | let BasicData = ref([]) |
| | | |
| | | let ruleForm = ref({ |
| | | id:0, |
| | | type: '', |
| | | json: '' |
| | | |
| | | }) |
| | | |
| | | const userinfo=[] |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | const getWork = () => { |
| | | //页面加载请求 |
| | | request.get(`/BasicWarehouse/BasicWarehouseType/${value.value}`).then((res) => { |
| | | if(res.code==200){ |
| | | BasicData.value = res.data |
| | | for (let i=0;i<BasicData.value.length;i++){ |
| | | BasicData.value[i].Type=userinfo[i] |
| | | } |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const resetForm = () => { |
| | | BasicData.value.forEach((item)=>{ |
| | | item.Type="" |
| | | }) |
| | | } |
| | | |
| | | const submitForm = () => { |
| | | let filterData = {} |
| | | let isBool=true |
| | | let index = 0 |
| | | let productName = "{" |
| | | |
| | | BasicData.value.forEach((item)=>{ |
| | | filterData[item.OperateType]=item.Type |
| | | const customerName = item.Type |
| | | if(customerName === null || customerName === undefined || customerName === ''){ |
| | | ElMessage.error('请输入'+item.OperateTypeName) |
| | | isBool=false |
| | | return |
| | | } |
| | | if(index == BasicData.value.length - 1){ |
| | | productName+='"'+item.OperateType+'":"'+item.Type+'"' |
| | | }else { |
| | | productName+='"'+item.OperateType+'":"'+item.Type+'",' |
| | | } |
| | | index++; |
| | | }) |
| | | productName+="}" |
| | | |
| | | let materialStore={ |
| | | id:ruleForm.value.id, |
| | | type:value.value, |
| | | json:productName |
| | | } |
| | | console.log(materialStore) |
| | | if(isBool){ |
| | | request.post("/Material/saveMaterialStore", materialStore).then((res) => { |
| | | if(res.code==200){ |
| | | resetForm() |
| | | ElMessage.success('保存成功') |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | 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) => { |
| | | if(res.code==200){ |
| | | ruleForm.value=deepClone(res.data.data[0]) |
| | | value.value=ruleForm.value.type |
| | | const cc= JSON.parse(ruleForm.value.json); |
| | | for (let i in cc){ |
| | | userinfo.push(cc[i]) |
| | | } |
| | | getWork() |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | }) |
| | | |
| | | |
| | | </script> |
| | | <template> |
| | | |
| | |
| | | <div> |
| | | <el-row> |
| | | <el-col :span="4"> |
| | | <el-select v-model="value" placeholder="请选择类别"> |
| | | <el-select v-model="value" placeholder="请选择类别" @change="getWork"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | |
| | | |
| | | <el-divider ></el-divider> <!-- 添加分隔线 --> |
| | | |
| | | <el-row gutter="5" v-show="value=='原片'" > |
| | | <el-row gutter="5" |
| | | v-for="item in BasicData" > |
| | | <el-col :span="4.5"> |
| | | 长度 <el-input v-show="value=='原片'" v-model="name" placeholder="请输入长度" style="width: 150px; height: 30px;" /> |
| | | {{item.OperateTypeName}}:<el-input v-model="item.Type" placeholder="请输入数据" style="width: 150px; height: 30px;" /> |
| | | </el-col> |
| | | <el-col :span="4.5"> |
| | | 厚度 <el-input v-show="value=='原片'" v-model="name" placeholder="请输入厚度" style="width: 150px; height: 30px;" /> |
| | | </el-col> |
| | | <el-col :span="4.5"> |
| | | 宽度 <el-input v-show="value=='原片'" v-model="name" placeholder="请输入宽度" style="width: 150px; height: 30px;" /> |
| | | </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>在线LOW-E</el-dropdown-item>--> |
| | | <!-- <el-dropdown-item>SUPPER-I</el-dropdown-item>--> |
| | | <!-- <el-dropdown-item>SUPPER-I+</el-dropdown-item>--> |
| | | <!-- <el-dropdown-item>SUPPER-II</el-dropdown-item>--> |
| | | <!-- <el-dropdown-item>SUPPER-III</el-dropdown-item>--> |
| | | <!-- <el-dropdown-item>SUPPER-V</el-dropdown-item>--> |
| | | <!-- <el-dropdown-item>SUPPER-IA</el-dropdown-item>--> |
| | | <!-- <el-dropdown-item>SUNLITE LOWE</el-dropdown-item>--> |
| | | <!-- <el-dropdown-item>LOW-E40</el-dropdown-item>--> |
| | | <!-- <el-dropdown-item>LOW-E40A</el-dropdown-item>--> |
| | | <!-- <el-dropdown-item>LOW-E50</el-dropdown-item>--> |
| | | <!-- <el-dropdown-item>LOW-E55N</el-dropdown-item>--> |
| | | <!-- </el-dropdown-menu>--> |
| | | <!-- </template>--> |
| | | <!-- </el-dropdown>--> |
| | | <!-- </el-col>--> |
| | | </el-row> |
| | | <el-divider ></el-divider> <!-- 添加分隔线 --> |
| | | <el-row gutter="5" v-show="value=='原片'|| value=='辅料'"> |
| | | <el-col :span="4.5"> |
| | | 名称 <el-input v-show="value=='原片' || value=='辅料'" v-model="productName" placeholder="请输入名称" style="width: 150px; height: 30px;" /> |
| | | </el-col> |
| | | <el-col :span="4.5"> |
| | | 数量 <el-input v-show="value=='原片' || value=='辅料'" v-model="salId" placeholder="请输入数量" style="width: 150px; height: 30px;" /> |
| | | </el-col> |
| | | <el-col :span="4.5"> |
| | | 单位 <el-input v-model="name" placeholder="请输入单位" style="width: 150px; height: 30px;" /> |
| | | </el-col> |
| | | <el-col :span="4.5"> |
| | | 型号<el-input v-model="name" placeholder="请输入型号" style="width: 150px; height: 30px;" /> |
| | | </el-col> |
| | | </el-row> |
| | | <el-divider v-show="false" ></el-divider> <!-- 添加分隔线 --> |
| | | <!-- <el-row gutter="5">--> |
| | | <!-- <el-col span="4.5">--> |
| | | <!-- <el-input v-model="name" placeholder="请输入换算单位" style="width: 150px; height: 30px;" />--> |
| | | <!-- </el-col>--> |
| | | <!-- <el-col :span="4.5">--> |
| | | <!-- <el-input v-model="name" placeholder="请输入换算率" style="width: 150px; height: 30px;" />--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | |
| | | <el-divider ></el-divider> <!-- 添加分隔线 --> |
| | | |
| | | <el-row gutter="5"> |
| | | |
| | | |
| | | |
| | | |
| | | </el-row> |
| | | |
| | | <!-- <el-divider ></el-divider> <!– 添加分隔线 –>--> |
| | | |
| | | <!-- <el-row gutter="5">--> |
| | | <!-- <el-col :span="4.5">--> |
| | | <!-- <el-input v-model="name" placeholder="请输入型号" style="width: 150px; height: 30px;" />--> |
| | | <!-- </el-col>--> |
| | | |
| | | <!-- <el-col :span="4.5">--> |
| | | <!-- <el-input v-model="name" placeholder="请输入单位" style="width: 150px; height: 30px;" />--> |
| | | <!-- </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-menu>--> |
| | | <!-- </template>--> |
| | | <!-- </el-dropdown>--> |
| | | <!-- </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>0</el-dropdown-item>--> |
| | | <!-- </el-dropdown-menu>--> |
| | | <!-- </template>--> |
| | | <!-- </el-dropdown>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | |
| | | |
| | | <!-- <el-divider ></el-divider> <!– 添加分隔线 –>--> |
| | | |
| | | <!-- <el-row gutter="5">--> |
| | | |
| | | |
| | | <!-- <el-col :span="4.5">--> |
| | | <!-- <el-input v-model="name" placeholder="请输入备注" style="width: 150px; height: 30px;" />--> |
| | | <!-- </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>0</el-dropdown-item>--> |
| | | <!-- </el-dropdown-menu>--> |
| | | <!-- </template>--> |
| | | <!-- </el-dropdown>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | |
| | | <!-- <el-divider ></el-divider> <!– 添加分隔线 –>--> |
| | | |
| | | |
| | | <!-- <el-row gutter="5">--> |
| | | <!--<!– <el-col :span="4.5">–>--> |
| | | <!--<!– <el-input v-model="name" placeholder="请输入保质期" style="width: 150px; height: 30px;" />–>--> |
| | | <!--<!– </el-col>–>--> |
| | | <!--<!– <el-col :span="4.5">–>--> |
| | | <!--<!– <el-input v-model="name" placeholder="请输入最高预警" style="width: 150px; height: 30px;" />–>--> |
| | | <!--<!– </el-col>–>--> |
| | | <!--<!– <el-col :span="4.5">–>--> |
| | | <!--<!– <el-input v-model="name" placeholder="请输入拆包预警" style="width: 150px; height: 30px;" />–>--> |
| | | <!--<!– </el-col>–>--> |
| | | |
| | | <!-- </el-row>--> |
| | | <!-- <el-divider ></el-divider> <!– 添加分隔线 –>--> |
| | | <el-row gutter="10" justify="center" > |
| | | <el-col span="4"> |
| | | <el-button id="searchButton" type="primary" :icon="Search">查询</el-button> |
| | | <el-button id="searchButton" type="primary" @click="resetForm" >重置</el-button> |
| | | </el-col> |
| | | <el-col span="4"> |
| | | <el-button id="searchButton" type="primary" :icon="Search">确定</el-button> |
| | | <el-button id="searchButton" type="primary" @click="submitForm" >保存</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | <script setup> |
| | | |
| | | import {reactive} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | let router=useRouter() |
| | | import request from "@/utils/request" |
| | | import deepClone from "@/utils/deepClone" |
| | | import {ElMessage} from "element-plus" |
| | | import {computed, onMounted, reactive, ref} from "vue" |
| | | import {useRoute, useRouter} from "vue-router" |
| | | import {changeFilterEvent,filterChanged} from "@/hook" |
| | | |
| | | const router = useRouter() |
| | | const route = useRoute() |
| | | let produceList = ref([]) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/ingredients/CreateIngredients', query: { id: row.id }}) |
| | | break |
| | | return |
| | | } |
| | | case 'delete':{ |
| | | alert('我接收到子组件传送的删除信息') |
| | | break |
| | | let flowData = ref({ |
| | | id: row.id |
| | | }) |
| | | request.post("/Material/deleteMaterialStore",flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success("删除成功") |
| | | router.push({path:'/main/ingredients/SelectIngredients',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | return |
| | | } |
| | | } |
| | | } |
| | | |
| | | const value = ref('') |
| | | const options = [ |
| | | { |
| | | value: '原片', |
| | | label: '原片' |
| | | }, |
| | | { |
| | | value: '辅料', |
| | | label: '辅料', |
| | | } |
| | | ] |
| | | |
| | | 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 : 2 |
| | | }) |
| | | |
| | | let filterData = ref({ |
| | | type:'' |
| | | |
| | | }) |
| | | let BasicData = ref([]) |
| | | |
| | | let materialStore= ref([]) |
| | | |
| | | let arr = [ |
| | | {type:'expand',fixed:'left',slots: { content:'content' },width: '50'}, |
| | | {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) => { |
| | | if(res.code==200){ |
| | | gridOptions.columns.splice(0,gridOptions.columns.length) |
| | | console.log(res.data) |
| | | BasicData.value = res.data |
| | | //添加列 |
| | | gridOptions.columns=arr |
| | | |
| | | 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) |
| | | |
| | | } |
| | | getWorks() |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | })*/ |
| | | |
| | | |
| | | //列查询 |
| | | const getWork = () => { |
| | | 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: 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) |
| | | |
| | | } |
| | | getWorks() |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | |
| | | //数据绑定 |
| | | const getWorks = () => { |
| | | console.log(filterData.value) |
| | | request.post(`/Material/getSelectMaterialStore/1/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data.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 |
| | | pageNum.value=1 |
| | | |
| | | produceList = deepClone(materialStore.value) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //分页查询 |
| | | const getWorkPaging = () => { |
| | | console.log(filterData.value) |
| | | request.post(`/Material/getSelectMaterialStore/${pageNum.value}/${total.pageSize}`,filterData.value).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | console.log(res.data.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 |
| | | } |
| | | |
| | | produceList = deepClone(materialStore.value) |
| | | xGrid.value.loadData(produceList) |
| | | gridOptions.loading=false |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | | } |
| | | }) |
| | | } |
| | | |
| | | //分页查询 |
| | | const selectOrderList = ()=>{ |
| | | filterData.value.type=value.value |
| | | 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 |
| | | |
| | | 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) |
| | | |
| | | } |
| | | getWorkPaging() |
| | | |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | } |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | |
| | | selectOrderList(); |
| | | } |
| | | |
| | | |
| | | |
| | | //子组件接收参数 |
| | | |
| | | 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' }, |
| | | {title: '操作', width: '110', slots: { default: 'button_slot' },fixed:"left"}, |
| | | { type: 'seq',fixed:"left", title: '自序', width: '80' }, |
| | | {field: 'materialCode', width:'150', title: '物料编码', sortable: true,editRender: { name: 'input', attrs: { placeholder: '' } } }, |
| | | {field: 'materialName', width: '150',title: '物料名称', sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'origin', width: '120',title: '产地', sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | {field: 'width', width: '100',title: '宽度', sortable: true}, |
| | | {field: 'height',width: '100', title: '高度', sortable: true,showOverflow:"ellipsis"}, |
| | | {field: 'thickness', width: '80',title: '厚度', sortable: true}, |
| | | {field: 'model',width: '100', title: '型号', sortable: true}, |
| | | {field: 'conversionRate', width: '100',title: '换算率', sortable: true}, |
| | | {field: 'unit',width: '100', title: '单位', sortable: true}, |
| | | {field: 'conversionUnit', width: '80',title: '换算单位', sortable: true}, |
| | | {field: 'shelfLife',width: '100', title: '保质期', sortable: true}, |
| | | {field: 'weight', width: '100',title: ' 重量', sortable: true}, |
| | | {field: 'quantity',width: '110', title: '数量', sortable: true}, |
| | | {field: 'inventoryOrganization',width: '100', title: '库存组织', sortable: true}, |
| | | {field: 'remark',width: '80', title: '备注', sortable: true}, |
| | | |
| | | |
| | | |
| | | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | |
| | | zoom: true, |
| | | custom: true |
| | | }, |
| | | data: [ |
| | | { |
| | | "materialCode": 700900000000941, |
| | | "materialName": "丝袜防晒手套套袖", |
| | | "origin": "00", |
| | | "width": "00", |
| | | "height": "00", |
| | | "thickness":'00', |
| | | "model": "服饰", |
| | | "conversionRate": "1000", |
| | | "unit": "双", |
| | | "conversionUnit": "1", |
| | | "shelfLife": "12个月", |
| | | "weight": "0.0000", |
| | | "quantity": "10000", |
| | | "inventoryOrganization": "人工库", |
| | | "remark": "测试", |
| | | }, |
| | | { |
| | | "materialCode": 700900000000941, |
| | | "materialName": "丝袜防晒手套套袖", |
| | | "origin": "00", |
| | | "width": "00", |
| | | "height": "00", |
| | | "thickness":'00', |
| | | "model": "服饰", |
| | | "conversionRate": "1000", |
| | | "unit": "双", |
| | | "conversionUnit": "1", |
| | | "shelfLife": "12个月", |
| | | "weight": "0.0000", |
| | | "quantity": "10000", |
| | | "inventoryOrganization": "人工库", |
| | | "remark": "测试", |
| | | }, |
| | | ],//table body实际数据 |
| | | footerMethod ({ columns, data }) {//页脚函数 |
| | | return[ |
| | | columns.map((column, columnIndex) => { |
| | | if (columnIndex === 0) { |
| | | return '合计:' |
| | | } |
| | | // if (props.tableProp.footList.includes(column.field)) { |
| | | // return sumNum(data, column.field) |
| | | // } |
| | | |
| | | return '' |
| | | }) |
| | | ] |
| | |
| | | </script> |
| | | |
| | | <template> |
| | | |
| | | |
| | | <div class="main-div-customer"> |
| | | <div> |
| | | <el-row> |
| | | <el-col :span="4"> |
| | | <el-select v-model="value" placeholder="请选择类别" @change="getWork"> |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | |
| | | > |
| | | <!-- @toolbar-button-click="toolbarButtonClickEvent"--> |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <template #content="{ row }"> |
| | | <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> |
| | | </div> |
| | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [{ |
| | | 'name': t('productStock.return'), status:"info" ,icon: 'vxe-icon-undo', |
| | | 'code':'return' |
| | | },{ |
| | | 'name': t('basicData.cancelReview'),status: 'primary', |
| | | 'code':'add' |
| | | }], |
| | |
| | | return; |
| | | |
| | | } |
| | | |
| | | case 'return': { |
| | | router.go(-1) |
| | | return |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | { |
| | | 'name': t('productStock.return'), status:"info" ,icon: 'vxe-icon-undo', |
| | | 'code':'return' |
| | | }, |
| | | { |
| | | 'name': t('productStock.returnToWarehouse'),status: 'primary', |
| | | 'code':'cancel' |
| | | }], |
| | |
| | | if ($table) { |
| | | const selectRecords = $table.getCheckboxRecords() |
| | | |
| | | if (selectRecords.length <= 0) { |
| | | ElMessage.warning(t('productStock.unselectedData')) |
| | | return |
| | | } |
| | | let flowData = ref({ |
| | | |
| | | userId:userid, |
| | |
| | | return; |
| | | |
| | | } |
| | | |
| | | case 'return': { |
| | | router.go(-1) |
| | | break |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | {field: 'remarks', width: '140',title: t('productStock.remarks'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }}, |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [{ |
| | | buttons: [ |
| | | { |
| | | 'name': t('productStock.return'), status:"info" ,icon: 'vxe-icon-undo', |
| | | 'code':'return' |
| | | }, |
| | | { |
| | | 'name': t('basicData.review'),status: 'primary', |
| | | 'code':'add' |
| | | }, |
| | | { |
| | | 'name': t('basicData.cancelReview'),status: 'primary', |
| | | 'name': t('productStock.reverseReviewList'),status: 'primary', |
| | | 'code':'rework' |
| | | }, |
| | | { |
| | |
| | | router.push({path: '/main/productStock/ReworkRecord'}); |
| | | return |
| | | } |
| | | case 'return': { |
| | | router.go(-1) |
| | | break |
| | | } |
| | | case 'cancel': { |
| | | const $table = xGrid.value |
| | | //gridOptions.columns.unshift(a) |
| | |
| | | } |
| | | }) |
| | | |
| | | |
| | | //表尾求和 |
| | | const sumNum = (list, field) => { |
| | | let count = 0 |
| | |
| | | } |
| | | }) |
| | | } |
| | | return; |
| | | return |
| | | |
| | | } |
| | | |
| | |
| | | request.post("/customer/deleteCustomer", flowData.value).then((res) => { |
| | | if(res.code==200){ |
| | | ElMessage.success("删除成功") |
| | | location.reload(); |
| | | router.push({path:'/main/customer/selectCustomer',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | router.push("/login") |
| | |
| | | </template> |
| | | |
| | | <template #state="{ row,column}"> |
| | | <el-checkbox @click.native.prevent :checked="row[column.field]===2"/> |
| | | <el-checkbox @click.native.prevent :indeterminate="row[column.field]===1" :checked="row[column.field]===2"/> |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
New file |
| | |
| | | package com.example.erp.controller.mm; |
| | | |
| | | import com.example.erp.common.Result; |
| | | 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; |
| | | |
| | | @RestController |
| | | @RequestMapping("/BasicWarehouse") |
| | | public class BasicWarehouseTypeController { |
| | | @Autowired |
| | | BasicWarehouseTypeService basicWarehouseTypeService; |
| | | @GetMapping("/BasicWarehouseType/{type}") |
| | | public Result getBasicWarehouseType(@PathVariable String type){ |
| | | return Result.seccess(basicWarehouseTypeService.getBasicWarehouseType(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.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 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") |
| | | @Api(value="物料controller",tags={"物料操作接口"}) |
| | | public class MaterialController { |
| | | @Autowired |
| | | MaterialService faterialService; |
| | | |
| | | @ApiOperation("物料新增接口") |
| | | @PostMapping("/saveMaterialStore") |
| | | public Result saveMaterialStore( @RequestBody Map<String,Object> object){ |
| | | if(faterialService.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)); |
| | | } |
| | | |
| | | @ApiOperation("物料删除接口") |
| | | @PostMapping("/deleteMaterialStore") |
| | | public Result deleteMaterialStore( @RequestBody Map<String,Object> object){ |
| | | if(faterialService.deleteMaterialStore(object)){ |
| | | |
| | | return Result.seccess(); |
| | | |
| | | }else { |
| | | throw new ServiceException(Constants.Code_500,"删除失败"); |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | private Integer operateTypeId; |
| | | private String operateTypeName; |
| | | private String operateType; |
| | | private String type; |
| | | 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 MaterialStore { |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private String type; |
| | | private String json; |
| | | private LocalDate createTime; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | List<BasicWarehouseType> getBasicWarehouseTypeRework(); |
| | | |
| | | List<BasicWarehouseType> getBasicWarehouseType(String type); |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | Integer findOrderNumberdsum(String orderId); |
| | | |
| | | Integer findOrderDeliveryQuantitySum(String orderId); |
| | | |
| | | Integer findDeliveryQuantity(String deliveryId); |
| | | |
| | | Integer findDeliverydetailsum(String deliveryId,Integer deliveryDetailState); |
New file |
| | |
| | | package com.example.erp.mapper.mm; |
| | | |
| | | import com.example.erp.entity.mm.BasicWarehouseType; |
| | | import com.example.erp.entity.mm.MaterialStore; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.sd.Customer; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.data.repository.CrudRepository; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Mapper |
| | | public interface MaterialStoreMapper extends CrudRepository<MaterialStore,Long> { |
| | | |
| | | List<MaterialStore> getSelectMaterialStore(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize, |
| | | @Param("materialStore") MaterialStore materialStore); |
| | | |
| | | |
| | | Map<String,Integer> getSelectMaterialStorePageTotal(Integer offset, Integer pageSize, MaterialStore materialStore); |
| | | |
| | | 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 deleteMaterialStore(@Param("id") Long id); |
| | | |
| | | } |
New file |
| | |
| | | package com.example.erp.service.mm; |
| | | |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.mm.BasicWarehouseType; |
| | | import com.example.erp.entity.sd.BasicData; |
| | | import com.example.erp.entity.sd.Customer; |
| | | import com.example.erp.mapper.mm.BasicWarehouseTypeMapper; |
| | | import com.example.erp.mapper.sd.BasicDateMapper; |
| | | import com.example.erp.mapper.sd.CustomerMapper; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | @Service |
| | | @DS("sd") |
| | | public class BasicWarehouseTypeService { |
| | | @Autowired |
| | | private BasicWarehouseTypeMapper basicWarehouseTypeMapper; |
| | | |
| | | public List<Map<String, Object>> getBasicWarehouseType(String type){ |
| | | List<Map<String, Object>> Result=new ArrayList<Map<String, Object>>(); |
| | | |
| | | List<BasicWarehouseType> basicWarehouseType=basicWarehouseTypeMapper.getBasicWarehouseType(type); |
| | | for (BasicWarehouseType item : basicWarehouseType){ |
| | | Map<String, Object> map = new HashMap<>(); |
| | | |
| | | map.put("OperateTypeId",item.getOperateTypeId()); |
| | | map.put("OperateTypeName",item.getOperateTypeName()); |
| | | map.put("OperateType",item.getOperateType()); |
| | | map.put("Type",""); |
| | | |
| | | Result.add(map) ; |
| | | } |
| | | return Result; |
| | | /*Map<String, Object> map = new HashMap<>(); |
| | | map.put("type", basicWarehouseTypeMapper.getBasicWarehouseType(type)); |
| | | return map;*/ |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | finishedOperateLogMapper.insertOutFinishedOperateLog(orderDetail,userName,oddNumber); |
| | | Integer finishedGoodsInventorycount = finishedGoodsInventoryMapper.findOrderNumberdcount(orderDetail.getDeliveryDetail().getOrderId(),orderDetail.getDeliveryDetail().getOrderNumber()); |
| | | |
| | | Integer finishedGoodsInventorybycount=finishedGoodsInventoryMapper.finishedGoodsInventorybycount(orderDetail.getDeliveryDetail().getOrderId(),orderDetail.getDeliveryDetail().getOrderNumber()); |
| | | |
| | | Integer ordersum = finishedGoodsInventoryMapper.findOrderQuantity(orderDetail.getDeliveryDetail().getOrderId()); |
| | | Integer ordernumbersum = finishedGoodsInventoryMapper.findOrderNumberdsum(orderDetail.getDeliveryDetail().getOrderId()); |
| | | Integer orderDeliveryQuantitySum = finishedGoodsInventoryMapper.findOrderDeliveryQuantitySum(orderDetail.getDeliveryDetail().getOrderId()); |
| | | |
| | | Integer deliverysum = finishedGoodsInventoryMapper.findDeliveryQuantity(orderDetail.getDeliveryDetail().getDeliveryId()); |
| | | Integer deliverydetailsum = finishedGoodsInventoryMapper.findDeliverydetailsum(orderDetail.getDeliveryDetail().getDeliveryId(),0); |
| | |
| | | deliverydetailsum=0; |
| | | } |
| | | |
| | | System.out.println("订单总数:" + ordersum + "订单剩余数量:" + ordernumbersum + "准备出库数量" + |
| | | System.out.println("订单总数:" + ordersum + "订单已发数量:" + orderDeliveryQuantitySum + "准备出库数量" + |
| | | orderDetail.getWarehouseNum()+ "发货数量" + orderDetail.getDeliveryDetail().getQuantity()+ "发货总数" + |
| | | deliverysum+ "已发数量" + deliverydetailsum); |
| | | if (finishedGoodsInventorycount > 0) { |
| | |
| | | //修改订单表发货状态 |
| | | finishedGoodsInventoryMapper.updateOrderDeliveryState(orderDetail.getDeliveryDetail().getOrderId(),1); |
| | | //判断订单是否全部发货 |
| | | if (0 == (ordernumbersum - orderDetail.getWarehouseNum())) { |
| | | if (ordersum == (orderDeliveryQuantitySum + orderDetail.getWarehouseNum())) { |
| | | //修改订单表发货状态 |
| | | finishedGoodsInventoryMapper.updateOrderDeliveryState(orderDetail.getDeliveryDetail().getOrderId(),2); |
| | | } |
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.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.stereotype.Service; |
| | | 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 { |
| | | @Autowired |
| | | MaterialStoreMapper materialStoreMapper; |
| | | @Autowired |
| | | BasicWarehouseTypeMapper basicWarehouseTypeMapper; |
| | | @Autowired |
| | | SysErrorService sysErrorService; |
| | | |
| | | public Boolean saveMaterialStore(Map<String,Object> object) { |
| | | boolean saveState = true; |
| | | String id = ""; |
| | | String type = ""; |
| | | String json = ""; |
| | | if (object.get("id") != null) { |
| | | id = object.get("id").toString(); |
| | | } |
| | | if (object.get("type") != null) { |
| | | type = object.get("type").toString(); |
| | | } |
| | | if (object.get("json") != null) { |
| | | json = object.get("json").toString(); |
| | | } |
| | | if(Long.parseLong(id)>0){ |
| | | materialStoreMapper.updateMaterialStore(type,json, Long.valueOf(id)); |
| | | }else{ |
| | | materialStoreMapper.insertMaterialStore(type,json); |
| | | } |
| | | |
| | | return saveState; |
| | | |
| | | } |
| | | |
| | | public Map<String, Object> getSelectMaterialStore(Integer pageNum, Integer pageSize, MaterialStore materialStore) { |
| | | Integer offset = (pageNum - 1) * pageSize; |
| | | |
| | | Map<String, Object> map = new HashMap<>(); |
| | | map.put("data", materialStoreMapper.getSelectMaterialStore(offset, pageSize, materialStore)); |
| | | map.put("total", materialStoreMapper.getSelectMaterialStorePageTotal(offset, pageSize, materialStore)); |
| | | return map; |
| | | } |
| | | |
| | | public Boolean deleteMaterialStore(Map<String,Object> object) { |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | try { |
| | | String id = ""; |
| | | if (object.get("id") != null) { |
| | | id = object.get("id").toString(); |
| | | } |
| | | if(id!=null){ |
| | | materialStoreMapper.deleteMaterialStore(Long.valueOf(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | } 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; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | <mapper namespace="com.example.erp.mapper.mm.BasicWarehouseTypeMapper"> |
| | | |
| | | <select id="getBasicWarehouseTypeTakeOut" > |
| | | select * from mm.basic_warehouse_type where operate_type='领出'; |
| | | select * from mm.basic_warehouse_type where type='领出'; |
| | | </select> |
| | | |
| | | <select id="getBasicWarehouseTypeRework" > |
| | | select * from mm.basic_warehouse_type where operate_type='返工'; |
| | | select * from mm.basic_warehouse_type where type='返工'; |
| | | </select> |
| | | |
| | | <select id="getBasicWarehouseType" > |
| | | select * from mm.basic_warehouse_type where type=#{type}; |
| | | </select> |
| | | |
| | | |
| | |
| | | select sum(warehouse_num) from sd.order_detail where order_id=#{orderId} |
| | | </select> |
| | | |
| | | <select id="findOrderDeliveryQuantitySum" > |
| | | select sum(delivery_num) from sd.order_detail where order_id=#{orderId} |
| | | </select> |
| | | |
| | | <select id="findDeliveryQuantity" > |
| | | select quantity from sd.`delivery` where delivery_id=#{deliveryId} |
| | | </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.MaterialStoreMapper"> |
| | | |
| | | <select id="getSelectMaterialStore"> |
| | | select |
| | | * |
| | | from |
| | | mm.material_store m |
| | | <where> |
| | | <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="getSelectMaterialStorePageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | mm.material_store m |
| | | <where> |
| | | <if test="materialStore.id != null and materialStore.id != ''"> |
| | | and m.id regexp #{materialStore.id} |
| | | </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="deleteMaterialStore" > |
| | | delete from mm.material_store where id=#{id} |
| | | </delete> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd |
| | | on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number |
| | | |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.responsible_process!=rw.this_process and dd.quality_ins_status=1)) |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.quality_ins_status!=1)) |
| | | order by dd.id desc |
| | | </select> |
| | | |
| | |
| | | left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd |
| | | on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number |
| | | |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=1 and dd.quality_ins_status=1 order by dd.id |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=1 order by dd.id |
| | | |
| | | </select> |
| | | |
| | |
| | | <mapper namespace="com.example.erp.mapper.mm.BasicWarehouseTypeMapper"> |
| | | |
| | | <select id="getBasicWarehouseTypeTakeOut" > |
| | | select * from mm.basic_warehouse_type where operate_type='领出'; |
| | | select * from mm.basic_warehouse_type where type='领出'; |
| | | </select> |
| | | |
| | | <select id="getBasicWarehouseTypeRework" > |
| | | select * from mm.basic_warehouse_type where operate_type='返工'; |
| | | select * from mm.basic_warehouse_type where type='返工'; |
| | | </select> |
| | | |
| | | <select id="getBasicWarehouseType" > |
| | | select * 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.MaterialStoreMapper"> |
| | | |
| | | <select id="getSelectMaterialStore"> |
| | | select |
| | | * |
| | | from |
| | | mm.material_store m |
| | | <where> |
| | | <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="getSelectMaterialStorePageTotal"> |
| | | select |
| | | CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from |
| | | mm.material_store m |
| | | <where> |
| | | <if test="materialStore.id != null and materialStore.id != ''"> |
| | | and m.id regexp #{materialStore.id} |
| | | </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="deleteMaterialStore" > |
| | | delete from mm.material_store where id=#{id} |
| | | </delete> |
| | | |
| | | |
| | | |
| | | |
| | | </mapper> |
| | |
| | | left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd |
| | | on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number |
| | | |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.responsible_process!=rw.this_process and dd.quality_ins_status=1)) |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=0 and (dd.responsible_process=rw.this_process or (dd.quality_ins_status!=1)) |
| | | order by dd.id desc |
| | | </select> |
| | | |
| | |
| | | left join (select * from sd.order_glass_detail group by order_id,order_number) as ogd |
| | | on rw.order_id = ogd.order_id and dd.order_number = ogd.order_number |
| | | |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=1 and dd.quality_ins_status=1 order by dd.id |
| | | where dd.breakage_quantity-dd.quantity>0 and dd.available=1 order by dd.id |
| | | |
| | | </select> |
| | | |