chenlu
2024-12-27 740a61ac30e319dc3354859f3168c611bd89a955
Merge branch 'master' of http://10.153.19.25:10105/r/ERP_override
10个文件已修改
340 ■■■■■ 已修改文件
north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/order/PrintSheet2.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue 238 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintProject.vue 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/components/sd/order/OrderProcess.vue
@@ -41,7 +41,13 @@
  toolbarConfig: {
    zoom: true,
    custom: true
  }
  },
  cellClassName ({ row, column,columnIndex})  {
    if (columnIndex>10 && row.quantity*1 === row.reportWorkQuantity[column.title]*1){
        return 'row-green'
    }
    return null
  },
})
@@ -144,5 +150,8 @@
</template>
<style scoped>
::v-deep(.vxe-grid .vxe-body--column.row-green) {
  background-color: #D5EAFF;
}
</style>
north-glass-erp/northglass-erp/src/components/sd/order/PrintSheet2.vue
@@ -183,7 +183,7 @@
<!--          }}-->
        </tr>
        <tr v-if="item1.differentSize">
        <tr v-if="item1.differentSize || item1.bendRadius">
          <td></td>
          <td>标记</td>
          <td colspan="4">半成品名称</td>
@@ -194,7 +194,7 @@
          <td colspan="7"></td>
        </tr>
        <tr v-if="item1.differentSize" v-for="(item2,index2) in item1.orderGlassDetails" :key="index2" >
        <tr v-if="item1.differentSize || item1.bendRadius" v-for="(item2,index2) in item1.orderGlassDetails" :key="index2" >
            <td style="border: 0"></td>
            <td>{{ item2.technologyNumber }}</td>
north-glass-erp/northglass-erp/src/views/pp/glassOptimize/page/ProjectDetail.vue
@@ -43,7 +43,7 @@
  },
  columns: [
    {type:'seq',fixed:"left",slots: { content:'content' },width: 50},
    {type: 'seq', fixed: "left", slots: {content: 'content'}, width: 50},
    {field: 'order_number', title: '订序', width: 70},
    {field: 'child_width', width: 100, title: t('order.width'), filters: [{data: ''}], slots: {filter: 'num2_filter'}},
    {
@@ -191,6 +191,7 @@
        [
          {code: 'setAmount', name: '设置统一磨量',},
          {code: 'displayProcessCard', name: '显示流程卡',},
          {code: 'hideProcessCard', name: '隐藏流程卡',},
          {code: 'setShape', name: '设置图形',},
          {code: 'Export', name: '数据导出', prefixIcon: 'vxe-icon-download', visible: true, disabled: false},
          {code: 'safeDXF', name: '图形另存为DXF',},
@@ -200,22 +201,14 @@
      ]
    },
  },
  toolbarConfig: {
    buttons: [],
    slots: {
      buttons: "toolbar"
    },
  },
})
const processCardColumns = reactive([
  { field: 'process_id', title: '流程卡', width: 200, align: 'center' },
  { field: 'project', title: '项目名', width: 150, align: 'center' },
  { field: 'order_number', title: '订序', width: 100, align: 'center' },
  { field: 'sizes', title: '尺寸', width: 200, align: 'center' },
  { field: 'layer', title: '层', width: 100, align: 'center' },
  { field: 'quantity', title: '数量', width: 100, align: 'center' }
  {field: 'process_id', title: '流程卡', width: 200, align: 'center'},
  {field: 'project', title: '项目名', width: 150, align: 'center'},
  {field: 'order_number', title: '订序', width: 100, align: 'center'},
  {field: 'sizes', title: '尺寸', width: 200, align: 'center'},
  {field: 'layer', title: '层', width: 100, align: 'center'},
  {field: 'quantity', title: '数量', width: 100, align: 'center'}
]);
// 右键菜单
@@ -236,9 +229,9 @@
    requiresRow: false,
    displayProcess: () => {
      getProcessCard();
      processCardDialogVisible.value = true;
    }
  },
  {
    code: 'setShape',
    successMsg: '操作成功!',
@@ -295,11 +288,10 @@
          if (config.code === 'setAmount') {
            config.openAmount();
            ElMessage.success(config.successMsg);
          } else if ( config.code === 'displayProcessCard' ) {
          } else if (config.code === 'displayProcessCard') {
            config.displayProcess();
            ElMessage.success(config.successMsg);
          }
          else if (['setShape', 'safeDXF', 'exportOPTIMA'].includes(config.code)) {
          }  else if (['setShape', 'safeDXF', 'exportOPTIMA'].includes(config.code)) {
            config.showMessage();
          }
        }).catch(() => {
@@ -369,8 +361,6 @@
  }
});
// 流程卡窗口
const processCardDialogVisible = ref(false);
// 用于存储流程卡数据
const processCardData = ref(null);
//流程卡
@@ -383,6 +373,7 @@
    }
  });
};
// 从子组件SetAmount获取磨量值,并更新表格数据
const Amount = (amountData) => {
@@ -434,136 +425,123 @@
</script>
<template>
  <div style="width: 100%;height: 100%">
    <vxe-grid
        @filter-change="filterChanged"
        height="100%"
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
        v-on="gridEvents"
    >
  <div style="width: 100%;height: 100%;display: flex;flex-direction: column;">
    <!-- 头部 -->
    <div id="header">
      <!--工程文件菜单-->
      <el-dropdown @command="handleCommand">
        <el-button type="primary" :icon="Folder" style="margin-top: 8px">
          工程文件
        </el-button>
        <template #dropdown>
          <el-dropdown-menu>
            <el-dropdown-item :command="1" :icon="Plus">创建工程</el-dropdown-item>
            <el-dropdown-item :command="2" :icon="Setting">工程管理</el-dropdown-item>
            <el-dropdown-item :command="3" :icon="Operation">模拟计算</el-dropdown-item>
          </el-dropdown-menu>
        </template>
      </el-dropdown>
      <template #num2_filter="{ column, $panel }">
        <div>
          <div v-for="(option, index) in column.filters" :key="index">
            <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')"
                        @change="changeFilterEvent($event, option, $panel)">
              <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option>
              <vxe-option value="1" :label="$t('basicData.selected')"></vxe-option>
            </vxe-select>
      <div id="title">
        <span>工程编号:</span>
        <el-input disabled placeholder="" style="width: 150px" v-model="projectNo"></el-input>&nbsp;
        <span>工程名称:</span>
        <el-input disabled placeholder="" style="width: 150px; margin-right: 340px" v-model="projectName"></el-input>
        <el-button id="checkinventory" type="primary" @click="openDialog(1)">查询库存</el-button>
        <el-dialog v-model="dialogVisible[1]" title="查询库存" destroy-on-close style="width: 35%;height:35%;">
          <check-inventory :closeDialog="closeDialog" @send-data-inventory="handleInventory"/>
        </el-dialog>
        <el-button id="button" type="primary" @click="openDialog(2)">设置磨量</el-button>
        <el-dialog v-model="dialogVisible[2]" title="设置磨量(mm)" destroy-on-close
                   style="width: 35%;height:80%;margin-top: 3vh;">
          <set-amount :closeDialog="closeDialog" @set-amount="Amount"/>
        </el-dialog>
        <el-button id="button" type="primary" @click="openDialog(3)">设置修边</el-button>
        <el-dialog v-model="dialogVisible[3]" title="设置修边(mm)" destroy-on-close
                   style="width: 35%;height:80%;margin-top: 3vh;">
          <set-trimming :closeDialog="closeDialog" @send-data-event="handleTrimmingData"/>
        </el-dialog>
        <el-button id="button" type="primary">保存</el-button>
        <el-button id="button" type="primary" @click="openDialog(4)">优化</el-button>
        <el-dialog v-model="dialogVisible[4]" title="优化计算" destroy-on-close
                   style="width: 75%;height:90%;margin-top: 3vh;">
          <optimize-compute/>
        </el-dialog>
      </div>
    </div>
    <!-- 表格容器 -->
    <div class="table-container" style="flex: 1;display: flex;">
      <vxe-grid
          class="left-table"
          @filter-change="filterChanged"
          height="100%"
          ref="xGrid"
          v-bind="gridOptions"
          v-on="gridEvents"
          v-bind:style="{ width: leftTableWidth + '%' }"
      >
        <template #num2_filter="{ column, $panel }">
          <div>
            <div v-for="(option, index) in column.filters" :key="index">
              <vxe-select v-model="option.data" :placeholder="$t('processCard.pleaseSelect')"
                          @change="changeFilterEvent($event, option, $panel)">
                <vxe-option value="0" :label="$t('basicData.unchecked')"></vxe-option>
                <vxe-option value="1" :label="$t('basicData.selected')"></vxe-option>
              </vxe-select>
            </div>
          </div>
        </div>
      </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)"/>
        </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>
        </div>
      </template>
        </template>
      </vxe-grid>
      <template #toolbar>
        <div id="header">
          <div id="title">
            <span>工程编号:</span>
            <el-input disabled placeholder="" style="width: 150px" v-model="projectNo"></el-input>&nbsp;
            <span>工程名称:</span>
            <el-input disabled placeholder="" style="width: 150px; margin-right: 350px"
                      v-model="projectName"></el-input>
            <el-button id="checkinventory" type="primary" @click="openDialog(1)">查询库存</el-button>
            <el-dialog
                v-model="dialogVisible[1]"
                title="查询库存"
                destroy-on-close
                style="width: 35%;height:35%;">
              <check-inventory :closeDialog="closeDialog" @send-data-inventory="handleInventory"/>
            </el-dialog>
            <el-button id="button" type="primary" @click="openDialog(2)">设置磨量</el-button>
            <el-dialog
                v-model="dialogVisible[2]"
                title="设置磨量(mm)"
                destroy-on-close
                style="width: 35%;height:80%;margin-top: 3vh;">
              <set-amount :closeDialog="closeDialog" @set-amount="Amount"/>
            </el-dialog>
            <el-button id="button" type="primary" @click="openDialog(3)">设置修边</el-button>
            <el-dialog
                v-model="dialogVisible[3]"
                title="设置修边(mm)"
                destroy-on-close
                style="width: 35%;height:80%;margin-top: 3vh;">
              <set-trimming :closeDialog="closeDialog" @send-data-event="handleTrimmingData"/>
            </el-dialog>
            <el-button id="button" type="primary">保存</el-button>
            <el-button id="button" type="primary" @click="openDialog(4)">优化</el-button>
            <el-dialog
                v-model="dialogVisible[4]"
                title="优化计算"
                destroy-on-close
                style="width: 75%;height:90%;margin-top: 3vh;"
            >
              <optimize-compute/>
            </el-dialog>
          </div>
          <!--工程文件菜单-->
          <el-dropdown @command="handleCommand">
            <el-button type="primary" :icon="Folder" style="margin-top: 8px">
              工程文件
            </el-button>
            <template #dropdown>
              <el-dropdown-menu>
                <el-dropdown-item :command="1" :icon="Plus">创建工程</el-dropdown-item>
                <el-dropdown-item :command="2" :icon="Setting">工程管理</el-dropdown-item>
                <el-dropdown-item :command="3" :icon="Operation">模拟计算</el-dropdown-item>
                <!--              <el-dropdown-item command="4">文件导出</el-dropdown-item>
                              <el-dropdown-item command="5">文件导入</el-dropdown-item>-->
              </el-dropdown-menu>
            </template>
          </el-dropdown>
        </div>
      </template>
    </vxe-grid>
    <!-- 流程卡表格 -->
    <el-dialog
        v-model="processCardDialogVisible"
        title="流程卡数据"
        width="65%"
        heigth="600px"
        style="height: 500px;"
    >
      <!-- 流程卡表格 -->
      <vxe-grid
          height="100%"
          class="mytable - scrollbar"
          class="right-table"
          :data="processCardData"
          :columns="processCardColumns"
      >
      </vxe-grid>
    </el-dialog>
    </div>
  </div>
</template>
<style scoped>
.table-container {
  width: 100%;
  height: 100%;
}
.left-table {
  float: left;
  width: 50%;
}
.right-table {
  width: 660px;
}
#header {
  height: 50px;
  display: flex;
}
#title {
  position: absolute;
  right: 10px;
  margin-top: 8px;
  margin: 8px 5px;
  width: 1240px;
}
#button {
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintLabel.vue
@@ -134,6 +134,13 @@
      body.removeChild(content);
      body.removeChild(style);
    }, 20);
    request.post(`/processCard/updateProjectLabelPrintCount/${projectNo.value}`).then((res) => {
      if(res.code==='200'){
        ElMessage.info(t('order.printingNumber')+':'+res.data)
      }
    })
  }
</script>
north-glass-erp/northglass-erp/src/views/pp/processCard/SelectPrintProject.vue
@@ -225,6 +225,14 @@
      slots: {filter: 'num1_filter'},
      filterMethod: filterChanged
    },
    {
      field: 'labelPrintNum',
      title: t('标签打印次数')
    },
    {
      field: 'processPrintNum',
      title: t('流程卡打印次数')
    },
  ],//表头按钮
  toolbarConfig: {
@@ -313,6 +321,15 @@
  id: 'child',
})
const printCount = ()=>{
  request.post(`/processCard/updateProjectProcessPrintCount/${printRow.value.project}`).then((res) => {
    if(res.code==='200'){
      ElMessage.info(t('order.printingNumber')+':'+res.data)
      getWorkOrder()
    }
  })
}
</script>
<template>
@@ -402,7 +419,9 @@
        destroy-on-close
        style="width: 80%;height:75%;overflow: auto ">
      <template #header="{ close, titleId, titleClass }">
        <el-button v-print="printContentLabel" :icon="Printer" circle/>
        <el-button
            v-print="printContentLabel"
            :icon="Printer" circle/>
      </template>
      <print-custom-label-x-j-two id="childLabel"
                                  :faceOrientation="labelRow.faceOrientation"
@@ -419,7 +438,10 @@
        destroy-on-close
        style="width: 75%;height:75% ">
      <template #header="{ close, titleId, titleClass }">
        <el-button v-print="printContent" :icon="Printer" circle />
        <el-button
            v-print="printContent"
            @click="printCount"
            :icon="Printer" circle />
      </template>
      <print-process
          id="child"
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProcessCardController.java
@@ -404,4 +404,16 @@
        return Result.seccess(flowCardService.updateProcessSv(processId,technologyNumber,orderId,process,object));
    }
    @ApiOperation("工程打印标签次数修改")
    @PostMapping("/updateProjectLabelPrintCount/{projectNo}")
    public Result updateProjectLabelPrintCount(@PathVariable String projectNo){
        return Result.seccess(flowCardService.updateProjectLabelPrintCount(projectNo));
    }
    @ApiOperation("工程打印标签次数修改")
    @PostMapping("/updateProjectProcessPrintCount/{projectNo}")
    public Result updateProjectProcessPrintCount(@PathVariable String projectNo){
        return Result.seccess(flowCardService.updateProjectProcessPrintCount(projectNo));
    }
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/FlowCardMapper.java
@@ -204,4 +204,12 @@
    Boolean updateOrderProcessMp(String orderId, String number, String technologyNumber, String orderprocess);
    List<FlowCard> getFlowCardListPrintProject(String printProject);
    Integer updateProjectLabelPrintCount(String projectNo);
    Integer selectProjectLabelPrintCount(String projectNo);
    Integer updateProjectProcessPrintCount(String projectNo);
    Integer selectProjectProcessPrintCount(String projectNo);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/FlowCardService.java
@@ -962,6 +962,16 @@
    }
    public Integer updateProjectLabelPrintCount(String projectNo) {
        flowCardMapper.updateProjectLabelPrintCount(projectNo);
        return flowCardMapper.selectProjectLabelPrintCount(projectNo);
    }
    public Integer updateProjectProcessPrintCount(String projectNo) {
        flowCardMapper.updateProjectProcessPrintCount(projectNo);
        return flowCardMapper.selectProjectProcessPrintCount(projectNo);
    }
}
north-glass-erp/src/main/resources/mapper/pp/FolwCard.xml
@@ -484,7 +484,7 @@
    </select>
    <select id="selectPrintFlowCard">
        select project_no,glass_total,glass_total_area
        select project_no,glass_total,glass_total_area,labelPrintNum,processPrintNum
        from pp.optimize_project
        where date(create_time)>=#{selectTime1} and date(create_time) &lt;= #{selectTime2}
          and state >= 20
@@ -2647,4 +2647,22 @@
        GROUP BY fc.process_id, ogd.technology_number
        order by fc.process_id, ogd.technology_number
    </select>
    <update id="updateProjectLabelPrintCount">
       update optimize_project set labelPrintNum=labelPrintNum+1 where project_no=#{projectNo}
    </update>
    <select id="selectProjectLabelPrintCount">
        select labelPrintNum from optimize_project where project_no=#{projectNo}
    </select>
    <update id="updateProjectProcessPrintCount">
        update optimize_project set processPrintNum=processPrintNum+1 where project_no=#{projectNo}
    </update>
    <select id="selectProjectProcessPrintCount">
        select processPrintNum from optimize_project where project_no=#{projectNo}
    </select>
</mapper>
north-glass-erp/src/main/resources/mapper/pp/ReportingWork.xml
@@ -343,10 +343,10 @@
    </select>
    <select id="selectGlassProcessNum" resultType="java.lang.Integer">
        select
        if((d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num)&lt; 0,
        ifnull(if((d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num)&lt; 0,
           0,
           (d.reporting_work_num_count+ifnull(c.reworkNumSum,0)-b.reporting_work_num_count-b.broken_num)
            )
            ),0)
        from flow_card as a
        left join sd.order_process_detail as b
        on