|
|
@@ -543,23 +543,35 @@ export default {
|
|
|
},
|
|
|
// 点击确定
|
|
|
async btnOK () {
|
|
|
- this.ruleForm.registerId = this.registerId
|
|
|
try {
|
|
|
await this.$refs.ruleForm.validate()
|
|
|
- if (this.ruleForm.qualityScope === '请选择') this.ruleForm.qualityScope = ''
|
|
|
- if (this.ruleForm.checkInScope === '请选择') this.ruleForm.checkInScope = ''
|
|
|
- if (this.ruleForm.goodsTypeId === '') return this.$message.warning('文物类别没有选择!')
|
|
|
- if (this.ruleForm.level === '') return this.$message.warning('文物级别没有选择!')
|
|
|
- if (this.ruleForm.textureType === '') return this.$message.warning('文物质地没有选择!')
|
|
|
- if (this.ruleForm.integrity === '') return this.$message.warning('完残程度没有选择!')
|
|
|
- // console.log(this.ruleForm)
|
|
|
- this.ruleForm.amount = Number(this.ruleForm.amount)
|
|
|
- await getHolding3Edit(this.ruleForm)
|
|
|
- // console.log(6666, res)
|
|
|
- this.$message.success('申请成功')
|
|
|
- this.cancel()
|
|
|
- // 通知父组件更新界面
|
|
|
- this.$emit('updateUI')
|
|
|
+ this.$confirm('是否确认提交?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning'
|
|
|
+ }).then(async () => {
|
|
|
+ this.ruleForm.registerId = this.registerId
|
|
|
+ if (this.ruleForm.qualityScope === '请选择') this.ruleForm.qualityScope = ''
|
|
|
+ if (this.ruleForm.checkInScope === '请选择') this.ruleForm.checkInScope = ''
|
|
|
+ if (this.ruleForm.goodsTypeId === '') return this.$message.warning('文物类别没有选择!')
|
|
|
+ if (this.ruleForm.level === '') return this.$message.warning('文物级别没有选择!')
|
|
|
+ if (this.ruleForm.textureType === '') return this.$message.warning('文物质地没有选择!')
|
|
|
+ if (this.ruleForm.integrity === '') return this.$message.warning('完残程度没有选择!')
|
|
|
+
|
|
|
+ // console.log(this.ruleForm)
|
|
|
+ this.ruleForm.amount = Number(this.ruleForm.amount)
|
|
|
+ await getHolding3Edit(this.ruleForm)
|
|
|
+ // console.log(6666, res)
|
|
|
+ this.$message.success('申请成功')
|
|
|
+ this.cancel()
|
|
|
+ // 通知父组件更新界面
|
|
|
+ this.$emit('updateUI')
|
|
|
+ }).catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消提交'
|
|
|
+ })
|
|
|
+ })
|
|
|
} catch (error) {
|
|
|
console.log(error)
|
|
|
this.$message.warning('有输入不符合表单要求!')
|