07a8d673 by renchao@pashanhoo.com

收费信息

1 parent 090280d3
...@@ -54,7 +54,6 @@ ...@@ -54,7 +54,6 @@
54 <div class="slxx_title title-block"> 54 <div class="slxx_title title-block">
55 收费明细 55 收费明细
56 <el-button type="primary" @click="hanldeEdit" style="float:right;margin-top:-5px">修改</el-button> 56 <el-button type="primary" @click="hanldeEdit" style="float:right;margin-top:-5px">修改</el-button>
57 <el-button type="primary" @click="hanldeRecharge" style="float:right;margin-top:-5px;margin-right:10px">重新计费</el-button>
58 </div> 57 </div>
59 <el-table :data="tableDatasf.data" border :height="100"> 58 <el-table :data="tableDatasf.data" border :height="100">
60 <el-table-column v-for="item in tableDatasf.columns" :key="item.index" :prop="item.prop" :label="item.label" align="center"> 59 <el-table-column v-for="item in tableDatasf.columns" :key="item.index" :prop="item.prop" :label="item.label" align="center">
...@@ -74,7 +73,7 @@ ...@@ -74,7 +73,7 @@
74 </template> 73 </template>
75 <script> 74 <script>
76 import { mapGetters } from "vuex"; 75 import { mapGetters } from "vuex";
77 import { initSfxx, recharge } from "@/api/sfxx.js"; 76 import { initSfxx } from "@/api/sfxx.js";
78 export default { 77 export default {
79 components: {}, 78 components: {},
80 data () { 79 data () {
...@@ -181,24 +180,13 @@ ...@@ -181,24 +180,13 @@
181 }, 180 },
182 methods: { 181 methods: {
183 getList () { 182 getList () {
184 initSfxx('6a114807a2779413e0db955951ac3524').then(res => { 183 initSfxx(this.bsmBusiness).then(res => {
185 let { slsq, jfList, sfList } = res.result 184 let { slsq, jfList, sfList } = res.result
186 this.ruleForm = slsq 185 this.ruleForm = slsq
187 this.tableDatajf.data = jfList 186 this.tableDatajf.data = jfList
188 this.tableDatasf.data = sfList 187 this.tableDatasf.data = sfList
189 }) 188 })
190 }, 189 },
191 hanldeRecharge () {
192 recharge('6a114807a2779413e0db955951ac3524').then(res => {
193 if (res.code == 200) {
194 this.tableDatasf.data = res.result
195 this.$message({
196 message: '计费成功!',
197 type: 'success'
198 })
199 }
200 })
201 },
202 hanldeEdit () { 190 hanldeEdit () {
203 this.$popupDialog('编辑', 'workflow/main/sfxx/sfDetail', { bsmBusiness: this.bsmBusiness, dataList: _.cloneDeep(this.tableDatasf.data) }, '50%', true) 191 this.$popupDialog('编辑', 'workflow/main/sfxx/sfDetail', { bsmBusiness: this.bsmBusiness, dataList: _.cloneDeep(this.tableDatasf.data) }, '50%', true)
204 } 192 }
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
5 </lb-table> 5 </lb-table>
6 6
7 <div class="text-center"> 7 <div class="text-center">
8 <el-button type="primary" @click="hanldeRecharge">重新计费</el-button>
8 <el-button @click="$popupCacel">取消</el-button> 9 <el-button @click="$popupCacel">取消</el-button>
9 <el-button type="primary" @click="handleSubmit" plain>保存</el-button> 10 <el-button type="primary" @click="handleSubmit" plain>保存</el-button>
10 </div> 11 </div>
...@@ -12,7 +13,7 @@ ...@@ -12,7 +13,7 @@
12 </template> 13 </template>
13 <script> 14 <script>
14 import store from '@/store/index.js' 15 import store from '@/store/index.js'
15 import { updateSfxx } from "@/api/sfxx.js"; 16 import { recharge, updateSfxx } from "@/api/sfxx.js";
16 export default { 17 export default {
17 props: { 18 props: {
18 formData: { 19 formData: {
...@@ -23,6 +24,7 @@ ...@@ -23,6 +24,7 @@
23 data () { 24 data () {
24 return { 25 return {
25 key: 0, 26 key: 0,
27 dataList: [],
26 column: [ 28 column: [
27 { 29 {
28 prop: 'sfdw', 30 prop: 'sfdw',
...@@ -81,13 +83,34 @@ ...@@ -81,13 +83,34 @@
81 ] 83 ]
82 } 84 }
83 }, 85 },
84 86 watch: {
87 'formData.dataList': {
88 handler (newValue, oldValue) {
89 if (newValue.length != 0) {
90 this.dataList = newValue
91 }
92 },
93 deep: true
94 }
95 },
85 methods: { 96 methods: {
97 hanldeRecharge () {
98 recharge(this.formData.bsmBusiness).then(res => {
99 if (res.code == 200) {
100 this.dataList = res.result
101 store.dispatch("user/getPouopData", res.result);
102 this.$message({
103 message: '计费成功!',
104 type: 'success'
105 })
106 }
107 })
108 },
86 handleSubmit () { 109 handleSubmit () {
87 this.formData.dataList.forEach(item => { 110 this.dataList.forEach(item => {
88 item.bsmBusiness = this.formData.bsmBusiness 111 item.bsmBusiness = this.formData.bsmBusiness
89 }) 112 })
90 updateSfxx(this.formData.dataList).then(res => { 113 updateSfxx(this.dataList).then(res => {
91 if (res.code == 200) { 114 if (res.code == 200) {
92 store.dispatch("user/getPouopData", res.result); 115 store.dispatch("user/getPouopData", res.result);
93 this.$message({ 116 this.$message({
......