|
@@ -149,6 +149,12 @@
|
|
|
<el-table-column label="开项编号" align="center" prop="recordNo" :show-overflow-tooltip="true"/>
|
|
|
<el-table-column label="操作" align="center" fixed="right" width="120" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ size="mini"
|
|
|
+ type="text"
|
|
|
+ @click="handleDelay(scope.row)"
|
|
|
+ v-if="(scope.row.applyStatus == 2 || scope.row.applyStatus == 3) && loginStaffInfo.userId == '20276'"
|
|
|
+ >延期</el-button>
|
|
|
<el-button
|
|
|
size="mini"
|
|
|
type="text"
|
|
@@ -311,6 +317,33 @@
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
+ <!-- 延期对话框 -->
|
|
|
+ <el-dialog :title="title" :visible.sync="delayOpen" width="25%" append-to-body>
|
|
|
+ <el-form ref="delayForm" :model="delayForm" :rules="delayRules" label-width="136px">
|
|
|
+ <el-form-item prop="estimateFinishDate" label="预计完成时间">
|
|
|
+ <el-date-picker
|
|
|
+ clearable
|
|
|
+ size="small"
|
|
|
+ style="width: 200px"
|
|
|
+ v-model="delayForm.estimateFinishDate"
|
|
|
+ type="date"
|
|
|
+ value-format="yyyy-MM-dd"
|
|
|
+ placeholder="选择预计完成时间">
|
|
|
+ </el-date-picker>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="isRecorded" label="是否录入开项系统">
|
|
|
+ <el-radio v-model="delayForm.isRecorded" label="1" @change="handleIsRecordedChange">是</el-radio>
|
|
|
+ <el-radio v-model="delayForm.isRecorded" label="0" @change="handleIsRecordedChange">否</el-radio>
|
|
|
+ </el-form-item>
|
|
|
+ <el-form-item prop="recordNo" label="开项编号">
|
|
|
+ <el-input v-model="delayForm.recordNo" placeholder="请输入开项编号" :disabled="recordNoDisabled"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button type="primary" @click="submitDelayForm">确 定</el-button>
|
|
|
+ <el-button @click="cancel">取 消</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
<!-- 用户导入对话框 -->
|
|
|
<el-dialog :title="upload.title" :visible.sync="upload.open" width="400px" append-to-body>
|
|
|
<el-upload
|
|
@@ -451,6 +484,17 @@ export default {
|
|
|
name: "Apply",
|
|
|
components: { Treeselect, SaiApplyDetail, ProcessImg },
|
|
|
data() {
|
|
|
+ var validateRecordNo = (rule, value, callback) => {
|
|
|
+ if (this.delayForm.isRecorded == '1') {
|
|
|
+ if (this.delayForm.recordNo == null) {
|
|
|
+ return callback(new Error('开项编号不能为空'));
|
|
|
+ } else {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return callback();
|
|
|
+ }
|
|
|
+ };
|
|
|
var validateApplicantTeam = (rule, value, callback) => {
|
|
|
if (this.form.applicantDept == '103') {
|
|
|
if (this.form.applicantTeam == null) {
|
|
@@ -485,6 +529,8 @@ export default {
|
|
|
}
|
|
|
};
|
|
|
return {
|
|
|
+ // 是否禁用开项编号输入框
|
|
|
+ recordNoDisabled: true,
|
|
|
// 当前登录员工
|
|
|
loginStaffInfo: {},
|
|
|
//图片集合 打开关闭按钮 等等
|
|
@@ -548,6 +594,8 @@ export default {
|
|
|
clientHeight:300,
|
|
|
// 是否显示弹出层
|
|
|
open: false,
|
|
|
+ // 是否显示延期弹出层
|
|
|
+ delayOpen: false,
|
|
|
// 用户导入参数
|
|
|
upload: {
|
|
|
//下载模板请求地址
|
|
@@ -601,7 +649,21 @@ export default {
|
|
|
},
|
|
|
// 表单参数
|
|
|
form: {},
|
|
|
- // 表单校验
|
|
|
+ // 延期表单参数
|
|
|
+ delayForm: {},
|
|
|
+ // 延期表单校验
|
|
|
+ delayRules: {
|
|
|
+ estimateFinishDate: [
|
|
|
+ { required: true, message: this.$t('预计完成时间') + this.$t('不能为空'), trigger: "change" }
|
|
|
+ ],
|
|
|
+ isRecorded: [
|
|
|
+ { required: true, message: this.$t('是否录入开项系统') + this.$t('不能为空'), trigger: "change" }
|
|
|
+ ],
|
|
|
+ recordNo: [
|
|
|
+ { validator: validateRecordNo, trigger: 'change' }
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ // 新增/修改表单校验
|
|
|
rules: {
|
|
|
description: [
|
|
|
{ required: true, message: this.$t('问题描述') + this.$t('不能为空'), trigger: "change" }
|
|
@@ -688,6 +750,15 @@ export default {
|
|
|
this.getLoginStaffInfo();
|
|
|
},
|
|
|
methods: {
|
|
|
+ /** 是否录入开项系统单选按钮值改变事件 */
|
|
|
+ handleIsRecordedChange() {
|
|
|
+ if (this.delayForm.isRecorded == '1') {
|
|
|
+ this.recordNoDisabled = false;
|
|
|
+ } else if (this.delayForm.isRecorded == '0') {
|
|
|
+ this.recordNoDisabled = true;
|
|
|
+ this.delayForm.recordNo = null;
|
|
|
+ }
|
|
|
+ },
|
|
|
/** 文件下载处理 */
|
|
|
handleDownload(row) {
|
|
|
var name = row.fileName;
|
|
@@ -944,6 +1015,19 @@ export default {
|
|
|
this.$refs.processImg.init(processId);
|
|
|
})
|
|
|
},
|
|
|
+ /** 处理延期操作 */
|
|
|
+ handleDelay(row) {
|
|
|
+ this.reset();
|
|
|
+ const saiApplyId = row.saiApplyId || this.ids
|
|
|
+ getApply(saiApplyId).then(response => {
|
|
|
+ this.delayForm = response.data;
|
|
|
+ if (this.delayForm.isRecorded != null) {
|
|
|
+ this.delayForm.isRecorded = this.delayForm.isRecorded.toString();
|
|
|
+ }
|
|
|
+ this.delayOpen = true;
|
|
|
+ this.title = "SAI开项申请延期";
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 处理/详情操作 */
|
|
|
handleDetail(row) {
|
|
|
this.saiApplyVisible = true;
|
|
@@ -1072,7 +1156,7 @@ export default {
|
|
|
this.title = "修改SAI开项申请";
|
|
|
});
|
|
|
},
|
|
|
- /** 提交按钮 */
|
|
|
+ /** 新增/修改提交按钮 */
|
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
if (valid) {
|
|
@@ -1092,6 +1176,18 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
},
|
|
|
+ /** 延期提交按钮 */
|
|
|
+ submitDelayForm() {
|
|
|
+ this.$refs["delayForm"].validate(valid => {
|
|
|
+ if (valid) {
|
|
|
+ updateApply(this.delayForm).then(response => {
|
|
|
+ this.msgSuccess("延期成功");
|
|
|
+ this.delayOpen = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
|
const saiApplyIds = row.saiApplyId || this.ids;
|