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

师傅端

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