gaoluyang
2025-03-05 9e3ed3dd122b0bc65cd232914706012be1e5c2fe
src/views/business/materialOrder/customsInspection.vue
@@ -1,35 +1,35 @@
<template>
  <div class="ins_order_add">
  <div class="app-container">
    <div>
      <el-row class="title">
        <el-col :span="active > 1 && isShowTab ? 5 : 6" style="padding-left: 20px;text-align: left;">采购订单信息</el-col>
        <el-col v-if="active > 1 && isShowTab" :span="4" style="text-align: left;margin-top: 12px">
          <ul class="tab">
      <div class="header">
        <div>
          <span>采购订单信息</span>
          <ul class="tab" v-if="active > 1 && isShowTab">
            <li v-for="(m,i) in dataTitle" :key="i" :class="{active:i===dataIndex}" @click="handleDataTab(m,i)">{{m.label}}</li>
          </ul>
        </el-col>
        <el-col :span="active > 1  && isShowTab ? 15 : 18" style="text-align: right;">
          <el-select v-show="active==1" v-model="template" placeholder="下单模板" size="medium" style="margin-right: 10px;"
                     @change="selectInsOrderTemplateById">
        </div>
        <div>
          <el-select v-show="active==1" v-model="template" placeholder="下单模板" size="small" style="margin-right: 10px;"
                     @change="selectInsOrderTemplateByIdList">
            <el-option v-for="(a, ai) in templates" :key="ai" :label="a.name" :value="a.id">
              <span style="float: left">{{ a.name }}</span>
              <i class="el-icon-delete" style="float: right; color: #66b1ff; font-size: 16px"
                 @click.stop="handleDelete(a)"></i>
            </el-option>
          </el-select>
          <el-button v-show="active==1" size="medium" @click="templateDia=true">
          <el-button v-show="active==1" size="small" @click="templateDia=true">
            <span style="color: #3A7BFA;">保存模板</span>
          </el-button>
          <el-button v-show="active==1 && addObj.orderType === '进厂检验'" :loading="noNeedCheckLoad" size="medium" type="primary" @click="noNeedCheck">免检</el-button>
          <el-button v-show="active==1" :loading="saveLoad" size="medium" type="primary" @click="save">提交</el-button>
          <el-button size="medium" @click="$parent.playOrder(0)">
          <el-button v-show="active==1 && addObj.orderType === '进厂检验'" :loading="noNeedCheckLoad" size="small" type="primary" @click="noNeedCheck">免检</el-button>
          <el-button v-show="active==1" :loading="saveLoad" size="small" type="primary" @click="save">提交</el-button>
          <el-button size="small" @click="goBack">
            <span style="color: #3A7BFA;">返回</span>
          </el-button>
        </el-col>
      </el-row>
        </div>
      </div>
    </div>
    <div class="search">
      <el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="120px">
      <el-form ref="addObj" :inline="true" :model="addObj" :rules="addObjRules" label-width="90px">
        <el-row>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="采购订单号:">
@@ -85,7 +85,7 @@
        <el-row>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="单位:" prop="buyUnitMeas">
              <el-input v-model="addObj.buyUnitMeas" class="addObj-info" disabled size="small"></el-input>
              <el-input v-model="addObj.buyUnitMeas" class="addObj-info" clearable disabled size="small"></el-input>
            </el-form-item>
          </el-col>
          <el-col :span="6">
@@ -97,15 +97,15 @@
          </el-col>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="检验类别:" prop="orderType">
              <el-select v-model="addObj.orderType" :disabled="active>1 || orderType===1" clearable size="small" style="width: 100%">
                <el-option v-for="(a, ai) in checkType" :key="ai" :label="a.label" :value="a.value"></el-option>
              <el-select v-model="addObj.orderType" :disabled="active>1 || orderType==1" clearable size="small" style="width: 100%">
                <el-option v-for="a in dict.type.check_type" :key="a.value" :label="a.label" :value="a.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="规格型号:" placeholder="请填写" prop="partDetail">
              <el-tooltip :content="addObj.partDetail" :disabled="!addObj.partDetail">
                <el-input v-model="addObj.partDetail" :disabled="active > 1" class="addObj-info" size="small"></el-input>
                <el-input v-model="addObj.partDetail" :disabled="active > 1" clearable class="addObj-info" size="small"></el-input>
              </el-tooltip>
            </el-form-item>
          </el-col>
@@ -114,7 +114,7 @@
          <el-col :span="6">
            <el-form-item class="addObj-form-item" label="紧急程度:" placeholder="请选择" prop="type">
              <el-select v-model="addObj.type" :disabled="active>1" class="addObj-info" clearable size="small" style="width: 100%">
                <el-option v-for="(a, ai) in types" :key="ai" :label="a.label" :value="a.value"></el-option>
                <el-option v-for="a in dict.type.urgency_level" :key="a.value" :label="a.label" :value="a.value"></el-option>
              </el-select>
            </el-form-item>
          </el-col>
@@ -142,11 +142,10 @@
      </el-form>
    </div>
    <div>
      <div style="display: flex;flex-direction: row;justify-content: space-between;padding: 5px 0;">
        <div v-if="active==1" style="display: flex;background: transparent;">
          <div class="search_thing">
            <div class="search_label">样品型号:</div>
            <div class="search_input">
      <div style="display: flex;justify-content: space-between;">
        <div v-if="active==1">
          <el-form :inline="true" :model="addObj1" label-width="90px">
            <el-form-item label="样品型号:" style="margin-bottom: 6px">
              <el-select v-model="model" :placeholder="active>1 ? '' : '请输入'"
                         allow-create clearable default-first-option filterable
                         size="small"
@@ -154,29 +153,26 @@
                <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </div>
          </div>
          <div class="search_thing">
            <div class="search_label">检验标准:</div>
            <div class="search_input">
            </el-form-item>
            <el-form-item label="检验标准:">
              <el-select v-model="standardMethodListId" :loading="methodLoad"
                         :placeholder="active>1 ? '' : '请输入'" clearable size="small"
                         @change="changeStandardMethodListId" @focus="methodFocus">
                <el-option v-for="item in methods" :key="item.id" :label="item.code" :value="item.id">
                </el-option>
              </el-select>
            </div>
          </div>
            </el-form-item>
          </el-form>
        </div>
        <div class="search_thing">
          <el-button v-show="active==1" :disabled="sampleList.length === 2" size="medium" type="primary" @click="handleSplitCountNum">拆分</el-button>
        <div style="margin-top: 3px">
          <el-button v-show="active==1" :disabled="sampleList.length === 2" size="small" type="primary" @click="handleSplitCountNum">拆分</el-button>
        </div>
      </div>
      <el-table ref="sampleTable" :data="sampleList"
                border class="el-table sampleTable"
                class="el-table sampleTable"
                highlight-current-row
                max-height="400px" style="margin-top: 10px;"
                max-height="400px"
                tooltip-effect="dark"
                @selection-change="selectSample" @row-click="rowClick">
        <el-table-column v-if="active==1" :selectable="selectable" type="selection" width="65"></el-table-column>
@@ -239,7 +235,7 @@
        </el-table-column>
        <el-table-column align="center" label="待检项数量" prop="quantity" width="105">
          <template slot-scope="scope">
            <el-select v-model="scope.row.quantity" :disabled="active>1|| scope.$index !== 0 || sampleList.length > 1" clearable
            <el-select v-model="scope.row.quantity" disabled clearable
                       size="small">
              <el-option v-for="item in quantityList" :key="item.value" :label="item.label" :value="item.value"></el-option>
            </el-select>
@@ -247,7 +243,7 @@
        </el-table-column>
      </el-table>
      <el-table ref="productTable" v-loading="getProductLoad" :data="productList"
                :row-class-name="tableRowClassName" border
                :row-class-name="tableRowClassName"
                class="el-table"
                max-height="400px"
                style="margin-bottom: 10px;"
@@ -392,7 +388,7 @@
      width="32%">
      <span>{{ dialogMessage }}</span>
      <span slot="footer" class="dialog-footer">
        <el-button type="primary" @click="$parent.playOrder(0)">确 定</el-button>
        <el-button type="primary" @click="dialogVisible= false,closeOpenPage()">确 定</el-button>
      </span>
    </el-dialog>
    <el-dialog
@@ -435,37 +431,34 @@
</template>
<script>
import ValueTable from "@/components/Table/value-table.vue";
import {
  addExemptionOrder,
  addInsOrder,
  addRawMaterOrderTemplate,
  delRawMaterOrderTemplate,
  getInsOrder,
  getUserNow,
  notificationRawOrder, selectRawMaterOrderTemplate,
  selectRawMaterOrderTemplateById,
  selectsStandardMethodByFLSSM,
  selectStandardMethodEnum,
  selectStandardProductList,
  selectStandardTreeListByPartNo
} from "@/api/business/rawMaterialOrder";
export default {
  name: "CustomsInspection",
  components: {
    ValueTable,
  },
  dicts: ['check_type', 'urgency_level'],
  components: {},
  props: {
    active: {
      type: Number,
      default: () => 0
    },
    customsInspection: {
      type: Object,
      default: () => {}
    },
    currentId: {
      type: Number,
      default: () => 0
    },
    orderType: {
      type: Number,
      default: () => 0
    },
    isReport: {
      type: Number,
      default: () => null
    }
  },
  data() {
    return {
      customsInspection: {},
      orderType: '',
      active: 0,
      currentId: 0,
      isReport: '',
      editTable:[], // 区间特殊值填写
      template: null,
      saveLoad: false, // 保存按钮loading
@@ -513,7 +506,7 @@
          { required: true, message: '请填写抽检数量', trigger: 'blur' }
        ],
        partDetail: [
          { required: true, message: '请填写零件描述', trigger: 'blur' }
          { required: true, message: '请填写规格型号', trigger: 'blur' }
        ],
        orderType: [
          { required: true, message: '请选择检验类别', trigger: 'change' }
@@ -556,6 +549,7 @@
      sampleId: null,
      // total: 0,
      totalArr: [],
      addObj1: {},
      model: null,
      standardMethodListId: null,
      inspectionItem:null,
@@ -612,7 +606,6 @@
  watch: {
    sampleList() {
      this.addObj.method = null
      // this.productList = []
    },
    productList: {
      deep: true,
@@ -640,11 +633,25 @@
      this.standardMethodListId = null
    }
  },
  mounted() {
    this.getUserNow() // 获取当前用户信息
    this.selectCheckType() // 查询检验类型
  created() {
    this.active = this.$route.query.active
    this.orderType = this.$route.query.orderType
    this.currentId = this.$route.query.currentId
    this.isReport = this.$route.query.isReport
    this.customsInspection = this.$route.query.customsInspection
    this.getInfo();
  },
  activated() {
    this.active = this.$route.query.active
    this.orderType = this.$route.query.orderType
    this.currentId = this.$route.query.currentId
    this.isReport = this.$route.query.isReport
    this.customsInspection = this.$route.query.customsInspection
    this.getInfo();
  },
  getInfo() {
    this.getUserNowList() // 获取当前用户信息
    this.selectStandardMethods() // 获取检验标准下拉框数据
    this.selectEnumByCategoryForType() // 获取紧急程度下拉框
    this.getInfo() // 获取数据
  },
  methods: {
@@ -687,7 +694,7 @@
    },
    // 获取数据
    getInfo () {
      if (this.active === 2) {
      if (this.active == 2) {
        let orderId = ''
        if (!this.customsInspection.enterOrderId && this.customsInspection.quarterOrderId) {
          this.isShowTab = false
@@ -700,11 +707,11 @@
          orderId = this.dataIndex === 0 ? this.customsInspection.enterOrderId : this.customsInspection.quarterOrderId
        } else if (!this.customsInspection.enterOrderId && !this.customsInspection.quarterOrderId) {
          this.isShowTab = false
          orderId = this.isReport === 1 ? this.customsInspection.insOrderId : this.customsInspection.id
          orderId = this.isReport == 1 ? this.customsInspection.insOrderId : this.customsInspection.id
        }
        // 查看
        // 请求接口,回显数据
        this.$axios.post(this.$api.insOrder.getInsOrder, {
        getInsOrder({
          orderId: orderId
        }).then(res => {
          if (res.code === 200) {
@@ -734,7 +741,7 @@
          }
        })
      } else {
        this.$axios.get(this.$api.rawMaterialOrder.notificationRawOrder+'?ifsInventoryId='+this.customsInspection.id).then(res => {
        notificationRawOrder({ifsInventoryId:this.customsInspection.id}).then(res => {
          if (res.code === 200) {
            if (res.data === 1) {
              this.dialogVisible2 = true
@@ -746,40 +753,35 @@
          }
        })
        // 报检流程
        this.$axios.get(this.$api.materialInspection.selectStandardTreeListByPartNo+'?partNo='+this.customsInspection.partNo).then(res => {
          if (res.code === 200) {
            this.addObj.sample = res.data.label
            this.codeLevel = res.data.code
            this.addObj.qtyArrived = this.customsInspection.qtyArrived
            this.addObj.partNo = this.customsInspection.partNo
            this.addObj.partDetail = this.customsInspection.partDesc
            this.addObj.receiverDate = this.customsInspection.receiverDate
            this.addObj.orderNo = this.customsInspection.orderNo
            this.addObj.declareUser = this.customsInspection.declareUser
            this.addObj.testQuantity = this.customsInspection.testQuantity
            this.addObj.buyUnitMeas = this.customsInspection.buyUnitMeas
            this.addObj.updateBatchNo = this.customsInspection.updateBatchNo
            if (this.orderType === 1) {
              this.addObj.orderType = 'Quarterly inspection'
            }
            const str = res.data.treeName.split('-')
            this.selectTreeTem = str.join(' - ')
            this.selectTree = str.join(' - ')
            this.addListInfo(this.codeLevel, res.data) // 原材料样品是固定的,就默认赋值一条数据,可拆分
            this.selectInsOrderTemplate() // 原材料模板列表查询
          } else {
            this.dialogVisible = true
            this.dialogMessage = res.message
        selectStandardTreeListByPartNo({partNo:this.customsInspection.partNo}).then(res => {
          this.addObj.sample = res.data.label
          this.codeLevel = res.data.code
          this.$set(this.addObj, 'qtyArrived', this.customsInspection.qtyArrived)
          this.$set(this.addObj, 'partNo', this.customsInspection.partNo)
          this.$set(this.addObj, 'receiverDate', this.customsInspection.receiverDate)
          this.$set(this.addObj, 'orderNo', this.customsInspection.orderNo)
          this.$set(this.addObj, 'declareUser', this.customsInspection.declareUser)
          this.$set(this.addObj, 'testQuantity', this.customsInspection.testQuantity)
          this.$set(this.addObj, 'buyUnitMeas', this.customsInspection.buyUnitMeas)
          this.$set(this.addObj, 'updateBatchNo', this.customsInspection.updateBatchNo)
          this.$set(this.addObj, 'partDetail', this.customsInspection.partDesc)
          if (this.orderType == 1) {
            this.$set(this.addObj, 'orderType', 'Quarterly inspection')
          }
          const str = res.data.treeName.split('-')
          this.selectTreeTem = str.join(' - ')
          this.selectTree = str.join(' - ')
          this.addListInfo(this.codeLevel, res.data) // 原材料样品是固定的,就默认赋值一条数据,可拆分
          this.selectInsOrderTemplate() // 原材料模板列表查询
        }).catch(err => {
          console.log('err---', err)
          this.dialogVisible = true
          this.dialogMessage = err.message
        })
      }
    },
    // 查询模板-反显模板
    selectInsOrderTemplateById(e) {
      this.$axios.get(this.$api.materialInspection.selectRawMaterOrderTemplateById + '?id=' + e).then(res => {
        if (res.code == 201) return
    selectInsOrderTemplateByIdList(e) {
      selectRawMaterOrderTemplateById({id: e}).then(res => {
        let obj = JSON.parse(res.data)
        this.sampleList = obj.sampleList;
        this.productList = obj.sampleList[0].insProduct
@@ -795,7 +797,7 @@
          item.insProduct = this.productList
        })
        this.templateLoading = true;
        this.$axios.post(this.$api.materialInspection.addRawMaterOrderTemplate, {
        addRawMaterOrderTemplate({
          partNo: this.addObj.partNo,
          name: this.templateName,
          thing: JSON.stringify({
@@ -803,12 +805,7 @@
            sampleList: sampleList,
            selectTree:this.selectTree
          })
        }, {
          headers: {
            'Content-Type': 'application/json'
          }
        }).then(res => {
          if (res.code == 201) return
          this.templateLoading = false;
          this.templateDia = false;
          this.$message.success('保存成功')
@@ -826,12 +823,7 @@
        cancelButtonText: "取消",
        type: "warning"
      }).then(() => {
        this.$axios.post(this.$api.materialInspection.delRawMaterOrderTemplate, {
          id: row.id
        }).then(res => {
          if (res.code === 201) {
            return
          }
        delRawMaterOrderTemplate({id: row.id}).then(res => {
          this.$message.success('删除成功')
          this.selectInsOrderTemplate()
        }).catch(e => {
@@ -841,8 +833,7 @@
    },
    // 查询模板列表
    selectInsOrderTemplate() {
      this.$axios.get(this.$api.materialInspection.selectRawMaterOrderTemplate+'?partNo='+this.addObj.partNo).then(res => {
        if (res.code == 201) return
      selectRawMaterOrderTemplate({partNo:this.addObj.partNo}).then(res => {
        this.templates = res.data
      })
    },
@@ -911,10 +902,6 @@
        if (valid) {
          if (!this.sampleList.every(m => m.standardMethodListId)) {
            this.$message.error('请选择检验标准')
            return
          }
          if (!this.sampleList.every(m => m.quantity)) {
            this.$message.error('请选择待检项数量')
            return
          }
          const sampleList = this.HaveJson(this.sampleList)
@@ -996,7 +983,6 @@
        item.insProduct = this.productList
      })
      this.getTotal(sampleList)
      const pairing = []
      let trees = this.selectTree.split(" - ")
      if (trees.length < 3) {
        this.$message.error('未选择对象')
@@ -1013,41 +999,36 @@
      this.addObj.model = (trees[4] == undefined ? null : trees[4])
      this.addObj.ifsInventoryId = this.customsInspection.id
      this.noNeedCheckLoad = true
      this.$axios.post(this.$api.rawMaterialOrder.addExemptionOrder, {
        str: JSON.stringify({
          insOrder: this.addObj,
          list: JSON.stringify(sampleList.map(a => {
            if (a.modelNum) {
              // 根据x号判断型号参数与样品型号的拼接位置
              // 例如×4,就为500ML×4;4×,就为4×500ML
              const index = a.modelNum.indexOf('×')
              if (index === 0) {
                a.model = a.model + a.modelNum
              } else if (index === -1) {
                a.model = a.model + '-' + a.modelNum
              } else {
                a.model = a.modelNum + a.model
              }
      addExemptionOrder({
        insOrder: this.addObj,
        sampleList: sampleList.map(a => {
          if (a.modelNum) {
            // 根据x号判断型号参数与样品型号的拼接位置
            // 例如×4,就为500ML×4;4×,就为4×500ML
            const index = a.modelNum.indexOf('×')
            if (index === 0) {
              a.model = a.model + a.modelNum
            } else if (index === -1) {
              a.model = a.model + '-' + a.modelNum
            } else {
              a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum))
              a.model = a.modelNum + a.model
            }
            a.insProduct = a.insProduct.filter(b=>b.state === 1)
            return a
          })),
          pairing: JSON.stringify(pairing)
        })
          } else {
            a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum))
          }
          a.insProduct = a.insProduct.filter(b=>b.state === 1)
          return a
        }),
      }).then(res => {
        this.noNeedCheckLoad = false
        if (res.code == 201) return
        this.noNeedCheckDia = false
        this.$message.success('已提交')
        this.$parent.playOrder(0)
        this.closeOpenPage()
      }).catch(e=>{
        this.noNeedCheckLoad = false
      })
    },
    saveMethod(sampleList){
      const pairing = []
      let trees = this.selectTree.split(" - ")
      if (trees.length < 3) {
        this.$message.error('未选择对象')
@@ -1064,35 +1045,37 @@
      this.addObj.model = (trees[4] == undefined ? null : trees[4])
      this.addObj.ifsInventoryId = this.customsInspection.id
      this.saveLoad = true
      this.$axios.post(this.$api.insOrder.addInsOrder, {
        str: JSON.stringify({
          insOrder: this.addObj,
          list: JSON.stringify(sampleList.map(a => {
            if (a.modelNum) {
              // 根据x号判断型号参数与样品型号的拼接位置
              // 例如×4,就为500ML×4;4×,就为4×500ML
              const index = a.modelNum.indexOf('×')
              if (index === 0) {
                a.model = a.model + a.modelNum
              } else if (index === -1) {
                a.model = a.model + '-' + a.modelNum
              } else {
                a.model = a.modelNum + a.model
              }
      addInsOrder({
        insOrder: this.addObj,
        sampleList: sampleList.map(a => {
          if (a.insProduct.length > 0) {
            a.insProduct.forEach(c => {
              delete c.id
            })
          }
          if (a.modelNum) {
            // 根据x号判断型号参数与样品型号的拼接位置
            // 例如×4,就为500ML×4;4×,就为4×500ML
            const index = a.modelNum.indexOf('×')
            if (index === 0) {
              a.model = a.model + a.modelNum
            } else if (index === -1) {
              a.model = a.model + '-' + a.modelNum
            } else {
              a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum))
              a.model = a.modelNum + a.model
            }
            a.insProduct = a.insProduct.filter(b=>b.state === 1)
            return a
          })),
          pairing: JSON.stringify(pairing)
        })
          } else {
            a.model = a.model + ((a.modelNum == null || a.modelNum == '' || a.modelNum == 'null') ? '' : ('-' + a.modelNum))
          }
          a.insProduct = a.insProduct.filter(b=>b.state === 1)
          return a
        }),
      }).then(res => {
        this.saveLoad = false
        if (res.code == 201) return
        this.$message.success('已提交')
        this.bsm3Dia = false;
        this.$parent.playOrder(0)
        this.closeOpenPage()
      }).catch(e=>{
        this.saveLoad = false
      })
@@ -1427,16 +1410,9 @@
        }
      })
    },
    selectCheckType() {
      this.$axios.post(this.$api.enums.selectEnumByCategory, {
        category: "检验类型"
      }).then(res => {
        this.checkType = res.data
      })
    },
    // 获取当前用户信息
    getUserNow() {
      this.$axios.get(this.$api.user.getUserNow).then(res => {
    getUserNowList() {
      getUserNow().then(res => {
        let selects = res.data
        if (selects == null) return
        this.addObj.userId = selects.id
@@ -1447,7 +1423,7 @@
    },
    // 获取检验标准下拉框数据
    selectStandardMethods() {
      this.$axios.get(this.$api.standardTree.selectStandardMethodEnum).then(res => {
      selectStandardMethodEnum().then(res => {
        this.methods = res.data
      })
    },
@@ -1460,7 +1436,7 @@
    },
    selectsStandardMethodByFLSSM() {
      this.methodLoad = true
      this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
      selectsStandardMethodByFLSSM({
        tree: this.selectTree
      }).then(res => {
        this.methodLoad = false
@@ -1469,7 +1445,7 @@
            let arr = this.selectTree.split('-')
            let arr0 = arr.slice(0, arr.length - 1)
            let selectTree = arr0.join('-').substring(0, arr0.join('-').length - 1)
            this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
            selectsStandardMethodByFLSSM({
              tree: selectTree
            }).then(ress => {
              this.methods = ress.data.standardMethodList
@@ -1609,32 +1585,26 @@
      this.getProductLoad = true
      let selectTreeList = this.selectTree.split(" - ")
      this.addObj.model&&(selectTreeList[selectTreeList.length - 1] = this.addObj.model)
      this.$axios.post(this.$api.standardTree.selectStandardProductList, {
      selectStandardProductList({
        model: this.addObj.model?this.addObj.model:row.model,
        modelNum: row.modelNum,
        standardMethodListId: val,
        factory: selectTreeList.join(" - "),
        partNo: this.addObj.partNo,
        ifsInventoryId: this.customsInspection.id
      }, {
        headers: {
          'Content-Type': 'application/json'
        }
      }).then(res => {
        this.getProductLoad = false
        if (res.code === 200) {
          res.data.forEach(a => {
            a.state = 0
        res.data.forEach(a => {
          a.state = 0
        })
        this.productList = this.HaveJson(res.data)
        this.productList0 = JSON.parse(JSON.stringify(this.productList))
        this.$refs.sampleTable.setCurrentRow(row)
        setTimeout(() => {
          this.productList.forEach(a => {
            if (a.state == 1) this.toggleSelection(a)
          })
          this.productList = this.HaveJson(res.data)
          this.productList0 = JSON.parse(JSON.stringify(this.productList))
          this.$refs.sampleTable.setCurrentRow(row)
          setTimeout(() => {
            this.productList.forEach(a => {
              if (a.state == 1) this.toggleSelection(a)
            })
          }, 200)
        }
        }, 200)
      }).catch(err => {
        console.log('err-',err)
      })
@@ -1674,13 +1644,6 @@
        let arr0 = arr.slice(0, arr.length - 1)
        this.selectTree = arr0.join(' - ') + '- ' + e
      }
    },
    selectEnumByCategoryForType() {
      this.$axios.post(this.$api.enums.selectEnumByCategory, {
        category: "紧急程度"
      }).then(res => {
        this.types = res.data
      })
    },
    // 要求值变化时
    requestChange(e, row) {
@@ -1722,8 +1685,6 @@
                p.section = sections[a]
                p.ask = asks[a]
                p.tell = tells[a]
                // p.manHour = manHours[a]
                // p.price = prices[a]
              }
            })
            break
@@ -1751,12 +1712,6 @@
      if (row.tell.includes('[')) {
        this.$set(row, 'tellCopy', row.tell)
      }
      // if (row.manHour.includes('[')) {
      //   this.$set(row, 'manHourCopy', row.manHour)
      // }
      // if (row.price.includes('[')) {
      //   this.$set(row, 'priceCopy', row.price)
      // }
      let arr = this.productList.filter(m=>m.state==1&&row.sectionCopy&&row.sectionCopy.includes(m.sectionCopy)&&m.ask&&m.sectionCopy.indexOf('[')==-1)
      if (row.bsm === '1' && row.sectionCopy !== '' && row.sectionCopy !== null && row.sectionCopy !== undefined && row.state === 1&&arr.length==0) {
        if (row.sectionCopy.indexOf('[') > -1) {
@@ -1773,14 +1728,10 @@
          let section = arr[0].section
          let arr0 = JSON.parse(row.section)
          let arr1 = JSON.parse(row.ask)
          // let arr2 = JSON.parse(row.manHour)
          // let arr3 = JSON.parse(row.price)
          let arr4 = JSON.parse(row.tell)
          let index = arr0.indexOf(section)
          row.section = section
          row.ask = arr1[index]
          // row.manHour = arr2[index]
          // row.price = arr3[index]
          row.tell = arr4[index]
        } catch(e) {}
      }
@@ -1827,12 +1778,6 @@
        if (p.tell.includes('[')) {
          this.$set(p, 'tellCopy', p.tell)
        }
        // if (p.manHour.includes('[')) {
        //   this.$set(p, 'manHourCopy', p.manHour)
        // }
        // if (p.price.includes('[')) {
        //   this.$set(p, 'priceCopy', p.price)
        // }
        if (p.bsm === '1' && p.sectionCopy !== '' && p.sectionCopy !== null && p.sectionCopy !== undefined && p.state === 1) {
          if (p.sectionCopy.indexOf('[') > -1) {
            p.bsmRow = this.HaveJson(p)
@@ -1892,136 +1837,26 @@
      const property = column['property'];
      return row[property] === value;
    },
    goBack () {
      if (this.active == 1) {
        this.$router.go(-1)
      } else {
        this.closeOpenPage()
      }
    },
    closeOpenPage() {
      this.$router.go(-1)
      this.$tab.closeOpenPage()
    },
  }
}
</script>
<style scoped>
.addObj-form-item {
  width: 100%;
}
.ins_order_add {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
}
.ins_order_add::-webkit-scrollbar {
  width: 0;
}
.title {
  height: 60px;
  line-height: 60px;
}
.search {
  width: calc(100% - 40px);
  background-color: #fff;
  padding: 5px 40px 5px 0;
}
.search_thing {
.header {
  display: flex;
  align-items: center;
  height: 50px;
}
.search_label {
  width: 120px;
  font-size: 14px;
  text-align: right;
}
.search_input {
  width: calc(100% - 120px);
}
.node_i {
  color: orange;
  font-size: 18px;
}
.el-select-dropdown__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pairing {
  text-align: center;
  line-height: 36px;
  margin: 3px 0;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 4px;
}
.askRts {
  width: 100px;
  font-size: 12px;
  border-top: 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 2px solid rgba(0, 0, 0, 0.3);
  text-align: center;
  background-color: rgba(0, 0, 0, 0.1);
  outline: none;
  border-radius: 2px;
  line-height: 24px;
  margin-top: 5px;
}
.circulateTable {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}
.opticalProject {
  width: 38%;
}
.temperatureList {
  width: 60%;
}
.temperatureListTitle {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  line-height: 30px;
}
>>> .el-form-item__content {
  text-align: left;
  width: 65%;
}
.ins_order_add .el-input-group__append,
.el-input-group__prepend {
  padding: 0 10px;
}
.ins_order_add .el-tree-node__content {
  height: 32px;
  font-size: 14px;
  border-radius: 2px;
}
.ins_order_add .el-tree--highlight-current .el-tree-node.is-current>.el-tree-node__content {
  color: #3A7BFA;
}
.ins_order_add .has-gutter .el-table__cell .cell {
  line-height: 30px;
  background-color: #fafafa;
}
.ins_order_add .has-gutter .el-table__cell {
  background-color: #fafafa !important;
}
.ins_order_add .el-table__row .cell {
  font-size: 12px;
}
.ins_order_add .el-table .warning-row .cell {
  color: #3A7BFA;
  margin-bottom: 10px;
}
.tab {
  list-style-type: none;