提交 e9e10b34 authored 作者: 彭寒菲's avatar 彭寒菲

师傅端

上级 c6f49278
...@@ -89,7 +89,7 @@ export function uploadAttachments(file){ ...@@ -89,7 +89,7 @@ export function uploadAttachments(file){
* @param {String} filePath 图片路径 * @param {String} filePath 图片路径
*/ */
export function postAvatar(filePath){ export function postAvatar(filePath){
let name = filePath.replace('http://tmp/','') let name = filePath.replace('http://tmp/','').replace('http://usr/','').replace('wxfile://tmp/','').replace('wxfile://tmp_','')
let url = apiBaseUrl let url = apiBaseUrl
return new Promise((resolve,reject) => { return new Promise((resolve,reject) => {
wx.uploadFile({ wx.uploadFile({
...@@ -134,6 +134,25 @@ export function cashOut(amount){ ...@@ -134,6 +134,25 @@ export function cashOut(amount){
} }
/** /**
* @param {String} amount 查询余额提现记录
* @description 查询余额提现记录
*/
export function cashOutView(){
return http({
url:'/api/CashOut/View'
})
}
/**
* @param {String} amount 查询余额提现中数据
* @description 查询余额提现中数据
*/
export function cashOuting(){
return http({
url:'/api/CashOut/GetCashoutingSF'
})
}
/**
* @description 获取帮助主页地址 * @description 获取帮助主页地址
*/ */
export function getHelpUrl(){ export function getHelpUrl(){
...@@ -327,6 +346,19 @@ export function sendAppointment(params){ ...@@ -327,6 +346,19 @@ export function sendAppointment(params){
data:params data:params
}) })
} }
/**
* @description 发送确认地址短信
* @param {Object} params
*/
export function confirmCoordinate(params){
return http({
url:'/api/Order/ConfirmCoordinate',
method:'POST',
data:params
})
}
/** /**
* @description 缴纳信息费 * @description 缴纳信息费
* @param {Object} params * @param {Object} params
......
import store from '../store/store.js' import store from '../store/store.js'
//正式环境https://www.jtfw8.com/WXXCX //正式环境https://www.jtfw8.com/WXXCX "https://www.jtfw8.com/CSWX"
//测试环境http://116.62.129.2/CSWX //测试环境http://116.62.129.2/CSWX
const apiBaseUrl = "https://www.jtfw8.com/CSWX" const apiBaseUrl = "https://www.jtfw8.com/CSWX"
......
...@@ -6,62 +6,66 @@ ...@@ -6,62 +6,66 @@
加载中... 加载中...
</view> </view>
</view> --> </view> -->
<view class="main" > <view class="main">
<order-card v-if="data.length !== 0" :cardData="data" :btnText="btnText" @show="show" @handleDetails="handleDetails"></order-card> <order-card v-if="data.length !== 0" :cardData="oDatas" :btnText="bText" @show="show"
@handleDetails="handleDetails"></order-card>
<u-empty v-if="data.length === 0" text="暂无数据" font-size="32"></u-empty> <u-empty v-if="data.length === 0" text="暂无数据" font-size="32"></u-empty>
</view> </view>
<u-modal <u-modal v-model="showModal" title="抢单提示" :show-cancel-button="true" :async-close="true" @confirm="modalConfirm"
v-model="showModal" ref="uModal" confirm-color="#7c59fc">
title="抢单提示"
:show-cancel-button="true"
:async-close="true"
@confirm="modalConfirm"
ref="uModal"
confirm-color="#7c59fc"
>
<view style="text-align: center;margin: 5% 0;"> <view style="text-align: center;margin: 5% 0;">
<text>预计此单价格为<text>{{}}</text>元,是否抢单?</text> <text>预计此单价格为<text>{{QDtipsMount}}</text>元,抢单成功后请在待预约查看,是否抢单?</text>
<!-- <text>抢单成功后请在待预约查看,是否立即抢单?</text> -->
</view> </view>
</u-modal> </u-modal>
</view> </view>
</template> </template>
<script> <script>
import {loading,hidden,toast} from '../tips/myTips.js' import {
import {grabOrder,SFView} from '../api/apis.js' loading,
hidden,
toast
} from '../tips/myTips.js'
import {
grabOrder,
SFView
} from '../api/apis.js'
import orderCard from './orderCard' import orderCard from './orderCard'
export default { export default {
props:{ props: {
data:{ data: {
type:Array type: Array
}, },
status:{ status: {
type:String type: String
}, },
loading:{ loading: {
type:Boolean type: Boolean
} }
}, },
components:{ components: {
orderCard orderCard
}, },
data(){ data() {
return { return {
btn:{ btn: {
background:"#ff9900", background: "#ff9900",
color:"#FFFFFF" color: "#FFFFFF"
}, },
showModal:false, showModal: false,
FID:'' FID: '',
QDtipsMount: 0,
Yfrate: 0 //应付信息费
} }
}, },
computed:{ computed: {
state:function(){ state: function() {
return this.$store.state return this.$store.state
}, },
//不同状态的单据,按钮不同 //不同状态的单据,按钮不同
btnText:function(){ bText: function() {
switch(this.$store.state.state){ switch (this.$store.state.state) {
case '待报价': case '待报价':
return '立即报价' return '立即报价'
case '待预约': case '待预约':
...@@ -73,105 +77,125 @@ ...@@ -73,105 +77,125 @@
case '待结算': case '待结算':
return '缴纳信息费' return '缴纳信息费'
} }
return this.$store.state.state
}, },
oDatas: function() {
return this.data
}
}, },
methods:{ methods: {
handleDetails(index){ handleDetails(index) {
console.log("订单内码:",this.data[index].FID) console.log("订单内码:", this.data[index].FID)
uni.navigateTo({ uni.navigateTo({
url:'../orderDetails/orderDetails?FID='+this.data[index].FID url: '../orderDetails/orderDetails?FID=' + this.data[index].FID
}) })
}, },
show(FID){ show(FID, Amount, yfrate) {
this.showModal = true this.showModal = true
this.FID = FID this.FID = FID
this.QDtipsMount = Amount
this.Yfrate = yfrate
}, },
modalConfirm(){ modalConfirm() {
let that = this let that = this
let params = {FID:''} let params = {
FID: ''
}
params.FID = this.FID params.FID = this.FID
params.FSFYAmount = this.QDtipsMount
params.FInfoFee = this.Yfrate
grabOrder(params).then((res) => { grabOrder(params).then((res) => {
if(res.data.code == 0){ if (res.data.code == 0) {
console.log("抢单成功:",res) console.log("抢单成功:", res)
that.$refs.uModal.clearLoading() // that.$refs.uModal.clearLoading()
that.showModal = false that.showModal = false
this.reload() this.reload()
}else{ } else {
console.log("抢单失败:",res) console.log("抢单失败:", res)
toast(res.data.message) toast(res.data.message)
that.$refs.uModal.clearLoading() // that.$refs.uModal.clearLoading()
that.showModal = false that.showModal = false
that.reload() // that.reload()
} }
}) })
}, },
//重新加载 //重新加载
reload(){ reload() {
let that = this let that = this
this.$store.state.loading = true that.$emit('SFVIVEW')
SFView(this.state.state).then((res) => { // this.$store.state.loading = true
that.$store.state.loading = false // SFView(this.state.state).then((res) => {
console.log("查询订单信息结果:",res) // that.$store.state.loading = false
if(res.data.code == 0){ // console.log("查询订单信息结果:", res)
console.log(that.$store.state.state+'信息') // if (res.data.code == 0) {
if(Object.values(res.data.result)[0] !== null){ // console.log(that.$store.state.state + '信息')
console.log(Object.values(res.data.result)[0][0]) // if (Object.values(res.data.result)[0] !== null) {
that.orderData = Object.values(res.data.result)[0][0] // console.log(Object.values(res.data.result)[0][0])
}else{ // that.oDatas = Object.values(res.data.result)[0][0]
console.log(Object.values(res.data.result)[0]) // } else {
that.orderData = Object.values(res.data.result)[0] // console.log(Object.values(res.data.result)[0])
} // that.oDatas = Object.values(res.data.result)[0]
}else{ // }
console.log("查询"+that.$store.state.state+"信息失败") // } else {
console.log(res) // console.log("查询" + that.$store.state.state + "信息失败")
toast(res.data.message) // console.log(res)
} // toast(res.data.message)
}) // }
// })
} }
} }
} }
</script> </script>
<style> <style>
.order{ .order {
padding: 2%; padding: 2%;
overflow-y: scroll; overflow-y: scroll;
} }
.loading{
.loading {
text-align: center; text-align: center;
} }
.head{
.head {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
flex-wrap:wrap; flex-wrap: wrap;
} }
.title{
.title {
color: #000000; color: #000000;
font-size: 16px; font-size: 16px;
width: 75%; width: 75%;
} }
.sub-title{
.sub-title {
color: #ff9900; color: #ff9900;
} }
.tags{
.tags {
margin-top: 10px; margin-top: 10px;
} }
.tag{
.tag {
display: inline; display: inline;
margin-right: 8px; margin-right: 8px;
} }
.item{
.item {
margin: 10px 0; margin: 10px 0;
} }
.label{
.label {
margin-left: 5px; margin-left: 5px;
} }
.foot{
.foot {
display: flex; display: flex;
flex-direction: row-reverse; flex-direction: row-reverse;
} }
.btn{
.btn {
margin: 0 2%; margin: 0 2%;
} }
</style> </style>
<template> <template>
<view> <view>
<u-card v-for="(item,index) in cardData" :key="index" @click="handleDetails(index)"> <u-card v-for="(item,index) in listCardData" :key="index" @click="handleDetails(index)">
<view slot="head" class="head"> <view slot="head" class="head">
<view class="title">{{item.ProNAme}}</view> <view class="title">{{item.ProNAme}}</view>
<view class="sub-title">{{subTitle(item)}}</view> <view class="sub-title">{{subTitle(item)}}</view>
...@@ -22,7 +22,9 @@ ...@@ -22,7 +22,9 @@
</view> </view>
<view class="item"> <view class="item">
<u-icon name="clock" size="36"></u-icon> <u-icon name="clock" size="36"></u-icon>
<text class="label">期望上门时间:{{item.FHopeServiceTime}}</text> <text class="label"
v-if="item.caption==='待报价'||item.caption==='待预约'||!item.FAPPOINTMENTDATETIME">期望上门时间:{{item.FHopeServiceTime}}</text>
<text class="label" v-else>{{displayApppointtime(item)}}</text>
</view> </view>
<view class="item"> <view class="item">
<u-icon name="rmb-circle" size="36"></u-icon> <u-icon name="rmb-circle" size="36"></u-icon>
...@@ -30,16 +32,17 @@ ...@@ -30,16 +32,17 @@
</view> </view>
</view> </view>
</view> </view>
<view slot="foot" class="foot" <view slot="foot" class="foot" v-if="subTitle(item)=='待报价' || subTitle(item)=='待预约'">
v-if="subTitle(item)=='待报价' || subTitle(item)=='待预约'">
<view class="btn" v-show="subTitle(item) != '已完成'"> <view class="btn" v-show="subTitle(item) != '已完成'">
<u-button style="margin-right:5px" v-show="subTitle(item)=='待报价'&&isqiangdan(item)" size="mini"
shape="circle" type="warning" @click="grap(item)">立即抢单
</u-button>
<u-button size="mini" shape="circle" type="warning" @click="handleDetails(index)">{{btnText}} <u-button size="mini" shape="circle" type="warning" @click="handleDetails(index)">{{btnText}}
</u-button> </u-button>
</view> </view>
</view> </view>
<view slot="foot" class="foot" <view slot="foot" class="foot" v-else-if="subTitle(item)=='待服务' || subTitle(item)=='待验收'">
v-else-if="subTitle(item)=='待服务' || subTitle(item)=='待验收'">
<view class="btn" v-show="subTitle(item) != '已完成'"> <view class="btn" v-show="subTitle(item) != '已完成'">
<u-button size="mini" shape="circle" type="warning" @click="handleDetails(index)">{{btnText}} <u-button size="mini" shape="circle" type="warning" @click="handleDetails(index)">{{btnText}}
...@@ -65,6 +68,14 @@ ...@@ -65,6 +68,14 @@
</template> </template>
<script> <script>
import {
getOrderDetails
} from '../api/apis.js'
import {
loading,
hidden,
toast
} from '../tips/myTips.js'
export default { export default {
name: "card", name: "card",
props: ['cardData', 'btnText'], props: ['cardData', 'btnText'],
...@@ -85,12 +96,59 @@ ...@@ -85,12 +96,59 @@
return '业主现场支付' return '业主现场支付'
} }
}, },
grap(FID) { grap(item) {
this.$emit('show', FID) let that = this
let amount = item.FSHAmount || 0
let infoRate = this.$store.state.userInfo.FInfoRate
let yfrate = Number(amount * infoRate * 0.01).toFixed(2)
let anAmount = Number(Number(amount) - Number(yfrate)).toFixed(2)
this.$emit('show', item.FID, anAmount, yfrate)
// let showamount = 0;
// loading()
// getOrderDetails(FID).then((res) => {
// hidden()
// if (res.data.code == 0) {
// //应收金额字段=订单应付金额-订单应付金额*师傅信息费比例
// let orderDetails = res.data.result
// let amount = orderDetails.Maindata[0].FSHAmount
// let infoRate = that.$store.state.userInfo.FInfoRate
// let yfrate = Number(amount * infoRate * 0.01).toFixed(2)
// showamount = Number(Number(amount) - Number(yfrate)).toFixed(2)
// this.$emit('show', FID, showamount, yfrate)
// }
// })
}, },
handleDetails(index) { handleDetails(index) {
this.$emit('handleDetails', index) this.$emit('handleDetails', index)
}, },
isqiangdan(item) {
let issupport = this.isSupportOrderGrabbing()
let amount = item.FSHAmount || 0
let infoRate = this.$store.state.userInfo.FInfoRate
let yfrate = Number(amount * infoRate * 0.01).toFixed(2)
let anAmount = Number(Number(amount) - Number(yfrate)).toFixed(2)
return anAmount > 0 && (issupport || (item.FPayWay != '1' && issupport === false))
},
getNullEmpty(val) {
if (val === null || val === '' || val === undefined || val === 'null' || val === ' ') {
return ''
}
if (val.trim().length == 0) return ''
return val
},
displayApppointtime(item) {
//显示预约上门时间
let dtext = this.getNullEmpty(item.FAPPOINTMENTDATETIME || '')
if (dtext !== '') {
let textsplit = dtext.split(':')
dtext = textsplit[0] + ":" + (textsplit.length > 1 ? textsplit[1] : '') // this.$u.timeFormat(dtext, 'yyyy-mm-dd hh:MM').replace(/\-/g, "/")
}
return '预约上门时间:' + dtext
},
isSupportOrderGrabbing() {
return this.$store.state.userInfo.FSupportOrderGrabbing;
},
subTitle(item) { subTitle(item) {
let result = '' let result = ''
if (parseInt(item.BJcount) > 0 && item.caption == '待报价') { if (parseInt(item.BJcount) > 0 && item.caption == '待报价') {
...@@ -101,7 +159,11 @@ ...@@ -101,7 +159,11 @@
return result return result
} }
}, },
computed: {} computed: {
listCardData: function() {
return this.cardData
}
}
} }
</script> </script>
......
...@@ -57,11 +57,19 @@ ...@@ -57,11 +57,19 @@
}, },
"usingComponents" : true, "usingComponents" : true,
"plugins" : { "plugins" : {
"citySelector" : { // "citySelector" : {
"version" : "1.0.0", // "version" : "1.0.1",
"provider" : "wx63ffb7b7894e99ae", // "provider" : "wx63ffb7b7894e99ae",
"export" : "index.js" // "export" : "index.js"
} // }
// ,"ocr-plugin": {
// "version": "3.1.2",
// "provider": "wx4418e3e031e551be"
// },
// "chooseLocation": {
// "version": "1.0.9",
// "provider": "wx76a9a06e5b4e693e"
// }
}, },
"permission" : { "permission" : {
"scope.userLocation" : { "scope.userLocation" : {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
"uni-read-pages": "^1.0.5", "uni-read-pages": "^1.0.5",
"uni-simple-router": "^2.0.7", "uni-simple-router": "^2.0.7",
"uview-ui": "^1.8.4", "uview-ui": "^1.8.4",
"vuex": "^3.6.2" "vuex": "^3.6.2",
"wx-server-sdk": "^2.6.1"
} }
} }
...@@ -4,124 +4,133 @@ ...@@ -4,124 +4,133 @@
}, },
"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages "pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
{ {
"path":"pages/index/index" "path": "pages/index/index"
}, },
{ {
"path":"pages/my/my" "path": "pages/my/my"
}, },
{ {
"path":"pages/myWallet/myWallet" "path": "pages/deposit/deposit"
}, },
{ {
"path":"pages/myWallet/detail/detail" "path": "pages/realnameAuthentication/realnameAuthentication"
// ,"style":{
// "mp-weixin":{
// "usingComponents":{
// "ocr-navigator": "plugin://ocr-plugin/ocr-navigator"
// }
// }
// }
}, },
{ {
"path":"pages/myWallet/withdrawal/withdrawal" "path": "pages/serviceArea/serviceArea"
}, },
{ {
"path":"pages/deposit/deposit" "path": "pages/serviceCategory/serviceCategory"
}, },
{ {
"path":"pages/personalSettings/personalSettings" "path": "pages/map/map"
}, },
{ {
"path":"pages/address/address", "path": "pages/customerService/customerService"
"style":{
"mp-weixin":{
"usingComponents":{
"selector-component": "plugin://citySelector/selector-component"
}
}
}
}, },
{ {
"path":"pages/moreSettings/moreSettings" "path": "pages/register/register"
}, },
{ {
"path":"pages/moreSettings/carInfo/carInfo" "path": "pages/serviceArea/edit/edit"
}, },
{ {
"path":"pages/moreSettings/skillCertificate/skillCertificate" "path": "pages/orderDetails/orderDetails"
}, },
{ {
"path":"pages/moreSettings/thirdVoucher/thirdVoucher" "path": "pages/search/search"
}, },
{ {
"path":"pages/help/help" "path": "pages/myWallet/myWallet"
}, },
{ {
"path":"pages/personalEvaluation/personalEvaluation" "path": "pages/myWallet/detail/detail"
}, },
{ {
"path":"pages/realnameAuthentication/realnameAuthentication" "path": "pages/myWallet/withdrawal/withdrawal"
}, },
{ {
"path":"pages/serviceArea/serviceArea" "path": "pages/personalSettings/personalSettings"
}, },
{ {
"path":"pages/serviceCategory/serviceCategory" "path": "pages/personalSettings/cut/u-avatar-cropper",
"style": {
"navigationBarTitleText": "头像裁剪",
"navigationBarBackgroundColor": "#000000"
}
}, },
{ {
"path":"pages/feedback/feedback" "path": "pages/moreSettings/moreSettings"
}, },
{ {
"path":"pages/personalSettings/cut/u-avatar-cropper", "path": "pages/moreSettings/carInfo/carInfo"
"style":{
"navigationBarTitleText": "头像裁剪",
"navigationBarBackgroundColor": "#000000"
}
}, },
{ {
"path":"pages/map/map" "path": "pages/moreSettings/skillCertificate/skillCertificate"
}, },
{ {
"path":"pages/customerService/customerService" "path": "pages/moreSettings/thirdVoucher/thirdVoucher"
}, },
{ {
"path":"pages/register/register" "path": "pages/help/help"
}, },
{ {
"path":"pages/serviceArea/edit/edit" "path": "pages/personalEvaluation/personalEvaluation"
}, },
{ {
"path":"pages/orderDetails/orderDetails" "path": "pages/feedback/feedback"
}, },
{ {
"path":"pages/search/search" "path": "pages/address/address"
// ,"style":{
// "mp-weixin":{
// "usingComponents":{
// "selector-component": "plugin://citySelector/selector-component"
// }
// }
// }
} }
], ],
// "subPackages": [{
// "root": "mysheet", // 分包的根目录
// "pages": [
// ] // 当前分包下的页面路径,同pages
// }],
"globalStyle": { "globalStyle": {
"navigationBarTextStyle": "#ffffff", "navigationBarTextStyle": "#ffffff",
"navigationBarTitleText": "京台", "navigationBarTitleText": "京台",
"navigationBarBackgroundColor": "#7c59fc", "navigationBarBackgroundColor": "#7c59fc",
"backgroundColor": "#F8F8F8" "backgroundColor": "#F8F8F8"
}, },
"tabBar":{ "tabBar": {
"color":"#c8c8c8", "color": "#c8c8c8",
"selectedColor":"#7c59fc", "selectedColor": "#7c59fc",
"list":[ "list": [{
{ "pagePath": "pages/index/index",
"pagePath":"pages/index/index", "iconPath": "./static/images/tabbar/home.png",
"iconPath":"./static/images/tabbar/home.png", "selectedIconPath": "./static/images/tabbar/home_selected.png",
"selectedIconPath":"./static/images/tabbar/home_selected.png", "text": "订单"
"text":"订单"
}, },
{ {
"pagePath":"pages/my/my", "pagePath": "pages/my/my",
"iconPath":"./static/images/tabbar/my.png", "iconPath": "./static/images/tabbar/my.png",
"selectedIconPath":"./static/images/tabbar/my_selected.png", "selectedIconPath": "./static/images/tabbar/my_selected.png",
"text":"我的" "text": "我的"
} }
] ]
}, },
"condition" : { //模式配置,仅开发期间生效 "condition": { //模式配置,仅开发期间生效
"current": 0, //当前激活的模式(list 的索引项) "current": 0, //当前激活的模式(list 的索引项)
"list": [ "list": [{
{
"name": "", //模式名称 "name": "", //模式名称
"path": "", //启动页面,必选 "path": "", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到 "query": "" //启动参数,在页面的onLoad函数里面得到
} }]
]
} }
} }
...@@ -5,9 +5,14 @@ ...@@ -5,9 +5,14 @@
<u-form-item label="居住地址" prop="address" :required="true"> <u-form-item label="居住地址" prop="address" :required="true">
<u-input disabled v-model="form.address" @click="show = true" placeholder="点击选择居住地址"></u-input> <u-input disabled v-model="form.address" @click="show = true" placeholder="点击选择居住地址"></u-input>
<u-select v-model="show" mode="mutil-column-auto" :list="list" @confirm="save"></u-select> <u-select v-model="show" mode="mutil-column-auto" :list="list" @confirm="save"></u-select>
<u-icon slot="right" name="arrow-right" @click="show = true"></u-icon>
</u-form-item> </u-form-item>
<u-form-item label="详细地址" prop="detail" :required="true"> <u-form-item label="详细地址" prop="detail" :required="true">
<u-input v-model="form.detail" type="textarea" placeholder="请输入详细地址(如:XXX街道,XXX小区)"></u-input> <u-input v-model="form.detail" type="textarea" placeholder="请输入详细地址(如:XXX街道,XXX小区)"></u-input>
<!-- <u-input v-model="form.detail" type="textarea" placeholder="请输入详细地址(如:XXX街道,XXX小区)"
@focus="adressdetailfocus" @input="adressdetailfocus"></u-input>
<u-icon slot="right" size="36" name="map-fill" label-color="#7D5AFC"
@click="getchooseLocationPermission"></u-icon> -->
</u-form-item> </u-form-item>
<u-form-item label="服务区域" prop="area"> <u-form-item label="服务区域" prop="area">
</u-form-item> </u-form-item>
...@@ -32,68 +37,71 @@ ...@@ -32,68 +37,71 @@
</template> </template>
<script> <script>
import {loading,hidden,toast} from '../../tips/myTips.js' import {
import {getAddress,edit} from '../../api/apis.js' loading,
hidden,
toast
} from '../../tips/myTips.js'
import {
getAddress,
edit
} from '../../api/apis.js'
export default { export default {
onLoad(){ onLoad() {
this.init() this.init()
uni.$u.mpShare.title = '页面分享'; uni.$u.mpShare.title = '页面分享';
}, },
onShow(){ onShow() {
}, },
onReady(){ onReady() {
this.$refs.uform.setRules(this.rules) this.$refs.uform.setRules(this.rules)
}, },
data(){ data() {
return { return {
btnStyle:{ btnStyle: {
background:"#7D5AFC", background: "#7D5AFC",
color:'#FFFFFF' color: '#FFFFFF'
}, },
form:{ form: {
address:'', address: '',
detail:'' detail: ''
}, },
area:[], area: [],
rules:{ rules: {
address:[ address: [{
{
required: true, required: true,
message:'请选择居住地址', message: '请选择居住地址',
trigger:['blur'] trigger: ['blur']
} }],
], detail: [{
detail:[
{
required: true, required: true,
message:'请输入详细地址', message: '请输入详细地址',
trigger:['blur'] trigger: ['blur']
} }]
]
}, },
show:false, show: false,
list:[], list: [],
params:{ params: {
Model:{ Model: {
FID:this.$store.state.userInfo.Id, FID: this.$store.state.userInfo.Id,
FPROVINCE_ID:'', FPROVINCE_ID: '',
FPROVINCE:'', FPROVINCE: '',
FCity_ID:'', FCity_ID: '',
FCity:'', FCity: '',
FCOUNTY_ID:'', FCOUNTY_ID: '',
FCOUNTY:'', FCOUNTY: '',
FAdress:'' FAdress: ''
} }
} }
} }
}, },
methods:{ methods: {
init(){ init() {
let that = this let that = this
let userInfo = this.$store.state.userInfo let userInfo = this.$store.state.userInfo
if(userInfo.FPROVINCE || userInfo.FCity || userInfo.FCOUNTY){ if (userInfo.FPROVINCE || userInfo.FCity || userInfo.FCOUNTY) {
this.form.address = userInfo.FPROVINCE + userInfo.FCity + userInfo.FCOUNTY this.form.address = userInfo.FPROVINCE + userInfo.FCity + userInfo.FCOUNTY
console.log(userInfo) console.log(userInfo)
this.params.Model.FPROVINCE = userInfo.FPROVINCE this.params.Model.FPROVINCE = userInfo.FPROVINCE
...@@ -103,26 +111,29 @@ ...@@ -103,26 +111,29 @@
this.params.Model.FCOUNTY = userInfo.FCOUNTY this.params.Model.FCOUNTY = userInfo.FCOUNTY
this.params.Model.FCOUNTY_ID = userInfo.FCOUNTY_ID this.params.Model.FCOUNTY_ID = userInfo.FCOUNTY_ID
} }
if(userInfo.FAdress){ if (userInfo.FAdress) {
this.form.detail = userInfo.FAdress this.form.detail = userInfo.FAdress
this.params.Model.FAdress = userInfo.FAdress this.params.Model.FAdress = userInfo.FAdress
} }
if(userInfo.FServiceArea.length !== 0){ if (userInfo.FLocation) {
this.params.Model.FLocation = userInfo.FLocation
}
if (userInfo.FServiceArea.length !== 0) {
this.area = userInfo.FServiceArea this.area = userInfo.FServiceArea
} }
loading() loading()
getAddress().then((res) => { getAddress().then((res) => {
hidden() hidden()
console.log("城区信息:",res) console.log("城区信息:", res)
if(res.data.code == 0){ if (res.data.code == 0) {
that.list = res.data.result that.list = res.data.result
}else{ } else {
toast(res.data.message) toast(res.data.message)
} }
}) })
}, },
save(res){ save(res) {
this.form.address = res[0].label + res[1].label + res[2].label this.form.address = res[0].label + res[1].label + res[2].label
this.params.Model.FPROVINCE = res[0].label this.params.Model.FPROVINCE = res[0].label
this.params.Model.FPROVINCE_ID = res[0].value this.params.Model.FPROVINCE_ID = res[0].value
...@@ -131,46 +142,136 @@ ...@@ -131,46 +142,136 @@
this.params.Model.FCOUNTY = res[2].label this.params.Model.FCOUNTY = res[2].label
this.params.Model.FCOUNTY_ID = res[2].value this.params.Model.FCOUNTY_ID = res[2].value
}, },
confirm(){ confirm() {
let that = this let that = this
if(this.form.address!=""){ if (this.form.address != "") {
if(this.form.detail!=""){ if (this.form.detail != "") {
this.$refs.uform.validate(valid => { this.$refs.uform.validate(valid => {
if(valid){ if (valid) {
this.params.Model.FAdress = this.form.detail this.params.Model.FAdress = this.form.detail
loading() loading()
edit(this.params).then((res) => { edit(this.params).then((res) => {
hidden() hidden()
console.log("传递参数:",this.params) console.log("传递参数:", this.params)
console.log("请求信息:",res) console.log("请求信息:", res)
if(res.data.code == 0){ if (res.data.code == 0) {
uni.navigateBack() uni.navigateBack()
}else{ } else {
toast(res.data.message) toast(res.data.message)
} }
}) })
} }
}) })
} } else {
else{
toast('请输入详细地址') toast('请输入详细地址')
} }
} } else {
else{
toast('请选择地址') toast('请选择地址')
} }
},
adressdetailfocus() {
// if (!this.paramsC.Model.FLocation) {
if (!this.form.detail) {
this.getchooseLocationPermission()
}
},
getchooseLocationPermission() {
let that = this
let setdata = function(res) {
console.log(res)
that.form.detail = res.address
that.params.Model.FLocation = res.latitude + ',' + res.longitude
}
let location = {}
if (that.params.Model.FLocation) {
let locsplit = that.params.Model.FLocation.split(',')
location = {
latitude: locsplit[0],
longitude: locsplit.length > 1 ? locsplit[1] : ''
}
}
wx.chooseLocation({
latitude: location.latitude,
longitude:location.longitude,
success: function(res) {
// obj.setData({
// addr: res.address //调用成功直接设置地址
// })
setdata(res)
},
fail: function() {
wx.getSetting({
success: function(res) {
var statu = res.authSetting;
if (!statu['scope.userLocation']) {
wx.showModal({
title: '是否授权当前位置',
content: '需要获取您的地理位置,请确认授权,否则地图功能将无法使用',
success: function(tip) {
if (tip.confirm) {
wx.openSetting({
success: function(data) {
if (data
.authSetting[
"scope.userLocation"
] === true
) {
wx.showToast({
title: '授权成功',
icon: 'success',
duration: 1000
})
//授权成功之后,再调用chooseLocation选择地方
wx.chooseLocation({
success: function(
res
) {
// obj.setData({
// addr: res
// .address
// })
setdata
(
res
)
},
})
} else {
wx.showToast({
title: '授权失败',
icon: 'success',
duration: 1000
})
}
}
})
}
}
})
}
},
fail: function(res) {
wx.showToast({
title: '调用授权窗口失败',
icon: 'success',
duration: 1000
})
}
})
}
})
} }
}, },
computed:{ computed: {
} }
} }
</script> </script>
<style> <style>
.btn{ .btn {
margin: 5% auto; margin: 5% auto;
width: 95%; width: 95%;
} }
......
...@@ -3,11 +3,11 @@ ...@@ -3,11 +3,11 @@
<view class="header"> <view class="header">
<view class="search-bar"> <view class="search-bar">
<u-row class="searchTest"> <u-row class="searchTest">
<u-col span="10"> <u-col> <!-- span="10" -->
<u-search placeholder="客户姓名/手机号/订单号/订单名称" :disabled="true" bg-color="#ffffff" <u-search placeholder="客户姓名/手机号/订单号/订单名称" :disabled="true" bg-color="#ffffff"
:show-action="false" @click="navigator('/pages/search/search')"></u-search> :show-action="false" @click="navigator('/pages/search/search')"></u-search>
</u-col> </u-col>
<u-col span="2" @click="navigator('/pages/map/map')"> <u-col span="2" @click="navigator('/pages/map/map')" v-show="false">
<view class="map-container"> <view class="map-container">
<view class="font-size map"></view> <view class="font-size map"></view>
</view> </view>
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</view> </view>
<view v-if="state.login && state.register"> <view v-if="state.login && state.register">
<view v-if="titleCurrent == 0"> <view v-if="titleCurrent == 0">
<order :data="orderData"></order> <order :data="orderData" :key="titleTabs[0].timer" @SFVIVEW="sfview"></order>
</view> </view>
<view v-if="titleCurrent == 1"> <view v-if="titleCurrent == 1">
<u-tabs active-color="#ff9900" :list="subTabs" :current="subCurrent" @change="subTabsChange" <u-tabs active-color="#ff9900" :list="subTabs" :current="subCurrent" @change="subTabsChange"
...@@ -87,7 +87,8 @@ ...@@ -87,7 +87,8 @@
} from '../../tips/myTips.js' } from '../../tips/myTips.js'
import { import {
Validation, Validation,
SFView SFView,
edit
} from '../../api/apis.js' } from '../../api/apis.js'
import order from '../../components/order.vue' import order from '../../components/order.vue'
import store from '../../store/store.js' import store from '../../store/store.js'
...@@ -111,6 +112,31 @@ ...@@ -111,6 +112,31 @@
// //查询订单信息 // //查询订单信息
// this.sfview() // this.sfview()
// } // }
if (that.$store.state.initedAndChecked === true) {
if (this.titleTabs[this.titleCurrent].name == '进行中'){
if(this.$store.state.IncreaseDFW){
//待服务+1
this.subTabs[1].count += 1
this.$store.state.IncreaseDFW=false
}
else if(this.$store.state.IncreaseDYS){
//待验收+1
this.subTabs[3].count += 1
this.$store.state.IncreaseDYS=false
}
else if(this.$store.state.IncreaseYZF){
//待验收+1
that.subTabs[5].count += 1
this.$store.state.IncreaseYZF=false
}
else if(this.$store.state.IncreaseDJS){
//待验收+1
that.subTabs[4].count += 1
this.$store.state.IncreaseDJS=false
}
}
this.sfview()
}
}, },
data() { data() {
return { return {
...@@ -142,15 +168,18 @@ ...@@ -142,15 +168,18 @@
titleCurrent: 0, titleCurrent: 0,
titleTabs: [{ titleTabs: [{
name: "待报价", name: "待报价",
count: 0 count: 0,
timer: new Date().getTime()
}, },
{ {
name: "进行中", name: "进行中",
count: 0 count: 0,
timer: new Date().getTime()
}, },
{ {
name: "已完成", name: "已完成",
count: 0 count: 0,
timer: new Date().getTime()
} }
], ],
subTabs: [{ subTabs: [{
...@@ -186,7 +215,8 @@ ...@@ -186,7 +215,8 @@
loading: false, loading: false,
authModal: false, authModal: false,
//订单信息 //订单信息
orderData: [] orderData: [],
realLocation:''
} }
}, },
computed: { computed: {
...@@ -206,6 +236,8 @@ ...@@ -206,6 +236,8 @@
that.$store.state.sysInfo = res that.$store.state.sysInfo = res
} }
}) })
// that.navigator('../register/register')
// return
wx.login({ wx.login({
success(res) { success(res) {
that.$store.state.login = true that.$store.state.login = true
...@@ -230,12 +262,15 @@ ...@@ -230,12 +262,15 @@
console.log("师傅信息:", that.$store.state.userInfo) console.log("师傅信息:", that.$store.state.userInfo)
that.$store.state.initComplete = true that.$store.state.initComplete = true
that.$store.state.loading = true that.$store.state.loading = true
that.editFRealTimeLocation();
//查询订单信息 //查询订单信息
that.sfview() that.sfview()
if(that.$store.state.userInfo.FCheckStatus == '0'){ if (that.$store.state.userInfo.FCheckStatus == '0') {
that.$store.state.initedAndChecked = false
console.log("未实名认证,弹出认证窗口") console.log("未实名认证,弹出认证窗口")
that.authModal = true that.authModal = true
}else{ } else {
that.$store.state.initedAndChecked = true
console.log("实名认证了,继续操作吧") console.log("实名认证了,继续操作吧")
} }
} }
...@@ -251,7 +286,87 @@ ...@@ -251,7 +286,87 @@
} }
}) })
}, },
editFRealTimeLocation() {
//获取实时登录坐标进行保存
let that=this
this.getUserLocation(()=>{
let model = {
Model: {
FID: this.$store.state.userInfo.Id,
FRealTimeLocation: that.realLocation,
F_PAEZ_DateTime: that.$u.timeFormat(new Date(),'yyyy-mm-dd hh:MM:ss')
}
}
edit(model).then((res) => {
console.log("修改个人实时坐标:", res)
// if (res.data.code == 0) {
// } else {
// toast(res.data.message)
// }
})
})
},
getUserLocation(afterfun) {
let that = this
wx.getLocation({
success(res) {
console.log("用户位置信息:", res)
that.realLocation=res.latitude + ',' + res.longitude
if(afterfun){
afterfun();
}
},
fail(res) {
console.log("出现错误:", res)
if (res.errMsg === 'getLocation:fail:ERROR_NOCELL&WIFI_LOCATIONSWITCHOFF') {
uni.showModal({
content: '请开启手机定位服务',
showCancel: false
})
}
if (res.errMsg === 'getLocation:fail auth deny') {
wx.showModal({ //引导用户授权
content: '小程序需要实时获取位置,请设置为后台前台都可运行',
confirmText: "确认",
cancelText: "取消",
success: function(res) {
//点击“确认”时打开设置页面
if (res.confirm) {
wx.openSetting({ //打开设置页面让用户选择权限
success: (res) => {
if (res.authSetting[
"scope.userLocationBackground"
] == true) {
wx.getLocation({
success(res) {
console.log("用户位置信息:",
res)
that.realLocation=res.latitude + ',' + res.longitude
if(afterfun){
afterfun();
}
},
fail(res) {
console.log("出现错误:",
res)
}
})
}
}
})
} else { //取消打开设置授权页面
wx.showToast({
title: "取消授权",
icon: 'none',
})
}
}
})
}
}
})
},
//手动登录 //手动登录
handleLogin() { handleLogin() {
let that = this let that = this
...@@ -279,15 +394,18 @@ ...@@ -279,15 +394,18 @@
console.log("师傅信息:", that.$store.state.userInfo) console.log("师傅信息:", that.$store.state.userInfo)
that.$store.state.initComplete = true that.$store.state.initComplete = true
that.$store.state.loading = true that.$store.state.loading = true
that.editFRealTimeLocation();
//查询订单信息 //查询订单信息
that.sfview() that.sfview()
if(that.$store.state.userInfo.FCheckStatus == '0'){ if (that.$store.state.userInfo.FCheckStatus == '0') {
that.$store.state.initedAndChecked = false
console.log("未实名认证,弹出认证窗口") console.log("未实名认证,弹出认证窗口")
that.authModal = true that.authModal = true
}else{ } else {
that.$store.state.initedAndChecked = true
console.log("实名认证了,继续操作吧") console.log("实名认证了,继续操作吧")
} }
if(that.$store.state.userInfo.FServiceTypeEntity.length<1){ if (that.$store.state.userInfo.FServiceTypeEntity.length < 1) {
toast("请去设置服务类目,以防无法查询相应订单") toast("请去设置服务类目,以防无法查询相应订单")
} }
} }
...@@ -346,7 +464,6 @@ ...@@ -346,7 +464,6 @@
if (list[i].caption === "待服务") { if (list[i].caption === "待服务") {
that.subTabs[1].count += 1 that.subTabs[1].count += 1
} }
if (list[i].caption === "已超时") { if (list[i].caption === "已超时") {
that.subTabs[2].count += 1 that.subTabs[2].count += 1
} }
...@@ -433,6 +550,9 @@ ...@@ -433,6 +550,9 @@
that.subTabs[that.subCurrent].count = 0 that.subTabs[that.subCurrent].count = 0
that.setCount() that.setCount()
} }
// if(that.$store.state.state=="待报价"){
// that.titleTabs[0].timer=new Date().getTime()
// }
} else { } else {
console.log("查询" + that.$store.state.state + "信息失败") console.log("查询" + that.$store.state.state + "信息失败")
console.log(res) console.log(res)
...@@ -444,7 +564,7 @@ ...@@ -444,7 +564,7 @@
setCount() { setCount() {
if (this.titleCurrent != 1) { if (this.titleCurrent != 1) {
this.clearCount() this.clearCount()
let count = this.orderData.length let count = this.orderData ? this.orderData.length : 0
if (count > 99) { if (count > 99) {
this.titleTabs[this.titleCurrent].count = '99+' this.titleTabs[this.titleCurrent].count = '99+'
} else { } else {
......
...@@ -26,13 +26,8 @@ ...@@ -26,13 +26,8 @@
<u-tabs active-color="#7c59fc" :list="items"></u-tabs> <u-tabs active-color="#7c59fc" :list="items"></u-tabs>
<u-grid :col="4" :border="false"> <u-grid :col="4" :border="false">
<u-grid-item v-for="(item,key) in items[0].list" :key="key" @click="navigator(item.url)"> <u-grid-item v-for="(item,key) in items[0].list" :key="key" @click="navigator(item.url)">
<u-icon <u-icon label-pos="bottom" label-color="#000000" :label="item.label" :margin-top="20"
label-pos="bottom" :name="item.iconUrl" :size="60"></u-icon>
label-color="#000000"
:label="item.label"
:margin-top="20"
:name="item.iconUrl"
:size="60"></u-icon>
</u-grid-item> </u-grid-item>
</u-grid> </u-grid>
</view> </view>
...@@ -64,112 +59,113 @@ ...@@ -64,112 +59,113 @@
</template> </template>
<script> <script>
import {loading,hidden,toast} from '../../tips/myTips.js' import {
import {getFileUrl,getKFQRcode} from '../../api/api.js' loading,
import {Validation,getUrl} from '../../api/apis.js' hidden,
toast
} from '../../tips/myTips.js'
import {
getFileUrl,
getKFQRcode
} from '../../api/api.js'
import {
Validation,
getUrl
} from '../../api/apis.js'
export default { export default {
onShow(){ onShow() {
this.init() this.init()
uni.$u.mpShare.title = '页面分享'; uni.$u.mpShare.title = '页面分享';
}, },
data(){ data() {
return { return {
gridList:[ gridList: [
[ [{
{ name: '金融',
name:'金融', list: [{
list:[ label: '我的钱包',
{ iconUrl: '/static/images/my/money.png',
label:'我的钱包', url: '/pages/myWallet/myWallet'
iconUrl:'/static/images/my/money.png',
url:'/pages/myWallet/myWallet'
}, },
{ {
label:'缴纳保证金', label: '缴纳保证金',
iconUrl:'/static/images/my/bond.png', iconUrl: '/static/images/my/bond.png',
url:'/pages/deposit/deposit' url: '/pages/deposit/deposit'
} }
] ]
} }],
], [{
[ name: '个人',
{ list: [{
name:'个人', label: '个人设置',
list:[ iconUrl: '/static/images/my/user.png',
{ url: '/pages/personalSettings/personalSettings'
label:'个人设置',
iconUrl:'/static/images/my/user.png',
url:'/pages/personalSettings/personalSettings'
}, },
{ {
label:'居住住址', label: '居住住址',
iconUrl:'/static/images/my/location.png', iconUrl: '/static/images/my/location.png',
url:'/pages/address/address' url: '/pages/address/address'
}, },
{ {
label:'服务区域', label: '服务区域',
iconUrl:'/static/images/my/quyu.png', iconUrl: '/static/images/my/quyu.png',
url:'/pages/serviceArea/serviceArea' url: '/pages/serviceArea/serviceArea'
}, },
{ {
label:'服务类目', label: '服务类目',
iconUrl:'/static/images/my/category.png', iconUrl: '/static/images/my/category.png',
url:'/pages/serviceCategory/serviceCategory' url: '/pages/serviceCategory/serviceCategory'
}, },
{ {
label:'实名认证', label: '实名认证',
iconUrl:'/static/images/my/renzheng.png', iconUrl: '/static/images/my/renzheng.png',
url:'/pages/realnameAuthentication/realnameAuthentication' url: '/pages/realnameAuthentication/realnameAuthentication'
}, },
{ {
label:'个人评价', label: '个人评价',
iconUrl:'/static/images/my/feedback.png', iconUrl: '/static/images/my/feedback.png',
url:'/pages/personalEvaluation/personalEvaluation' url: '/pages/personalEvaluation/personalEvaluation'
} }
] ]
} }],
], [{
[ name: '更多',
{ list: [{
name:'更多', label: '更多设置',
list:[ iconUrl: '/static/images/my/set.png',
{ url: '/pages/moreSettings/moreSettings'
label:'更多设置',
iconUrl:'/static/images/my/set.png',
url:'/pages/moreSettings/moreSettings'
}, },
{ {
label:'帮助中心', label: '帮助中心',
iconUrl:'/static/images/my/help1.png', iconUrl: '/static/images/my/help1.png',
url:'/pages/help/help' url: '/pages/help/help'
}, },
{ {
label:'意见反馈', label: '意见反馈',
iconUrl:'/static/images/my/feedback1.png', iconUrl: '/static/images/my/feedback1.png',
url:'/pages/feedback/feedback' url: '/pages/feedback/feedback'
}, },
{ {
label:'联系客服', label: '联系客服',
iconUrl:'/static/images/my/customer.png', iconUrl: '/static/images/my/customer.png',
url:'kf' url: 'kf'
}, },
{ {
label:'京台服务', label: '分享推广',
iconUrl:'/static/images/my/feedback.png', iconUrl: '/static/images/my/feedback.png',
url:'jt' url: 'jt'
}
]
} }
] ]
}]
], ],
avatarUrl:'', avatarUrl: '',
showPop:false, showPop: false,
showPopA:false, showPopA: false,
kfurl:'', kfurl: '',
} }
}, },
methods:{ methods: {
init(){ init() {
let that = this let that = this
loading() loading()
wx.login({ wx.login({
...@@ -179,24 +175,24 @@ ...@@ -179,24 +175,24 @@
that.$store.state.code = res.code that.$store.state.code = res.code
Validation(res.code).then((res) => { Validation(res.code).then((res) => {
hidden() hidden()
if(res.data.result.isRegister == false){ if (res.data.result.isRegister == false) {
console.log("此处设置token,注册状态(注册失败),没有师傅信息") console.log("此处设置token,注册状态(注册失败),没有师傅信息")
that.$store.state.token = res.data.result.token that.$store.state.token = res.data.result.token
that.$store.state.register = res.data.result.isRegister that.$store.state.register = res.data.result.isRegister
}else{ } else {
console.log("此处设置token,注册状态(注册成功),师傅信息") console.log("此处设置token,注册状态(注册成功),师傅信息")
that.$store.state.token = res.data.result.token that.$store.state.token = res.data.result.token
that.$store.state.register = res.data.result.isRegister that.$store.state.register = res.data.result.isRegister
that.$store.state.userInfo = JSON.parse(res.data.result.result) that.$store.state.userInfo = JSON.parse(res.data.result.result)
console.log("师傅信息:",that.$store.state.userInfo) console.log("师傅信息:", that.$store.state.userInfo)
that.$store.state.initComplete = true that.$store.state.initComplete = true
that.$store.state.loading = true that.$store.state.loading = true
loading() loading()
getUrl(that.$store.state.userInfo.FUserImage).then((res) => { getUrl(that.$store.state.userInfo.FUserImage).then((res) => {
hidden() hidden()
if(res.data.code == 0){ if (res.data.code == 0) {
that.avatarUrl = res.data.result[0].fileurl that.avatarUrl = res.data.result[0].fileurl
}else{ } else {
// toast(res.data.message) // toast(res.data.message)
} }
}) })
...@@ -206,41 +202,41 @@ ...@@ -206,41 +202,41 @@
} }
}) })
}, },
navigator(url){ navigator(url) {
if(!this.$store.state.register){ if (!this.$store.state.register) {
uni.showToast({ uni.showToast({
title:'请先登录', title: '请先登录',
icon:'none' icon: 'none'
}) })
}else if(url == 'kf'){ } else if (url == 'kf') {
console.log("弹出客服二维码") console.log("弹出客服二维码")
let that = this let that = this
loading() loading()
getKFQRcode().then((res) => { getKFQRcode().then((res) => {
if(res.data.code == 0){ if (res.data.code == 0) {
hidden() hidden()
that.kfurl = res.data.result[0].fileurl that.kfurl = res.data.result[0].fileurl
that.showPop = true that.showPop = true
console.log("客服二维码:",res.data.result[0].fileurl) console.log("客服二维码:", res.data.result[0].fileurl)
}else{ } else {
hidden() hidden()
} }
}) })
}else if(url == 'jt'){ } else if (url == 'jt') {
console.log("弹出京台小程序二维码") console.log("弹出京台小程序二维码")
this.kfurl = '/static/images/jt.jpg' this.kfurl = '/static/images/jt.jpg'
this.showPopA = true this.showPopA = true
}else{ } else {
uni.navigateTo({ uni.navigateTo({
url:url url: url
}) })
} }
}, },
}, },
computed:{ computed: {
checkStatus:function(){ checkStatus: function() {
switch(this.info.FCheckStatus){ switch (this.info.FCheckStatus) {
case '0': case '0':
return '未认证' return '未认证'
case '1': case '1':
...@@ -249,7 +245,7 @@ ...@@ -249,7 +245,7 @@
return '已认证' return '已认证'
} }
}, },
info:function(){ info: function() {
return this.$store.state.userInfo return this.$store.state.userInfo
} }
} }
...@@ -257,7 +253,7 @@ ...@@ -257,7 +253,7 @@
</script> </script>
<style> <style>
.header{ .header {
padding: 5% 2%; padding: 5% 2%;
background-color: #7c59fc; background-color: #7c59fc;
} }
......
...@@ -10,7 +10,8 @@ ...@@ -10,7 +10,8 @@
</view> </view>
<view class="container"> <view class="container">
<u-cell-group> <u-cell-group>
<u-cell-item v-for="(item,key) in cellList" :key="key" :arrow="true" @click="navigator(item.url)"> <u-cell-item v-for="(item,key) in cellList" :key="key" :arrow="!item.disable" :value="item.value"
@click="navigator(item)">
<view slot="icon"> <view slot="icon">
<u-icon size="35" margin-left="20" :name="item.icon" :label="item.label"></u-icon> <u-icon size="35" margin-left="20" :name="item.icon" :label="item.label"></u-icon>
</view> </view>
...@@ -21,35 +22,59 @@ ...@@ -21,35 +22,59 @@
</template> </template>
<script> <script>
import {init} from '../../api/api.js' import {
init
} from '../../api/api.js'
import {
cashOutView
} from '../../api/apis.js'
export default { export default {
onShow(){ onShow() {
init() init()
}, },
onLoad() { onLoad() {
let that = this
uni.$u.mpShare.title = '页面分享'; uni.$u.mpShare.title = '页面分享';
cashOutView().then((res) => {
if (res.data.code == 0 && res.data.result && res.data.result.length > 0) {
for(let i=0;i<res.data.result.length;i++){
let firstdata = res.data.result[i]
if (firstdata.FSTATUS == 'YTJ') {
that.cellList[0].disable = true
that.cellList[0].value = '有' + (firstdata.FAMOUNT).toFixed(2) + '金额正在提现中'
break;
}
}
} else {
console.log("获取提现记录失败:", res)
}
})
}, },
data(){ data() {
return { return {
cellList:[ cellList: [{
{ label: '提现',
label:'提现', url: 'withdrawal/withdrawal',
url:'withdrawal/withdrawal', icon: '/static/images/my/money.png',
icon:'/static/images/my/money.png' disable: false,
value: ''
}, },
{ {
label:'账户工单结算明细', label: '账户工单结算明细',
url:'detail/detail', url: 'detail/detail',
icon:'/static/images/my/renzheng.png' icon: '/static/images/my/renzheng.png',
disable: false,
value: ''
} }
], ],
userInfo:this.$store.state.userInfo userInfo: this.$store.state.userInfo
} }
}, },
methods:{ methods: {
navigator(url){ navigator(item) {
if (item.disable) return
uni.navigateTo({ uni.navigateTo({
url:url url: item.url
}) })
} }
} }
...@@ -57,15 +82,17 @@ ...@@ -57,15 +82,17 @@
</script> </script>
<style> <style>
.header{ .header {
background-color: #7c59fc; background-color: #7c59fc;
color: #FFFFFF; color: #FFFFFF;
padding: 5% 5%; padding: 5% 5%;
} }
.title{
.title {
margin-bottom: 5%; margin-bottom: 5%;
} }
.money{
.money {
font-size: 40px; font-size: 40px;
font-weight: 1000; font-weight: 1000;
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<u-input v-model="form.name" placeholder="请输入真实姓名"></u-input> <u-input v-model="form.name" placeholder="请输入真实姓名"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="手机号" prop="phone"> <u-form-item label="手机号" prop="phone">
<u-input v-model="form.phone" type="number" placeholder="请输入11位手机号" maxlength="11"></u-input> <u-input disabled v-model="form.phone" type="number" placeholder="请输入11位手机号" maxlength="11"></u-input>
</u-form-item> </u-form-item>
<u-form-item label="验证码" prop="code"> <u-form-item label="验证码" prop="code">
<view style="width: 60%;display: inline-block;"> <view style="width: 60%;display: inline-block;">
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
<view class="container"> <view class="container">
<view class="editTable"> <view class="editTable">
<u-button hover-class="none" :custom-style="btnStyle" shape="circle" @click="bottomBtn"> <u-button hover-class="none" :custom-style="btnStyle" shape="circle" @click="bottomBtn">
提交 {{BTTEXT||'提交'}}
</u-button> </u-button>
</view> </view>
</view> </view>
...@@ -53,7 +53,8 @@ ...@@ -53,7 +53,8 @@
} from '../../../api/apis.js' } from '../../../api/apis.js'
import { import {
loading, loading,
hidden hidden,
toast
} from '../../../tips/myTips.js' } from '../../../tips/myTips.js'
export default { export default {
//xxxxxxx //xxxxxxx
...@@ -128,8 +129,8 @@ ...@@ -128,8 +129,8 @@
this.height = this.$store.state.sysInfo.screenHeight this.height = this.$store.state.sysInfo.screenHeight
this.id = this.$store.state.userInfo.Id this.id = this.$store.state.userInfo.Id
this.Uarea = this.$store.state.userInfo.FServiceArea this.Uarea = this.$store.state.userInfo.FServiceArea
if(this.Eflag==true){ if (this.Eflag == true) {
this.Uarea=false this.Uarea = false
} }
}, },
onLoad() { onLoad() {
...@@ -138,7 +139,7 @@ ...@@ -138,7 +139,7 @@
onshow() { onshow() {
}, },
props: ['Eflag','FID'], props: ['Eflag', 'FID', 'BTTEXT'],
data() { data() {
return { return {
rSelectY: [0], rSelectY: [0],
...@@ -186,6 +187,21 @@ ...@@ -186,6 +187,21 @@
methods: { methods: {
//获取省列表的下标,并给省id赋值,传递该省所含的市列表 //获取省列表的下标,并给省id赋值,传递该省所含的市列表
tapInfo(e) { tapInfo(e) {
if (!this.addressData[e].count) {
let selcount = 0
for (let i = 0; i < this.addressData.length; i++) {
if (this.addressData[i].count && this.addressData[i].count > 0) {
selcount++;
if (selcount >= 3) {
break;
}
}
}
if (selcount >= 3) {
toast('不能选择大于3个省份')
return;
}
}
if (this.rSelectY.indexOf(e) !== -1) { if (this.rSelectY.indexOf(e) !== -1) {
this.city = this.addressData[e].children this.city = this.addressData[e].children
} else { } else {
...@@ -295,31 +311,21 @@ ...@@ -295,31 +311,21 @@
} else { } else {
this.$set(this.provinceCount, 'count', 0) this.$set(this.provinceCount, 'count', 0)
} }
}, },
bottomBtn() { bottomBtn() {
let that=this
this.postdata.Model.FServiceArea = this.choice this.postdata.Model.FServiceArea = this.choice
this.postdata.Model.FID = this.id this.postdata.Model.FID = this.id
console.log(this.postdata) console.log(this.postdata)
console.log(this.Eflag) console.log(this.Eflag)
if (this.Eflag == true) { if (this.Eflag == true) {
this.postdata.Model.FID=this.FID this.postdata.Model.FID = this.FID
loading() loading()
edit(this.postdata).then((res) => { edit(this.postdata).then((res) => {
hidden() hidden()
if (res.data.code == 0) { that.$emit('NextStep')
console.log(res)
uni.switchTab({
url: '/pages/index/index'
})
} else {
console.log("error")
uni.switchTab({
url: '/pages/index/index'
})
}
}) })
// this.$emit('NextStep')
} else { } else {
loading() loading()
edit(this.postdata).then((res) => { edit(this.postdata).then((res) => {
......
...@@ -3,13 +3,8 @@ ...@@ -3,13 +3,8 @@
<view class="checkbox"> <view class="checkbox">
<u-checkbox-group @change="checkSelect"> <u-checkbox-group @change="checkSelect">
<u-checkbox name="全选" v-model="selectAll" @change="checkedAll">{{selectAllText}}</u-checkbox> <u-checkbox name="全选" v-model="selectAll" @change="checkedAll">{{selectAllText}}</u-checkbox>
<u-checkbox <u-checkbox v-for="(item,key) in checkList" :key="key" :name="item.name" v-model="item.checked"
v-for="(item,key) in checkList" @change="checkChange">
:key="key"
:name="item.name"
v-model="item.checked"
@change="checkChange"
>
{{item.name}} {{item.name}}
</u-checkbox> </u-checkbox>
</u-checkbox-group> </u-checkbox-group>
...@@ -18,7 +13,8 @@ ...@@ -18,7 +13,8 @@
<view style="margin: 5% 0;"> <view style="margin: 5% 0;">
<text style="color:#000000">其他技能</text> <text style="color:#000000">其他技能</text>
</view> </view>
<u-input type="textarea" placeholder="如:修电脑 修手机等" :border="true" v-model="form.Model.FOtherSkills"></u-input> <u-input type="textarea" placeholder="如:修电脑 修手机等" :border="true" v-model="form.Model.FOtherSkills">
</u-input>
</view> </view>
<view class="tips"> <view class="tips">
<view> <view>
...@@ -30,61 +26,77 @@ ...@@ -30,61 +26,77 @@
</view> </view>
<view class="pics"> <view class="pics">
<view style="margin: 5% 0;"> <view style="margin: 5% 0;">
<text style="color:#000000">请上传擅长安装产品完工的照片</text> <text style="color:#000000">请上传擅长安装产品完工的照片(最多上传9张)</text>
</view> </view>
<u-upload <u-upload ref="upload" :file-list="uploadFileList" :action="action" :header="header" :maxCount="9"
ref="upload" @on-change="uploaded" @on-remove="remove"></u-upload>
:file-list="uploadFileList"
:action="action"
:header="header"
@on-change="uploaded"
@on-remove="remove"
></u-upload>
</view> </view>
<view class="btn"> <view class="btn">
<u-button @click="confirm" :custom-style="btnStyle">确定</u-button> <u-button @click="confirm" :custom-style="btnStyle">{{BTTEXT||'确定'}}</u-button>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import {apiBaseUrl} from '../../api/request.js' import {
import {loading,hidden,toast} from '../../tips/myTips.js' apiBaseUrl
import {getServiceItem,getFileUrl,uploadpic,editInfo} from '../../api/api.js' } from '../../api/request.js'
import {
loading,
hidden,
toast
} from '../../tips/myTips.js'
import {
getServiceItem,
getFileUrl,
uploadpic,
editInfo
} from '../../api/api.js'
export default { export default {
onLoad(){ onLoad() {
// this.init()
// uni.$u.mpShare.title = '页面分享';
},
created() {
this.init() this.init()
uni.$u.mpShare.title = '页面分享'; uni.$u.mpShare.title = '页面分享';
}, },
data(){ props: ['Eflag', 'FID', 'BTTEXT'],
data() {
return { return {
btnStyle:{ btnStyle: {
background:"#7D5AFC", background: "#7D5AFC",
color:'#FFFFFF' color: '#FFFFFF'
}, },
checkList:[], checkList: [],
selectAll:false, selectAll: false,
selectAllText:'全选', selectAllText: '全选',
form:{ form: {
IsDeleteEntry:true, IsDeleteEntry: true,
Model:{ Model: {
FID:this.$store.state.userInfo.Id, FID: this.$store.state.userInfo.Id,
FOtherSkills:'', FOtherSkills: '',
FServiceTypeEntity:[], FServiceTypeEntity: [],
FServiceImagesEntity:[] FServiceImagesEntity: []
} }
}, },
url:'', url: '',
header:{ header: {
test:11 test: 11
}, },
//上传图片列表 //上传图片列表
uploadFileList:[] uploadFileList: []
} }
}, },
methods:{ methods: {
init(){ resetinit(fid) {
this.init(fid)
},
init(fid) {
if(this.Eflag && !fid){
return
}
this.url = apiBaseUrl this.url = apiBaseUrl
let userInfo = this.$store.state.userInfo let userInfo = this.$store.state.userInfo
let that = this let that = this
...@@ -93,45 +105,48 @@ ...@@ -93,45 +105,48 @@
loading() loading()
getServiceItem().then((res) => { getServiceItem().then((res) => {
hidden() hidden()
if(res.data.code == 0){ if (res.data.code == 0) {
for(let i in res.data.result){ for (let i in res.data.result) {
res.data.result[i].checked = false res.data.result[i].checked = false
this.checkList.push(res.data.result[i]) this.checkList.push(res.data.result[i])
} }
//获取已选择的服务类目 //获取已选择的服务类目
for(let i in this.checkList){ for (let i in this.checkList) {
for(let j in userInfo.FServiceTypeEntity){ for (let j in userInfo.FServiceTypeEntity) {
if(userInfo.FServiceTypeEntity[j].FSERVICEREMARK == this.checkList[i].name){ if (userInfo.FServiceTypeEntity[j].FSERVICEREMARK == this.checkList[i].name) {
this.checkList[i].checked = true this.checkList[i].checked = true
break break
} }
} }
} }
let count=0 let count = 0
for(var i =0,len=this.checkList.length;i<len;i++){ for (var i = 0, len = this.checkList.length; i < len; i++) {
if(this.checkList[i].checked == true){ if (this.checkList[i].checked == true) {
count+=1 count += 1
} }
} }
if(count==this.checkList.length){ if (count == this.checkList.length) {
this.selectAll=true this.selectAll = true
} }
} }
}) })
//循环获取完工图片 //循环获取完工图片
console.log("服务类目实体类:",userInfo.FServiceImagesEntity) console.log("服务类目实体类:", userInfo.FServiceImagesEntity)
if(userInfo.FServiceImagesEntity.length !== 0){ if (userInfo.FServiceImagesEntity && userInfo.FServiceImagesEntity.length !== 0) {
for(let i in userInfo.FServiceImagesEntity){ for (let i in userInfo.FServiceImagesEntity) {
loading() loading()
getFileUrl(userInfo.FServiceImagesEntity[i].FServiceImage).then((res) => { getFileUrl(userInfo.FServiceImagesEntity[i].FServiceImage).then((res) => {
hidden() hidden()
if(res.data.code == 0){ if (res.data.code == 0) {
let tempFormImagesEntity = {url:'',FServiceImage:''} let tempFormImagesEntity = {
url: '',
FServiceImage: ''
}
tempFormImagesEntity.FServiceImage = res.data.result[0].fileid tempFormImagesEntity.FServiceImage = res.data.result[0].fileid
tempFormImagesEntity.url = res.data.result[0].fileurl tempFormImagesEntity.url = res.data.result[0].fileurl
that.form.Model.FServiceImagesEntity.push(tempFormImagesEntity) that.form.Model.FServiceImagesEntity.push(tempFormImagesEntity)
that.uploadFileList.push(tempFormImagesEntity) that.uploadFileList.push(tempFormImagesEntity)
}else{ } else {
toast(res.data.message) toast(res.data.message)
} }
}) })
...@@ -139,36 +154,38 @@ ...@@ -139,36 +154,38 @@
} }
}, },
checkChange(e){ checkChange(e) {
}, },
checkSelect(e){ checkSelect(e) {
if(e.length==this.checkList.length&&this.selectAll==false) if (e.length == this.checkList.length && this.selectAll == false) {
{ this.selectAll = true
this.selectAll=true } else if (this.selectAll == true && e.length <= this.checkList.length) {
} this.selectAll = false
else if(this.selectAll==true&&e.length<=this.checkList.length){
this.selectAll=false
} }
}, },
checkedAll(e){ checkedAll(e) {
if(e.value == true){ if (e.value == true) {
this.checkList.map(val => { this.checkList.map(val => {
val.checked = true val.checked = true
}) })
}else{ } else {
this.checkList.map(val => { this.checkList.map(val => {
val.checked = false val.checked = false
}) })
} }
}, },
uploaded(res, index, lists, name){ uploaded(res, index, lists, name) {
console.log(JSON.parse(res.data)) console.log(JSON.parse(res.data))
if(JSON.parse(res.data).code == 0){ if (JSON.parse(res.data).code == 0) {
console.log(lists[index].response.result.fileurl) console.log(lists[index].response.result.fileurl)
let tempObj = {FServiceImage:'',fileurl:''} let tempObj = {
FServiceImage: '',
fileurl: ''
}
tempObj.FServiceImage = lists[index].response.result.fileid tempObj.FServiceImage = lists[index].response.result.fileid
tempObj.fileurl = lists[index].response.result.fileurl tempObj.fileurl = lists[index].response.result.fileurl
// this.uploadFileList.push(tempObj)
this.form.Model.FServiceImagesEntity.push(tempObj) this.form.Model.FServiceImagesEntity.push(tempObj)
} }
// if(data.code == 0){ // if(data.code == 0){
...@@ -188,36 +205,49 @@ ...@@ -188,36 +205,49 @@
// } // }
}, },
remove(index, lists, name){ remove(index) {
lists.splice(index,1) this.uploadFileList.splice(index, 1)
this.form.Model.FServiceImagesEntity.splice(index,1) this.form.Model.FServiceImagesEntity.splice(index, 1)
console.log("删除后:",this.form.Model.FServiceImagesEntity) console.log("删除后:", this.form.Model.FServiceImagesEntity)
}, },
confirm(){ confirm() {
for(let i in this.checkList){ let that=this
for (let i in this.checkList) {
let temp = { let temp = {
FSERVICEITEM:{ FSERVICEITEM: {
FNUMBER:'' FNUMBER: ''
}, },
FSERVICEREMARK:'' FSERVICEREMARK: ''
} }
if(this.checkList[i].checked == true){ if (this.checkList[i].checked == true) {
temp.FSERVICEITEM.FNUMBER = this.checkList[i].number temp.FSERVICEITEM.FNUMBER = this.checkList[i].number
temp.FSERVICEREMARK = this.checkList[i].name temp.FSERVICEREMARK = this.checkList[i].name
this.form.Model.FServiceTypeEntity.push(temp) this.form.Model.FServiceTypeEntity.push(temp)
} }
} }
console.log("修改参数:",this.form) console.log("修改参数:", this.form)
loading() loading()
if (this.Eflag == true) {
this.form.Model.FID = this.FID
editInfo(this.form).then((res) => {
console.log(res)
hidden()
// uni.navigateBack()
that.$emit('NextStep')
})
// hidden()
// this.$emit('NextStep')
} else {
editInfo(this.form).then((res) => { editInfo(this.form).then((res) => {
console.log(res) console.log(res)
hidden() hidden()
uni.navigateBack() uni.navigateBack()
}) })
} }
}
}, },
computed:{ computed: {
action:function(){ action: function() {
return this.url + '/api/UploadAttachments' return this.url + '/api/UploadAttachments'
} }
} }
...@@ -225,19 +255,23 @@ ...@@ -225,19 +255,23 @@
</script> </script>
<style> <style>
.serviceCategory{ .serviceCategory {
padding: 7% 4%; padding: 7% 4%;
} }
.checkbox{
.checkbox {
margin: 5% 0; margin: 5% 0;
} }
.order-skill{
.order-skill {
margin: 2% 0; margin: 2% 0;
} }
.tips{
.tips {
margin: 2% 0; margin: 2% 0;
} }
.pics{
.pics {
margin: 2% 0; margin: 2% 0;
} }
</style> </style>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论