zenglf
2023-08-19 8611a1ba1696e76cced04ff5d658ba138a05dafd
src/views/eam/modules/specialtyMaintenanceOrder/ActualWorkHoursEditTable.vue
@@ -42,7 +42,7 @@
        slot='action'
        slot-scope='text, record,index'
      >
        <a @click="handleDeleteFake(index)">删除</a>
        <a @click="handleDelete(index)">删除</a>
      </span>
    </a-table>
    <a-button
@@ -230,7 +230,7 @@
  },
  methods: {
    addHour() {
      this.dataSource.push({ id:this.getUuiD(16),userId: '', maintenanceOrderId: this.dailyMaintenanceOrderId, actualWorkingHourQuota: 0, username: '', realname: '' })
      this.dataSource.push({ id: this.getUuiD(16), userId: '', maintenanceOrderId: this.dailyMaintenanceOrderId, actualWorkingHourQuota: 0, username: '', realname: '' })
    },
    handleCancel() {
      this.$bus.$emit('closeDrawer');
@@ -241,9 +241,13 @@
      this.disableSubmit = false;
      this.visible = false;
    },
    handleDeleteFake(index) {
      this.dataSource.splice(index,1);
    // handleDeleteFake(index) {
    //   this.dataSource.splice(index,1);
    // },
    handleDelete(text, record, index) {
      this.dataSource.splice(index, 1);
    },
    handleOk(saveStatus) {
      const that = this
      if (saveStatus == 0) {
@@ -267,7 +271,7 @@
        if (!err) {
          that.confirmLoading = true
          let formData = {}
          formData.maintenanceOrderId = that. specialyMaintenanceOrderId;
          formData.maintenanceOrderId = that.specialyMaintenanceOrderId;
          formData.maintenanceOrderActualWorkingHourList = that.dataSource;
          formData.equipmentId = that.equipmentId;
          let obj = obj = postAction(this.url.confirmHour, formData)
@@ -322,7 +326,7 @@
      this.dataSource = [];
      this.ipagination.current = 1
    },
    getUuiD(randomLength){
    getUuiD(randomLength) {
      return Number(
        Math.random()
          .toString()