春风项目四线(合箱线、总装线)
懒羊羊
2024-01-15 f119894e61a56d584c140b40baa6a4420dc8e8d6
上传配方
已修改3个文件
77 ■■■■■ 文件已修改
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java 7 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReceivingServices.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-ui/src/views/main/om/productionOrde/index.vue 67 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
jcdm-main/src/main/java/com/jcdm/main/om/productionOrde/controller/OmProductionOrdeInfoController.java
@@ -1,5 +1,6 @@
package com.jcdm.main.om.productionOrde.controller;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
@@ -25,6 +26,8 @@
import com.jcdm.common.enums.BusinessType;
import com.jcdm.common.utils.poi.ExcelUtil;
import com.jcdm.common.core.page.TableDataInfo;
import static org.apache.commons.lang3.SystemUtils.getUserName;
/**
 * 生产工单Controller
@@ -103,7 +106,9 @@
            bsOrderScheduling.setOrderNo(omProductionOrdeInfo.getWorkOrderNo());
            bsOrderScheduling.setModel(omProductionOrdeInfo.getTypeZ());
            bsOrderScheduling.setEngineNo(omProductionOrdeInfo.getTypeZ() + " "+dateTimeRule+ StringUtils.leftPad(String.valueOf(startCode),3, "0"));
            bsOrderScheduling.setStatus("1");
            bsOrderScheduling.setProductionStatus("1");
            bsOrderScheduling.setOperator(getUserName());
//            bsOrderScheduling.setOperateTime(String.valueOf(new Date()));
            bsOrderSchedulingService.insertBsOrderScheduling(bsOrderScheduling);
            startCode ++;
        }
jcdm-main/src/main/java/com/jcdm/main/webservice/service/ReceivingServices.java
@@ -97,11 +97,12 @@
        ItemList itemList = gson.fromJson(jsonStr, ItemList.class);
        for (Item item : itemList.getItem()) {
            OmProductionOrdeInfo ordeInfo = new OmProductionOrdeInfo();
            ordeInfo.setProductCode(item.getPLNBEZ());
            ordeInfo.setProductName(item.getMAKTX());
            ordeInfo.setLineCode(item.getFEVOR());
            ordeInfo.setWorkOrderNo(item.getAUFNR());
            ordeInfo.setPlanQty((long) Double.parseDouble(item.getPSMNG()));
            ordeInfo.setProductionNotice(item.getZSTAT());
            ordeInfo.setProductionNotice(item.getZSCTZD());
            ordeInfo.setTypeZ(item.getFERTH());
            ordeInfo.setCreateUser(item.getZUSER());
            ordeInfo.setCreateTime(item.getZDATE());
jcdm-ui/src/views/main/om/productionOrde/index.vue
@@ -146,25 +146,25 @@
        </el-table-column>
        <el-table-column label="需求数量" align="center" prop="planQty">
        </el-table-column>
        <el-table-column label="物料类型" width="140" align="center" prop="productCode">
        <el-table-column label="产品编号" width="140" align="center" prop="productCode">
        </el-table-column>
        <el-table-column label="实际数量" width="160" align="center" prop="actualQty">
        </el-table-column>
<!--        <el-table-column label="实际数量" width="160" align="center" prop="actualQty">-->
<!--        </el-table-column>-->
        <el-table-column label="工单状态" align="center" prop="orderStatus">
          <template slot-scope="scope">
            <dict-tag :options="dict.type.order_state" :value="scope.row.orderStatus"/>
          </template>
        </el-table-column>
        <el-table-column label="工厂" align="center" prop="workshopCode">
        </el-table-column>
        <el-table-column label="仓库" align="center">
        </el-table-column>
<!--        <el-table-column label="工厂" align="center" prop="workshopCode">-->
<!--        </el-table-column>-->
<!--        <el-table-column label="仓库" align="center">-->
<!--        </el-table-column>-->
        <el-table-column label="产线" align="center" prop="lineCode">
        </el-table-column>
        <el-table-column label="订单类型" align="center">
        </el-table-column>
        <el-table-column label="ZWS" align="center">
        </el-table-column>
<!--        <el-table-column label="订单类型" align="center">-->
<!--        </el-table-column>-->
<!--        <el-table-column label="ZWS" align="center">-->
<!--        </el-table-column>-->
<!--        <el-table-column label="工艺流程" width="140" align="center" prop="routeCode">-->
<!--        </el-table-column>-->
@@ -194,7 +194,7 @@
        </el-table-column>
        <el-table-column width="160" label="通知生成日期" align="center" prop="createTime">
        </el-table-column>
        <el-table-column label="成品描述" width="160" align="center" prop="productName">
        <el-table-column label="成品描述" width="320" align="center" prop="productName">
        </el-table-column>
<!--        <el-table-column label="修改人" width="80" align="center" prop="updateUser">-->
<!--        </el-table-column>-->
@@ -341,7 +341,7 @@
        <i class="el-icon-s-order"></i>
        {{titleName}}
      </span>
      <el-form ref="form" inline  :model="form"  :rules="CreateRules"label-width="80px">
      <el-form ref="form" inline  :model="form" :rules="CreateRules" label-width="80px">
        <el-form-item   label="种类" prop="typeZ">
          <el-input disabled v-model="form.typeZ"  placeholder="请输入种类" />
        </el-form-item>
@@ -353,12 +353,11 @@
                          placeholder="请选择日期" @input="handleCodeChange">
          </el-date-picker>
        </el-form-item>
        <el-form-item   label="日期规则" prop="dateTimeRule" hidden>
          <el-input  v-model="form.dateTimeRule"/>
        <el-form-item class="hidden-form-item" label="日期规则" prop="dateTimeRule">
          <el-input v-model="form.dateTimeRule"/>
        </el-form-item>
        <el-form-item   label="起始编号" prop="startCode">
          <el-input  v-model="form.startCode"  placeholder="请输入起始编号" @input="handleCodeChange"/>
          <el-input type="number" v-model="form.startCode"  placeholder="请输入起始编号" @input="handleCodeChange"/>
        </el-form-item>
        <el-form-item   label="起止编号" prop="startEndCode">
          <el-input disabled v-model="form.startEndCode"/>
@@ -388,6 +387,7 @@
  updateOrderScheduling,
  generateNumbers
} from "@/api/main/bs/orderScheduling/orderScheduling";
import {listMaterial} from "@/api/main/bs/material/material";
export default {
  name: "ProductionOrde",
@@ -452,6 +452,11 @@
        adds:null,
        productionNotice: null,
      },
      materialQueryParams: {
        pageNum: 1,
        pageSize: 10,
        materialCode: null,
      },
      // 表单参数
      form: {},
@@ -475,12 +480,19 @@
        year: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],
        dateTime: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],
        startCode: [
          { required: true, message: "不能为空", trigger: "blur" }
        ],
      },
      change: {
        day: '',
        month: '',
        year: '',
      },
      markNo: '',
    };
  },
  created() {
@@ -519,12 +531,12 @@
        }
        //日
        dateTimeRule = dateTimeRule + day;
        dateTimeRule = dateTimeRule + this.markNo;
        this.form.dateTimeRule = dateTimeRule;
        //赋值起始编码
        this.form.startEndCode = dateTimeRule + startCode + "----" + dateTimeRule + String(parseInt(startCode) + parseInt(planQty)-1).padStart(3, '0') ;
        this.form.startEndCode = dateTimeRule +  startCode + "----" + dateTimeRule + String(parseInt(startCode) + parseInt(planQty)-1).padStart(3, '0') ;
      }
    },
    getProductionNotice(){
      getProductionNotice(this.queryParams).then(response => {
@@ -704,14 +716,16 @@
      const id = Row.id || this.ids
      getProductionOrde(id).then(response => {
        console.log(response.data)
        console.log(response.data.productCode)
        this.materialQueryParams.materialCode = response.data.productCode;
        listMaterial(this.materialQueryParams).then(response => {
          this.markNo = response.rows[0].mark
        });
        this.form = response.data;
        this.Createopen = true;
        this.titleName = "生成箱体条码";
        // return Array.from({ length: parseInt(this.actualQty) }, (_, index) => index + 1);
      });
      this.$modal.msgSuccess(Row.actualQty);
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
@@ -753,7 +767,7 @@
          if (this.form.id != null) {
            addOrderSchedulingForBoxCode(this.form).then(response => {
              this.$modal.msgSuccess("保存成功");
              this.open = false;
              this.Createopen = false;
              this.getList();
            });
          }
@@ -782,8 +796,7 @@
};
</script>
<style lang="scss" scoped>
//::v-deep .el-dialog__header{
//  /*background-color: #f8f8f8;*/
//  background-color: #f8f8f9;
//}
.hidden-form-item {
  display: none;
}
</style>