fix():23:42电脑没有电了,先保存一份,充电
parent
5b5751b509
commit
b055287cb2
|
@ -0,0 +1,34 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
//查看客户列表
|
||||
export function selectList(data) {
|
||||
return request({
|
||||
url:'/pay/customer/list',
|
||||
method:"POST",
|
||||
data:data
|
||||
})
|
||||
}
|
||||
|
||||
//请求未入住的服务code
|
||||
export function customerAll(){
|
||||
return request({
|
||||
url:'/pay/customer/all',
|
||||
method:'GET'
|
||||
})
|
||||
}
|
||||
|
||||
//添加
|
||||
export function save(data){
|
||||
return request({
|
||||
url:'/pay/customer',
|
||||
method:'POST'
|
||||
})
|
||||
}
|
||||
|
||||
//修改
|
||||
export function update(data){
|
||||
return request({
|
||||
url:'/pay/customer',
|
||||
method:'PUT'
|
||||
})
|
||||
}
|
|
@ -99,47 +99,47 @@
|
|||
</el-row>
|
||||
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="8" v-for="index in 16">
|
||||
<el-empty description="暂无支付客户" v-if="customerList.length === 0"></el-empty>
|
||||
<el-col :span="8" v-for="customer in customerList" v-if="customerList.length === 0" >
|
||||
<el-card class="box-card">
|
||||
<div slot="header" class="clearfix">
|
||||
<span style="font-size: 18px;font-weight: 900;">会员服务</span>
|
||||
<span style="font-size: 18px;font-weight: 900;">{{customer.appName}}</span>
|
||||
<el-switch
|
||||
style="float: right; margin: 4px 5px 0;"
|
||||
v-model="switchValue"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949">
|
||||
</el-switch>
|
||||
<el-button style="float: right; padding: 5px; margin: 0 5px" type="primary" icon="el-icon-edit" circle></el-button>
|
||||
<el-button style="float: right; padding: 5px; margin: 0 5px" type="danger" icon="el-icon-delete" circle></el-button>
|
||||
<el-button style="float: right; padding: 5px; margin: 0 5px" type="danger" icon="el-icon-delete"
|
||||
@click="handleDelete"
|
||||
circle></el-button>
|
||||
<el-button style="float: right; padding: 5px; margin: 0 5px" type="primary" icon="el-icon-edit"
|
||||
@click="handleUpdate"
|
||||
circle></el-button>
|
||||
|
||||
</div>
|
||||
<div>
|
||||
<el-descriptions class="margin-top" :column="1" :size="size" border>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><i class="el-icon-user"></i>客户名称</template>
|
||||
会员服务
|
||||
{{ customer.appName }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><i class="el-icon-user"></i>客户编码</template>
|
||||
cloud-vip
|
||||
{{ customer.appCode }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><i class="el-icon-user"></i>创建人</template>
|
||||
张三
|
||||
{{ customer.createBy }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item>
|
||||
<template slot="label"><i class="el-icon-user"></i>创建日期</template>
|
||||
2024-8-10 10:10:10
|
||||
{{ customer.createTime }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<el-divider content-position="center">近五笔交易记录</el-divider>
|
||||
<el-table
|
||||
:data="[
|
||||
{cusOrderNumber:'123456',price:'163.56',channelTypeName:'支付宝',},
|
||||
{cusOrderNumber:'123456',price:'163.56',channelTypeName:'支付宝',},
|
||||
{cusOrderNumber:'123456',price:'163.56',channelTypeName:'支付宝',},
|
||||
{cusOrderNumber:'123456',price:'163.56',channelTypeName:'支付宝',},
|
||||
{cusOrderNumber:'123456',price:'163.56',channelTypeName:'支付宝',}
|
||||
]"
|
||||
:data="customer.orderPaySimpleRespList"
|
||||
style="width: 100%">
|
||||
<el-table-column prop="cusOrderNumber" label="客户单号"/>
|
||||
<el-table-column prop="price" label="支付金额"/>
|
||||
|
@ -151,11 +151,42 @@
|
|||
</el-row>
|
||||
|
||||
<el-dialog
|
||||
title="提示"
|
||||
title="title"
|
||||
:visible.sync="open"
|
||||
width="50%"
|
||||
:before-close="handleClose">
|
||||
<span>这是一段信息</span>
|
||||
width="50%">
|
||||
<el-form ref="form" :model="form" label-width="120px" :rules="rules">
|
||||
<el-form-item label="客户编码" prop="appCode">
|
||||
<span v-if="this.form.id!=null" style="font-size: 16px">cloud-1</span>
|
||||
<el-select v-if="this.form.id==null" v-model="form.appCode" placeholder="请选择未入住的客户" style="width: 100%">
|
||||
<el-option
|
||||
v-for="item in appCodeList"
|
||||
:key="item"
|
||||
:label="item"
|
||||
:value="item">
|
||||
</el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户名称" prop="appName">
|
||||
<el-input v-model="form.appName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="激活开通" prop="status">
|
||||
<el-radio-group v-model="form.status">
|
||||
<el-radio
|
||||
v-for="dict in dict.type.sys_yes_no"
|
||||
:key="dict.value"
|
||||
:label="dict.value"
|
||||
>{{ dict.label }}
|
||||
</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="客户备注">
|
||||
<el-input v-model="form.remark" type="textarea" rows="6"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="详细描述">
|
||||
<!-- <el-input v-model="form.appDesc"></el-input>-->
|
||||
<editor v-model="form.appDesc" :min-height="192"/>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取 消</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">提交</el-button>
|
||||
|
@ -165,10 +196,12 @@
|
|||
</div>
|
||||
|
||||
|
||||
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {customerAll, selectList} from "@/api/pay/customer";
|
||||
import {addConfig, updateConfig} from "@/api/system/config";
|
||||
|
||||
export default {
|
||||
name: 'Customer',
|
||||
dicts: ['sys_yes_no'],
|
||||
|
@ -182,11 +215,39 @@ export default {
|
|||
"appCode": "",
|
||||
"status": "Y"
|
||||
},
|
||||
//客户列表
|
||||
customerList:[],
|
||||
switchValue:true,
|
||||
//修改/添加
|
||||
open: false,
|
||||
//模态框标题
|
||||
title:"",
|
||||
// 表单内容
|
||||
form: {
|
||||
"appName": "",
|
||||
"appCode": "",
|
||||
"appDesc": "",
|
||||
"status": "Y",
|
||||
"remark": "",
|
||||
},
|
||||
//未入住的客户
|
||||
appCodeList:["cloud-1","cloud-2","cloud-3"],
|
||||
// 表单校验
|
||||
rules: {
|
||||
appCode: [
|
||||
{required: true, message: "请选择客户编码", trigger: "change"}
|
||||
],
|
||||
appName: [
|
||||
{required: true, message: "客户名称不能为空", trigger: "blur"}
|
||||
],
|
||||
status: [
|
||||
{required: true, message: "请选择客户是否开通", trigger: "blur"}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
this.getList()
|
||||
},
|
||||
methods: {
|
||||
/** 重置按钮操作 */
|
||||
|
@ -201,8 +262,60 @@ export default {
|
|||
},
|
||||
//搜索
|
||||
getList(){
|
||||
selectList(this.queryParams).then(response=>{
|
||||
this.customerList=response.data;
|
||||
})
|
||||
},
|
||||
// 表单重置
|
||||
reset() {
|
||||
this.form = {
|
||||
"appName": "",
|
||||
"appCode": "",
|
||||
"appDesc": "",
|
||||
"status": "Y",
|
||||
"remark": "",
|
||||
};
|
||||
this.resetForm("form");
|
||||
this.customerList = [];
|
||||
customerAll().then(response=>{
|
||||
this.customerList=response.data;
|
||||
})
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
this.reset();
|
||||
this.open = true;
|
||||
this.title = "添加支付单客户信息";
|
||||
},
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate() {
|
||||
this.reset();
|
||||
// TODO 请求接口
|
||||
this.form.id = "1";
|
||||
this.open = true;
|
||||
this.title = "添加支付单客户信息";
|
||||
},
|
||||
/** 提交按钮 */
|
||||
submitForm: function () {
|
||||
this.$refs["form"].validate(valid => {
|
||||
if (valid) {
|
||||
if (this.form.id != undefined) {
|
||||
updateConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
} else {
|
||||
addConfig(this.form).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.open = false;
|
||||
this.getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
Loading…
Reference in New Issue