licp
2024-09-10 cb57bc6b4abf45dbb0605c94359c63e3b31b4b87
优化报告生成、修改电路下单传参
已修改5个文件
已删除1个文件
2467 ■■■■■ 文件已修改
src/components/do/b1-inspect-order-plan/Inspection - workerjs加入前.vue 2389 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/circuit-parameters1.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/circuit-parameters2.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-report-preparation/order.vue 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/view/b1-inspect-order-plan.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/do/b1-inspect-order-plan/Inspection - workerjs¼ÓÈëǰ.vue
ÎļþÒÑɾ³ý
src/components/do/b1-inspect-order-plan/Inspection.vue
@@ -800,8 +800,8 @@
      <!-- ç”µè·¯è¯•验 -->
      <div v-else-if="tableLists.find(m=>m.templateId==currentTable).templateName.includes('电路试验')" style="width: 100%;overflow-x: auto;overflow-y: visible;">
        <!-- <Circuit></Circuit> -->
        <CircuitParameters1 v-if="currentTableState==0" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state"></CircuitParameters1>
        <CircuitParameters2 v-if="currentTableState==1" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state"></CircuitParameters2>
        <CircuitParameters1 v-if="currentTableState==0" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1"></CircuitParameters1>
        <CircuitParameters2 v-if="currentTableState==1" :insProduct="currentSample.insProduct" :orderId="id" :sampleId="currentSample.id" :state="state" :num="currentSample.num1"></CircuitParameters2>
      </div>
      <el-upload :action="action"
      :data="{
@@ -3319,7 +3319,8 @@
          if(this.param){
            this.$axios.post(this.$api.insOrderPlan.saveInsContext, {
              param: JSON.stringify(this.param),
              currentTable:this.currentTable
              currentTable:this.currentTable,
              num:this.currentSample.num1
            }).then(res => {
              if (res.code == 201) {
                this.$message.error('保存失败')
src/components/do/b1-inspect-order-plan/circuit-parameters1.vue
@@ -261,7 +261,7 @@
<script>
export default {
  props:['insProduct','orderId','sampleId','state'],
  props:['insProduct','orderId','sampleId','state','num'],
  data() {
    return {
      value: "",
@@ -396,7 +396,7 @@
    // åˆå§‹åŒ–数据
    initData(){
      // å¤„理项目
      this.insProductNew = JSON.parse(JSON.stringify(this.insProduct))
      this.insProductNew = JSON.parse(JSON.stringify(this.insProduct)).filter(m=>m.inspectionItem.includes('电路试验'))
      this.insProductNew.forEach(async item => {
        // èŽ·å–è®¾å¤‡åˆ—è¡¨
        item.equipOptions = await this.getEquipOptions(item)
@@ -450,7 +450,8 @@
                  often:n.often,
                  equipName:n.equipName,
                  equipValue:n.equipValue,
                  frequency:n.frequency
                  frequency:n.frequency,
                  sonLaboratory:item.sonLaboratory
                }
                this.$set(obj,'portList', n.port?portList:[])
                this.$set(obj,'angleList', n.angle?angleList:[])
@@ -533,7 +534,8 @@
          }).then(() => {
            this.$axios.post(this.$api.insOrderPlan.deleteInsContext, {
              frequency:list[index].band,
              productIds:list[index].projectList.map(m=>m.id)
              productIds:list[index].projectList.map(m=>m.id),
              num:this.num
            }, {
            headers: {
              'Content-Type': 'application/json'
@@ -585,7 +587,6 @@
        list.splice(index+1, 0, obj)
      }else if(type=='频段'){
        let obj = JSON.parse(JSON.stringify(list[0]));
        console.log(2222,obj)
        obj.band = ''
        obj.projectList.forEach(item=>{
          item.often = ''
src/components/do/b1-inspect-order-plan/circuit-parameters2.vue
@@ -180,7 +180,7 @@
<script>
export default {
  props:['insProduct','orderId','sampleId','state'],
  props:['insProduct','orderId','sampleId','state','num'],
  data() {
    return {
      value: "",
@@ -287,7 +287,7 @@
    // åˆå§‹åŒ–数据
    initData(){
      // å¤„理项目
      this.insProductNew = JSON.parse(JSON.stringify(this.insProduct))
      this.insProductNew = JSON.parse(JSON.stringify(this.insProduct)).filter(m=>m.inspectionItem.includes('电路试验'))
      this.insProductNew.forEach(async item => {
        // èŽ·å–è®¾å¤‡åˆ—è¡¨
        item.equipOptions = await this.getEquipOptions(item)
@@ -343,7 +343,8 @@
                  often:n.often,
                  equipName:n.equipName,
                  equipValue:n.equipValue,
                  frequency:n.frequency
                  frequency:n.frequency,
                  sonLaboratory:item.sonLaboratory
                }
                this.$set(obj,'portList', n.port?portList:[])
                this.$set(obj,'angleList', n.angle?angleList:[])
@@ -431,7 +432,8 @@
          }).then(() => {
            this.$axios.post(this.$api.insOrderPlan.deleteInsContext, {
              frequency:list[index].band,
              productIds:list[index].projectList.map(m=>m.id)
              productIds:list[index].projectList.map(m=>m.id),
              num:this.num
            }, {
            headers: {
              'Content-Type': 'application/json'
@@ -483,7 +485,6 @@
        list.splice(index+1, 0, obj)
      }else if(type=='频段'){
        let obj = JSON.parse(JSON.stringify(list[0]));
        console.log(2222,obj)
        obj.band = ''
        obj.projectList.forEach(item=>{
          item.often = ''
src/components/do/b1-report-preparation/order.vue
@@ -159,36 +159,49 @@
            cancelButtonText: "不生成",
            type: "success",
            distinguishCancelAndClose: true,
          }).then(() => {
            this.$axios.post(this.$api.insReport.isReport, {
              id:row.id,
              state:1
            }).then(res => {
              if (res.code === 201) {
                return
              }
              this.$message.success("已生成")
              this.refreshTable()
            }).catch(err => {
              console.log(err)
            })
          }).catch((e) => {
            console.log(e)
            if(e=='cancel'){
            beforeClose: (action, instance, done) => {
            if (action === 'confirm') {
              instance.confirmButtonLoading = true;
              this.$axios.post(this.$api.insReport.isReport, {
                id:row.id,
                state:1
              }).then(res => {
                instance.confirmButtonLoading = false;
                if (res.code === 201) {
                  return
                }
                this.$message.success("已生成")
                this.refreshTable()
                done();
              }).catch(err => {
                console.log(err)
                instance.confirmButtonLoading = false;
              })
            } else if(action === 'cancel'){
              instance.cancelButtonLoading = true;
              this.$axios.post(this.$api.insReport.isReport, {
                id:row.id,
                state:0
              }).then(res => {
                instance.cancelButtonLoading = false;
                if (res.code === 201) {
                  return
                }
                this.refreshTable()
                done();
                this.$message.success("已取消生成")
              }).catch(err => {
                instance.cancelButtonLoading = false;
                console.log(err)
              })
            }else{
              done();
            }
          }
          }).then(() => {
          }).catch((e) => {
            console.log(e)
          })
    }
  }
src/components/view/b1-inspect-order-plan.vue
@@ -792,10 +792,10 @@
          inspectorList.push(user.name)
        }
        this.inspectorList = inspectorList
        this.state = 1;
                this.orderId = row.id
        this.version = row.version
        this.orderStateId = row.orderStateId
        this.state = 1;
      },
      handleConnect(row){
        this.orderId = row.id