Commit b39308e0 authored by linwenqing's avatar linwenqing

Merge branch 'dev' of https://git.banshouhui.com/lijundan/self-support into test

parents 388968fe 466bac9a
...@@ -166,7 +166,11 @@ let orderApiFun = function(vm){ ...@@ -166,7 +166,11 @@ let orderApiFun = function(vm){
let payableRecord = async (params = {}) => await vm.$u.post(settle + vm.vuex_token + '/payable/v2/queryPayableRecord', params, formType); let payableRecord = async (params = {}) => await vm.$u.post(settle + vm.vuex_token + '/payable/v2/queryPayableRecord', params, formType);
// 获取我的钱包-师傅提现 // 获取我的钱包-师傅提现
let workerApplyPay = async () => await vm.$u.get(prefix + vm.vuex_token + '/applypay/batch/workerApplyPay'); let workerApplyPay = async () => await vm.$u.get(prefix + vm.vuex_token + '/applypay/batch/workerApplyPay');
// 是否有特殊登录权限
let allowLogin = async (params = {}) => await vm.$u.get(prefix + 'other/auth/' + vm.vuex_token + '/allow/login', params);
// 特殊登录切换师傅
let otherUser = async (params = {}) => await vm.$u.get(prefix + 'other/auth/' + vm.vuex_token + '/other/user', params);
const orderApi = { const orderApi = {
listByRecommendOrder, listByRecommendOrder,
listOrderCount, listOrderCount,
...@@ -204,6 +208,8 @@ let orderApiFun = function(vm){ ...@@ -204,6 +208,8 @@ let orderApiFun = function(vm){
listStatement, listStatement,
payableRecord, payableRecord,
workerApplyPay, workerApplyPay,
allowLogin,
otherUser
} }
return orderApi return orderApi
} }
......
...@@ -120,6 +120,9 @@ ...@@ -120,6 +120,9 @@
height: 38px; height: 38px;
.txt { .txt {
font-size: 14px; font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
} }
</style> </style>
...@@ -185,6 +185,9 @@ ...@@ -185,6 +185,9 @@
height: 38px; height: 38px;
.txt { .txt {
font-size: 14px; font-size: 14px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
} }
.text-view { .text-view {
......
...@@ -255,9 +255,14 @@ ...@@ -255,9 +255,14 @@
"navigationBarTitleText": "我的仓库", "navigationBarTitleText": "我的仓库",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} },
{
"path": "superLogin/index",
"style": {
"navigationBarTitleText": ""
}
}
] ]
}, },
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
<text>{{telTip}}</text> <text>{{telTip}}</text>
<u-icon class="tel-arrow-icon" name="arrow-up-fill"></u-icon> <u-icon class="tel-arrow-icon" name="arrow-up-fill"></u-icon>
</view> </view>
</view> </view>
<view v-if="showSuperButton" class="super-button"><u-button@click="handleSuperButton">切换用户</u-button></view>
</view> </view>
<view class="list-view"> <view class="list-view">
...@@ -44,7 +45,8 @@ ...@@ -44,7 +45,8 @@
data() { data() {
return { return {
qnPath: process.uniEnv.qn_base_url, qnPath: process.uniEnv.qn_base_url,
serviceTel: '18124099271', serviceTel: '18124099271',
showSuperButton: false
} }
}, },
computed: { computed: {
...@@ -133,10 +135,20 @@ ...@@ -133,10 +135,20 @@
} }
}, },
onLoad() { onLoad() {
app.trackPage('我的首页') app.trackPage('我的首页')
if(this.vuex_token && !this.settled) { console.log('-------000-------')
this.getData()
} if(this.vuex_token ) {
console.log('-------1111-------')
if (!this.showSuperButton) {
this.allowLogin()
}
if (!this.settled) {
this.getData()
}
}
}, },
methods: { methods: {
getData() { getData() {
...@@ -163,7 +175,18 @@ ...@@ -163,7 +175,18 @@
return false return false
} }
this.$u.route({url: "pages/login/index"}) this.$u.route({url: "pages/login/index"})
}, },
async allowLogin() {
let res = await this.$u.api.allowLogin()
console.log(res)
if (res) {
this.showSuperButton = res.code == 200
}
},
handleSuperButton() {
this.$u.route({url: 'pages/mine/superLogin/index'})
}
} }
} }
</script> </script>
...@@ -239,6 +262,9 @@ ...@@ -239,6 +262,9 @@
margin-left: 6rpx; margin-left: 6rpx;
} }
} }
}
.super-button {
margin-left: 20rpx;
} }
} }
......
...@@ -301,6 +301,7 @@ ...@@ -301,6 +301,7 @@
+ "&categoryId=" + item.categoryId + "&categoryId=" + item.categoryId
+ "&orderServiceType=" + item.orderServiceType + "&orderServiceType=" + item.orderServiceType
+ "&inGuaranteePeriod=" + item.inGuaranteePeriod + "&inGuaranteePeriod=" + item.inGuaranteePeriod
+ "&partnerCompanyId=" + item.partnerCompanyId
+ "&auditResultsId=" + (item.auditResults?Object.keys(item.auditResults)[Object.keys(item.auditResults).length - 1]:'') + "&auditResultsId=" + (item.auditResults?Object.keys(item.auditResults)[Object.keys(item.auditResults).length - 1]:'')
}) })
}, },
......
<template>
<view class="super-login">
<u-input auto-focus v-model="mobile" focus type="number" placeholder="请输入手机号"></u-input>
<view class="line-view"></view>
<view class="button-view">
<u-button class="change-button" type="primary" @click="handleClick">确认切换</u-button>
</view>
</view>
</template>
<script>
export default {
data() {
return {
mobile: ''
}
},
methods: {
handleClick() {
this.otherUser()
},
async otherUser() {
let res = await this.$u.api.otherUser({mobile: this.mobile})
console.log(res)
if (res && res.code == 200) {
this.$u.vuex("vuex_token", res.data);
uni.navigateBack({
})
}
},
}
}
</script>
<style lang="scss" scoped>
.super-login {
padding: 30rpx;
margin: 30rpx;
background-color: #FFFFFF;
border-radius: 12rpx;
.line-view {
background-color: #F4F5F7;
height: 2rpx;
}
.button-view {
margin-top: 40rpx;
}
}
</style>
...@@ -5,20 +5,20 @@ ...@@ -5,20 +5,20 @@
<u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息" title-bold></u-navbar> <u-navbar :background="{background: '#2272FF'}" back-icon-color="#fff" :title-size="32" title-color="#fff" :border-bottom="false" title="完工信息" title-bold></u-navbar>
<u-tabs class="order-tabs" ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="80" font-size="32"></u-tabs> <u-tabs class="order-tabs" ref="tabs" :current="tabIndex" name="panelName" :list="list" @change="tabsChange" :is-scroll="false" bg-color="#2272FF" inactive-color="#a6c6ff" active-color="#fff" height="80" font-size="32"></u-tabs>
<view class="u-menu-wrap"> <view class="u-menu-wrap">
<scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" :scroll-into-view="itemId" v-if="list[tabIndex].items.length > 1"> <scroll-view scroll-y scroll-with-animation class="u-tab-view menu-scroll-view" :scroll-top="scrollTop" v-if="list[tabIndex].items.length > 1">
<view v-for="(item,index) in list[tabIndex].items" :key="index" class="u-tab-item" <view v-for="(item,index) in list[tabIndex].items" :key="index" class="u-tab-item"
:class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)"> :class="[current == index ? 'u-tab-item-active' : '']" @tap.stop="swichMenu(index)">
<text class="u-line-1">{{item.name}}</text> <text class="u-line-1">{{item.name}}</text>
</view> </view>
</scroll-view> </scroll-view>
<scroll-view :scroll-top="scrollRightTop" :enhanced="true" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll"> <scroll-view :scroll-top="scrollRightTop" scroll-y scroll-with-animation class="right-box" @scroll="rightScroll" :scroll-into-view="itemId">
<u-form :model="form" ref="uForm"> <u-form :model="form" ref="uForm">
<template v-for="(groupItem, groupIndex) in (list.length>0?list[tabIndex].items:[])"> <template v-for="(groupItem, groupIndex) in (list.length>0?list[tabIndex].items:[])">
<view class="class-item" :key="groupIndex"> <view class="class-item" :key="groupIndex">
<view class="title" v-if="groupItem.name !== '基本信息'">{{groupItem.name}}</view> <view class="title" v-if="groupItem.name !== '基本信息'">{{groupItem.name}}</view>
<view class="class-bd"> <view class="class-bd">
<u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex" label-position="top" <u-form-item v-for="(item,itemIndex) in groupItem.items" :key="itemIndex" label-position="top"
:prop="item.fieldsName" :border-bottom="false" v-show="item.fieldsId != 200 || show200"> :prop="item.fieldsName" :border-bottom="false" v-show="item.fieldsId != 200 || show200" :id="`item${item.fieldsId}`">
<view :class="[{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="item.formType!=='location'&&item.formType!=='form'&&item.formType!=='label'"> <view :class="[{'label-bold': groupItem.name === '基本信息'}, 'label']" v-if="item.formType!=='location'&&item.formType!=='form'&&item.formType!=='label'">
<image class="item-image" :src="mixingImage" v-if="item.required"></image> <image class="item-image" :src="mixingImage" v-if="item.required"></image>
{{item.fieldsTitle}} {{item.fieldsTitle}}
...@@ -147,6 +147,7 @@ ...@@ -147,6 +147,7 @@
menuHeight: 0, // 左边菜单的高度 menuHeight: 0, // 左边菜单的高度
menuItemHeight: 0, // 左边菜单item的高度 menuItemHeight: 0, // 左边菜单item的高度
itemId: '', // 栏目右边scroll-view用于滚动的id itemId: '', // 栏目右边scroll-view用于滚动的id
oldItemId: '',
menuItemPos: [], menuItemPos: [],
arr: [], arr: [],
scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度 scrollRightTop: 0, // 右边栏目scroll-view的滚动条高度
...@@ -369,6 +370,7 @@ ...@@ -369,6 +370,7 @@
self.waitHandlerPanelIndex = panelIndex self.waitHandlerPanelIndex = panelIndex
self.waitHandlerGroupIndex = groupIndex self.waitHandlerGroupIndex = groupIndex
self.waitHandlerEleIndex = eleIndex self.waitHandlerEleIndex = eleIndex
self.oldItemId = `item${ele.fieldsId}`
} }
}) })
}) })
...@@ -433,6 +435,7 @@ ...@@ -433,6 +435,7 @@
self.waitHandlerPanelIndex = panelIndex self.waitHandlerPanelIndex = panelIndex
self.waitHandlerGroupIndex = groupIndex self.waitHandlerGroupIndex = groupIndex
self.waitHandlerEleIndex = eleIndex self.waitHandlerEleIndex = eleIndex
self.oldItemId = `item${ele.fieldsId}`
} }
} }
}) })
...@@ -460,8 +463,8 @@ ...@@ -460,8 +463,8 @@
locationCompleteItem(panelIndex,groupIndex,eleIndex){ // 页面定位到某一项 locationCompleteItem(panelIndex,groupIndex,eleIndex){ // 页面定位到某一项
this.tabIndex = panelIndex this.tabIndex = panelIndex
this.arr = [] this.arr = []
this.scrollRightTop = 0 this.scrollRightTop = 0;
this.current = groupIndex this.current = 0;
this.$nextTick(function() { this.$nextTick(function() {
this.swichMenu(groupIndex) this.swichMenu(groupIndex)
}) })
...@@ -497,16 +500,6 @@ ...@@ -497,16 +500,6 @@
}) })
} }
}, },
tabsChange(index){
this.tabIndex = index
this.arr = []
this.scrollRightTop = 0;
this.current = 0;
this.leftMenuStatus(0)
this.$nextTick(function() {
this.getMenuItemTop()
})
},
calMaterialCraftListAmount(arr){ calMaterialCraftListAmount(arr){
let amount = 0 let amount = 0
if(arr){ if(arr){
...@@ -529,7 +522,7 @@ ...@@ -529,7 +522,7 @@
// 更新预计超出金额 // 更新预计超出金额
let amount = this.calMaterialCraftListAmount(this.form.materialList) let amount = this.calMaterialCraftListAmount(this.form.materialList)
amount += this.calMaterialCraftListAmount(this.form.craftList) amount += this.calMaterialCraftListAmount(this.form.craftList)
this.$set(this.form,'allExtraAmt',amount) this.$set(this.form,'overAmount',amount)
}, },
// 字段的值更新 // 字段的值更新
fieldValueChange(data) { fieldValueChange(data) {
...@@ -563,13 +556,26 @@ ...@@ -563,13 +556,26 @@
this.tabIndex++ this.tabIndex++
this.arr = [] this.arr = []
this.scrollRightTop = 0 this.scrollRightTop = 0
this.leftMenuStatus(0) this.current = 0
this.$nextTick(function() { this.leftMenuStatus(0)
this.getMenuItemTop() const itemId = this.list[this.tabIndex].items[0].items[0].fieldsId
this.oldItemId = `item${itemId}`
this.$nextTick(async () => {
if (this.oldItemId) this.itemId = this.oldItemId
}) })
} }
}, },
tabsChange(index){
this.tabIndex = index
this.arr = []
this.scrollRightTop = 0;
this.current = 0;
this.leftMenuStatus(0)
this.$nextTick(function() {
if (this.oldItemId)this.itemId = this.oldItemId
this.getMenuItemTop()
})
},
// ------------------------- 以下方法为上传组件相关 ------------------------- // ------------------------- 以下方法为上传组件相关 -------------------------
// 弹出上传选项 // 弹出上传选项
selectUpload(item, groupIndex, itemIndex){ selectUpload(item, groupIndex, itemIndex){
...@@ -626,7 +632,8 @@ ...@@ -626,7 +632,8 @@
// 获取拍照规范 // 获取拍照规范
photograph(){ photograph(){
let self = this let self = this
let param = {"partnerCompanyId":this.partnerCompanyId, let param = {
"partnerCompanyId":this.partnerCompanyId || '',
"categoryId":this.categoryId, "categoryId":this.categoryId,
"brandId":this.brandId || '', "brandId":this.brandId || '',
"fieldName":this.photoItem.fieldsName} "fieldName":this.photoItem.fieldsName}
...@@ -644,7 +651,7 @@ ...@@ -644,7 +651,7 @@
if(getApp().globalData.photo.waterSetting){ if(getApp().globalData.photo.waterSetting){
return return
} }
var data={partnerCompanyId:this.partnerCompanyId} var data={partnerCompanyId:this.partnerCompanyId || ''}
this.$u.api.getWatermark(data).then((res) => { this.$u.api.getWatermark(data).then((res) => {
if (res.code == 200) { if (res.code == 200) {
getApp().globalData.photo.waterSetting = res.data getApp().globalData.photo.waterSetting = res.data
...@@ -664,7 +671,9 @@ ...@@ -664,7 +671,9 @@
if (index == this.current) return; if (index == this.current) return;
this.scrollRightTop = this.oldScrollTop; this.scrollRightTop = this.oldScrollTop;
this.$nextTick(function() { this.$nextTick(function() {
this.scrollRightTop = this.arr[index]; this.itemId = this.oldItemId
if(!this.oldItemId) this.scrollRightTop = this.arr[index];
this.oldItemId = ''
this.current = index; this.current = index;
this.leftMenuStatus(index); this.leftMenuStatus(index);
}) })
......
...@@ -184,7 +184,7 @@ uploader.requestError = function(e) { ...@@ -184,7 +184,7 @@ uploader.requestError = function(e) {
throw e; throw e;
} else { } else {
uni.showToast({ uni.showToast({
title: "网络错误,请检查一下网络", title: "当前网络信号较差,请耐心等待或尝试切换网络环境",
icon: "none" icon: "none"
}); });
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment