zouyu
昨天 2e4a6c4526b6c22808d5877f2050da852bfaebe7
src/views/business/materialOrder/index.vue
@@ -48,7 +48,7 @@
              <el-option v-for="(a, i) in inspectStatusList" :key="i" :label="a.label" :value="a.value"></el-option>
            </el-select>
          </el-form-item>
          <el-form-item label="下发时间" prop="date" v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
          <el-form-item label="报检时间" prop="date" v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
            <el-date-picker v-model="entity.date" end-placeholder="结束日期" format="yyyy-MM-dd" placeholder="选择日期" @change="goSearch"
              range-separator="至" size="small" start-placeholder="开始日期" type="daterange" value-format="yyyy-MM-dd">
            </el-date-picker>
@@ -201,7 +201,8 @@
  repealEnterRawOrder,
  repealQuarterRawOrder,
  revokeInspectionReport,
  updateEntrustCode
  updateEntrustCode,
  getOrderCountByIfsId
} from "@/api/business/rawMaterialOrder";
import { getWarehouseSubmit } from "@/api/business/materialInspection";
import {mapGetters} from "vuex";
@@ -239,7 +240,7 @@
            }
          }
        },
        { label: '抵达的采购数量', prop: 'qtyArrived' },
        { label: '抵达的采购数量', prop: 'purQtyInStore' },
        { label: '单位', prop: 'buyUnitMeas' },
        { label: '订单号', prop: 'orderNo' },
        { label: '接收时间', prop: 'receiverDate' },
@@ -319,7 +320,7 @@
            }
          }
        },
        { label: '抵达的采购数量', prop: 'qtyArrived' },
        { label: '抵达的采购数量', prop: 'purQtyInStore' },
        { label: '单位', prop: 'buyUnitMeas' },
        { label: '订单号', prop: 'orderNo' },
        { label: '接收时间', prop: 'receiverDate' },
@@ -404,7 +405,7 @@
          }
        },
        { label: '订单号', prop: 'orderNo' },
        { label: '抵达的采购数量', prop: 'qtyArrived' },
        { label: '抵达的采购数量', prop: 'purQtyInStore' },
        { label: '下发时间', prop: 'sendTime' },
        { label: '批号', prop: 'updateBatchNo' },
        { label: '零件号', prop: 'partNo' },
@@ -590,7 +591,7 @@
          }
        },
        { label: '订单号', prop: 'orderNo' },
        { label: '抵达的采购数量', prop: 'qtyArrived' },
        { label: '抵达的采购数量', prop: 'purQtyInStore' },
        { label: '下发时间', prop: 'sendTime' },
        { label: '批号', prop: 'updateBatchNo' },
        { label: '零件号', prop: 'partNo' },
@@ -714,7 +715,7 @@
          }
        },
        { label: '订单号', prop: 'orderNo' },
        { label: '抵达的采购数量', prop: 'qtyArrived' },
        { label: '抵达的采购数量', prop: 'purQtyInStore' },
        { label: '下发时间', prop: 'sendTime' },
        { label: '批号', prop: 'updateBatchNo' },
        { label: '零件号', prop: 'partNo' },
@@ -1190,11 +1191,21 @@
    },
    // 下单
    playOrder(row) {
      this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: { orderType: 0, customsInspection: row, active: 1 } });
      //查询当前批次是否已经下单
      getOrderCountByIfsId(row.id).then(res=>{
        if(res.code===200 && res.data>0){
          this.$message.warning('该批次已下单,请勿重复下单')
          this.refreshTable('page')
          return
        }
        this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: {isOutsourcing:'f', orderType: 0, customsInspection: row, active: 1 } });
      }).catch(error=>{
        console.error(error)
      })
    },
    // 季度检验下单
    playOrderSec(row) {
      this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: { orderType: 1, customsInspection: row, active: 1 } });
      this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: {isOutsourcing:'f', orderType: 1, customsInspection: row, active: 1 } });
    },
    // 点击样品名称查看详情
    selectAllByOne(row) {
@@ -1351,7 +1362,14 @@
    // 导出
    handleOut() {
      this.outLoading = true
      rawAllExport({ ...this.entity }).then(res => {
      let params = {}
      if (this.multipleSelection.length > 0) {
        params.ids = this.multipleSelection.map(item => item.id).join(',');
      } else {
        params = {...this.entity}
      }
      params.orderType = "01raw";
      rawAllExport(params).then(res => {
        this.outLoading = false
        const blob = new Blob([res], { type: 'application/octet-stream' });
        this.$download.saveAs(blob, '原材料检测信息导出.xlsx');
@@ -1379,6 +1397,7 @@
    // 切换下单tab表格
    handleTab(m) {
      this.tabIndex = m;
      this.multipleSelection = []
      this.refreshTable()
    },
    // 表格选择方法
@@ -1386,8 +1405,11 @@
      this.multipleSelection = val
    },
    changeRowClass({ row, rowIndex }) {
      if (row.isFirst == 1) {
        return 'highlight-danger-row-border'
      if (row.isFirst != 1 && row.lotBatchNoHasRepeat) {
        return 'highlight-warning-row-border'
      }
      if(row.isFirst == 1){
        return "highlight-danger-row-border";
      }
      return ''
    },