gaoluyang
2025-03-16 e8f6ef1f20770838b37d7a739d108c09831a34ab
src/views/business/materialOrder/index.vue
@@ -5,46 +5,46 @@
        <el-form :model="entity" ref="entity" size="small" :inline="true">
          <el-form-item label="批号" prop="updateBatchNo">
            <el-input v-model="entity.updateBatchNo" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
              @keyup.enter.native="goSearch">
            </el-input>
          </el-form-item>
          <el-form-item label="委托编号" prop="entrustCode">
          <el-form-item label="委托编号" prop="entrustCode" v-if="tabIndex !== 0">
            <el-input v-model="entity.entrustCode" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
              @keyup.enter.native="goSearch">
            </el-input>
          </el-form-item>
          <el-form-item label="零件号" prop="partNo">
            <el-input v-model="entity.partNo" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
              @keyup.enter.native="goSearch">
            </el-input>
          </el-form-item>
          <el-form-item label="零件描述" prop="partDesc">
            <el-input v-model="entity.partDesc" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
              @keyup.enter.native="goSearch">
            </el-input>
          </el-form-item>
          <el-form-item>
            <el-button v-if="tabIndex === 2 || tabIndex === 3 || tabIndex === 4"
              :icon="!more ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" style="color: #3A7BFA;" type="text"
              @click="more = !more">{{ !more ? '更多' : '收起' }}</el-button>
            <el-button size="mini" type="primary" @click="refreshTable()">查询</el-button>
            <el-button size="mini" type="primary" @click="goSearch">查询</el-button>
            <el-button size="mini" @click="refresh()">重置</el-button>
          </el-form-item>
          <el-form-item label="供应商名称" prop="supplierName"
            v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
            <el-input v-model="entity.supplierName" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
              @keyup.enter.native="goSearch">
            </el-input>
          </el-form-item>
          <el-form-item label="样品型号" prop="sampleModel"
            v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
            <el-input v-model="entity.sampleModel" clearable placeholder="请输入" size="small"
              @keyup.enter.native="refreshTable">
              @keyup.enter.native="goSearch">
            </el-input>
          </el-form-item>
          <el-form-item label="检验状态" prop="inspectStatus"
            v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
            <el-select v-model="entity.inspectStatus" clearable size="small" @change="refreshTable()">
            <el-select v-model="entity.inspectStatus" clearable size="small" @change="goSearch">
              <el-option v-for="(a, i) in inspectStatusList" :key="i" :label="a.label" :value="a.value"></el-option>
            </el-select>
          </el-form-item>
@@ -76,6 +76,7 @@
        <!--待下单-->
        <div class="table">
          <lims-table :tableData="tableData" :column="column" v-if="tabIndex === 0" @pagination="pagination"
                      ref="tableData"
            :rowClassName="changeRowClass" :height="'calc(100vh - 290px)'" key="tableData" :page="page"
            :tableLoading="tableLoading"></lims-table>
        </div>
@@ -109,8 +110,7 @@
    <el-dialog :visible.sync="exemptionVisible" title="确认免检" width="42%">
      <div style="display: flex">
        <span style="width: 90px; line-height: 32px">规格型号:</span>
        <el-input v-model="exemptionInfo.partDetail" clearable placeholder="请输入" size="small"
          @keyup.enter.native="refreshTable"></el-input>
        <el-input v-model="exemptionInfo.partDetail" clearable placeholder="请输入" size="small"></el-input>
      </div>
      <span slot="footer" class="dialog-footer">
        <el-row>
@@ -195,6 +195,7 @@
  concessionRelease,
  getIfsByAll,
  getIfsByOver,
  getIfsByQuarter,
  getIfsByStateOne,
  rawAllExport,
  rawOrderRelease,
@@ -204,10 +205,11 @@
  updateEntrustCode
} from "@/api/business/rawMaterialOrder";
import { getWarehouseSubmit } from "@/api/business/materialInspection";
import {mapGetters} from "vuex";
// import Inspection from "../do/b1-inspect-order-plan/Inspection.vue";
export default {
  name: "b1-material-inspection-order",
  name: "MaterialOrder",
  // import 引入的组件需要注入到对象中才能使用
  components: { limsTable, DownFileDialog, FilesLookVisible, DataLookVisible, ShowInfo, PrintDialog },
  data() {
@@ -245,7 +247,6 @@
        { label: '报检时间', prop: 'declareDate' },
        {
          dataType: 'action',
          fixed: 'right',
          label: '操作',
          operation: [
            {
@@ -822,11 +823,26 @@
      outLoading: false
    }
  },
  computed: {
    ...mapGetters(['nickName'])
  },
  mounted() {
    this.refreshTable()
  },
  activated () {
    this.refreshTable()
  },
  // 方法集合
  methods: {
    // 点击查询回调
    goSearch() {
      this.page.current = 1
      this.page1.current = 1
      this.page2.current = 1
      this.page3.current = 1
      this.page4.current = 1
      this.refreshTable()
    },
    // 查询回调
    refreshTable() {
      if (this.tabIndex === 0) {
@@ -906,7 +922,7 @@
        this.entity.endDeclareDate = ''
      }
      const params = { ...this.entity, ...this.page4 }
      getIfsByOver(params).then(res => {
      getIfsByQuarter(params).then(res => {
        this.tableLoading4 = false
        if (res.code === 200) {
          this.tableData4 = res.data.records
@@ -969,10 +985,7 @@
      if (row.userName) {
        inspectorList = row.userName.split(',')
      }
      let user = JSON.parse(localStorage.getItem('user'))
      if (user) {
        inspectorList.push(user.name)
      }
      inspectorList.push(this.nickName)
      this.inspectorList = inspectorList
      this.insInfo = row
      this.InspectInfoDialog = true
@@ -1019,16 +1032,34 @@
      }).catch(() => { })
    },
    viewInsInfo0() {
      this.state = 3;
      this.typeSource = this.insInfo.typeSource
      this.orderId = this.insInfo.enterOrderId
      let inspectorList = []
      inspectorList.push(this.nickName)
      this.InspectInfoDialog = false
      this.$router.push({
        path: "/inspectionTask/inspection",
        query: {
          sonLaboratory: '原材料',
          state: 3,
          typeSource: this.insInfo.typeSource,
          orderId: this.insInfo.enterOrderId,
          inspectorList: inspectorList,
        },
      })
    },
    viewInsInfo1() {
      this.state = 3;
      this.typeSource = this.insInfo.typeSource
      this.orderId = this.insInfo.quarterOrderId
      let inspectorList = []
      inspectorList.push(this.nickName)
      this.InspectInfoDialog = false
      this.$router.push({
        path: "/inspectionTask/inspection",
        query: {
          sonLaboratory: '原材料',
          state: 3,
          typeSource: this.insInfo.typeSource,
          orderId: this.insInfo.quarterOrderId,
          inspectorList: inspectorList,
        },
      })
    },
    goback() {
      this.state = 0
@@ -1174,7 +1205,7 @@
          repealQuarterRawOrder({ quarterOrderId: this.insOrderRow.quarterOrderId }).then(res => {
            if (res.code === 200) {
              this.$message.success('撤销成功')
              this.refreshTable('page')
              this.refreshTable()
            }
          })
        }).catch(() => { })