|
@@ -121,7 +121,9 @@
|
|
|
<el-form-item label="审计收费(元)" prop="auditFees"
|
|
|
:rules="[
|
|
|
]">
|
|
|
- <el-input v-model="inputForm.auditFees" placeholder="请填写审计收费(元)" clearable></el-input>
|
|
|
+ <el-input v-model="inputForm.auditFees" placeholder="请填写审计收费(元)" clearable
|
|
|
+ @keyup.native="inputForm.auditFees = twoDecimalPlaces(inputForm.auditFees)"
|
|
|
+ ></el-input>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -198,7 +200,7 @@
|
|
|
</el-col>
|
|
|
<el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="status !== 'audit'"
|
|
|
label-width="135px" @submit.native.prevent>
|
|
|
- <el-col :span="12">
|
|
|
+ <el-col v-if="inputForm.status !== '2'" :span="12">
|
|
|
<el-form-item label="意见类型" prop="opinionType"
|
|
|
:rules="[
|
|
|
]">
|
|
@@ -212,6 +214,21 @@
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col v-if="inputForm.status === '2'" :span="12">
|
|
|
+ <el-form-item label="意见类型" prop="opinionType"
|
|
|
+ :rules="[
|
|
|
+ {required: true, message:'意见类型不能为空', trigger:'blur'}
|
|
|
+ ]">
|
|
|
+ <el-select v-model="inputForm.opinionType" placeholder="请选择意见类型" style="width:100%;">
|
|
|
+ <el-option
|
|
|
+ v-for="item in $dictUtils.getDictList('cw_opinion_type')"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
</el-form>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="盖章状态" prop="sealType"
|
|
@@ -230,8 +247,8 @@
|
|
|
<!-- 新增行-->
|
|
|
<!-- </el-button>-->
|
|
|
<!-- </el-tab-pane>-->
|
|
|
- <el-tab-pane label="附件" name="archiveFile">
|
|
|
- <!-- 附件-->
|
|
|
+ <el-tab-pane label="签章文件" name="archiveFile">
|
|
|
+ <!-- 签章文件-->
|
|
|
<UpLoadComponent ref="archiveFile"></UpLoadComponent>
|
|
|
</el-tab-pane>
|
|
|
|
|
@@ -326,7 +343,7 @@
|
|
|
computed: {
|
|
|
bus: {
|
|
|
get () {
|
|
|
- this.$refs.archiveFile.setDividerName('附件', false)
|
|
|
+ this.$refs.archiveFile.setDividerName('签章文件', false)
|
|
|
// this.$refs.uploadComponent.setDividerName('附件', false)
|
|
|
return this.businessId
|
|
|
},
|
|
@@ -598,32 +615,32 @@
|
|
|
if (this.commonJS.isEmpty(this.inputForm.createDate)) {
|
|
|
this.inputForm.createDate = this.moment(new Date()).format('YYYY-MM-DD HH:mm:ss')
|
|
|
}
|
|
|
- // console.log('进来了')
|
|
|
- // console.log('this.inputForm.cwProjectInfoList', this.inputForm.cwProjectInfoList)
|
|
|
- // if (this.commonJS.isEmpty(this.inputForm.reportType)) {
|
|
|
- // this.$message.error('报告类型不能为空')
|
|
|
- // this.loading = false
|
|
|
- // throw new Error('报告类型不能为空')
|
|
|
- // }
|
|
|
this.$refs.archiveFile.getDataList().then((data) => {
|
|
|
this.inputForm.cwFileInfoList = data
|
|
|
- })
|
|
|
- // let _this = this
|
|
|
- // _this.inputForm.cwFileInfoList.forEach(info => {
|
|
|
- // if (this.commonJS.isEmpty(info.fileType)) {
|
|
|
- // throw new Error('文件类型不能为空')
|
|
|
- // }
|
|
|
- // if (this.commonJS.isEmpty(info.sealType)) {
|
|
|
- // throw new Error('盖章类型不能为空')
|
|
|
- // }
|
|
|
- // })
|
|
|
- this.projectReportService.saveForm(this.inputForm).then(({data}) => {
|
|
|
- // console.log('businessTable', data.businessTable)
|
|
|
- // console.log('businessId', data.businessId)
|
|
|
- callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
- this.loading = false
|
|
|
- }).catch(() => {
|
|
|
- this.loading = false
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.cwFileInfoList)) {
|
|
|
+ let _this = this
|
|
|
+ _this.inputForm.cwFileInfoList.forEach((item, index) => {
|
|
|
+ if (_this.commonJS.isEmpty(item.fileType)) {
|
|
|
+ _this.$message.error('签章文件中,第' + (index + 1) + '条数据的“文件类型”未填写')
|
|
|
+ _this.loading = false
|
|
|
+ _this.inputForm.status = ''
|
|
|
+ throw new Error('签章文件中,第' + (index + 1) + '条数据的“文件类型”未填写')
|
|
|
+ } else if (_this.commonJS.isEmpty(item.sealType)) {
|
|
|
+ _this.$message.error('签章文件中,第' + (index + 1) + '条数据的“盖章类型”未填写')
|
|
|
+ _this.loading = false
|
|
|
+ _this.inputForm.status = ''
|
|
|
+ throw new Error('签章文件中,第' + (index + 1) + '条数据的“盖章类型”未填写')
|
|
|
+ }
|
|
|
+ })
|
|
|
+ this.projectReportService.saveForm(this.inputForm).then(({data}) => {
|
|
|
+ // console.log('businessTable', data.businessTable)
|
|
|
+ // console.log('businessId', data.businessId)
|
|
|
+ callback(data.businessTable, data.businessId, this.inputForm)
|
|
|
+ this.loading = false
|
|
|
+ }).catch(() => {
|
|
|
+ this.loading = false
|
|
|
+ })
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -753,6 +770,35 @@
|
|
|
this.tableKeyClient = Math.random()
|
|
|
})
|
|
|
})
|
|
|
+ },
|
|
|
+ // 两位小数数字验证
|
|
|
+ twoDecimalPlaces (num) {
|
|
|
+ let str = num.toString()
|
|
|
+ var len1 = str.substr(0, 1)
|
|
|
+ var len2 = str.substr(1, 1)
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
+ if (str.length > 1 && len1 == 0 && len2 != '.') {
|
|
|
+ str = str.substr(1, 1)
|
|
|
+ }
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
+ if (len1 == '.') {
|
|
|
+ str = ''
|
|
|
+ }
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
+ if (str.indexOf('.') != -1) {
|
|
|
+ var str_ = str.substr(str.indexOf('.') + 1)
|
|
|
+ // eslint-disable-next-line eqeqeq
|
|
|
+ if (str_.indexOf('.') != -1) {
|
|
|
+ str = str.substr(0, str.indexOf('.') + str_.indexOf('.') + 1)
|
|
|
+ }
|
|
|
+ if (str_.length > 2) {
|
|
|
+ this.$message.warning(`金额小数点后只能输入两位,请正确输入!`)
|
|
|
+ return (str = '')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // eslint-disable-next-line no-useless-escape
|
|
|
+ str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
|
|
|
+ return str
|
|
|
}
|
|
|
}
|
|
|
}
|