licp
2024-11-14 321370a82855d4b58d4eff2aee238672cdb8b865
修改检验下单
已修改2个文件
140 ■■■■ 文件已修改
src/components/do/b1-ins-order/add.vue 136 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue
@@ -216,7 +216,7 @@
            </div>
          </el-col>
          <el-col class="search_thing" :span="6">
            <div class="search_label"><span class="required-span">* </span>样品名称:</div>
            <div class="search_label"><span class="required-span">* </span>样品类型:</div>
            <div class="search_input">
              <el-input readonly size="small" v-model="addObj.sample">
                <template slot="append"><el-button slot="append" icon="el-icon-search" @click="selectStandardTree = true"
@@ -409,7 +409,7 @@
      <div style="height: auto;">
        <div class="search" v-if="active==1" style="display: flex;background: transparent;">
          <div class="search_thing">
            <div class="search_label">样品型号:</div>
            <div class="search_label">样品类别:</div>
            <div class="search_input">
              <el-select v-model="model" :placeholder="active>1 ? '' : '请输入'" filterable allow-create default-first-option size="small"
                @change="changeModel">
@@ -439,7 +439,7 @@
          <el-table-column type="index" label="序号" width="65" align="center"></el-table-column>
          <el-table-column prop="sample" label="样品名称" align="center" min-width="100">
            <template slot-scope="scope">
              <el-input size="small" v-model="scope.row.sample" clearable :readonly="active>1"></el-input>
              <el-input size="small" v-model="scope.row.sample" clearable :readonly="active>1" placeholder="必填"></el-input>
            </template>
          </el-table-column>
          <el-table-column prop="sampleCode" label="样品编号" min-width="100" align="center">
@@ -448,18 +448,18 @@
                :readonly="active>1"></el-input>
            </template>
          </el-table-column>
          <el-table-column prop="model" label="样品型号" align="center" min-width="100">
          <el-table-column prop="model" label="样品类别" align="center" min-width="100">
            <template slot-scope="scope">
              <el-select v-model="scope.row.model" filterable allow-create default-first-option placeholder="样品型号"
              <el-select v-model="scope.row.model" filterable allow-create default-first-option placeholder="样品类别"
                size="small" @change="handleChangeModel" :disabled="active>1" style="width: 100%;">
                <el-option v-for="item in models" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </template>
          </el-table-column>
          <el-table-column prop="modelNum" label="型号参数" min-width="100" align="center" v-if="!(active>1)">
          <el-table-column prop="modelNum" label="产品型号" min-width="100" align="center" v-if="!(active>1)">
            <template slot-scope="scope">
              <el-input size="small" v-model="scope.row.modelNum" clearable placeholder="非必填"
              <el-input size="small" v-model="scope.row.modelNum" clearable placeholder="必填"
                @keyup.enter.native="methodChange(scope.row.standardMethodListId, scope.row)"
                @clear="methodChange(scope.row.standardMethodListId, scope.row)"></el-input>
            </template>
@@ -592,11 +592,6 @@
        :delUrl="$api.insOrderPlan.delfile" style="height: 100%;margin-top: 16px;" v-show="currentPage==1"/>
      </div>
    </div>
    <p style="font-size: 12px;color: red;margin-top: 20px;margin-bottom: 20px;">双方承诺:<br/>
      1、委托方承诺提供的信息与样品的真实性;<br/>
      2、委托送样检验结果仅适用于收到的样品;<br/>
      3、试验过程导致的样品损坏、配件损坏、损耗,本测试场不承担赔偿责任;<br/>
      4、实验室承诺公正开展检测活动,并承诺保守在检测活动过程中所获知的保密信息。</p>
    <el-dialog title="选择单位" :visible.sync="selectUserDia" width="70%">
      <div class="body" style="height: 60vh;" v-if="selectUserDia">
        <ValueTable ref="ValueTable2" :url="$api.user.selectCustomPageList" :componentData="componentData2" />
@@ -1038,6 +1033,11 @@
      <filePreview v-if="lookFileVisible" :fileUrl="currentFile.url"
      :currentFile="currentFile" style="max-height: 87vh;overflow-y: auto;"/>
    </el-dialog>
    <p style="font-size: 12px;color: red;margin-top: 20px;margin-bottom: 20px;">双方承诺:<br/>
      1、委托方承诺提供的信息与样品的真实性;<br/>
      2、委托送样检验结果仅适用于收到的样品;<br/>
      3、试验过程导致的样品损坏、配件损坏、损耗,本测试场不承担赔偿责任;<br/>
      4、实验室承诺公正开展检测活动,并承诺保守在检测活动过程中所获知的保密信息。</p>
  </div>
</template>
@@ -1925,6 +1925,13 @@
              }
            }
          }
          let index0 = sampleList.findIndex(m=>!m.sample)
          if(index0>-1) return this.$message.error('请填写样品名称')
          let index1 = sampleList.findIndex(m=>!m.modelNum)
          if(index1>-1) return this.$message.error('请填写产品型号')
          let projectNum = this.totalArr.filter(a => a.state == 1).length
          if(projectNum==0){
            this.$confirm('检验项目为空,是否确认提交?', "提示", {
@@ -2475,22 +2482,6 @@
        this.models = val.children
        this.getNodeParent(node)
        let flag = false
        if (node.level == 3) {
          if(node.data.children.length>0){
            node.data.children.forEach(a => {
              let key = Object.keys(a)
              if(!key.includes('level')) {
                flag = true
              }
            })
          }
        }
        this.selectTree = this.selectTree.replace(' - ', '')
        if(flag) {
          this.selectTree =  '-  - ' + this.selectTree
        }
        let data = this.selectTree.split(' - ')
        let data2 = ''
        for (let index = data.length - 1; index >= 0; index--) {
@@ -2521,27 +2512,24 @@
        return data.label.indexOf(value) !== -1;
      },
      activeStandardTree() {
        let trees = this.selectTree.split(" - ")
        if(this.selectTree == null || this.selectTree == '') return this.$message.error('未选择样品类型')
        let trees = this.selectTree.split(" - ").filter(m=>m)
        if (trees.length < 3) {
          this.$message.error('未选择对象')
          this.$message.error('未选择样品类别')
          return
        }
        this.addObj.factory = trees[0]
        this.addObj.laboratory = trees[1]
        this.addObj.sampleType = trees[2]
        if (trees[3] === undefined || trees[3] === '' || trees[3] === '- ') {
          this.addObj.sample = trees[2]
        } else {
          this.addObj.sample = trees[3]
        }
        this.addObj.model = (trees[4] == undefined ? null : trees[4])
        this.addObj.factory = '中天科技检测中心'
        this.addObj.laboratory = '通信产品实验室'
        this.addObj.sampleType = trees[0]
        this.addObj.sample = trees[1]
        this.addObj.model = trees[2]
        this.selectStandardTree = false
        this.sampleList = []
        for (var i = 0; i < this.addObj.sampleNum; i++) {
          this.sample.joinName = null
          this.sample.joinModel = null
          this.sample.joinNum = 1
          this.sample.sample = this.addObj.sample
          // this.sample.sample = this.addObj.sample
          this.sample.model = this.addObj.model
          this.sample.unit = this.addObj.unit
          this.sample.standardMethodListId = []
@@ -2559,23 +2547,10 @@
      selectsStandardMethodByFLSSM() {
        this.methodLoad = true
        this.$axios.post(this.$api.standardTree.selectsStandardMethodByFLSSM, {
          tree: this.selectTree
          tree: '中天科技检测中心'+' - '+'通信产品实验室'+' - '+this.selectTree
        }).then(res => {
          this.methodLoad = false
          try {
            if (res.data.standardMethodList.length == 0 && this.selectTree.split('-').length == 5) {
              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, {
                tree: selectTree
              }).then(ress => {
                this.methods = ress.data.standardMethodList
              })
            } else {
              this.methods = res.data.standardMethodList
            }
          } catch (e) {}
          this.methods = res.data.standardMethodList
        })
      },
      addStandardTree() {
@@ -2586,7 +2561,7 @@
          this.sample.joinName = null
          this.sample.joinModel = null
          this.sample.joinNum = 1
          this.sample.sample = this.addObj.sample
          // this.sample.sample = this.addObj.sample
          this.sample.model = this.addObj.model
          this.sample.unit = this.addObj.unit
          this.sample.standardMethodListId = []
@@ -2723,29 +2698,6 @@
          }
          return item
        })
        const select = this.selectTree.split(' - ')
        if (row.inspectionItem === '温度循环' && select[2] === '光缆' && row.state === 1&&this.isAskOnlyRead) {
          this.circulateShow = true;
          return
        } else if (row.inspectionItem === '温度循环' && select[2] === '光缆' && row.state === 0) {
          this.circulateShow = false;
        }
        if ((row.inspectionItem === '温升试验' || row.inspectionItem === '热循环') && row.state === 1) {
          // console.log('row---', row)
          this.temperatureTitle = `${row.inspectionItem}要求填写`
          this.isShowInput = row.inspectionItem === '热循环'
          this.temId = row.id
          this.temperatureShow = true;
          return
        } else if ((row.inspectionItem === '温升试验' || row.inspectionItem === '热循环') && row.state === 0) {
          this.temperatureShow = false;
        }
        // if (row.inspectionItem === '单根垂直燃烧' && select[2] === '光缆' && row.state === 1) {
        //   this.singleVerticalCombustionShow = true;
        //   return
        // } else if (row.inspectionItem === '单根垂直燃烧' && select[2] === '光缆' && row.state === 0) {
        //   this.singleVerticalCombustionShow = false;
        // }
        this.changeProductList0()
        if(this.sampleSelectionList.length>0){
@@ -2915,7 +2867,7 @@
        this.$axios.post(this.$api.standardTree.selectStandardProductList, {
          model: (this.addObj.model?this.addObj.model:row.model) + '-' + row.modelNum+';'+row.testRequirements,
          standardMethodListId: val.join(','),
          factory: selectTreeList.join(" - "),
          factory: '中天科技检测中心'+' - '+'通信产品实验室'+' - '+selectTreeList.join(" - "),
        }, {
          headers: {
            'Content-Type': 'application/json'
@@ -3065,30 +3017,6 @@
            this.$refs.productTable.clearSelection()
            return
          }
          const select = this.selectTree.split(' - ')
          if (p.inspectionItem === '温度循环' && select[2] === '光缆' && p.state === 1&&this.isAskOnlyRead) {
            this.circulateShow = true;
            return
          } else if (p.inspectionItem === '温度循环' && select[2] === '光缆' && p.state === 0) {
            this.circulateShow = false;
          }
          if ((p.inspectionItem === '温升试验' || p.inspectionItem === '热循环') && p.state === 1) {
            // console.log('p---', p)
            this.temperatureTitle = `${p.inspectionItem}要求填写`
            this.isShowInput = p.inspectionItem === '热循环'
            this.temId = p.id
            this.temperatureShow = true;
            return
          } else if ((p.inspectionItem === '温升试验' || p.inspectionItem === '热循环') && p.state === 0) {
            this.temperatureShow = false;
          }
          /* if (p.ask.includes('RTS')&&p.state === 1) {
            p.rts = ''
            this.bsm3Val = ''
            this.bsm3 = true
            this.bsm3Dia = true
            this.bsmRow3.push(p)
          } */
        })
        if (e.length > 0) {
          this.sampleList.map(item => {
src/main.js
@@ -21,11 +21,11 @@
//本地
// Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://127.0.0.1:8001';
// const javaApi = 'http://172.20.10.5:8001';
const javaApi = 'http://192.168.0.104:8001';
// //通信测试库
// Vue.prototype.LOCATIONVUE = "http://10.1.13.77:8080";
const javaApi = 'http://10.1.13.77:8001';
// const javaApi = 'http://10.1.13.77:8001';
// 通信正式库
// Vue.prototype.LOCATIONVUE = "https://ztwxlims.ztt.cn:7443";