修饰审核二级页面
This commit is contained in:
		
							parent
							
								
									4229d9a236
								
							
						
					
					
						commit
						ad1108ae23
					
				| 
						 | 
				
			
			@ -17,7 +17,14 @@ export function getAuditInfo(query) {
 | 
			
		|||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//修试审核二级-通过,驳回
 | 
			
		||||
export function auditPass(data) {
 | 
			
		||||
  return request({
 | 
			
		||||
    url: '/material/repair_audit_details',
 | 
			
		||||
    method: 'put',
 | 
			
		||||
    data: data,
 | 
			
		||||
  })
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -127,7 +127,7 @@
 | 
			
		|||
        label="已出库数量"
 | 
			
		||||
        align="center"
 | 
			
		||||
        prop="alNum"
 | 
			
		||||
        width="80px"
 | 
			
		||||
        width="90px"
 | 
			
		||||
        :show-overflow-tooltip="true"
 | 
			
		||||
      >
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
| 
						 | 
				
			
			@ -309,13 +309,13 @@
 | 
			
		|||
          </template>
 | 
			
		||||
        </el-table-column>
 | 
			
		||||
      </el-table>
 | 
			
		||||
      <!-- <pagination
 | 
			
		||||
      <pagination
 | 
			
		||||
        v-show="dialogTotal > 0"
 | 
			
		||||
        :total="dialogTotal"
 | 
			
		||||
        :page.sync="dialogQuery.pageNum"
 | 
			
		||||
        :limit.sync="dialogQuery.pageSize"
 | 
			
		||||
        :page.sync="queryOutInfo.pageNum"
 | 
			
		||||
        :limit.sync="queryOutInfo.pageSize"
 | 
			
		||||
        @pagination="getDialogList"
 | 
			
		||||
      /> -->
 | 
			
		||||
      />
 | 
			
		||||
    </el-dialog>
 | 
			
		||||
 | 
			
		||||
    <!-- 查看弹窗 -->
 | 
			
		||||
| 
						 | 
				
			
			@ -488,8 +488,7 @@
 | 
			
		|||
          :show-overflow-tooltip="true"
 | 
			
		||||
        />
 | 
			
		||||
      </el-table>
 | 
			
		||||
    </el-dialog>
 | 
			
		||||
    <!-- <pagination
 | 
			
		||||
      <pagination
 | 
			
		||||
        v-show="outTotal > 0"
 | 
			
		||||
        :total="outTotal"
 | 
			
		||||
        :page.sync="outQuery.pageNum"
 | 
			
		||||
| 
						 | 
				
			
			@ -498,7 +497,7 @@
 | 
			
		|||
      />
 | 
			
		||||
    </el-dialog>
 | 
			
		||||
 | 
			
		||||
   <!-- 验收单弹窗 -->
 | 
			
		||||
    <!-- 验收单弹窗 -->
 | 
			
		||||
    <el-dialog
 | 
			
		||||
      :title="title"
 | 
			
		||||
      :visible.sync="openPrint"
 | 
			
		||||
| 
						 | 
				
			
			@ -825,6 +824,7 @@ export default {
 | 
			
		|||
      total: 0,
 | 
			
		||||
      ViewTotal: 0,
 | 
			
		||||
      outTotal: 0,
 | 
			
		||||
      dialogTotal: 0,
 | 
			
		||||
      // 弹出层标题
 | 
			
		||||
      title: "",
 | 
			
		||||
      typeList: [],
 | 
			
		||||
| 
						 | 
				
			
			@ -935,6 +935,7 @@ export default {
 | 
			
		|||
    getDialogList() {
 | 
			
		||||
      outInfoList(this.queryOutInfo.id).then((response) => {
 | 
			
		||||
        this.getListOutInfo = response.data.leaseApplyDetailsList;
 | 
			
		||||
        // this.dialogTotal = response.
 | 
			
		||||
        // this.loading = false;
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,7 +4,6 @@
 | 
			
		|||
      :model="maForm"
 | 
			
		||||
      ref="maForm"
 | 
			
		||||
      size="small"
 | 
			
		||||
      :rules="rules"
 | 
			
		||||
      :inline="true"
 | 
			
		||||
      label-width="120px"
 | 
			
		||||
    >
 | 
			
		||||
| 
						 | 
				
			
			@ -48,17 +47,17 @@
 | 
			
		|||
        <el-button
 | 
			
		||||
          type="success"
 | 
			
		||||
          plain
 | 
			
		||||
          icon="el-icon-download"
 | 
			
		||||
          icon="el-icon-check"
 | 
			
		||||
          size="mini"
 | 
			
		||||
          @click="handlePassAll"
 | 
			
		||||
          >合格</el-button
 | 
			
		||||
          >通过</el-button
 | 
			
		||||
        >
 | 
			
		||||
      </el-col>
 | 
			
		||||
      <el-col :span="1.5">
 | 
			
		||||
        <el-button
 | 
			
		||||
          type="warning"
 | 
			
		||||
          type="danger"
 | 
			
		||||
          plain
 | 
			
		||||
          icon="el-icon-download"
 | 
			
		||||
          icon="el-icon-close"
 | 
			
		||||
          size="mini"
 | 
			
		||||
          @click="handleFailAll"
 | 
			
		||||
          >驳回</el-button
 | 
			
		||||
| 
						 | 
				
			
			@ -71,18 +70,23 @@
 | 
			
		|||
      row-key="id"
 | 
			
		||||
      @selection-change="handleSelectionChange"
 | 
			
		||||
    >
 | 
			
		||||
      <el-table-column type="selection" width="55" align="center" />
 | 
			
		||||
      <el-table-column
 | 
			
		||||
        type="selection"
 | 
			
		||||
        width="55"
 | 
			
		||||
        align="center"
 | 
			
		||||
        :selectable="selectable"
 | 
			
		||||
      />
 | 
			
		||||
      <el-table-column label="序号" align="center" type="index" />
 | 
			
		||||
      <el-table-column
 | 
			
		||||
        label="类型名称"
 | 
			
		||||
        align="center"
 | 
			
		||||
        prop="maTypeName"
 | 
			
		||||
        prop="specificationType"
 | 
			
		||||
        :show-overflow-tooltip="true"
 | 
			
		||||
      />
 | 
			
		||||
      <el-table-column
 | 
			
		||||
        label="规格型号"
 | 
			
		||||
        align="center"
 | 
			
		||||
        prop="typeName"
 | 
			
		||||
        prop="machineTypeName"
 | 
			
		||||
        :show-overflow-tooltip="true"
 | 
			
		||||
      />
 | 
			
		||||
      <el-table-column
 | 
			
		||||
| 
						 | 
				
			
			@ -95,41 +99,73 @@
 | 
			
		|||
      <el-table-column
 | 
			
		||||
        label="退料数量"
 | 
			
		||||
        align="center"
 | 
			
		||||
        prop="storageNum"
 | 
			
		||||
        prop="scrapNum"
 | 
			
		||||
        :show-overflow-tooltip="true"
 | 
			
		||||
      >
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <el-table-column
 | 
			
		||||
        label="已修数量"
 | 
			
		||||
        align="center"
 | 
			
		||||
        prop="preNum"
 | 
			
		||||
        prop="repairedNum"
 | 
			
		||||
        :show-overflow-tooltip="true"
 | 
			
		||||
      />
 | 
			
		||||
      <el-table-column
 | 
			
		||||
        label="待修数量"
 | 
			
		||||
        align="center"
 | 
			
		||||
        prop="alNum"
 | 
			
		||||
        prop="waitNum"
 | 
			
		||||
        :show-overflow-tooltip="true"
 | 
			
		||||
      />
 | 
			
		||||
      >
 | 
			
		||||
        <template slot-scope="scope">
 | 
			
		||||
          <div>
 | 
			
		||||
            {{ scope.row.repairNum - scope.row.repairedNum }}
 | 
			
		||||
          </div>
 | 
			
		||||
        </template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <el-table-column
 | 
			
		||||
        label="管理模式"
 | 
			
		||||
        align="center"
 | 
			
		||||
        prop="alNum"
 | 
			
		||||
        :show-overflow-tooltip="true"
 | 
			
		||||
      />
 | 
			
		||||
 | 
			
		||||
      <el-table-column
 | 
			
		||||
        label="审核状态"
 | 
			
		||||
        align="center"
 | 
			
		||||
        prop="status"
 | 
			
		||||
        :show-overflow-tooltip="true"
 | 
			
		||||
      >
 | 
			
		||||
        <template slot-scope="scope">
 | 
			
		||||
          <div v-if="scope.row.status == '0'" style="color: #e6a23c">
 | 
			
		||||
            {{ "未审核" }}
 | 
			
		||||
          </div>
 | 
			
		||||
          <div v-if="scope.row.status == '1'" style="color: #67c23a">
 | 
			
		||||
            {{ "已审核" }}
 | 
			
		||||
          </div>
 | 
			
		||||
          <div v-if="scope.row.status == '2'" style="color: #f56c6c">
 | 
			
		||||
            {{ "驳回" }}
 | 
			
		||||
          </div>
 | 
			
		||||
          <!-- <div v-else style="color: red;"></div> -->
 | 
			
		||||
        </template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
      <el-table-column label="操作" align="center" width="300">
 | 
			
		||||
        <template slot-scope="scope">
 | 
			
		||||
          <el-button
 | 
			
		||||
            size="mini"
 | 
			
		||||
            style="margin-bottom: 10px"
 | 
			
		||||
            type="primary"
 | 
			
		||||
            v-if="scope.row.status == '0'"
 | 
			
		||||
            @click="handlePass(scope.row)"
 | 
			
		||||
            >通过
 | 
			
		||||
          </el-button>
 | 
			
		||||
 | 
			
		||||
          <el-button size="mini" type="danger" @click="handleFail(scope.row)"
 | 
			
		||||
          <el-button
 | 
			
		||||
            size="mini"
 | 
			
		||||
            type="danger"
 | 
			
		||||
            @click="handleFail(scope.row)"
 | 
			
		||||
            v-if="scope.row.status == '0'"
 | 
			
		||||
            >驳回
 | 
			
		||||
          </el-button>
 | 
			
		||||
          <div v-if="scope.row.status != '0'">-</div>
 | 
			
		||||
        </template>
 | 
			
		||||
      </el-table-column>
 | 
			
		||||
    </el-table>
 | 
			
		||||
| 
						 | 
				
			
			@ -144,7 +180,7 @@
 | 
			
		|||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { getAuditInfo } from "@/api/repair/testExamine";
 | 
			
		||||
import { getAuditInfo, auditPass } from "@/api/repair/testExamine";
 | 
			
		||||
import { getToken } from "@/utils/auth";
 | 
			
		||||
export default {
 | 
			
		||||
  name: "QueryTools",
 | 
			
		||||
| 
						 | 
				
			
			@ -191,6 +227,8 @@ export default {
 | 
			
		|||
      projectList: [],
 | 
			
		||||
      // 表格数据
 | 
			
		||||
      equipmentList: [],
 | 
			
		||||
      passTemp: [],
 | 
			
		||||
      faliTemp: [],
 | 
			
		||||
      // 选中数组
 | 
			
		||||
      ids: [],
 | 
			
		||||
      // 非单个禁用
 | 
			
		||||
| 
						 | 
				
			
			@ -216,9 +254,25 @@ export default {
 | 
			
		|||
    this.getTaskInfo();
 | 
			
		||||
  },
 | 
			
		||||
  methods: {
 | 
			
		||||
    //是否可用勾选框
 | 
			
		||||
    selectable(row) {
 | 
			
		||||
      if (row.status == "0") {
 | 
			
		||||
        return true;
 | 
			
		||||
      } else {
 | 
			
		||||
        return false;
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    // 多选框选中数据
 | 
			
		||||
    handleSelectionChange(selection) {
 | 
			
		||||
      this.passTemp = [];
 | 
			
		||||
      this.failTemp = [];
 | 
			
		||||
      this.ids = selection.map((item) => item.id);
 | 
			
		||||
      selection.forEach((item) => {
 | 
			
		||||
        this.passTemp.push({ id: item.id, status: "1" });
 | 
			
		||||
      });
 | 
			
		||||
      selection.forEach((item) => {
 | 
			
		||||
        this.failTemp.push({ id: item.id, status: "2" });
 | 
			
		||||
      });
 | 
			
		||||
      this.single = selection.length != 1;
 | 
			
		||||
      this.multiple = !selection.length;
 | 
			
		||||
    },
 | 
			
		||||
| 
						 | 
				
			
			@ -232,23 +286,29 @@ export default {
 | 
			
		|||
        this.loading = false;
 | 
			
		||||
      });
 | 
			
		||||
    },
 | 
			
		||||
    //单个通过
 | 
			
		||||
    handlePass(row) {
 | 
			
		||||
      const param = [];
 | 
			
		||||
      param.push({ id: row.id, status: "1" });
 | 
			
		||||
      this.$modal
 | 
			
		||||
        .confirm("是否确认合格所选择的数据项?")
 | 
			
		||||
        .confirm("是否确认通过所选择的数据项?")
 | 
			
		||||
        .then(function () {
 | 
			
		||||
          // return applySend(row.id);
 | 
			
		||||
          return auditPass(param);
 | 
			
		||||
        })
 | 
			
		||||
        .then(() => {
 | 
			
		||||
          this.getTaskInfo();
 | 
			
		||||
          this.$modal.msgSuccess("合格成功");
 | 
			
		||||
          this.$modal.msgSuccess("通过成功");
 | 
			
		||||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    //单个驳回
 | 
			
		||||
    handleFail(row) {
 | 
			
		||||
      const param = [];
 | 
			
		||||
      param.push({ id: row.id, status: "2" });
 | 
			
		||||
      this.$modal
 | 
			
		||||
        .confirm("是否确认驳回所选择的数据项?")
 | 
			
		||||
        .then(function () {
 | 
			
		||||
          // return applySend(row.id);
 | 
			
		||||
          return auditPass(param);
 | 
			
		||||
        })
 | 
			
		||||
        .then(() => {
 | 
			
		||||
          this.getTaskInfo();
 | 
			
		||||
| 
						 | 
				
			
			@ -256,6 +316,7 @@ export default {
 | 
			
		|||
        })
 | 
			
		||||
        .catch(() => {});
 | 
			
		||||
    },
 | 
			
		||||
    //多个通过
 | 
			
		||||
    handlePassAll() {
 | 
			
		||||
      if (this.ids.length == 0) {
 | 
			
		||||
        this.$alert("请至少勾选一条审核数据", "提示", {
 | 
			
		||||
| 
						 | 
				
			
			@ -264,14 +325,15 @@ export default {
 | 
			
		|||
        });
 | 
			
		||||
        return;
 | 
			
		||||
      } else {
 | 
			
		||||
        // applySendAll(this.sendTemp).then((response) => {
 | 
			
		||||
        //   if (response.code == 200) {
 | 
			
		||||
        //     this.$modal.msgSuccess("合格成功");
 | 
			
		||||
        //   }
 | 
			
		||||
        //  this.getTaskInfo();
 | 
			
		||||
        // });
 | 
			
		||||
        auditPass(this.passTemp).then((response) => {
 | 
			
		||||
          if (response.code == 200) {
 | 
			
		||||
            this.$modal.msgSuccess("通过成功");
 | 
			
		||||
          }
 | 
			
		||||
          this.getTaskInfo();
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
    //多个驳回
 | 
			
		||||
    handleFailAll() {
 | 
			
		||||
      if (this.ids.length == 0) {
 | 
			
		||||
        this.$alert("请至少勾选一条审核数据", "提示", {
 | 
			
		||||
| 
						 | 
				
			
			@ -280,12 +342,12 @@ export default {
 | 
			
		|||
        });
 | 
			
		||||
        return;
 | 
			
		||||
      } else {
 | 
			
		||||
        // applySendAll(this.sendTemp).then((response) => {
 | 
			
		||||
        //   if (response.code == 200) {
 | 
			
		||||
        //     this.$modal.msgSuccess("驳回成功");
 | 
			
		||||
        //   }
 | 
			
		||||
        //  this.getTaskInfo();
 | 
			
		||||
        // });
 | 
			
		||||
        auditPass(this.failTemp).then((response) => {
 | 
			
		||||
          if (response.code == 200) {
 | 
			
		||||
            this.$modal.msgSuccess("驳回成功");
 | 
			
		||||
          }
 | 
			
		||||
          this.getTaskInfo();
 | 
			
		||||
        });
 | 
			
		||||
      }
 | 
			
		||||
    },
 | 
			
		||||
  },
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue