|
@@ -775,46 +775,57 @@ export default {
|
|
|
const genForm4 = this.$refs.ruleForm[4];
|
|
|
arr.push(genForm4)
|
|
|
}
|
|
|
- //多重校验
|
|
|
- Promise.all([this.dataFormSubmit(0),arr.map(this.getFormPromise)]).then(res=> {
|
|
|
- const validateResult = res[1] .every(item => !!item);
|
|
|
- if (validateResult) {
|
|
|
- if (this.form.id != null) {
|
|
|
- this.form.tInvoiceWorkcontentList = this.ruleForm
|
|
|
- this.form.floorLocation = this.form.floorLocation.join(',')
|
|
|
- updateBookingworkticket(this.form).then(response => {
|
|
|
- this.approveForm.invoiceId = this.form.id
|
|
|
- var nowTime = this.getNowFormatDate()
|
|
|
- //判断是否涉及 动火 和当日
|
|
|
- if (this.form.workStartTime && this.form.workStartTime === nowTime) {
|
|
|
- this.approveForm.isToday = 1;
|
|
|
- } else {
|
|
|
- this.approveForm.isToday = 0;
|
|
|
- }
|
|
|
- for (let i = 0; i < this.ruleForm.length; i++) {
|
|
|
- if (this.ruleForm[i].workType === 1 || this.ruleForm[i].workType === 15) {
|
|
|
- this.approveForm.isSpecial = 1
|
|
|
- break;
|
|
|
+ this.submitDisabled = true
|
|
|
+ this.taskForm.condition = 0
|
|
|
+ this.taskForm.govFiles = this.dataForm.files
|
|
|
+ handleApprove(this.taskForm).then(response => {
|
|
|
+ this.submitDisabled = false
|
|
|
+ this.msgSuccess(this.$t('处理成功'));
|
|
|
+ this.$emit('refreshDataList')
|
|
|
+ //多重校验
|
|
|
+ Promise.all(arr.map(this.getFormPromise)).then(res => {
|
|
|
+ const validateResult = res.every(item => !!item);
|
|
|
+ if (validateResult) {
|
|
|
+ if (this.form.id != null) {
|
|
|
+ this.form.tInvoiceWorkcontentList = this.ruleForm
|
|
|
+ this.form.floorLocation = this.form.floorLocation.join(',')
|
|
|
+ updateBookingworkticket(this.form).then(response => {
|
|
|
+ this.approveForm.invoiceId = this.form.id
|
|
|
+ var nowTime = this.getNowFormatDate()
|
|
|
+ //判断是否涉及 动火 和当日
|
|
|
+ if (this.form.workStartTime && this.form.workStartTime === nowTime) {
|
|
|
+ this.approveForm.isToday = 1;
|
|
|
} else {
|
|
|
- this.approveForm.isSpecial = 0
|
|
|
+ this.approveForm.isToday = 0;
|
|
|
}
|
|
|
- }
|
|
|
- this.approveForm.userSupId = this.form.userMg
|
|
|
+ for (let i = 0; i < this.ruleForm.length; i++) {
|
|
|
+ if (this.ruleForm[i].workType === 1 || this.ruleForm[i].workType === 15) {
|
|
|
+ this.approveForm.isSpecial = 1
|
|
|
+ break;
|
|
|
+ } else {
|
|
|
+ this.approveForm.isSpecial = 0
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.approveForm.userSupId = this.form.userMg
|
|
|
|
|
|
- addInvoice(this.approveForm).then(response => {
|
|
|
- // this.msgSuccess(this.$t('预约成功'));
|
|
|
- this.msgSuccess("已提交申请");
|
|
|
- })
|
|
|
- this.msgSuccess("修改成功");
|
|
|
- this.open = false;
|
|
|
- this.getList();
|
|
|
- });
|
|
|
+ addInvoice(this.approveForm).then(response => {
|
|
|
+ // this.msgSuccess(this.$t('预约成功'));
|
|
|
+ this.msgSuccess("已提交申请");
|
|
|
+ })
|
|
|
+ this.msgSuccess("修改成功");
|
|
|
+ this.open = false;
|
|
|
+ this.visible = false;
|
|
|
+ this.getList();
|
|
|
+ });
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.msgError("表单校验未通过,每项申请内容都必填");
|
|
|
}
|
|
|
- } else {
|
|
|
- this.msgError("表单校验未通过,每项申请内容都必填");
|
|
|
- }
|
|
|
+ });
|
|
|
});
|
|
|
-
|
|
|
+ this.$nextTick(function () {
|
|
|
+ this.comment = ''
|
|
|
+ })
|
|
|
|
|
|
},
|
|
|
//拷贝
|