07a8d673 by renchao@pashanhoo.com

收费信息

1 parent 090280d3
......@@ -54,7 +54,6 @@
<div class="slxx_title title-block">
收费明细
<el-button type="primary" @click="hanldeEdit" style="float:right;margin-top:-5px">修改</el-button>
<el-button type="primary" @click="hanldeRecharge" style="float:right;margin-top:-5px;margin-right:10px">重新计费</el-button>
</div>
<el-table :data="tableDatasf.data" border :height="100">
<el-table-column v-for="item in tableDatasf.columns" :key="item.index" :prop="item.prop" :label="item.label" align="center">
......@@ -74,7 +73,7 @@
</template>
<script>
import { mapGetters } from "vuex";
import { initSfxx, recharge } from "@/api/sfxx.js";
import { initSfxx } from "@/api/sfxx.js";
export default {
components: {},
data () {
......@@ -181,24 +180,13 @@
},
methods: {
getList () {
initSfxx('6a114807a2779413e0db955951ac3524').then(res => {
initSfxx(this.bsmBusiness).then(res => {
let { slsq, jfList, sfList } = res.result
this.ruleForm = slsq
this.tableDatajf.data = jfList
this.tableDatasf.data = sfList
})
},
hanldeRecharge () {
recharge('6a114807a2779413e0db955951ac3524').then(res => {
if (res.code == 200) {
this.tableDatasf.data = res.result
this.$message({
message: '计费成功!',
type: 'success'
})
}
})
},
hanldeEdit () {
this.$popupDialog('编辑', 'workflow/main/sfxx/sfDetail', { bsmBusiness: this.bsmBusiness, dataList: _.cloneDeep(this.tableDatasf.data) }, '50%', true)
}
......
......@@ -5,6 +5,7 @@
</lb-table>
<div class="text-center">
<el-button type="primary" @click="hanldeRecharge">重新计费</el-button>
<el-button @click="$popupCacel">取消</el-button>
<el-button type="primary" @click="handleSubmit" plain>保存</el-button>
</div>
......@@ -12,7 +13,7 @@
</template>
<script>
import store from '@/store/index.js'
import { updateSfxx } from "@/api/sfxx.js";
import { recharge, updateSfxx } from "@/api/sfxx.js";
export default {
props: {
formData: {
......@@ -23,6 +24,7 @@
data () {
return {
key: 0,
dataList: [],
column: [
{
prop: 'sfdw',
......@@ -81,13 +83,34 @@
]
}
},
watch: {
'formData.dataList': {
handler (newValue, oldValue) {
if (newValue.length != 0) {
this.dataList = newValue
}
},
deep: true
}
},
methods: {
hanldeRecharge () {
recharge(this.formData.bsmBusiness).then(res => {
if (res.code == 200) {
this.dataList = res.result
store.dispatch("user/getPouopData", res.result);
this.$message({
message: '计费成功!',
type: 'success'
})
}
})
},
handleSubmit () {
this.formData.dataList.forEach(item => {
this.dataList.forEach(item => {
item.bsmBusiness = this.formData.bsmBusiness
})
updateSfxx(this.formData.dataList).then(res => {
updateSfxx(this.dataList).then(res => {
if (res.code == 200) {
store.dispatch("user/getPouopData", res.result);
this.$message({
......