This commit is contained in:
unknown 2025-11-03 21:54:54 +08:00
parent 6cca8ba900
commit 2413749137
7 changed files with 1225 additions and 632 deletions

102
components/keyboard.vue Normal file
View File

@ -0,0 +1,102 @@
<template>
<view class="keyborad" :style="{transform:show_key?'translateY(0)':'translateY(100%)'}">
<view class="key_main">
<view class="main_title">
<u-icon @tap="hideFun" name="close" color="#333333" size="16" bold></u-icon>
<!-- <image src="/static/del_1.png" mode="aspectFill" @tap="hideFun"></image> -->
<text>请输入支付密码</text>
</view>
<view class="main_content">
<view class="content_num">
<view v-for="item in inputArray" :key="item" class="content_item">{{password[item-1] ? '' :''}}</view>
</view>
<view class="main_forget" @tap="forgetFun">忘记密码</view>
</view>
<view class="main_keyboard">
<view class="key_num" v-for="item in numberArray" :key="item" @tap="inputNumFun({num:item})">{{item}}</view>
<view class="key_null"></view>
<view class="key_0" @tap="inputNumFun({num:0})">0</view>
<view class="key_del" @tap="delNumFun">
<image src="/static/del_2.png" mode="aspectFill"></image>
</view>
</view>
</view>
</view>
</template>
<script>
export default{
props:{
show_key:Boolean
},
computed:{},
data(){
return{
inputArray:[1,2,3,4,5,6],//
numberArray:[1,2,3,4,5,6,7,8,9],//
password:'',//
}
},
methods:{
inputNumFun(op){
let _this = this
if(_this.password.length <=6){
_this.password += op.num
if(_this.password.length == 6){
_this.$emit('getPassword',{password:_this.password})
_this.password = ''
// uni.showModal({
// title:'',
// content:_this.password,
// success() {
// _this.password = ""
// }
// })
}
}
},
delNumFun(){
if(this.password.length == 0) return
this.password = this.password.substring(0,this.password.length - 1)
console.log("删除后的结果",this.password)
},
forgetFun(){
uni.showToast({
title:'忘记密码操作',
icon:'none'
})
},
hideFun(){
console.log("close")
this.$emit('hideFun')
}
}
}
</script>
<style lang="scss">
.keyborad{background: rgba(100,100,100,.2); width:100vw;height: 100vh;position: fixed;bottom: 0px;top:0px;left:0px;right:0px;z-index:100;display: flex;flex-direction: column;justify-content: flex-end;transform: translateY(100%);transition:all 0.4s;
.key_main{ width:100vw;height: 900rpx;background: #fff;box-sizing: border-box;display: flex;flex-direction: column;justify-content: space-between;
.main_title{ font-size:34rpx;color: #000000;height: 100rpx;display: flex;align-items: center;letter-spacing: 2rpx;width:100%;box-sizing: border-box;padding:0px 20rpx;border-bottom:0rpx solid #e1e1e1;
image{ width:48rpx;height: 48rpx;position: relative;z-index:10}
text{ flex:1;margin-left:-48rpx;display: flex;justify-content: center;}
}
.main_content{ width:100%;box-sizing: border-box;padding:0px 30rpx;margin-top:40rpx;
.content_num{ width:100%;height: 100rpx;border:2rpx solid #DBDBDB;border-radius: 10rpx;display: flex;align-items: center;
.content_item{ flex: 1;height: 100%;border-right: 2rpx solid #DBDBDB;display: flex;justify-content: center;align-items: center;}
.content_item:last-child{ border-right:none}
}
.main_forget{ display: flex;justify-content: center;align-items: center;width:100%;font-size:28rpx;color: #007AFF;margin-top:40rpx}
}
.main_keyboard{ width:100%;height: 500rpx;background: #FFFFFF;display: flex;flex-flow: wrap;
.key_null,.key_del{ background: #e2e7eb;}
image{ width:48rpx;height: 48rpx;}
.key_num,.key_null,.key_del,.key_0{ width:250rpx;height: 125rpx;display: flex;align-items: center;justify-content: center;}
.key_num{ border-right:2rpx solid #f1f4f4;border-bottom:2rpx solid #f1f4f4;box-sizing: border-box;}
.key_num:nth-child(8){border-bottom: none;}
.key_0{ border-top:2rpx solid #f1f4f4}
}
}
}
</style>

View File

@ -190,4 +190,5 @@ export const qrcode = (data, callback) => post('api/promotion/generate', data, c
export const cityarealist = (data, callback) => post('api/recover/area/cityarealist', data, callback); export const cityarealist = (data, callback) => post('api/recover/area/cityarealist', data, callback);
export const createRecharge = (data, callback) => post('api/recover/recharge/createRecharge', data, callback); export const createRecharge = (data, callback) => post('api/recover/recharge/createRecharge', data, callback);
export const statistics = (data, callback) => post('api/recover/personmoney/statistics', data, callback); export const statistics = (data, callback) => post('api/recover/personmoney/statistics', data, callback);
export const createPayment = (data, callback) => post('api/recover/person/createPayment', data, callback);

View File

@ -154,9 +154,10 @@
</view> </view>
<view class="lineEle"></view> <view class="lineEle"></view>
<view class="flex-between userBox"> <view class="flex-between userBox">
<view class="flex-center statusText1" v-show="item.status==7"> <view class="flex-center statusText1" v-if="item.status==7">
期望时间{{item.order_time_text}} 期望时间{{item.order_time_text}}
</view> </view>
<view v-else></view>
<view class="flex-center statusText1" v-show="item.status==2"> <view class="flex-center statusText1" v-show="item.status==2">
<view @click.stop="moreShow=!moreShow">更多操作</view> <view @click.stop="moreShow=!moreShow">更多操作</view>
<view class="floatBtnBox" v-show="moreShow"> <view class="floatBtnBox" v-show="moreShow">
@ -175,6 +176,9 @@
<view v-show="item.status==7" class="userBtn flex-center" @click.stop="selectTime(item.id)"> <view v-show="item.status==7" class="userBtn flex-center" @click.stop="selectTime(item.id)">
预约上门 预约上门
</view> </view>
<view v-show="item.status==3" class="userBtn flex-center" @click.stop="toPay(item)">
去付款
</view>
</view> </view>
</view> </view>
</view> </view>
@ -385,6 +389,10 @@
id: 1, id: 1,
name: '待接单' name: '待接单'
}, },
{
id: 7,
name: '已接单'
},
{ {
id: 2, id: 2,
name: '已预约' name: '已预约'
@ -404,10 +412,6 @@
{ {
id: 6, id: 6,
name: '已取消' name: '已取消'
},
{
id: 7,
name: '已接单'
} }
], ],
tabCur: 0, tabCur: 0,
@ -468,8 +472,7 @@
}); });
// this.getdata() // this.getdata()
// this.config() // this.config()
this.recycleOrderList() // this.qiangdanlist()
this.qiangdanlist()
}, },
onHide() { onHide() {
}, },
@ -481,8 +484,10 @@
_this.longitude = res.longitude; _this.longitude = res.longitude;
_this.latitude = res.latitude; _this.latitude = res.latitude;
console.log(res,'kkkkkkkkk+++') console.log(res,'kkkkkkkkk+++')
_this.qiangdanlist()
// uni.setStorageSync('city_name',res.city) // uni.setStorageSync('city_name',res.city)
}) })
this.recycleOrderList()
// this.getdata() // this.getdata()
// this.getquestion() // this.getquestion()
// this.recycleOrderList() // this.recycleOrderList()
@ -526,6 +531,12 @@
} }
}, },
methods: { methods: {
toPay(item){
uni.setStorageSync('orderDetail', item);
uni.navigateTo({
url:'/pages/order/pay?id=' + item.id
})
},
open(){ open(){
}, },
@ -587,6 +598,7 @@
status: 3, status: 3,
order_id: id order_id: id
} }
console.log('bbbbbb')
uni.getLocation({ uni.getLocation({
type: 'wgs84', type: 'wgs84',
geocode: true, geocode: true,
@ -610,6 +622,22 @@
}) })
} }
}); });
/* #ifdef H5 */
data.checkin_latitude = 32.202905;
data.checkin_longitude = 118.710193;
_this.$api.setorder(data,res=>{
if(res.code == '1'){
_this.tabCur = 3;
uni.showToast({ title: '签到成功' , icon: 'success' })
_this.recycleOrderList()
setTimeout(()=>{
_this.menuNum = 2
},2000)
}else{
uni.showToast({ title: res.msg , icon: 'none' })
}
})
/* #endif */
// this.$api.setorder(data,res=>{ // this.$api.setorder(data,res=>{
// if(res.code == '1'){ // if(res.code == '1'){
// this.tabCur = 2; // this.tabCur = 2;
@ -1553,5 +1581,11 @@
font-size: 30rpx; font-size: 30rpx;
color: #FB8F0C; color: #FB8F0C;
} }
.funBtnBox{
display: flex;
flex-direction: row;
justify-content: flex-end;
align-items: center;
}
</style> </style>

View File

@ -46,7 +46,7 @@ var QQMapWX = require('@/common/qqmap-wx-jssdk.min.js')
export default { export default {
data() { data() {
return { return {
mobile:'15653535658', mobile:'15655350912',
password:'123456', password:'123456',
login_type:0, login_type:0,
logoImage: '/static/img/t2.png', logoImage: '/static/img/t2.png',

View File

@ -8,16 +8,16 @@
<image src="/static/img/41.png" class="icon1"></image> <image src="/static/img/41.png" class="icon1"></image>
<view class="text1">线下支付</view> <view class="text1">线下支付</view>
</view> </view>
<image v-if="!upPayCheck" :src="path+'/assets/img/icon/noSelected.png'" @click="upPayClick" class="img1"></image> <image v-if="radioType == '1'" :src="path+'/assets/img/icon/selected.png'" class="img1"></image>
<image v-else :src="path+'/assets/img/icon/selected.png'" @click="upPayClick" class="img1"></image> <image v-else :src="path+'/assets/img/icon/noSelected.png'" @click="upPayClick('1')" class="img1"></image>
</view> </view>
<view class="flex-between" style="margin-top: 46rpx;margin-bottom: 20rpx;"> <view class="flex-between" style="margin-top: 46rpx;margin-bottom: 20rpx;">
<view class="flex-center"> <view class="flex-center">
<image src="/static/img/41.png" class="icon1"></image> <image src="/static/img/41.png" class="icon1"></image>
<view class="text1">线上支付</view> <view class="text1">线上支付</view>
</view> </view>
<image v-if="!downPayCheck" :src="path+'/assets/img/icon/noSelected.png'" @click="downPayClick" class="img1"></image> <image v-if="radioType == '2'" :src="path+'/assets/img/icon/selected.png'" class="img1"></image>
<image v-else :src="path+'/assets/img/icon/selected.png'" @click="downPayClick" class="img1"></image> <image v-else :src="path+'/assets/img/icon/noSelected.png'" @click="upPayClick('2')" class="img1"></image>
</view> </view>
</view> </view>
<view class="moduleBox"> <view class="moduleBox">
@ -26,7 +26,7 @@
<text class="text2">请上传支付记录截图或照片</text> <text class="text2">请上传支付记录截图或照片</text>
</view> </view>
<view style="margin-top: 35rpx;"> <view style="margin-top: 35rpx;">
<commonUpload></commonUpload> <commonUpload @imgList="recordList"></commonUpload>
</view> </view>
</view> </view>
<view class="moduleBox2"> <view class="moduleBox2">
@ -37,13 +37,13 @@
<view style="line-height: 39rpx;margin-top: 46rpx;"> <view style="line-height: 39rpx;margin-top: 46rpx;">
<text class="text3">平台预估费用</text> <text class="text3">平台预估费用</text>
<text class="text4"></text> <text class="text4"></text>
<text class="text5">323</text> <text class="text5">{{total_amount}}</text>
</view> </view>
<view class="text3" style="margin-top: 46rpx;">实际结算费用</view> <view class="text3" style="margin-top: 46rpx;">实际结算费用</view>
<view class="flex-between" style="margin-top: 36rpx;"> <view class="flex-between" style="margin-top: 36rpx;">
<view> <view>
<text class="text6"></text> <text class="text6"></text>
<text class="text7">323</text> <text class="text7">{{actual_amount}}</text>
</view> </view>
<image :src="path+'/assets/img/icon/edit2.png'" class="img2"></image> <image :src="path+'/assets/img/icon/edit2.png'" class="img2"></image>
</view> </view>
@ -60,7 +60,7 @@
<text class="text2">请上传回收货物照片</text> <text class="text2">请上传回收货物照片</text>
</view> </view>
<view style="margin-top: 35rpx;"> <view style="margin-top: 35rpx;">
<commonUpload></commonUpload> <commonUpload @imgList="goodsList"></commonUpload>
</view> </view>
</view> </view>
<view style="height:130px"></view> <view style="height:130px"></view>
@ -80,9 +80,9 @@
<text class="text1">合计预估</text> <text class="text1">合计预估</text>
<text class="text2">结算金额以实际为准</text> <text class="text2">结算金额以实际为准</text>
</view> </view>
<view class="priceBox" :style="{opacity: evaluate?1:0}"> <view class="priceBox" :style="{opacity: actual_amount?1:0}">
<text class="text1"></text> <text class="text1"></text>
<text class="text2">{{evaluate}}</text> <text class="text2">{{actual_amount}}</text>
</view> </view>
</view> </view>
<view class="btn btn-default" @click="createOrder()" >去下单</view> <view class="btn btn-default" @click="createOrder()" >去下单</view>
@ -109,302 +109,96 @@
</view> </view>
</lvv-popup> </lvv-popup>
</view> </view>
<pay-keyboard :show_key="show_key" @hideFun="hideFun" @getPassword="getPassword"></pay-keyboard>
</view> </view>
</template> </template>
<script> <script>
import lvvPopup from '@/components/lvv-popup/lvv-popup.vue';
import commonUpload from '@/components/commonUpload.vue' import commonUpload from '@/components/commonUpload.vue'
import util from '../../common/util.js' import util from '../../common/util.js'
import payKeyboard from '../../components/keyboard.vue'
export default { export default {
components: { lvvPopup,commonUpload }, components: { commonUpload, payKeyboard },
data() { data() {
return { return {
useraddress:{},
id:0,
xieyi:'',
address_id:0,
weight:-1 ,
typeinfo:'',
detail:[],
remark:'',
weightlist:[],
index:[0,0],
timeflag:'',
yuyue_time:[],
typelist: [],
typeShow: false,
value1: '',
recyclingType: {},
specifications: [],
addressInfo: {},
toDoorShow: false,
showTime: Number(new Date()),
toDoorTime: '',
notesText: '',
specsList: [],
quantity: '',
path: this.path,
isRead: false, isRead: false,
evaluate: '', radioType: 1,
orderId: '',
upPayCheck: false, orderDetail: {},
downPayCheck: false total_amount: '',
actual_amount: '',
xieyi: '',
payment_vouchers: [],
goods_images: [],
pay_password: '',
show_key: false
} }
}, },
onShow() { onShow() {
this.getdata()
let user_address = uni.getStorageSync('user_address');
if (user_address) {
this.useraddress = user_address;
this.address_id = user_address.id;
uni.removeStorageSync('user_address');
}
}, },
onHide() { onHide() {
}, },
onLoad(options) { onLoad(options) {
this.orderDetail = uni.getStorageSync('orderDetail');
this.total_amount = this.orderDetail.total_amount;
this.actual_amount = this.orderDetail.total_amount;
this.id = options.id; this.id = options.id;
if(options.id){ if(options.id){
this.recyclingType.id = options.id; this.orderId = options.id;
} }
this.getdata()
this.getTypeData()
var token = uni.getStorageSync('userToken');
if (token) {
this.userDefaultaddress();
}
}, },
onReachBottom (){ onReachBottom (){
}, },
methods: { methods: {
upPayClick(){ hideFun(){
this.upPayCheck = !this.upPayCheck this.show_key = false
}, },
downPayClick(){ getPassword(n){
this.downPayCheck = !this.downPayCheck console.log("用户输入的密码",n.password)
this.pay_password = n.password
this.show_key = false
this.createPayment();
},
recordList(res){
this.payment_vouchers = res;
},
goodsList(res){
this.goods_images = res
},
upPayClick(name){
this.radioType = name
}, },
selectRead(){ selectRead(){
this.isRead = !this.isRead; this.isRead = !this.isRead
},
doorTimeClick(){
this.toDoorShow = true;
// if(!this.toDoorTime){
// this.showTime = util.formatDate(new Date(),'YYYY-MM-DD')
// }
},
confirmTime(data){
console.log(data)
this.showTime = data.value;
this.toDoorTime = util.formatDate(data.value,'YYYY-MM-DD HH:mm')
this.toDoorShow = false;
},
cancelClick(){
this.toDoorShow = false;
},
openSelect(item,index) {
this.specifications[index].show = true;
console.log(index, this.specifications[index])
},
selectConfirm(value,item,index) {
console.log(value,item,index, 'dddddddddww')
this.specifications[index].select = {
key: item.name,
val: value.value[0]
}
this.specifications[index].show = false;
console.log(this.specifications)
this.getPrice()
},
selectType(val) {
console.log(val.value[0])
this.recyclingType = val.value[0]
this.typeShow = false
this.getTypeSpecs(val.value[0].name)
},
getTypeData(){
let data = {
}
this.$api.indexpage(data,res=>{
if(res.code == '1'){
this.typelist = [res.data.type]
res.data.type.some((item,index)=>{
if(item.id == this.recyclingType.id){
this.recyclingType = item;
}
})
}
})
},
getTypeSpecs(name){
// /api/recover/recover/type_specs
this.$api.type_specs({type_name: name}, res => {
if (res.code ==1) {
if(res.data){
// this.useraddress = res.data;
// this.address_id = this.useraddress.id;
console.log(res.data,'dddd')
this.specsList = res.data.specs;
for (let key in res.data.specArr) {
this.specifications.push({
name: key,
arr: res.data.specArr[key],
show: false,
select: {}
})
}
console.log(this.specifications)
}
}
});
},
userDefaultaddress() {
this.$api.userDefaultAddress({}, res => {
if (res.code ==1) {
if(res.data){
this.useraddress = res.data;
this.address_id = this.useraddress.id;
}
}
});
},
goAddress() {
var token = uni.getStorageSync('userToken');
if (!token) {
uni.navigateTo({
url: '/pages/login/authorize'
});
}else{
uni.navigateTo({
url: '/pages/address/list?type=order'
});
}
},
toshow() {
this.$refs.lvvpopref.show();
},
toclose() {
this.$refs.lvvpopref.close();
},
changeWeight(e){
this.weight=e;console.log(e);
},
bindPickerChange(e) {
this.index = e.detail.value
let left = e.detail.value[0]
let right = e.detail.value[1]
if(this.yuyue_time[1].length ==0){
this.timeflag = this.yuyue_time[0][left]
}else{
this.timeflag = this.yuyue_time[0][left] +'-'+this.yuyue_time[1][right]
}
},
getdata(){
let data = {
id:this.id
}
this.$api.typeinit(data,res=>{
if(res.code == '1'){
this.yuyue_time = res.data.yuyue_time
this.typeinfo= res.data.typeinfo
this.weightlist= res.data.weight
this.detail= res.data.detail
this.xieyi=res.data.xieyi
}
})
},
areObjectsEqual(obj1, obj2) {
const keys1 = Object.keys(obj1);
const keys2 = Object.keys(obj2);
if (keys1.length !== keys2.length) {
return false;
}
for (let key of keys1) {
if (obj1[key] !== obj2[key]) {
return false;
}
}
return true;
},
getPrice(){
let selecObj = {}
this.specifications.some((item,index)=>{
selecObj[item.select.key] = item.select.val
})
let priceId = ''
this.specsList.some((item,index)=>{
if(this.areObjectsEqual(item.spec_data,selecObj)){
priceId = item.id
if(this.quantity){
this.evaluate = item.current_price*this.quantity
}else{
this.evaluate = ''
}
}
})
return priceId
}, },
createOrder(){ createOrder(){
console.log(this.specifications,'fff') this.show_key = true
if(!this.isRead){ },
uni.showToast({ icon: "none", title: '请勾选用户回收协议' }) createPayment(){
return false;
}
// let selecObj = {}
// this.specifications.some((item,index)=>{
// selecObj[item.select.key] = item.select.val
// })
// let priceId = ''
// this.specsList.some((item,index)=>{
// if(this.areObjectsEqual(item.spec_data,selecObj)){
// priceId = item.id
// }
// })
let priceId = this.getPrice
// console.log(selecObj,priceId);
// if(this.weight =='-1'){
// uni.showToast({ icon: "none", title: '' })
// return false;
// }if(this.address_id ==0 || !this.address_id ){
// uni.showToast({ icon: "none", title: '' })
// return false;
// } if(this.timeflag ==''){
// uni.showToast({ icon: "none", title: '' })
// return false;
// }
let data = { let data = {
id: this.recyclingType.id,//this.id, "order_id": this.orderDetail.id,
order_time: this.toDoorTime,//this.timeflag, "actual_amount": this.actual_amount,
// weight:this.weightlist[this.weight], "payment_method": this.radioType,
address_id: this.useraddress.id,//this.address_id, "payment_vouchers": this.payment_vouchers,
remark: this.notesText, //this.remark, "goods_images": this.goods_images,
specsId: priceId, "pay_password": this.pay_password
quantity: this.quantity
} }
console.log(data,'gggggg') console.log(data);
// return; this.$api.createPayment(data,res=>{
this.$api.addorder(data,res=>{
uni.showToast({
title: res.msg,
icon: 'none'
})
if(res.code == '1'){ if(res.code == '1'){
uni.showToast({ title: res.msg , icon: 'success' })
setTimeout(function() { setTimeout(()=>{
uni.switchTab({ uni.navigateBack({
url: '/pages/order/order' delta: 1
}) })
}, 1500) },2000)
} else { }else{
uni.showToast({ title: res.msg , icon: 'none' })
} }
}) })
}, }
} }
} }
</script> </script>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long