zss
2024-01-31 ca24e514400e386de5066ec6e423d7fd2de43f65
src/views/plan/productionschedul/index.vue
@@ -10,37 +10,37 @@
                <div>
                  <el-button @click="tagFinished" size="mini" round type="success">标记已完成</el-button>
                  <el-button size="mini" round type="primary"
                  v-if="permissions.plan_productionschedul_edit_line"
                  v-if="permissions.plan_productionschedul_edit_line"
                  @click="openEditDialog">编辑时间线</el-button>
                  <el-tooltip content="刷新">
                    <el-button circle icon="el-icon-refresh" @click="getDataList"></el-button>
                  </el-tooltip>
                </div>
              </div>
              <avue-crud
              <avue-crud
              class="unfinished-crud"
              :data="tableData"
              ref="crud"
              :option="option"
              :span-method="spanMethod"
              :data="tableData"
              ref="crud"
              :option="option"
              :span-method="spanMethod"
              @refresh-change="getDataList"
              @current-change="handleCurrentChange"
              @size-change="handleSizeChange"
              :page="page"
              :page="page"
              @selection-change="selectionRow"
              :table-loading="loading">
              <template #menu="{ row, index }">
                <el-button
                v-if="permissions.plan_productionschedul_edit"
                type="text"
                icon="el-icon-edit"
                size="small"
                <el-button
                v-if="permissions.plan_productionschedul_edit"
                type="text"
                icon="el-icon-edit"
                size="small"
                @click="editHandle(row, index)">编辑</el-button>
                <el-button
                v-if="permissions.plan_productionschedul_del"
                type="text"
                icon="el-icon-delete"
                size="small"
                <el-button
                v-if="permissions.plan_productionschedul_del"
                type="text"
                icon="el-icon-delete"
                size="small"
                @click="deleteHandle(row, index)">删除</el-button>
              </template>
              </avue-crud>
@@ -51,25 +51,17 @@
              <div style="display:flex;height:36px;justify-content: space-between;align-items:center;">
                <div><span style="color:#34BD66;font-weight: bold;">已完成</span></div>
              </div>
              <avue-crud
              <avue-crud
              class="finished-crud"
              :data="finishedTableData"
              ref="finished"
              :option="finishedOption"
              :span-method="spanMethod"
              :data="finishedTableData"
              ref="finished"
              :option="finishedOption"
              :span-method="spanMethod"
              @refresh-change="getFinishedData"
              @current-change="handleCurrentChange"
              @size-change="handleSizeChange"
              :page="finishedPage"
              :page="finishedPage"
              @selection-change="selectionFinishedRow">
              <!-- <template #menu="{ row, index }">
                <el-button
                v-if="permissions.plan_productionschedul_del"
                type="text"
                icon="el-icon-delete"
                size="small"
                @click="deleteHandle(row, index)">删除</el-button>
              </template> -->
              </avue-crud>
            </el-col>
          </el-row>
@@ -110,8 +102,7 @@
    title="编辑时间线"
    :visible.sync="dialogVisible"
    top="5vh"
    width="50%"
    :before-close="handleClose">
    width="50%">
      <div style="height:60vh;overflow-y: scroll;">
        <el-timeline>
          <el-timeline-item
@@ -129,8 +120,8 @@
                      style="width:100%"
                      v-model="item.planTime"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      type="datetime"
                      placeholder="选择日期时间">
                      type="datetime"
                      placeholder="选择计划时间">
                    </el-date-picker>
                  </el-col>
                </el-row>
@@ -143,8 +134,8 @@
                      style="width:100%"
                      v-model="item.actualTime"
                      value-format="yyyy-MM-dd HH:mm:ss"
                      type="datetime"
                      placeholder="选择日期时间">
                      type="datetime"
                      placeholder="选择实际时间">
                    </el-date-picker>
                  </el-col>
                </el-row>
@@ -454,7 +445,7 @@
      }, {
        prop: 'contractNo',
        span: []
      },
      },
      {
        prop: 'orderTime',
        span: []
@@ -594,12 +585,6 @@
        "productActualTime": data[5].actualTime,
        "productPlanTime": data[5].planTime,
        "mids": mIds,
        // "contractNo": orderObj.contractNo,
        // "customerName": orderObj.customerName,
        // "deliveryDate": orderObj.deliveryDate,
        // "orderTime": orderObj.orderTime,
        // "productType": orderObj.productType,
        // "projectName": orderObj.projectName
      }
      fillTime(obj).then(res=>{
        if(res.status===200){
@@ -613,9 +598,6 @@
        console.error(error);
      })
    },
    handleClose(done){
      done()
    },
    initTimeLine(data){
      let scheduleList = []
@@ -666,15 +648,8 @@
      }
    },
    selectionRow(val){
      if (val.length > 1) {
        const preVal = val.shift();
        this.$refs.crud.toggleRowSelection(preVal, false);
      }
      else{
        this.scheduleList=[]
      }
      this.multipleSelection = val
      this.getScheduleById(val[0].mid)
      this.getScheduleById(val[val.length-1].mid)
    },
    selectionFinishedRow(val){
      if (val.length > 1) {