Просмотр исходного кода

增加修改日报导入信息功能

seyason 1 год назад
Родитель
Сommit
142717e1ad
1 измененных файлов с 45 добавлено и 3 удалено
  1. 45 3
      fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

+ 45 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -1542,8 +1542,8 @@
                     <el-table-column  label="操作" v-if="user.companyId == 469 && user.roleName=='超级管理员'">
                         <template slot-scope="scope">
                             <div>
-                                <el-button type="default" size="small" @click="openModImportTime(scope.row)">修改导入时间</el-button>
-                                <!-- <el-button type="primary" @click="delImportTime(scope.row)">删除记录</el-button> -->
+                                <el-button type="default" size="small" @click="openModImportTime(scope.row)">修改导入记录</el-button>
+                                <el-button type="primary" size="small" @click="delImportTime(scope.row)">删除记录</el-button>
                             </div>
                         </template>
                     </el-table-column>
@@ -1699,7 +1699,7 @@
             <el-button @click="confirmBatchApproveReport" :loading="startDeleting" >审批通过</el-button>
             </span>
         </el-dialog>
-        <el-dialog title="修改导入时间" v-if="showModImportTimeDialog" :visible.sync="showModImportTimeDialog"  width="200">
+        <el-dialog title="修改导入记录" v-if="showModImportTimeDialog" :visible.sync="showModImportTimeDialog"  width="200">
             <div>
                 <span>选择时间:</span><el-date-picker 
                     v-model="modImportTime" 
@@ -1707,6 +1707,14 @@
                     :clearable="true" 
                     type="datetime" 
                     ></el-date-picker>
+                <span>选择导入人员:</span><el-select
+                    v-model="modImportUserId"
+                    >
+                    <el-option v-for="item in usersList" :key="item.id" :label="item.name" :value="item.id">
+                        <span v-if="user.userNameNeedTranslate == 1"><ww-open-data type='userName' :openid='item.name'></ww-open-data></span>
+                        <span v-else>{{item.name}}</span>
+                    </el-option>
+                </el-select>    
             </div>
             <span slot="footer">
             <el-button @click="confirmChangeModTime" >确认</el-button>
@@ -1826,6 +1834,7 @@
             return {
                 modItemDataId: null,
                 modImportTime: null,
+                modImportUserId: null,
                 showModImportTimeDialog: false,
                 showBatchSimpleApproveReport: false,
                 startDeleting: false,
@@ -2168,6 +2177,38 @@
                 this.showModImportTimeDialog = true;
                 this.modItemDataId = row.id;
             },
+            delImportTime(row) {
+                let rowId = row.id;
+                this.$confirm('您确定要删除该条记录吗?',this.$t('other.prompts'), {
+                    confirmButtonText: this.$t('btn.determine'),
+                    cancelButtonText: this.$t('btn.cancel'),
+                    type: "warning"
+                })
+                .then(() => {
+                    this.http.post('/report-import-log/delete',{ 
+                        id: rowId
+                    },res => {
+                        if (res.code == "ok") {
+                            this.$message({
+                                message: '删除成功',
+                                type: "success"
+                            });
+                            this.getToView();
+                        } else {
+                            this.$message({
+                                message: res.msg,
+                                type: "error"
+                            });
+                        }
+                    },error => {
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                        }
+                    );
+                }).catch(() => {this.startDeleting = false});
+            },
             confirmChangeModTime() {
                 if (this.modImportTime == null || this.modImportTime.length == 0) {
                     this.$message({
@@ -2178,6 +2219,7 @@
                 }
                 this.http.post('/report-import-log/changeTime',{ 
                         modLogDateTime: this.modImportTime,
+                        modImportUserId: this.modImportUserId,
                         id: this.modItemDataId
                     },res => {
                         if (res.code == "ok") {