chenlu
2025-03-27 77e6370cf2476a7c32fdd88df94cff0b042abd43
Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
35个文件已修改
2个文件已添加
1011 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet2.vue 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/order/OrderNumberReportTransfer.vue 57 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/ar.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/en.js 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/ru.js 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/lang/zh.js 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/router/index.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/companySet/天津北玻.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/companySet/常州吉利.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/companySet/新疆恒鑫.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/stores/sd/companySet/金华天成.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/ingredientStock/IngredientsStock.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/mm/ingredientStock/MaterialAdditionRecord.vue 480 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi1.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel1.vue 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/basicData/SearchBasicData.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 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue 60 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/entity/sd/Order.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/mm/MaterialInventoryMapper.java 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java 73 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml 24 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/Report.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet1.vue
@@ -473,7 +473,9 @@
<style scoped>
@media print {
  @page {
    margin: 8mm 16mm 20mm 16mm !important;
  }
  .pages {
    page-break-after: always;
  }
north-glass-erp/northglass-erp/src/components/sd/delivery/PrintSheet2.vue
@@ -252,7 +252,9 @@
<style scoped>
@media print {
  @page {
    margin: 8mm 16mm 20mm 16mm !important;
  }
  .pages {
    page-break-after: always;
  }
north-glass-erp/northglass-erp/src/components/sd/order/OrderNumberReportTransfer.vue
New file
@@ -0,0 +1,57 @@
<script setup>
import {ref} from "vue";
import request from "@/utils/request";
import {ElMessage} from "element-plus";
import {useI18n} from "vue-i18n"
const { t } = useI18n()
const props = defineProps({
  transferData:{}
})
const emits = defineEmits(['orderNumberTransfer'])
/*request.post()*/
const orderNumberTransferSubmit = () => {
  request.post('/reportingWork/reportingWorkTransfer',props.transferData).then(res => {
    if(res.code === '200' && res.data.data===true){
      ElMessage.success(t('basicData.saveSuccess'))
      emits('orderNumberTransfer')
    }else{
      ElMessage.warning(res.data.msg)
    }
  }).catch(err => {
    ElMessage.error(t('order.transferPage.errorToMes'))
  })
/*emits('orderNumberTransfer')*/
}
</script>
<template>
  <el-form :model="props.transferData">
    <el-form-item :label="$t('order.transferPage.oldOrderId')+':'" label-width="140px">
      <el-text>{{props.transferData.oldOrderId}}</el-text>
    </el-form-item>
    <el-form-item :label="$t('order.transferPage.oldOrderNumber')+':'" label-width="140px">
      <el-text>{{props.transferData.oldOrderNumber}}</el-text>
    </el-form-item>
    <el-form-item :label="$t('order.transferPage.newOrderId')+':'" label-width="140px">
      <el-input v-model="props.transferData.newOrderId" autocomplete="off" />
    </el-form-item>
    <el-form-item :label="$t('order.transferPage.newOrderNumber')+':'" label-width="140px">
      <el-input v-model="props.transferData.newOrderNumber" type="number" autocomplete="off" />
    </el-form-item>
    <el-form-item  label-width="140px">
      <el-popconfirm :title="$t('order.transferPage.confirmTitle')"
                     @confirm="orderNumberTransferSubmit()">
        <template #reference>
          <el-button
              type="primary"
              style="margin-left: 268px">{{$t('craft.sure')}}</el-button>
        </template>
      </el-popconfirm>
    </el-form-item>
  </el-form>
</template>
<style scoped>
</style>
north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue
@@ -65,6 +65,7 @@
  {field: 'technology_number', width: 90,title:  t('processCard.technologyNumber'),showOverflow:"ellipsis"},
  {field: 'quantity', width: 90,title: t('order.quantity')},
  {field: 'gross_area', width: 90,title: t('order.area')},
  {field: 'shippedQuantity',width: 120, title: t('delivery.deliveryQuantity')},
  {field: 'inventory',width: 120, title: t('productStock.inventoryQuantity')},
  {field: 'inventoryArea',width: 120, title: t('report.inventoryArea')},
north-glass-erp/northglass-erp/src/lang/ar.js
@@ -68,6 +68,7 @@
        selected:'选中',
        partiallySelected:'部分选中',
        unchecked :'未选中',
        copy:'复制',
        msg:{
            max255:'أدخل 255 Ø­Ø±ÙÙ‹Ø§ ÙƒØ­Ø¯ Ø£Ù‚صى',
            range99999Dec2:
@@ -249,6 +250,7 @@
        quantityMount:'数量金额',
        allAmount:'面积金额(总金额)',
        orderTransfer:'订单报工转移',
        msg:{
            productCheck:'الرجاء Ø§Ø®ØªÙŠØ§Ø± Ù…نتج',
@@ -275,7 +277,13 @@
            pleaseCancelTheFilteringFirst:'يرجى Ø¥Ù„غاء Ø§Ù„اختيار Ø£ÙˆÙ„اً',
            grossAreaIsNot0:'存在实际总面积等于0',
            differentSize:'此订单含有手动修改大小片,反审修改订单后请重新重置大小片!是否反审?'
            differentSize:'此订单含有手动修改大小片,反审修改订单后请重新重置大小片!是否反审?',
            updateOrderIdErrorGtMaxId:'输入订单号不能大于最大订单号',
            updateOrderIdErrorIsExist:'输入订单号已存在',
            updateOrderIdErrorIsSame:'输入订单号相同',
            updateOrderIdErrorDiscrepancyInLength:'输入订单号长度不符',
            updateOrderIdErrorInputNumber:'请输入数字',
            updateOrderIdErrorNotNo1:'不能修改第一个单子',
        }
    },
@@ -301,7 +309,12 @@
        copyTitle:'نسخ Ø§Ù„عنوان',
        msgList:{
            checkOrder:'لم ÙŠØªÙ… Ø§Ù„عثور Ø¹Ù„Ù‰ Ù…علومات Ø§Ù„طلب، ÙŠØ±Ø¬ÙŠ ØªØ­Ø¯ÙŠØ¯ Ø§Ù„طلب Ø§ÙˆÙ„اً',
        }
            isOptimize:'此订单已转优化,回退失败!',
            isReportingWork:'此订单已报工,回退失败!',
            isStorage:'此订单已入库,回退失败!',
        },
        updateOrderId:"修改订单号",
        reportingTransfer:'报工转移'
    },
    craft:{
        glassAddress:'وضع Ø¹Ù„امة Ø§Ù„زجاج',
@@ -713,6 +726,9 @@
        customerAbbreviation:'اختصار Ø§Ù„عميل',
        pleaseEnterTheCustomerAbbreviation:'الرجاء Ø§Ø¯Ø®Ø§Ù„ Ø§Ø®ØªØµØ§Ø± Ø§Ù„عميل',
        msgList:{
            notCustomerInfo:'未查询到客户信息',
        }
    },
    delivery:{
        page:{
north-glass-erp/northglass-erp/src/lang/en.js
@@ -68,6 +68,7 @@
        selected:'selected',
        partiallySelected:'partially selected',
        unchecked :'unchecked',
        copy:'Copy',
        msg:{
            max255:"The value contains a maximum of 255 characters",
            range99999Dec2:
@@ -249,6 +250,7 @@
        quantityMount:'Quantity and Amount',
        allAmount:'面积金额(总金额)',
        orderTransfer:'订单报工转移',
        msg:{
            productCheck:'Please select a product',
@@ -275,7 +277,13 @@
            pleaseCancelTheFilteringFirst:'Please cancel the selection first.',
            grossAreaIsNot0:'There is an actual total area equal to0',
            differentSize:'此订单含有手动修改大小片,反审修改订单后请重新重置大小片!是否反审?'
            differentSize:'此订单含有手动修改大小片,反审修改订单后请重新重置大小片!是否反审?',
            updateOrderIdErrorGtMaxId:'输入订单号不能大于最大订单号',
            updateOrderIdErrorIsExist:'输入订单号已存在',
            updateOrderIdErrorIsSame:'输入订单号相同',
            updateOrderIdErrorDiscrepancyInLength:'输入订单号长度不符',
            updateOrderIdErrorInputNumber:'请输入数字',
            updateOrderIdErrorNotNo1:'不能修改第一个单子',
        }
    },
@@ -300,8 +308,13 @@
        copy:'Copy',
        copyTitle:'Copy Title',
        msgList:{
            checkOrder:'No order information is found. Please click Order first'
        }
            checkOrder:'No order information is found. Please click Order first',
            isOptimize:'此订单已转优化,回退失败!',
            isReportingWork:'此订单已报工,回退失败!',
            isStorage:'此订单已入库,回退失败!',
        },
        updateOrderId:"修改订单号",
        reportingTransfer:'报工转移'
    },
    craft:{
        glassAddress:'Glass Address',
@@ -713,6 +726,9 @@
        customerAbbreviation:'Customer abbreviation',
        pleaseEnterTheCustomerAbbreviation:'Please enter the customers abbreviation',
        msgList:{
            notCustomerInfo:'未查询到客户信息',
        }
    },
    delivery:{
        page:{
north-glass-erp/northglass-erp/src/lang/ru.js
@@ -68,6 +68,7 @@
        selected:'选中',
        partiallySelected:'部分选中',
        unchecked :'未选中',
        copy:'复制',
        msg:{
            max255:"Введите 255 ÑÐ¸Ð¼Ð²Ð¾Ð»Ð¾Ð².",
            range99999Dec2:
@@ -249,6 +250,7 @@
        quantityMount:'数量金额',
        allAmount:'面积金额(总金额)',
        orderTransfer:'订单报工转移',
        msg:{
            productCheck:'Пожалуйста, Ð²Ñ‹Ð±ÐµÑ€Ð¸Ñ‚е Ð¿Ñ€Ð¾Ð´ÑƒÐºÑ‚',
@@ -275,7 +277,13 @@
            pleaseCancelTheFilteringFirst:'请先取消筛选',
            grossAreaIsNot0:'存在实际总面积等于0',
            differentSize:'此订单含有手动修改大小片,反审修改订单后请重新重置大小片!是否反审?'
            differentSize:'此订单含有手动修改大小片,反审修改订单后请重新重置大小片!是否反审?',
            updateOrderIdErrorGtMaxId:'输入订单号不能大于最大订单号',
            updateOrderIdErrorIsExist:'输入订单号已存在',
            updateOrderIdErrorIsSame:'输入订单号相同',
            updateOrderIdErrorDiscrepancyInLength:'输入订单号长度不符',
            updateOrderIdErrorInputNumber:'请输入数字',
            updateOrderIdErrorNotNo1:'不能修改第一个单子',
        }
    },
@@ -301,7 +309,12 @@
        copyTitle:'Копировать Ð·Ð°Ð³Ð¾Ð»Ð¾Ð²Ð¾Ðº',
        msgList:{
            checkOrder:'Если Ð¸Ð½Ñ„ормация Ð¾ Ð·Ð°ÐºÐ°Ð·Ðµ Ð½Ðµ Ð¿Ð¾Ð»ÑƒÑ‡ÐµÐ½Ð°, Ð½Ð°Ð¶Ð¼Ð¸Ñ‚е Ð½Ð° Ð·Ð°ÐºÐ°Ð·.',
        }
            isOptimize:'此订单已转优化,回退失败!',
            isReportingWork:'此订单已报工,回退失败!',
            isStorage:'此订单已入库,回退失败!',
        },
        updateOrderId:"修改订单号",
        reportingTransfer:'报工转移'
    },
    craft:{
        glassAddress:'Маркировка',
@@ -712,6 +725,9 @@
        customerAbbreviation:'Клиенты Ð¡Ð¾ÐºÑ€Ð°Ñ‰ÐµÐ½Ð¸Ñ',
        pleaseEnterTheCustomerAbbreviation:'Пожалуйста, Ð²Ð²ÐµÐ´Ð¸Ñ‚е ÑÐ¾ÐºÑ€Ð°Ñ‰ÐµÐ½Ð¸Ðµ ÐºÐ»Ð¸ÐµÐ½Ñ‚а.',
        msgList:{
            notCustomerInfo:'未查询到客户信息',
        }
    },
    delivery:{
        page:{
north-glass-erp/northglass-erp/src/lang/zh.js
@@ -68,6 +68,7 @@
        selected:'选中',
        partiallySelected:'部分选中',
        unchecked :'未选中',
        copy:'复制',
        msg:{
            max255:"最多输入255个字符",
            range99999Dec2:
@@ -249,6 +250,16 @@
        quantityMount:'数量金额',
        allAmount:'面积金额(总金额)',
        orderTransfer:'订单报工转移',
        transferPage:{
            oldOrderId:'原订单号',
            newOrderId:'新订单号',
            oldOrderNumber:'原订单序号',
            newOrderNumber:'新订单序号',
            confirmTitle:'确实转移此序号的流程卡报工数据?',
            errorToMes:'与mes通讯异常'
        },
        msg:{
            productCheck:'请选择产品',
@@ -275,7 +286,13 @@
            pleaseCancelTheFilteringFirst:'请先取消筛选',
            grossAreaIsNot0:'存在实际总面积等于0',
            differentSize:'此订单含有手动修改大小片,反审修改订单后请重新重置大小片!是否反审?'
            differentSize:'此订单含有手动修改大小片,反审修改订单后请重新重置大小片!是否反审?',
            updateOrderIdErrorGtMaxId:'输入订单号不能大于最大订单号',
            updateOrderIdErrorIsExist:'输入订单号已存在',
            updateOrderIdErrorIsSame:'输入订单号相同',
            updateOrderIdErrorDiscrepancyInLength:'输入订单号长度不符',
            updateOrderIdErrorInputNumber:'请输入数字',
            updateOrderIdErrorNotNo1:'不能修改第一个单子',
        }
    },
@@ -300,8 +317,13 @@
        copy:'复制订单',
        copyTitle:'复制表头',
        msgList:{
            checkOrder:'未查询到订单信息,请先单击订单'
        }
            checkOrder:'未查询到订单信息,请先单击订单',
            isOptimize:'此订单已转优化,回退失败!',
            isReportingWork:'此订单已报工,回退失败!',
            isStorage:'此订单已入库,回退失败!',
        },
        updateOrderId:"修改订单号",
        reportingTransfer:'报工转移'
    },
    craft:{
        glassAddress:'标记',
@@ -713,6 +735,9 @@
        customerAbbreviation:'客户简称',
        pleaseEnterTheCustomerAbbreviation:'请输入客户简称',
        msgList:{
            notCustomerInfo:'未查询到客户信息',
        }
    },
    delivery:{
        page:{
north-glass-erp/northglass-erp/src/router/index.js
@@ -61,10 +61,6 @@
            }
          ]
        },
{
          path: '/main/glassOptimize/MoveManage',
          component: () => import('@/views/pp/glassOptimize/MoveManage.vue')
        },
        {
          path:'userPassWord',
          name: 'userPassWord',
@@ -1049,6 +1045,12 @@
              name:'returnToStorageCreate',
              component:()=>import('../views/mm/ingredientStock/ReturnToStorageCreate.vue')
            },
            //物料新增
            {
              path:'materialAdditionRecord',
              name:'materialAdditionRecord',
              component:()=>import('../views/mm/ingredientStock/MaterialAdditionRecord.vue')
            },
            {
              path: '',
              redirect:'/main/ingredientsStock/selectIngredientsStock'
north-glass-erp/northglass-erp/src/stores/sd/companySet/Ìì½ò±±²£.js
@@ -3,6 +3,8 @@
export default defineStore('companyInfo', {
    state: () => ({
        timeOut:false,//金华true,其他false,是否开启超时改变复选框状态
        connectMes:false,//常州true,其他false,显示订单报工转移是否启用
        companyName: '天津北玻玻璃工业技术有限公司(TJBB-QR7.1-01)',
        address:'天津宝坻区节能环保工业区天兴路西侧宝中道南侧',
        telephone:'022-59280088',
north-glass-erp/northglass-erp/src/stores/sd/companySet/³£ÖݼªÀû.js
@@ -3,6 +3,8 @@
export default defineStore('companyInfo', {
    state: () => ({
        timeOut:false,//金华true,其他false,是否开启超时改变复选框状态
        connectMes:true,//常州true,其他false,显示订单报工转移是否启用
        companyName: '常州市吉利玻璃有限公司',
        address:'常州市天宁区郑陆镇大明南路8号',
        telephone:'022-59280088',
north-glass-erp/northglass-erp/src/stores/sd/companySet/н®ºãöÎ.js
@@ -3,6 +3,8 @@
export default defineStore('companyInfo', {
    state: () => ({
        timeOut:false,//金华true,其他false,是否开启超时改变复选框状态
        connectMes:false,//常州true,其他false,显示订单报工转移是否启用
        companyName: '新疆恒鑫玻璃科技有限公司',
        address:'新疆五家渠工业园兵团新型建材工业园区工一路11号附1号',
        telephone:'13419168999',
north-glass-erp/northglass-erp/src/stores/sd/companySet/½ð»ªÌì³É.js
@@ -3,6 +3,8 @@
export default defineStore('companyInfo', {
    state: () => ({
        timeOut:true,//金华true,其他false,是否开启超时改变复选框状态
        connectMes:false,//常州true,其他false,显示订单报工转移是否启用
        companyName: '金华福喜天成玻璃有限公司',
        address:'浙江省金华市金东区曹宅镇工业功能区鹤岩街28号2号',
        telephone:'153 8178 1915 ç¦å–œå¤©æˆ',
north-glass-erp/northglass-erp/src/views/mm/ingredientStock/IngredientsStock.vue
@@ -32,6 +32,7 @@
        <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('ingredientsStock.returnToStorage')}}</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(6)" :class="indexFlag===6?'indexTag':''" :to="{ path: '/main/ingredientsStock/selectSurplusMaterials' }">{{$t('ingredientsStock.surplusMaterialManagement')}}</el-breadcrumb-item>
        <el-breadcrumb-item @click="changeRouter(7)" :class="indexFlag===7?'indexTag':''" :to="{ path: '/main/ingredientsStock/materialAdditionRecord' }">{{$t('ingredients.materialAddition')}}</el-breadcrumb-item>
        <el-breadcrumb-item v-show="false" :to="{ path: '/main/order/orderReport' }">{{$t('ingredientsStock.returnToStorage')}}</el-breadcrumb-item>
      </el-breadcrumb>
north-glass-erp/northglass-erp/src/views/mm/ingredientStock/MaterialAdditionRecord.vue
New file
@@ -0,0 +1,480 @@
<!-- é¢†å‡ºè®°å½•  -->
<script setup>
import {onMounted, reactive, ref} from "vue";
import {useRoute, 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 footSum from "@/hook/footSum";
//语言获取
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) {
    case 'add' :{
      alert('我接收到子组件传送的编辑信息')
      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 selectDate = ref(["",""])
let type = ref("")
//筛选条件,有外键需要先定义明细里面的数据
let filterData = ref({
})
let pageNum=ref(1)
let total = reactive({
  pageTotal : 0,
  dataTotal : 0,
  pageSize : 100
})
onMounted(()=> {
  //第一次调用
  request.post(`/materialInventory/getMaterialLogReport/物料新增/1/${total.pageSize}/${selectDate.value}`, filterData.value).then((res) => {
    if (res.code == 200) {
      console.log(res.data)
      total.dataTotal = res.data.total.total * 1
      total.pageTotal = res.data.total.pageTotal
      selectDate.value = res.data.selectDate
      produceList = deepClone(res.data.data)
      xGrid.value.loadData(produceList)
      gridOptions.loading = false
    } else {
      ElMessage.warning(res.msg)
      router.push("/login")
    }
  })
})
  let pageState = null
  /*使用筛选,后端获取数据*/
  const changeFilterEvent = (event, option, $panel,) => {
    // æ‰‹åŠ¨è§¦å‘ç­›é€‰
    $panel.changeOption(event, !!option.data, option)
  }
  function filterChanged(column) {
    gridOptions.loading = true
    //筛选条件发生变化条件发生变化
    let value = column.datas[0] != undefined ? column.datas[0] : ''
    value = value.trim()
    //判断是否存在外键
    if (column.property.indexOf('.') > -1) {
      const columnArr = column.property.split('.')
      filterData.value[columnArr[0]] = {
        [columnArr[1]]: value
      }
    } else {
      filterData.value[column.property] = value
    }
    request.post(`/materialInventory/getMaterialLogReport/物料新增/1/${total.pageSize}/${selectDate.value}`, filterData.value).then((res) => {
      if (res.code == 200) {
        total.dataTotal = res.data.total.total * 1
        total.pageTotal = res.data.total.pageTotal
        selectDate.value = res.data.selectDate
        pageNum.value = 1
        produceList = deepClone(res.data.data)
        xGrid.value.loadData(produceList)
        gridOptions.loading = false
      } else {
        ElMessage.warning(res.msg)
        router.push("/login")
      }
    })
  }
  const selectOrderList = () => {
    request.post(`/materialInventory/getMaterialLogReport/物料新增/${pageNum.value}/${total.pageSize}/${selectDate.value}/${type.value}`, filterData.value).then((res) => {
      if (res.code == 200) {
        selectDate.value = res.data.selectDate
        if (res.data.total != null) {
          total.dataTotal = res.data.total.total * 1
          total.pageTotal = res.data.total.pageTotal
        }
        produceList = deepClone(res.data.data)
        xGrid.value.loadData(produceList)
        gridOptions.loading = false
      } else {
        ElMessage.warning(res.msg)
        router.push("/login")
      }
    })
  }
  const changeDate = () => {
    selectOrderList()
  }
//页脚跳转
  const handlePageChange = ({currentPage, pageSize}) => {
    total.pageTotal = pageSize
    pageNum.value = currentPage
    selectOrderList()
  }
//子组件接收参数
  const xGrid = ref();
  const gridOptions = reactive({
    border: "full",//表格加边框
    keepSource: true,//保持源数据
    align: 'center',//文字居中
    stripe: true,//斑马纹
    rowConfig: {isCurrent: true, isHover: true, height: 30},//鼠标移动或选择高亮
    id: 'StorageRecord',
    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: 'operationOrderNumber',
        width: '150',
        title: t('productStock.operationOrderNumber'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {
        field: 'operationNumber',
        width: '100',
        title: t('order.OrderNum'),
        showOverflow: "ellipsis",
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {
        field: 'operateType',
        width: '120',
        title: t('warehouseBasicData.type'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {
        field: 'quantity',
        width: '140',
        title: t('order.quantity'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {
        field: 'inventoryId',
        width: '100',
        title: t('ingredientsStock.id'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {
        field: 'materialCode',
        width: '140',
        title: t('ingredients.materialCode'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {
        field: 'materialName',
        width: '140',
        title: t('ingredientsStock.materialName'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {field: 'width', width: '100', title: t('order.width'), filters: [{data: ''}], slots: {filter: 'num1_filter'}},
      {field: 'height', width: '100', title: t('order.height'), filters: [{data: ''}], slots: {filter: 'num1_filter'}},
      {
        field: 'thickness',
        width: '150',
        title: t('order.totalThickness'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {
        field: 'producer',
        width: '100',
        title: t('ingredientsStock.producer'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {
        field: 'unit',
        width: '140',
        title: t('ingredients.unit'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {
        field: 'singlePieceArea',
        width: '140',
        title: t('productStock.singlePieceArea'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {
        field: 'inventoryArea',
        width: '140',
        title: t('productStock.inventoryArea'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {
        field: 'operator',
        width: '100',
        title: t('productStock.creator'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {
        field: 'operateTime',
        width: '140',
        title: t('productStock.productionDate'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
      {
        field: 'remarks',
        width: '140',
        title: t('productStock.remarks'),
        filters: [{data: ''}],
        slots: {filter: 'num1_filter'}
      },
    ],//表头按钮
    toolbarConfig: {
      buttons: [
        {
          'name': t('productStock.returnToWarehouse'), status: 'primary',
          'code': 'cancel'
        }],
      /*import: false,
   export: true,
   print: true,*/
      zoom: true,
      custom: true
    },
    footerMethod({columns, data}) {//页脚函数
      let footList = ['quantity']
      return [
        columns.map((column, columnIndex) => {
          if (columnIndex === 0) {
            return t('basicData.total')
          }
          if (footList.includes(column.field)) {
            return footSum(data, column.field)
          }
          return ''
        })
      ]
    }
  })
  const gridEvents = {
    toolbarButtonClick({code}) {
      const $grid = xGrid.value
      if ($grid) {
        switch (code) {
          case 'cancel': {
            const $table = xGrid.value
            //gridOptions.columns.unshift(a)
            if ($table) {
              const selectRecords = $table.getCheckboxRecords()
              if (selectRecords.length <= 0) {
                ElMessage.warning(t('productStock.unselectedData'))
                return
              }
              let flowData = ref({
                userId: userid,
                userName: username,
                materialAdd: selectRecords
              })
              request.post("/materialInventory/cancelMaterialAdditionRecord", flowData.value).then((res) => {
                if (res.code == 200 && res.data === "true") {
                  ElMessage.success(t('product.msg.operateSuccess'))
                  router.push({
                    path: '/main/ingredientsStock/materialAdditionRecord',
                    query: {random: Math.random(), storageType: type.value}
                  })
                }else if(res.data === "false1"){
                  ElMessage.warning(t('数量不对请检查'))
                }else if(res.data === "false2"){
                  ElMessage.warning(t('库存不存在或者存在多条'))
                }else {
                  ElMessage.warning(t('productStock.cancellationFailed'))
                }
              }).catch((err) => {
                ElMessage.error(t('basicData.msg.ServerConnectionError'))
                router.push("/login")
              })
            }
            return;
          }
        }
      }
    }
  }
</script>
<template>
  <div  style="width: 100%;height: 100%">
    <div class="head">
      <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>
    </div>
    <div class="main-table">
      <vxe-grid
          height="100%"
          @filter-change="filterChanged"
          class="mytable-scrollbar"
          ref="xGrid"
          v-bind="gridOptions"
          v-on="gridEvents"
          :checkbox-config="checkBoxConfig"
      >
        <!--      <template #state="{ row,column}">
        &lt;!&ndash;                <p>{{row[column.field]}}</p>&ndash;&gt;
        &lt;!&ndash;        <el-checkbox v-model="row['isState']" :disabled="row[column.field]==='已审核'||row[column.field]==='未通过'"/>&ndash;&gt;
                <vxe-checkbox v-model="row['isState']" :disabled="row[column.field]==='已审核'||row[column.field]==='未通过'"></vxe-checkbox>
              </template>-->
        <!--      @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" @keyup.enter.native="$panel.confirmFilter()" @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>
  </div>
</template>
<style scoped>
.head{
  width: 100%;
  height: 35px;
}
.main-table{
  width: 100%;
  height: calc(100% - 35px);
}
</style>
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi1.vue
@@ -42,6 +42,7 @@
  }else{
    localStorage.setItem('hasRefreshed', 'false');
  }
  //流程卡编辑打印标签 å¸¸å·ž
  if (printType == 1) {
    request.post(`/processCard/getSelectPrintCustomLabel2/${type}/1`, data.value).then((res) => {
      if (res.code == 200) {
@@ -64,7 +65,9 @@
      }
    })
  }else if(printType==2){
  }
  //明细分架打印标签 å¸¸å·ž
  else if(printType==2){
    request.post(`/processCard/getSelectPrintCustomLabelDetails/${type}/1`, data.value).then((res) => {
      if (res.code == 200) {
        produceList.value = deepClone(res.data.title)
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintCustomLabelSemi2.vue
@@ -45,6 +45,7 @@
  }else{
    localStorage.setItem('hasRefreshed', 'false');
  }
  //工程打印成品标签
  if(projectNo.value!=null){
    request.post(`/processCard/getSelectPrintLabel/${projectNo.value}/${type.value}`).then((res) => {
      if (res.code == 200) {
@@ -57,6 +58,7 @@
  }else{
    data.value.printList = JSON.parse(route.query.printList)
    //流程卡编辑打印标签 å¸¸å·ž
    if (printType == 1) {
      request.post(`/processCard/getSelectPrintLabel1`, data.value).then((res) => {
        if (res.code == 200) {
@@ -76,7 +78,9 @@
        }
      })
    }else if(printType==2){
    }
    //明细分架打印标签 å¸¸å·ž
    else if(printType==2){
      request.post(`/processCard/getSelectPrintLabelDetails`, data.value).then((res) => {
        if (res.code == 200) {
          produceList.value = deepClone(res.data.data)
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -387,6 +387,7 @@
    let lableTitle = lableType.text
    if ($grid) {
      switch (code) {
        //打印流程卡
        case 'print': {
          if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -414,7 +415,7 @@
          break
        }
        //标签打印
        case 'printLabel': {
          if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -436,6 +437,7 @@
          break
        }
        //标签打印2
        case 'printLabel2': {
          if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -457,6 +459,7 @@
          break
        }
        //排序汇总
        case 'sort': {
          const $table = xGridDetail.value
          let data = $table.getTableData().fullData
@@ -485,6 +488,7 @@
          })
          break
        }
        //自定义打印
        case 'customLabel': {
          if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -503,6 +507,7 @@
              id += selectRecords[i].id + "|"
            }
          }
          //成品标签1
          if (lableTypes == 1) {
            labelRow.value.list = JSON.stringify(selectRecords)
@@ -517,7 +522,9 @@
                dialogTableVisibleLabel.value = true
              }
            } else if (company.label === 2) {
            }
            //常州项目
            else if (company.label === 2) {
              router.push({
                path: '/main/processCard/PrintCustomLabelCZ',
                query: {
@@ -530,14 +537,18 @@
              })
            }
          } else if (lableTypes == 2) {
          }
          //成品标签2
          else if (lableTypes == 2) {
            labelRow.value.list = JSON.stringify(selectRecords)
            labelRow.value.faceOrientation = faceOrientation
            labelRow.value.type = type
            labelRow.value.lableType = lableTypes
            if (company.label === 1) {
              dialogTableVisibleCustomLabel.value = true
            } else if (company.label === 2) {
            }
            //常州项目
            else if (company.label === 2) {
              router.push({
                path: '/main/processCard/PrintCustomLabelSemiCZ',
                query: {
@@ -549,7 +560,9 @@
                }
              })
            }
          } else if (lableTypes == 3) {
          }
          //成品标签3 å¸¸å·žé¡¹ç›®
          else if (lableTypes == 3) {
            router.push({
              path: '/main/processCard/PrintLabel1',
              query: {
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCardDetails.vue
@@ -459,6 +459,7 @@
    let lableTitle = lableType.text
    if ($grid) {
      switch (code) {
        //打印流程卡
        case 'print': {
          if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -480,7 +481,7 @@
          dialogTableVisible.value = true
          break
        }
        //标签打印 å¸¸å·ž
        case 'printLabel': {
          if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -502,6 +503,7 @@
          break
        }
        //标签打印2 å¸¸å·ž
        case 'printLabel2': {
          if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -551,6 +553,7 @@
          })
          break
        }
        //自定义成品标签打印
        case 'customLabel': {
          if (selectRecords === null || selectRecords === '' || selectRecords.length === 0) {
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
@@ -569,6 +572,7 @@
              id += selectRecords[i].id + "|"
            }
          }
          //成品标签1
          if (lableTypes == 1) {
            labelRow.value.list = JSON.stringify(selectRecords)
            labelRow.value.faceOrientation = faceOrientation
@@ -577,7 +581,9 @@
            lastList.value = []
            if (company.label === 1) {
              dialogTableVisibleLabel.value = true
            } else if (company.label === 2) {
            }
            //常州项目
            else if (company.label === 2) {
              router.push({
                path: '/main/processCard/PrintCustomLabelCZ',
                query: {
@@ -590,7 +596,9 @@
              })
            }
          } else if (lableTypes == 2) {
          }
          //成品标签2
          else if (lableTypes == 2) {
            labelRow.value.list = JSON.stringify(selectRecords)
            labelRow.value.faceOrientation = faceOrientation
            labelRow.value.type = type
@@ -598,7 +606,9 @@
            lastList.value = []
            if (company.label === 1) {
              dialogTableVisibleCustomLabel.value = true
            } else if (company.label === 2) {
            }
            //常州项目
            else if (company.label === 2) {
              router.push({
                path: '/main/processCard/PrintCustomLabelSemiCZ',
                query: {
@@ -610,7 +620,9 @@
                }
              })
            }
          } else if (lableTypes == 3) {
          }
          //成品标签3
          else if (lableTypes == 3) {
            router.push({
              path: '/main/processCard/PrintLabel1',
              query: {
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
@@ -41,6 +41,7 @@
      }else{
        localStorage.setItem('hasRefreshed', 'false');
      }
  //工程打印
  if(projectNo.value!=null){
    request.post(`/processCard/getSelectPrintLabel/${projectNo.value}/${type.value}`).then((res) => {
      if (res.code == 200) {
@@ -51,6 +52,7 @@
      }
    })
  }else{
    //流程卡编辑打印标签 å¸¸å·ž
    if (printType == 1) {
      data.value.printList = JSON.parse(route.query.printList)
      request.post(`/processCard/getSelectPrintLabel1`,data.value).then((res) => {
@@ -72,7 +74,9 @@
          router.push("/login")
        }
      })
    }else if(printType==2){
    }
    //明细分架打印标签 å¸¸å·ž
    else if(printType==2){
      data.value.printList = JSON.parse(route.query.printList)
      request.post(`/processCard/getSelectPrintLabelDetails`, data.value).then((res) => {
        if (res.code == 200) {
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel1.vue
@@ -41,6 +41,7 @@
  }else{
    localStorage.setItem('hasRefreshed', 'false');
  }
  //流程卡编辑打印标签2 å¸¸å·ž
  if (printType == 1) {
    request.post(`/processCard/getSelectPrintCustomLabel2/${type}/1`, data.value).then((res) => {
      if (res.code == 200) {
@@ -63,7 +64,9 @@
      }
    })
  }else if(printType==2){
  }
  //明细分架打印标签2 å¸¸å·ž
  else if(printType==2){
    request.post(`/processCard/getSelectPrintCustomLabelDetails/${type}/1`, data.value).then((res) => {
      if (res.code == 200) {
        produceList.value = deepClone(res.data.title)
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintFlowCard.vue
@@ -281,6 +281,7 @@
          titleStyleVisible.value = true
          break
        }
        //编辑
        case 'editCheckbox': {
          const selectRecords = $grid.getCheckboxRecords()
          if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
@@ -304,6 +305,7 @@
          return;
        }
        //明细打印
        case 'detailsPrint': {
          const selectRecords = $grid.getCheckboxRecords()
          if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
@@ -327,6 +329,7 @@
          return;
        }
        //明细分架打印
        case 'detailsProcessPrint': {
          const selectRecords = $grid.getCheckboxRecords()
          if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
@@ -350,6 +353,7 @@
          return;
        }
        //订单打印
        case 'orderPrint': {
          const selectRecords = $grid.getCheckboxRecords()
          if(selectRecords===null ||selectRecords===''||selectRecords.length===0){
north-glass-erp/northglass-erp/src/views/pp/report/ProcessCardProgress.vue
@@ -198,6 +198,7 @@
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged},
    {field: 'quantity', width: 90,title: t('order.quantity')},
     {field: 'gross_area', width: 90,title: t('order.area')},
    {field: 'broken_num',width: 90, title: t('reportingWorks.quantityBroken')},
    // {field: 'shippedQuantity',width: 120, title: t('report.shippedQuantity')},
    {field: 'inventory',width: 120, title: t('report.inventoryNum')},
@@ -223,7 +224,7 @@
        if (columnIndex === 0) {
          return t('basicData.total')
        }
        const List = ["quantity", "broken_num", "inventory", "inventoryArea"]; // é™æ€åˆ—的求和
        const List = ["quantity", "broken_num", "inventory", "inventoryArea","gross_area"]; // é™æ€åˆ—的求和
        if (List.includes(column.field)) {
          return footSum(data, column.field)
        }
north-glass-erp/northglass-erp/src/views/sd/basicData/SearchBasicData.vue
@@ -302,7 +302,7 @@
          </el-col>
        </template>
        <template #add>
          <el-button @click="add" type="primary" style="margin-right: 3px">新增</el-button>
          <el-button @click="add" type="primary" style="margin-right: 3px">{{$t('basicData.insert')}}</el-button>
        </template>
north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomer.vue
@@ -201,8 +201,8 @@
    body: {
      options: [
        [
          { code: 'sheet1', name: '订单', prefixIcon: 'vxe-icon-file-txt', visible: true},
          { code: 'sheet2', name: '发货', prefixIcon: 'vxe-icon-file-txt', visible: true},
          { code: 'sheet1', name: t('orderBasicData.order'), prefixIcon: 'vxe-icon-file-txt', visible: true},
          { code: 'sheet2', name: t('searchOrder.delivery'), prefixIcon: 'vxe-icon-file-txt', visible: true},
        ]
      ]
    }
@@ -260,7 +260,7 @@
      switch (menu.code) {
        case 'sheet1': {
          if(rowClickIndex.value===null){
            ElMessage.warning("未查询到客户信息")
            ElMessage.warning(t('customer.msgList.notCustomerInfo'))//"未查询到客户信息"
            return
          }
          router.push({path: '/main/customer/selectCustomerOrder', query: { id: row.id,type:1 }})
@@ -269,7 +269,7 @@
        }
        case 'sheet2': {
          if(rowClickIndex.value===null){
            ElMessage.warning("未查询到客户信息")
            ElMessage.warning(t('customer.msgList.notCustomerInfo'))
            return
          }
          router.push({path: '/main/customer/selectCustomerOrder', query: { id: row.id,type:2 }})
north-glass-erp/northglass-erp/src/views/sd/customer/SelectCustomerOrder.vue
@@ -265,7 +265,7 @@
      const blob = new Blob([res])
      if ('download' in document.createElement('a')) { // éžIE下载
        const elink = document.createElement('a')
        elink.download = `客户订单.xlsx`
        elink.download = `customerOrder.xlsx`
        elink.style.display = 'none'
        elink.href = URL.createObjectURL(blob)
        document.body.appendChild(elink)
@@ -281,7 +281,7 @@
        const blob = new Blob([res])
        if ('download' in document.createElement('a')) { // éžIE下载
          const elink = document.createElement('a')
          elink.download = `客户发货.xlsx`
          elink.download = `customerDelivery.xlsx`
          elink.style.display = 'none'
          elink.href = URL.createObjectURL(blob)
          document.body.appendChild(elink)
north-glass-erp/northglass-erp/src/views/sd/order/CreateOrder.vue
@@ -18,6 +18,7 @@
import footSum from "@/hook/footSum"
import {useI18n} from "vue-i18n"
import {multiply,multiplyAuto,divideAuto} from '@/utils/decimal'
import OrderNumberReportTransfer from "@/components/sd/order/OrderNumberReportTransfer.vue";
const { t } = useI18n()
let dialogTableVisible = ref(false)
@@ -25,6 +26,13 @@
let errorAreaVisible = ref(false)
let otherMoneyVisible = ref(false)
let sizeCheckVisible = ref(false)
let dialogTransferVisible = ref(false)
const transferData = ref({
  oldOrderId:null,
  newOrderNumber:null,
  newOrderId:null,
  oldOrderNumber:null,
})
let orderIdVisible = ref(false)
const maxTableLen =ref(500)
const userStore = useUserInfoStore()
@@ -117,7 +125,8 @@
          { code: 'errorArea', name: t('basicData.errorSettlementArea'), prefixIcon: 'vxe-icon-chart-bar-x', visible: true, disabled: false },
          { code: 'otherMoney', name: t('basicData.otherAmounts'), prefixIcon: 'vxe-icon-chart-bar-x', visible: true, disabled: false },
          { code: 'sizeCheck', name: t('basicData.sizeReview'), prefixIcon: 'vxe-icon-eye-fill', visible: true, disabled: false },
          { code: 'updateOrderId', name: '修改订单号', prefixIcon: 'vxe-icon-eye-fill', visible: true, disabled: false }
          { code: 'updateOrderId', name: t('searchOrder.updateOrderId'), prefixIcon: 'vxe-icon-eye-fill', visible: true, disabled: false },
          { code: 'reportingTransfer', name: t('searchOrder.reportingTransfer'), prefixIcon: 'vxe-icon-send', visible: true, disabled: true }
        ]
      ]
    }
@@ -749,12 +758,20 @@
              })
            }
          }
          computedMoney(result.cell)
          gridOptions.menuConfig.body.options[0][5].disabled = false
          break
        }
        case "reportingTransfer":{
          const row = xGrid.value.getCurrentRecord()
          if(row===null){
            ElMessage.warning(t('components.pleaseClickToSelectARowFirst'))
            return
          }
          transferData.value.oldOrderNumber = row.orderNumber
          transferData.value.oldOrderId = titleUploadData.value.orderId
          dialogTransferVisible.value = true
          break
        }
      }
@@ -880,9 +897,10 @@
          gridOptions.toolbarConfig.buttons[2].disabled = true
          gridOptions.toolbarConfig.buttons[3].disabled = true
          gridOptions.toolbarConfig.buttons[4].disabled = true
        }
      }
      if(res.data.order.processingCard>0 && company.connectMes){
        gridOptions.menuConfig.body.options[0][12].disabled = false
      }
      if(res.data.order.productionOrder !==0 ){
@@ -1089,17 +1107,17 @@
          orderId:newOrderId.value,
          random:Math.random()}})
    }else if(res.data==="false1"){
      ElMessage.warning("输入订单号不能大于最大订单号")
      ElMessage.warning(t('order.msg.updateOrderIdErrorGtMaxId'))
    }else if(res.data==="false2"){
      ElMessage.warning("输入订单号已存在")
      ElMessage.warning(t('order.msg.updateOrderIdErrorIsExist'))
    }else if(res.data==="false3"){
      ElMessage.warning("输入订单号相同")
      ElMessage.warning(t('order.msg.updateOrderIdErrorIsSame'))
    }else if(res.data==="false4"){
      ElMessage.warning("输入订单号长度不符")
      ElMessage.warning(t('order.msg.updateOrderIdErrorDiscrepancyInLength'))
    }else if(res.data==="false5"){
      ElMessage.warning("请输入数字")
      ElMessage.warning(t('order.msg.updateOrderIdErrorInputNumber'))
    }else if(res.data==="false6"){
      ElMessage.warning("不能修改第一个单子")
      ElMessage.warning(t('order.msg.updateOrderIdErrorNotNo1'))
    }
  })
}
@@ -1142,8 +1160,7 @@
  await  ElMessageBox.confirm(
        t('order.msg.differentSize'),
        t('order.msg.warning'),
        {
          confirmButtonText: t('basicData.confirmButtonText'),
        {confirmButtonText: t('basicData.confirmButtonText'),
          cancelButtonText: t('basicData.cancelButtonText'),
          type: 'warning',
        }
@@ -1579,6 +1596,13 @@
  await initOrder(1)
  createCustomerVisible.value = false
}
const orderNumberTransfer = () => {
  router.push({
    path:'/main/order/createOrder',
    query:{
      orderId:titleUploadData.value.orderId,
      random:Math.random()}})
}
</script>
@@ -1852,6 +1876,14 @@
      <create-customer :getOrderPage="'order'" @getOrderFunction="createCustomerSuccess" />
    </el-dialog>
<!--    è®¢å•报工转移-->
    <el-dialog v-model="dialogTransferVisible"
               :close-on-click-modal="false"
               :title="$t('order.orderTransfer')"
               destroy-on-close width="500">
      <order-number-report-transfer :transferData="transferData" @orderNumberTransfer="orderNumberTransfer"/>
    </el-dialog>
  </div>
</template>
north-glass-erp/northglass-erp/src/views/sd/order/SelectOrder.vue
@@ -390,11 +390,11 @@
              ElMessage.success(t('product.msg.operateSuccess')+'!')
              selectOrderList()
            }else if(res.data==='false1'){
              ElMessage.warning('此订单已转优化,回退失败!')
              ElMessage.warning(t('searchOrder.msgList.isOptimize'))
            }else if(res.data==='false2'){
              ElMessage.warning('此订单已报工,回退失败!')
              ElMessage.warning(t('searchOrder.msgList.isReportingWork'))
            }else if(res.data==='false3'){
              ElMessage.warning('此订单已入库,回退失败!')
              ElMessage.warning(t('searchOrder.msgList.isStorage'))
            }
          })
        })
@@ -598,6 +598,12 @@
  }
}
//订单距离小于三天则改变checkbox class æ”¹å˜é¢œè‰²
const timeOutChangeColor =(row)=>{
  if(company.timeOut){
    return row.timeOut
  }
}
</script>
@@ -643,12 +649,14 @@
        <template #state="{ row,column}">
          <el-checkbox
              :class="timeOutChangeColor(row)"
              v-if="row[column.field] === 2"
              @click.native.prevent
              :indeterminate="row[column.field]===1"
              :checked="true"/>
          <el-checkbox
              v-else
              :class="timeOutChangeColor(row)"
              @click.native.prevent
              :indeterminate="row[column.field]===1"
              :checked="false"/>
@@ -794,7 +802,10 @@
  height: 100%;
}
:deep(.timeOut.is-checked .el-checkbox__inner) {
  background-color: orangered;
  border-color: orangered;
}
</style>
north-glass-erp/northglass-erp/src/views/sd/product/CreateProduct.vue
@@ -816,7 +816,7 @@
          margin-left: 0.5rem;"
          size="large"
          type="primary"
          round>{{"复制"}}</el-button>
          round>{{$t('basicData.copy')}}</el-button>
      <el-button
          :disabled="productTotal.state===1"
          @click="saveProduct(null)"
north-glass-erp/src/main/java/com/example/erp/controller/mm/MaterialInventoryController.java
@@ -188,6 +188,12 @@
        return  Result.seccess(materialInventoryService.mesMaterialOutbound(reportingWork));
    }
    @ApiOperation("物料新增返回接口")
    @PostMapping("/cancelMaterialAdditionRecord")
    public Result cancelMaterialAdditionRecord( @RequestBody Map<String,Object>  object){
        return Result.seccess(materialInventoryService.cancelMaterialAdditionRecord(object));
    }
north-glass-erp/src/main/java/com/example/erp/entity/sd/Order.java
@@ -101,6 +101,8 @@
    private LocalDate updateTime;
    @TableField(select = false,exist = false)
    private Integer goodsQuantity;
    @TableField(select = false,exist = false)
    private String timeOut;
    @TableField(value = "customer_id")
    private Customer  customer;
north-glass-erp/src/main/java/com/example/erp/mapper/mm/MaterialInventoryMapper.java
@@ -60,6 +60,8 @@
    Boolean deleteMaterialLog(@Param("materialOutboundId") String materialOutboundId);
    Boolean deleteMaterialLogById(@Param("id") Long id);
    Integer getMaximum(@Param("type") String type);
    Integer getMaximums(@Param("type") String type);
@@ -68,9 +70,9 @@
    Integer getReturningWarehouseCount(@Param("returningId") String returningId);
    Integer getMaterialInventoryCount(@Param("materialCode") Long materialCode,@Param("dateOfManufacture") LocalDate dateOfManufacture);
    List<MaterialInventory> getMaterialInventoryCount(@Param("materialCode") Long materialCode,@Param("dateOfManufacture") LocalDate dateOfManufacture);
    Integer getMaterialInventoryCountNull(@Param("materialCode") Long materialCode);
    List<MaterialInventory> getMaterialInventoryCountNull(@Param("materialCode") Long materialCode);
    List<MaterialInventory> getMaterialInventoryCountId(@Param("materialCode") Long materialCode,@Param("dateOfManufacture") LocalDate dateOfManufacture);
@@ -190,6 +192,11 @@
                                    @Param("totalArea") Double totalArea,
                                    @Param("materialInventory") MaterialInventory materialInventory);
    Boolean updateMaterialInventoryOut(@Param("materialCode") Long materialCode,@Param("quantity") Integer quantity,
                                    @Param("dateOfManufacture") String dateOfManufacture);
    Boolean updateMaterialInventoryNullOut(@Param("materialCode") Long materialCode,@Param("quantity") Integer quantity);
    Boolean insertMaterialInventory(@Param("materialCode") Long materialCode,@Param("singlePieceArea") Double singlePieceArea,
                                    @Param("totalArea") Double totalArea,
                                    @Param("materialInventory") MaterialInventory materialInventory);
north-glass-erp/src/main/java/com/example/erp/service/mm/MaterialInventoryService.java
@@ -201,21 +201,22 @@
            //查询物料是否存在
            Integer MaterialInventoryCount=0;
            List<MaterialInventory> MaterialInventoryCount;
            if (materialInventory.getDateOfManufacture()!=null){
                MaterialInventoryCount = materialInventoryMapper.getMaterialInventoryCount(materialCode,materialInventory.getDateOfManufacture());
            }else{
                MaterialInventoryCount = materialInventoryMapper.getMaterialInventoryCountNull(materialCode);
            }
            if(MaterialInventoryCount==1){
            if(MaterialInventoryCount.size()==1){
                materialInventory.setId(MaterialInventoryCount.get(0).getId());
                if (materialInventory.getDateOfManufacture()!=null){
                    materialInventoryMapper.updateMaterialInventory(materialCode,singlePieceArea,totalArea,materialInventory);
                }else{
                    materialInventoryMapper.updateMaterialInventoryNull(materialCode,singlePieceArea,totalArea,materialInventory);
                }
                log.setFunction("saveMaterialInventory修改");
            }else if(MaterialInventoryCount==0) {
            }else if(MaterialInventoryCount.isEmpty()) {
                materialInventoryMapper.insertMaterialInventory(materialCode,singlePieceArea,totalArea,materialInventory);
                log.setFunction("saveMaterialInventory新增");
            }else {
@@ -226,6 +227,9 @@
            MaterialStore materialStore=materialStoreMapper.getSelectMaterialStoreById(materialCode);
            json=materialStore.getJson().substring(1, materialStore.getJson().length() - 1);
            MaterialLog materialLog=new MaterialLog();
            if(materialInventory.getDateOfManufacture()!=null){
                materialLog.setOperationOrderNumber(materialInventory.getDateOfManufacture().toString());
            }
            materialLog.setOperateType("物料新增");
            materialLog.setMaterialCode(materialCode);
            materialLog.setMaterialName(convertString(json,"\"name\""));
@@ -598,7 +602,7 @@
                    //查询物料是否存在
                    Integer MaterialInventoryCount=0;
                    List<MaterialInventory> MaterialInventoryCount;
                    if (returningWarehouseDetail.getDateOfManufacture()!=null){
                        MaterialInventoryCount = materialInventoryMapper.getMaterialInventoryCount(returningWarehouseDetail.getId(),returningWarehouseDetail.getDateOfManufacture());
                    }else{
@@ -606,7 +610,7 @@
                    }
                    if(MaterialInventoryCount>0){
                    if(!MaterialInventoryCount.isEmpty()){
                        if (returningWarehouseDetail.getDateOfManufacture()!=null){
                            materialInventoryMapper.updateMaterialInventoryReturning(returningWarehouseDetail.getId(),singlePieceArea,totalArea,returningWarehouseDetail);
                        }else{
@@ -1018,6 +1022,65 @@
    }
    public String cancelMaterialAdditionRecord(Map<String,Object> object) {
        String saveState = "true";
        //设置回滚点
        Object savePoint = TransactionAspectSupport.currentTransactionStatus().createSavepoint();
        try {
            Log log = new Log();
            log.setOperatorId(object.get("userId").toString());
            log.setOperator(object.get("userName").toString());
            log.setContent(object.toString());
            //获取对象集合循环进行新增修改
            List<MaterialLog> materialLoglist = JSONArray.parseArray(JSONObject.toJSONString(object.get("materialAdd")), MaterialLog.class);
            if (!materialLoglist.isEmpty()){
                for (MaterialLog materialLog : materialLoglist) {
                    //查询物料是否存在
                    List<MaterialInventory> MaterialInventoryList;
                    if (materialLog.getOperationOrderNumber()!=null){
                        MaterialInventoryList = materialInventoryMapper.getMaterialInventoryCount(materialLog.getMaterialCode(), LocalDate.parse(materialLog.getOperationOrderNumber()));
                    }else{
                        MaterialInventoryList = materialInventoryMapper.getMaterialInventoryCountNull(materialLog.getMaterialCode());
                    }
                    if(MaterialInventoryList.size()==1){
                        if(MaterialInventoryList.get(0).getAvailableQuantity()>=materialLog.getQuantity()){
                            if (materialLog.getOperationOrderNumber()!=null){
                                materialInventoryMapper.updateMaterialInventoryOut(materialLog.getMaterialCode(),materialLog.getQuantity(),materialLog.getOperationOrderNumber());
                            }else{
                                materialInventoryMapper.updateMaterialInventoryNullOut(materialLog.getMaterialCode(),materialLog.getQuantity());
                            }
                            materialInventoryMapper.deleteMaterialLogById(materialLog.getId());
                        }else{
                            return "false1";
                        }
                    }else{
                        return "false2";
                    }
                }
            }
            logService.saveLog(log);
        } catch (Exception e) {
            TransactionAspectSupport.currentTransactionStatus().rollbackToSavepoint(savePoint);
            //将异常传入数据库
            SysError sysError = new SysError();
            sysError.setError(e+Arrays.toString(e.getStackTrace()));
            sysError.setFunc("cancelFinishedGoodsInventoryStorage");
            sysErrorService.insert(sysError);
            saveState = "false";
        }
        return saveState;
    }
north-glass-erp/src/main/java/com/example/erp/service/pp/ReportingWorkService.java
@@ -842,12 +842,24 @@
    @Transactional(rollbackFor = Exception.class)
    public Object reportingWorkTransferSv(Map<String, String> reportingWork) {
        Map<String, Object> result = new HashMap<>();
        Order oldOrder = orderMapper.selectOrderId(reportingWork.get("oldOrderId"));
        OrderDetail oldOrderDetail = orderDetailMapper.selectOne(
                new QueryWrapper<OrderDetail>()
                        .eq("order_id", reportingWork.get("oldOrderId"))
                        .eq("order_number", reportingWork.get("oldOrderNumber"))
        );
        if(oldOrder == null){
            result.put("msg","旧订单不存在");
            result.put("data",false);
            return result;
        }
        if(oldOrderDetail == null){
            result.put("msg","旧订单次序号不存在");
            result.put("data",false);
            return result;
        }
        Order newOrder = orderMapper.selectOrderId(reportingWork.get("newOrderId"));
        OrderDetail newOrderDetail = orderDetailMapper.selectOne(
@@ -855,15 +867,37 @@
                        .eq("order_id", reportingWork.get("newOrderId"))
                        .eq("order_number", reportingWork.get("newOrderNumber"))
        );
        if (newOrder == null){
            result.put("msg","新订单不存在");
            result.put("data",false);
            return result;
        }
        if(newOrderDetail == null){
            result.put("msg","新订单次序号不存在");
            result.put("data",false);
            return result;
        }
        if(Objects.equals(oldOrder.getOrderId(), newOrder.getOrderId())){
            result.put("msg","新旧订单号一致");
            result.put("data",false);
            return result;
        }
        if(!Objects.equals(oldOrder.getCustomerId(), newOrder.getCustomerId())){
            return "新旧订单客户不一致";
            result.put("msg","新旧订单客户不一致");
            result.put("data",false);
            return result;
        }
        if(!Objects.equals(oldOrderDetail.getProductId(), newOrderDetail.getProductId())){
            return "新旧订单产品不一致";
            result.put("msg","新旧订单产品不一致");
            result.put("data",false);
            return result;
        }
        if (!Objects.equals(oldOrderDetail.getWidth(), newOrderDetail.getWidth())
                || !Objects.equals(oldOrderDetail.getHeight(), newOrderDetail.getHeight())){
            return "新旧订单尺寸不一致";
            result.put("msg","新旧订单尺寸不一致");
            result.put("data",false);
            return result;
        }
@@ -874,7 +908,9 @@
                        .eq("order_number", reportingWork.get("oldOrderNumber"))
                );
        if(oldOrderProcessDetailList.isEmpty()){
            return "旧订单未分流程卡";
            result.put("msg","旧订单未分流程卡");
            result.put("data",false);
            return result;
        }
        //获取新订单是否流程卡是否存在
        List<OrderProcessDetail> newOrderProcessDetailList = orderProcessDetailMapper
@@ -883,7 +919,9 @@
                        .eq("order_number", reportingWork.get("newOrderNumber"))
                );
        if(newOrderProcessDetailList.isEmpty()){
            return "新订单未分流程卡";
            result.put("msg","新订单未分流程卡");
            result.put("data",false);
            return result;
        }
        //新订单是否存在已经排版序号
        List<FlowCard> newFlowCardLayoutStatus = flowCardMapper.selectList(new QueryWrapper<FlowCard>()
@@ -892,7 +930,9 @@
                .gt("layout_status",0)
        );
        if(!newFlowCardLayoutStatus.isEmpty()){
            return "新订单此序号存在排版";
            result.put("msg","新订单此序号存在排版");
            result.put("data",false);
            return result;
        }
        //获取旧订单报工数据汇总
        List<OrderProcessDetail> oldOrderProcessDetailForReport = orderProcessDetailMapper
@@ -1021,16 +1061,20 @@
        //restTemplate.postForObject("http://localhost:8086/order/test",orderNumberTransferList,String.class);
        //向mes发送http请求
        ResponseEntity<String> response =restTemplate.exchange(
        ResponseEntity<OrderNumberTransferDTO> response =restTemplate.exchange(
                "http://localhost:88/api/loadGlass/order/order/orderChange",
                HttpMethod.POST,
                new HttpEntity<>(orderNumberTransferList),
                String.class);
                OrderNumberTransferDTO.class);
        if(response.getStatusCode() == HttpStatus.OK){
            return true;
            OrderNumberTransferDTO responseBody = response.getBody();
            result.put("data",true);
            return result;
        }else{
            return "连接mes响应超时";
            result.put("msg","连接mes响应超时");
            result.put("data",false);
            return result;
        }
        
    }
north-glass-erp/src/main/resources/mapper/mm/MaterialInventory.xml
@@ -538,6 +538,10 @@
        delete from mm.material_log where operation_order_number=#{materialOutboundId}
    </delete>
    <delete id="deleteMaterialLogById" >
        delete from mm.material_log where id=#{id}
    </delete>
    <delete id="deleteReturningWarehouseDetail" >
        delete from mm.returning_warehouse_detail where returning_id=#{returningId}
    </delete>
@@ -583,11 +587,11 @@
    </select>
    <select id="getMaterialInventoryCount" >
        select count(*) from mm.material_inventory where  material_code=#{materialCode} and date_of_manufacture=#{dateOfManufacture}
        select * from mm.material_inventory where  material_code=#{materialCode} and date_of_manufacture=#{dateOfManufacture}
    </select>
    <select id="getMaterialInventoryCountNull" >
        select count(*) from mm.material_inventory where  material_code=#{materialCode} and date_of_manufacture is null
        select * from mm.material_inventory where  material_code=#{materialCode} and date_of_manufacture is null
    </select>
    <select id="getMaterialInventoryCountId" >
@@ -779,7 +783,21 @@
        update mm.material_inventory set inventory_quantity=inventory_quantity+#{materialInventory.inventoryQuantity},
                                         available_quantity=available_quantity+#{materialInventory.inventoryQuantity},
                                         total_area=single_piece_area*inventory_quantity
        where  material_code=#{materialCode}
        where  material_code=#{materialCode} and date_of_manufacture is null
    </update>
    <update id="updateMaterialInventoryOut" >
        update mm.material_inventory set inventory_quantity=inventory_quantity-#{quantity},
                                         available_quantity=available_quantity-#{quantity},
                                         total_area=single_piece_area*inventory_quantity
        where  material_code=#{materialCode} and date_of_manufacture=#{dateOfManufacture}
    </update>
    <update id="updateMaterialInventoryNullOut" >
        update mm.material_inventory set inventory_quantity=inventory_quantity-#{quantity},
                                         available_quantity=available_quantity-#{quantity},
                                         total_area=single_piece_area*inventory_quantity
        where  material_code=#{materialCode} and date_of_manufacture is null
    </update>
    <update id="updateMaterialInventoryReturning" >
north-glass-erp/src/main/resources/mapper/pp/Report.xml
@@ -170,6 +170,7 @@
               e.reportWorkQuantityCount,
               e.reportWorkTime,
               e.broken_num,
               c.quantity*a.area as gross_area,
               ifnull(f.inventory, 0)                         as inventory,
               round(ifnull(f.inventory, 0) * a.area, 2)      as inventoryArea,
               ifnull(dd.quantity, 0)                         as shippedQuantity,
north-glass-erp/src/main/resources/mapper/sd/OrderMapper.xml
@@ -104,7 +104,8 @@
    <select id="getOrderList">
       select * from (select
            o.*,
        ifnull(sum(fgi.quantity_available),0) as goodsQuantity
        ifnull(sum(fgi.quantity_available),0) as goodsQuantity,
        if(DATEDIFF(o.delivery_date, CURDATE()) &lt; 3  and o.delivery &lt; 2, 'timeOut','' ) as timeOut
        from
            sd.`order` as o
        left join mm.finished_goods_inventory as  fgi