|
|
@@ -117,23 +117,28 @@
|
|
|
label="状态"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
- <el-switch
|
|
|
- @change="handelStatusChange($event,scope.row)"
|
|
|
- v-model="scope.row.status"
|
|
|
- active-text="激活"
|
|
|
- inactive-text="禁用"
|
|
|
- :active-value="1"
|
|
|
- :inactive-value="0">
|
|
|
- </el-switch>
|
|
|
+ {{ scope.row.status === 1 ? '激活' : '禁用' }}
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
+ <el-table-column
|
|
|
+ prop="payParam"
|
|
|
+ label="支付参数"
|
|
|
+ :show-overflow-tooltip="true"
|
|
|
+ min-width="200"
|
|
|
+ >
|
|
|
+ </el-table-column>
|
|
|
+
|
|
|
<el-table-column
|
|
|
prop="action"
|
|
|
label="操作"
|
|
|
width="260"
|
|
|
>
|
|
|
<template slot-scope="scope">
|
|
|
+ <el-button
|
|
|
+ @click="$refs.modal.show('edit', scope.row)">
|
|
|
+ 编辑
|
|
|
+ </el-button>
|
|
|
<el-button
|
|
|
v-if="scope.row.name === '工行支付'"
|
|
|
@click="$refs.subMerchant.show(scope.row)">
|
|
|
@@ -172,7 +177,7 @@
|
|
|
import Modal from './Modal.vue'
|
|
|
import TicketSpot from './TicketSpot.vue'
|
|
|
import SubMerchant from './SubMerchant.vue'
|
|
|
-import { getPayChannel, updatePayChannel, deletePayChannel } from '@/api/payChannel'
|
|
|
+import { getPayChannel, deletePayChannel } from '@/api/payChannel'
|
|
|
|
|
|
const nameMap = {
|
|
|
'POS': 'POS机',
|
|
|
@@ -245,13 +250,7 @@ export default {
|
|
|
}).catch(() => {})
|
|
|
},
|
|
|
handelStatusChange (value, item) {
|
|
|
- const newItem = Object.assign({}, { ...item, status: value })
|
|
|
-
|
|
|
- updatePayChannel(newItem).then(res => {
|
|
|
- this.$message.success('操作成功')
|
|
|
- this.getList()
|
|
|
- this.$store.dispatch('getPayChannel')
|
|
|
- })
|
|
|
+ this.$refs.modal.show('edit', item)
|
|
|
}
|
|
|
}
|
|
|
}
|