|
@@ -44,7 +44,7 @@
|
|
|
</el-col>
|
|
|
<el-col span="6">
|
|
|
<el-form-item label="状态" prop="stage">
|
|
|
- <el-select size="mini" v-model="form.stage" placeholder="" :disabled="form.isPublish == 'Y'" >
|
|
|
+ <el-select size="mini" v-model="form.stage" placeholder="" disabled>
|
|
|
<el-option
|
|
|
v-for="dict in dict.type.ehr_pm_status"
|
|
|
:key="dict.value"
|
|
@@ -56,19 +56,19 @@
|
|
|
</el-col>
|
|
|
<el-col span="6">
|
|
|
<el-form-item label="预计填写结束时间" prop="yearMonth">
|
|
|
- <el-date-picker type="date" value-format="yyyy-MM" v-model="form.fillinEndtiem">
|
|
|
+ <el-date-picker type="date" value-format="yyyy-MM-dd" v-model="form.fillinEndtiem">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col span="6">
|
|
|
<el-form-item label="预计评分结束时间" prop="yearMonth">
|
|
|
- <el-date-picker type="date" value-format="yyyy-MM" v-model="form.markEndtiem">
|
|
|
+ <el-date-picker type="date" value-format="yyyy-MM-dd" v-model="form.markEndtiem">
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
</el-form>
|
|
|
- <el-tabs v-model="activeName" v-if="form.isPublish == 'Y'" @tab-click="btnTabs">
|
|
|
+ <el-tabs v-model="activeName" v-if="form.isPublish == 'Y'" @tab-click="btnTabs" v-show="pageState == 'see'">
|
|
|
<el-tab-pane label="绩效列表" name="first">
|
|
|
<PmList :key="pmListKey" :stage="form"/>
|
|
|
</el-tab-pane>
|
|
@@ -88,7 +88,6 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import CreatePmDialog from './btnCreatePm.vue'
|
|
|
import PmList from './pmList.vue'
|
|
|
import GcList from './gcList.vue'
|
|
|
import { getStage,addStage,updateStage,publishStage,fillinFinish,startSelfEvaluation,finishSelfEvaluation,openGradeAdjust,closeGradeAdjust,cendToSalary} from "@/api/business/ehr/pm/stage";
|
|
@@ -101,7 +100,7 @@ export default {
|
|
|
prop: 'isList',
|
|
|
event: 'jugislist'
|
|
|
},
|
|
|
- components: {CreatePmDialog,PmList,GcList},
|
|
|
+ components: {PmList,GcList},
|
|
|
data() {
|
|
|
return {
|
|
|
//id
|
|
@@ -186,183 +185,87 @@ export default {
|
|
|
},
|
|
|
//发布
|
|
|
btnPublish(){
|
|
|
- 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(() => {});
|
|
|
+ let that = this;
|
|
|
+ this.$modal.confirm('确认要发布吗?').then(async function() {
|
|
|
+ that.loading = true;
|
|
|
+ return await publishStage(that.form);
|
|
|
+ }).then(() => {
|
|
|
+ that.fetchStage(that.id);
|
|
|
+ that.$modal.msgSuccess("发布成功");
|
|
|
+ that.loading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ that.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
//填写结束
|
|
|
btnFillinFinish(){
|
|
|
- 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(() => {});
|
|
|
+ let that = this;
|
|
|
+ this.$modal.confirm('确认要结束填写吗?').then(async function() {
|
|
|
+ that.loading = true;
|
|
|
+ return await fillinFinish(that.form);
|
|
|
+ }).then(() => {
|
|
|
+ that.fetchStage(that.id);
|
|
|
+ that.$modal.msgSuccess("保存成功");
|
|
|
+ that.loading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ that.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
//开始自评
|
|
|
btnStartSelfEvaluation(){
|
|
|
- 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(() => {});
|
|
|
+ let that = this;
|
|
|
+ this.$modal.confirm('确认要开启自评吗?').then(async function() {
|
|
|
+ that.loading = true;
|
|
|
+ return await startSelfEvaluation(that.form);
|
|
|
+ }).then(() => {
|
|
|
+ that.fetchStage(that.id);
|
|
|
+ that.$modal.msgSuccess("开启成功");
|
|
|
+ that.loading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ that.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
//结束自评
|
|
|
btnFinishSelfEvaluation(){
|
|
|
- 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(() => {});
|
|
|
+ let that = this;
|
|
|
+ this.$modal.confirm('确认要结束评分吗?').then(async function() {
|
|
|
+ that.loading = true;
|
|
|
+ return await finishSelfEvaluation(that.form);
|
|
|
+ }).then(() => {
|
|
|
+ that.fetchStage(that.id);
|
|
|
+ that.$modal.msgSuccess("结束成功");
|
|
|
+ that.loading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ that.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
//开启等级调整
|
|
|
btnOpenGradeAdjust(){
|
|
|
- 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(() => {});
|
|
|
+ let that = this;
|
|
|
+ this.$modal.confirm('确认要开启等级调整?').then(async function() {
|
|
|
+ that.loading = true;
|
|
|
+ return await openGradeAdjust(that.form);
|
|
|
+ }).then(() => {
|
|
|
+ that.fetchStage(that.id);
|
|
|
+ that.$modal.msgSuccess("已开始");
|
|
|
+ that.loading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ that.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
//关闭等级调整
|
|
|
btnCloseGradeAdjust(){
|
|
|
- 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(() => {});
|
|
|
+ let that = this;
|
|
|
+ this.$modal.confirm('确认要关闭等级调整?').then(async function() {
|
|
|
+ that.loading = true;
|
|
|
+ return await closeGradeAdjust(that.form);
|
|
|
+ }).then(() => {
|
|
|
+ that.fetchStage(that.id);
|
|
|
+ that.$modal.msgSuccess("已关闭");
|
|
|
+ that.loading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ that.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
//分数调整
|
|
|
btnAdjustMark(){
|
|
@@ -370,33 +273,17 @@ export default {
|
|
|
},
|
|
|
//过数到薪资
|
|
|
btnCendToSalary(){
|
|
|
- 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(() => {});
|
|
|
+ let that = this;
|
|
|
+ this.$modal.confirm('确认要同步到薪资绩效系数吗?').then(async function() {
|
|
|
+ that.loading = true;
|
|
|
+ return await cendToSalary(that.form);
|
|
|
+ }).then(() => {
|
|
|
+ that.fetchStage(that.id);
|
|
|
+ that.$modal.msgSuccess("操作成功");
|
|
|
+ that.loading = false;
|
|
|
+ }).catch(() => {
|
|
|
+ that.loading = false;
|
|
|
+ });
|
|
|
},
|
|
|
//修改
|
|
|
btnEdit(){
|
|
@@ -436,8 +323,15 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
//页签切换
|
|
|
- btnTabs(tab, event) {
|
|
|
- console.log(tab, event);
|
|
|
+ btnTabs(e) {
|
|
|
+ switch (e.name) {
|
|
|
+ case "first":
|
|
|
+ break;
|
|
|
+ case "second":
|
|
|
+ break;
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
},
|
|
|
}
|
|
|
}
|