Commit 2bdc1623 by zhuzhequan

Merge remote-tracking branch 'origin/master'

parents 45c3cca4 e7c3097c
......@@ -14,6 +14,8 @@
"dom",
"dom.iterable",
"scripthost"
]
],
"noUnusedLocals": false,
"noUnusedParameters": false
}
}
......@@ -3,3 +3,6 @@ import axios from '../axios'
export function getUserRechargeRecordListApi(params) {
return axios.post('/pay/businessPayRecord/list_page', params)
}
export function getSubjectListApi(params) {
return axios.get('/pay/businessPayRecord/subjectList', params)
}
<script>
export default {
name: 'CustomForm',
components: {},
props: {
formConfig: {
type: Array,
default: () => []
},
isCustomButton: {
type: Boolean,
default: true
},
isFlex: {
type: Boolean,
default: true
},
formLabelWidth: {
type: String,
default: '50px'
},
formItemWidth: {
type: String,
default: null
},
value: {
type: Object,
default: () => {}
}
},
computed: {},
watch: {
value: {
handler(newValue, oldValue) {
if (Object.keys(newValue).length !== 0) {
this.formData = newValue
} else {
this.initFormData()
}
},
immediate: true,
deep: true
},
formData: {
handler(newValue) {
this.$emit('input', newValue)
},
immediate: true,
deep: true
}
},
data() {
return {
loading: false,
formData: {},
formColumns: []
}
},
methods: {
search() {
this.$emit('searchFn', this.formData)
},
addDialog(obj) {
this.$emit('addDialog')
},
handleSubmit(event) {
event.preventDefault()
},
showToggle() {
this.loading = !this.loading
},
validateForm() {
return this.$refs.form.validate()
},
initFormData() {
this.formConfig.forEach((el) => {
switch (el.type) {
case 'input':
this.$set(this.formData, el.prop, '')
break
case 'select':
case 'radio':
this.$set(this.formData, el.prop, el.defaultValue || '')
break
default:
// 如果有其他类型,可以在这里添加处理逻辑
this.$set(this.formData, el.prop, '')
}
})
},
async resetFields() {
await this.$refs.form?.resetFields()
}
},
created() {
// console.log(104, this.formData)
},
render() {
return (
<el-form
class={this.isFlex ? 'formClass' : ''}
ref="form"
props={{
model: this.formData
}}
size="mini"
inline
onSubmit={this.handleSubmit}
onKeyupenterCapture={this.search}>
{this.formConfig?.map((item, index) => (
<el-form-item
style={{
width: item.type === 'textarea' ? '100%' : this.formItemWidth
}}
class={item.type === 'textarea' ? 'textClass' : ''}
prop={item.prop}
rules={(item.renderRules && item.renderRules(this.formData)) || []}
label-width={item.labelWidth || this.formLabelWidth}
key={index}
label={item.name}>
{item.type === 'input' && (
<el-input
v-model={this.formData[item.prop]}
placeholder={item.placeholder || `请输入${item.name}`}
clearable></el-input>
)}
{item.type === 'textarea' && (
<el-input
type="textarea"
v-model={this.formData[item.prop]}
placeholder={item.placeholder || `请输入${item.name}`}
clearable></el-input>
)}
{item.type === 'select' && (
<el-select
v-model={this.formData[item.prop]}
placeholder={item.placeholder || `请选择${item.name}`}
clearable>
{item.options?.map((el, idx) => (
<el-option
label={el.label}
value={el.value}
key={idx}></el-option>
))}
</el-select>
)}
{item.type === 'datePicker' && (
<el-date-picker
value-format="yyyy-MM-dd"
type={item.dateType || 'date'}
placeholder="选择日期"
v-model={this.formData[item.prop]}
clearable
style="width: 100%;"></el-date-picker>
)}
{item.type === 'radio' &&
item.radioOptions?.map((el, idx) => (
<el-radio
v-model={this.formData[item.prop]}
label={el.value}
key={idx}>
{el.label}
</el-radio>
))}
</el-form-item>
))}
{this.isCustomButton && (
<el-form-item>
<el-button
type="primary"
onClick={this.search}
icon="el-icon-search">
查询
</el-button>
<el-button type="success" onClick={this.addDialog}>
新增
</el-button>
</el-form-item>
)}
{!this.isCustomButton && <slot name="btn"></slot>}
</el-form>
)
}
}
</script>
<style lang="less" scoped>
.formClass {
display: flex;
justify-content: space-between;
flex-wrap: wrap;
.el-form-item {
margin-right: 0;
display: flex;
}
}
.textClass {
display: flex;
::v-deep.el-form-item {
.el-form-item__content {
width: 100%;
flex: 1;
}
}
}
</style>
......@@ -5,15 +5,13 @@
style="border-bottom: 1px solid #ccc"
:editor="editor"
:defaultConfig="toolbarConfig"
:mode="mode"
/>
:mode="mode" />
<Editor
style="height: 300px; overflow-y: hidden"
v-model="html"
:defaultConfig="editorConfig"
:mode="mode"
@onCreated="onCreated"
/>
@onCreated="onCreated" />
</div>
</template>
<script>
......@@ -27,32 +25,32 @@ export default {
data() {
return {
editor: null,
mode: 'default',
mode: 'default'
}
},
model: {
prop: 'content',
event: 'change',
event: 'change'
},
props: {
content: {
type: String,
default: '',
default: ''
},
placeholder: {
type: String,
default: '',
default: ''
},
isInsert: {
type: Boolean,
default: false,
default: false
},
insertData: {
type: Array,
default: () => [
{
label: '客户名称',
value: '{payerName} {payerSurname}',
value: '{payerName} {payerSurname}'
},
{ label: '订单编号', value: '{id}' },
{ label: '店铺单号', value: '{shopNumber}' },
......@@ -61,9 +59,9 @@ export default {
{ label: '发货时间', value: '{shipmentTime}' },
{ label: '妥投时间', value: '{properTime}' },
{ label: '商品', value: '{products}' },
{ label: '收货地址', value: '{address}' },
],
},
{ label: '收货地址', value: '{address}' }
]
}
},
computed: {
......@@ -73,12 +71,12 @@ export default {
},
set(value) {
this.$emit('change', value)
},
}
},
toolbarConfig() {
return {
excludeKeys: ['group-video'],
insertKeys: insertKeys(this.isInsert),
insertKeys: insertKeys(this.isInsert)
}
},
editorConfig() {
......@@ -87,34 +85,28 @@ export default {
placeholder: this.placeholder || '请输入内容...',
MENU_CONF: {
uploadImage: {
allowedFileTypes: [
'jpg',
'jpeg',
'png',
'gif',
'bmp',
],
allowedFileTypes: ['jpg', 'jpeg', 'png', 'gif', 'bmp'],
async customUpload(files, insertFn) {
// JS 语法
// res 即服务端的返回结果
const res = await uploadImg(files, {
url: 'upload/oss',
businessType: 'other',
businessType: 'other'
})
console.log(res)
const { filePath } = res
const url = _this.setimgUrl(filePath, {
w: 640,
w: 640
})
// 从 res 中找到 url alt href ,然后插入图片
insertFn(url)
},
}
},
insertSelect: { options: this.insertData },
},
insertSelect: { options: this.insertData }
}
}
},
}
},
watch: {},
methods: {
......@@ -122,7 +114,7 @@ export default {
this.editor = Object.seal(editor) // 一定要用 Object.seal() ,否则会报错
console.log(editor.getConfig())
this.editor.getAllMenuKeys()
},
}
},
mounted() {
// 模拟 ajax 请求,异步渲染编辑器
......@@ -131,7 +123,7 @@ export default {
const editor = this.editor
if (editor == null) return
editor.destroy() // 组件销毁时,及时销毁编辑器
},
}
}
</script>
<style scoped>
......
......@@ -73,6 +73,12 @@ const routes = [
meta: { title: '公告管理' }
},
{
path: '/saas/services',
component: () => import('@/views/system/services.vue'),
name: 'system_services',
meta: { title: '服务管理' }
},
{
path: '/saas/countryCode',
component: () => import('@/views/system/countryCode.vue'),
name: 'system_countryCode',
......@@ -149,7 +155,8 @@ const routes = [
component: () => import('@/views/production/AssistantManage.vue'),
name: 'production_assistant_manage',
meta: { title: '应用版本管理' }
}, {
},
{
path: '/saas/import-template',
component: () => import('@/views/import-template/index.vue'),
name: 'import-template',
......
......@@ -107,10 +107,20 @@
<div class="sql-left">
<el-form :model="editForm">
<el-form-item required label="数据源">
<el-select @change="selectChange" style="width: 92%;" v-model="editForm.database" multiple clearable filterable>
<el-select
@change="selectChange"
style="width: 92%"
v-model="editForm.database"
multiple
clearable
filterable>
<el-option label="all" value="all"></el-option>
<el-option :disabled="editForm.database.includes('all')" v-for="it in dataBase" :key="it" :label="`${it.databaseName}(${it.dataHost})`"
:value="it.id"></el-option>
<el-option
:disabled="editForm.database.includes('all')"
v-for="it in dataBase"
:key="it"
:label="`${it.databaseName}(${it.dataHost})`"
:value="it.id"></el-option>
</el-select>
</el-form-item>
<el-form-item required>
......@@ -127,20 +137,28 @@
type="password"
placeholder="请输入管理密码"
v-model="editForm.password"></el-input>
<el-button :loading="loading" style="margin-left: 20px" type="primary" @click="submitOm">执行
<el-button
:loading="loading"
style="margin-left: 20px"
type="primary"
@click="submitOm">
执行
</el-button>
</div>
</el-form-item>
</el-form>
</div>
<div class="sql-right">
<ul v-if="msg_list.length>0">
<li v-for="(item,i) in msg_list" :key="i">
<ul v-if="msg_list.length > 0">
<li v-for="(item, i) in msg_list" :key="i">
<div class="flex">
<span>执行结果:</span>
<el-tag size="mini" v-if="item.status==='SUCCESS'" type="success">执行成功</el-tag>
<el-tag
size="mini"
v-if="item.status === 'SUCCESS'"
type="success">
执行成功
</el-tag>
<el-tag size="mini" v-else type="danger">执行失败</el-tag>
</div>
<div class="flex">
......@@ -249,6 +267,14 @@ export default {
icon: 'el-icon-s-promotion',
index: '/saas/announceManage',
children: []
},
{
id: 5,
path: '',
label: '服务管理',
icon: 'el-icon-s-order',
index: '/saas/services',
children: []
}
]
},
......@@ -430,7 +456,6 @@ export default {
...mapState(['userInfo'])
},
watch: {
currentTag(v) {
if (!v) return
const parent = this.menuList.find((e) => {
......@@ -449,7 +474,10 @@ export default {
selectChange(v) {
if (v.includes('all')) {
this.editForm.database = ['all']
} else if (this.dataBase.length > 0 && this.dataBase.length === v.length) {
} else if (
this.dataBase.length > 0 &&
this.dataBase.length === v.length
) {
this.editForm.database = ['all']
}
console.log(v)
......@@ -508,7 +536,7 @@ export default {
this.editForm.content = ''
this.editForm.password = ''
this.editForm.database = ['all']
get('platform/tools/datasource-list').then(res => {
get('platform/tools/datasource-list').then((res) => {
if (res.code === 200) {
this.dataBase = res.data
}
......@@ -607,7 +635,6 @@ export default {
margin-right: 10px;
font-size: 18px;
}
</style>
<style lang="scss">
.sql-dialog {
......@@ -672,5 +699,4 @@ export default {
}
}
}
</style>
......@@ -9,10 +9,25 @@
clearable></el-input>
</el-form-item>
<el-form-item label="套餐版本">
<el-input
<el-select
v-model="searchForm.subject"
placeholder="请输入客户"
clearable></el-input>
placeholder="请选择套餐版本"
clearable>
<el-option
v-for="(item, index) in subjectList"
:key="index"
:label="item.value"
:value="item.value"></el-option>
</el-select>
</el-form-item>
<el-form-item label="支付状态">
<el-select
v-model="searchForm.payStatus"
placeholder="请选择支付状态"
clearable>
<el-option label="已支付" value="已支付"></el-option>
<el-option label="待支付" value="待支付"></el-option>
</el-select>
</el-form-item>
<el-form-item label="交易号">
<el-input
......@@ -32,6 +47,17 @@
placeholder="请输入业务类型"
clearable></el-input>
</el-form-item>
<el-form-item label="付款时间">
<el-date-picker
:default-time="['00:00:00', '23:59:59']"
v-model="searchForm.daterange"
type="datetimerange"
value-format="yyyy-MM-dd HH:mm:ss"
range-separator="至"
:confirm="false"
start-placeholder="初始创建时间"
end-placeholder="结束创建时间"></el-date-picker>
</el-form-item>
<el-form-item>
<el-button
type="primary"
......@@ -51,6 +77,7 @@
width="100%"
height="100%"
:highlight-current-row="true"
@sort-change="sortChange"
header-row-class-name="header-row-class-name">
<el-table-column
label="序号"
......@@ -104,6 +131,13 @@
width="100"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="支付状态"
prop="payStatus"
header-align="center"
align="center"
width="100"
:show-overflow-tooltip="true"></el-table-column>
<el-table-column
label="业务类型"
prop="businessType"
header-align="center"
......@@ -149,6 +183,7 @@
<el-table-column
label="付款时间"
sortable="custom"
prop="clientTime"
header-align="center"
align="center"
......@@ -183,13 +218,18 @@
</div>
</template>
<script>
import { getUserRechargeRecordListApi } from '@/common/api/user/user'
import {
getUserRechargeRecordListApi,
getSubjectListApi
} from '@/common/api/user/user'
export default {
name: 'rechargeRecord',
data() {
return {
period: [],
subjectList: [],
sortParmas: {},
searchForm: {},
total: 0,
pageSize: 50,
......@@ -200,14 +240,22 @@ export default {
},
async created() {
this.loadData()
this.getSubjectList()
},
methods: {
async loadData() {
const data = {
async loadData(obj) {
let data = {
...this.searchForm,
currentPage: this.currentPage,
pageSize: this.pageSize
}
if (this.searchForm.daterange?.length) {
data.minTime = this.searchForm.daterange[0]
data.maxTime = this.searchForm.daterange[1]
}
if (obj) {
data = { ...data, ...obj }
}
this.loading = true
try {
const res = await getUserRechargeRecordListApi(data)
......@@ -215,22 +263,37 @@ export default {
this.rechargeRecordList = res.data.records
this.total = res.data.total
} catch (e) {
console.error(e)
console.log(e)
} finally {
this.loading = false
}
},
search() {
this.currentPage = 1
this.loadData()
this.loadData(this.sortParmas)
},
onCurrentChange(currentPage) {
this.currentPage = currentPage
this.loadData()
this.loadData(this.sortParmas)
},
sizeChange(pageSize) {
this.pageSize = pageSize
this.loadData()
this.loadData(this.sortParmas)
},
sortChange({ column, prop, order }) {
this.sortParmas = {
field: prop,
asc: order === 'ascending'
}
this.loadData(this.sortParmas)
},
async getSubjectList() {
try {
const { data } = await getSubjectListApi()
this.subjectList = data
} catch (error) {
console.log(error)
}
}
}
}
......
......@@ -7,11 +7,12 @@ module.exports = defineConfig({
proxy: {
'/api': {
target: 'http://10.168.31.222:8096',
changeOrigin: true,
changeOrigin: true
// pathRewrite: {
// '^/api': '',
// },
},
},
},
}
}
}
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment