维修管理
This commit is contained in:
		
							parent
							
								
									e782a52db5
								
							
						
					
					
						commit
						051b4cb8c1
					
				| 
						 | 
				
			
			@ -253,7 +253,7 @@
 | 
			
		|||
        <el-button type="primary" size="mini" @click="saveCodeDialog"
 | 
			
		||||
          >保存</el-button
 | 
			
		||||
        >
 | 
			
		||||
        <el-button type="normal" size="mini" @click="openCode=false"
 | 
			
		||||
        <el-button type="normal" size="mini" @click="cancelCodeDialog"
 | 
			
		||||
          >取消</el-button
 | 
			
		||||
        >
 | 
			
		||||
      </div>
 | 
			
		||||
| 
						 | 
				
			
			@ -653,6 +653,7 @@
 | 
			
		|||
                    placeholder="请输入内部维修数量"
 | 
			
		||||
                    maxlength="20"
 | 
			
		||||
                    type="number"
 | 
			
		||||
                    min="0"
 | 
			
		||||
                    style="width: 265px"
 | 
			
		||||
                    @input="waitRepairCount"
 | 
			
		||||
                  />
 | 
			
		||||
| 
						 | 
				
			
			@ -753,6 +754,7 @@
 | 
			
		|||
                    placeholder="请输入返厂维修数量"
 | 
			
		||||
                    maxlength="20"
 | 
			
		||||
                    type="number"
 | 
			
		||||
                    min="0"
 | 
			
		||||
                    style="width: 265px"
 | 
			
		||||
                    @input="waitRepairCount"
 | 
			
		||||
                  />
 | 
			
		||||
| 
						 | 
				
			
			@ -885,6 +887,7 @@
 | 
			
		|||
                  maxlength="20"
 | 
			
		||||
                  type="number"
 | 
			
		||||
                  style="width: 250px"
 | 
			
		||||
                  min="0"
 | 
			
		||||
                  @input="waitRepairCount"
 | 
			
		||||
                />
 | 
			
		||||
              </el-form-item>
 | 
			
		||||
| 
						 | 
				
			
			@ -1115,9 +1118,13 @@ export default {
 | 
			
		|||
        repairNum:0
 | 
			
		||||
      },
 | 
			
		||||
      formMiddle: {
 | 
			
		||||
        supplierId:undefined,
 | 
			
		||||
        repairNum:0
 | 
			
		||||
      },
 | 
			
		||||
      formRight:{
 | 
			
		||||
        scrapNum:0,
 | 
			
		||||
        scrapType:undefined,
 | 
			
		||||
        scrapReason:undefined,
 | 
			
		||||
        scrapNum:0
 | 
			
		||||
      },
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1139,13 +1146,13 @@ export default {
 | 
			
		|||
          },
 | 
			
		||||
        ],
 | 
			
		||||
 | 
			
		||||
        supplierId: [
 | 
			
		||||
          {
 | 
			
		||||
            required: true,
 | 
			
		||||
            message: "请选择厂家",
 | 
			
		||||
            trigger: "change",
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
        // supplierId: [
 | 
			
		||||
        //   {
 | 
			
		||||
        //     required: true,
 | 
			
		||||
        //     message: "请选择厂家",
 | 
			
		||||
        //     trigger: "change",
 | 
			
		||||
        //   },
 | 
			
		||||
        // ],
 | 
			
		||||
 | 
			
		||||
        partPrice: [
 | 
			
		||||
          {
 | 
			
		||||
| 
						 | 
				
			
			@ -1214,14 +1221,10 @@ export default {
 | 
			
		|||
      //待维修数量
 | 
			
		||||
      disrepairNumTemp: undefined,
 | 
			
		||||
      //数量维修是否能保存
 | 
			
		||||
      flagSave: false, 
 | 
			
		||||
      flagSave: true, 
 | 
			
		||||
      //合格勾选对象数组
 | 
			
		||||
      idsList:[],
 | 
			
		||||
      //
 | 
			
		||||
      supplierId:undefined,
 | 
			
		||||
      //
 | 
			
		||||
      remark:undefined,
 | 
			
		||||
      //
 | 
			
		||||
      //一级页面传来的id
 | 
			
		||||
      taskIdTemp:undefined,
 | 
			
		||||
    };
 | 
			
		||||
  },
 | 
			
		||||
| 
						 | 
				
			
			@ -1365,6 +1368,10 @@ export default {
 | 
			
		|||
          this.resetForm("formLeft");
 | 
			
		||||
          this.resetForm("formMiddle")
 | 
			
		||||
          this.resetForm("formRight")
 | 
			
		||||
          this.partItems =  [{ partType: "", partNum: "", isCharge: "" }],
 | 
			
		||||
          this.partItemsMiddle= [
 | 
			
		||||
            { partName: "", partNum: "", partPrice: "0", isCharge: "" },
 | 
			
		||||
          ],
 | 
			
		||||
          this.openNum = true;
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
| 
						 | 
				
			
			@ -1406,6 +1413,21 @@ export default {
 | 
			
		|||
      this.openCode = false;
 | 
			
		||||
      // console.log(this.equipmentList)
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    // 编码维修弹窗取消
 | 
			
		||||
   async cancelCodeDialog(){
 | 
			
		||||
      let param = {
 | 
			
		||||
        taskId: this.repairRow.taskId,
 | 
			
		||||
        keyword: "",
 | 
			
		||||
      };
 | 
			
		||||
      this.taskIdTemp = this.repairRow.taskId;
 | 
			
		||||
      const res = await getAppRepairMaTypeList(param);
 | 
			
		||||
      this.equipmentList = res.data;
 | 
			
		||||
      this.equipmentList.forEach((e) => {
 | 
			
		||||
        e.disrepairNum = Number(e.repairNum) - Number(e.repairedNum);
 | 
			
		||||
      }); 
 | 
			
		||||
      this.openCode = false;
 | 
			
		||||
    },
 | 
			
		||||
    //编码维修弹窗文件上传前
 | 
			
		||||
    beforeFileUpload(row) {
 | 
			
		||||
      this.fileData = row;
 | 
			
		||||
| 
						 | 
				
			
			@ -1484,6 +1506,7 @@ export default {
 | 
			
		|||
    // 待报废保存按钮
 | 
			
		||||
   async saveSubmit() {
 | 
			
		||||
      this.uploadKey = Date.now();
 | 
			
		||||
 | 
			
		||||
      if(this.fileList.length!=0){
 | 
			
		||||
        await  this.getImaUpload(),
 | 
			
		||||
        await this.addWaitRepairPic(this.scrapForm);
 | 
			
		||||
| 
						 | 
				
			
			@ -1494,8 +1517,9 @@ export default {
 | 
			
		|||
      this.scrapRowData.codeScrapRepairPartList.push(this.scrapForm)
 | 
			
		||||
 | 
			
		||||
      this.openScrap = false;
 | 
			
		||||
      this.reset();
 | 
			
		||||
      // this.reset();
 | 
			
		||||
    },
 | 
			
		||||
    
 | 
			
		||||
    //上传文件库
 | 
			
		||||
    async getImaUpload(){
 | 
			
		||||
        this.fileListTemp = [];
 | 
			
		||||
| 
						 | 
				
			
			@ -1673,6 +1697,7 @@ export default {
 | 
			
		|||
      console.log('row',row)
 | 
			
		||||
      this.backRowData = row;
 | 
			
		||||
      this.backTableList = [];
 | 
			
		||||
      this.resetForm("backForm")
 | 
			
		||||
      if(row.backTableList){
 | 
			
		||||
      this.backForm = {
 | 
			
		||||
        //返场厂家
 | 
			
		||||
| 
						 | 
				
			
			@ -1680,13 +1705,6 @@ export default {
 | 
			
		|||
        //备注
 | 
			
		||||
        remark: row.backTableList[0].remark,
 | 
			
		||||
      };
 | 
			
		||||
      }else{
 | 
			
		||||
        this.backForm = {
 | 
			
		||||
        //返场厂家
 | 
			
		||||
        supplierId: null,
 | 
			
		||||
        //备注
 | 
			
		||||
        remark: '',
 | 
			
		||||
      }; 
 | 
			
		||||
       }
 | 
			
		||||
      if (
 | 
			
		||||
        this.backRowData.backTableList &&
 | 
			
		||||
| 
						 | 
				
			
			@ -1776,6 +1794,7 @@ export default {
 | 
			
		|||
 | 
			
		||||
    // 待报废-打开
 | 
			
		||||
    openScrapDialog(row) {
 | 
			
		||||
      console.log('row11',row)
 | 
			
		||||
      this.scrapRowData = row;
 | 
			
		||||
      this.scrapForm = {};
 | 
			
		||||
      this.openScrap = true;
 | 
			
		||||
| 
						 | 
				
			
			@ -1926,22 +1945,29 @@ export default {
 | 
			
		|||
    saveCancelAll(){
 | 
			
		||||
      this.fileList=[];
 | 
			
		||||
      this.fileListTemp=[];
 | 
			
		||||
      this.resetForm("formLeft");
 | 
			
		||||
      this.resetForm("formMiddle")
 | 
			
		||||
      this.resetForm("formRight")
 | 
			
		||||
      this.partItems =  [{ partType: "", partNum: "", isCharge: "" }],
 | 
			
		||||
      this.partItemsMiddle = [
 | 
			
		||||
        { partName: "", partNum: "", partPrice: "0", isCharge: "" },
 | 
			
		||||
      ],
 | 
			
		||||
      this.openNum=false;
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
    //待维修数量限制统计
 | 
			
		||||
    waitRepairCount(){
 | 
			
		||||
      console.log('this.formLeft.repairNum',this.formLeft.repairNum)
 | 
			
		||||
      console.log('this.formMiddle.repairNum',this.formMiddle.repairNum)
 | 
			
		||||
      console.log('this.formRight.scrapNum',this.formRight.scrapNum)
 | 
			
		||||
      console.log('this.disrepairNumTemp',this.disrepairNumTemp)
 | 
			
		||||
      if((Number(this.formLeft.repairNum) + Number(this.formMiddle.repairNum)+ Number(this.formRight.scrapNum)) >this.disrepairNumTemp){
 | 
			
		||||
        this.flagSave = true;
 | 
			
		||||
        this.$message.error("输入的数字之和大于"+this.disrepairNumTemp);
 | 
			
		||||
      }else if((Number(this.formLeft.repairNum) + Number(this.formMiddle.repairNum)+ Number(this.formRight.scrapNum))==0){
 | 
			
		||||
        this.flagSave = true;
 | 
			
		||||
        this.$message.error("输入的数字之和不能为0");
 | 
			
		||||
      }else{
 | 
			
		||||
         this.flagSave = false;
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
  },
 | 
			
		||||
};
 | 
			
		||||
</script>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue