|
|
@@ -28,71 +28,60 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- import Vue from 'vue'
|
|
|
- import network from '@/utils/network'
|
|
|
- import baseInfo from '@/utils/baseInfo'
|
|
|
- import store from '@/utils/vuexStore'
|
|
|
- export default {
|
|
|
- name: "recharge-add",
|
|
|
- mounted() {
|
|
|
- this.getData()
|
|
|
- },
|
|
|
- data(){
|
|
|
- return{
|
|
|
-
|
|
|
- form:{
|
|
|
- applyAmount:'',
|
|
|
- bankNo:'',
|
|
|
- bankAddress:'',
|
|
|
- openBank:'',
|
|
|
-
|
|
|
-
|
|
|
- },
|
|
|
- loading: false,
|
|
|
- allOpenBank: null,
|
|
|
- submitButtonStat: false
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- getData () {
|
|
|
-
|
|
|
- network.getData(`/finance/recharge-add`).then(response => {
|
|
|
- console.log(response)
|
|
|
- this.loading = false;
|
|
|
- this.allOpenBank = response.allOpenBank;
|
|
|
-
|
|
|
- }).catch(() => {
|
|
|
- });
|
|
|
-
|
|
|
- },
|
|
|
- onSubmits() {
|
|
|
- this.submitButtonStat = true
|
|
|
- let path = '/finance/recharge-add'
|
|
|
- let postData = {
|
|
|
- openBank: this.form.openBank,
|
|
|
- bankAddress: this.form.bankAddress,
|
|
|
- bankNo: this.form.bankNo,
|
|
|
- applyAmount: this.form.applyAmount,
|
|
|
-
|
|
|
-
|
|
|
- };
|
|
|
-
|
|
|
- return network.postData(path, postData).then(response => {
|
|
|
- console.log(response);
|
|
|
- this.$message({
|
|
|
- message: response,
|
|
|
- type: 'success'
|
|
|
- })
|
|
|
- this.submitButtonStat = false
|
|
|
- this.$router.go(-1)
|
|
|
- }).catch(() => {
|
|
|
- this.submitButtonStat = false
|
|
|
- })
|
|
|
- },
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
+import Vue from 'vue'
|
|
|
+import network from '@/utils/network'
|
|
|
+import baseInfo from '@/utils/baseInfo'
|
|
|
+import store from '@/utils/vuexStore'
|
|
|
+export default {
|
|
|
+ name: "recharge-add",
|
|
|
+ mounted() {
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
+ data(){
|
|
|
+ return{
|
|
|
+ form:{
|
|
|
+ applyAmount: '',
|
|
|
+ bankNo: '',
|
|
|
+ bankAddress: '',
|
|
|
+ openBank: '',
|
|
|
+ },
|
|
|
+ loading: false,
|
|
|
+ allOpenBank: null,
|
|
|
+ submitButtonStat: false
|
|
|
}
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getData () {
|
|
|
+ network.getData(`/finance/recharge-add`).then(response => {
|
|
|
+ console.log(response)
|
|
|
+ this.loading = false;
|
|
|
+ this.allOpenBank = response.allOpenBank;
|
|
|
+ }).catch(() => {
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onSubmits() {
|
|
|
+ this.submitButtonStat = true
|
|
|
+ let path = '/finance/recharge-add'
|
|
|
+ let postData = {
|
|
|
+ openBank: this.form.openBank,
|
|
|
+ bankAddress: this.form.bankAddress,
|
|
|
+ bankNo: this.form.bankNo,
|
|
|
+ applyAmount: this.form.applyAmount,
|
|
|
+ };
|
|
|
+ return network.postData(path, postData).then(response => {
|
|
|
+ console.log(response);
|
|
|
+ this.$message({
|
|
|
+ message: response,
|
|
|
+ type: 'success'
|
|
|
+ })
|
|
|
+ this.submitButtonStat = false
|
|
|
+ this.$router.push({path: `/finance/recharge`})
|
|
|
+ }).catch(() => {
|
|
|
+ this.submitButtonStat = false
|
|
|
+ })
|
|
|
+ },
|
|
|
+ }
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<style scoped>
|