-
+
-
+
@@ -12,7 +12,7 @@
-
+
-
-
+
+
+
+
+
+
+
@@ -39,7 +44,7 @@
@@ -70,10 +75,25 @@ export default {
APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: null,
APPOINT_USER_NAME: '',
+ OPINION: '',
user: '',
tm: new Date().getTime(),
list: []
},
+ rules: {
+ STATUS: [
+ { required: true, message: '请选择是否通过', trigger: 'change' }
+ ],
+ APPOINT_DEPARTMENT_ID: [
+ { required: true, message: '请选择指定监管部门', trigger: 'change' }
+ ],
+ APPOINT_USER_ID: [
+ { required: true, message: '请选择指定监管部门审批人', trigger: 'change' }
+ ],
+ OPINION: [
+ { required: true, message: '请填写打回原因', trigger: 'change' }
+ ]
+ },
heirloom: {},
normalizer(node) {
@@ -98,13 +118,22 @@ export default {
await this.getDepartmentTree()
this.loading = false
},
- sendMessage() {
- requestFN('/xgf/user/approve', this.form)
- .then((data) => {
- this.$message.success('推送成功')
- this.visible = false
- this.$emit('refresh', '')
- })
+ sendMessage(e) {
+ this.$refs.form.validate((valid) => {
+ if (!valid) {
+ this.$message.error('请填写完整信息')
+ } else {
+ requestFN('/xgf/user/approve', this.form)
+ .then((data) => {
+ this.$message.success('推送成功')
+ this.visible = false
+ this.$emit('refresh', '')
+ })
+ .catch((e) => {
+ console.log(e)
+ })
+ }
+ })
},
getDepartmentTree() {
return new Promise(resolve => {
@@ -140,7 +169,7 @@ export default {
handleClose() {
this.form = {
STATUS: '',
- APPOINT_DEPARTMENT_ID: '',
+ APPOINT_DEPARTMENT_ID: null,
APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: '',
APPOINT_USER_NAME: '',
@@ -154,7 +183,7 @@ export default {
this.visible = false
this.form = {
STATUS: '',
- APPOINT_DEPARTMENT_ID: '',
+ APPOINT_DEPARTMENT_ID: null,
APPOINT_DEPARTMENT_NAME: '',
APPOINT_USER_ID: '',
APPOINT_USER_NAME: '',