|
@@ -197,8 +197,7 @@
|
|
|
</dg-col>
|
|
|
<dg-col :span="10">
|
|
|
<dg-date-picker
|
|
|
- :start-value.sync="sizeForm.startTime"
|
|
|
- :end-value.sync="sizeForm.endTime"
|
|
|
+ v-model="dateRange"
|
|
|
type="daterange"
|
|
|
range-separator="至"
|
|
|
start-placeholder="开始日期"
|
|
@@ -303,7 +302,7 @@ export default {
|
|
|
// 验证有效期间
|
|
|
const checkPermissionValid = (rule, val, callback) => {
|
|
|
if (val == '01') {
|
|
|
- if (!this.sizeForm.startTime && !this.sizeForm.endTime) {
|
|
|
+ if (!this.dateRange) {
|
|
|
return callback(new Error('请选择开始时间和结束时间'));
|
|
|
} else {
|
|
|
callback();
|
|
@@ -347,6 +346,7 @@ export default {
|
|
|
code: '02'
|
|
|
}
|
|
|
],
|
|
|
+ dateRange: "",
|
|
|
pickerOptions: {
|
|
|
disabledDate(currentDate) {
|
|
|
return currentDate.getTime() < Date.now() - 8.64e7;
|
|
@@ -454,19 +454,6 @@ export default {
|
|
|
},
|
|
|
// 切换审批类型,判断是否存在未审批的单,清空审批内容
|
|
|
handleChangeApplyType(val) {
|
|
|
- const params = {
|
|
|
- applyType: val,
|
|
|
- applicantIdcard: this.$store.getters.user.idcard
|
|
|
- };
|
|
|
- // Api.checkAppFunRepeat(params).then((res) => {
|
|
|
- // const { result, msg } = res.data;
|
|
|
- // if (result == '300') {
|
|
|
- // this.repeatApply = msg;
|
|
|
- // this.visible = true;
|
|
|
- // } else {
|
|
|
- // this.repeatApply = '';
|
|
|
- // }
|
|
|
- // });
|
|
|
this.sizeForm.flowContent = '';
|
|
|
this.sizeForm.resourceInfos = [];
|
|
|
this.applySelectKeys = [];
|
|
@@ -500,7 +487,10 @@ export default {
|
|
|
delResourceInfos
|
|
|
};
|
|
|
let api = '';
|
|
|
-
|
|
|
+ if (this.sizeForm.permissionValidType == '01') {
|
|
|
+ this.sizeForm.startTime = this.dateRange[0];
|
|
|
+ this.sizeForm.endTime = this.dateRange[1];
|
|
|
+ }
|
|
|
if (this.type == 'add') {
|
|
|
params['workFlow'] = otherInfo;
|
|
|
api = 'savePermissionApply';
|
|
@@ -628,6 +618,9 @@ export default {
|
|
|
delResourceInfos,
|
|
|
...otherInfo
|
|
|
};
|
|
|
+ if (this.sizeForm.permissionValidType == '01') {
|
|
|
+ this.dateRange = [this.sizeForm.startTime, this.sizeForm.endTime];
|
|
|
+ }
|
|
|
const delResourceInfoIds = delResourceInfos.map((item) => item.funId);
|
|
|
// 默认选中节点 = 新增节点 + ( 已有节点 - 欲撤销节点 )
|
|
|
this.applySelectKeys = [
|