Merge branch 'master' of http://bore.pub:10439/r/ERP_override
| | |
| | | <td>{{delivery.quantity}}</td> |
| | | <td>{{delivery.area}}</td> |
| | | <td></td> |
| | | <td>{{sumMoney}}</td> |
| | | <td>{{parseFloat(sumMoney.toFixed(2))}}</td> |
| | | <td colspan="2"></td> |
| | | </tr> |
| | | <tr class="day-in"> |
| | |
| | | {field: 'height',width:140, title: t('order.height'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'quantity',width:140, title: t('order.quantity'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'processingNote',width:200, title: t('order.processingNote'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'price',width:140, title: t('order.price'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'area',width:150, title: t('order.trueArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter'}, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'grossArea',width:160, title: t('order.trueGrossArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter'}, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'computeArea',width:180, title: t('order.computeArea'),editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true,filterMethod:filterChanged}, |
| | |
| | | <td>{{delivery.quantity}}</td> |
| | | <td>{{delivery.area}}</td> |
| | | <td></td> |
| | | <td>{{sumMoney}}</td> |
| | | <td>{{parseFloat(sumMoney.toFixed(2))}}</td> |
| | | <td colspan="2"></td> |
| | | </tr> |
| | | <tr class="day-in"> |
| | |
| | | oneClickStorage:'一键完工', |
| | | |
| | | quantityMount:'数量金额', |
| | | orderSummaryReport:'订单总报表', |
| | | msg:{ |
| | | productCheck:'请选择产品', |
| | | tableLengthNot:'没有表格数据', |
| | |
| | | returnQuantity :'返库数量', |
| | | materialReturnType :'材料返库类型', |
| | | createTime :'返库日期', |
| | | |
| | | surplusMaterialManagement :'余料管理', |
| | | additionOfSurplusMaterials :'余料新增', |
| | | excessMaterialOutflow :'余料出库', |
| | | }, |
| | | mainBasicData:{ |
| | | BasicData :'基础数据', |
| | |
| | | component: () => import('../views/sd/order/UpdateOrderCraft.vue'), |
| | | }, |
| | | { |
| | | path: 'orderSummaryReport', |
| | | name: 'orderSummaryReport', |
| | | component: () => import('../views/sd/order/OrderSummaryReport.vue'), |
| | | }, |
| | | { |
| | | path: 'orderReport', |
| | | name: 'orderReport', |
| | | component: () => import('../views/sd/order/OrderReport.vue'), |
| | |
| | | name: 'selectIngredientsStock', |
| | | component:()=>import('../views/mm/mainIngredientStock/SelectIngredientsStock.vue') |
| | | }, |
| | | |
| | | { |
| | | path: 'selectSurplusMaterials', |
| | | name: 'selectSurplusMaterials', |
| | | component:()=>import('../views/mm/mainIngredientStock/SelectSurplusMaterials.vue') |
| | | }, |
| | | { |
| | | path: 'accessoriesMonthlySettlement', |
| | | name: 'accessoriesMonthlySettlement', |
| | |
| | | router.push({path:'/main/ingredients/SelectIngredients',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.deleteFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(t('basicData.msg.reviewFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | router.push({path: '/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(t('basicData.msg.cancelReviewFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | <!-- <el-breadcrumb-item @click="changeRouter(3)" :class="indexFlag===3?'indexTag':''" :to="{ path: '/main/ingredientsStock/OriginalMonthlySettlement' }">原片月结</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(4)" :class="indexFlag===4?'indexTag':''" :to="{ path: '/main/ingredientsStock/AccessoriesMonthlySettlement' }">辅料月结</el-breadcrumb-item>--> |
| | | <el-breadcrumb-item @click="changeRouter(5)" :class="indexFlag===5?'indexTag':''" :to="{ path: '/main/ingredientsStock/ReturnToStorage' }">{{$t('mainIngredientStock.returnToStorage')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item @click="changeRouter(6)" :class="indexFlag===6?'indexTag':''" :to="{ path: '/main/ingredientsStock/selectSurplusMaterials' }">{{$t('mainIngredientStock.surplusMaterialManagement')}}</el-breadcrumb-item> |
| | | <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">{{$t('mainIngredientStock.returnToStorage')}}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | |
| | |
| | | router.push({path:'/main/ingredientsStock/MaterialOutbound', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.deleteSuccess')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | router.push({path: '/main/ingredientsStock/ReturnToStorage', query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.saveFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | router.push({path: '/main/ingredientsStock/ReturnToStorage', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(t('basicData.msg.reviewFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | router.push({path: '/main/ingredientsStock/ReturnToStorage', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(t('basicData.msg.cancelReviewFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| New file |
| | |
| | | <script setup> |
| | | |
| | | import {reactive, ref} from "vue"; |
| | | import {useRouter} from 'vue-router' |
| | | 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 userStore = useUserInfoStore() |
| | | const router = useRouter() |
| | | let produceList = ref([]) |
| | | let produceLists = ref([]) |
| | | let dialogTableVisible = ref(false) |
| | | const getTableRow = (row,type) =>{ |
| | | switch (type) { |
| | | case 'edit' :{ |
| | | //alert('我接收到子组件传送的编辑信息') |
| | | router.push({path: '/main/trader/CreateTrader', query: { id: row.id }}) |
| | | 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 : 100 |
| | | }) |
| | | |
| | | let filterData = ref({ |
| | | |
| | | }) |
| | | |
| | | const values = ref('') |
| | | |
| | | |
| | | let selectDate = ref(["",""]) |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | request.post(`/MaterialInventory/getSelectSurplusMaterialsDate/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) |
| | | } |
| | | }) |
| | | |
| | | |
| | | const selectOrderList = ()=>{ |
| | | request.post(`/MaterialInventory/getSelectSurplusMaterialsDate/1/${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) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | const changeDate = ()=>{ |
| | | selectOrderList() |
| | | } |
| | | |
| | | //页脚跳转 |
| | | const handlePageChange = ({ currentPage, pageSize }) => { |
| | | selectOrderList() |
| | | total.pageTotal = pageSize |
| | | pageNum.value=currentPage |
| | | } |
| | | |
| | | |
| | | |
| | | //子组件接收参数 |
| | | const xGrid = ref() |
| | | const gridOptions = reactive({ |
| | | border: "full",//表格加边框 |
| | | keepSource: true,//保持源数据 |
| | | align: 'center',//文字居中 |
| | | stripe:true,//斑马纹 |
| | | rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮 |
| | | id: 'SelectIngredientsStock', |
| | | 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:[ |
| | | { type: 'checkbox',fixed:"left", title: t('basicData.check'), width: '80' }, |
| | | { type: 'seq',fixed:"left", title: t('basicData.Number'), width: '80' }, |
| | | {field: 'width', width:'150', title: t('order.width'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged }, |
| | | {field: 'height', width: '150',title: t('order.height'), sortable: true,showOverflow:"ellipsis" ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'thickness', width: '100',title: t('product.msg.allThickness'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'colour',width: '150', title: t('mainIngredient.films'), sortable: true,showOverflow:"ellipsis",filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'quantity',width: '150', title: t('order.quantity'),editRender: { name: 'input' }, sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | {field: 'createTime',width: '150', title: t('productStock.storageTime'), sortable: true}, |
| | | {field: 'remarks',width: '150', title: t('basicData.remarks'), sortable: true,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod:filterChanged}, |
| | | |
| | | ],//表头按钮 |
| | | toolbarConfig: { |
| | | buttons: [ |
| | | {'code': 'out', 'name': t('mainIngredientStock.excessMaterialOutflow'),status: 'primary'}, |
| | | {'code': 'add', 'name': t('mainIngredientStock.additionOfSurplusMaterials'),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 validRules = ref({ |
| | | "quantity": [{ |
| | | validator (e) { |
| | | const regex = /^[1-9]\d*$/g |
| | | if ( !regex.test(e.row.quantity) ) { |
| | | return new Error(t('productStock.pleaseEnterAPositiveInteger')) |
| | | } |
| | | console.log(e.row.quantity1) |
| | | if (e.row.quantity > e.row.quantity1) { |
| | | return new Error(t('delivery.theShipmentQuantityCannotBeGreaterThanTheInventoryQuantity')) |
| | | } |
| | | |
| | | } |
| | | |
| | | }] |
| | | |
| | | }) |
| | | |
| | | |
| | | 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 |
| | | } |
| | | const errMap = await $grid.validate(selectRecords) |
| | | if (errMap) { |
| | | ElMessage.warning(t('productStock.dataVerificationFailed')) |
| | | return |
| | | } |
| | | let flowData = ref({ |
| | | creator:userStore.user.userName, |
| | | type:t('productStock.outbound'), |
| | | surplusMaterials: selectRecords, |
| | | state:2 |
| | | }) |
| | | console.log(flowData.value) |
| | | request.post("/MaterialInventory/addSelectSurplusMaterialsDate",flowData.value).then((res) => { |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({path:'/main/ingredientsStock/selectSurplusMaterials',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.saveFail')) |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | | router.push("/login") |
| | | }) |
| | | break |
| | | |
| | | |
| | | } |
| | | case 'add': { |
| | | dialogTableVisible.value=true |
| | | request.get(`/basicData/BasicDataByType/product/stuffColor`).then((res) => { |
| | | |
| | | if(res.code==200){ |
| | | titleSelectJson.value=deepClone(res.data) |
| | | }else{ |
| | | ElMessage.warning(res.msg) |
| | | } |
| | | }) |
| | | break |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | const titleSelectJson = ref({ |
| | | }) |
| | | |
| | | let filterData1 = ref({ |
| | | width:'', |
| | | height:'', |
| | | thickness:'', |
| | | quantity:'', |
| | | colour:'' |
| | | }) |
| | | |
| | | const resetForm = () => { |
| | | filterData1.value.width='' |
| | | filterData1.value.height='' |
| | | filterData1.value.thickness='' |
| | | filterData1.value.quantity='' |
| | | filterData1.value.colour='' |
| | | } |
| | | |
| | | const submitForm = () => { |
| | | let flowData = ref({ |
| | | surplusMaterials:filterData1.value, |
| | | creator:userStore.user.userName, |
| | | type:t('searchOrder.storage'), |
| | | state:1 |
| | | }) |
| | | request.post("/MaterialInventory/addSelectSurplusMaterialsDate",flowData.value).then((res) => { |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('basicData.msg.saveSuccess')) |
| | | router.push({path:'/main/ingredientsStock/selectSurplusMaterials',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.saveFail')) |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | | router.push("/login") |
| | | }) |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <div class="main-div-customer"> |
| | | <el-date-picker |
| | | v-model="selectDate" |
| | | type="daterange" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button> |
| | | |
| | | <vxe-grid |
| | | max-height="100%" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | :edit-rules="validRules" |
| | | |
| | | > |
| | | <!-- @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 v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" |
| | | link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">{{$t('basicData.delete')}}</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | </div> |
| | | </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="$t('mainIngredientStock.additionOfSurplusMaterials')" style="width: 70%;height:75% "> |
| | | <div class="order-primary" > |
| | | <el-row gutter="5"> |
| | | <el-col :span="4.5" > |
| | | {{$t('order.width')}}:<el-input v-model="filterData1.width" :placeholder="$t('mainIngredient.pleaseEnterData')" style="width: 150px; height: 30px;" /> |
| | | </el-col> |
| | | <el-divider ></el-divider> |
| | | <el-col :span="4.5" > |
| | | {{$t('order.height')}}:<el-input v-model="filterData1.height" :placeholder="$t('mainIngredient.pleaseEnterData')" style="width: 150px; height: 30px;" /> |
| | | </el-col> |
| | | <el-divider ></el-divider> |
| | | <el-col :span="4.5" > |
| | | {{$t('product.msg.allThickness')}}:<el-input v-model="filterData1.thickness" :placeholder="$t('mainIngredient.pleaseEnterData')" style="width: 150px; height: 30px;" /> |
| | | </el-col> |
| | | <el-divider ></el-divider> |
| | | <el-col :span="4.5" > |
| | | {{$t('mainIngredient.films')}}: |
| | | <el-select filterable v-model="filterData1.colour" :placeholder="$t('mainIngredient.pleaseEnterData')" style="width: 150px; height: 30px;" > |
| | | <el-option |
| | | v-for="item in titleSelectJson" |
| | | :key="item.id" |
| | | :label="item.basicName" |
| | | :value="item.basicName" |
| | | /> |
| | | </el-select> |
| | | </el-col> |
| | | <el-divider ></el-divider> |
| | | <el-col :span="4.5" > |
| | | {{$t('order.quantity')}}:<el-input v-model="filterData1.quantity" :placeholder="$t('mainIngredient.pleaseEnterData')" style="width: 150px; height: 30px;" /> |
| | | </el-col> |
| | | <el-divider ></el-divider> |
| | | </el-row> |
| | | <el-row gutter="10" justify="center" > |
| | | <el-col span="4"> |
| | | <el-button id="searchButton" type="primary" @click="resetForm" >{{$t('basicData.empty')}}</el-button> |
| | | </el-col> |
| | | <el-col span="4"> |
| | | <el-button id="searchButton" type="primary" @click="submitForm" >{{$t('basicData.save')}}</el-button> |
| | | </el-col> |
| | | </el-row> |
| | | </div> |
| | | |
| | | </el-dialog> |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .main-div-customer{ |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | .main-div-customers{ |
| | | width: 99%; |
| | | height: 100%; |
| | | } |
| | | .el-col{ |
| | | margin-left: 15px; |
| | | margin-bottom: 5px; |
| | | } |
| | | .order-primary{ |
| | | width: 100%; |
| | | } |
| | | </style> |
| | |
| | | router.push({path:'/main/productStock/CreateProductStock',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('productStock.entryFailure')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | | router.push("/login") |
| | | }) |
| | | |
| | | } |
| | |
| | | router.push({path:'/main/productStock/FinishedGoodsIssue',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('productStock.failedToRetrieve')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | router.push({path: '/main/productStock/FinishedProductOut', query: {random: Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(t('productStock.deliveryFailed')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | router.push({path:'/main/productStock/FinishedProductRework',query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(t('productStock.reworkFailed')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | router.push({path:'/main/productStock/OrderAllocation',query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(t('productStock.transferFailed')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.cancelReviewFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | |
| | | }else{ |
| | | ElMessage.warning(t('productStock.cancellationFailed')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.reviewFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | |
| | | }else{ |
| | | ElMessage.warning(t('productStock.voidFailed')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.cancelReviewFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | router.push({path:'/main/customer/selectCustomer',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.saveFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | router.push({path:'/main/customer/selectCustomer',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.deleteFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | }) |
| | | otherMoney.value =res.data.orderOtherMoneyList |
| | | |
| | | titleUploadData.value.creator=userStore.user.userName |
| | | titleUploadData.value.creatorId=userStore.user.userId |
| | | |
| | | xGrid.value.reloadData(orderDetails) |
| | | xGrid.value.loadData(produceList) |
| | | //隐藏复选框 |
| | |
| | | deliveryIdType:company.deliveryIdType |
| | | |
| | | }) |
| | | console.log(flowData.value) |
| | | request.post("/Delivery/insertDelivery", flowData.value).then((res) => { |
| | | if(res.code==200 && res.data===true){ |
| | | ElMessage.success(t('delivery.deliveryNoteSubmittedSuccessfully')) |
| | |
| | | router.push({path: '/main/delivery/selectDelivery', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(t('basicData.msg.reviewFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | router.push({path: '/main/delivery/selectDelivery', query:{random:Math.random()}}) |
| | | } else { |
| | | ElMessage.warning(t('basicData.msg.reviewFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | {field: 'orderDetail.productName',width:120, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.paymentTerms',width:120, title: t('delivery.paymentTerms'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.project',width:140, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'quantity',width:120, title: t('order.quantity'), sortable: true}, |
| | | {field: 'quantity',width:120, title: t('order.quantity'),sortable: true}, |
| | | {field: 'price',width:120, title: t('order.price'), sortable: true}, |
| | | {field: 'area',width:120, title: t('productStock.totalArea'), sortable: true}, |
| | | {field: 'order.otherMoney',width:120, title: t('basicData.otherAmounts'), sortable: true}, |
| | | {field: 'money',width:120, title: t('delivery.money'), sortable: true}, |
| | | {field: 'delivery.freight',width:120, title: t('delivery.freight'), sortable: true}, |
| | | {field: 'delivery.freightPrice',width:120, title: t('delivery.freightPrice'), sortable: true}, |
| | | {field: 'delivery.freightQuantity',width:120, title: t('delivery.freightQuantity'), sortable: true}, |
| | | {field: 'delivery.customerId',width:120, title: t('customer.customerNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.customerName',width:120, title: t('customer.customerName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.deliveryDate',width:120, title: t('delivery.deliveryDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | |
| | | {field: 'orderDetail.productName',width:120, title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.paymentTerms',width:120, title: t('delivery.paymentTerms'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.project',width:140, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'quantity',width:120, title: t('order.quantity'), sortable: true}, |
| | | {field: 'price',width:120, title: t('order.price'), sortable: true}, |
| | | {field: 'area',width:120, title: t('productStock.totalArea'), sortable: true}, |
| | | {field: 'order.otherMoney',width:120, title: t('basicData.otherAmounts'), sortable: true}, |
| | | {field: 'money',width:120, title: t('delivery.money'), sortable: true}, |
| | | {field: 'quantity',width:120, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'price',width:120, title: t('order.price'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'area',width:120, title: t('productStock.totalArea'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'order.otherMoney',width:120, title: t('basicData.otherAmounts'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'money',width:120, title: t('delivery.money'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.freight',width:120, title: t('delivery.freight'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.freightPrice',width:120, title: t('delivery.freightPrice'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.freightQuantity',width:120, title: t('delivery.freightQuantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.customerId',width:120, title: t('customer.customerNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.customerName',width:120, title: t('customer.customerName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'delivery.deliveryDate',width:120, title: t('delivery.deliveryDate'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | |
| | | router.push({path:'/main/delivery/selectDelivery',query:{random:Math.random()}}) |
| | | }else{ |
| | | ElMessage.warning(t('basicData.msg.deleteFail')) |
| | | router.push("/login") |
| | | } |
| | | }).catch((err)=>{ |
| | | ElMessage.error(t('basicData.msg.ServerConnectionError')) |
| | |
| | | |
| | | <template> |
| | | <div style="width: 100%;height: 100%"> |
| | | <el-date-picker |
| | | v-model="orderInfo.selectDeliveryDate" |
| | | type="daterange" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | <div class="head"> |
| | | <el-date-picker |
| | | v-model="orderInfo.selectDeliveryDate" |
| | | type="daterange" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button> |
| | | <vxe-grid |
| | | max-height="97%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button> |
| | | </div> |
| | | <div class="main-table"> |
| | | <vxe-grid |
| | | height="100%" |
| | | @filter-change="filterChanged" |
| | | class="mytable-scrollbar" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | > |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <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 v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | > |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <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 v-if="hasDecimal(item.field)">{{ hasDecimalhtml(item.field,row) }}</span> |
| | | <span v-else>{{ row[item.field] }}</span> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | |
| | | <template #state="{ row,column}"> |
| | | <el-checkbox @click.native.prevent :indeterminate="row[column.field]===1" :checked="row[column.field]===2"/> |
| | | </template> |
| | | <template #state="{ row,column}"> |
| | | <el-checkbox @click.native.prevent :indeterminate="row[column.field]===1" :checked="row[column.field]===2"/> |
| | | </template> |
| | | |
| | | |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" |
| | | v-if="userStore.user.permissions.indexOf('selectDelivery.edit') > -1" |
| | | link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <!-- <el-button @click="getTableRow(row,'printing')" :disabled="row.deliveryState!==2" link type="primary" size="small">打印</el-button>--> |
| | | <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')"> |
| | | <template #reference> |
| | | <el-button :disabled="row.deliveryState===2" link type="primary" size="small">{{ $t('basicData.delete') }}</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | </template> |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" |
| | | v-if="userStore.user.permissions.indexOf('selectDelivery.edit') > -1" |
| | | link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <!-- <el-button @click="getTableRow(row,'printing')" :disabled="row.deliveryState!==2" link type="primary" size="small">打印</el-button>--> |
| | | <el-popconfirm @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')"> |
| | | <template #reference> |
| | | <el-button :disabled="row.deliveryState===2" link type="primary" size="small">{{ $t('basicData.delete') }}</el-button> |
| | | </template> |
| | | </el-popconfirm> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <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> |
| | | </div> |
| | | </template> |
| | | </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> |
| | | <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> |
| | | |
| | | |
| | | |
| | | <el-dialog |
| | | :key="dialogKey" |
| | |
| | | margin: 8mm 16mm 8mm 16mm; |
| | | } |
| | | } |
| | | .head{ |
| | | width: 100%; |
| | | height: 35px; |
| | | } |
| | | |
| | | .main-table{ |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | |
| | | <template> |
| | | <div style="width: 100%;height: 100%"> |
| | | <el-date-picker |
| | | v-model="orderInfo.selectOrderListDate" |
| | | type="daterange" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | <div class="head"> |
| | | <el-date-picker |
| | | v-model="orderInfo.selectOrderListDate" |
| | | type="daterange" |
| | | :start-placeholder="$t('basicData.startDate')" |
| | | :end-placeholder="$t('basicData.endDate')" |
| | | format="YYYY-MM-DD" |
| | | value-format="YYYY-MM-DD" |
| | | |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button> |
| | | <vxe-grid |
| | | max-height="97%" |
| | | class="mytable-scrollbar" |
| | | @filter-change="filterChanged" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | /> |
| | | <el-button @click="changeDate" style="margin-top: -5px" id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button> |
| | | </div> |
| | | <div class="main-table"> |
| | | <vxe-grid |
| | | max-height="100%" |
| | | class="mytable-scrollbar" |
| | | @filter-change="filterChanged" |
| | | ref="xGrid" |
| | | v-bind="gridOptions" |
| | | v-on="gridEvents" |
| | | |
| | | > |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <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> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | > |
| | | <!-- 下拉显示所有信息插槽--> |
| | | <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> |
| | | </li> |
| | | </ul> |
| | | </template> |
| | | |
| | | <template #state="{ row,column}"> |
| | | <el-checkbox @click.native.prevent :indeterminate="row[column.field]===1" :checked="row[column.field]===2"/> |
| | | </template> |
| | | <template #state="{ row,column}"> |
| | | <el-checkbox @click.native.prevent :indeterminate="row[column.field]===1" :checked="row[column.field]===2"/> |
| | | </template> |
| | | |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">{{$t('basicData.delete')}}</el-button> |
| | | </template> |
| | | <!--左边固定显示的插槽--> |
| | | <template #button_slot="{ row }"> |
| | | <el-button @click="getTableRow(row,'edit')" link type="primary" size="small">{{$t('basicData.edit')}}</el-button> |
| | | <el-button @click="getTableRow(row,'delete')" link type="primary" size="small">{{$t('basicData.delete')}}</el-button> |
| | | </template> |
| | | |
| | | <template #num1_filter="{ column, $panel }"> |
| | | <div> |
| | | <div v-for="(option, index) in column.filters" :key="index"> |
| | | <input type="type" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/> |
| | | <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> |
| | | </div> |
| | | </template> |
| | | </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> |
| | | <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> |
| | | |
| | | |
| | | |
| | | </div> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | .head{ |
| | | width: 100%; |
| | | height: 35px; |
| | | } |
| | | |
| | | .main-table{ |
| | | width: 100%; |
| | | height: calc(100% - 35px); |
| | | } |
| | | </style> |
| | |
| | | item.computeArea = item.area |
| | | item.computeGrossArea = item.grossArea |
| | | }) |
| | | computedMoney(null) |
| | | selectOrder(order) |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | |
| | | |
| | | //关闭其他金额界面 |
| | | const refOtherMoney = ref() |
| | | const closeOtherMoneyDialog = async (done) => { |
| | |
| | | </span> |
| | | <template #dropdown> |
| | | <el-dropdown-menu> |
| | | <el-dropdown-item command="/main/order/orderSummaryReport" >{{$t('order.orderSummaryReport')}}</el-dropdown-item> |
| | | <el-dropdown-item command="/main/order/orderReport" >{{ $t('order.orderReport') }}</el-dropdown-item> |
| | | <el-dropdown-item command="/main/order/orderProductSummaryReport">{{ $t('order.orderDetailsSummary') }}</el-dropdown-item> |
| | | </el-dropdown-menu> |
| New file |
| | |
| | | <script setup> |
| | | import BasicTable from "@/components/BasicTable.vue" |
| | | import { ref} from "vue" |
| | | import request from "@/utils/request" |
| | | import {useI18n} from "vue-i18n"; |
| | | |
| | | const { t } = useI18n() |
| | | const childrenData = ref({ |
| | | columns:[ |
| | | {type:'expand',fixed:"left",width: 80,slots: { content:'content' }}, |
| | | {type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 }, |
| | | {field: 'orderId',width:120, title: t('order.orderId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'orderType',width:120, title: t('order.orderType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'customerName',width:120, title: t('customer.customerName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'project',width:120, title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'batch',width:120, title: t('order.batch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'quantity',width:120, title: t('order.quantity'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'area',width:120, title: t('order.area'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | //{field: 'otherMoney',width:120, title: t('basicData.otherAmounts'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'money',width:120, title: t('order.money'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'perimeter',width:120, title: t('order.perimeter'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'processingNote',width:120, title: t('order.processingNote'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'icon',width:120, title: t('order.icon'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'packType',width:120, title: t('order.packType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'alType',width:120, title: t('order.alType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'salesman',width:120, title: t('order.salesman'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'deliveryAddress',width:120, title: t('order.deliveryAddress'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'creator',width:120, title: t('order.creator'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'createTime',width:120, title: t('basicData.creationTime'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true}, |
| | | {field: 'customerBatch',width:120, title: t('order.customerBatch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true} |
| | | ],//表格表头字段 |
| | | data:[],//表格数据 |
| | | url :'/order/getOrderSummaryReport', |
| | | exportUrl :'/order/exportOrderSummary', |
| | | exportName:t('order.orderSummaryReport'), |
| | | footList:['quantity','money','area','perimeter','otherMoney'] |
| | | }) |
| | | |
| | | |
| | | </script> |
| | | |
| | | <template> |
| | | <basic-table |
| | | :childrenData="childrenData"/> |
| | | </template> |
| | | |
| | | <style scoped> |
| | | </style> |
| | |
| | | } |
| | | |
| | | |
| | | @ApiOperation("余料库存查询接口") |
| | | @SaCheckPermission("SelectIngredientsStock.search") |
| | | @PostMapping("/getSelectSurplusMaterialsDate/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getSelectSurplusMaterialsDate(@PathVariable Integer pageNum, @PathVariable Integer pageSize, @PathVariable List<String> selectDate, @RequestBody SurplusMaterials surplusMaterials){ |
| | | return Result.seccess(materialInventoryService.getSelectSurplusMaterialsDate(pageNum,pageSize,selectDate,surplusMaterials)); |
| | | } |
| | | |
| | | @ApiOperation("余料新增接口") |
| | | @SaCheckPermission("SelectIngredientsStock.search") |
| | | @PostMapping("/addSelectSurplusMaterialsDate") |
| | | public Result addSelectSurplusMaterialsDate( @RequestBody Map<String,Object> object){ |
| | | return Result.seccess(materialInventoryService.addSelectSurplusMaterialsDate(object)); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | return Result.seccess(orderService.getOrderProductSummary(pageNum,pageSize,selectDate,orderDetail)); |
| | | |
| | | } |
| | | |
| | | @SaCheckPermission("orderReport.search") |
| | | @ApiOperation("查询订单总报表") |
| | | @PostMapping("/getOrderSummaryReport/{pageNum}/{pageSize}/{selectDate}") |
| | | public Result getOrderSummaryReport(@PathVariable Integer pageNum, |
| | | @PathVariable Integer pageSize, |
| | | @PathVariable List<String> selectDate, |
| | | @RequestBody Order order) { |
| | | return Result.seccess(orderService.getOrderSummaryReport(pageNum,pageSize,selectDate,order)); |
| | | |
| | | } |
| | | |
| | | @ApiOperation("订单报表导出") |
| | | @PostMapping("/exportOrderReport") |
| | | public void exportOrderReport(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | |
| | | DownExcel.download(response, OrderDTO.class, orderService.exportOrderProductSummary(dates),"orderReport"); |
| | | } |
| | | |
| | | @ApiOperation("订单总报表导出") |
| | | @PostMapping("/exportOrderSummary") |
| | | public void exportOrderSummary(HttpServletResponse response, @RequestBody List<LocalDate> dates) throws IOException, IllegalAccessException, InstantiationException { |
| | | |
| | | //参数:相应的数据,实体类信息,相应的方法(数据获取),生成的excel名字 |
| | | DownExcel.download(response, Order.class, orderService.exportOrderSummary(dates),"orderReport"); |
| | | } |
| | | |
| | | |
| | | @ApiOperation("订单小片标签") |
| | | @PostMapping("/getOrderProductDetailTag/{orderId}") |
| 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 SurplusMaterials { |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private Double width; |
| | | private Double height; |
| | | private Double thickness; |
| | | private Integer quantity; |
| | | private String colour; |
| | | 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 SurplusMaterialsLog { |
| | | @TableId(type = IdType.AUTO) |
| | | |
| | | private Long id; |
| | | private Double width; |
| | | private Double height; |
| | | private Double thickness; |
| | | private Integer quantity; |
| | | private String colour; |
| | | private String type; |
| | | private String projectNo; |
| | | private String creator; |
| | | private String remarks; |
| | | private LocalDate createTime; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | private Integer quantity; |
| | | private Double money; |
| | | private Double price; |
| | | private Double otherMoney; |
| | | private String deliveryDetailRemakes; |
| | | private Integer deliveryDetailState; |
| | | private String otherColumns; |
| | |
| | | |
| | | Boolean updateMaterialInventoryArea(@Param("materialCode") Long materialCode,@Param("singlePieceArea") Double singlePieceArea); |
| | | |
| | | List<SurplusMaterials> getSelectSurplusMaterialsDate(@Param("offset") Integer offset, |
| | | @Param("pageSize") Integer pageSize,String startDate, String endDate, |
| | | @Param("surplusMaterials") SurplusMaterials surplusMaterials); |
| | | |
| | | Map<String,Integer> getSelectSurplusMaterialsDatePageTotal(Integer offset, Integer pageSize,String startDate, String endDate,SurplusMaterials surplusMaterials); |
| | | |
| | | SurplusMaterials selectSurplusMaterialsCount( @Param("surplusMaterials") SurplusMaterials surplusMaterials); |
| | | Boolean insertSurplusMaterials( @Param("surplusMaterials") SurplusMaterials surplusMaterials); |
| | | |
| | | Boolean insertSurplusMaterialsLog(@Param("surplusMaterials") SurplusMaterials surplusMaterials,String creator, String type); |
| | | |
| | | Boolean updateSurplusMaterialsOutQuantity( @Param("surplusMaterials") SurplusMaterials surplusMaterials); |
| | | |
| | | Boolean updateSurplusMaterialsIntQuantity( @Param("surplusMaterials") SurplusMaterials surplusMaterials); |
| | | |
| | | } |
| | |
| | | Integer getSelectShippingOrderDetailsPageTotal(Integer offset, Integer pageSize,OrderDetail orderDetail); |
| | | |
| | | Boolean insertDeliveryDetail(@Param("orderDetail") OrderDetail orderDetail, @Param("number") String number |
| | | ,@Param("deliveryNumber") Integer deliveryNumber,@Param("deliveryDetailMoney") Double deliveryDetailMoney); |
| | | ,@Param("deliveryNumber") Integer deliveryNumber,@Param("deliveryDetailMoney") Double deliveryDetailMoney, |
| | | @Param("otherMoneys") Double otherMoneys); |
| | | |
| | | Integer getdeliveryDetailmaximum(@Param("deliveryId") String deliveryId); |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.example.erp.dto.sd.OrderDTO; |
| | | import com.example.erp.dto.sd.OrderDetailProductDTO; |
| | | import com.example.erp.entity.sd.Order; |
| | | import com.example.erp.entity.sd.OrderDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | |
| | | |
| | | List<Map<String,Object>> getOrderProductByProductIds(Object productId, String orderId); |
| | | |
| | | List<Order> getOrderSummaryReport(Integer offset, Integer pageSize, String startDate, String endDate, Order order); |
| | | |
| | | Map<String,Integer> getOrderSummaryReportTotal(Integer offset, Integer pageSize, String startDate, String endDate, Order order, String type); |
| | | |
| | | List<Order> exportOrderSummary(List<LocalDate> dates); |
| | | |
| | | |
| | | } |
| | |
| | | Integer selectMaxOrderIdByMonth(); |
| | | |
| | | boolean updateOrderPrintNumber(@Param("orderId") String orderId); |
| | | |
| | | Integer selectMaxOrderIdByYear(); |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.dynamic.datasource.annotation.DS; |
| | | import com.example.erp.entity.mm.*; |
| | | import com.example.erp.entity.pp.FlowCard; |
| | | import com.example.erp.entity.pp.OptimizeUse; |
| | | import com.example.erp.entity.sd.Delivery; |
| | | import com.example.erp.entity.sd.DeliveryDetail; |
| | |
| | | return map; |
| | | } |
| | | |
| | | public Map<String, Object> getSelectSurplusMaterialsDate(Integer pageNum, Integer pageSize, List<String> selectDate, SurplusMaterials surplusMaterials) { |
| | | 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.getSelectSurplusMaterialsDate(offset, pageSize,startDate, endDate, surplusMaterials)); |
| | | map.put("total", materialInventoryMapper.getSelectSurplusMaterialsDatePageTotal(offset, pageSize,startDate, endDate, surplusMaterials)); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | return map; |
| | | } |
| | | |
| | | public Boolean addSelectSurplusMaterialsDate(Map<String,Object> object) { |
| | | boolean saveState = true; |
| | | //设置回滚点 |
| | | Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint(); |
| | | |
| | | String creator = ""; |
| | | if (object.get("creator") != null) { |
| | | creator = object.get("creator").toString(); |
| | | } |
| | | String type = ""; |
| | | if (object.get("type") != null) { |
| | | type = object.get("type").toString(); |
| | | } |
| | | int state = 0; |
| | | if (object.get("state") != null) { |
| | | state = Integer.parseInt(object.get("state").toString()); |
| | | } |
| | | |
| | | |
| | | if(state==1){ |
| | | SurplusMaterials surplusMaterials = JSONObject.parseObject(JSONObject.toJSONString(object.get("surplusMaterials")), SurplusMaterials.class); |
| | | if(surplusMaterials!=null){ |
| | | SurplusMaterials surplusMaterials1=materialInventoryMapper.selectSurplusMaterialsCount(surplusMaterials); |
| | | if(surplusMaterials1!=null){ |
| | | System.out.println(surplusMaterials1); |
| | | materialInventoryMapper.updateSurplusMaterialsIntQuantity(surplusMaterials1); |
| | | materialInventoryMapper.insertSurplusMaterialsLog(surplusMaterials1,creator,type); |
| | | }else{ |
| | | materialInventoryMapper.insertSurplusMaterials(surplusMaterials); |
| | | materialInventoryMapper.insertSurplusMaterialsLog(surplusMaterials,creator,type); |
| | | } |
| | | } |
| | | } else if (state==2) { |
| | | List<SurplusMaterials> surplusMaterialsList = JSONArray.parseArray(JSONObject.toJSONString(object.get("surplusMaterials")), SurplusMaterials.class); |
| | | if(!surplusMaterialsList.isEmpty()){ |
| | | for(SurplusMaterials surplusMaterials:surplusMaterialsList){ |
| | | materialInventoryMapper.updateSurplusMaterialsOutQuantity(surplusMaterials); |
| | | materialInventoryMapper.insertSurplusMaterialsLog(surplusMaterials,creator,type); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | return saveState; |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public String orderNumberSetting(String type) { |
| | |
| | | import com.example.erp.dto.sd.DeliveryDetailDTO; |
| | | import com.example.erp.dto.sd.DeliveryDetailProductDTO; |
| | | import com.example.erp.entity.sd.*; |
| | | import com.example.erp.entity.userInfo.Log; |
| | | import com.example.erp.entity.userInfo.SysError; |
| | | import com.example.erp.mapper.mm.FinishedGoodsInventoryMapper; |
| | | import com.example.erp.mapper.sd.*; |
| | | import com.example.erp.service.userInfo.LogService; |
| | | import com.example.erp.service.userInfo.SysErrorService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | FinishedGoodsInventoryMapper finishedGoodsInventoryMapper; |
| | | @Autowired |
| | | DeliveryOtherMoneyMapper deliveryOtherMoneyMapper; |
| | | @Autowired |
| | | LogService logService; |
| | | @Autowired |
| | | SysErrorService sysErrorService; |
| | | |
| | |
| | | //查询发货单是否存在 |
| | | Integer deliveryConut = deliveryMapper.getDeliveryConut(deliveryId); |
| | | |
| | | Log log = new Log(); |
| | | log.setOperator(delivery.getCreator()); |
| | | log.setOperatorId(delivery.getCreatorId()); |
| | | log.setContent(object.toString()); |
| | | |
| | | if (deliveryConut != 0) { |
| | | //编辑还原数据 |
| | | String deliveryDetailNumber = ""; |
| | |
| | | deliveryOtherMoneyMapper.deleteDeliveryOtherMoney(deliveryId); |
| | | oddNumber = deliveryId; |
| | | deliveryMapper.updateDelivery(delivery, oddNumber, orderDetaillist.get(0).getOrderId()); |
| | | log.setFunction("insertDelivery修改:"+oddNumber); |
| | | } else { |
| | | //获取单号 |
| | | oddNumber = orderNumberSetting("发货",deliveryIdType); |
| | | //新增发货表数据 |
| | | deliveryMapper.insertDelivery(delivery, oddNumber, orderDetaillist.get(0).getOrderId()); |
| | | log.setFunction("insertDelivery新增:"+oddNumber); |
| | | } |
| | | double area = 0.0; |
| | | Integer quantity = 0; |
| | |
| | | deliveryOtherMoney.setQuantity(0.0); |
| | | }); |
| | | double otherMoneys=0.0; |
| | | |
| | | List <Map<String, Object>> moneryList=new ArrayList<Map<String, Object>>();//最终结果 |
| | | //获取对象集合循环进行新增修改 |
| | | if (!orderDetaillist.isEmpty()) { |
| | | for (OrderDetail orderDetail : orderDetaillist) { |
| | | double deliveryDetailotherMoneys=0.0; |
| | | Integer calculateType=0; |
| | | |
| | | if (orderDetail.getOrder().getOrderId()==null){ |
| | |
| | | } |
| | | double deliveryDetailMoney = 0.0; |
| | | if (calculateType==1){ |
| | | deliveryDetailMoney=Double.valueOf(String.format("%.2f",Double.valueOf( |
| | | deliveryDetailMoney=Double.parseDouble(String.format("%.2f",Double.parseDouble( |
| | | String.format("%.2f", orderDetail.getComputeArea()*orderDetail.getDeliveryDetail().getQuantity()) |
| | | )*orderDetail.getPrice())); |
| | | }else if (calculateType==2){ |
| | | deliveryDetailMoney=Double.valueOf(String.format("%.2f",Double.valueOf( |
| | | String.format("%.2f", orderDetail.getComputeGrossArea()/orderDetail.getQuantity()*orderDetail.getDeliveryDetail().getQuantity()) |
| | | )*orderDetail.getPrice())); |
| | | if(Objects.equals(orderDetail.getArea(), orderDetail.getComputeArea())){ |
| | | deliveryDetailMoney=Double.parseDouble(String.format("%.2f",Double.parseDouble( |
| | | String.format("%.2f", orderDetail.getWidth()*orderDetail.getHeight()*orderDetail.getDeliveryDetail().getQuantity()/1000000) |
| | | )*orderDetail.getPrice())); |
| | | }else{ |
| | | deliveryDetailMoney=Double.parseDouble(String.format("%.2f",Double.parseDouble( |
| | | String.format("%.2f", orderDetail.getComputeArea()*orderDetail.getDeliveryDetail().getQuantity()) |
| | | )*orderDetail.getPrice())); |
| | | } |
| | | }else if (calculateType==3){ |
| | | deliveryDetailMoney=Double.valueOf(String.format("%.2f",orderDetail.getPrice() * orderDetail.getDeliveryDetail().getQuantity())); |
| | | deliveryDetailMoney=Double.parseDouble(String.format("%.2f",orderDetail.getPrice() * orderDetail.getDeliveryDetail().getQuantity())); |
| | | |
| | | } |
| | | //根据订单计算方式进行金额计算 |
| | |
| | | Map<String, Object> deliveryDetailOtherMoney = deliveryDetailMapper.getSelectOrderotherMoney(orderDetail.getOrderId(),orderDetail.getOrderNumber(), key, jsonObject.get(key).toString()); |
| | | if(deliveryDetailOtherMoney.get("monery")!=null){ |
| | | otherMoneys=otherMoneys+Double.valueOf(deliveryDetailOtherMoney.get("monery").toString()); |
| | | deliveryDetailotherMoneys=Double.valueOf(deliveryDetailOtherMoney.get("monery").toString()); |
| | | moneryItemmap.put("DeliveryDetailOtherMoney", deliveryDetailOtherMoney); |
| | | moneryList.add(moneryItemmap); |
| | | }else{ |
| | |
| | | } |
| | | |
| | | //新增发货明细数据 |
| | | deliveryDetailMapper.insertDeliveryDetail(orderDetail, oddNumber, deliveryDetailmaximum + 1,deliveryDetailMoney); |
| | | deliveryDetailMapper.insertDeliveryDetail(orderDetail, oddNumber, deliveryDetailmaximum + 1,deliveryDetailMoney,deliveryDetailotherMoneys); |
| | | //修改订单明细 |
| | | deliveryDetailMapper.updateOrderDetailDeliveryNum(orderDetail); |
| | | //修改库存表出库数量 |
| | |
| | | int intMoney= (int) Math.round(money+freight+otherMoneys); |
| | | //修改发货明细累加面积数量金额 |
| | | deliveryMapper.updatedelivery(Double.valueOf(String.format("%.2f", area)), quantity, Double.valueOf(intMoney), otherMoney.get(), oddNumber); |
| | | |
| | | logService.saveLog(log); |
| | | } else { |
| | | return false; |
| | | } |
| | |
| | | String formattedDate = dateFormat.format(currentDate); |
| | | orderId = "NG"+formattedDate+formattedNumber; |
| | | |
| | | }else if(dateType.equals("year")){ |
| | | Integer maxOrderId = orderMapper.selectMaxOrderIdByYear(); |
| | | String formattedNumber = String.format("%06d", maxOrderId+1); |
| | | Date currentDate = new Date(); |
| | | SimpleDateFormat dateFormat = new SimpleDateFormat("yy"); |
| | | String formattedDate = dateFormat.format(currentDate); |
| | | orderId = "NG"+formattedDate+formattedNumber; |
| | | } |
| | | |
| | | return orderId; |
| | |
| | | return orderDetailMapper.exportOrderReport(dates); |
| | | } |
| | | |
| | | public Map<String,Object> getOrderSummaryReport(Integer pageNum, Integer pageSize, List<String> selectDate, Order order) { |
| | | 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",orderDetailMapper.getOrderSummaryReport(offset, pageSize, startDate, endDate, order)); |
| | | map.put("total",orderDetailMapper.getOrderSummaryReportTotal(offset, pageSize, startDate, endDate, order,"order")); |
| | | List<String> list = new ArrayList<>(); |
| | | list.add(startDate); |
| | | list.add(endDate); |
| | | map.put("selectDate",list); |
| | | // map.put("total",orderMapper.getPageTotal(offset, pageSize, startDate, endDate, orderDetail)); |
| | | return map; |
| | | } |
| | | |
| | | public List<Order> exportOrderSummary(List<LocalDate> dates) { |
| | | return orderDetailMapper.exportOrderSummary(dates); |
| | | } |
| | | |
| | | public Map<String,Object> getOrderProductSummary(Integer pageNum, Integer pageSize, List<String> selectDate, OrderDetail orderDetail) { |
| | | Integer offset = (pageNum-1)*pageSize; |
| | | String endDate = LocalDate.now().toString(); |
| | |
| | | left join sd.order_detail od on fol.order_id = od.order_id and fol.operation_number = od.order_number |
| | | left join sd.`order` o on o.order_id=fol.order_id |
| | | <where> |
| | | date(fol.operate_time)>=#{startDate} and date(fol.operate_time) <= #{endDate} and o.delivery = 0 |
| | | date(fol.operate_time)>=#{startDate} and date(fol.operate_time) <= #{endDate} |
| | | <if test="finishedOperateLog.operationOrderNumber != null and finishedOperateLog.operationOrderNumber != ''"> |
| | | and fol.operation_order_number regexp #{finishedOperateLog.operationOrderNumber} |
| | | </if> |
| | |
| | | </update> |
| | | |
| | | |
| | | <select id="getSelectSurplusMaterialsDate" > |
| | | select * |
| | | from mm.surplus_materials |
| | | <where> |
| | | and date(create_time)>=#{startDate} and date(create_time) <= #{endDate} and quantity>0 |
| | | <if test="surplusMaterials.width != null and surplusMaterials.width != ''"> |
| | | and width regexp #{surplusMaterials.width} |
| | | </if> |
| | | <if test="surplusMaterials.height != null and surplusMaterials.height != ''"> |
| | | and height regexp #{surplusMaterials.height} |
| | | </if> |
| | | <if test="surplusMaterials.thickness != null and surplusMaterials.thickness != ''"> |
| | | and thickness regexp #{surplusMaterials.thickness} |
| | | </if> |
| | | <if test="surplusMaterials.quantity != null and surplusMaterials.quantity != ''"> |
| | | and quantity regexp #{surplusMaterials.quantity} |
| | | </if> |
| | | <if test="surplusMaterials.colour != null and surplusMaterials.colour != ''"> |
| | | and colour regexp #{surplusMaterials.colour} |
| | | </if> |
| | | <if test="surplusMaterials.remarks != null and surplusMaterials.remarks != ''"> |
| | | and remarks regexp #{surplusMaterials.remarks} |
| | | </if> |
| | | </where> |
| | | limit #{offset},#{pageSize}; |
| | | </select> |
| | | |
| | | <select id="getSelectSurplusMaterialsDatePageTotal" > |
| | | select CEILING(count(id)/#{pageSize}) as 'pageTotal', |
| | | count(id) as 'total' |
| | | from mm.surplus_materials |
| | | <where> |
| | | and date(create_time)>=#{startDate} and date(create_time) <= #{endDate} and quantity>0 |
| | | <if test="surplusMaterials.width != null and surplusMaterials.width != ''"> |
| | | and width regexp #{surplusMaterials.width} |
| | | </if> |
| | | <if test="surplusMaterials.height != null and surplusMaterials.height != ''"> |
| | | and height regexp #{surplusMaterials.height} |
| | | </if> |
| | | <if test="surplusMaterials.thickness != null and surplusMaterials.thickness != ''"> |
| | | and thickness regexp #{surplusMaterials.thickness} |
| | | </if> |
| | | <if test="surplusMaterials.quantity != null and surplusMaterials.quantity != ''"> |
| | | and quantity regexp #{surplusMaterials.quantity} |
| | | </if> |
| | | <if test="surplusMaterials.colour != null and surplusMaterials.colour != ''"> |
| | | and colour regexp #{surplusMaterials.colour} |
| | | </if> |
| | | <if test="surplusMaterials.remarks != null and surplusMaterials.remarks != ''"> |
| | | and remarks regexp #{surplusMaterials.remarks} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectSurplusMaterialsCount" > |
| | | select * |
| | | from mm.surplus_materials |
| | | where width=#{surplusMaterials.width} and height=#{surplusMaterials.height} |
| | | and thickness=#{surplusMaterials.thickness} and colour=#{surplusMaterials.colour} limit 0,1 |
| | | </select> |
| | | |
| | | |
| | | <insert id="insertSurplusMaterials"> |
| | | insert into mm.surplus_materials (width,height,thickness,quantity,colour,create_time) |
| | | values (#{surplusMaterials.width},#{surplusMaterials.height},#{surplusMaterials.thickness},#{surplusMaterials.quantity},#{surplusMaterials.colour},now()) |
| | | </insert> |
| | | |
| | | <insert id="insertSurplusMaterialsLog"> |
| | | insert into mm.surplus_materials_log (width,height,thickness,quantity,colour,type,creator,create_time) |
| | | values (#{surplusMaterials.width},#{surplusMaterials.height},#{surplusMaterials.thickness}, |
| | | #{surplusMaterials.quantity},#{surplusMaterials.colour},#{type},#{creator},now()) |
| | | </insert> |
| | | |
| | | <update id="updateSurplusMaterialsOutQuantity"> |
| | | update mm.surplus_materials set quantity=quantity-#{surplusMaterials.quantity} where id=#{surplusMaterials.id} |
| | | </update> |
| | | |
| | | <update id="updateSurplusMaterialsIntQuantity"> |
| | | update mm.surplus_materials set quantity=quantity+#{surplusMaterials.quantity} where id=#{surplusMaterials.id} |
| | | </update> |
| | | |
| | | |
| | | </mapper> |
| | |
| | | <result column="delivery_date" property="delivery.deliveryDate"/> |
| | | <result column="creator" property="delivery.creator"/> |
| | | <result column="salesman" property="delivery.salesman"/> |
| | | <result column="freight" property="delivery.freight"/> |
| | | <result column="freight_price" property="delivery.freightPrice"/> |
| | | <result column="freight_quantity" property="delivery.freightQuantity"/> |
| | | |
| | | <result column="product_id" property="orderDetail.productId"/> |
| | | <result column="product_name" property="orderDetail.productName"/> |
| | |
| | | |
| | | <insert id="insertDeliveryDetail" useGeneratedKeys="true" > |
| | | insert into sd.delivery_detail (delivery_id,delivery_number,order_number, |
| | | area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,other_columns,create_time,price) |
| | | area,order_id,quantity,money,delivery_detail_remakes,delivery_detail_state,other_columns,create_time,price,other_money) |
| | | values ( |
| | | #{number} ,#{deliveryNumber},#{orderDetail.orderNumber},#{orderDetail.computeArea}*#{orderDetail.deliveryDetail.quantity}, |
| | | #{orderDetail.orderId},#{orderDetail.deliveryDetail.quantity}, |
| | | #{deliveryDetailMoney},'',1,#{orderDetail.otherColumns},now(),#{orderDetail.price} |
| | | #{deliveryDetailMoney},'',1,#{orderDetail.otherColumns},now(),#{orderDetail.price},#{otherMoneys} |
| | | ) |
| | | </insert> |
| | | |
| | |
| | | od.height, |
| | | od.shape, |
| | | fgi.actual_signal_area, |
| | | od.area, |
| | | od.gross_area, |
| | | od.compute_area, |
| | | od.compute_gross_area, |
| | |
| | | od.height, |
| | | od.shape, |
| | | fgi.actual_signal_area, |
| | | od.area, |
| | | od.gross_area, |
| | | od.compute_area, |
| | | od.compute_gross_area, |
| | |
| | | dd.quantity, |
| | | dd.delivery_detail_remakes, |
| | | dd.create_time, |
| | | o.other_money |
| | | o.other_money, |
| | | d.freight_price, |
| | | d.freight_quantity, |
| | | d.freight |
| | | from sd.delivery_detail dd |
| | | left join sd.delivery d on dd.delivery_id=d.delivery_id |
| | | left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | |
| | | and dd.order_number like concat('%', #{deliveryDetail.orderNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.area != null and deliveryDetail.area != ''"> |
| | | and dd.area like concat('%', #{deliveryDetail.area},'%') |
| | | and dd.area regexp REGEXP_REPLACE(#{deliveryDetail.area},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.price != null and deliveryDetail.price != ''"> |
| | | and dd.price like concat('%', #{deliveryDetail.price},'%') |
| | | and dd.price regexp REGEXP_REPLACE(#{deliveryDetail.price},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.money != null and deliveryDetail.money != ''"> |
| | | and dd.money like concat('%', #{deliveryDetail.money},'%') |
| | | and dd.money regexp REGEXP_REPLACE(#{deliveryDetail.money},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''"> |
| | | and dd.quantity like concat('%', #{deliveryDetail.quantity},'%') |
| | | and dd.quantity regexp REGEXP_REPLACE(#{deliveryDetail.quantity},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes like concat('%', #{deliveryDetail.deliveryDetailRemakes},'%') |
| | |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.deliveryAddress != null and deliveryDetail.delivery.deliveryAddress != '')"> |
| | | and d.delivery_address like concat('%', #{deliveryDetail.delivery.deliveryAddress},'%') |
| | | </if> |
| | | <if test="deliveryDetail.order!=null and (deliveryDetail.order.otherMoney != null )"> |
| | | and o.other_money regexp REGEXP_REPLACE(#{deliveryDetail.order.otherMoney},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freight != null )"> |
| | | and d.freight regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freight},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightQuantity != null )"> |
| | | and d.freight_quantity regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freightQuantity},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightPrice != null )"> |
| | | and d.freight_price regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freightPrice},'\\.0+$','') |
| | | </if> |
| | | |
| | | </where> |
| | |
| | | and dd.order_number like concat('%', #{deliveryDetail.orderNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.area != null and deliveryDetail.area != ''"> |
| | | and dd.area like concat('%', #{deliveryDetail.area},'%') |
| | | and dd.area regexp REGEXP_REPLACE(#{deliveryDetail.area},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.price != null and deliveryDetail.price != ''"> |
| | | and dd.price like concat('%', #{deliveryDetail.price},'%') |
| | | and dd.price regexp REGEXP_REPLACE(#{deliveryDetail.price},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.money != null and deliveryDetail.money != ''"> |
| | | and dd.money like concat('%', #{deliveryDetail.money},'%') |
| | | and dd.money regexp REGEXP_REPLACE(#{deliveryDetail.money},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''"> |
| | | and dd.quantity like concat('%', #{deliveryDetail.quantity},'%') |
| | | and dd.quantity regexp REGEXP_REPLACE(#{deliveryDetail.quantity},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes like concat('%', #{deliveryDetail.deliveryDetailRemakes},'%') |
| | |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.deliveryAddress != null and deliveryDetail.delivery.deliveryAddress != '')"> |
| | | and d.delivery_address like concat('%', #{deliveryDetail.delivery.deliveryAddress},'%') |
| | | </if> |
| | | |
| | | <if test="deliveryDetail.order!=null and (deliveryDetail.order.otherMoney != null )"> |
| | | and o.other_money regexp REGEXP_REPLACE(#{deliveryDetail.order.otherMoney},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freight != null )"> |
| | | and d.freight regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freight},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightQuantity != null )"> |
| | | and d.freight_quantity regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freightQuantity},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightPrice != null )"> |
| | | and d.freight_price regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freightPrice},'\\.0+$','') |
| | | </if> |
| | | </where> |
| | | order by dd.delivery_id,dd.delivery_number |
| | | </select> |
| | |
| | | sum(dd.quantity) as quantity, |
| | | dd.delivery_detail_remakes, |
| | | dd.create_time, |
| | | o.other_money |
| | | o.other_money, |
| | | d.freight_price, |
| | | d.freight_quantity, |
| | | d.freight |
| | | from sd.delivery_detail dd left join delivery d on dd.delivery_id=d.delivery_id |
| | | left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number |
| | | left join sd.`order` o on dd.order_id=o.order_id |
| | |
| | | and dd.order_number like concat('%', #{deliveryDetail.orderNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.area != null and deliveryDetail.area != ''"> |
| | | and dd.area like concat('%', #{deliveryDetail.area},'%') |
| | | and dd.area regexp REGEXP_REPLACE(#{deliveryDetail.area},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.price != null and deliveryDetail.price != ''"> |
| | | and dd.price like concat('%', #{deliveryDetail.price},'%') |
| | | and dd.price regexp REGEXP_REPLACE(#{deliveryDetail.price},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.money != null and deliveryDetail.money != ''"> |
| | | and dd.money like concat('%', #{deliveryDetail.money},'%') |
| | | and dd.money regexp REGEXP_REPLACE(#{deliveryDetail.money},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''"> |
| | | and dd.quantity like concat('%', #{deliveryDetail.quantity},'%') |
| | | and dd.quantity regexp REGEXP_REPLACE(#{deliveryDetail.quantity},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes like concat('%', #{deliveryDetail.deliveryDetailRemakes},'%') |
| | |
| | | </if> |
| | | <if test="deliveryDetail.orderDetail!=null and (deliveryDetail.orderDetail.productId != null and deliveryDetail.orderDetail.productId != '')"> |
| | | and od.product_name like concat('%', #{deliveryDetail.orderDetail.productId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.order!=null and (deliveryDetail.order.otherMoney != null )"> |
| | | and o.other_money regexp REGEXP_REPLACE(#{deliveryDetail.order.otherMoney},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freight != null )"> |
| | | and d.freight regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freight},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightQuantity != null )"> |
| | | and d.freight_quantity like concat('%', #{deliveryDetail.delivery.freightQuantity},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightPrice != null )"> |
| | | and d.freight_price regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freightPrice},'\\.0+$','') |
| | | </if> |
| | | |
| | | </where> |
| | |
| | | and dd.order_number like concat('%', #{deliveryDetail.orderNumber},'%') |
| | | </if> |
| | | <if test="deliveryDetail.area != null and deliveryDetail.area != ''"> |
| | | and dd.area like concat('%', #{deliveryDetail.area},'%') |
| | | and dd.area regexp REGEXP_REPLACE(#{deliveryDetail.area},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.price != null and deliveryDetail.price != ''"> |
| | | and dd.price like concat('%', #{deliveryDetail.price},'%') |
| | | and dd.price regexp REGEXP_REPLACE(#{deliveryDetail.price},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.money != null and deliveryDetail.money != ''"> |
| | | and dd.money like concat('%', #{deliveryDetail.money},'%') |
| | | and dd.money regexp REGEXP_REPLACE(#{deliveryDetail.money},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.quantity != null and deliveryDetail.quantity != ''"> |
| | | and dd.quantity like concat('%', #{deliveryDetail.quantity},'%') |
| | | and dd.quantity regexp REGEXP_REPLACE(#{deliveryDetail.quantity},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.deliveryDetailRemakes != null and deliveryDetail.deliveryDetailRemakes != ''"> |
| | | and dd.delivery_detail_remakes like concat('%', #{deliveryDetail.deliveryDetailRemakes},'%') |
| | |
| | | <if test="deliveryDetail.orderDetail!=null and (deliveryDetail.orderDetail.productId != null and deliveryDetail.orderDetail.productId != '')"> |
| | | and od.product_name like concat('%', #{deliveryDetail.orderDetail.productId},'%') |
| | | </if> |
| | | <if test="deliveryDetail.order!=null and (deliveryDetail.order.otherMoney != null )"> |
| | | and o.other_money regexp REGEXP_REPLACE(#{deliveryDetail.order.otherMoney},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freight != null )"> |
| | | and d.freight regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freight},'\\.0+$','') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightQuantity != null )"> |
| | | and d.freight_quantity like concat('%', #{deliveryDetail.delivery.freightQuantity},'%') |
| | | </if> |
| | | <if test="deliveryDetail.delivery!=null and (deliveryDetail.delivery.freightPrice != null )"> |
| | | and d.freight_price regexp REGEXP_REPLACE(#{deliveryDetail.delivery.freightPrice},'\\.0+$','') |
| | | </if> |
| | | |
| | | </where> |
| | | group by dd.delivery_id,dd.order_id,od.product_id) as zu |
| | |
| | | </resultMap> |
| | | |
| | | |
| | | <select id="getOrderSummaryReport" > |
| | | SELECT |
| | | * |
| | | from sd.`order` as b |
| | | where date(b.create_time)>=#{startDate} and date(b.create_time) <= #{endDate} |
| | | <if test="order.orderType != null and order.orderType != ''"> |
| | | and b.order_type like concat('%',#{order.orderType},'%') |
| | | </if> |
| | | <if test="order.customerId != null and order.customerId != ''"> |
| | | and b.customer_id like concat('%',#{order.customerId},'%') |
| | | </if> |
| | | <if test="order.customerName != null and order.customerName != ''"> |
| | | and b.customer_name like concat('%',#{order.customerName},'%') |
| | | </if> |
| | | <if test="order.project != null and order.project != ''"> |
| | | and b.project like concat('%',#{order.project},'%') |
| | | </if> |
| | | <if test="order.orderId != null and order.orderId != ''"> |
| | | and b.order_id like concat('%',#{order.orderId},'%') |
| | | </if> |
| | | <if test="order.batch != null and order.batch != ''"> |
| | | and b.batch like concat('%',#{order.batch},'%') |
| | | </if> |
| | | |
| | | <if test="order.icon != null and order.icon != ''"> |
| | | and b.icon like concat('%',#{order.icon},'%') |
| | | </if> |
| | | |
| | | <if test="order.packType != null and order.packType != ''"> |
| | | and b.pack_type like concat('%',#{order.packType},'%') |
| | | </if> |
| | | <if test="order.alType != null and order.alType != ''"> |
| | | and b.al_type like concat('%',#{order.alType},'%') |
| | | </if> |
| | | |
| | | <if test="order.salesman != null and order.salesman != ''"> |
| | | and b.salesman like concat('%',#{order.salesman},'%') |
| | | </if> |
| | | |
| | | <if test="order.deliveryAddress != null and order.deliveryAddress != ''"> |
| | | and b.delivery_address like concat('%',#{order.deliveryAddress},'%') |
| | | </if> |
| | | |
| | | <if test="order.creator != null and order.creator != ''"> |
| | | and b.creator like concat('%',#{order.creator},'%') |
| | | </if> |
| | | <if test="order.otherMoney != null and order.otherMoney != ''"> |
| | | and b.other_money regexp REGEXP_REPLACE(#{order.otherMoney},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="order.quantity != null "> |
| | | and b.quantity like concat('%',#{order.quantity},'%') |
| | | </if> |
| | | <if test="order.money != null "> |
| | | and b.money regexp REGEXP_REPLACE(#{order.money},'\\.0+$','') |
| | | </if> |
| | | <if test="order.perimeter != null and order.perimeter != ''"> |
| | | and b.perimeter regexp REGEXP_REPLACE(#{order.perimeter},'\\.0+$','') |
| | | </if> |
| | | <if test="order.processingNote != null and order.processingNote != ''"> |
| | | and b.processing_note like concat('%',#{order.processingNote},'%') |
| | | </if> |
| | | <if test="order.area != null and order.area != ''"> |
| | | and b.area regexp REGEXP_REPLACE(#{order.area},'\\.0+$','') |
| | | </if> |
| | | order by b.id desc |
| | | limit #{offset},#{pageSize} |
| | | </select> |
| | | |
| | | <select id="getOrderSummaryReportTotal" > |
| | | SELECT |
| | | CEILING(count(b.id)/#{pageSize}) as 'pageTotal', |
| | | count(b.id) as 'total' |
| | | from sd.`order` as b |
| | | where date(b.create_time)>=#{startDate} and date(b.create_time) <= #{endDate} |
| | | <if test="order.orderType != null and order.orderType != ''"> |
| | | and b.order_type like concat('%',#{order.orderType},'%') |
| | | </if> |
| | | |
| | | <if test="order.customerId != null and order.customerId != ''"> |
| | | and b.customer_id like concat('%',#{order.customerId},'%') |
| | | </if> |
| | | <if test="order.customerName != null and order.customerName != ''"> |
| | | and b.customer_name like concat('%',#{order.customerName},'%') |
| | | </if> |
| | | <if test="order.project != null and order.project != ''"> |
| | | and b.project like concat('%',#{order.project},'%') |
| | | </if> |
| | | |
| | | <if test="order.orderId != null and order.orderId != ''"> |
| | | and b.order_id like concat('%',#{order.orderId},'%') |
| | | </if> |
| | | |
| | | <if test="order.batch != null and order.batch != ''"> |
| | | and b.batch like concat('%',#{order.batch},'%') |
| | | </if> |
| | | |
| | | <if test="order.icon != null and order.icon != ''"> |
| | | and b.icon like concat('%',#{order.icon},'%') |
| | | </if> |
| | | |
| | | <if test="order.packType != null and order.packType != ''"> |
| | | and b.pack_type like concat('%',#{order.packType},'%') |
| | | </if> |
| | | |
| | | |
| | | <if test="order.alType != null and order.alType != ''"> |
| | | and b.al_type like concat('%',#{order.alType},'%') |
| | | </if> |
| | | <if test="order.salesman != null and order.salesman != ''"> |
| | | and b.salesman like concat('%',#{order.salesman},'%') |
| | | </if> |
| | | <if test="order.deliveryAddress != null and order.deliveryAddress != ''"> |
| | | and b.delivery_address like concat('%',#{order.deliveryAddress},'%') |
| | | </if> |
| | | <if test="order.creator != null and order.creator != ''"> |
| | | and b.creator like concat('%',#{order.creator},'%') |
| | | </if> |
| | | <if test="order.otherMoney != null and order.otherMoney != ''"> |
| | | and b.other_money regexp REGEXP_REPLACE(#{order.otherMoney},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="order.quantity != null "> |
| | | and b.quantity like concat('%',#{order.quantity},'%') |
| | | </if> |
| | | <if test="order.money != null "> |
| | | and b.money regexp REGEXP_REPLACE(#{order.money},'\\.0+$','') |
| | | </if> |
| | | <if test="order.perimeter != null and order.perimeter != ''"> |
| | | and b.perimeter regexp REGEXP_REPLACE(#{order.perimeter},'\\.0+$','') |
| | | </if> |
| | | <if test="order.processingNote != null and order.processingNote != ''"> |
| | | and b.processing_note like concat('%',#{order.processingNote},'%') |
| | | </if> |
| | | <if test="order.area != null and order.area != ''"> |
| | | and b.area regexp REGEXP_REPLACE(#{order.area},'\\.0+$','') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="exportOrderSummary" > |
| | | SELECT * |
| | | from sd.`order` as b |
| | | where date(b.create_time)>=#{dates[0]} and date(b.create_time) <= #{dates[1]} |
| | | order by b.id desc |
| | | </select> |
| | | |
| | | |
| | | <select id="getOrderReport" resultMap="orderMap"> |
| | | SELECT |
| | | *, |
| | |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and a.width like concat('%',#{orderDetail.width},'%') |
| | | and a.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and a.height like concat('%',#{orderDetail.height},'%') |
| | | and a.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and a.gross_area like concat('%',#{orderDetail.grossArea},'%') |
| | | and a.gross_area regexp REGEXP_REPLACE(#{orderDetail},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%') |
| | | and a.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''"> |
| | | and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%') |
| | | and a.gross_amount regexp REGEXP_REPLACE(#{orderDetail.grossAmount},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.alType != null and orderDetail.order.alType != ''"> |
| | |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and a.width like concat('%',#{orderDetail.width},'%') |
| | | and a.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and a.height like concat('%',#{orderDetail.height},'%') |
| | | and a.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and a.gross_area like concat('%',#{orderDetail.grossArea},'%') |
| | | and a.gross_area regexp REGEXP_REPLACE(#{orderDetail},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%') |
| | | and a.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''"> |
| | | and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%') |
| | | and a.gross_amount regexp REGEXP_REPLACE(#{orderDetail.grossAmount},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.alType != null and orderDetail.order.alType != ''"> |
| | |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and a.width like concat('%',#{orderDetail.width},'%') |
| | | and a.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and a.height like concat('%',#{orderDetail.height},'%') |
| | | and a.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and a.gross_area like concat('%',#{orderDetail.grossArea},'%') |
| | | and a.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%') |
| | | and a.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''"> |
| | | and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%') |
| | | and a.gross_amount regexp REGEXP_REPLACE(#{orderDetail.grossAmount},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.alType != null and orderDetail.order.alType != ''"> |
| | |
| | | </if> |
| | | |
| | | <if test="orderDetail.width != null and orderDetail.width != ''"> |
| | | and a.width like concat('%',#{orderDetail.width},'%') |
| | | and a.width regexp REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.height != null and orderDetail.height != ''"> |
| | | and a.height like concat('%',#{orderDetail.height},'%') |
| | | and a.height regexp REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.quantity != null and orderDetail.quantity != ''"> |
| | |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossArea != null and orderDetail.grossArea != ''"> |
| | | and a.gross_area like concat('%',#{orderDetail.grossArea},'%') |
| | | and a.gross_area regexp REGEXP_REPLACE(#{orderDetail.grossArea},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.computeGrossArea != null and orderDetail.computeGrossArea != ''"> |
| | | and a.compute_gross_area like concat('%',#{orderDetail.computeGrossArea},'%') |
| | | and a.compute_gross_area regexp REGEXP_REPLACE(#{orderDetail.computeGrossArea},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.shape != null and orderDetail.shape != ''"> |
| | |
| | | </if> |
| | | |
| | | <if test="orderDetail.grossAmount != null and orderDetail.grossAmount != ''"> |
| | | and a.gross_amount like concat('%',#{orderDetail.grossAmount},'%') |
| | | and a.gross_amount regexp REGEXP_REPLACE(#{orderDetail.grossAmount},'\\.0+$','') |
| | | </if> |
| | | |
| | | <if test="orderDetail.order!=null and orderDetail.order.alType != null and orderDetail.order.alType != ''"> |
| | |
| | | on d.type_id = c.type_id |
| | | left join sd.basic_glass_type as e |
| | | on e.type_id = d.belong |
| | | where date(a.create_time) >= #{dates[0]} |
| | | and date(a.create_time) <= #{dates[1]} |
| | | where date(b.create_time) >= #{dates[0]} |
| | | and date(b.create_time) <= #{dates[1]} |
| | | group by b.order_id, a.product_id |
| | | order by b.order_id desc |
| | | </select> |
| | |
| | | where |
| | | date(a.create_time) BETWEEN DATE_FORMAT(DATE(NOW()), '%Y-%m-01') AND DATE(NOW()) |
| | | </select> |
| | | |
| | | |
| | | <select id="selectMaxOrderIdByYear"> |
| | | select |
| | | ifnull(SUBSTR(max(order_id) from 5),0) |
| | | from |
| | | `order` as a |
| | | where |
| | | year(a.create_time) = year(NOW()) |
| | | </select> |
| | | |
| | | <update id="updateOrderParameter"> |
| | | update `order` o |