86134
2023-11-11 4652431ce329b4dec6c4dcc0758d5c4ff97e0666
src/views/product/workbench/productoutput-table.vue
@@ -1,25 +1,14 @@
<template>
  <div
    class="productoutput-div"
    style="padding:0px 14px;height: 100%;overflow: auto;"
  >
  <div class="productoutput-div" style="padding:0px 14px;height: 100%;overflow: auto;">
    <div class="product-output-header">
      <div style="height:28px;line-height:28px;">
        <el-divider class="pane-divider" direction="vertical"></el-divider
        ><span style="font-size:14px;font-weight:bold">产出记录列表</span>
        <el-divider class="pane-divider" direction="vertical"></el-divider><span
          style="font-size:14px;font-weight:bold">产出记录列表</span>
      </div>
    </div>
    <ttable
      :table="table"
      @handleSelectionChange="handleSelectionChange"
      @currentChange="handleCurrentChange"
      :uploadInfo="uploadInfo"
      :prelang="prelang"
      :options="options"
      :ajaxFun="ajaxFun"
      :paramObj="paramObj"
      ref="productOutputForCheckTable"
    >
    <ttable :table="table" @handleSelectionChange="handleSelectionChange" @currentChange="handleCurrentChange"
      :uploadInfo="uploadInfo" :prelang="prelang" :options="options" :ajaxFun="ajaxFun" :paramObj="paramObj"
      ref="productOutputForCheckTable">
      <template #toolbar></template>
    </ttable>
@@ -177,12 +166,27 @@
      </el-col>
    </el-row> -->
    <!-- 弹窗, 手动报检 -->
    <qualityTestApplyForm
      v-if="qualityTestApplyVisible"
      ref="qualityTestApply"
      @refreshDataList="getData"
      :applyPartList="multipleSelection"
    />
    <el-dialog title="原材料投入" :visible.sync="dialogVisible" width="40%">
      <el-table :data="tableData" style="width: 100%;" height="30em" border empty-text="暂无数据">
        <el-table-column label="序号" type="index"></el-table-column>
        <el-table-column prop="partNo" label="零件编号" width="180">
        </el-table-column>
        <el-table-column prop="partName" label="零件名称" :show-overflow-tooltip="true" width="180">
        </el-table-column>
        <el-table-column prop="unit" label="单位" min-width="60"></el-table-column>
        <el-table-column prop="inputQuantity" label="使用数量">
          <template v-slot="scope">
            <el-input v-model="scope.row.inputQuantity"></el-input>
          </template>
        </el-table-column>
      </el-table>
      <span slot="footer" class="dialog-footer">
        <el-button @click="dialogVisible = false">取 消</el-button>
        <el-button type="primary" @click="rawMaterialApiUpdate">确 定</el-button>
      </span>
    </el-dialog>
    <qualityTestApplyForm v-if="qualityTestApplyVisible" ref="qualityTestApply" @refreshDataList="getData"
      :applyPartList="multipleSelection" />
  </div>
</template>
<style lang="scss" scoped>
@@ -193,11 +197,13 @@
  justify-content: space-between;
  align-items: center;
}
.pane-divider {
  width: 4px;
  background-color: #4283ee;
}
.productoutput-div >>> .inspection-btn {
.productoutput-div>>>.inspection-btn {
  background-image: -webkit-linear-gradient(139deg, #5f6eef 0%, #2783ff 100%);
  background-image: -moz-linear-gradient(139deg, #5f6eef 0%, #2783ff 100%);
  background-image: linear-gradient(139deg, #5f6eef 0%, #2783ff 100%);
@@ -206,26 +212,30 @@
  border-radius: 15px;
  padding: 6px 15px;
}
.productoutput-div >>> .inspection-btn span {
.productoutput-div>>>.inspection-btn span {
  margin-left: 3px;
}
.productoutput-div >>> .commonTable .el-table__header th {
.productoutput-div>>>.commonTable .el-table__header th {
  background: #599ef4 !important;
  color: #fff !important;
  border: 0px !important;
}
.productoutput-div >>> .feed-btn-return {
.productoutput-div>>>.feed-btn-return {
  background: url('/img/workbench/icon_bj.png') center center no-repeat;
  background-size: cover;
  font-size: 14px;
}
.productoutput-div >>> .feed-btn-return:before {
.productoutput-div>>>.feed-btn-return:before {
  content: '报';
  font-size: 14px;
  visibility: hidden;
}
.productoutput-div >>> .common-table-div {
.productoutput-div>>>.common-table-div {
  margin: 0px 20px 0px !important;
}
@@ -238,7 +248,8 @@
  border-radius: 15px;
  padding: 6px 15px;
}
.auto-judgment-btn >>> span {
.auto-judgment-btn>>>span {
  margin-left: 3px;
}
</style>
@@ -252,7 +263,9 @@
  saveSelfSampleItem,
  getReportSampleForSelf,
  putReportSampleItem,
  autoJudgmentSelf
  autoJudgmentSelf,
  rawMaterialApi,
  rawMaterialApiUpdate
} from '@/api/quality/report'
import ttable from '@/views/common/ztt-table'
import qualityTestApplyForm from './qualitytestapply-form'
@@ -275,6 +288,7 @@
  },
  data() {
    return {
      tableData: [],
      paramObj: { workstationId: 0 },
      ajaxFun: fetchOutputList,
      addOrUpdateVisible: false,
@@ -317,7 +331,7 @@
            isSearch: true,
            searchInfoType: 'text'
          },
          {
          /* {
            minWidth: '160',
            prop: 'systemNo',
            label: '系统编号',
@@ -334,11 +348,11 @@
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          }, */
          {
            minWidth: '160',
            prop: 'outBatchNo',
            label: 'SN号',
            label: '序列号',
            sort: true,
            isTrue: true,
            isSearch: true,
@@ -371,7 +385,11 @@
            isSearch: true,
            searchInfoType: 'text',
            formatter: (row, column, cellValue) => {
              return cellValue.substring(1, cellValue.length - 2)
              try{
                        return cellValue.substring(1, cellValue.length - 1)
                     }catch(e){
                        return null
                     }
            }
          },
          {
@@ -392,7 +410,7 @@
            isSearch: true,
            searchInfoType: 'datetimerange'
          },
          {
          /* {
            minWidth: '160',
            prop: 'startMeterMark',
            label: '起始米标',
@@ -409,7 +427,7 @@
            isTrue: true,
            isSearch: true,
            searchInfoType: 'text'
          },
          }, */
          {
            minWidth: '100',
            prop: 'productQty',
@@ -538,7 +556,22 @@
          //     icon: 'feed-btn-return',
          //     fun: this.qualityApply
          //   }
        ]
        ],
        /* operator: [
          {
            text: '投入',
            icon: 'el-icon-circle-plus-outline',
            type: 'text',
            size: 'small',
            fun: this.showHandleDiago
          }
        ],
        operatorConfig: {
          fixed: 'right',
          label: '操作',
          width: 100,
          minWidth: 100
        } */
      },
      booleanOptions: [
        { value: true, label: '是' },
@@ -565,7 +598,8 @@
        isMoTestStandard: true,
        testStandardNo: '',
        reportSampleItemList: []
      }
      },
      dialogVisible: false
    }
  },
  components: {
@@ -574,7 +608,7 @@
  },
  watch: {
    workstationId: {
      handler: function(newVal, oldVal) {
      handler: function (newVal, oldVal) {
        this.createdData()
      }
    },
@@ -639,6 +673,23 @@
    this.createdData()
  },
  methods: {
    rawMaterialApiUpdate() {
      rawMaterialApiUpdate(this.tableData).then(res => {
        this.$message.success('原材料投入修改成功')
        this.dialogVisible = false;
      })
    },
    showHandleDiago(row) {
      this.dialogVisible = true
      this.tableData = []
      rawMaterialApi(row.id).then(res => {
        if(res.data.data[0] == null){
          this.tableData = []
        } else {
          this.tableData = res.data.data
        }
      })
    },
    // 获取数据列表
    getData() {
      this.$refs.productOutputForCheckTable.getDataList()
@@ -656,7 +707,6 @@
      })
    },
    handleSelectionChange(val) {
      console.log(val, 'ASSSS')
      this.multipleSelection = val
    },
    handleCurrentChange(val) {