廖井涛
2024-04-18 4688ec39bdff70a1754597cbd86e96e261311fb8
提交打印
17个文件已修改
2个文件已添加
1165 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/router/index.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomerOrder.vue 345 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryPrinting.vue 224 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/sd/CustomerController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/CustomerMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryDetailMapper.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/Customer.xml 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/Delivery.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetail.xml 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/Customer.xml 156 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/Delivery.xml 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml 53 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/router/index.js
@@ -132,6 +132,11 @@
              name: 'createDelivery',
              component: () => import('../views/sd/delivery/CreateDelivery.vue'),
            },
            {
              path: 'deliveryPrinting',
              name: 'deliveryPrinting',
              component: () => import('../views/sd/delivery/DeliveryPrinting.vue'),
            },
            {
@@ -192,6 +197,11 @@
              path: 'createCustomer',
              name: 'createCustomer',
              component: () => import('../views/sd/customer/CreateCustomer.vue'),
            },
            {
              path: 'selectCustomerOrder',
              name: 'selectCustomerOrder',
              component: () => import('../views/sd/customer/SelectCustomerOrder.vue'),
            }
          ]
        },
north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue
@@ -151,7 +151,7 @@
    // }],
    // import: false,
    // export: true,
    // print: true,
     print: true,
    zoom: true,
    custom: true
  },
north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue
@@ -24,6 +24,11 @@
      router.push({path: '/main/customer/CreateCustomer', query: { id: row.id }})
      break
    }
    case 'customerOrder' :{
      //alert('我接收到子组件传送的编辑信息')
      router.push({path: '/main/customer/selectCustomerOrder', query: { id: row.id }})
      break
    }
    case 'delete':{
      let ruleForm = ref({
        id:0,
@@ -189,7 +194,7 @@
  columns:[
          {type:'expand',fixed:"left",slots: { content:'content' },width: 60},
          {type: 'seq',fixed:"left", title: t('basicData.Number'), width: 80 },
          {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' },fixed:"left"},
          {title: t('basicData.operate'), width: 180, slots: { default: 'button_slot' },fixed:"left"},
          {field: 'id', title: t('customer.customerNumber'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
          {field: 'customerName', title: t('customer.customerName'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
          {field: 'grade', title: t('customer.customerGrade'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
@@ -250,6 +255,7 @@
      <!--左边固定显示的插槽-->
      <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,'customerOrder')" link type="primary" size="small">客户订单</el-button>
        <el-popconfirm @confirm="getTableRow(row,'delete')" title="确定删除?">
          <template #reference>
            <el-button  link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomerOrder.vue
New file
@@ -0,0 +1,345 @@
<script setup>
import {Search} from "@element-plus/icons-vue"
import {useRoute, useRouter} from "vue-router"
import {onMounted, reactive, ref} from "vue";
import request from "@/utils/request"
import deepClone from "@/utils/deepClone"
import VXETable from "vxe-table";
import useUserInfoStore from "@/stores/userInfo";
import {ElMessage} from "element-plus";
import { useI18n } from 'vue-i18n'
//语言获取
const { t } = useI18n()
const router = useRouter()
const route = useRoute()
const userStore = useUserInfoStore()
const username = userStore.user.userName
const userid = userStore.user.userId
let produceList = ref([])
const getTableRow = (row,type) =>{
  switch (type) {
  }
}
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 filterData = ref({
    order:{
      customerId:''
    }
})
let selectDate = ref(["",""])
let pageNum=ref(1)
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 100
})
onMounted(()=>{
  //获取传过来的数据进行判断
  const str = route.query.id
  if (typeof str != 'undefined' && str != null && str !== '' && str !== '\n' && str !== '\r'){
    filterData.value.order.customerId = Number(str)
    request.post(`/customer/getSelectCustomerOderDate/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => {
      if(res.code==200){
        console.log(res.data.data)
        total.dataTotal = res.data.total.total*1
        total.pageTotal= res.data.total.pageTotal
        selectDate.value = res.data.selectDate
        pageNum.value=1
        produceList = deepClone(res.data.data)
        xGrid.value.loadData(produceList)
        gridOptions.loading=false
      }else{
        ElMessage.warning(res.msg)
        router.push("/login")
      }
    })
  }
})
const changeFilterEvent = (event, option, $panel,) => {
  // 手动触发筛选
  $panel.changeOption(event, !!option.data, option)
}
function filterChanged(column){
  gridOptions.loading=true
  //筛选条件发生变化条件发生变化
  let value = column.datas[0]!=undefined?column.datas[0]:''
  value = value.trim()
  //判断是否存在外键
  if (column.property.indexOf('.')>-1){
    const  columnArr = column.property.split('.')
    filterData.value[columnArr[0]] = {
      [columnArr[1]]:value
    }
  }else{
    filterData.value[column.property] = value
  }
  request.post(`/customer/getSelectCustomerOderDate/1/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => {
    if(res.code==200){
      total.dataTotal = res.data.total.total*1
      total.pageTotal= res.data.total.pageTotal
      selectDate.value = res.data.selectDate
      pageNum.value=1
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading=false
    }else{
      ElMessage.warning(res.msg)
      router.push("/login")
    }
  })
}
const selectOrderList = ()=>{
  request.post(`/customer/getSelectCustomerOderDate/${pageNum.value}/${total.pageSize}/${selectDate.value}`,filterData.value).then((res) => {
    if(res.code==200){
      if (res.data.total!=null){
        total.dataTotal = res.data.total.total*1
        total.pageTotal= res.data.total.pageTotal
      }
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading=false
    }else{
      ElMessage.warning(res.msg)
      router.push("/login")
    }
  })
}
const changeDate =  ()=>{
  pageNum.value=1
  selectOrderList()
}
//页脚跳转
const handlePageChange = ({ currentPage, pageSize }) => {
  total.pageTotal = pageSize
  pageNum.value=currentPage
  selectOrderList()
}
const xGrid = ref()
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
  align: 'center',//文字居中
  stripe:true,//斑马纹
  rowConfig: {isCurrent: true, isHover: true,height: 30},//鼠标移动或选择高亮
  id: 'OrderList',
  showFooter: true,//显示脚
  printConfig: {},
  importConfig: {},
  exportConfig: {},
  scrollY:{ enabled: true },//开启虚拟滚动
  showOverflow:true,
  columnConfig: {
    resizable: true,
    useKey: true
  },
  filterConfig: {   //筛选配置项
    remote: true
  },
  customConfig: {
    storage: true
  },
  editConfig: {
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },//表头参数
  columns:[
    {type:'expand',slots: { content:'content' },width: 60,fixed:"left"},
    {type: 'seq', title: t('basicData.Number'), width: 80 ,fixed:"left"},
    {field: 'orderId',width:120,  title: t('order.orderId'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.customerId',width:120,  title: t('customer.customerNumber')},
    {field: 'order.customerName',width:120,  title: t('customer.customerName')},
    {field: 'quantity',width:120,  title: t('order.quantity')},
    {field: 'productId',width:120,  title: "产品编号",filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'productName',width:120,  title: "产品名称",filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'shape',width:120,  title: "形状",filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'width',width:120,  title: "宽度",filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'height',width:120,  title: "高度",filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.project',width:120,  title: t('order.project'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.batch',width:120,  title: t('order.batch'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.money',width:120,   title: "订单金额",filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'area',width:120,  title: t('productStock.totalArea')},
    {field: 'order.orderType',width:120,  title: t('order.orderType'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.salesman',width:120,  title:t('order.salesman'),filters:[{ data: '' }],slots: { filter: 'num1_filter' }, sortable: true},
    {field: 'order.createTime',width:120,  title:"创建时间"},
  ],//表头按钮
  toolbarConfig: {
    buttons: [
    ],
    /*import: false,
   export: true,
   print: true,*/
    zoom: true,
    custom: true
  },
  footerMethod ({ columns, data }) {//页脚函数
    let footList = ['quantity','area']
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return t('basicData.total')
        }
        if (footList.includes(column.field)) {
          return sumNum(data, column.field)
        }
        return ''
      })
    ]
  }
})
//表尾求和
const sumNum = (list, field) => {
  let count = 0
  list.forEach(item => {
    count += Number(item[field])
  })
  return count.toFixed(2)
}
const gridEvents = {
  toolbarButtonClick ({ code }) {
    const $grid = xGrid.value
    if ($grid) {
      switch (code) {
      }
    }
  }
}
//数组数据验重
function isAllEqual(array){
  if(array.length>0){
    return !array.some(function(value,index){
      return value !== array[0];
    });
  }else{
    return true;
  }
}
</script>
<template>
  <div  style="width: 100%;height: 100%">
    <el-date-picker
        v-model="selectDate"
        type="daterange"
        start-placeholder="开始时间"
        end-placeholder="结束时间"
        format="YYYY-MM-DD"
        value-format="YYYY-MM-DD"
    />
    <el-button @click="changeDate" style="margin-top: -5px"  id="searchButton" type="primary" :icon="Search">{{$t('basicData.search')}}</el-button>
    <vxe-grid
        max-height="97%"
        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 #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 #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>
  </div>
</template>
<style scoped>
</style>
north-glass-erp/northglass-erp/src/views/sd/delivery/DeliveryPrinting.vue
New file
@@ -0,0 +1,224 @@
<script setup>
import request from "@/utils/request"
import {ElDatePicker, ElMessage} from "element-plus"
import {nextTick, onMounted, onUnmounted, reactive, ref, watch} from "vue"
import {Search} from "@element-plus/icons-vue"
import {useRouter} from 'vue-router'
import {changeFilterEvent, filterChanged} from "@/hook"
import { useI18n } from 'vue-i18n'
import deepClone from "@/utils/deepClone";
//语言获取
const { t } = useI18n()
let router=useRouter()
let produceList = ref([])
let delivery = ref([])
let props = defineProps({
  deliveryId:null
})
const form = ref({
})
onMounted(()=>{
  console.log(props.deliveryId)
  if(props.deliveryId===null  || props.deliveryId===undefined || props.deliveryId===''){
    return
  }
  form.value.deliveryId = props.deliveryId
  request.post(`/Delivery/getSelectDeliveryPrinting`,form.value).then((res) => {
    if(res.code==200){
      produceList = deepClone(res.data.data)
      delivery=deepClone(res.data.delivery)
      console.log(produceList)
      console.log(delivery)
    }else{
      ElMessage.warning(res.msg)
      router.push("/login")
    }
  })
})
</script>
<template>
  <div style="width: 100%;height: 100%">
    <div style="font-size: 30px;text-align: center">常州市吉利玻璃有限公司</div>
    <el-row :gutter="20">
      <el-col :span="6"><div></div></el-col>
      <el-col :span="12"><div style="font-size: 25px;text-align: center">销售发货单</div></el-col>
      <el-col :span="6">
        <div style="font-size: 20px;text-align: center;display: flex">
          <div>发货单号:</div>
          <div>{{delivery.deliveryId}}</div>
        </div>
      </el-col>
    </el-row>
    <div style="border: 1px solid #d3dce6;border-collapse: collapse;width: 100%">
      <table id="day-in" style="border: 1px solid #d3dce6;border-collapse: collapse;width: 100%">
        <tr>
          <th>序号</th>
          <th>楼层编号</th>
          <th>宽(弧度)*高</th>
          <th>数量</th>
          <th>面积</th>
          <th>单价</th>
          <th>金额</th>
          <th>加工要求</th>
        </tr>
        <template v-for="(item, index) in produceList" :key="index" >
              <tr>
                <td colspan="3">产品名称:{{item.DeliveryDetail.orderDetail.productName}}</td>
                <td colspan="3">对方单号:</td>
                <td colspan="2">订单编号:{{item.DeliveryDetail.orderDetail.orderId}}</td>
              </tr>
              <tr v-for="(items, index1) in item.DeliveryDetailList" :key="index1">
                <td>{{items.order_number}}</td>
                <td>{{items.buildingNumber}}</td>
                <td>{{items.width}}x{{items.height}}</td>
                <td>{{items.quantity}}</td>
                <td>{{items.area}}</td>
                <td>{{items.price}}</td>
                <td>{{items.money}}</td>
                <td>{{items.processingNote}}</td>
              </tr>
              <tr>
                <td colspan="3">小计:</td>
                <td>{{item.DeliveryDetail.quantity}}</td>
                <td>{{item.DeliveryDetail.area}}</td>
                <td></td>
                <td>{{item.DeliveryDetail.money}}</td>
                <td></td>
              </tr>
        </template>
        <tr>
          <td colspan="3">合计:</td>
          <td>{{delivery.quantity}}</td>
          <td>{{delivery.area}}</td>
          <td></td>
          <td>{{delivery.money}}</td>
          <td></td>
        </tr>
      </table>
    </div>
<!--    <div style="border: 1px solid #d3dce6;border-collapse: collapse;">-->
<!--      <el-row :gutter="20" >-->
<!--        <el-col :span="9">-->
<!--          <div style="font-size: 20px;display: flex">-->
<!--            <div>客户名称:</div>-->
<!--            <div>常州市金宝石门窗有限公司</div>-->
<!--          </div>-->
<!--        </el-col>-->
<!--        <el-col :span="9">-->
<!--          <div style="font-size: 20px;display: flex">-->
<!--            <div>项目名称:</div>-->
<!--            <div>公园道</div>-->
<!--          </div>-->
<!--        </el-col>-->
<!--        <el-col :span="6">-->
<!--          <div style="font-size: 20px;display: flex">-->
<!--            <div>联系人:</div>-->
<!--            <div></div>-->
<!--          </div>-->
<!--        </el-col>-->
<!--      </el-row>-->
<!--      <el-row :gutter="20" >-->
<!--        <el-col :span="18">-->
<!--          <div style="font-size: 20px;display: flex">-->
<!--            <div>送货地址:</div>-->
<!--            <div></div>-->
<!--          </div>-->
<!--        </el-col>-->
<!--        <el-col :span="6">-->
<!--          <div style="font-size: 20px;display: flex">-->
<!--            <div>联系电话:</div>-->
<!--            <div></div>-->
<!--          </div>-->
<!--        </el-col>-->
<!--      </el-row>-->
<!--    </div>-->
<!--    <div style="border: 1px solid #d3dce6;border-collapse: collapse;">-->
<!--      <el-row :gutter="20" >-->
<!--        <el-col :span="2">-->
<!--          <div class="alias">-->
<!--            <div>序号</div>-->
<!--          </div>-->
<!--        </el-col>-->
<!--        <el-col :span="5">-->
<!--          <div class="alias">-->
<!--            <div>楼层编号</div>-->
<!--          </div>-->
<!--        </el-col>-->
<!--        <el-col :span="5">-->
<!--          <div class="alias">-->
<!--            <div>宽(弧长)*高</div>-->
<!--          </div>-->
<!--        </el-col>-->
<!--        <el-col :span="2">-->
<!--          <div class="alias">-->
<!--            <div>数量</div>-->
<!--          </div>-->
<!--        </el-col>-->
<!--        <el-col :span="2">-->
<!--          <div class="alias">-->
<!--            <div>面积</div>-->
<!--          </div>-->
<!--        </el-col>-->
<!--        <el-col :span="2">-->
<!--          <div class="alias">-->
<!--            <div>单价</div>-->
<!--          </div>-->
<!--        </el-col>-->
<!--        <el-col :span="2">-->
<!--          <div class="alias" >-->
<!--            <div>金额</div>-->
<!--          </div>-->
<!--        </el-col>-->
<!--        <el-col :span="4">-->
<!--          <div class="alias" >-->
<!--            <div>加工要求</div>-->
<!--          </div>-->
<!--        </el-col>-->
<!--      </el-row>-->
<!--    </div>-->
  </div>
</template>
<style >
.el-row {
  margin-bottom: 10px;
}
.el-row:last-child {
  margin-bottom: 0;
}
.el-col {
  border-radius: 4px;
}
.grid-content {
  border-radius: 4px;
  min-height: 36px;
}
.alias{
  text-align: center;
  font-size: 20px;
}
</style>
north-glass-erp/northglass-erp/src/views/sd/delivery/SelectDelivery.vue
@@ -8,6 +8,7 @@
import useUserInfoStore from "@/stores/userInfo";
import {ElMessage} from "element-plus";
import { useI18n } from 'vue-i18n'
import DeliveryPrinting from "@/views/sd/delivery/DeliveryPrinting.vue";
//语言获取
const { t } = useI18n()
@@ -15,11 +16,18 @@
const userStore = useUserInfoStore()
const username = userStore.user.userName
const userid = userStore.user.userId
const dialogTableVisible = ref(false)
let rowClickIndex = ref(null)
let produceList = ref([])
const getTableRow = (row,type) =>{
  switch (type) {
    case 'edit' :{
      router.push({path: '/main/delivery/createDelivery', query: { deliveryID: row.deliveryId }})
      break
    }
    case 'printing' :{
      const url = router.resolve({path: '/main/delivery/deliveryPrinting', query: { deliveryID: row.deliveryId }})
      window.open(url.href, '_blank')
      break
    }
    case 'delete':{
@@ -162,6 +170,29 @@
  selectOrderList()
}
const gridEvents = {
  menuClick ({ menu, row, column }) {
    const $grid = xGrid.value
    if ($grid) {
      switch (menu.code) {
        case 'getProcessList': {
          if(rowClickIndex.value===null){
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
            return
          }
          dialogTableVisible.value = true
          break
        }
      }
    }
  },
  cellClick({ row }){
    rowClickIndex.value = row
  }
}
const gridOptions = reactive({
  border:  "full",//表格加边框
  keepSource: true,//保持源数据
@@ -189,10 +220,20 @@
    trigger: 'click',
    mode: 'row',
    showStatus: true
  },//表头参数
  },
  menuConfig: {
    body: {
      options: [
        [
          { code: 'getProcessList', name: "打印", prefixIcon: 'vxe-icon-file-txt', visible: true}
        ]
      ]
    }
  },
  //表头参数
  columns:[
    {type:'expand',slots: { content:'content' },width: 60},
    {title: t('basicData.operate'), width: 110, slots: { default: 'button_slot' }},
    {title: t('basicData.operate'), width: 150, slots: { default: 'button_slot' }},
    {type: 'seq', title: t('basicData.Number'), width: 80 },
    {field: 'deliveryState',title: t('basicData.review'), width: 40, slots: { default: 'state' }},
@@ -258,6 +299,7 @@
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
        v-on="gridEvents"
    >
      <!--      下拉显示所有信息插槽-->
@@ -280,6 +322,7 @@
      <!--左边固定显示的插槽-->
      <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,'printing')" :disabled="row.deliveryState!==2" link type="primary" size="small">打印</el-button>
        <el-popconfirm @confirm="getTableRow(row,'delete')" title="确定删除?">
          <template #reference>
            <el-button  link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
@@ -308,6 +351,15 @@
        </vxe-pager>
      </template>
    </vxe-grid>
    <el-dialog
        v-model="dialogTableVisible"
        destroy-on-close
        style="width: 75%;height:70% ">
      <DeliveryPrinting
          :deliveryId="rowClickIndex.deliveryId"
          style="width: 100%;height: 100%" />
    </el-dialog>
  </div>
</template>
north-glass-erp/src/main/java/com/example/erp/controller/sd/CustomerController.java
@@ -59,6 +59,12 @@
        }
    }
    @ApiOperation("客户订单查询接口")
    @PostMapping("/getSelectCustomerOderDate/{pageNum}/{pageSize}/{selectDate}")
    public Result getSelectCustomerOderDate(@PathVariable Integer pageNum, @PathVariable Integer pageSize,@PathVariable List<String> selectDate, @RequestBody OrderDetail orderDetail){
        return Result.seccess(customerService.getSelectCustomerOderDate(pageNum,pageSize,selectDate,orderDetail));
    }
north-glass-erp/src/main/java/com/example/erp/controller/sd/DeliveryController.java
@@ -95,6 +95,12 @@
        }
    }
    @ApiOperation("发货订单查询接口")
    @PostMapping("/getSelectDeliveryPrinting")
    public Result getSelectDeliveryPrinting( @RequestBody DeliveryDetail deliveryDetail){
        return Result.seccess(deliveryService.getSelectDeliveryPrinting(deliveryDetail));
    }
north-glass-erp/src/main/java/com/example/erp/mapper/sd/CustomerMapper.java
@@ -2,6 +2,8 @@
import com.example.erp.entity.sd.Customer;
import com.example.erp.entity.sd.Delivery;
import com.example.erp.entity.sd.DeliveryDetail;
import com.example.erp.entity.sd.OrderDetail;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.data.repository.CrudRepository;
@@ -25,4 +27,10 @@
    Boolean updateCustomer(@Param("customer") Customer customer);
    Boolean deleteCustomer(@Param("customer") Customer customer);
    List<OrderDetail> getSelectCustomerOderDate(@Param("offset") Integer offset,
                                                    @Param("pageSize") Integer pageSize, String startDate, String endDate,
                                                    @Param("orderDetail") OrderDetail orderDetail);
    Map<String,Integer> getSelectCustomerOderDatePageTotal(Integer offset, Integer pageSize,String startDate, String endDate, OrderDetail orderDetail);
}
north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryDetailMapper.java
@@ -22,6 +22,11 @@
    Integer getSelectShippingOrderDetailPageTotal(Integer offset, Integer pageSize,OrderDetail orderDetail);
    List<DeliveryDetail> getSelectDeliveryPrinting(@Param("deliveryDetail") DeliveryDetail deliveryDetail);
    List <Map<String, Object>> getSelectDeliveryDetailPrinting(@Param("deliveryId") String deliveryId,
                                                         @Param("productId") Integer productId,@Param("orderId") String orderId);
    List<DeliveryDetail> getSelectDeliveryDetailReport(@Param("offset") Integer offset,
                                                      @Param("pageSize") Integer pageSize,String startDate, String endDate,
                                                      @Param("deliveryDetail") DeliveryDetail deliveryDetail);
north-glass-erp/src/main/java/com/example/erp/mapper/sd/DeliveryMapper.java
@@ -23,6 +23,8 @@
                                                             @Param("pageSize") Integer pageSize,
                                                             @Param("orderDetail") OrderDetail orderDetail);
   Delivery getSelectShippingOrderDetailDeliveryPrinting(@Param("deliveryDetail") DeliveryDetail deliveryDetail);
    Order getSelectShippingOrderDetailDeliverys(@Param("offset") Integer offset,
                                                 @Param("pageSize") Integer pageSize,
                                                 @Param("orderDetail") OrderDetail orderDetail);
north-glass-erp/src/main/java/com/example/erp/service/sd/CustomerService.java
@@ -97,5 +97,29 @@
    }
    public Map<String, Object> getSelectCustomerOderDate(Integer pageNum, Integer pageSize,List<String> selectDate, OrderDetail orderDetail) {
        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);
            }
        }
        System.out.println(orderDetail);
        System.out.println(orderDetail.getOrder());
        Map<String, Object> map = new HashMap<>();
        map.put("data", customerMapper.getSelectCustomerOderDate(offset, pageSize,startDate,endDate, orderDetail));
        map.put("total", customerMapper.getSelectCustomerOderDatePageTotal(offset, pageSize,startDate,endDate, orderDetail));
        List<String> list = new ArrayList<>();
        list.add(startDate);
        list.add(endDate);
        map.put("selectDate",list);
        return map;
    }
}
north-glass-erp/src/main/java/com/example/erp/service/sd/DeliveryService.java
@@ -265,6 +265,29 @@
    }
    public Map<String, Object> getSelectDeliveryPrinting( DeliveryDetail deliveryDetail) {
        Map<String, Object> map = new HashMap<>();
        List <Map<String, Object>> list=new ArrayList<Map<String, Object>>();//最终结果
        System.out.println(deliveryDetail);
        List<DeliveryDetail> deliveryDetailList=deliveryDetailMapper.getSelectDeliveryPrinting(deliveryDetail);
        for (int i = 0; i < deliveryDetailList.size(); i++) {
            Map<String, Object> itemmap = new HashMap<>();
            List <Map<String, Object>> deliveryDetailList2=deliveryDetailMapper.getSelectDeliveryDetailPrinting(deliveryDetailList.get(i).getDeliveryId(),
                    deliveryDetailList.get(i).getOrderDetail().getProductId(),deliveryDetailList.get(i).getOrderDetail().getOrderId());
            itemmap.put("DeliveryDetail",deliveryDetailList.get(i));
            itemmap.put("DeliveryDetailList",deliveryDetailList2);
            list.add(itemmap);
        }
        map.put("data", list);
        map.put("delivery", deliveryMapper.getSelectShippingOrderDetailDeliveryPrinting(deliveryDetail));
        return map;
    }
    public String orderNumberSetting(String type) {
        //根据类型自动生成不同的操作单号
north-glass-erp/src/main/resources/mapper/sd/Customer.xml
@@ -3,6 +3,162 @@
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.erp.mapper.sd.CustomerMapper">
    <resultMap id="selectCustomerOrderDetail" type="com.example.erp.entity.sd.OrderDetail">
        <result column="order_id" property="orderId"/>
        <result column="order_number" property="orderNumber"/>
        <result column="quantity" property="quantity"/>
        <result column="building_number" property="buildingNumber"/>
        <result column="product_name" property="productName"/>
        <result column="product_id" property="productId"/>
        <result column="price" property="price"/>
        <result column="width" property="width"/>
        <result column="height" property="height"/>
        <result column="area" property="area"/>
        <result column="shape" property="shape"/>
        <result column="gross_area" property="grossArea"/>
        <result column="compute_area" property="computeArea"/>
        <result column="compute_gross_area" property="computeGrossArea"/>
        <result column="processing_note" property="processingNote"/>
        <result column="edging_type" property="edgingType"/>
        <result column="perimeter" property="perimeter"/>
        <result column="batch" property="order.batch"/>
        <result column="project" property="order.project"/>
        <result column="customer_id" property="order.customerId"/>
        <result column="customer_name" property="order.customerName"/>
        <result column="money" property="order.money"/>
        <result column="order_type" property="order.orderType"/>
        <result column="salesman" property="order.salesman"/>
        <result column="create_time" property="order.createTime"/>
    </resultMap>
    <select id="getSelectCustomerOderDate" resultMap="selectCustomerOrderDetail">
        select od.order_id,
               od.order_number,
               o.project,
               od.product_id,
               od.product_name,
               o.customer_id,
               o.customer_name,
               sum(od.quantity) as quantity,
               sum(od.area) as area,
               od.shape,
               od.width,
               od.height,
               o.batch,
               o.money,
               o.order_type,
               o.salesman,
               o.create_time
        from order_detail od
                 left join `order` o on o.order_id = od.order_id
        <where>
                and date(o.create_time)>=#{startDate} and date(o.create_time) &lt;= #{endDate}
            <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
                and o.customer_id = #{orderDetail.order.customerId}
            </if>
            <if test="orderDetail.order.project != null and orderDetail.order.project != ''">
                and o.project regexp #{orderDetail.order.project}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.order.money != null and orderDetail.order.money != ''">
                and o.money regexp REGEXP_REPLACE(#{orderDetail.order.money},'\\.0+$','')
            </if>
            <if test="orderDetail.order.orderType != null and orderDetail.order.orderType != ''">
                and o.order_type regexp #{orderDetail.order.orderType}
            </if>
            <if test="orderDetail.order.salesman != null and orderDetail.order.salesman != ''">
                and o.salesman regexp #{orderDetail.order.salesman}
            </if>
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''">
                and od.order_number regexp #{orderDetail.orderNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp  REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp  REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
        </where>
        group by od.product_id, od.width, od.height
        limit #{offset},#{pageSize};
    </select>
    <select id="getSelectCustomerOderDatePageTotal" >
        select
        CEILING(count(zu.id)/#{pageSize}) as 'pageTotal',
        count(zu.id) as 'total' from (select od.product_id,od.id
        from order_detail od
        left join `order` o on o.order_id = od.order_id
        <where>
            and date(o.create_time)>=#{startDate} and date(o.create_time) &lt;= #{endDate}
            <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
                and o.customer_id = #{orderDetail.order.customerId}
            </if>
            <if test="orderDetail.order.project != null and orderDetail.order.project != ''">
                and o.project regexp #{orderDetail.order.project}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.order.money != null and orderDetail.order.money != ''">
                and o.money regexp REGEXP_REPLACE(#{orderDetail.order.money},'\\.0+$','')
            </if>
            <if test="orderDetail.order.orderType != null and orderDetail.order.orderType != ''">
                and o.order_type regexp #{orderDetail.order.orderType}
            </if>
            <if test="orderDetail.order.salesman != null and orderDetail.order.salesman != ''">
                and o.salesman regexp #{orderDetail.order.salesman}
            </if>
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''">
                and od.order_number regexp #{orderDetail.orderNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp  REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp  REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
        </where>
        group by od.product_id, od.width, od.height) as zu
    </select>
    <select id="getCustomerList">
        select
            *
north-glass-erp/src/main/resources/mapper/sd/Delivery.xml
@@ -202,6 +202,20 @@
        limit 0,1
    </select>
    <select id="getSelectShippingOrderDetailDeliveryPrinting" >
        select
        d.delivery_id,d.quantity,d.money,d.area,
        d.customer_id,d.customer_name,d.project,d.pay_method,d.pay_date,d.contacts,d.contact_number,
        d.delivery_address,d.remarks,d.create_time,d.delivery_date,d.creator,d.salesman,d.salesman_id
        from sd.delivery d
        <where>
            <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''">
                and d.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%')
            </if>
        </where>
    </select>
    <select id="getSelectShippingOrderDetailDeliverys" >
        select customer_id,customer_name,project,salesman,salesman_id,contacts,contact_number,delivery_address from sd.`order`
north-glass-erp/src/main/resources/mapper/sd/DeliveryDetail.xml
@@ -87,6 +87,28 @@
    </resultMap>
    <resultMap id="selectDeliveryDetailOrderDetail" type="com.example.erp.entity.sd.DeliveryDetail">
        <result column="order_number" property="orderNumber"/>
        <result column="o_quantity" property="quantity"/>
        <result column="delivery_id" property="deliveryId"/>
        <result column="delivery_number" property="deliveryNumber"/>
        <result column="quantity" property="quantity"/>
        <result column="area" property="area"/>
        <result column="money" property="money"/>
        <result column="delivery_detail_remakes" property="deliveryDetailRemakes"/>
        <result column="delivery_detail_state" property="deliveryDetailState"/>
        <result column="create_time" property="createTime"/>
        <result column="product_id" property="orderDetail.productId"/>
        <result column="product_name" property="orderDetail.productName"/>
        <result column="order_id" property="orderDetail.orderId"/>
    </resultMap>
    <delete id="deleteDeliveryDetail">
        delete from sd.delivery_detail where delivery_id=#{deliveryId}
    </delete>
@@ -645,4 +667,35 @@
        </where>
        order by dd.delivery_id,dd.delivery_number
    </select>
    <select id="getSelectDeliveryPrinting" resultMap="selectDeliveryDetailOrderDetail" >
        select dd.delivery_id,od.order_id,od.product_id,od.product_name,sum(dd.area) as area,sum(dd.money) as money,sum(dd.quantity) as quantity from
        delivery_detail dd left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number
        <where>
            <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''">
                and dd.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%')
            </if>
        </where>
        group by od.order_id,od.product_name,od.product_id
    </select>
    <select id="getSelectDeliveryDetailPrinting" >
        select od.order_id,
               od.order_number,
               od.product_name,
               od.width,
               od.height,
               dd.quantity,
               dd.money,
               dd.area,
               ifnull(od.processing_note,"") as processingNote,
               ifnull(od.building_number,"") as buildingNumber,
               od.price
        from delivery_detail dd
                 left join order_detail od on dd.order_id = od.order_id and dd.order_number = od.order_number
        where delivery_id = #{deliveryId}
          and od.order_id = #{orderId}
          and od.product_id = #{productId}
    </select>
</mapper>
north-glass-erp/target/classes/mapper/sd/Customer.xml
@@ -3,6 +3,162 @@
        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.example.erp.mapper.sd.CustomerMapper">
    <resultMap id="selectCustomerOrderDetail" type="com.example.erp.entity.sd.OrderDetail">
        <result column="order_id" property="orderId"/>
        <result column="order_number" property="orderNumber"/>
        <result column="quantity" property="quantity"/>
        <result column="building_number" property="buildingNumber"/>
        <result column="product_name" property="productName"/>
        <result column="product_id" property="productId"/>
        <result column="price" property="price"/>
        <result column="width" property="width"/>
        <result column="height" property="height"/>
        <result column="area" property="area"/>
        <result column="shape" property="shape"/>
        <result column="gross_area" property="grossArea"/>
        <result column="compute_area" property="computeArea"/>
        <result column="compute_gross_area" property="computeGrossArea"/>
        <result column="processing_note" property="processingNote"/>
        <result column="edging_type" property="edgingType"/>
        <result column="perimeter" property="perimeter"/>
        <result column="batch" property="order.batch"/>
        <result column="project" property="order.project"/>
        <result column="customer_id" property="order.customerId"/>
        <result column="customer_name" property="order.customerName"/>
        <result column="money" property="order.money"/>
        <result column="order_type" property="order.orderType"/>
        <result column="salesman" property="order.salesman"/>
        <result column="create_time" property="order.createTime"/>
    </resultMap>
    <select id="getSelectCustomerOderDate" resultMap="selectCustomerOrderDetail">
        select od.order_id,
               od.order_number,
               o.project,
               od.product_id,
               od.product_name,
               o.customer_id,
               o.customer_name,
               sum(od.quantity) as quantity,
               sum(od.area) as area,
               od.shape,
               od.width,
               od.height,
               o.batch,
               o.money,
               o.order_type,
               o.salesman,
               o.create_time
        from order_detail od
                 left join `order` o on o.order_id = od.order_id
        <where>
                and date(o.create_time)>=#{startDate} and date(o.create_time) &lt;= #{endDate}
            <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
                and o.customer_id = #{orderDetail.order.customerId}
            </if>
            <if test="orderDetail.order.project != null and orderDetail.order.project != ''">
                and o.project regexp #{orderDetail.order.project}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.order.money != null and orderDetail.order.money != ''">
                and o.money regexp REGEXP_REPLACE(#{orderDetail.order.money},'\\.0+$','')
            </if>
            <if test="orderDetail.order.orderType != null and orderDetail.order.orderType != ''">
                and o.order_type regexp #{orderDetail.order.orderType}
            </if>
            <if test="orderDetail.order.salesman != null and orderDetail.order.salesman != ''">
                and o.salesman regexp #{orderDetail.order.salesman}
            </if>
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''">
                and od.order_number regexp #{orderDetail.orderNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp  REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp  REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
        </where>
        group by od.product_id, od.width, od.height
        limit #{offset},#{pageSize};
    </select>
    <select id="getSelectCustomerOderDatePageTotal" >
        select
        CEILING(count(zu.id)/#{pageSize}) as 'pageTotal',
        count(zu.id) as 'total' from (select od.product_id,od.id
        from order_detail od
        left join `order` o on o.order_id = od.order_id
        <where>
            and date(o.create_time)>=#{startDate} and date(o.create_time) &lt;= #{endDate}
            <if test="orderDetail.order.customerId != null and orderDetail.order.customerId != ''">
                and o.customer_id = #{orderDetail.order.customerId}
            </if>
            <if test="orderDetail.order.project != null and orderDetail.order.project != ''">
                and o.project regexp #{orderDetail.order.project}
            </if>
            <if test="orderDetail.order.batch != null and orderDetail.order.batch != ''">
                and o.batch regexp #{orderDetail.order.batch}
            </if>
            <if test="orderDetail.order.money != null and orderDetail.order.money != ''">
                and o.money regexp REGEXP_REPLACE(#{orderDetail.order.money},'\\.0+$','')
            </if>
            <if test="orderDetail.order.orderType != null and orderDetail.order.orderType != ''">
                and o.order_type regexp #{orderDetail.order.orderType}
            </if>
            <if test="orderDetail.order.salesman != null and orderDetail.order.salesman != ''">
                and o.salesman regexp #{orderDetail.order.salesman}
            </if>
            <if test="orderDetail.orderId != null and orderDetail.orderId != ''">
                and od.order_id regexp #{orderDetail.orderId}
            </if>
            <if test="orderDetail.orderNumber != null and orderDetail.orderNumber != ''">
                and od.order_number regexp #{orderDetail.orderNumber}
            </if>
            <if test="orderDetail.productId != null and orderDetail.productId != ''">
                and od.product_id regexp #{orderDetail.productId}
            </if>
            <if test="orderDetail.productName != null and orderDetail.productName != ''">
                and od.product_name regexp #{orderDetail.productName}
            </if>
            <if test="orderDetail.shape != null and orderDetail.shape != ''">
                and od.shape regexp #{orderDetail.shape}
            </if>
            <if test="orderDetail.width != null and orderDetail.width != ''">
                and od.width regexp  REGEXP_REPLACE(#{orderDetail.width},'\\.0+$','')
            </if>
            <if test="orderDetail.height != null and orderDetail.height != ''">
                and od.height regexp  REGEXP_REPLACE(#{orderDetail.height},'\\.0+$','')
            </if>
        </where>
        group by od.product_id, od.width, od.height) as zu
    </select>
    <select id="getCustomerList">
        select
            *
north-glass-erp/target/classes/mapper/sd/Delivery.xml
@@ -202,6 +202,20 @@
        limit 0,1
    </select>
    <select id="getSelectShippingOrderDetailDeliveryPrinting" >
        select
        d.delivery_id,d.quantity,d.money,d.area,
        d.customer_id,d.customer_name,d.project,d.pay_method,d.pay_date,d.contacts,d.contact_number,
        d.delivery_address,d.remarks,d.create_time,d.delivery_date,d.creator,d.salesman,d.salesman_id
        from sd.delivery d
        <where>
            <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''">
                and d.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%')
            </if>
        </where>
    </select>
    <select id="getSelectShippingOrderDetailDeliverys" >
        select customer_id,customer_name,project,salesman,salesman_id,contacts,contact_number,delivery_address from sd.`order`
north-glass-erp/target/classes/mapper/sd/DeliveryDetail.xml
@@ -87,6 +87,28 @@
    </resultMap>
    <resultMap id="selectDeliveryDetailOrderDetail" type="com.example.erp.entity.sd.DeliveryDetail">
        <result column="order_number" property="orderNumber"/>
        <result column="o_quantity" property="quantity"/>
        <result column="delivery_id" property="deliveryId"/>
        <result column="delivery_number" property="deliveryNumber"/>
        <result column="quantity" property="quantity"/>
        <result column="area" property="area"/>
        <result column="money" property="money"/>
        <result column="delivery_detail_remakes" property="deliveryDetailRemakes"/>
        <result column="delivery_detail_state" property="deliveryDetailState"/>
        <result column="create_time" property="createTime"/>
        <result column="product_id" property="orderDetail.productId"/>
        <result column="product_name" property="orderDetail.productName"/>
        <result column="order_id" property="orderDetail.orderId"/>
    </resultMap>
    <delete id="deleteDeliveryDetail">
        delete from sd.delivery_detail where delivery_id=#{deliveryId}
    </delete>
@@ -645,4 +667,35 @@
        </where>
        order by dd.delivery_id,dd.delivery_number
    </select>
    <select id="getSelectDeliveryPrinting" resultMap="selectDeliveryDetailOrderDetail" >
        select dd.delivery_id,od.order_id,od.product_id,od.product_name,sum(dd.area) as area,sum(dd.money) as money,sum(dd.quantity) as quantity from
        delivery_detail dd left join order_detail od on dd.order_id=od.order_id and dd.order_number=od.order_number
        <where>
            <if test="deliveryDetail.deliveryId != null and deliveryDetail.deliveryId != ''">
                and dd.delivery_id like concat('%',#{deliveryDetail.deliveryId},'%')
            </if>
        </where>
        group by od.order_id,od.product_name,od.product_id
    </select>
    <select id="getSelectDeliveryDetailPrinting" >
        select od.order_id,
               od.order_number,
               od.product_name,
               od.width,
               od.height,
               dd.quantity,
               dd.money,
               dd.area,
               ifnull(od.processing_note,"") as processingNote,
               ifnull(od.building_number,"") as buildingNumber,
               od.price
        from delivery_detail dd
                 left join order_detail od on dd.order_id = od.order_id and dd.order_number = od.order_number
        where delivery_id = #{deliveryId}
          and od.order_id = #{orderId}
          and od.product_id = #{productId}
    </select>
</mapper>