zouyu
2023-12-27 4e2bb29096ac63837f8d2c5e25766ee094f45d6c
src/views/plan/manufacturingorder/auto-operationtask.vue
@@ -25,7 +25,7 @@
        prop="operationName"
        label="工序"
        align="center"
        width="80px"
        min-width="80px"
        show-overflow-tooltip
      >
      </el-table-column>
@@ -33,8 +33,7 @@
        prop="workCenter"
        label="工作中心"
        align="center"
        width="200px"
        show-overflow-tooltip
        min-width="220px"
      >
        <template slot-scope="scope">
          <el-select
@@ -54,11 +53,12 @@
          </el-select>
        </template>
      </el-table-column>
      <el-table-column prop="workstationId" label="工作站" align="center">
      <el-table-column prop="workstationId" min-width="150" label="工作站" align="center">
        <template slot-scope="scope">
          <el-select
            v-model="scope.row.workstationId"
            filterable
            :visible-change="initWorkStation"
            placeholder="请选择工作站"
            style="width:100%"
            clearable
@@ -74,7 +74,7 @@
          </el-select>
        </template>
      </el-table-column>
      <el-table-column prop="locationId" label="库位" align="center">
     <!--  <el-table-column prop="locationId" label="库位" align="center">
        <template slot-scope="scope">
          <el-select
            v-model="scope.row.locationId"
@@ -92,11 +92,12 @@
            </el-option>
          </el-select>
        </template>
      </el-table-column>
      </el-table-column> -->
      <el-table-column
        prop="partNo"
        label="零件号"
        align="center"
        min-width="150"
        show-overflow-tooltip
      >
      </el-table-column>
@@ -104,10 +105,11 @@
        prop="partName"
        label="零件名称"
        align="center"
        min-width="150"
        show-overflow-tooltip
      >
      </el-table-column>
      <el-table-column prop="plannedQuantity" label="计划数量" align="center">
      <el-table-column prop="plannedQuantity" min-width="100" label="计划数量" align="center">
        <template slot-scope="scope">
          <el-input
            v-model="scope.row.plannedQuantity"
@@ -124,7 +126,7 @@
      </el-table-column>
      <el-table-column prop="sunit" label="单位2" align="center">
      </el-table-column> -->
      <el-table-column prop="reelSpec" label="载具规格" align="center">
     <!--  <el-table-column prop="reelSpec" label="载具规格" align="center">
        <template slot-scope="scope">
          <el-input v-model="scope.row.reelSpec"></el-input>
        </template>
@@ -133,8 +135,8 @@
        <template slot-scope="scope">
          <el-input v-model="scope.row.discNum"></el-input>
        </template>
      </el-table-column>
      <el-table-column prop="remark" label="备注" align="center">
      </el-table-column> -->
      <el-table-column prop="remark" min-width="150" label="备注" align="center">
        <template slot-scope="scope">
          <el-input v-model="scope.row.remark"></el-input>
        </template>
@@ -143,7 +145,7 @@
        prop="plannedStartDate"
        label="计划开始时间"
        align="center"
        width="200px"
        min-width="200px"
      >
        <template slot-scope="scope">
          <el-date-picker
@@ -160,7 +162,7 @@
        prop="plannedFinishDate"
        label="计划完成时间"
        align="center"
        width="200px"
        min-width="200px"
      >
        <template slot-scope="scope">
          <el-date-picker
@@ -177,7 +179,7 @@
        prop="manufactureAttr"
        label="制造属性"
        align="center"
        width="100px"
        min-width="150px"
        show-overflow-tooltip
      >
        <template slot-scope="scope">
@@ -197,7 +199,7 @@
          </el-select>
        </template>
      </el-table-column>
      <el-table-column label="操作" width="100" align="center">
      <el-table-column label="操作" fixed="right" width="100" align="center">
        <template slot-scope="scope">
          <el-button @click="copyTask(scope.row)" type="text" size="small"
            >复制</el-button
@@ -274,6 +276,15 @@
    this.getManufactureAttrs('manufacture_attr_type')
  },
  methods: {
    initWorkStation(opName,arr){
      let workId = null
      arr.forEach(ele=>{
        if(ele.name.indexOf(opName)>-1){
          workId = ele.id
        }
      })
      return workId
    },
    getManufactureAttrs(type) {
      remote(type).then((response) => {
        const code = response.data.code
@@ -527,7 +538,6 @@
  },
  watch: {
    currshowlist() {
      console.log('orderId', this.orderId)
      this.innerVisible = this.currshowlist
      if (this.selectionArray && this.selectionArray.length > 0) {
        this.operationTaskType = this.selectionArray[0].workshopTypeCode
@@ -541,12 +551,11 @@
            const resData = response.data
            if (resData.code === 0) {
              const autoTaskList = resData.data
              console.log(this.selectionArray)
              autoTaskList.forEach((item) => {
                this.operationData.push({
                  operationName: item.operationName,
                  workCenter: item.workCenter,
                  workstationId: item.workstationId,
                  workstationId: item.workstationId ? item.workstationId : this.initWorkStation(item.operationName,item.workstations),
                  locationId: item.locationId,
                  partNo: item.partNo,
                  partName: item.partName,