| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249 |
- <template>
- <view class="content">
- <view class="supplyInfo">
- <view class="tel flex">
- <label>缴费名称:</label>
- <input type="text" class="card input" v-model="payInfo.name" disabled/>
- </view>
- <view class="tel flex">
- <label>订单编号:</label>
- <input type="text" class="card input" v-model="payInfo.code" disabled/>
- </view>
- <view class="tel flex">
- <label>住宅地址:</label>
- <input type="text" class="card input" v-model="payInfo.address" disabled/>
- </view>
- <view class="tel flex">
- <label>户主姓名:</label>
- <input type="text" class="card input" v-model="payInfo.owner_name" disabled/>
- </view>
- <view class="tel flex">
- <label>住宅面积:</label>
- <input type="text" class="card input" v-model="payInfo.area" disabled/>
- </view>
- <view class="tel flex">
- <label>缴费类型:</label>
- <radio-group @change="payChange">
- <radio value="1" :checked="payInfo.type!==2" style="margin-right: 30rpx;transform: scale(0.85);">金额</radio>
- <radio value="2" :checked="payInfo.type===2" style="transform: scale(0.85);">空置</radio>
- </radio-group>
- </view>
- <view class="tel flex">
- <label>缴费金额:</label>
- <input type="text" class="card input" id="real_fee" v-model="payInfo.real_fee" disabled/>
- </view>
- </view>
- <button class="submit" @tap="paySubmit">{{payStatus ? '申请开票' : '缴费'}}</button>
- <uni-popup ref="popup" :mask-click="false">
- <view class="popup-box">
- <view>
- <view class="popup-title">申请开票</view>
- <view class="popup-content-box">
- <view class="popup-content">
- <view class="popup-type">
- <view>开票抬头:</view><input type="text" value="" />
- </view>
- <view class="popup-type">
- <view>备注:</view><input type="text" value="" />
- </view>
- </view>
- </view>
- </view>
- <view class="popup-footer">
- <button class="popup-submit" @click="submitInvocie">提交</button>
- </view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import md5 from "@/common/md5.js";
- export default {
- data() {
- return {
- payInfo: {
- },
- payStatus:0,
- };
- },
- onLoad(option) {
- this.getPayDetail(option.id)
- },
- methods: {
- getPayDetail(payId) {
- let md5Sign = md5(
- "method=" +
- "user" +
- "×tamp=" +
- getApp().globalData.globalTimestamp +
- "&secret=" +
- getApp().globalData.secret
- );
- let url =
- getApp().globalData.shareUrl +
- "api/api.php" +
- "?method=user&source=user&action=get_order_info×tamp=" +
- getApp().globalData.globalTimestamp +
- "&sign=" +
- md5Sign;
- let postData = {
- code:payId,
- openId: getApp().globalData.open_id,
- };
- uni.request({
- url: url,
- method: "POST",
- header: {
- "content-type": "application/x-www-form-urlencoded",
- },
- data: postData,
- success: (res) => {
- if (res.data.code === 200) {
- this.payInfo = res.data.data;
- this.payInfo.address = this.payInfo.estate_name + this.payInfo.building_name + this.payInfo.unit + this.payInfo.room
- } else {
- uni.showToast({
- title: res.data.msg,
- icon: "none",
- duration: 2500,
- });
- }
- },
- fail: () => {
- console.log("连接失败");
- },
- });
- },
- payChange(e){
- let v = e.detail.value;
- if (v == 2)
- {
- let value = this.payInfo.part_fee - this.payInfo.reduction;
- this.payInfo.real_fee = value;
- }
- else
- {
- let value = this.payInfo.total_fee - this.payInfo.reduction;
- this.payInfo.real_fee = value;
- }
- this.payInfo.payType = e.detail.value;
- },
- paySubmit(){
- this.payStatus = 1;
- if(this.payStatus){
- this.open()
- }
- },
- submitInvocie(){
- this.closePopup()
- },
- open() {
- this.$refs.popup.open('center')
- },
- closePopup() {
- this.$refs.popup.close()
- },
- },
- };
- </script>
- <style lang="scss" scoped>
- .content {
- font-size: 28rpx;
- font-weight: 200;
- padding: 1% 2%;
- .title {
- font-size: 30rpx;
- margin: 4% 0;
- }
- label {
- display: inline-block;
- width: 25%;
- vertical-align: middle;
- }
- .card {
- background-color: rgb(248, 247, 247);
- border-radius: 10rpx;
- }
- .flex {
- display: flex;
- align-items: center;
- margin-bottom: 2%;
- }
- .input {
- padding: 0 2%;
- margin: 2% 0;
- display: inline-block;
- width: 80%;
- height: 70rpx;
- }
- .supplyInfo {
- border-radius: 40rpx;
- padding: 4%;
- box-shadow: rgba(100, 100, 111, 0.2) 14rpx 14rpx 40rpx 14rpx;
- margin: 30rpx 0 30rpx 0;
- }
- .info {
- margin-top: 2%;
- border-radius: 40rpx;
- padding: 2% 4%;
- box-shadow: rgba(100, 100, 111, 0.2) 14rpx 14rpx 40rpx 14rpx;
- }
- .submit {
- color: white;
- font-weight: normal;
- width: 55%;
- border-radius: 20rpx;
- background-color: #02a7f0;
- margin: 120rpx auto;
- }
- }
- .popup-box {
- height: 100%;
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- }
- .popup-title {
- text-align: center;
- font-weight: bold;
- height: 30px;
- border-bottom: 1px solid #d8d8d8;
- }
- .popup-content {
- font-size: 28rpx;
- padding: 10rpx 0 10rpx 0;
- }
- .popup-type {
- display: flex;
- height: 80rpx;
- align-items: center;
- margin-top: 60rpx;
- view {
- width: 30%;
- }
- input {
- border: 1px solid #d7d7d7;
- width: 60%;
- border-radius: 5rpx;
- padding-left: 10rpx;
- height: 56rpx;
- }
- }
- .popup-footer {
- display: flex;
- button{
- font-size: 26rpx;
- height: 60rpx;
- width: 150rpx;
- line-height: 60rpx;
- color: #FFFFFF;
- }
- }
- .popup-cancel {
- background-color: #AAAAAA;
- }
- .popup-submit {
- background-color: #249CD3;
- }
- </style>
|