licp
2024-06-04 8d1f60e54adb75d9c252b514174f287a2cbd7864
完成检验下单、检验任务优化
已修改6个文件
158 ■■■■ 文件已修改
src/assets/api/controller.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue 96 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/fiberoptic-config.vue 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/person-manage.vue 22 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js
@@ -177,6 +177,7 @@
  verifyPlan: "/insOrderPlan/verifyPlan", //复核检验任务
  submitPlan: "/insOrderPlan/submitPlan", //检验任务提交
  inspectionOrderDetailsTaskSwitching: "/insOrderPlan/inspectionOrderDetailsTaskSwitching", // 检验单详情-任务切换
  getInsProduct: "/insOrderPlan/getInsProduct", // 获取检验项目和模板内容
}
const systemLog = {
src/components/do/b1-ins-order/add.vue
@@ -94,7 +94,7 @@
  <div class="ins_order_add">
    <div v-show="!configShow">
      <el-row class="title">
        <el-col :span="6" style="padding-left: 20px;">委托单信息</el-col>
        <el-col :span="6" style="padding-left: 20px;">委托单信息&nbsp;&nbsp;&nbsp;总价:<span style="color: #3A7BFA">¥{{total}}</span></el-col>
        <el-col :span="18" style="text-align: right;">
          <el-select v-model="template" size="medium" placeholder="下单模板" style="margin-right: 10px;" v-show="active==1"
            @change="selectInsOrderTemplateById">
@@ -467,7 +467,9 @@
        </el-row>
      </span>
    </el-dialog>
    <fiberOpticConfig :currentId="currentId" v-if="configShow" :active="active" />
    <fiberOpticConfig :currentId="currentId"
    @saveFiberopticConfig="getTotal()"
     v-if="configShow" :active="active" />
    <el-dialog title="检测到特殊项,请作出以下选择" :visible.sync="bsm1Dia" width="500px" :show-close="false" :before-close="beforeClose">
      <div class="body" style="max-height: 60vh;">
        <el-row v-if="bsm1">
@@ -627,13 +629,37 @@
        bsmRow: null,
        bsm1: false,
        bsm1Val: null,
        bsm1Dia: false
        bsm1Dia: false,
        total:0,
      }
    },
    watch: {
      sampleList() {
        this.addObj.method = null
        this.productList = []
      },
      productList:{
        deep:true,
        handler(val){
          if(val&&val.length>0){
            let arr = [];
            val.forEach(item => {
              if(item.sonLaboratory&&!arr.find(a=>a.value==item.sonLaboratory)){
                arr.push({
                  text: item.sonLaboratory,
                  value: item.sonLaboratory
                })
              }
            })
            this.filters = arr
          }
        }
      },
      sampleList:{
        deep:true,
        handler(val){
          this.getTotal()
        }
      }
    },
    mounted() {
@@ -645,7 +671,7 @@
      this.selectEnumByCategoryForUnit()
      this.selectStandardMethods()
      this.selectEnumByCategoryForOrderType()
      this.selectEnumByCategoryForSonLaboratory()
      // this.selectEnumByCategoryForSonLaboratory()
      this.selectEnumByCategoryForSampleForm()
      if (this.active != 1) {
        // 查看/审核流程
@@ -1324,6 +1350,68 @@
          }
        }
        done()
      },
      getTotal(){
        let arr = []
        this.total = 0;
        this.sampleList.forEach(item=>{
          if(item.insProduct&&item.insProduct.length>0){
            item.insProduct.forEach(a=>{
              arr.push(a)
            })
          }
          if(item.bushing&&item.bushing.length>0){
            item.bushing.forEach(a=>{
              if(a.fiber&&a.fiber.length>0){
                a.fiber.forEach(b=>{
                  if(b.productList&&b.productList.length>0){
                    b.productList.forEach(c=>{
                      arr.push(c)
                    })
                  }
                })
              }
              if(a.fibers&&a.fibers.length>0){
                a.fibers.forEach(b=>{
                  if(b.productList&&b.productList.length>0){
                    b.productList.forEach(c=>{
                      arr.push(c)
                    })
                  }
                  if(b.fiber&&b.fiber.length>0){
                    b.fiber.forEach(c=>{
                      if(c.productList&&c.productList.length>0){
                        c.productList.forEach(d=>{
                          arr.push(d)
                        })
                      }
                    })
                  }
                })
              }
            })
          }
        })
        let mySet = new Set();
        let arr0 = arr.filter(item=>{
          if(item.state == 1){
            let num1= mySet.size
            if(item.manHourGroup===''||!item.manHourGroup){
              return true
            }else{
              mySet.add(item.manHourGroup)
              let num2= mySet.size
              if(num2 > num1){
                return true
              }else{
                return false
              }
            }
          }
        })
        arr0.forEach(item=>{
          this.total += Number(item.price)
        })
      }
    }
  }
src/components/do/b1-ins-order/fiberoptic-config.vue
@@ -690,6 +690,7 @@
          a.bushing = this.bushing
        })
        this.$message.success('已保存')
        this.$emit('saveFiberopticConfig')
      }
    }
  }
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -224,7 +224,7 @@
            size="small">{{ item.templateName }}</el-radio-button>
        </el-radio-group>
      </div>
      <div class="center-box" id="nav">
      <div class="center-box" id="nav" v-loading="tableLoading">
        <table border="1" class="tables" cellpadding="10" v-for="(item,index) in tableList" :key="index">
          <tbody>
            <tr v-for="(m,i) in item.arr" :key="i">
@@ -470,6 +470,7 @@
        currentFiberOpticTape:null,//当前光纤带
        currentFiberOptic:null,//当前光纤
        currentBushing:null,//当前套管
        tableLoading:false,
      }
    },
    created() {
@@ -542,6 +543,12 @@
      }
    },
    methods: {
      async getCurrentProduct(id,type){
        this.tableLoading = true;
        let res = await this.$axios.post(this.$api.insOrderPlan.getInsProduct+'?id='+id+'&type='+type+'&laboratory='+this.sonLaboratory)
        this.tableLoading = false;
        return res.data
      },
      handleChangeBushing(row, column, event){
        this.currentBushing = row;
        this.fiberOpticTape = []
@@ -557,7 +564,7 @@
        }
        this.bushingVisible = false;
      },
      handleChangeOptic(row, column, event){
      async handleChangeOptic(row, column, event){
        this.currentFiberOptic = row;
        this.currentFiberOptic.productList.forEach(a => {
          this.param[a.id] = {
@@ -569,11 +576,12 @@
            insResult: null
          }
        })
        this.getTableLists0(row)
        this.fiberOpticVisible = false;
        let list = await this.getCurrentProduct(row.id,2)
        this.getTableLists0(list)
        this.currentKey = row.index
      },
      handleChangeTape(row, column, event){
      async handleChangeTape(row, column, event){
        this.currentFiberOpticTape = row;
        this.param = {}
        this.fiberOptic = []
@@ -588,15 +596,16 @@
            insResult: null
          }
        })
        this.getTableLists0(row)
        this.fiberOpticTapeVisible = false;
        let list = await this.getCurrentProduct(row.id,1)
        this.getTableLists0(list)
        if(row.fiber&&row.fiber.length>0){
          // 配置光纤
          this.fiberOptic = row.fiber;
        }
        this.fiberOpticTapeVisible = false;
        this.currentKey = row.index
      },
      handleChangeSample(row, column, event) {
      async handleChangeSample(row, column, event) {
        this.param = {}
        // 清空光纤配置相关数据
        this.fiberOpticTape = []
@@ -605,7 +614,9 @@
        this.currentFiberOptic = null;
        this.bushing = []
        this.currentBushing = null;
        this.currentSample.insProduct = this.HaveJson(row.insProduct)
        this.sampleVisible = false;
        let list = await this.getCurrentProduct(row.id,0)
        this.currentSample.insProduct = this.HaveJson(list)
        this.currentSample.insProduct.forEach(a => {
          this.param[a.id] = {
            insValue: [],
@@ -622,7 +633,6 @@
        }
        // this.handleTableData()
        this.getTableLists();
        this.sampleVisible = false;
        this.currentKey = row.index
      },
      handleChangeTask(row) {
@@ -714,9 +724,9 @@
        }
      },
      // 光纤配置相关模板table列表
      getTableLists0(obj){
      getTableLists0(list){
        const mySet1 = new Set();
        this.tableLists = obj.productList.filter(m => {
        this.tableLists = list.filter(m => {
          let num0 = mySet1.size;
          if (m.templateId != null&&m.template != null) {
            mySet1.add(JSON.stringify({
@@ -733,7 +743,7 @@
          this.tableList = null;
          this.tableList = [this.tableLists[0]]
          this.currentTable = this.tableLists[0].templateId;
          this.currentSample.insProduct = this.HaveJson(obj.productList)
          this.currentSample.insProduct = this.HaveJson(list)
          this.handleTableData()
        }
      },
src/components/view/person-manage.vue
@@ -199,9 +199,9 @@
      </span>
    </el-dialog>
    <el-dialog title="获取人事系统人员信息" :visible.sync="addthirdParty" width="70%">
      <div class="body">
      <div class="body" v-loading="thirdPartyLoading">
        <el-row>
          <el-col :span="8" style="height: 70vh;overflow: hidden;">
          <el-col :span="8" style="height: 70vh;overflow: hidden;" v-if="companiesList.length!=1">
            <el-input placeholder="输入关键字搜索" v-model="search2" size="small" style="width: 90%;padding: 0 5% 10px 5%;"
              clearable @clear="searchFilter2" @keyup.enter.native="searchFilter2()">
            </el-input>
@@ -210,7 +210,7 @@
              highlight-current>
            </el-tree>
          </el-col>
          <el-col :span="16" style="height: 70vh;padding-left: 8px;">
          <el-col :span="companiesList.length==1?24:16" style="height: 70vh;padding-left: 8px;">
            <div class="search_thing" style="width: 100%;margin-bottom: 10px;justify-content: right;">
              <div class="search_label" style="width: 200px;">员工号/员工姓名:</div>
              <div class="search_input" style="width: 250px;">
@@ -354,7 +354,8 @@
        companiesList: [],
        currentCompaniesList: [],
        userSearch2: '',
        searchEmployeeID: null
        searchEmployeeID: null,
        thirdPartyLoading:false
      }
    },
    // watch: {
@@ -370,8 +371,21 @@
    methods: {
      openthirdParty() {
        this.addthirdParty = true;
        this.thirdPartyLoading = true;
        this.$axios.get(this.$api.companies.selectCompaniesList).then(res => {
          this.companiesList = this.HaveJson(res.data);
          if(this.companiesList.length ==1){
            this.$axios.post(this.$api.companies.selectSimpleList, {
              companyId: this.companiesList[0].companyId
            }).then(res => {
              this.thirdPartyLoading = false;
              this.personListCopy = JSON.parse(JSON.stringify(res.data))
              this.personList = res.data
              this.$refs.personTable.doLayout()
            })
          }else{
            this.thirdPartyLoading = false;
          }
          this.datathirdParty = this.tranListToTreeData(res.data, "ROOT");
        })
        if(this.componentData.entity.roleId > 10000)this.$message.warning('由于未选中具体角色,新增用户将成为默认角色')
src/main.js
@@ -13,8 +13,8 @@
//本地
Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://192.168.11.200:8001';//李
const javaApi = 'http://192.168.144.249:8001';//张
const javaApi = 'http://192.168.11.200:8001';//李
// const javaApi = 'http://192.168.11.249:8001';//张
// const javaApi = 'http://172.20.10.3:8001';//姜
// const javaApi = 'http://192.168.11.2:8001';//柴
//  const javaApi = 'http://127.0.0.1:8001';//晏