王震
2023-12-13 67da82f0b0c24df5f19bbfcfec63801d9ae902d8
src/views/product/workbench/product-record-form.vue
@@ -10,7 +10,7 @@
  >
    <div class="product-record-form-header">
      <div>
        <span>生产模板</span>
        <span>记录模板:</span>
        <el-select
          v-model="selectedTemplateId"
          placeholder="生产记录模板"
@@ -63,7 +63,7 @@
        </div>
      </div>
    </div>
    <div class="product-record-form-header">
    <!-- <div class="product-record-form-header">
      <div>
        <span>分割模板</span>
        <el-select
@@ -117,9 +117,9 @@
          </el-input>
        </div>
      </div>
    </div>
    </div> -->
    <div class="table">
      <div class="table-sn">
      <!-- <div class="table-sn">
        <el-table :data="outputPartsList" :border="true">
          <el-table-column label="序号" type="index"></el-table-column>
          <el-table-column label="SN号">
@@ -138,7 +138,7 @@
            </template>
          </el-table-column>
        </el-table>
      </div>
      </div> -->
      <div class="table-product">
        <el-table
          ref="productRecordFormTable"
@@ -219,7 +219,7 @@
    flex: 0.35;
  }
  .table-product {
    flex: 0.6;
    flex: 1;
  }
}
.product-record-form-table >>> .stripe-row {
@@ -395,7 +395,6 @@
          endTime: this.endTime
          //   criteria: JSON.stringify(obj)
        }).then((res) => {
          console.log(res.data.data.length)
          if (res.data.data.length) {
            const arr = []
            arr.push(res.data.data[0])
@@ -407,7 +406,6 @@
            this.scanArr.push(res.data.data[0].id)
            this.idList = [...new Set(this.scanArr)]
            this.part = null
            console.log(this.idList)
          }
        })
      }
@@ -472,7 +470,6 @@
          templateType: this.currTemplateType
        })
      ).then((response) => {
        console.log(response)
        this.paramTemplatesList = response.data.data.records
      })
    },
@@ -507,7 +504,6 @@
          this.params = JSON.parse(JSON.stringify(list))
        }
      })
      console.log(this.selectedTemplateId)
    },
    getParamValuesi() {
      this.params = []
@@ -524,7 +520,6 @@
          this.params = JSON.parse(JSON.stringify(list))
        }
      })
      console.log(this.selectedTemplateIds)
    },
    saveProductRecord() {
      this.saveDisabled = true
@@ -661,11 +656,8 @@
        // this.part = val.systemNo + '   ' + val.outBatchNo
        this.part = val.outBatchNo
        this.productOutId = val.id
        console.log(this.part)
        const forData = []
        console.log(val)
        forData.push(val)
        console.log(forData)
        for (let i = 0; i < forData.length; i++) {
          if (!this.produceList.some((e) => e.id === forData[i].id))
            this.produceList.push(forData[i])
@@ -692,8 +684,6 @@
          }
        }
        // this.idList = [...new Set(arr)]
        console.log(this.outputPartsList)
        console.log(this.idList)
      }
    },
    selectProductOutPuts(val) {
@@ -705,11 +695,8 @@
        // this.part = val.systemNo + '   ' + val.outBatchNo
        this.parts = val.partBatchNo
        this.productOutId = val.id
        console.log(this.parts)
        const forData = []
        console.log(val)
        forData.push(val)
        console.log(forData)
        for (let i = 0; i < forData.length; i++) {
          if (!this.cutApartList.some((e) => e.id === forData[i].id))
            this.cutApartList.push(forData[i])
@@ -735,12 +722,9 @@
          }
        }
        // this.idLists = [...new Set(arr)]
        console.log(this.outputPartsList)
        console.log(this.idLists)
      }
    },
    handleDelete(index, row) {
      console.log(index, row)
      this.outputPartsList = this.outputPartsList.filter(
        (item) => item.id !== row.id
      )
@@ -749,8 +733,6 @@
      this.produceList = this.produceList.filter((item) => item.id !== row.id)
      this.cutApartList = this.cutApartList.filter((item) => item.id !== row.id)
      console.log(this.idList)
      console.log(this.outputPartsList)
    },
    // 回车换行
    nextFocus(index) {
@@ -774,9 +756,7 @@
          this.paramObj.endTime = this.getNowFormatDate()
          this.paramObjs.startTime = this.getNowFormatDate()
          this.paramObjs.endTime = this.getNowFormatDate()
          console.log(123456)
        } else if (this.createDateRangeArr.length !== 0) {
          console.log(123456)
          this.paramObj.startTime = this.createDateRangeArr[0]
            .split('-')
            .join('')