张雄 3 years ago
parent 677a667ad1
commit e9ff6ada55

Binary file not shown.

@ -0,0 +1,19 @@
import httpService from "@/request"
// 查询平台余额账单记录
export function getBalanceList(params) {
return httpService({
url: `/user/balanceRecord/list`,
method: 'get',
params: params,
})
}
// 平台账户余额充值 创建订单
export function createBalanceRechargeOrder(params) {
return httpService({
url: `/user/alipay/createBalanceRechargeOrder`,
method: 'post',
data: params,
})
}

@ -54,4 +54,21 @@ export default [
}, },
] ]
}, },
{
path: '/Manage/ShopRemain',
name: "settled",
title: "第三方商城余额",
icon: 'dollar',
hide: false,
component: resolve => require(['@/views/Manage/ShopRemain/index.vue'], resolve),
meta: {title: '第三方商城余额'},
},
{
path: '/Manage/Pay',
name: "Pay",
title: "支付页面",
hide: true,
component: resolve => require(['@/views/Manage/ShopRemain/pay.vue'], resolve),
meta: {title: '支付页面'},
},
] ]

@ -1,26 +1,26 @@
<template> <template>
<div> <div>
<div class="tips" v-if="companyInfo === null"> <div class="tips" v-if="companyInfo == null">
<a-space size="large"> <a-space size="large">
第一步请完善企业信息后提交至工作人员审核 第一步请完善企业信息后提交至工作人员审核
<a-button type="primary" shape="round" size="default" <!-- <a-button type="primary" shape="round" size="default"
>关联企业信息</a-button >关联企业信息</a-button
> > -->
</a-space> </a-space>
</div> </div>
<div class="tips" v-else-if="estateList===null"> <div class="tips" v-else-if="estateList == null">
<a-space size="large" > <a-space size="large" >
第二步请添加小区信息用于绑定后续的功能 第二步请添加小区信息用于绑定后续的功能
<a-button type="primary" shape="round" size="default" <!-- <a-button type="primary" shape="round" size="default"
>创建小区</a-button >创建小区</a-button
> > -->
</a-space> </a-space>
</div> </div>
<div class="tips" v-else> <div class="tips" v-else>
第三步请在添加的小区中绑定购买的套餐 在购买功能时直接选择小区绑定 第三步请在添加的小区中绑定购买的套餐 在购买功能时直接选择小区绑定
</div> </div>
<div class="content"> <div class="content">
<div class="top" v-if="companyInfo === null"> <div class="top" v-if="companyInfo == null">
<span style="margin-left: 30px"> <span style="margin-left: 30px">
<div class="top-a">你好{{ username }}</div> <div class="top-a">你好{{ username }}</div>
<div class="top-b">请尽快绑定企业信息进行下一步</div> <div class="top-b">请尽快绑定企业信息进行下一步</div>
@ -78,8 +78,8 @@
<div class="card-a"> <div class="card-a">
<div class="cardTitle">小区后台</div> <div class="cardTitle">小区后台</div>
<div class="card-a-content"> <div class="card-a-content">
<div v-if="estateList !== null"> <div v-if="estateList != null">
<div style="color: #d53131" v-show="estateList === null"> <div style="color: #d53131" v-show="estateList == null">
当前尚未添加小区信息 当前尚未添加小区信息
</div> </div>
<div class="cardBox"> <div class="cardBox">
@ -149,7 +149,7 @@
<template slot="actions" class="ant-card-actions"> <template slot="actions" class="ant-card-actions">
<span><a>续费</a></span> <span><a>续费</a></span>
<span><a @click="unbound(item)"></a></span> <span><a @click="unbound(item)"></a></span>
<span><a></a></span> <span><a @click="orderDetail(item)"></a></span>
<!-- <span>支付</span> <!-- <span>支付</span>
<span>取消</span> --> <span>取消</span> -->
</template> </template>
@ -210,6 +210,25 @@
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-modal> </a-modal>
<a-drawer title="小区详情" :visible="villageVisible" @close="villageClose" width="512">
<a-descriptions :column="1" layout="vertical">
<a-descriptions-item label="小区名称">
{{villageData.name}}
</a-descriptions-item>
<a-descriptions-item label="公司名称">
{{villageData.companyName}}
</a-descriptions-item>
<a-descriptions-item label="小区地址">
{{villageData.provinceName}}{{villageData.cityName}}{{villageData.countyName}}
</a-descriptions-item>
<a-descriptions-item label="详细地址">
{{villageData.addressDetails}}
</a-descriptions-item>
<a-descriptions-item label="小区图片">
<img :src="item.url" alt="" v-for="(item,index) in villageData.imgList" :key="index">
</a-descriptions-item>
</a-descriptions>
</a-drawer>
</div> </div>
</template> </template>
@ -246,7 +265,10 @@ export default {
companyInfo: {}, companyInfo: {},
// //
boundVisible: false, boundVisible: false,
boundForm: {communityId: undefined, adminFunctionOrderId: undefined} boundForm: {communityId: undefined, adminFunctionOrderId: undefined},
//
villageVisible: false,
villageData: {}
}; };
}, },
mounted() { mounted() {
@ -255,7 +277,9 @@ export default {
methods: { methods: {
async getData() { async getData() {
let res = await consoleShow(); let res = await consoleShow();
this.form.companyId = res.data.consoleCompanyVo.id if(res.data.consoleCompanyVo != null) {
this.form.companyId = res.data.consoleCompanyVo.id
}
this.estateList = res.data.consoleCommunityVoList; this.estateList = res.data.consoleCommunityVoList;
this.orderList = res.data.consoleOrderVoList; this.orderList = res.data.consoleOrderVoList;
this.companyInfo = res.data.consoleCompanyVo; this.companyInfo = res.data.consoleCompanyVo;
@ -313,12 +337,20 @@ export default {
boundCancel() { boundCancel() {
this.boundVisible = false; this.boundVisible = false;
}, },
//
orderDetail(val) {
},
//
handlerDetail(val) { handlerDetail(val) {
this.villageVisible = true;
findByIdAdmin({communityId: val.id}).then(res => { findByIdAdmin({communityId: val.id}).then(res => {
let data = res.data; let data = res.data;
console.log(data) this.villageData = data
}) })
}, },
villageClose() {
this.villageVisible = false
},
// //
unbound(val) { unbound(val) {
let obj = {adminFunctionOrderId : val.id} let obj = {adminFunctionOrderId : val.id}

@ -3,28 +3,28 @@
<div class="main-content"> <div class="main-content">
<div class="cardTitle">添加订单信息</div> <div class="cardTitle">添加订单信息</div>
<div class="content"> <div class="content">
<a-form-model :labelCol="{span: 2}" :wrapperCol="{span: 8}"> <a-form-model :labelCol="{span: 2}" :wrapperCol="{span: 8}" :rules="rules">
<a-form-model-item label="订单号"> <!-- <a-form-model-item label="订单号">
<a-input v-model="form.code" ></a-input> <a-input v-model="form.code" ></a-input>
</a-form-model-item> </a-form-model-item> -->
<a-form-model-item label="支付类型"> <a-form-model-item label="支付类型" prop="payType">
<a-select v-model="form.payType"> <a-select v-model="form.payType">
<a-select-option :value="1">线下</a-select-option> <a-select-option :value="1">线下</a-select-option>
<a-select-option :value="2">支付宝</a-select-option> <a-select-option :value="2">支付宝</a-select-option>
<a-select-option :value="3">微信</a-select-option> <a-select-option :value="3">微信</a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="选择收费模版"> <a-form-model-item label="选择收费模版" prop="chargingTemplateId">
<a-select v-model="form.chargingTemplateId" @change="modelChange"> <a-select v-model="form.chargingTemplateId" @change="modelChange">
<a-select-option :value="item.id" v-for="(item, index) in modelData" :key="index"> <a-select-option :value="item.id" v-for="(item, index) in modelData" :key="index">
{{item.name}} {{item.name}}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="选择功能模块"> <a-form-model-item label="选择功能模块" prop="modelFunctionId">
<a-checkbox-group v-model="form.modelFunctionId" :options="functionType" @change="functionChange" /> <a-checkbox-group v-model="form.modelFunctionId" :options="functionType" @change="functionChange" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="选择有效时长"> <a-form-model-item label="选择有效时长" prop="timeTypeId">
<a-select v-model="form.timeTypeId" @change="timeChange"> <a-select v-model="form.timeTypeId" @change="timeChange">
<a-select-option :value="item.id" v-for="(item, index) in timeType" :key="index"> <a-select-option :value="item.id" v-for="(item, index) in timeType" :key="index">
<!-- {{item.years == 0 ? '' : item.years+'年'}} <!-- {{item.years == 0 ? '' : item.years+'年'}}
@ -37,7 +37,7 @@
<a-form-model-item label="购买金额"> <a-form-model-item label="购买金额">
<span style="color: red">¥ {{form.payPrice}}</span> <span style="color: red">¥ {{form.payPrice}}</span>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="绑定小区"> <a-form-model-item label="绑定小区" prop="communityId">
<a-select v-model="form.communityId"> <a-select v-model="form.communityId">
<a-select-option :value="item.id" v-for="(item, index) in comData" :key="index"> <a-select-option :value="item.id" v-for="(item, index) in comData" :key="index">
{{item.name}} {{item.name}}
@ -101,6 +101,13 @@ export default {
isCustomized: 0, // isCustomized: 0, //
customizedDemand: '' // customizedDemand: '' //
}, },
rules: {
payType: [{ required: true, message: "请选择类型", trigger: "blur" }],
chargingTemplateId: [{ required: true, message: "请选择模版", trigger: "blur" }],
modelFunctionId: [{ required: true, message: "请选择模块", trigger: "blur" }],
timeTypeId: [{ required: true, message: "请选择时长", trigger: "blur" }],
communityId: [{ required: true, message: "请选择小区", trigger: "blur" }],
},
comData: [], // comData: [], //
// //
functionType: [], // functionType: [], //

@ -210,13 +210,16 @@ export default {
city: [], city: [],
}; };
}, },
mounted() { created() {
this.getCity(); this.getAllCity();
}, },
methods: { methods: {
async getCity() { getAllCity() {
let res = await allCity(); // let res = await allCity();
this.city = res.data; // this.city = res.data;
allCity().then(res => {
this.city = res.data
})
}, },
// //
getCode() {}, getCode() {},

@ -115,7 +115,7 @@ export default {
let typevalue = JSON.parse(sessionStorage.getItem('info')).type let typevalue = JSON.parse(sessionStorage.getItem('info')).type
if(typevalue===3){ if(typevalue===3){
menus.forEach((item,index)=>{ menus.forEach((item,index)=>{
if(item.title !=='管理员设置'&&item.title !=='首页'){ if(item.title !=='管理员设置'&&item.title !=='首页'&&item.title !=='第三方商城余额'){
item.hide = true item.hide = true
} }
}) })
@ -123,7 +123,7 @@ export default {
this.list = menus; this.list = menus;
}else{ }else{
menus.forEach((item,index)=>{ menus.forEach((item,index)=>{
if(item.title ==='管理员设置'||item.title ==='首页'){ if(item.title ==='管理员设置'||item.title ==='首页'||item.title ==='第三方商城余额'){
item.hide = true item.hide = true
} }
}) })

@ -49,9 +49,11 @@
<a-input <a-input
placeholder="请输入验证码" placeholder="请输入验证码"
v-model="form.code" v-model="form.code"
style="width: 60%" style="width: 50%"
></a-input> ></a-input>
<a-button type="primary" @click="getCode"></a-button> <a-button type="primary" @click="getCode" :disabled="inCodeGap">
{{inCodeGap == false ? '获取验证码' : codeGap+'s后再次获取'}}
</a-button>
<!-- <a-row> <!-- <a-row>
<a-col :span="12" style="margin-left: 23px" <a-col :span="12" style="margin-left: 23px"
><a-checkbox></a-checkbox>&nbsp;&nbsp;</a-col ><a-checkbox></a-checkbox>&nbsp;&nbsp;</a-col
@ -112,9 +114,12 @@
/> />
</a-col> </a-col>
<a-col :span="6"> <a-col :span="6">
<a-button type="primary" @click="registerCode" <!-- <a-button type="primary" @click="registerCode"
>获取验证码</a-button >获取验证码</a-button
> > -->
<a-button type="primary" @click="registerCode" :disabled="inCodeGap">
{{inCodeGap == false ? '获取验证码' : codeGap+'s后再次获取'}}
</a-button>
</a-col> </a-col>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="设置密码" prop="password"> <a-form-model-item label="设置密码" prop="password">
@ -161,9 +166,12 @@
/> />
</a-col> </a-col>
<a-col :span="6"> <a-col :span="6">
<a-button type="primary" @click="getCode" <!-- <a-button type="primary" @click="getCode"
>获取验证码</a-button >获取验证码</a-button
> > -->
<a-button type="primary" @click="getCode" :disabled="inCodeGap">
{{inCodeGap == false ? '获取验证码' : codeGap+'s后再次获取'}}
</a-button>
</a-col> </a-col>
</a-row> </a-row>
</a-form-model-item> </a-form-model-item>
@ -206,6 +214,8 @@ export default {
form,registerForm,registerRules, form,registerForm,registerRules,
mmLogin: false, mmLogin: false,
yzmLogin: false, yzmLogin: false,
inCodeGap: false,
codeGap: 60,
}; };
}, },
created() { created() {
@ -289,17 +299,39 @@ export default {
}, },
// //
getCode() { getCode() {
let num = setInterval(() => {
this.inCodeGap = true;
this.codeGap -= 1;
if(this.codeGap < 1) {
clearInterval(num);
if(this.codeGap < 1) {
this.inCodeGap = false;
this.codeGap = 60;
}
}
},1000)
sendTelCode({ tel: this.form.tel }).then((res) => { sendTelCode({ tel: this.form.tel }).then((res) => {
if (res) { if (res) {
// this.$message.success(""); // this.$message.success("");
this.$message.success(res.msg + " " + res.data); this.$message.success(res.msg);
} }
}); });
}, },
// //
async registerCode(){ async registerCode(){
let num = setInterval(() => {
this.inCodeGap = true;
this.codeGap -= 1;
if(this.codeGap < 1) {
clearInterval(num);
if(this.codeGap < 1) {
this.inCodeGap = false;
this.codeGap = 60;
}
}
},1000)
let res = await sendRegisterCode({tel: this.registerForm.tel}) let res = await sendRegisterCode({tel: this.registerForm.tel})
this.$message.success(res.msg + " " + res.data); this.$message.success(res.msg);
}, },
// //
registerSubmit() { registerSubmit() {

@ -6,17 +6,17 @@
<div class="search-box"> <div class="search-box">
<a-space size="large"> <a-space size="large">
<a-form-model layout="inline"> <a-form-model layout="inline">
<a-form-model-item label="申请人/公司名"> <a-form-model-item label="联系人">
<a-input placeholder="请输入申请人/公司名" v-model="searchForm.name" /> <a-input placeholder="请输入联系人" v-model="searchForm.name" />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="到期状态"> <!-- <a-form-model-item label="到期状态">
<a-select style="width: 200px" placeholder="选择状态" v-model="searchForm.status"> <a-select style="width: 200px" placeholder="选择状态" v-model="searchForm.status">
<a-select-option :value="1">全部数据</a-select-option> <a-select-option :value="1">全部数据</a-select-option>
<a-select-option :value="2">已到期</a-select-option> <a-select-option :value="2">已到期</a-select-option>
<a-select-option :value="3">未到期</a-select-option> <a-select-option :value="3">未到期</a-select-option>
<a-select-option :value="4">临近到期</a-select-option> <a-select-option :value="4">临近到期</a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item> -->
</a-form-model> </a-form-model>
<a-button type="primary" @click="handlerSearch"> </a-button> <a-button type="primary" @click="handlerSearch"> </a-button>
<a-button @click="handlerReset"> </a-button> <a-button @click="handlerReset"> </a-button>

@ -0,0 +1,177 @@
<template>
<div class="main">
<div class="cardTitle">商城余额</div>
<div class="search-box">
<a-space size="large">
<a-descriptions layout="vertical">
<a-descriptions-item label="余额">
¥ <span class="total-amount">5112</span>
</a-descriptions-item>
</a-descriptions>
</a-space>
</div>
<div id="commonTable">
<div style="margin-bottom: 16px">
<a-button @click="handlerCharge" type="primary">
充值
</a-button>
</div>
<a-table :scroll="{ x: 1300 }"
:columns="columns"
:data-source="tableData"
:pagination="pagination"
@change="handleTableChange"
:row-key="
(record, index) => {
return index;
}
">
</a-table>
</div>
<a-modal title="充值" :visible="modalVisible" @cancel="modalClose" @ok="confirm">
<a-form-model layout="inline">
<a-form-model-item label="充值金额">
¥ <a-input-number
:formatter="value => ` ${value}`.replace(/\B(?=(\d{3})+(?!\d))/g, ',')"
:parser="value => value.replace(/\$\s?|(,*)/g, '')"
v-model="form.payAmount" :min="0" :step="0.01" style="width: 150px">
</a-input-number>
</a-form-model-item>
</a-form-model>
<div style="margin-top: 12px">
<span>当前余额<span>{{}}</span>点击继续将跳转至支付宝付款页面</span>
</div>
</a-modal>
<!-- <div>
<form name="punchout_form" method="post" action="https://openapi.alipay.com/gateway.do?charset=UTF-8&method=alipay.trade.page.pay&sign=B5HCq8qiiwkOfH%2FwKaKwxMeExsKFcibdK4oLcz5ypYxqSKcXn0KfqEBcW3u2219sqKKuzFNZGuT5%2F%2BK%2FO3RCeQGUBalM2JdknrI7MiJ4%2B3CvBfyLKDuwZd0SRu7xaPb0VkjIkgbn9g4vpufQaezq19lErd7LCL7wMu14%2FduswqptCQW9bYn%2F4uhTEcgm%2FTu3Ab17fEe3DKSHqG2VqjhzxhViRENB9wZ6Nvq6LltDHJF5QGBbellwvv%2BGikwYAyghtVwc61GJuagldqtlT4fP0zmUIpA1dj4ctUQuyfMYuBIzFbT3TuGDksJFfKQJ17FJkT9kSZYTJZy%2F2wN1Vdl3nQ%3D%3D&notify_url=http%3A%2F%2Fsaas.kaidalai.cn%2Fapi%2Fadmin%2Falipay%2FnotifyInfo%2FbalanceRechargeOrderNotifyInfo&version=1.0&app_id=2021003124652865&sign_type=RSA2&timestamp=2022-04-02+10%3A46%3A20&alipay_sdk=alipay-sdk-java-3.1.0&format=json">
<input type="hidden" name="biz_content" value="{&quot;body&quot;:&quot;商城购物支付&quot;,&quot;out_trade_no&quot;:&quot;CZ20220402104620169001&quot;,&quot;product_code&quot;:&quot;QUICK_MSECURITY_PAY&quot;,&quot;subject&quot;:&quot;商城购物&quot;,&quot;timeout_express&quot;:&quot;30m&quot;,&quot;total_amount&quot;:&quot;0.6&quot;}">
<input type="submit" value="立即支付" style="display:none" >
</form>
<script>document.forms[0].submit();</script>
</div> -->
</div>
</template>
<script>
import {getBalanceList, createBalanceRechargeOrder} from "@/api/user"
export default {
name: 'shopRemain',
data() {
return {
form: {
payAmount: 0
},
columns: [
{
title: "创建时间",
dataIndex: "createDate",
key: "createDate",
width: "200",
},
{
title: "订单编号",
dataIndex: "code",
key: "code",
width: "200",
},
{
title: "账单金额",
dataIndex: "payAmount",
key: "payAmount",
width: "200",
},
{
title: "账单类型",
dataIndex: "type",
key: "type",
width: "200",
customRender: function (type) {
switch (type) {
case 1: return '充值'
case 2: return '扣款'
case 3: return '退款'
default:
break;
}
}
},
{
title: "来源小区",
dataIndex: "communityName",
key: "communityName",
width: "200",
},
],
tableData: [],
pagination: {
current: 1,
total: 0,
pageSize: 10,
showTotal: (total) => `${total}`,
showSizeChanger: true,
showQuickJumper: true,
},
modalVisible: false,
}
},
mounted() {
this.getData()
},
methods: {
getData() {
let obj = {pageNum: this.pagination.current,size: this.pagination.pageSize}
getBalanceList(obj).then(res => {
let data = res.data;
this.tableData = data.rows;
this.pagination.total = data.total
})
},
handleTableChange(val) {
this.pagination.current = val.current;
this.pagination.pageSize = val.pageSize;
this.getData()
},
//
handlerCharge() {
this.modalVisible = true
},
modalClose() {
this.modalVisible = false
},
confirm() {
createBalanceRechargeOrder(this.form).then(res => {
if (res.code === 200) {
this.$message.success(res.msg);
let data = res.data
let routeData = this.$router.resolve({
path: '/Manage/Pay',
query: {
htmls: data
}
});
window.open(routeData.href, '_blank');
this.getData();
this.form.payAmount = 0;
} else {
this.$message.error(res.msg);
}
})
this.modalVisible = false
}
}
}
</script>
<style lang="less">
.total-amount {
font-family: 'Roboto';
color: #CF1322;
font-style: normal;
font-weight: 500;
font-size: 24px;
line-height: 28px;
text-transform: uppercase;
}
</style>

@ -0,0 +1,20 @@
<template>
<div></div>
</template>
<script>
export default {
name: '',
mounted() {
//
const div = document.createElement('div');
div.innerHTML = this.$route.query.htmls;
document.body.appendChild(div);
document.forms[0].submit();
}
}
</script>
<style>
</style>

@ -20,7 +20,6 @@
</a-button> </a-button>
</div> </div>
<a-table <a-table
:scroll="{ x: 1300 }"
:columns="columns" :columns="columns"
:data-source="tableData" :data-source="tableData"
:pagination="pagination" :pagination="pagination"
@ -32,7 +31,8 @@
" "
> >
<span slot="pics" slot-scope="text,record"> <span slot="pics" slot-scope="text,record">
<img :src="item.url" alt="" v-for="(item, index) in record.communityImgList" :key="index"> <img style="width: 40px;height: 40px" v-for="(item, index) in record.communityImgList" :src="$ImgUrl(item.url)" :key="index">
<!-- {{record.communityImgList}} -->
</span> </span>
<span slot="action" slot-scope="text,record"> <span slot="action" slot-scope="text,record">
<a @click="detail(record)"></a> <a @click="detail(record)"></a>
@ -52,18 +52,18 @@
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="小区地址"> <a-form-model-item label="小区地址">
<a-select @change="cityChange1" style="width: 120px" placeholder="请选择省"> <a-select v-model="province" @change="cityChange1" style="width: 120px" placeholder="请选择省">
<a-select-option :value="item.id" v-for="(item, index) in cityData" :key="index"> <a-select-option :value="item.id" v-for="(item) in cityData" :key="item.id">
{{item.name}} {{item.name}}
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-select v-model="address1" @change="cityChange2" style="width: 120px;margin-left: 20px" placeholder="请选择市"> <a-select v-model="address1" @change="cityChange2" style="width: 120px;margin-left: 20px" placeholder="请选择市">
<a-select-option :value="item.id" v-for="(item, index) in cityData2" :key="index"> <a-select-option :value="item.id" v-for="(item) in cityData2" :key="item.id">
{{item.name}} {{item.name}}
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-select v-model="addForm.address" style="width: 120px;margin-left: 20px" placeholder="请选择区"> <a-select v-model="addForm.address" style="width: 120px;margin-left: 20px" placeholder="请选择区">
<a-select-option :value="item.id" v-for="(item, index) in cityData3" :key="index"> <a-select-option :value="item.id" v-for="(item) in cityData3" :key="item.id">
{{item.name}} {{item.name}}
</a-select-option> </a-select-option>
</a-select> </a-select>
@ -72,7 +72,7 @@
<a-input v-model="addForm.addressDetails" style="width: 260px" placeholder="请输入详细地址"></a-input> <a-input v-model="addForm.addressDetails" style="width: 260px" placeholder="请输入详细地址"></a-input>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="小区正门图片"> <a-form-model-item label="小区正门图片">
<imgUpload @handleChange="addFile"></imgUpload> <commonUpload @handleChange="addFile" :fileList="fileList"></commonUpload>
</a-form-model-item> </a-form-model-item>
</a-form-model> </a-form-model>
<a-button @click="addConfirm" type="primary">确定</a-button> <a-button @click="addConfirm" type="primary">确定</a-button>
@ -82,13 +82,9 @@
</template> </template>
<script> <script>
import imgUpload from "@/components/upload/index.vue"
import {getCommunityList, getAddCommunity, getAllRequest, updateCommunity, findByIdAdmin} from "@/api/manage" import {getCommunityList, getAddCommunity, getAllRequest, updateCommunity, findByIdAdmin} from "@/api/manage"
import {getAllCity, getCityByParent} from "@/api/city" import {getAllCity, getCityByParent} from "@/api/city"
export default { export default {
components: {
imgUpload
},
data() { data() {
return { return {
form: { form: {
@ -130,7 +126,7 @@ export default {
width: "200", width: "200",
}, },
{ {
title: "公司图片", title: "小区图片",
dataIndex: "communityImgList", dataIndex: "communityImgList",
width: "200", width: "200",
scopedSlots: { customRender: "pics" }, scopedSlots: { customRender: "pics" },
@ -150,10 +146,12 @@ export default {
cityData: [], cityData: [],
cityData2: [], cityData2: [],
cityData3: [], cityData3: [],
province: undefined,
address1: undefined, address1: undefined,
// / // /
modelType: 1, //1 2 modelType: 1, //1 2
visible: false, visible: false,
fileList: []
}; };
}, },
mounted() { mounted() {
@ -193,7 +191,39 @@ export default {
this.modelType = 2; this.modelType = 2;
findByIdAdmin({communityId: record.id}).then(res => { findByIdAdmin({communityId: record.id}).then(res => {
let data = res.data; let data = res.data;
console.log(data) this.addForm.name = data.name;
this.addForm.companyId = data.companyId;
this.addForm.addressDetails = data.addressDetails;
getCityByParent({parentId: data.provinceId}).then(res => {
let data = res.data;
this.cityData2 = data;
})
getCityByParent({parentId: data.cityId}).then(res => {
let data = res.data;
this.cityData3 = data;
})
this.province = data.provinceId //
this.address1 = data.cityId //
this.addForm.address = data.countyId //
//
this.addForm.communityUrls = [];
if (res.data.imgList.length > 0) {
const pic = [];
this.addForm.communityUrls.push(res.data.imgList[0].url)
for (let item of res.data.imgList) {
let obj = {
name: item.url.split("_")[0] + "." + item.url.split(".")[1],
url: this.$ImgUrl(item.url),
uid: item.url.split("_")[1],
status: "done",
thumbUrl: this.$ImgUrl(item.url),
};
pic.push(obj);
}
this.fileList = pic;
}else{
this.addForm.communityUrls=[]
}
}) })
this.chosenId = record.id; //id this.chosenId = record.id; //id
this.visible = true; this.visible = true;
@ -213,20 +243,42 @@ export default {
this.visible = true; this.visible = true;
}, },
hanlderClose() { hanlderClose() {
this.addForm = {
companyId: undefined,
name: '',
address: undefined,
addressDetails: '',
communityUrls: []
},
this.province = undefined;
this.address1 = undefined;
this.cityData2 = [];
this.cityData3 = [];
this.visible = false; this.visible = false;
this.fileList = [];
}, },
addConfirm() { addConfirm() {
if(this.modelType == 1) { if(this.modelType == 1) {
getAddCommunity(this.addForm).then(() => { getAddCommunity(this.addForm).then((res) => {
this.getData(); if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
}) })
} else { } else {
let obj = Object.assign({id: this.chosenId}, this.addForm) let obj = Object.assign({id: this.chosenId}, this.addForm)
updateCommunity(obj).then(() => { updateCommunity(obj).then((res) => {
this.getData(); if (res.code === 200) {
this.$message.success(res.msg);
this.getData();
} else {
this.$message.error(res.msg);
}
}) })
} }
this.visible = false; this.hanlderClose()
}, },
//- //-
cityChange1(val) { cityChange1(val) {
@ -244,9 +296,13 @@ export default {
}, },
//- //-
addFile(file) { addFile(file) {
let communityUrls = []; this.fileList = file;
communityUrls.push(file[0].response.data); this.addForm.communityUrls = [];
this.addForm.communityUrls = communityUrls; file.forEach(ele => {
if(ele.status == 'done') {
this.addForm.communityUrls.push(ele.response.data)
}
})
} }
}, },
}; };

@ -0,0 +1,5 @@
"<form name="punchout_form" method="post" action="https://openapi.alipay.com/gateway.do?charset=UTF-8&method=alipay.trade.page.pay&sign=B5HCq8qiiwkOfH%2FwKaKwxMeExsKFcibdK4oLcz5ypYxqSKcXn0KfqEBcW3u2219sqKKuzFNZGuT5%2F%2BK%2FO3RCeQGUBalM2JdknrI7MiJ4%2B3CvBfyLKDuwZd0SRu7xaPb0VkjIkgbn9g4vpufQaezq19lErd7LCL7wMu14%2FduswqptCQW9bYn%2F4uhTEcgm%2FTu3Ab17fEe3DKSHqG2VqjhzxhViRENB9wZ6Nvq6LltDHJF5QGBbellwvv%2BGikwYAyghtVwc61GJuagldqtlT4fP0zmUIpA1dj4ctUQuyfMYuBIzFbT3TuGDksJFfKQJ17FJkT9kSZYTJZy%2F2wN1Vdl3nQ%3D%3D&notify_url=http%3A%2F%2Fsaas.kaidalai.cn%2Fapi%2Fadmin%2Falipay%2FnotifyInfo%2FbalanceRechargeOrderNotifyInfo&version=1.0&app_id=2021003124652865&sign_type=RSA2&timestamp=2022-04-02+10%3A46%3A20&alipay_sdk=alipay-sdk-java-3.1.0&format=json">
<input type="hidden" name="biz_content" value="{&quot;body&quot;:&quot;商城购物支付&quot;,&quot;out_trade_no&quot;:&quot;CZ20220402104620169001&quot;,&quot;product_code&quot;:&quot;QUICK_MSECURITY_PAY&quot;,&quot;subject&quot;:&quot;商城购物&quot;,&quot;timeout_express&quot;:&quot;30m&quot;,&quot;total_amount&quot;:&quot;0.6&quot;}">
<input type="submit" value="立即支付" style="display:none" >
</form>
<script>document.forms[0].submit();</script>"
Loading…
Cancel
Save