licp
2024-07-23 da498efb165dbada586396baecc71c644e46b1e8
交接时选择试验室
已修改8个文件
202 ■■■■ 文件已修改
src/assets/api/controller.js 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-ins-order/add.vue 58 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/tool/scroll-paging.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspect-order-plan.vue 66 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspection-order.vue 43 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main.js 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/view/notice.vue 21 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/assets/api/controller.js
@@ -186,6 +186,7 @@
  doInsOrder: "/insOrderPlan/doInsOrder", //执行检验操作
  saveInsContext: "/insOrderPlan/saveInsContext", //保存检验内容
  upPlanUser: "/insOrderPlan/upPlanUser", //任务交接
  upPlanUser2: "/insOrderPlan/upPlanUser2", //任务交接
  verifyPlan: "/insOrderPlan/verifyPlan", //复核检验任务
  submitPlan: "/insOrderPlan/submitPlan", //检验任务提交
  inspectionOrderDetailsTaskSwitching: "/insOrderPlan/inspectionOrderDetailsTaskSwitching", // 检验单详情-任务切换
src/components/do/b1-ins-order/add.vue
@@ -565,8 +565,17 @@
          <el-col class="search_thing" :span="22">
            <div class="search_label"><span class="required-span" v-if="addObj.type == 2">* </span>指派人员:</div>
            <div class="search_input">
              <el-select v-model="distributeData.userId" placeholder="请选择" size="small" filterable style="width: 100%;">
              <el-select v-model="distributeData.userId" placeholder="请选择" size="small" filterable style="width: 100%;" @change="changeUser">
                <el-option v-for="item in personList" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </div>
          </el-col>
          <el-col class="search_thing" :span="22" v-if="distributeData.userId">
            <div class="search_label"><span class="required-span">* </span>试验室:</div>
            <div class="search_input">
              <el-select v-model="distributeData.sonLaboratory" placeholder="请选择" size="small" filterable style="width: 100%;">
                <el-option v-for="item in sonLaboratoryList" :key="item.value" :label="item.label" :value="item.value">
                </el-option>
              </el-select>
            </div>
@@ -984,7 +993,8 @@
        issuedDialogVisible: false,
        distributeData: {
          appointed: '',
          userId: ''
          userId: '',
          sonLaboratory:''
        },
        personList: [],
        upLoad: false,
@@ -1051,7 +1061,8 @@
        temperatureTitle: '',
        temperatureTestNum: '',
        isShowInput: false,
        temId: ''
        temId: '',
        sonLaboratoryList:[]
      }
    },
    watch: {
@@ -1230,7 +1241,7 @@
            item.tell = ask
          }
        })
        console.log('ask---', ask)
        // console.log('ask---', ask)
        this.temperatureShow = false
      },
      temperatureShowClose () {
@@ -1279,7 +1290,7 @@
      },
      handleTemperatureTestChange (value) {
        console.log('value---', value)
        // console.log('value---', value)
      },
      handleSelectionChange(val) {
        this.opticalProjectList = val;
@@ -1476,7 +1487,7 @@
              isHaveBushing = false
            }
          })
          console.log('isHaveBushing===', isHaveBushing)
          // console.log('isHaveBushing===', isHaveBushing)
          if (productListSelected && select[2] === '光缆' && isHaveBushing === false) {
            this.$message.error('光缆温度循环项目必须进行光纤配置')
@@ -1802,11 +1813,16 @@
          this.$message.error('指派人员未填写')
          return
        }
        if (this.distributeData.userId&&(this.distributeData.sonLaboratory== null ||this.distributeData.sonLaboratory== '')) {
          this.$message.error('试验室未填写')
          return
        }
        this.upLoad = true;
        this.$axios.post(this.$api.insOrder.upInsOrder, {
          orderId: this.distributeData.orderId,
          appointed: this.distributeData.appointed,
          userId: this.distributeData.userId
          userId: this.distributeData.userId,
          sonLaboratory:this.distributeData.sonLaboratory
        }).then(res => {
          if (res.code === 201) {
            this.upLoad = false
@@ -2070,7 +2086,7 @@
          this.circulateShow = false;
        }
        if ((row.inspectionItem === '温升试验' || row.inspectionItem === '热循环') && row.state === 1) {
          console.log('row---', row)
          // console.log('row---', row)
          this.temperatureTitle = `${row.inspectionItem}要求填写`
          this.isShowInput = row.inspectionItem === '热循环'
          this.temId = row.id
@@ -2323,7 +2339,7 @@
        }
      },
      handleAll(e) {
        console.log('e---', e)
        // console.log('e---', e)
        if (e.length > 0) {
          this.productList.map(m => {
            if(e.find(a=>a.id == m.id)){
@@ -2373,7 +2389,7 @@
            this.circulateShow = false;
          }
          if ((p.inspectionItem === '温升试验' || p.inspectionItem === '热循环') && p.state === 1) {
            console.log('p---', p)
            // console.log('p---', p)
            this.temperatureTitle = `${p.inspectionItem}要求填写`
            this.isShowInput = p.inspectionItem === '热循环'
            this.temId = p.id
@@ -2656,7 +2672,7 @@
      getTotal() {
        this.totalArr = []
        this.total = 0;
        console.log(this.sampleList)
        // console.log(this.sampleList)
        this.sampleList.forEach(item => {
          if (item.insProduct && item.insProduct.length > 0) {
            item.insProduct.forEach(a => {
@@ -2702,7 +2718,6 @@
            if (item.manHourGroup === '' || !item.manHourGroup) {
              return true
            } else {
              console.log(item)
              mySet.add(item.manHourGroup)
              let num2 = mySet.size
              if (num2 > num1) {
@@ -2715,6 +2730,20 @@
        })
        arr0.forEach(item => {
          this.total += Number(item.price)
        })
        let arr1 = this.totalArr.filter(item => item.state == 1)
        let mySet0 = new Set();
        this.sonLaboratoryList = []
        arr1.forEach(item => {
          let num1 = mySet0.size
          mySet0.add(item.sonLaboratory)
          let num2 = mySet0.size
          if(num2>num1){
            this.sonLaboratoryList.push({
              label:item.sonLaboratory,
              value:item.sonLaboratory,
            })
          }
        })
      },
      bsm2Up(val) {
@@ -2731,6 +2760,11 @@
        for (let a of set) {
          this.bsm2Val2.push(this.HaveJson(this.bsm2Val3[a - 1]))
        }
      },
      changeUser(){
        if(this.sonLaboratoryList.length>0){
          this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value
        }
      }
    }
  }
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -1653,7 +1653,6 @@
                  }
                }
              })
              console.log(1111,str)
              if (str != '') {
                let count2 = 0
                for (let i in this.currentSample.insProduct) {
@@ -1666,7 +1665,6 @@
                  .insProduct[i].inspectionItemSubclass==null||this.currentSample
                  .insProduct[i].inspectionItemSubclass==undefined?'':this.currentSample
                  .insProduct[i].inspectionItemSubclass
                  console.log(inspectionItemClass, inspectionItem, inspectionItemSubclass)
                  if (this.currentSample.insProduct[i].templateId === a.templateId && inspectionItemClass +inspectionItem+inspectionItemSubclass ===
                    str) {
                    ids.push({
src/components/tool/scroll-paging.vue
@@ -2,7 +2,7 @@
  <div class="scroll-pagination"  ref="content" @scroll="onScroll">
    <slot></slot>
    <el-button
        v-show="isLoding"
        v-show="isLoding&&!finishLoding"
        type="text"
        style="display: flex; margin: 0 auto; color: #909399"
        ><i class="el-icon-loading" style="font-size:20px"></i
@@ -34,6 +34,7 @@
      deep:true,
      handler(){
        this.isLoding = false
        console.log(this.isLoding)
      }
    }
  },
src/components/view/b1-inspect-order-plan.vue
@@ -168,11 +168,24 @@
        </el-dialog>
    <el-dialog title="检验交接" :visible.sync="connectVisible" width="400px">
            <div class="search_thing">
        <div class="search_label" style="width:90px">交接人员:</div>
        <div class="search_label" style="width:90px"><span class="required-span">* </span>交接人员:</div>
        <div class="search_input">
          <el-select v-model="connectPerson" placeholder="请选择" style="width: 100%;" filterable>
          <el-select v-model="connect.connectPerson" placeholder="请选择" style="width: 100%;" filterable>
            <el-option
              v-for="item in personList"
              :key="item.value"
              :label="item.label"
              :value="item.value">
            </el-option>
          </el-select>
        </div>
      </div>
      <div class="search_thing">
        <div class="search_label" style="width:90px"><span class="required-span">* </span>试验室:</div>
        <div class="search_input">
          <el-select v-model="connect.sonLaboratory" placeholder="请选择" style="width: 100%;" filterable>
            <el-option
              v-for="item in sonLaboratoryList"
              :key="item.value"
              :label="item.label"
              :value="item.value">
@@ -233,9 +246,9 @@
                            font: '检验',
                            type: 'text',
                            method: 'handleInspection',
                            // disabFun: (row, index) => {
                            //     return row.userId == null || row.insState == 3 || row.insState == 5||JSON.parse(localStorage.getItem("user")).name != row.userName
                            // }
                            disabFun: (row, index) => {
                                return row.userId == null || row.insState == 3 || row.insState == 5||JSON.parse(localStorage.getItem("user")).name != row.userName
                            }
              // disabFun: (row, index) => {
                            //     return row.userId == null || row.insState == 3 || row.insState == 5
                            // }
@@ -308,9 +321,13 @@
                orderId: 0,
        personList:[],
        connectVisible:false,
        connectPerson:'',
        connect:{
          connectPerson:'',
          sonLaboratory:''
        },
        loading:false,
        currentTime: null
        currentTime: null,
        sonLaboratoryList:[]
            }
        },
        created() {
@@ -375,7 +392,8 @@
                if (row) {
                    this.sampleUserForm = {
                        entrustCode: row.entrustCode,
                        insSampleId: row.id
                        insSampleId: row.id,
            sonLaboratory: row.sonLaboratory,
                    }
                    this.claimVisible = true
                }
@@ -502,14 +520,37 @@
      },
      handleConnect(row){
        this.orderId = row.id
        this.connect = {}
        this.connectVisible=true;
        this.$axios.post(this.$api.insOrderPlan.upPlanUser2, {
            orderId:this.orderId,
          }).then(res => {
                    if (res.code === 200&&res.data.length>0) {
            this.sonLaboratoryList = [];
            res.data.forEach(m=>{
              this.sonLaboratoryList.push({
                value:m,
                label:m
              })
            })
            this.connect.sonLaboratory = this.sonLaboratoryList[0].value
                    }
                })
      },
      confirmConnect(){
        if(this.connectPerson){
          this.loading = true;
        if(this.connect.connectPerson==null||this.connect.connectPerson==''||this.connect.connectPerson==undefined){
          this.$message.error('未选择交接人员')
          return
        }
        if(this.connect.sonLaboratory==null||this.connect.sonLaboratory==''||this.connect.sonLaboratory==undefined){
          this.$message.error('未选择试验室')
          return
        }
        this.loading = true;
          this.$axios.post(this.$api.insOrderPlan.upPlanUser, {
            orderId:this.orderId,
            userId:this.connectPerson
            userId:this.connect.connectPerson,
            sonLaboratory:this.connect.sonLaboratory,
          }).then(res => {
                    if (res.code === 200) {
            this.loading = false;
@@ -521,9 +562,6 @@
                    console.error(error)
          this.loading = false;
                })
        }else{
          this.$message.error('未选择交接人员')
        }
      },
      handleReview(row){
        this.state = 2;
src/components/view/b1-inspection-order.vue
@@ -289,8 +289,17 @@
                        <el-col class="search_thing" style="width: 95%;">
                            <div class="search_label"><span class="required-span" v-show="distributeData.type==2">* </span>指派人员:</div>
                            <div class="search_input">
                                <el-select v-model="distributeData.userId" placeholder="请选择" size="small" style="width: 100%;" clearable filterable>
                                <el-select v-model="distributeData.userId" placeholder="请选择" size="small" style="width: 100%;" clearable filterable @change="changeUser">
                                    <el-option v-for="(item,i) in personList" :key="i" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
                        </el-col>
            <el-col class="search_thing" style="width: 95%;" v-if="distributeData.userId">
                            <div class="search_label"><span class="required-span" >* </span>试验室:</div>
                            <div class="search_input">
                                <el-select v-model="distributeData.sonLaboratory" placeholder="请选择" size="small" style="width: 100%;" clearable filterable>
                                    <el-option v-for="(item,i) in sonLaboratoryList" :key="i" :label="item.label" :value="item.value">
                                    </el-option>
                                </el-select>
                            </div>
@@ -452,7 +461,8 @@
                    orderId: '',
                    sampleId: '',
                    appointed: '',
                    userId: ''
                    userId: '',
          sonLaboratory:''
                },
                // 人员列表
                personList: [],
@@ -659,7 +669,8 @@
          }
        ],
        qrData:[],
        multipleSelection:[]
        multipleSelection:[],
        sonLaboratoryList:[]
            }
        },
    watch:{
@@ -877,14 +888,32 @@
                    this.distributeData.appointed = res.data
          this.distributeData.type = row.type
                })
        this.$axios.post(this.$api.insOrderPlan.upPlanUser2, {
            orderId:row.id,
          }).then(res => {
                    if (res.code === 200&&res.data.length>0) {
            this.sonLaboratoryList = [];
            res.data.forEach(m=>{
              this.sonLaboratoryList.push({
                value:m,
                label:m
              })
            })
                    }
                })
            },
            submitForm2() {
                if (this.distributeData.appointed == null || this.distributeData.appointed == '') {
                    this.$message.error('约定时间未填写')
                    return
                }
        //
        if(this.distributeData.type==2&&(this.distributeData.userId==null||this.distributeData.userId=='')){
                    this.$message.error('指派人员未填写')
                    return
                }
        if(this.distributeData.userId&&(this.distributeData.sonLaboratory==null||this.distributeData.sonLaboratory=='')){
                    this.$message.error('试验室未填写')
                    return
                }
                this.upLoad = true;
@@ -892,7 +921,8 @@
                    orderId: this.distributeData.orderId,
                    sampleId: this.distributeData.sampleId,
                    appointed: this.distributeData.appointed,
                    userId: this.distributeData.userId
                    userId: this.distributeData.userId,
          sonLaboratory:this.distributeData.sonLaboratory,
                }).then(res => {
                    if (res.code === 201) {
                        this.upLoad = false
@@ -985,6 +1015,11 @@
      },
      getStyle(){
        return 'height: calc(100% - '+(this.more?'94':'44')+'px)'
      },
      changeUser(){
        if(this.sonLaboratoryList.length>0){
          this.distributeData.sonLaboratory = this.sonLaboratoryList[0].value
        }
      }
        }
    }
src/main.js
@@ -15,13 +15,13 @@
Vue.prototype.$Big = Big;
// 项目切换
// Vue.prototype.PROJECT = '检测中心'
Vue.prototype.PROJECT = '装备电缆'
Vue.prototype.PROJECT = '检测中心'
// Vue.prototype.PROJECT = '装备电缆'
//本地
// Vue.prototype.LOCATIONVUE = "http://127.0.0.1:80";
// const javaApi = 'http://127.0.0.1:8001';
// 张:192.168.45.249
// const javaApi = 'http://172.20.10.4:8001';
const javaApi = 'http://172.20.10.5:8001';
//云
// Vue.prototype.LOCATIONVUE = "http://114.132.189.42:8080";
@@ -33,7 +33,7 @@
//装备电缆测试库
// Vue.prototype.LOCATIONVUE = "http://10.16.173.59";
const javaApi = 'http://10.16.173.59:8001';
// const javaApi = 'http://10.16.173.59:8001';
// const javaApi = 'http://192.168.47.2:8001';
Vue.prototype.HaveJson = (val) => {
src/view/notice.vue
@@ -7,7 +7,7 @@
  :before-close="handleClose" style="height: 100vh;z-index: 9999999;" size="450px">
    <div class="notice-content" v-loading="loading">
      <el-button size="small" type="primary" @click="handleDropdownAll(1)" style="margin-bottom: 10px;margin-left: 330px;">全部已读</el-button>
      <scroll-pagination @load="refresh" :finishLoding="finishLoding" :list="list" style="height: calc(100% - 50px);" v-if="list.length>0||loading">
      <scroll-pagination @load="refresh" :finishLoding="finishLoding" :list="list" style="height: calc(100% - 50px);">
        <div
        class="notice-content-item"
        v-for="(m,i) in list"
@@ -24,7 +24,7 @@
          </div>
        </div>
      </scroll-pagination>
      <!-- <div v-if="list.length<1&&!loading" style="color:#909399;font-size:14px;text-align: center;margin-top:200px" >暂无数据</div> -->
      <div v-if="list.length<1&&!loading" style="color:#909399;font-size:14px;text-align: center;margin-top:200px" >暂无数据</div>
    </div>
  </el-drawer>
</div>
@@ -70,22 +70,7 @@
          value:4
        },
      ],
      list:[
        // {
        //   messageType:1,
        //   theme:'测试标题',
        //   createTime: '2019-08-30 15:46:17',
        //   createUser:'<USERNAME>',
        //   viewStatus:false,
        // },
        // {
        //   messageType:2,
        //   theme:'测试标题',
        //   createTime: '2019-08-30 15:46:17',
        //   createUser:'<USERNAME>',
        //   viewStatus:true,
        // },
      ],
      list:[],
      currentPage:1,
      pageSize: 8, // 一页7条
      total: null,