spring
2025-03-20 4ff4e1d736dff5434fcd28508df83af99b54a0d4
src/views/structural/capabilityAndLaboratory/capabilityComponents/bindPartDialog.vue
@@ -38,10 +38,10 @@
      </div>
      <span slot="footer" class="dialog-footer">
        <el-button @click="closeBindPartDialog">取 消</el-button>
        <el-button type="primary" @click="submitBind" :loading="bindLoad">确 认</el-button>
        <el-button type="primary" @click="submitBind">确 认</el-button>
      </span>
    </el-dialog>
    <el-dialog title="修改记录" :visible.sync="editItem" width="600px">
    <el-dialog title="修改记录" :visible.sync="editItem" width="900px">
      <div class="body" v-if="editItem">
        <lims-table :tableData="editList" :column="editColumn" height="460px" :tableLoading="tableLoading0" :key="2"
          :page="editPage" @pagination="editPagination"></lims-table>
@@ -54,9 +54,16 @@
import limsTable from "@/components/Table/lims-table.vue";
import {
  addProductPart,
  addTestObjectPart, deleteProductPart, deleteTestObjectPart,
  addTestObjectPart,
  deleteProductPart,
  deleteTestObjectPart,
  selectByProductId,
  selectByTestObjectId, updateProductPart, updateTestObjectPart, inspectionItems, productPartReview
  selectByTestObjectId,
  updateProductPart,
  updateTestObjectPart,
  inspectionItems,
  productPartReview,
  productPartLogList
} from "@/api/structural/structureTestObjectPart";
export default {
@@ -93,6 +100,7 @@
        { label: '零件号', prop: 'partNo' },
        { label: '颜色', prop: 'color' },
        { label: '色标', prop: 'colorCode' },
        { label: '进厂检验项', prop: 'inspectionItem' },
        {
          label: '状态', prop: 'review',
          dataType: "tag",
@@ -136,7 +144,7 @@
                    productPartReview({ id: row.id }).then((res) => {
                      if (res.code == 200) {
                        this.$message.success("复核通过");
                        this.getList()();
                        this.getList();
                      }
                    });
                  })
@@ -207,12 +215,23 @@
      editItem: false,
      editList: [],
      editColumn: [
        { label: '零件号', prop: 'inspectionItem' },
        { label: '颜色', prop: 'inspectionItemSubclass' },
        { label: '色标', prop: 'ask' },
        { label: '进厂检验项', prop: 'askTell' },
        { label: '修改时间', prop: 'method' },
        { label: '修改人', prop: 'method' },
        { label: '零件号', prop: 'partNo' },
        { label: '颜色', prop: 'color' },
        { label: '色标', prop: 'colorCode' },
        { label: '进厂检验项', prop: 'inspectionItem' },
        {
          label: '状态', prop: 'review',
          dataType: "tag",
          formatType: (params) => {
            if (params == '待复核') {
              return 'danger'
            } else {
              return 'success'
            }
          },
        },
        { label: '修改时间', prop: 'operTime' },
        { label: '修改人', prop: 'operName' },
      ],
      editPage: {
        total: 0,
@@ -220,6 +239,7 @@
        current: 0,
      },
      tableLoading0: false,
      currentPart: {},//当前零件
      // mutilSelect: []
    }
  },
@@ -240,11 +260,21 @@
      })
    },
    // 修改记录
    lookList() {
    lookList(row) {
      this.currentPart = row;
      this.editItem = true;
      this.getEditList()
    },
    getEditList() { },
    getEditList() {
      this.tableLoading0 = true
      productPartLogList({ id: this.currentPart.id, ...this.editPage }).then(res => {
        this.tableLoading0 = false
        if (res.code == 200) {
          this.editList = res.data.records
          this.editPage.total = res.data.total
        }
      })
    },
    editPagination() {
      this.editPage.current = page;
      this.editPage.size = limit;
@@ -282,6 +312,8 @@
      if (type === 'edit') {
        this.bindPartData = this.HaveJson(row)
        this.bindPartData.inspectionItem = this.bindPartData.inspectionItem ? this.bindPartData.inspectionItem.split(',') : []
      } else {
        this.bindPartData = {}
      }
    },
    // 提交零件绑定
@@ -294,12 +326,14 @@
            color: this.bindPartData.color,
            colorCode: this.bindPartData.colorCode,
            partNo: this.bindPartData.partNo,
            id: this.bindPartData.id,
            inspectionItem: this.bindPartData.inspectionItem && this.bindPartData.inspectionItem.length > 0 ? this.bindPartData.inspectionItem.join(',') : ''
          } : {
            productId: this.currentRow.id,
            color: this.bindPartData.color,
            colorCode: this.bindPartData.colorCode,
            partNo: this.bindPartData.partNo,
            id: this.bindPartData.id,
            inspectionItem: this.bindPartData.inspectionItem && this.bindPartData.inspectionItem.length > 0 ? this.bindPartData.inspectionItem.join(',') : ''
          }
          this.bindLoad = true
@@ -319,6 +353,7 @@
              })
            } else {
              addProductPart(params).then(res => {
                this.bindLoad = false
                if (res.code === 200) {
                  this.resetForm('bindPartData')
                  this.addBindPartDialog = false