wgl há 4 anos atrás
pai
commit
2956c967f1

+ 22 - 7
src/projects/business/views/Master/Company/RegisterExamine.vue

@@ -209,13 +209,28 @@
 					var btnArray = ['否', '是'];
 					mui.confirm('是否' + _this.subForm.content + '所勾选的注册申请?', '提示', btnArray, function(e) {
 						if (e.index == 1) {
-							_this.set_register_examine_form(_this.subForm);
-							_this.$router.push({
-								name: 'MasterCompanyRegisterSelectDevice',
-								query: {
-									hasSceneId4: _this.hasSceneId4 ? '1' : '0'
-								}
-							})
+							//同意
+							if (_this.subForm.status == 1) {
+								_this.set_register_examine_form(_this.subForm);
+								_this.$router.push({
+									name: 'MasterCompanyRegisterSelectDevice',
+									query: {
+										hasSceneId4: _this.hasSceneId4 ? '1' : '0'
+									}
+								})
+							} else {
+								//拒绝
+								_this.isLoading = true;
+								API_Company.doApply(_this.subForm).then(response => {
+									_this.isLoading = false;
+									mui.toast('处理成功');
+									_this.listForm.pageIndex = 1;
+									_this.getList();
+								}).catch(error => {
+									_this.isLoading = false;
+									mui.toast(error);
+								})
+							}
 						}
 					})
 				}

+ 21 - 7
src/projects/business/views/Master/Company/RegisterInfo.vue

@@ -154,13 +154,27 @@
 					var btnArray = ['否', '是'];
 					mui.confirm('是否' + _this.subForm.content + '所勾选的注册申请?', '提示', btnArray, function(e) {
 						if (e.index == 1) {
-							_this.set_register_examine_form(_this.subForm);
-							_this.$router.push({
-								name: 'MasterCompanyRegisterSelectDevice',
-								query: {
-									hasSceneId4: _this.hasSceneId4 ? '1' : '0'
-								}
-							})
+							//同意
+							if (_this.subForm.status == 1) {
+								_this.set_register_examine_form(_this.subForm);
+								_this.$router.push({
+									name: 'MasterCompanyRegisterSelectDevice',
+									query: {
+										hasSceneId4: _this.hasSceneId4 ? '1' : '0'
+									}
+								})
+							} else {
+								//拒绝
+								_this.isLoading = true;
+								API_Company.doApply(_this.subForm).then(response => {
+									_this.isLoading = false;
+									mui.toast('处理成功');
+									_this.getDetail();
+								}).catch(error => {
+									_this.isLoading = false;
+									mui.toast(error);
+								})
+							}
 						}
 					})
 				}