loulijun2021
2022-11-07 68e417e94ab4c97e13d24522d748fc032f4865af
1.工艺路线新增复制功能2.节拍工价编辑问题处理
已修改5个文件
382 ■■■■ 文件已修改
src/lib/v-gantt-chart/lib/components/time-line/index.vue 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scgl/cngh.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/scgl/zdpc.vue 250 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zzmx/gylx.vue 55 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/zzmx/jpgj.vue 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/lib/v-gantt-chart/lib/components/time-line/index.vue
@@ -150,14 +150,14 @@
          throw new TypeError('错误的计算类型')
      }
      while (!a.isAfter(b)) {
        if (scale >= 60) {
          totalblock.push(a.format('HH'))
        } else {
          totalblock.push(a.format('HH:mm'))
        }
        // if (scale >= 60) {
        //   totalblock.push(a.format('HH'))
        // } else {
        totalblock.push(a.format('HH:mm'))
        // }
        a = a.add(scale, 'minute')
      }
      // console.log(1, totalblock)
      return totalblock
    }
  }
src/views/scgl/cngh.vue
@@ -13,7 +13,7 @@
          inline
          style="display: flex;justify-content: space-between"
        >
          <div class="elForm" style="justify-content: flex-start">
          <div class="elForm">
            <el-form-item label-width="70px" label="生产车间" style=" display: flex;">
              <el-select
                v-model="form.workshop"
src/views/scgl/zdpc.vue
@@ -57,7 +57,6 @@
              <el-radio
                v-model="radioSelectedId"
                :label="row.id"
                style="color: transparent;padding-left: 10px;"
                @change.native="getCurrentRowTop(row.id)"
              />
            </template>
@@ -347,7 +346,7 @@
      radio: '',
      formBottom: {
        value1: ['2022-11-05', '2022-11-12'], // 排程日期
        value1: ['2022-11-07', '2022-11-12'], // 排程日期
        types: 'N', // 排程方式
        scale: 60, // 时间刻度
        times: 0, // 换型时间
@@ -438,70 +437,6 @@
        },
        'rows': [
          {
            'YearDate': '2022-11-03',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
                'AdvaDevicName': '金鼎数控车床029',
                'AdvaDevicCropMob': '78',
                'AdvaDevicRhythm': '10',
                'OneStartDate': '08:00~11:30',
                'TwoStartDate': '12:30~17:00',
                'ThreeStartDate': '',
                'FourStartDate': '',
                'FiveStartDate': ''
              }
            ]
          },
          {
            'YearDate': '2022-11-04',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
                'AdvaDevicName': '金鼎数控车床029',
                'AdvaDevicCropMob': '78',
                'AdvaDevicRhythm': '10',
                'OneStartDate': '08:00~11:30',
                'TwoStartDate': '12:30~17:00',
                'ThreeStartDate': '',
                'FourStartDate': '',
                'FiveStartDate': ''
              }
            ]
          },
          {
            'YearDate': '2022-11-05',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
                'AdvaDevicName': '金鼎数控车床029',
                'AdvaDevicCropMob': '78',
                'AdvaDevicRhythm': '10',
                'OneStartDate': '08:00~11:30',
                'TwoStartDate': '12:30~17:00',
                'ThreeStartDate': '',
                'FourStartDate': '',
                'FiveStartDate': ''
              }
            ]
          },
          {
            'YearDate': '2022-11-06',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
                'AdvaDevicName': '金鼎数控车床029',
                'AdvaDevicCropMob': '78',
                'AdvaDevicRhythm': '10',
                'OneStartDate': '08:00~11:30',
                'TwoStartDate': '12:30~17:00',
                'ThreeStartDate': '',
                'FourStartDate': '',
                'FiveStartDate': ''
              }
            ]
          },
          {
            'YearDate': '2022-11-07',
            'children': [
              {
@@ -519,6 +454,70 @@
          },
          {
            'YearDate': '2022-11-08',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
                'AdvaDevicName': '金鼎数控车床029',
                'AdvaDevicCropMob': '78',
                'AdvaDevicRhythm': '10',
                'OneStartDate': '08:00~11:30',
                'TwoStartDate': '12:30~17:00',
                'ThreeStartDate': '',
                'FourStartDate': '',
                'FiveStartDate': ''
              }
            ]
          },
          {
            'YearDate': '2022-11-09',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
                'AdvaDevicName': '金鼎数控车床029',
                'AdvaDevicCropMob': '78',
                'AdvaDevicRhythm': '10',
                'OneStartDate': '08:00~11:30',
                'TwoStartDate': '12:30~17:00',
                'ThreeStartDate': '',
                'FourStartDate': '',
                'FiveStartDate': ''
              }
            ]
          },
          {
            'YearDate': '2022-11-10',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
                'AdvaDevicName': '金鼎数控车床029',
                'AdvaDevicCropMob': '78',
                'AdvaDevicRhythm': '10',
                'OneStartDate': '08:00~11:30',
                'TwoStartDate': '12:30~17:00',
                'ThreeStartDate': '',
                'FourStartDate': '',
                'FiveStartDate': ''
              }
            ]
          },
          {
            'YearDate': '2022-11-11',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
                'AdvaDevicName': '金鼎数控车床029',
                'AdvaDevicCropMob': '78',
                'AdvaDevicRhythm': '10',
                'OneStartDate': '08:00~11:30',
                'TwoStartDate': '12:30~17:00',
                'ThreeStartDate': '',
                'FourStartDate': '',
                'FiveStartDate': ''
              }
            ]
          },
          {
            'YearDate': '2022-11-12',
            'children': [
              {
                'AdvaDevicNumber': 'LKFDL_SC-PC029',
@@ -1891,31 +1890,10 @@
  width: 100px;
}
.top-bar {
  /* height: 30px; */
  margin-bottom: 20px;
}
.container {
  display: flex;
  flex-direction: column;
  flex: 1;
}
.main-footer {
  /* height: 30px; */
}
.ib {
  display: inline-block;
}
.w250 {
  width: 250px;
}
.el-slider {
  width: 100px;
}
.tc {
@@ -1933,11 +1911,6 @@
  align-items: center;
}
.colorBar {
  width: 10px;
  height: 100%;
}
.carId {
  flex: 1;
}
@@ -1945,63 +1918,6 @@
.tc {
  color: #909399;
  font-size: 14px;
}
.type {
  padding: 0 5px 0 0;
  font-size: 1.2rem;
}
.t_size {
  font-size: 14px;
}
.icon_true {
  height: 8px;
  display: inline-block;
  width: 8px;
  background: #00a79d;
  margin-right: 7px;
  border-radius: 15px;
}
.icon_ty {
  height: 8px;
  display: inline-block;
  width: 8px;
  background: red;
  margin-right: 7px;
  border-radius: 15px;
}
.icon_gz {
  height: 8px;
  display: inline-block;
  width: 8px;
  background: yellow;
  margin-right: 7px;
  border-radius: 15px;
}
/* .el-col-offset-1 {
    margin-left: 0.5% !important;
} */
.marginLeft {
  margin-left: 15px;
}
.button_style {
  background: #00a79d;
  color: #ffff;
  border-color: #00a79d;
}
.rg {
  float: right;
}
.color {
  color: #909399;
}
</style>
@@ -2138,3 +2054,39 @@
}
</style>
<!--<style>-->
<!--input[type=range]:focus {-->
<!--  display: none;-->
<!--}-->
<!--input[type=range] {-->
<!--  -webkit-appearance: none;-->
<!--  width: 500px;-->
<!--  border-radius: 10px;-->
<!--  /*这个属性设置使填充进度条时的图形为圆角*/-->
<!--}-->
<!--input[type=range]::-webkit-slider-runnable-track {-->
<!--  height: 20px;-->
<!--  border-radius: 10px;-->
<!--  /*将轨道设为圆角的*/-->
<!--  /* box-shadow: 0 1px 1px #def3f8, inset 0 .125em .125em #0d1112; */-->
<!--  border: solid 1px red;-->
<!--}-->
<!--input[type=range]::-webkit-slider-thumb {-->
<!--  -webkit-appearance: none;-->
<!--  height: 30px;-->
<!--  width: 120px;-->
<!--  margin-top: -5px;-->
<!--  /*使滑块超出轨道部分的偏移量相等*/-->
<!--  background: #ffffff;-->
<!--  /* border-radius: 50%; */-->
<!--  /*外观设置为圆形*/-->
<!--  border: solid 0.125em rgba(205, 224, 230, 0.5);-->
<!--  /*设置边框*/-->
<!--  /* box-shadow: 0 .125em .125em #3b4547; */-->
<!--  /*添加底部阴影*/-->
<!--}-->
<!--</style>-->
src/views/zzmx/gylx.vue
@@ -125,7 +125,10 @@
                  />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="删除" placement="top">
                  <i class="el-icon-delete" @click="del(row)" />
                  <i class="el-icon-delete" style="margin-right:15px;" @click="del(row)" />
                </el-tooltip>
                <el-tooltip v-del-tab-index class="item" effect="dark" content="复制" placement="top">
                  <i class="el-icon-document-copy" style="cursor: pointer;color:#42b983" @click="copy('copy',row)" />
                </el-tooltip>
              </div>
            </template>
@@ -145,7 +148,7 @@
    </div>
    <el-dialog
      :title="operation==='add'?'新增':'预览'"
      :title="operation==='add'?'新增':(operation==='edit'?'预览':'复制')"
      :visible.sync="dialogVisible"
      width="1000px"
      :close-on-click-modal="false"
@@ -156,7 +159,7 @@
      <el-form ref="dialogForm" style="height: 500px" :rules="dialogFormRules" :model="dialogForm" label-width="110px">
        <div style="display: flex">
          <el-form-item label="工艺路线编码" prop="code" style="margin-right: 20px">
            <el-input v-model="dialogForm.code" :disabled="operation!=='add'" style="width: 220px" />
            <el-input v-model="dialogForm.code" :disabled="operation==='edit'" style="width: 220px" />
          </el-form-item>
          <el-form-item label="工艺名称" prop="name">
            <el-input v-model="dialogForm.name" :disabled="operation==='edit'" style="width: 220px" />
@@ -346,7 +349,7 @@
      routeArr: [], // 工艺设置下拉所有值
      routeSelectedArr: [], // 工艺设置下拉已选的值
      addDisabled: true, // 添加按钮是否可点击
      editDisabled: true, // 修改按钮是否可点击
      // editDisabled: true, // 修改按钮是否可点击
      mouseFocusPosition: 0, // 鼠标聚焦的位置
      operation: '',
      dialogFormRules: {
@@ -444,6 +447,7 @@
            stepname: item.stepname,
            value: item.value
          })
          console.log(this.routeSelectedArr, 7)
          this.routeArr.splice(index, 1)
        }
      })
@@ -685,6 +689,43 @@
        this.$message.info('已取消删除')
      })
    },
    // 复制按钮
    async  copy(operation, row) {
      this.operation = operation
      this.dialogVisible = true
      await this.getStepSelectArr()
      const { data: res } = await ViewRoute({ routecode: row.code })
      // 待改
      this.dynamicTags = []
      this.routeSelectedArr = []
      this.$nextTick(() => {
        this.dialogForm.code = res[0].code
        this.dialogForm.name = res[0].name
        this.dialogForm.enable = res[0].enable
        this.dialogForm.description = res[0].description
        // this.dialogForm.Data = row.description
        res[0].Data.forEach(item => {
          this.dynamicTags.push(
            { seq: item.seq, stepname: item.stepname, stepcode: item.stepcode, editDisabled: true, effect: 'light' }
          )
          this.routeSelectedArr.push({
            stepcode: item.stepcode,
            stepname: item.stepname,
            value: item.stepname
          })
          console.log(item, 2)
          console.log(this.routeArr)
          this.routeArr = this.routeArr.filter(i => i.stepcode !== item.stepcode)
        })
        this.addDisabled = false
        // { editDisabled: true, stepcode: '', seq: 1, stepname: ' ', effect: 'light' }
      })
    },
    // 对话框关闭事件
    handleClose() {
      this.dialogForm.code = ''
@@ -731,14 +772,14 @@
            Data: Data
          }
          AddUpdateRoute(this.dialogForm.id, this.operation === 'add' ? 'Add' : 'Update', data).then(res => {
          AddUpdateRoute(this.dialogForm.id, this.operation === 'edit' ? 'Update' : 'Add', data).then(res => {
            if (res.code === '200') {
              this.dialogVisible = false
              this.$message.success(this.operation === 'add' ? '添加成功!' : '修改成功!')
              this.$message.success(this.operation === 'add' ? '添加成功!' : '复制成功!')
              this.getRouteSearch()
              this.$store.state.app.buttonIsDisabled = false
            } else {
              this.$message.error(this.operation === 'add' ? '添加失败!' : '修改失败!')
              this.$message.error(this.operation === 'add' ? '添加失败!' : '复制失败!')
            }
          })
        }
src/views/zzmx/jpgj.vue
@@ -256,7 +256,6 @@
              style="width: 220px"
              placeholder="请选择"
              :popper-append-to-body="false"
              @change="partDialogChange"
            >
              <!--              @focus="getPartSelect2"-->
@@ -328,14 +327,15 @@
          class="tableFixed"
          :data="eqpDialogArr"
          :height="tableHeight"
          :style="{width: 100+'%',height:tableHeight-50+'px',}"
          :style="{width: 100+'%',height:tableHeight-50+'px'}"
          border
          :row-class-name="tableRowClassName"
          highlight-current-row
          :header-cell-style="this.$headerCellStyle"
          :cell-style="this.$cellStyle"
          highlight-current-row
          @sort-change="dialogSortChange"
        >
          <!--          @row-click="rowClick"-->
          <el-table-column
            width="50"
            label="序号"
@@ -431,10 +431,10 @@
          >
            <template slot-scope="{row}">
              <div class="operationClass">
                <el-button v-if="row.isVisible===1" type="text" @click="saveRow(row)">保存</el-button>
                <el-button v-if="row.isVisible===1" type="text" @click="cancelRow(row)">取消</el-button>
                <el-button v-if="row.isVisible===0" type="text" @click="editRow(row)">编辑</el-button>
                <el-button v-if="row.isVisible===0" type="text" @click="copyRow(row)">复制</el-button>
                <el-button v-show="row.isVisible===1" type="text" @click="saveRow(row)">保存</el-button>
                <el-button v-show="row.isVisible===1" type="text" @click="cancelRow(row)">取消</el-button>
                <el-button v-show="row.isVisible===0" type="text" @click="editRow(row)">编辑</el-button>
                <el-button v-show="row.isVisible===0" type="text" @click="copyRow(row)">复制</el-button>
              </div>
            </template>
          </el-table-column>
@@ -639,6 +639,7 @@
      this.routeDialogArr = res
      this.stepDialogArr = []
      this.eqpDialogArr = []
      this.dialogForm.routecode = ''
    },
    async routeDialogChange(val) {
      const { data: res } = await RouteSelectStep({ routecode: val })
@@ -668,12 +669,14 @@
        this.eqpTable.partcode = this.dialogForm.partcode
        this.eqpTable.routecode = this.dialogForm.routecode
        this.eqpTable.stepcode = this.stepDialogArr.find(item => item.name === val).code
      } else if (typeof val === 'number') {
      // } else if (typeof val === 'number') {
      } else {
        this.eqpTable.partcode = this.dialogForm.partcode
        this.eqpTable.routecode = this.dialogForm.routecode
        this.eqpTable.stepcode = this.stepDialogArr[0].code
        this.dialogForm.stepcode = this.stepDialogArr[0].name
      }
      const res = await StepSelectEqpList(this.eqpTable)
      this.eqpDialogArr = res.data
      this.eqpTableLength = res.count
@@ -714,13 +717,26 @@
    editRow(row) {
      if (this.isEqpTableEdit) {
        row.isVisible = 1
        let temp = {}
        this.eqpDialogArr.forEach((item, index) => {
          if (row.eqpcode === item.eqpcode) {
            temp = item
            this.eqpDialogArr.splice(index, 1, temp)
            this.eqpDialogArr[index].isVisible = 1
          }
        })
        this.isEqpTableEdit = false
      } else {
        return this.$message.info('只能一行一行修改!')
      }
    },
    // rowClick(row, column, event) {
    //   console.log(row, column, event, 3)
    //   console.log(this.dialogForm.stepcode, 4)
    //   this.getEqpTable(this.dialogForm.stepcode)
    // },
    // 复制行
    async  copyRow(row) {
    async copyRow(row) {
      let currentData = {}// 当前行对象
      let nextData = {}// 下一行对象
      if (row.RowNum === this.eqpDialogArr.length) {
@@ -775,7 +791,7 @@
      this.getPartSelect2()
    },
    // 修改按钮
    async  edit(operation, row) {
    async edit(operation, row) {
      this.operation = operation
      this.dialogVisible = true
@@ -783,13 +799,11 @@
      this.editRouteName = row.route_name
      this.editStepName = row.stepname
      // this.$nextTick(() => {
      await this.partDialogChange(row.partcode)
      await this.routeDialogChange(row.route_code)
      this.dialogForm.partcode = row.partcode
      this.dialogForm.routecode = row.route_code
      this.dialogForm.stepcode = row.stepcode
      // })
      await this.partDialogChange(row.partcode)
      await this.routeDialogChange(row.route_code)
      await this.radioChange(0)
    },
    // 删除按钮
@@ -889,15 +903,17 @@
<!--公共页面样式-->
<style lang="scss" scoped>
$main_color: #42b983;
.el-button--text{
.el-button--text {
  font-size: 14px;
  cursor: pointer;
}
.el-icon-share ,.el-icon-delete,.el-icon-edit-outline{
.el-icon-share, .el-icon-delete, .el-icon-edit-outline {
  color: $main_color;
  cursor: pointer;
}
.el-icon-edit-outline{
.el-icon-edit-outline {
  margin-right: 15px;
}
@@ -958,8 +974,8 @@
  background-color: #f8f8fa;
}
::v-deep .el-table__body .el-table__row.hover-row td{
  background-color: #eaecef ;
::v-deep .el-table__body .el-table__row.hover-row td {
  background-color: #eaecef;
}
::v-deep .el-form--inline .el-form-item__label {
@@ -975,14 +991,17 @@
.body ::v-deep .el-form-item {
  margin-bottom: 0;
}
.userDialogVisible ::v-deep .el-form-item {
  margin-bottom: 0;
}
.tableFixed{
  ::v-deep .el-table__fixed-right{
.tableFixed {
  ::v-deep .el-table__fixed-right {
    height: 100% !important;
  }
  ::v-deep .el-table__fixed{
  ::v-deep .el-table__fixed {
    height: 100% !important;
  }
}