guoyuji
2024-07-16 352ea6a79d6d1e470d53b4a4f3800d183d0f40d4
Merge branch 'master' of http://bore.pub:10439/r/ERP_override
6个文件已修改
124 ■■■■ 已修改文件
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue 86 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java 13 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ProductionSchedulingMapper.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
north-glass-erp/northglass-erp/src/views/pp/processCard/PrintFlowCard.vue
@@ -448,6 +448,10 @@
            ElMessage.warning(t('searchOrder.msgList.checkOrder'))
            return
          }
          if(printMerge.value===null ||printMerge.value===''){
            ElMessage.warning('请填入需要合并的层')
            return
          }
          let id = ""
          for (let i = 0; i < selectRecords.length; i++) {
north-glass-erp/northglass-erp/src/views/pp/processCard/ProductionScheduling.vue
@@ -130,6 +130,7 @@
    //禁用删除、审核按钮
    gridOptions.toolbarConfig.buttons[0].disabled = true
    gridOptions.toolbarConfig.buttons[1].disabled = true
    gridOptions.toolbarConfig.buttons[2].disabled = true
  } else {
    ElMessage.warning(res.msg)
  }
@@ -160,14 +161,16 @@
        //禁用删除、审核按钮
        gridOptions.toolbarConfig.buttons[0].disabled = true
        gridOptions.toolbarConfig.buttons[1].disabled = true
        gridOptions.toolbarConfig.buttons[2].disabled = true
        //启用保存
        gridOptions.toolbarConfig.buttons[2].disabled = false
        gridOptions.toolbarConfig.buttons[3].disabled = false
      }else{
        //启用删除、审核按钮
        gridOptions.toolbarConfig.buttons[0].disabled = false
        gridOptions.toolbarConfig.buttons[1].disabled = false
        gridOptions.toolbarConfig.buttons[2].disabled = false
        //禁用保存
        gridOptions.toolbarConfig.buttons[2].disabled = true
        gridOptions.toolbarConfig.buttons[3].disabled = true
      }
    } else {
@@ -381,6 +384,7 @@
    buttons: [
      {code: 'delete', name: t('basicData.delete'), status: 'primary'},
      {code: 'review', name: t('basicData.review'), status: 'primary'},
      {code: 'cancelReview', name: t('basicData.cancelReview'), status: 'primary'},
      {code: 'save', name: t('processCard.scheduling'), status: 'primary', icon: 'vxe-icon-save'},
    ],
    import: false,
@@ -478,35 +482,33 @@
              ElMessage.warning("请勾选排产数据")
              return;
            }
            selectRecords.forEach(item => {
              if(item.reviewStatus=="已审核"){
                ElMessage.warning("不能删除已审核数据")
                return;
            const type = await VXETable.modal.confirm('您确定要删除该数据?')
            if (type === 'confirm') {
              let schedulingData = ref({
                scheduling: selectRecords,
              })
              request.post("/productionScheduling/deleteScheduling", schedulingData.value).then((res) => {
                if (res.code == 200) {
                  ElMessage.success("删除成功")
                  location.reload();
                } else {
                  ElMessage.warning(res.msg)
              }
            });
            alert(1111)
            // const type = await VXETable.modal.confirm('您确定要删除该数据?')
            // if (type === 'confirm') {
            //   let schedulingData = ref({
            //     scheduling: selectRecords,
            //   })
            //
            //   request.post("/productionScheduling/deleteScheduling", schedulingData.value).then((res) => {
            //     if (res.code == 200) {
            //       ElMessage.success("删除成功")
            //       location.reload();
            //     } else {
            //       ElMessage.warning(res.msg)
            //
            //     }
            //   })
            // }
              })
            }
          }
          return;
        }
        case 'review': {
          const $table = xGrid.value
          const selectRecords = $table.getCheckboxRecords()
          let date = form.date1
          let selectProcesses = processVal.value
          let selectState = stateValue.value
          let inputVal = form.orderId
          if ($table) {
            if (selectRecords.length == 0) {
              ElMessage.warning("请勾选排产数据")
@@ -519,6 +521,34 @@
            request.post("/productionScheduling/examineScheduling", schedulingData.value).then((res) => {
              if (res.code == 200) {
                ElMessage.success("审核成功")
                router.push({
                  path: '/main/processCard/ProductionScheduling',
                  query: {random: Math.random()}
                })
              } else {
                ElMessage.warning(res.msg)
              }
            })
          }
          return;
        }
        case 'cancelReview': {
          const $table = xGrid.value
          const selectRecords = $table.getCheckboxRecords()
          if ($table) {
            if (selectRecords.length == 0) {
              ElMessage.warning("请勾选排产数据")
              return;
            }
            let schedulingData = ref({
              scheduling: selectRecords,
              userName: username//审核人
            })
            request.post("/productionScheduling/cancelReviewScheduling", schedulingData.value).then((res) => {
              if (res.code == 200) {
                ElMessage.success("反审成功")
                location.reload();
              } else {
                ElMessage.warning(res.msg)
@@ -592,7 +622,6 @@
  const selectRecords = $grid.getCheckboxRecords()
  let selectState = stateValue.value
  selectRecords.forEach((selectRecords) => {
    console.log(selectRecords)
    if (selectRecords.schedulingQuantity > selectRecords.pendingProductionQuantity) {
      ElMessage.warning("排产数量不能大于待排产数量")
      //禁用保存按钮
@@ -602,7 +631,6 @@
}
const checkBoxConfig = {
  checkMethod: ({ row }) => {
    console.log(row)
    if (row['reviewStatus']==="已审核"){
      return row.disable
    }else{
@@ -667,10 +695,10 @@
        v-bind="gridOptions"
        v-on="gridEvents"
        @filter-change="filterChanged"
        @checkbox-change="determineNum"
        :checkbox-config="checkBoxConfig"
    >
      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
      <!--      :checkbox-config="checkBoxConfig"  @checkbox-change="determineNum"-->
      <!--      下拉显示所有信息插槽-->
      <template #content="{ row }">
        <ul class="expand-wrapper">
north-glass-erp/src/main/java/com/example/erp/controller/pp/ProductionSchedulingController.java
@@ -95,4 +95,17 @@
        }
    }
    @ApiOperation("排版反审接口")
    @SaCheckPermission("ProductionScheduling.review")
    @PostMapping("/cancelReviewScheduling")
    public Result cancelReviewScheduling( @RequestBody Map<String,Object>  object){
        if(productionSchedulingService.cancelReviewSchedulingSv(object)){
            return Result.seccess();
        }else {
            throw new ServiceException(Constants.Code_500,"反审失败");
        }
    }
}
north-glass-erp/src/main/java/com/example/erp/mapper/pp/ProductionSchedulingMapper.java
@@ -30,5 +30,7 @@
    Map<String, Integer> getOkPageTotal(Integer offset, Integer pageSize, String selectTime1, String selectTime2, String orderId, String processes, ProductionScheduling productionScheduling);
    Boolean cancelReviewSchedulingMp(String schedulingId);
//    Integer selectNumberMp(String orderId, String orderNumber, String processes);
}
north-glass-erp/src/main/java/com/example/erp/service/pp/ProductionSchedulingService.java
@@ -126,4 +126,19 @@
            return false;
        }
    }
    public boolean cancelReviewSchedulingSv(Map<String, Object> object) {
        List<ProductionScheduling> schedulinglist = JSONArray.parseArray(JSONObject.toJSONString(object.get("scheduling")), ProductionScheduling.class);
        if (!schedulinglist.isEmpty()) {
            for (ProductionScheduling productionScheduling : schedulinglist) {
                productionSchedulingMapper.cancelReviewSchedulingMp(productionScheduling.getSchedulingId());
                // System.out.println(productionScheduling.getOrderNumber()+"***"+productionScheduling.getOrderId());
            }
            return true;
        }
        else {
            return false;
        }
    }
}
north-glass-erp/src/main/resources/mapper/pp/ProductionScheduling.xml
@@ -289,4 +289,8 @@
        order by ps.id desc
        limit #{offset},#{pageSize};
    </select>
    <update id="cancelReviewSchedulingMp">
        update production_scheduling set   review_status=0    where scheduling_id = #{schedulingId}
    </update>
</mapper>