Browse Source

Merge branch 'dev' of http://172.16.100.139/new-business/drp-web into dev

DongZ 1 year ago
parent
commit
9e50b1f9df

+ 9 - 0
src/api/business/ehr/ehr/dept.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+// 查询部门列表
+export function listDept() {
+  return request({
+    url: '/ehr/ehr/dept/list',
+    method: 'get',
+  })
+}

+ 8 - 0
src/api/requisition/basic.js

@@ -193,4 +193,12 @@ export function classifyDetails(params) {
     method: 'get',
     method: 'get',
     params: params,
     params: params,
   })
   })
+}
+
+// 物料DI /system/apply/material/getDiCode/{dicode)
+export function getDiCode(dicode) {
+  return request({
+    url: `/system/apply/material/getDiCode/${dicode}`,
+    method: 'get',
+  })
 }
 }

+ 2 - 2
src/components/popover-tree-select/index.vue

@@ -142,8 +142,8 @@ export default {
     },
     },
     // query list
     // query list
     async useQuery(value) {
     async useQuery(value) {
-      await this.$refs.tree.filter(value);
-      // await this.fetchList(this.model);
+      // await this.$refs.tree.filter(value);
+      await this.fetchList(this.model);
     },
     },
     // auto
     // auto
     async useAutocomplete(prop, cb) {
     async useAutocomplete(prop, cb) {

+ 27 - 13
src/views/business/ehr/pm/adjustGrade/index.vue

@@ -91,20 +91,34 @@ export default {
     },
     },
     //调整分数
     //调整分数
     async btnAdjustMark(){
     async btnAdjustMark(){
-      try {
-        this.loading = true;
-        savePm(this.listData);
-        saveFlow(this.flow).then(response => {
-          if(response.code == 200){
-            this.$modal.msgSuccess("调整完成");
-            this.fetchFlow(this.$route.query.flowId);
+      this.$confirm("确认提交吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "info",
+        beforeClose: async (action, instance,done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+            instance.confirmButtonText = "执行中...";
+            try {
+              await savePm(this.listData);
+              const { msg, code } = await saveFlow(this.flow);
+              if (code === 200) {
+                this.$modal.msgSuccess("调整完成");
+                await this.fetchPerformance(this.id);
+              }
+            } catch (err) {
+              console.error(err);
+              instance.confirmButtonText = "确认";
+            } finally {
+              instance.confirmButtonLoading = false;
+              done();
+            }
+          }else{
+            done();
           }
           }
-        });
-      } catch (err) {
-        console.error(err);
-      } finally {
-        this.loading = false;
-      }
+        },
+      }).then(() => {})
+      .catch(() => {});
     },
     },
     //查询流程
     //查询流程
     async fetchFlow(id){
     async fetchFlow(id){

+ 0 - 0
src/views/business/ehr/pm/adjustMark/detail.vue → src/views/business/ehr/pm/adjustMark/detail111.vue


+ 1 - 3
src/views/business/ehr/pm/mark/detail.vue

@@ -15,9 +15,7 @@
           <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
           <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
           <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
           <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
           <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
           <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
-          <el-descriptions-item label="一级部门">{{form.oneDeptName}}</el-descriptions-item>
-          <el-descriptions-item label="二级部门">{{form.twoDeptName}}</el-descriptions-item>
-          <el-descriptions-item label="三级部门">{{form.threeDeptName}}</el-descriptions-item>
+          <el-descriptions-item label="部门">{{form.deptName}}</el-descriptions-item>
           <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
           <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
           <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
           <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
           <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
           <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>

+ 59 - 39
src/views/business/ehr/pm/performance/detail.vue

@@ -18,9 +18,7 @@
           <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
           <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
           <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
           <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
           <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
           <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
-          <el-descriptions-item label="一级部门">{{form.oneDeptName}}</el-descriptions-item>
-          <el-descriptions-item label="二级部门">{{form.twoDeptName}}</el-descriptions-item>
-          <el-descriptions-item label="三级部门">{{form.threeDeptName}}</el-descriptions-item>
+          <el-descriptions-item label="部门">{{form.deptName}}</el-descriptions-item>
           <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
           <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
           <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
           <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
           <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
           <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
@@ -345,24 +343,35 @@ export default {
           this.$modal.msgWarning("权重不为100%无法提交!");
           this.$modal.msgWarning("权重不为100%无法提交!");
           return;
           return;
         }
         }
-        this.$confirm('确认提交吗?', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'success'
-        }).then(() => {
-          try {
-            this.loading = true;
-            fillinFinish(this.form).then(response => {
-              this.$modal.msgSuccess("保存成功");
-              this.fetchPerformance(this.id);
-            });
-          } catch (err) {
-            console.error(err);
-          } finally {
-            this.loading = false;
-          }
-        }).catch(() => {      
-        });
+        this.$confirm("确认提交吗?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "info",
+          beforeClose: async (action, instance,done) => {
+            if (action === "confirm") {
+              instance.confirmButtonLoading = true;
+              instance.confirmButtonText = "执行中...";
+              try {
+                const { msg, code } = await fillinFinish(this.form);
+                if (code === 200) {
+                  this.$modal.msgSuccess("提交成功");
+                  await this.fetchPerformance(this.id);
+                }
+              } catch (err) {
+                // catch
+                console.error(err);
+                instance.confirmButtonText = "确认";
+              } finally {
+                // finally
+                instance.confirmButtonLoading = false;
+                done();
+              }
+            }else{
+              done();
+            }
+          },
+        }).then(() => {})
+        .catch(() => {});
       }
       }
       if(this.form.status == '3'){
       if(this.form.status == '3'){
         let v = false;
         let v = false;
@@ -379,24 +388,35 @@ export default {
           this.$modal.msgWarning("请填写个人总结再提交!");
           this.$modal.msgWarning("请填写个人总结再提交!");
           return;
           return;
         }
         }
-        this.$confirm('确认提交吗?', {
-          confirmButtonText: '确定',
-          cancelButtonText: '取消',
-          type: 'success'
-        }).then(() => {
-          try {
-            this.loading = true;
-            selfestimate(this.form).then(response => {
-              this.$modal.msgSuccess("保存成功");
-              this.fetchPerformance(this.id);
-            });
-          } catch (err) {
-            console.error(err);
-          } finally {
-            this.loading = false;
-          }
-        }).catch(() => {      
-        });
+        this.$confirm("确认提交吗?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "info",
+          beforeClose: async (action, instance,done) => {
+            if (action === "confirm") {
+              instance.confirmButtonLoading = true;
+              instance.confirmButtonText = "执行中...";
+              try {
+                const { msg, code } = await selfestimate(this.form);
+                if (code === 200) {
+                  this.$modal.msgSuccess("提交成功");
+                  await this.fetchPerformance(this.id);
+                }
+              } catch (err) {
+                // catch
+                console.error(err);
+                instance.confirmButtonText = "确认";
+              } finally {
+                // finally
+                instance.confirmButtonLoading = false;
+                done();
+              }
+            }else{
+              done();
+            }
+          },
+        }).then(() => {})
+        .catch(() => {});
       }
       }
     },
     },
     //设置明细
     //设置明细

+ 51 - 4
src/views/business/ehr/pm/performance/index.vue

@@ -2,6 +2,16 @@
   <div>
   <div>
     <div class="app-container" v-if="isList">
     <div class="app-container" v-if="isList">
       <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
       <el-form :model="queryParams" ref="queryForm" size="mini" :inline="true">
+        <el-form-item label="部门">
+          <el-cascader
+            v-model="treeValue"
+            :options="deptTree"
+            :props="{ checkStrictly: true }"
+            clearable
+            @change="handleChange"
+            >
+          </el-cascader>
+        </el-form-item>
         <el-form-item label="员工" prop="staffName">
         <el-form-item label="员工" prop="staffName">
           <el-input
           <el-input
             v-model="queryParams.staffName"
             v-model="queryParams.staffName"
@@ -118,6 +128,7 @@ import { listPerformance,getCurrentMonthId,getNextMonthId} from "@/api/business/
 import { getGradeAdjustConut,toDoList} from "@/api/business/ehr/pm/gradeadjust";
 import { getGradeAdjustConut,toDoList} from "@/api/business/ehr/pm/gradeadjust";
 import { getPmVerifyConut} from "@/api/business/ehr/pm/pmverify";
 import { getPmVerifyConut} from "@/api/business/ehr/pm/pmverify";
 import { getPmMarkConut} from "@/api/business/ehr/pm/pmmark";
 import { getPmMarkConut} from "@/api/business/ehr/pm/pmmark";
+import { listDept} from "@/api/business/ehr/ehr/dept";
 
 
 export default {
 export default {
   name: "assess",
   name: "assess",
@@ -150,6 +161,7 @@ export default {
         staffName: null,
         staffName: null,
         status: null,
         status: null,
         month: null,
         month: null,
+        dept: null,
       },
       },
       // 查询日期范围
       // 查询日期范围
       dateRange: [],
       dateRange: [],
@@ -198,6 +210,10 @@ export default {
       verifyCount: null,
       verifyCount: null,
       //待评分数量
       //待评分数量
       markCount: null,
       markCount: null,
+      //部门树
+      deptTree: [],
+      //value
+      treeValue: [],
     };
     };
   },
   },
   async created() {
   async created() {
@@ -212,18 +228,29 @@ export default {
     this.markCount = res.row;
     this.markCount = res.row;
     this.getList();
     this.getList();
     //如果是跳转过来的页面带了参数flowId则直接进入填写页面
     //如果是跳转过来的页面带了参数flowId则直接进入填写页面
-    if(this.$route.query.flowId){
+    if(this.$route['query'] !== undefined && this.$route.query['flowId'] !== undefined){
       this.rowId = this.$route.query.performanceId;
       this.rowId = this.$route.query.performanceId;
       this.page = 'add';
       this.page = 'add';
       this.ids = [this.$route.query.performanceId];
       this.ids = [this.$route.query.performanceId];
       this.isList = false;
       this.isList = false;
     }
     }
+    listDept().then(response => {
+      let arr = response.rows;
+      arr.forEach(function(element) {
+        element.parent_id = element.superiorsDept;
+        element.value = element.code;
+        element.label = element.name;
+      });
+      console.log("arr",arr);
+      this.deptTree = this.arrayToTree(arr,null);
+      console.log("deptTree",this.deptTree);
+    });
   },
   },
   methods: {
   methods: {
     /** 查询绩效列表 */
     /** 查询绩效列表 */
     getList() {
     getList() {
-      console.log('this.queryParams',this.queryParams);
       this.loading = true;
       this.loading = true;
+      this.queryParams.dept = this.treeValue[this.treeValue.length - 1];
       listPerformance(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
       listPerformance(this.addDateRange(this.queryParams, this.dateRange)).then(response => {
         this.listData = response.rows;
         this.listData = response.rows;
         this.ids = response.rows.map(item => item.id);
         this.ids = response.rows.map(item => item.id);
@@ -232,7 +259,7 @@ export default {
       });
       });
     },
     },
     /** 搜索按钮操作 */
     /** 搜索按钮操作 */
-    btnSearch() {
+    async btnSearch() {
       this.queryParams.pageNum = 1;
       this.queryParams.pageNum = 1;
       this.getList();
       this.getList();
     },
     },
@@ -240,12 +267,14 @@ export default {
     btnResetQuery() {
     btnResetQuery() {
       this.resetForm("queryForm");
       this.resetForm("queryForm");
       this.dateRange = [];
       this.dateRange = [];
+      this.treeValue = [];
       this.btnSearch();
       this.btnSearch();
     },
     },
     /** 刷新 */
     /** 刷新 */
     refresh(){
     refresh(){
       this.resetForm("queryForm");
       this.resetForm("queryForm");
       this.dateRange = [];
       this.dateRange = [];
+      this.treeValue = [];
       this.getList();
       this.getList();
     },
     },
     /** 进入详情 */
     /** 进入详情 */
@@ -306,7 +335,25 @@ export default {
     //待评分
     //待评分
     btnPmMark(){
     btnPmMark(){
       this.$router.push({name:'PmMark'});
       this.$router.push({name:'PmMark'});
-    }
+    },
+    arrayToTree(data, pid) {
+      let result = []
+      this.getChildren(data, result, pid)
+      return result
+    },
+    getChildren(data, result, pid) {
+      for (const item of data) {
+        if (item.parent_id === pid) {
+          const newItem = { children: [], ...item }
+          result.push(newItem)
+          this.getChildren(data, newItem.children, item.code)
+        }
+      }
+    },
+    //
+    handleChange(value){
+      this.$refs.cascaderHandle.dropDownVisible = false;
+    },
   }
   }
 };
 };
 </script>
 </script>

+ 189 - 126
src/views/business/ehr/pm/stagecontrol/detail.vue

@@ -141,129 +141,183 @@ export default {
     },
     },
     //发布
     //发布
     btnPublish(){
     btnPublish(){
-      this.$confirm('确认要发布吗?', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'success'
-      }).then(() => {
-        try {
-          this.loading = true;
-          publishStage(this.form).then(response => {
-            this.fetchStage(this.id);
-            this.$modal.msgSuccess("发布成功");
-          });
-        } catch (err) {
-          console.error(err);
-        } finally {
-          this.loading = false;
-        }
-      }).catch(() => {      
-      });
+      this.$confirm("确认要发布吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "info",
+        beforeClose: async (action, instance,done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+            instance.confirmButtonText = "执行中...";
+            try {
+              const { msg, code } = await publishStage(this.form);
+              if (code === 200) {
+                this.$modal.msgSuccess("发布成功");
+                await this.fetchStage(this.id);
+              }
+            } catch (err) {
+              console.error(err);
+              instance.confirmButtonText = "确认";
+            } finally {
+              instance.confirmButtonLoading = false;
+              done();
+            }
+          }else{
+            done();
+          }
+        },
+      }).then(() => {})
+      .catch(() => {});
     },
     },
     //填写结束
     //填写结束
     btnFillinFinish(){
     btnFillinFinish(){
-      this.$confirm('确认要结束填写吗?', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'success'
-      }).then(() => {
-        try {
-          this.loading = true;
-          fillinFinish(this.form).then(response => {
-            this.fetchStage(this.id);
-            this.$modal.msgSuccess("保存成功");
-          });
-        } catch (err) {
-          console.error(err);
-        } finally {
-          this.loading = false;
-        }
-      }).catch(() => {      
-      });
+      this.$confirm("确认要结束填写吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "info",
+        beforeClose: async (action, instance,done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+            instance.confirmButtonText = "执行中...";
+            try {
+              const { msg, code } = await fillinFinish(this.form);
+              if (code === 200) {
+                this.$modal.msgSuccess("保存成功");
+                await this.fetchStage(this.id);
+              }
+            } catch (err) {
+              console.error(err);
+              instance.confirmButtonText = "确认";
+            } finally {
+              instance.confirmButtonLoading = false;
+              done();
+            }
+          }else{
+            done();
+          }
+        },
+      }).then(() => {})
+      .catch(() => {});
     },
     },
     //开始自评
     //开始自评
     btnStartSelfEvaluation(){
     btnStartSelfEvaluation(){
-      this.$confirm('确认要开启自评吗?', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'success'
-      }).then(() => {
-        try {
-          this.loading = true;
-          startSelfEvaluation(this.form).then(response => {
-            this.fetchStage(this.id);
-            this.$modal.msgSuccess("开启成功");
-          });
-        } catch (err) {
-          console.error(err);
-        } finally {
-          this.loading = false;
-        }
-      }).catch(() => {      
-      });
+      this.$confirm("确认要开启自评吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "info",
+        beforeClose: async (action, instance,done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+            instance.confirmButtonText = "执行中...";
+            try {
+              const { msg, code } = await startSelfEvaluation(this.form);
+              if (code === 200) {
+                this.$modal.msgSuccess("开启成功");
+                await this.fetchStage(this.id);
+              }
+            } catch (err) {
+              console.error(err);
+              instance.confirmButtonText = "确认";
+            } finally {
+              instance.confirmButtonLoading = false;
+              done();
+            }
+          }else{
+            done();
+          }
+        },
+      }).then(() => {})
+      .catch(() => {});
     },
     },
     //结束自评
     //结束自评
     btnFinishSelfEvaluation(){
     btnFinishSelfEvaluation(){
-      this.$confirm('确认要结束评分吗?', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'success'
-      }).then(() => {
-        try {
-          this.loading = true;
-          finishSelfEvaluation(this.form).then(response => {
-            this.fetchStage(this.id);
-            this.$modal.msgSuccess("结束成功");
-          });
-        } catch (err) {
-          console.error(err);
-        } finally {
-          this.loading = false;
-        }
-      }).catch(() => {      
-      });
+      this.$confirm("确认要结束评分吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "info",
+        beforeClose: async (action, instance,done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+            instance.confirmButtonText = "执行中...";
+            try {
+              const { msg, code } = await finishSelfEvaluation(this.form);
+              if (code === 200) {
+                this.$modal.msgSuccess("结束成功");
+                await this.fetchStage(this.id);
+              }
+            } catch (err) {
+              console.error(err);
+              instance.confirmButtonText = "确认";
+            } finally {
+              instance.confirmButtonLoading = false;
+              done();
+            }
+          }else{
+            done();
+          }
+        },
+      }).then(() => {})
+      .catch(() => {});
     },
     },
     //开启等级调整
     //开启等级调整
     btnOpenGradeAdjust(){
     btnOpenGradeAdjust(){
-      this.$confirm('确认要开启等级调整?', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'success'
-      }).then(() => {
-        try {
-          this.loading = true;
-          openGradeAdjust(this.form).then(response => {
-            this.fetchStage(this.id);
-            this.$modal.msgSuccess("已开始");
-          });
-        } catch (err) {
-          console.error(err);
-        } finally {
-          this.loading = false;
-        }
-      }).catch(() => {      
-      });
+      this.$confirm("确认要开启等级调整?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "info",
+        beforeClose: async (action, instance,done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+            instance.confirmButtonText = "执行中...";
+            try {
+              const { msg, code } = await openGradeAdjust(this.form);
+              if (code === 200) {
+                this.$modal.msgSuccess("已开始");
+                await this.fetchStage(this.id);
+              }
+            } catch (err) {
+              console.error(err);
+              instance.confirmButtonText = "确认";
+            } finally {
+              instance.confirmButtonLoading = false;
+              done();
+            }
+          }else{
+            done();
+          }
+        },
+      }).then(() => {})
+      .catch(() => {});
     },
     },
     //关闭等级调整
     //关闭等级调整
     btnCloseGradeAdjust(){
     btnCloseGradeAdjust(){
-      this.$confirm('确认要关闭等级调整?', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'success'
-      }).then(() => {
-        try {
-          this.loading = true;
-          closeGradeAdjust(this.form).then(response => {
-            this.fetchStage(this.id);
-            this.$modal.msgSuccess("已关闭");
-          });
-        } catch (err) {
-          console.error(err);
-        } finally {
-          this.loading = false;
-        }
-      }).catch(() => {      
-      });
+      this.$confirm("确认要关闭等级调整?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "info",
+        beforeClose: async (action, instance,done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+            instance.confirmButtonText = "执行中...";
+            try {
+              const { msg, code } = await closeGradeAdjust(this.form);
+              if (code === 200) {
+                this.$modal.msgSuccess("已关闭");
+                await this.fetchStage(this.id);
+              }
+            } catch (err) {
+              console.error(err);
+              instance.confirmButtonText = "确认";
+            } finally {
+              instance.confirmButtonLoading = false;
+              done();
+            }
+          }else{
+            done();
+          }
+        },
+      }).then(() => {})
+      .catch(() => {});
     },
     },
     //分数调整
     //分数调整
     btnAdjustMark(){
     btnAdjustMark(){
@@ -271,24 +325,33 @@ export default {
     },
     },
     //过数到薪资
     //过数到薪资
     btnCendToSalary(){
     btnCendToSalary(){
-      this.$confirm('确认要同步到薪资绩效系数吗?', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'success'
-      }).then(() => {
-        try {
-          this.loading = true;
-          cendToSalary(this.form).then(response => {
-            this.fetchStage(this.id);
-            this.$modal.msgSuccess("操作成功");
-          });
-        } catch (err) {
-          console.error(err);
-        } finally {
-          this.loading = false;
-        }
-      }).catch(() => {      
-      });
+      this.$confirm("确认要同步到薪资绩效系数吗?", "提示", {
+        confirmButtonText: "确定",
+        cancelButtonText: "取消",
+        type: "info",
+        beforeClose: async (action, instance,done) => {
+          if (action === "confirm") {
+            instance.confirmButtonLoading = true;
+            instance.confirmButtonText = "执行中...";
+            try {
+              const { msg, code } = await cendToSalary(this.form);
+              if (code === 200) {
+                this.$modal.msgSuccess("操作成功");
+                await this.fetchStage(this.id);
+              }
+            } catch (err) {
+              console.error(err);
+              instance.confirmButtonText = "确认";
+            } finally {
+              instance.confirmButtonLoading = false;
+              done();
+            }
+          }else{
+            done();
+          }
+        },
+      }).then(() => {})
+      .catch(() => {});
     },
     },
     //修改
     //修改
     btnEdit(){
     btnEdit(){

+ 1 - 3
src/views/business/ehr/pm/verify/detail.vue

@@ -15,9 +15,7 @@
           <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
           <el-descriptions-item label="员工姓名">{{form.staffName}}</el-descriptions-item>
           <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
           <el-descriptions-item label="入职日期">{{form.dateJoin}}</el-descriptions-item>
           <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
           <el-descriptions-item label="转正日期">{{form.probationComplete}}</el-descriptions-item>
-          <el-descriptions-item label="一级部门">{{form.oneDeptName}}</el-descriptions-item>
-          <el-descriptions-item label="二级部门">{{form.twoDeptName}}</el-descriptions-item>
-          <el-descriptions-item label="三级部门">{{form.threeDeptName}}</el-descriptions-item>
+          <el-descriptions-item label="部门">{{form.deptName}}</el-descriptions-item>
           <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
           <el-descriptions-item label="职位">{{form.jobName}}</el-descriptions-item>
           <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
           <el-descriptions-item label="评估周期">{{form.name}}</el-descriptions-item>
           <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>
           <el-descriptions-item label="评估人">{{form.evaluatorName}}</el-descriptions-item>

+ 40 - 1
src/views/material/changeApply/add/index.vue

@@ -284,10 +284,12 @@ export default {
       }
       }
       this.changeExpiryDateManagerment(row);
       this.changeExpiryDateManagerment(row);
     },
     },
-    
+
     changeExpiryDateManagerment(row) {
     changeExpiryDateManagerment(row) {
       if (row.expiryDateManagerment === "2") {
       if (row.expiryDateManagerment === "2") {
         row.usefulLife = "";
         row.usefulLife = "";
+        row.expiryUnitId = "";
+        row.usefulLifeUnitId = "";
       }
       }
     },
     },
     // 物料编码
     // 物料编码
@@ -521,6 +523,43 @@ export default {
               </component>
               </component>
             </template>
             </template>
 
 
+            <!-- 效期单位 -->
+            <template slot="expiryUnitId" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                :source.sync="scope.row"
+                :disabled="scope.row.expiryDateManagerment !== '0'"
+              >
+                <el-option
+                  v-for="item in dict.type[scope.attr.dictName]"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </component>
+            </template>
+            <!-- 有效期至单位 -->
+            <template slot="usefulLifeUnitId" slot-scope="scope">
+              <component
+                v-bind="scope.attr"
+                v-model="scope.row[scope.item.key]"
+                :size="$attrs.size"
+                :source.sync="scope.row"
+                :disabled="scope.row.expiryDateManagerment !== '0'"
+              >
+                <el-option
+                  v-for="item in dict.type[scope.attr.dictName]"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </component>
+            </template>
+
             <ux-table-column
             <ux-table-column
               fixed="right"
               fixed="right"
               title="操作"
               title="操作"

+ 5 - 0
src/views/material/requisition/details/columns.js

@@ -83,6 +83,7 @@ export default function useColumns(){
             valueKey: "name",
             valueKey: "name",
             // 末级
             // 末级
             onlyFinal: true,
             onlyFinal: true,
+            readonly:true,
             defaultProps: {
             defaultProps: {
               label: function (data, node) {
               label: function (data, node) {
                 return data.code + " " + data.name;
                 return data.code + " " + data.name;
@@ -165,6 +166,7 @@ export default function useColumns(){
             is: "el-popover-select-v2",
             is: "el-popover-select-v2",
             valueKey: "name",
             valueKey: "name",
             referName: "UNIT_PARAM",
             referName: "UNIT_PARAM",
+            readonly:true,
             dataMapping: {
             dataMapping: {
               unitId:'id'
               unitId:'id'
             }
             }
@@ -435,6 +437,7 @@ export default function useColumns(){
             dataMapping: {
             dataMapping: {
               originPlace: 'id'
               originPlace: 'id'
             },
             },
+            readonly:true,
             // disabled: true,
             // disabled: true,
           },
           },
           
           
@@ -492,6 +495,7 @@ export default function useColumns(){
             dataMapping: {
             dataMapping: {
               purchasingOrganization:'id'
               purchasingOrganization:'id'
             },
             },
+            readonly:true,
           },
           },
         },
         },
         {
         {
@@ -543,6 +547,7 @@ export default function useColumns(){
             dataMapping: {
             dataMapping: {
               puPersonnelId: "code",
               puPersonnelId: "code",
             },
             },
+            readonly:true,
           },
           },
         },
         },
         {
         {

+ 21 - 2
src/views/material/requisition/details/index.vue

@@ -7,6 +7,7 @@ import {
   saveAndToOa,
   saveAndToOa,
   betchSubmit,
   betchSubmit,
   classifyDetails,
   classifyDetails,
+  getDiCode,
 } from "@/api/requisition/basic";
 } from "@/api/requisition/basic";
 import { REFER } from "@/components/popover-select/api/index";
 import { REFER } from "@/components/popover-select/api/index";
 export default {
 export default {
@@ -524,6 +525,23 @@ export default {
         sysMaterialApply.recentWarningPeriod = "";
         sysMaterialApply.recentWarningPeriod = "";
       }
       }
     },
     },
+    async changeDiCode(prop) {
+      console.log(prop, "prop");
+      try {
+        let { code, data } = await getDiCode(prop);
+        let { sysMaterialApply, sysMaterialMedcineApply } = this.params;
+        if (code == 200) {
+          if (data.length) {
+            sysMaterialApply.name = data[0].cpmctymc;
+            sysMaterialApply.model = data[0].ggxh;
+            sysMaterialApply.registrant = data[0].ylqxzcrbarmc;
+            sysMaterialApply.minPackQty = data[0].zxxsdyzsydydsl;
+            sysMaterialApply.manufacturersMaterialCode = data[0].cphhhbh;
+            sysMaterialMedcineApply.registrationNo = data[0].zczbhhzbapzbh;
+          }
+        }
+      } catch (error) {}
+    },
   },
   },
   created() {},
   created() {},
   mounted() {},
   mounted() {},
@@ -831,7 +849,7 @@ export default {
           </template>
           </template>
 
 
           <!-- DI -->
           <!-- DI -->
-          <!-- <template slot="diCode" slot-scope="scope">
+          <template slot="diCode" slot-scope="scope">
             <component
             <component
               v-bind="scope.attr"
               v-bind="scope.attr"
               v-model="scope.row[scope.item.key]"
               v-model="scope.row[scope.item.key]"
@@ -839,8 +857,9 @@ export default {
               :source.sync="scope.row"
               :source.sync="scope.row"
               :disabled="addType === 'see'"
               :disabled="addType === 'see'"
               style="width: 100%"
               style="width: 100%"
+              @change="changeDiCode"
             ></component>
             ></component>
-          </template> -->
+          </template>
         </component>
         </component>
 
 
         <!--  -->
         <!--  -->