guoyuji
2024-12-11 69c3c53dab092e0fd618a84934f333030e769926
Merge branch 'master' of http://bore.pub:10439/r/ERP_override
5个文件已修改
96 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/SetAmount.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/report/ProductionSchedule.vue 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/pp/PrintProcess.vue
@@ -211,7 +211,6 @@
const AreaQuantitySummary = () => {
  console.log(produceList.value)
  for (let i = 0; i < produceList.value.length; i++) {
    // 遍历当前项目的 detail 数组
    for (let j = 0; j < produceList.value[i].detail.length; j++) {
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
@@ -192,6 +192,39 @@
  }
});
// 从子组件SetAmount获取磨量值,并更新表格数据
const Amount = (amountData) => {
  nextTick(() => {
    const data = gridOptions.data;
    console.log('接收到的amountData:', amountData);
    console.log('表格原始数据:', data);
    if (data) {
      try {
        const updatedData = [];
        for (let i = 0; i < data.length; i++) {
          const item = data[i];
          const updatedItem = {
            ...item,
            longGrind1: Number(amountData.quicksetTop),
            longGrind2: Number(amountData.quicksetRight),
            shortGrind1: Number(amountData.quicksetBottom),
            shortGrind2: Number(amountData.quicksetLeft)
          };
          updatedData.push(updatedItem);
        }
        gridOptions.data = updatedData;
        xGrid.value.loadData(updatedData);
      } catch (error) {
        console.error('更新表格数据时出错:', error);
        // 这里可以根据实际需求添加一些回滚操作或者提示用户的逻辑,比如显示一个错误提示框等
        ElMessage.error('更新磨量数据时出现错误,请检查输入或联系管理员');
      }
    } else {
      console.warn('表格数据为空,无法更新磨量值');
    }
  });
};
</script>
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/SetAmount.vue
@@ -1,5 +1,6 @@
<script setup>
import {ref} from "vue";
import {defineEmits} from 'vue';
function setupComponent() {
  // 各个输入框绑定的值,初始化为0
@@ -37,6 +38,22 @@
const check = ref(true)
const emit = defineEmits(['set-amount']);
const props = defineProps({
  closeDialog: Function
});
const setAmount = () => {
  const amountData = {
    quicksetTop: quicksetTop.value,
    quicksetRight: quicksetRight.value,
    quicksetBottom: quicksetBottom.value,
    quicksetLeft: quicksetLeft.value
  };
  emit('set-amount', amountData);
  props.closeDialog(2);
};
</script>
<template>
@@ -59,7 +76,7 @@
        <el-input-number v-model="quicksetLeft" class="left" placeholder="0"
                         controls-position="right" :step="0.1" :min="0"></el-input-number>
      </div>
      <el-button type="primary" style="float: right; margin: 184px 0 0 13px;">应用</el-button>
      <el-button type="primary" style="float: right; margin: 184px 0 0 13px;" @click="setAmount">应用</el-button>
    </div>
    <div style="margin-top: -20px">
north-glass-erp/northglass-erp/src/views/pp/processCard/AddProcessCard.vue
@@ -453,6 +453,9 @@
    $gridLeft.clearCheckboxRow()
    $grid.clearCheckboxRow()
  }
  if (checkedNum.value){
    checkedNum.value =''
  }
}
@@ -659,6 +662,9 @@
  } catch (e) {
    ElMessage.warning(e.message)
  }
  if (checkedNum.value){
    checkedNum.value =''
  }
}
//向左边表格添加数据
const addLeft = () => {
@@ -776,6 +782,9 @@
  } catch (e) {
    ElMessage.warning(e.message)
  }
  if (checkedNum.value){
    checkedNum.value =''
  }
}
@@ -921,7 +930,7 @@
              <span><el-input v-model="quantit" style="width: 80px;"/></span>
              <span><el-input v-model="weight" style="width: 80px;"/></span>
            </div>
            <span>{{ $t('processCard.selectedQuantity') }}:<el-input v-model="checkedNum" clearable
            <span>{{ $t('processCard.selectedQuantity') }}:<el-input id="checkedNum" v-model="checkedNum" clearable
                                                                     type="number"></el-input></span><br>
            <el-button style="width: 40px;" type="primary" @click="addRight"> →</el-button>
            <br>
north-glass-erp/northglass-erp/src/views/pp/report/ProductionSchedule.vue
@@ -57,10 +57,15 @@
        return
      }
      //gridOptions.columns = JSON.parse(JSON.stringify(columns))
      res.data.title.forEach(item =>{
        let column = {slots: { default: 'quantitySum' }, width: 90,title: item.process}
        gridOptions.columns.push(column)
      })
      res.data.title.forEach((item, index) => {
        let column = { slots: { default: 'quantitySum' }, width: 90, title: item.process };
        const insertIndex = 5;  // 设置插入位置的索引
        gridOptions.columns = [
          ...gridOptions.columns.slice(0, insertIndex + index), // 取插入位置之前的部分
          column,
          ...gridOptions.columns.slice(insertIndex + index) // 取插入位置之后的部分
        ];
      });
      res.data.data.forEach(item => {
        item.reportWorkQuantity=JSON.parse(item.reportWorkQuantity)
        item.reportWorkQuantityCount=JSON.parse(item.reportWorkQuantityCount)
@@ -124,19 +129,20 @@
  },//表头参数
   columns : [
    {type:'expand',fixed:"left",slots: { content:'content' },width: 50},
    {field: 'order_number', width: 150, title: t('order.OrderNum'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged},
    //{field: 'shape',width: 130, title: t('order.shape') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged},
    {field: 'glassNumber', width: 110,title: t('reportingWorks.glassNumber'),showOverflow:"ellipsis",filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged},
    {field: 'product_name', width: 120,title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged},
    {field: 'child_width',width: 110, title: t('order.width')},
    {field: 'child_height', width: 90,title: t('order.height'),showOverflow:"ellipsis"},
    {field: 'quantity', width: 90,title: t('order.quantity')},
    {field: 'technology_number',width: 100, title: t('processCard.technologyNumber'),filters: [{data: ''}],
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged},
    {field: 'glass_child',width: 120, title: t('reportingWorks.glassChild')},
     {field: 'glassNumber', width: 110,title: t('reportingWorks.glassNumber'),showOverflow:"ellipsis",filters: [{data: ''}],
       slots: {filter: 'num1_filter'},
       filterMethod: filterChanged},
     {field: 'quantity', width: 90,title: t('order.quantity')},
     {field: 'order_number', width: 150, title: t('order.OrderNum'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged},
    //{field: 'shape',width: 130, title: t('order.shape') ,filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged},
    {field: 'product_name', width: 120,title: t('order.product'),filters:[{ data: '' }],slots: { filter: 'num1_filter' },filterMethod: filterChanged},
    {field: 'child_width',width: 110, title: t('order.width')},
    {field: 'child_height', width: 90,title: t('order.height'),showOverflow:"ellipsis"},
    {field: 'inventoryNum',width: 120, title: t('report.inventoryNum')},
    {field: 'inventoryArea',width: 120, title: t('report.inventoryArea')},
    // {field: 'shippedQuantity',width: 120, title: t('report.shippedQuantity')},