loulijun2021
2022-08-29 1d739783b70e11e964d86a882b00c20d2e000997
src/views/kb/zhkb.vue
@@ -415,7 +415,12 @@
                    prop="saleOrderCode"
                    label="销售订单号"
                    width="158"
                  />
                  >
                    <template slot-scope="{row}">
                      <div v-if="row.saleOrderCode">{{ row.saleOrderCode }}</div>
                      <div v-else>/</div>
                    </template>
                  </el-table-column>
                  <el-table-column
                    prop="wo_code"
                    label="加工单号"
@@ -607,7 +612,8 @@
      leftTopData: [],
      tableData: [],
      tableDataRank: []
      tableDataRank: [],
      lineCodeArr: []
    }
  },
@@ -637,6 +643,7 @@
      this.lineArr.forEach((item, index) => {
        // if (index === 0) {
        this.handleEveryLine(item, index)
        this.lineCodeArr.push(item.code)
        // }
      })
    },
@@ -645,16 +652,16 @@
      const res = await LineSearchTopLeftData([item])
      console.log(res, 7)
      let res1, res2, res3, res4
      if (res.data[0].linecode === 'CXSB001') {
      if (res.data[0].linecode === this.lineCodeArr[0]) {
        res1 = res
      }
      if (res.data[0].linecode === 'CXSB002') {
      if (res.data[0].linecode === this.lineCodeArr[1]) {
        res2 = res
      }
      if (res.data[0].linecode === 'CXSB003') {
      if (res.data[0].linecode === this.lineCodeArr[2]) {
        res3 = res
      }
      if (res.data[0].linecode === 'CXSB004') {
      if (res.data[0].linecode === this.lineCodeArr[3]) {
        res4 = res
      }
@@ -683,7 +690,8 @@
          }
          // console.log(res1.data[0].children.length, 9999)
          // console.log(res1.data[0].children, 8888)
          if (res1.data[0].children.length > 0 && res1.data[0].children.length === count++) {
          // if (res1.data[0].children.length > 0 && res1.data[0].children.length === count++) {
          if (res1.data[0].children.length === count++) {
            count = 0
            LineSearchTopLeftData([item]).then(res => {
              res1 = res
@@ -714,7 +722,7 @@
              children: res2.data[0].children ? res2.data[0].children[count] : []
            }
          }
          if (res2.data[0].children.length > 0 && res2.data[0].children.length === count++) {
          if (res2.data[0].children.length === count++) {
            count = 0
            LineSearchTopLeftData([item]).then(res => {
              res2 = res
@@ -746,7 +754,7 @@
              children: res3.data[0].children ? res3.data[0].children[count] : []
            }
          }
          if (res3.data[0].children.length > 0 && res3.data[0].children.length === count++) {
          if (res3.data[0].children.length === count++) {
            count = 0
            LineSearchTopLeftData([item]).then(res => {
              res3 = res
@@ -777,7 +785,8 @@
              children: res4.data[0].children ? res4.data[0].children[count] : []
            }
          }
          if (res4.data[0].children > 0 && res4.data[0].children.length === count++) {
          // if (res4.data[0].children > 0 && res4.data[0].children.length === count++) {
          if (res4.data[0].children.length === count++) {
            count = 0
            LineSearchTopLeftData([item]).then(res => {
              res4 = res