Commit b4752a83 by 张立顺

功能开发

1 parent b2ca2096
...@@ -114,6 +114,7 @@ App({ ...@@ -114,6 +114,7 @@ App({
if (res.confirm) { if (res.confirm) {
that.globalData.yqdInfo = {} that.globalData.yqdInfo = {}
that.globalData.YQorderSetting = '' that.globalData.YQorderSetting = ''
that.globalData.YQList = ''
util.removeStorage() util.removeStorage()
wx.$relogin = relogin wx.$relogin = relogin
router.reLaunch('pages.wxLogin') router.reLaunch('pages.wxLogin')
...@@ -131,6 +132,7 @@ App({ ...@@ -131,6 +132,7 @@ App({
} else { } else {
this.globalData.yqdInfo = {} this.globalData.yqdInfo = {}
this.globalData.YQorderSetting = '' this.globalData.YQorderSetting = ''
this.globalData.YQList = ''
util.removeStorage() util.removeStorage()
removeSystemStorage() removeSystemStorage()
wx.$relogin = relogin wx.$relogin = relogin
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
// import order_mixins from '../../tabWorkOrder/pages/order_mixins' // import order_mixins from '../../tabWorkOrder/pages/order_mixins'
import { form } from './form' import { form } from './form'
import api from '../../api/api' import api from '../../api/api'
import { getYQList } from '~/store/index'
Component({ Component({
/** /**
* 组件的属性列表 * 组件的属性列表
...@@ -214,9 +215,11 @@ Component({ ...@@ -214,9 +215,11 @@ Component({
}) })
this.setTimeList() this.setTimeList()
this.getGoodsTypeList() this.getGoodsTypeList()
api.getYQList().then(res => { getYQList().then(data => {
let { code, data, message } = res // debugger
if (code == 0) { console.log(data,'getYQList');
// let { code, data, message } = res
// if (code == 0) {
if (data.length > 0) { if (data.length > 0) {
console.log(userInfo,'userInfo'); console.log(userInfo,'userInfo');
this.setData({ this.setData({
...@@ -231,9 +234,9 @@ Component({ ...@@ -231,9 +234,9 @@ Component({
this.getConversionEmployeeList('', 0) this.getConversionEmployeeList('', 0)
this.getServiceMerchantList() this.getServiceMerchantList()
} }
} else { // } else {
wx.$util.showToast(message) // wx.$util.showToast(message)
} // }
}) })
this.setOrderStatusList() this.setOrderStatusList()
this.setInviteStatusList() this.setInviteStatusList()
......
...@@ -24,7 +24,10 @@ Component({ ...@@ -24,7 +24,10 @@ Component({
type: Number, //1.销售顾问,2.转化人员 type: Number, //1.销售顾问,2.转化人员
// order:Object, // order:Object,
isDefault: Boolean, // isDefault: Boolean, //
singleSeller:Boolean, singleSeller:{
type: Boolean,
value: false
},
oderType: String oderType: String
}, },
// 处理先要调用销售顾问接口再调用转化人员接口的问题 // 处理先要调用销售顾问接口再调用转化人员接口的问题
......
...@@ -36,7 +36,7 @@ Page({ ...@@ -36,7 +36,7 @@ Page({
type: 2, type: 2,
typeText: '补录订单' typeText: '补录订单'
}, },
tabIndex: 1, tabIndex: 0,
pageShow: [true, false, false, false], pageShow: [true, false, false, false],
navBarHeight: 0, navBarHeight: 0,
showPicker: false, showPicker: false,
......
...@@ -26,7 +26,9 @@ Page({ ...@@ -26,7 +26,9 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) { onLoad: function (options) {
console.log(options,'options');
let id = decodeURIComponent(options.scene).split('=')[1] let id = decodeURIComponent(options.scene).split('=')[1]
console.log(id,'id');
id ? this.qrCodeScene(id) : this.getListSelectAccount() id ? this.qrCodeScene(id) : this.getListSelectAccount()
}, },
getSceneArr(yqMerchantId, loginUserObj) { getSceneArr(yqMerchantId, loginUserObj) {
...@@ -340,7 +342,9 @@ Page({ ...@@ -340,7 +342,9 @@ Page({
wx.$util.hideLoading() wx.$util.hideLoading()
wx.$util.setUserInfo(data.loginUserInfoList[0]) wx.$util.setUserInfo(data.loginUserInfoList[0])
app.gobalCheckYqdSuper(data.loginUserInfoList[0]) app.gobalCheckYqdSuper(data.loginUserInfoList[0])
getYQorderInfo() getYQorderInfo()
// 超管跳过选择4s店 // 超管跳过选择4s店
if (data.loginUserInfoList[0] && data.loginUserInfoList[0].isSuper) { if (data.loginUserInfoList[0] && data.loginUserInfoList[0].isSuper) {
this.get4SStoreList(data.loginUserInfoList[0]) this.get4SStoreList(data.loginUserInfoList[0])
......
<navigation-bar bindnavbarReady="navbarReady" showBack="{{show_confirm}}" bindback="back"> <navigation-bar bindnavbarReady="navbarReady" showBack="{{show_confirm}}" bindback="back">
{{!show_confirm?'预约管理':'筛选'}} {{!show_confirm?'预约管理':'筛选'}}
</navigation-bar> </navigation-bar>
<!-- wx:if="{{navBarHeight > 0}}" -->
<block wx:if="{{navBarHeight > 0}}"> <block wx:if="{{navBarHeight > 0}}">
<view class="main" style="margin-top:{{navBarHeight}}px"> <view class="main" style="margin-top:{{navBarHeight}}px">
<view class="to-box" style="top:{{navBarHeight}}px"> <view class="to-box" style="top:{{navBarHeight}}px">
......
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
import api from '../../api' import api from '../../api'
import order_mixins from '../order_mixins.js' import order_mixins from '../order_mixins.js'
const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/' const IMG_URL = 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/'
let timeoutId;
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -9,6 +10,8 @@ Page({ ...@@ -9,6 +10,8 @@ Page({
data: { data: {
IMG_URL, IMG_URL,
...order_mixins.data, ...order_mixins.data,
showIcon1: true, // 初始显示图标
// showIcon2: true, // 初始隐藏第二个图标
activeIndex:0, activeIndex:0,
orderObj: [ orderObj: [
{ {
...@@ -36,7 +39,46 @@ Page({ ...@@ -36,7 +39,46 @@ Page({
tabList: ['全部', '待跟进', '已升级', '战败'], tabList: ['全部', '待跟进', '已升级', '战败'],
tabListTemplate: ['全部', '待跟进', '已升级', '战败'] tabListTemplate: ['全部', '待跟进', '已升级', '战败']
}, },
// 创建一个动画实例
// createAnimation: function () {
// const animation = wx.createAnimation({
// duration: 300, // 动画持续时间,单位毫秒
// timingFunction: 'ease', // 缓动函数,这里使用了默认的缓动效果
// });
// const iconAnimation = this.selectComponent('#iconAnimation'); // 获取animation组件的实例
// console.log(iconAnimation);
// animation.translateY(0).step(); // 初始状态
// iconAnimation.animationData = animation.export();
// this.setData({
// animationData: animation.export(),
// });
// return animation;
// },
onPageScroll: function (e) {
console.log(e);
const {scrollTop} = e.detail
console.log(scrollTop,'scrollTop');
// const animation = this.createAnimation(); // 创建动画实例
// 滚动时隐藏第一个图标,显示第二个图标
this.setData({
showIcon1: false,
showIcon2: true,
});
// 清除之前的定时器
if (timeoutId) {
clearTimeout(timeoutId);
}
// 设置一个定时器,在滚动停止后一定时间后恢复两个图标的显示状态
timeoutId = setTimeout(() => {
this.setData({
showIcon1: true,
showIcon2: false,
});
}, 1000); // 在这里设置等待的时间,单位是毫秒
},
navbarReady(e) { navbarReady(e) {
// console.log(e) // console.log(e)
let navBarHeight = e.detail.height let navBarHeight = e.detail.height
......
...@@ -2,7 +2,8 @@ ...@@ -2,7 +2,8 @@
<navigation-bar bindnavbarReady="navbarReady" showBack="{{show_confirm}}" bindback="back"> <navigation-bar bindnavbarReady="navbarReady" showBack="{{show_confirm}}" bindback="back">
{{!show_confirm?'工单列表':'筛选'}} {{!show_confirm?'工单列表':'筛选'}}
</navigation-bar> </navigation-bar>
<block wx:if="{{navBarHeight > 0}}"> <!-- wx:if="{{navBarHeight > 0}}" -->
<block wx:if="{{navBarHeight > 0}}" >
<view class="main" style="margin-top:{{navBarHeight}}px"> <view class="main" style="margin-top:{{navBarHeight}}px">
<view class="to-box" style="top:{{navBarHeight}}px"> <view class="to-box" style="top:{{navBarHeight}}px">
<view class="search-box"> <view class="search-box">
...@@ -37,6 +38,7 @@ ...@@ -37,6 +38,7 @@
refresher-enabled="{{true}}" refresher-enabled="{{true}}"
bindrefresherrefresh="search" bindrefresherrefresh="search"
bindscrolltolower="scrollonReachBottom" bindscrolltolower="scrollonReachBottom"
bindscroll="onPageScroll"
class="list" class="list"
style="height:calc(100vh - {{navBarHeight + 104}}px);" style="height:calc(100vh - {{navBarHeight + 104}}px);"
refresher-threshold="104" refresher-threshold="104"
...@@ -85,7 +87,7 @@ ...@@ -85,7 +87,7 @@
<image class="name-sex-icon" src="{{IMG_URL}}{{li.customer.customerSex == 1 ? 'miniProgram/icon-man.png' : 'miniProgram/icon-woman.png'}}" mode=""/> <image class="name-sex-icon" src="{{IMG_URL}}{{li.customer.customerSex == 1 ? 'miniProgram/icon-man.png' : 'miniProgram/icon-woman.png'}}" mode=""/>
</view> </view>
<view class="goods-list" style="padding-bottom:{{li.subOrderList.length<1?0:''}}"> <view class="goods-list" style="padding-bottom:{{li.subOrderList.length<1?0:''}}">
<block wx:if="{{li.total_price != 0}}"> <block wx:if="{{li.subOrderList.length}}">
<block <block
wx:for="{{li.subOrderList}}" wx:for="{{li.subOrderList}}"
wx:key="sindex" wx:key="sindex"
...@@ -208,18 +210,23 @@ ...@@ -208,18 +210,23 @@
</scroll-view> </scroll-view>
</block> </block>
</view> </view>
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2}}"> <block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && showIcon1}}">
<view class="fixed-btns"> <view class="fixed-btns" >
<view class="btn text-center" bindtap="jump" data-name="createOrder"> <view class="btn text-center" bindtap="jump" data-name="createOrder">
<image src="{{IMG_URL}}upgrade/create_newworkorder.png" /> <image src="{{IMG_URL}}upgrade/scancode_verification02.png" />
新增工单 新增工单
</view> </view>
<view class="btn text-center" bindtap="scan"> <view class="btn text-center" bindtap="scan">
<image src="{{IMG_URL}}upgrade/scancode_verification.png" /> <image src="{{IMG_URL}}upgrade/create_newworkorder01.png" />
扫码核销 扫码核销
</view> </view>
</view> </view>
</block> </block>
<block wx:if="{{!userInfo.isSuper && userInfo.merchantType && userInfo.userType == 2 && !showIcon1}}">
<view class="arrowIcon">
<image class="image" src="{{IMG_URL}}upgrade/arrow-left.png" />
</view>
</block>
</block> </block>
<order-confirm <order-confirm
show="{{show_confirm}}" show="{{show_confirm}}"
......
...@@ -138,7 +138,7 @@ page { ...@@ -138,7 +138,7 @@ page {
max-width: 404rpx; max-width: 404rpx;
} }
.list .item .name .name-sex-icon{ .list .item .name .name-sex-icon {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
margin-left: 8rpx; margin-left: 8rpx;
...@@ -318,7 +318,7 @@ page { ...@@ -318,7 +318,7 @@ page {
/* padding-top: 8rpx; */ /* padding-top: 8rpx; */
} }
.list .item .order-price .order-price-label{ .list .item .order-price .order-price-label {
font-size: 24rpx; font-size: 24rpx;
width: 136rpx; width: 136rpx;
color: #999EA8; color: #999EA8;
...@@ -349,25 +349,25 @@ page { ...@@ -349,25 +349,25 @@ page {
align-items: flex-end; */ align-items: flex-end; */
} }
.list .item .order-payType .payType{ .list .item .order-payType .payType {
margin-bottom: 16rpx; margin-bottom: 16rpx;
display: flex; display: flex;
} }
.list .item .order-payType .payType .payType-label{ .list .item .order-payType .payType .payType-label {
font-size: 24rpx; font-size: 24rpx;
width: 136rpx; width: 136rpx;
color: #999EA8; color: #999EA8;
} }
.list .item .order-payType .payType .payType-value{ .list .item .order-payType .payType .payType-value {
font-size: 24rpx; font-size: 24rpx;
display: flex; display: flex;
align-items: center; align-items: center;
color: #5A5E66; color: #5A5E66;
} }
.list .item .order-payType .payType .payType-image{ .list .item .order-payType .payType .payType-image {
width: 28rpx; width: 28rpx;
height: 28rpx; height: 28rpx;
margin-left: 10rpx; margin-left: 10rpx;
...@@ -398,32 +398,61 @@ page { ...@@ -398,32 +398,61 @@ page {
.fixed-btns { .fixed-btns {
position: fixed; position: fixed;
right: 20rpx; right: 20rpx;
top: 700rpx; bottom: 65rpx;
width: 104rpx; /* width: 104rpx; */
height: 296rpx; /* height: 296rpx; */
display: flex; display: flex;
justify-content: center; justify-content: center;
flex-flow: column; /* flex-flow: column; */
background: #ffffffe6; background: #FFFFFF;
box-shadow: 0 4rpx 20rpx 0 #0000001a;
border-radius: 16rpx;
/* background: #ffffffe6;
border: 1px solid #EFF0F2; border: 1px solid #EFF0F2;
box-shadow: 0 2px 10px 0 #0000001a; box-shadow: 0 2px 10px 0 #0000001a;
border-radius: 26px; border-radius: 26px; */
} }
.fixed-btns .btn { .fixed-btns .btn {
box-sizing: border-box;
padding: 20rpx 18rpx;
display: flex; display: flex;
flex-flow: column; flex-flow: column;
font-size: 20rpx; font-family: PingFangSC-Medium;
color: #757980; font-weight: 500;
font-size: 24rpx;
color: #347BFF;
width: 135rpx;
height: 136rpx;
} }
.fixed-btns .btn image { .fixed-btns .btn image {
width: 96rpx; width: 60rpx;
height: 96rpx; height: 60rpx;
flex-shrink: 0; flex-shrink: 0;
} }
.arrowIcon {
position: fixed;
right: 0;
bottom: 65rpx;
width: 36rpx;
height: 136rpx;
background: #FFFFFF;
border: 2rpx solid #EFF0F2;
box-shadow: 0 4rpx 20rpx 0 #0000001a;
border-radius: 16rpx 0 0 16rpx;
display: flex;
align-items: center;
justify-content: center;
}
.arrowIcon .image {
/* line-height: 136rpx; */
width: 32rpx;
height: 32rpx;
}
/* .fixed-btns::after { /* .fixed-btns::after {
position: absolute; position: absolute;
top: 50%; top: 50%;
......
// pages/wxLogin/wxLogin.js // pages/wxLogin/wxLogin.js
import api from '../../api/api.js' import api from '../../api/api.js'
import { setNoSignInUuid,getNoSignInUuid,rmNoSignInUuid } from '~/utils/cache/storageApi.js' import { setNoSignInUuid,getNoSignInUuid,rmNoSignInUuid } from '~/utils/cache/storageApi.js'
import { get4SStoreList } from '~/store/index' import { get4SStoreList,getYQList } from '~/store/index'
const app = getApp() const app = getApp()
Page({ Page({
/** /**
...@@ -116,6 +116,8 @@ Page({ ...@@ -116,6 +116,8 @@ Page({
wx.$util.showLoading() wx.$util.showLoading()
if (this.data.jumpPageFlag) return if (this.data.jumpPageFlag) return
this.setData({jumpPageFlag: true}) this.setData({jumpPageFlag: true})
getYQList()
console.log(smsLogin,'smsLogin');
if (loginType == 1) { if (loginType == 1) {
// 手机号登录 // 手机号登录
api api
...@@ -128,11 +130,12 @@ Page({ ...@@ -128,11 +130,12 @@ Page({
wx.$util.showLoading() wx.$util.showLoading()
let { code, data } = result let { code, data } = result
if (code == 0) { if (code == 0) {
let { loginUserInfoList, sessionId, noSignInUuid, needSelectAccount } = data let { loginUserInfoList, sessionId, noSignInUuid, needSelectAccount } = data
if (loginUserInfoList.length) { if (loginUserInfoList.length) {
const loginUserObj = loginUserInfoList.filter(val => val.subLoginUser && Object.keys(val.subLoginUser)?.length)[0] || {} const loginUserObj = loginUserInfoList.filter(val => val.subLoginUser && Object.keys(val.subLoginUser)?.length)[0] || {}
wx.$util.setSessionId(sessionId) wx.$util.setSessionId(sessionId)
getYQList()
noSignInUuid ? setNoSignInUuid(noSignInUuid):rmNoSignInUuid() noSignInUuid ? setNoSignInUuid(noSignInUuid):rmNoSignInUuid()
// 记录登录信息 已选园区店、4s店和场景 // 记录登录信息 已选园区店、4s店和场景
if (!needSelectAccount && Object.keys(loginUserObj)?.length && loginUserObj?.shopMerchantId && !((loginUserObj?.sceneType ?? '') === '')) { if (!needSelectAccount && Object.keys(loginUserObj)?.length && loginUserObj?.shopMerchantId && !((loginUserObj?.sceneType ?? '') === '')) {
...@@ -173,11 +176,12 @@ Page({ ...@@ -173,11 +176,12 @@ Page({
wx.$util.showLoading() wx.$util.showLoading()
let { code, data } = result let { code, data } = result
if (code == 0) { if (code == 0) {
let { loginUserInfoList, sessionId, noSignInUuid, needSelectAccount } = data let { loginUserInfoList, sessionId, noSignInUuid, needSelectAccount } = data
if (loginUserInfoList.length) { if (loginUserInfoList.length) {
const loginUserObj = loginUserInfoList.filter(val => val.subLoginUser && Object.keys(val.subLoginUser)?.length)[0] || {} const loginUserObj = loginUserInfoList.filter(val => val.subLoginUser && Object.keys(val.subLoginUser)?.length)[0] || {}
wx.$util.setSessionId(sessionId) wx.$util.setSessionId(sessionId)
getYQList()
noSignInUuid ? setNoSignInUuid(noSignInUuid):rmNoSignInUuid() noSignInUuid ? setNoSignInUuid(noSignInUuid):rmNoSignInUuid()
// 记录登录信息 已选园区店、4s店和场景 // 记录登录信息 已选园区店、4s店和场景
if (!needSelectAccount && Object.keys(loginUserObj)?.length && loginUserObj?.shopMerchantId && !((loginUserObj?.sceneType ?? '') === '')) { if (!needSelectAccount && Object.keys(loginUserObj)?.length && loginUserObj?.shopMerchantId && !((loginUserObj?.sceneType ?? '') === '')) {
...@@ -251,7 +255,47 @@ Page({ ...@@ -251,7 +255,47 @@ Page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (options) {}, onLoad: function (options) {
console.log(options,'options');
options.noLogin && options.sence ==2 && this.noLoginFn(options.noLogin)
},
noLoginFn (noLogin){
let that = this
// let { noLogin } = this.data
wx.$util.showLoading()
api
.noLogin({
mobile: noLogin
})
.then(result => {
wx.$util.showLoading()
if (result.code == 0) {
let { loginUserInfoList, sessionId, noSignInUuid, needSelectAccount } = result.data
console.log(result,loginUserInfoList,'loginUserInfoList');
if (loginUserInfoList.length) {
const loginUserObj = loginUserInfoList.filter(val => val.subLoginUser && Object.keys(val.subLoginUser)?.length)[0] || {}
wx.$util.setSessionId(sessionId)
getYQList()
noSignInUuid ? setNoSignInUuid(noSignInUuid):rmNoSignInUuid()
// 记录登录信息 已选园区店、4s店和场景
if (!needSelectAccount && Object.keys(loginUserObj)?.length && loginUserObj?.shopMerchantId && !((loginUserObj?.sceneType ?? '') === '')) {
this.getYqMerchantSceneConfig(loginUserObj, 0)
} else if (!needSelectAccount && Object.keys(loginUserObj)?.length && loginUserObj?.shopMerchantId && (loginUserObj?.sceneType ?? '') === '') { // 已选园区店、4s店
this.getYqMerchantSceneConfig(loginUserObj, 1)
} else if (!needSelectAccount) { // 仅选择园区店
this.getYqMerchantSceneConfig(loginUserObj, 2)
} else { // 未记录到登录信息
this.getAccountLoginList(loginUserInfoList)
}
} else {
wx.$router.reLaunch('pages.nothing')
}
}
})
.catch(err => {
wx.hideLoading()
})
},
/** /**
* 获取授权手机号 * 获取授权手机号
*/ */
...@@ -274,11 +318,12 @@ Page({ ...@@ -274,11 +318,12 @@ Page({
.then(({ code, data, message }) => { .then(({ code, data, message }) => {
wx.hideLoading() wx.hideLoading()
if (code == 0) { if (code == 0) {
let { loginUserInfoList, sessionId, noSignInUuid, needSelectAccount } = data let { loginUserInfoList, sessionId, noSignInUuid, needSelectAccount } = data
if (loginUserInfoList.length) { if (loginUserInfoList.length) {
const loginUserObj = loginUserInfoList.filter(val => val.subLoginUser && Object.keys(val.subLoginUser)?.length)[0] || {} const loginUserObj = loginUserInfoList.filter(val => val.subLoginUser && Object.keys(val.subLoginUser)?.length)[0] || {}
wx.$util.setSessionId(sessionId) wx.$util.setSessionId(sessionId)
getYQList()
noSignInUuid ? setNoSignInUuid(noSignInUuid):rmNoSignInUuid() noSignInUuid ? setNoSignInUuid(noSignInUuid):rmNoSignInUuid()
// 记录登录信息 已选园区店、4s店和场景 // 记录登录信息 已选园区店、4s店和场景
if (!needSelectAccount && Object.keys(loginUserObj)?.length && loginUserObj?.shopMerchantId && !((loginUserObj?.sceneType ?? '') === '')) { if (!needSelectAccount && Object.keys(loginUserObj)?.length && loginUserObj?.shopMerchantId && !((loginUserObj?.sceneType ?? '') === '')) {
......
...@@ -4,6 +4,34 @@ ...@@ -4,6 +4,34 @@
"miniprogram": { "miniprogram": {
"list": [ "list": [
{ {
"name": "",
"pathName": "pages/accountItems/accountItems",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/wxLogin/wxLogin",
"query": "noLogin=18902454301&sence=2",
"launchMode": "default",
"scene": 1047
},
{
"name": "战败下单",
"pathName": "tabWorkOrder/pages/defeatOrder/defeatOrder",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "1.1 订单列表",
"pathName": "pages/tabWorkOrder/pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "2.1订单下单", "name": "2.1订单下单",
"pathName": "packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple", "pathName": "packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple",
"query": "", "query": "",
......
...@@ -165,7 +165,7 @@ export const setConfigInfo = globalData => { ...@@ -165,7 +165,7 @@ export const setConfigInfo = globalData => {
} }
}) })
} }
// 扫码进来的处理
export const checkScene = options => { export const checkScene = options => {
// let query = options.query // let query = options.query
let { query } = options let { query } = options
...@@ -323,3 +323,24 @@ export const getShopSceneConfig = options => { ...@@ -323,3 +323,24 @@ export const getShopSceneConfig = options => {
}) })
}) })
} }
/** 获取当前园区列表 */
export const getYQList = () => {
// debugger
return new Promise((resolve, reject) => {
const app = getApp()
console.log(app.globalData.YQList,'app.globalData.YQList');
// 如果有 直接返回
if (app.globalData.YQList) {
return resolve(app.globalData.YQList)
} else {
api.getYQList({}).then(res => {
let { code, data } = res
if (code == 0) {
app.globalData.YQList = data
}
resolve(app.globalData.YQList)
})
}
})
}
\ No newline at end of file \ No newline at end of file
...@@ -54,6 +54,16 @@ Component({ ...@@ -54,6 +54,16 @@ Component({
label: '车牌号', label: '车牌号',
valueName: 'plateNumRequiredFlag', valueName: 'plateNumRequiredFlag',
value: false value: false
},
{
label: '战败下单是否体验',
valueName: 'foEfRequiredFlag',
value: true
},
{
label: '战败下单拒升理由提交',
valueName: 'foRrRequiredFlag',
value: true
} }
] ]
}, },
...@@ -65,7 +75,7 @@ Component({ ...@@ -65,7 +75,7 @@ Component({
// app . // app .
getYQorderInfo() getYQorderInfo()
.then(merchantSettingInfo => { .then(merchantSettingInfo => {
// console.log(merchantSettingInfo) console.log(merchantSettingInfo)
this.setData({ merchantSettingInfo }) this.setData({ merchantSettingInfo })
this.setOrderSettingList(merchantSettingInfo) this.setOrderSettingList(merchantSettingInfo)
}) })
......
...@@ -149,6 +149,7 @@ ...@@ -149,6 +149,7 @@
</view> </view>
</view> </view>
</block> </block>
<!-- isYqdSuper -->
<switch-popup <switch-popup
show="{{showMerchantPop}}" show="{{showMerchantPop}}"
height="{{merchantPopConfig.height}}" height="{{merchantPopConfig.height}}"
......
// tabWorkOrder/pages/defeatOrder/defeatOrder.js // tabWorkOrder/pages/defeatOrder/defeatOrder.js
import api from '../../api' import api from '../../api'
import { import api2 from '~/api/api.js'
getYQorderInfo, import { getYQorderInfo, getPositionList } from '~/store/index'
getPositionList
} from '~/store/index'
const phoneRex = /^[1]([3-9])[0-9]{9}$/ const phoneRex = /^[1]([3-9])[0-9]{9}$/
let toastList = { let toastList = {
employeeName: '销售顾问不能为空', employeeName: '销售顾问不能为空',
subShopMerchantId: '二级流量方不能为空', subShopMerchantId: '二级流量方不能为空',
sellerUserId: '转化人员不能为空' sellerUserId: '转化人员不能为空',
refusalReason: '拒升理由不能为空'
} }
Page({ Page({
/** /**
...@@ -17,9 +16,9 @@ Page({ ...@@ -17,9 +16,9 @@ Page({
data: { data: {
scanIcon: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/ocr_icon.png', scanIcon: 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/ocr_icon.png',
name: 'createdOrder', name: 'createdOrder',
shortcutList: [],
phoneShow: false, phoneShow: false,
orderObj: { orderObj: {},
},
goodsData: [], goodsData: [],
userInfo: {}, userInfo: {},
notUpgradeOrderList: [ notUpgradeOrderList: [
...@@ -30,6 +29,7 @@ Page({ ...@@ -30,6 +29,7 @@ Page({
standNo: '', standNo: '',
plateNumber: '', plateNumber: '',
customerSex: 1, customerSex: 1,
experienceFlag: 'Y'
}, },
confirmIndex: false, confirmIndex: false,
subOrderList: [] subOrderList: []
...@@ -44,8 +44,10 @@ Page({ ...@@ -44,8 +44,10 @@ Page({
}, },
toView: '', toView: '',
typeIndx: 0, typeIndx: 0,
// isPlateNumber: false isPlateNumber: false,
isStandNo: false, isStandNo: false,
experienceFlag: false,
refusalReason: false,
isShowSubShopMerchant: false, isShowSubShopMerchant: false,
requiredList: [], requiredList: [],
tipsProps: { tipsProps: {
...@@ -58,7 +60,7 @@ Page({ ...@@ -58,7 +60,7 @@ Page({
frontGearArr: [], frontGearArr: [],
sideRearGearArr: [], sideRearGearArr: [],
skylightArr: [], skylightArr: [],
customerInfoBox: false, customerInfoBox: false
}, },
routerBack() { routerBack() {
wx.$router.back() wx.$router.back()
...@@ -77,6 +79,19 @@ Page({ ...@@ -77,6 +79,19 @@ Page({
}) })
wx.$router.go(`ocr?type=${type}`) wx.$router.go(`ocr?type=${type}`)
}, },
changeExperience(e) {
// let { gender, index } = e.currentTarget.dataset
let { experience, index } = e.currentTarget.dataset
let prop = `notUpgradeOrderList[${index}].customer.experienceFlag`
this.setData({
[prop]: experience
})
// console.log(experience)
wx.vibrateShort()
// this.setData({
// ['orderObj.customer.experienceFlag']: experience
// })
},
// 选择产品确定 // 选择产品确定
chooseGoods(e) { chooseGoods(e) {
let { selectCustomIndex } = this.data let { selectCustomIndex } = this.data
...@@ -114,7 +129,7 @@ Page({ ...@@ -114,7 +129,7 @@ Page({
}) })
}, },
addUserItem() { addUserItem() {
let { notUpgradeOrderList, copyGoodsData } = this.data let { notUpgradeOrderList, copyGoodsData, shortcutList } = this.data
if (notUpgradeOrderList.length >= 10) return if (notUpgradeOrderList.length >= 10) return
notUpgradeOrderList.push({ notUpgradeOrderList.push({
customer: { customer: {
...@@ -122,15 +137,17 @@ Page({ ...@@ -122,15 +137,17 @@ Page({
customerPhone: '', customerPhone: '',
standNo: '', standNo: '',
customerSex: 1, customerSex: 1,
plateNumber: '' plateNumber: '',
} experienceFlag: 'Y'
},
shortcutList:wx.$util.deepClone(shortcutList)
}) })
this.setData({ this.setData({
notUpgradeOrderList notUpgradeOrderList
}) })
if (copyGoodsData.length == 1 && copyGoodsData[0].upgradeGoodsList.length == 1) { // if (copyGoodsData.length == 1 && copyGoodsData[0].upgradeGoodsList.length == 1) {
this.defaultChoose(notUpgradeOrderList.length - 1) this.defaultChoose(notUpgradeOrderList.length - 1)
} // }
setTimeout(() => { setTimeout(() => {
this.setData({ this.setData({
toView: 'addBtn' toView: 'addBtn'
...@@ -286,14 +303,8 @@ Page({ ...@@ -286,14 +303,8 @@ Page({
return (360 * Math.atan(_Y / _X)) / (2 * Math.PI) return (360 * Math.atan(_Y / _X)) / (2 * Math.PI)
}, },
showPopup(e) { showPopup(e) {
let { let { copyGoodsData } = this.data
copyGoodsData, let { showName, index, type } = e.currentTarget.dataset
} = this.data
let {
showName,
index,
type
} = e.currentTarget.dataset
let arr = [] let arr = []
if (showName == 'goodsBox') { if (showName == 'goodsBox') {
// type 产品类型 1前档 2侧后档 3天窗 4其它精品 根据类型过滤显示商品弹窗数据 // type 产品类型 1前档 2侧后档 3天窗 4其它精品 根据类型过滤显示商品弹窗数据
...@@ -357,7 +368,7 @@ Page({ ...@@ -357,7 +368,7 @@ Page({
}, },
// 获取商品 // 获取商品
async getOrderBaseGoodsList(merchantId) { async getOrderBaseGoodsList(merchantId) {
const positionTypeList = await getPositionList() || [] const positionTypeList = (await getPositionList()) || []
let { frontGearArr, sideRearGearArr, skylightArr } = this.data let { frontGearArr, sideRearGearArr, skylightArr } = this.data
this.setData({ this.setData({
positionTypeList positionTypeList
...@@ -368,11 +379,7 @@ Page({ ...@@ -368,11 +379,7 @@ Page({
upradeFlag: 'N' upradeFlag: 'N'
}) })
.then(res => { .then(res => {
let { let { code, data, message } = res
code,
data,
message
} = res
if (code == 0) { if (code == 0) {
wx.hideLoading() wx.hideLoading()
// 筛选出太阳膜商品 goodsType 1太阳膜 // 筛选出太阳膜商品 goodsType 1太阳膜
...@@ -417,9 +424,9 @@ Page({ ...@@ -417,9 +424,9 @@ Page({
copyGoodsData: goodsData copyGoodsData: goodsData
}) })
// 仅有一件商品 默认选中 // 仅有一件商品 默认选中
if (goodsData.length == 1 && goodsData[0].upgradeGoodsList.length == 1) { // if (goodsData.length == 1 && goodsData[0].upgradeGoodsList.length == 1) {
this.defaultChoose(0) this.defaultChoose(0)
} // }
} else { } else {
wx.$util.showToast(message) wx.$util.showToast(message)
} }
...@@ -442,7 +449,7 @@ Page({ ...@@ -442,7 +449,7 @@ Page({
submit(i) { submit(i) {
this.checkPhoneUseConfig() this.checkPhoneUseConfig()
let { orderObj, notUpgradeOrderList, dateObj, isStandNo, isCarBrand, isPlateNumber } = this.data let { orderObj, notUpgradeOrderList, dateObj, isStandNo, isCarBrand, isPlateNumber, refusalReason } = this.data
let key = this.checkRequired(orderObj) let key = this.checkRequired(orderObj)
// debugger // debugger
if (key) { if (key) {
...@@ -472,6 +479,9 @@ Page({ ...@@ -472,6 +479,9 @@ Page({
if (!notUpgradeOrderList[index].subOrderList?.length) { if (!notUpgradeOrderList[index].subOrderList?.length) {
return this.showToast(`请选择第${index + 1}位客户产品`) return this.showToast(`请选择第${index + 1}位客户产品`)
} }
if (refusalReason && !notUpgradeOrderList[index].customer.refusalReason) {
return this.showToast(`请输入第${index + 1}位客户拒升理由`)
}
} }
notUpgradeOrderList?.forEach(val => { notUpgradeOrderList?.forEach(val => {
...@@ -542,39 +552,100 @@ Page({ ...@@ -542,39 +552,100 @@ Page({
} }
}, },
delGoodsList(e) { delGoodsList(e) {
let { let { index, customIndex } = e.currentTarget.dataset
index, let { notUpgradeOrderList } = this.data
customIndex
} = e.currentTarget.dataset
let {
notUpgradeOrderList
} = this.data
notUpgradeOrderList[customIndex]?.subOrderList?.splice(index, 1) notUpgradeOrderList[customIndex]?.subOrderList?.splice(index, 1)
this.setData({ this.setData({
notUpgradeOrderList notUpgradeOrderList
}) })
}, },
blur(e) {
let { liindex } = e.currentTarget.dataset
console.log(e,liindex);
console.log(e)
let { value } = e.detail
let { notUpgradeOrderList } = this.data
value = value.substring(0, 30)
let shortcutList = notUpgradeOrderList[liindex].shortcutList
if (!value) {
shortcutList = shortcutList.map(i => {
i.active = false
return i
})
}
let prop = `notUpgradeOrderList[${liindex}].shortcutList`
let prop2 = `notUpgradeOrderList[${liindex}].focus`
let prop3 = `notUpgradeOrderList[${liindex}].customer.refusalReason`
console.log(value,'value');
this.setData({
[prop3]: value,
[prop]: shortcutList,
[prop2]: false
})
},
chooseShortcut(e) {
let { item, index, liindex } = e.currentTarget.dataset
console.log(item, index, liindex)
let { notUpgradeOrderList } = this.data
// console.log(object);
// debugger
if (notUpgradeOrderList[liindex].shortcutList[index].active) return
let refusalReason = notUpgradeOrderList[liindex].customer.refusalReason || ''
refusalReason += item.confValue
refusalReason = refusalReason.substring(0, 30)
let prop = `notUpgradeOrderList[${liindex}].shortcutList[${index}].active`
// let prop2 = `notUpgradeOrderList[${liindex}].focus`
let prop3 = `notUpgradeOrderList[${liindex}].customer.refusalReason`
this.setData({
[prop3]: refusalReason,
[prop]: true,
// [prop2]: true
})
console.log(refusalReason,this.data.notUpgradeOrderList);
},
getSetting() { getSetting() {
// 动态获取 车型 车架 车牌 是否必填 // 动态获取 车型 车架 车牌 是否必填
let { isStandNo, isCarBrand, isPlateNumber } = this.data // let { isStandNo, isCarBrand, isPlateNumber } = this.data
let { isStandNo, isCarBrand, isPlateNumber, experienceFlag, refusalReason } = this.data
// app . // app .
getYQorderInfo() getYQorderInfo()
.then(merchantSettingInfo => { .then(merchantSettingInfo => {
// let { requiredList } = this.data
if (merchantSettingInfo.carTypeRequiredFlag == 'Y') isCarBrand = true // 车型必填 if (merchantSettingInfo.carTypeRequiredFlag == 'Y') isCarBrand = true // 车型必填
if (merchantSettingInfo.standNoRequiredFlag == 'Y') isStandNo = true // 车架号必填 if (merchantSettingInfo.standNoRequiredFlag == 'Y') isStandNo = true // 车架号必填
if (merchantSettingInfo.plateNumRequiredFlag == 'Y') isPlateNumber = true // 车牌必填 if (merchantSettingInfo.plateNumRequiredFlag == 'Y') isPlateNumber = true // 车牌必填
if (merchantSettingInfo.foEfRequiredFlag == 'Y') experienceFlag = true // 战败订单是否体验
if (merchantSettingInfo.foRrRequiredFlag == 'Y') refusalReason = true // 战败订单拒升理由
this.setData({ this.setData({
isStandNo, isStandNo,
isCarBrand, isCarBrand,
isPlateNumber, isPlateNumber,
// phoneShow: merchantSettingInfo.yqPhoneConfig experienceFlag,
refusalReason,
phoneShow: wx.$util.deepClone(merchantSettingInfo.yqPhoneConfig) phoneShow: wx.$util.deepClone(merchantSettingInfo.yqPhoneConfig)
}) })
// this.setData({ merchantSettingInfo })
}) })
.catch(err => { .catch(err => {
console.log(err) console.log(err)
}) })
api2
.getConfigList({
confGroup: 'SMARTCARLIFE_NOT_UPGRADE_LABEL'
})
.then(res => {
console.log(res)
let list = []
let { code, data } = res
if (code == 0) {
list = data
}
let prop = `notUpgradeOrderList[0].shortcutList`
this.setData({
shortcutList: list,
[prop]: list
})
})
}, },
init(userInfo) { init(userInfo) {
let { orderObj } = this.data let { orderObj } = this.data
...@@ -608,13 +679,11 @@ Page({ ...@@ -608,13 +679,11 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function (res) { onReady: function (res) {},
},
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow: function (res) { onShow: function (res) {},
},
onRoute(res) { onRoute(res) {
res && this.initOPtions(res) res && this.initOPtions(res)
this.getSetting() this.getSetting()
......
...@@ -94,7 +94,7 @@ scroll-view ::-webkit-scrollbar { ...@@ -94,7 +94,7 @@ scroll-view ::-webkit-scrollbar {
font-weight: 500; font-weight: 500;
} }
.seller_box{ .seller_box {
margin: 0 20rpx 20rpx; margin: 0 20rpx 20rpx;
} }
...@@ -167,7 +167,12 @@ scroll-view ::-webkit-scrollbar { ...@@ -167,7 +167,12 @@ scroll-view ::-webkit-scrollbar {
color: #fff; color: #fff;
} }
.goods_box .label{ /* .gender-box .male.active,
.gender-box .woman.active {
color: #fff;
} */
.goods_box .label {
font-size: 28rpx; font-size: 28rpx;
color: #292D33; color: #292D33;
margin: 40rpx 0 0 40rpx; margin: 40rpx 0 0 40rpx;
...@@ -208,11 +213,11 @@ scroll-view ::-webkit-scrollbar { ...@@ -208,11 +213,11 @@ scroll-view ::-webkit-scrollbar {
justify-content: space-between; justify-content: space-between;
} }
.goods-box .goods .bottom_box .position{ .goods-box .goods .bottom_box .position {
color: #888888; color: #888888;
} }
.goods-box .goods .bottom_box .red_text{ .goods-box .goods .bottom_box .red_text {
color: red; color: red;
} }
...@@ -232,7 +237,7 @@ scroll-view ::-webkit-scrollbar { ...@@ -232,7 +237,7 @@ scroll-view ::-webkit-scrollbar {
margin-right: 32rpx; margin-right: 32rpx;
} }
.goods-box .goods .price text{ .goods-box .goods .price text {
position: absolute; position: absolute;
left: 16rpx; left: 16rpx;
top: 50%; top: 50%;
...@@ -260,7 +265,7 @@ scroll-view ::-webkit-scrollbar { ...@@ -260,7 +265,7 @@ scroll-view ::-webkit-scrollbar {
color: #dcdcdc; color: #dcdcdc;
} }
.goods-box .goods .count{ .goods-box .goods .count {
min-width: 64rpx; min-width: 64rpx;
} }
...@@ -364,7 +369,8 @@ scroll-view ::-webkit-scrollbar { ...@@ -364,7 +369,8 @@ scroll-view ::-webkit-scrollbar {
} }
.touch-item { .touch-item {
box-sizing: border-box;position: relative; box-sizing: border-box;
position: relative;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
overflow: hidden; overflow: hidden;
...@@ -411,4 +417,59 @@ scroll-view ::-webkit-scrollbar { ...@@ -411,4 +417,59 @@ scroll-view ::-webkit-scrollbar {
.touch-move-active .del { .touch-move-active .del {
-webkit-transform: translateX(0); -webkit-transform: translateX(0);
transform: translateX(0); transform: translateX(0);
}
.requiredStar {
color: #f00;
}
.remarkCon .title {
padding: 24rpx 40rpx;
/* font-size: 32rpx;
color: #333333;
font-weight: 600;
text-align: center; */
font-family: PingFangSC-Regular;
font-weight: 400;
font-size: 28rpx;
color: #292D33;
letter-spacing: 0;
text-align: left;
}
.remarkCon .textarea {
background: #F7F7F7;
border: 1rpx solid #C3C3C3;
border-radius: 12rpx;
width: 600rpx;
height: 240rpx;
box-sizing: border-box;
margin: 0 auto 20rpx;
padding: 25rpx 30rpx;
font-size: 28rpx;
color: #333333;
}
.remarkCon .shortcut-list {
padding: 0 52rpx 0 40rpx;
display: flex;
flex-wrap: wrap;
height: 165rpx;
overflow: hidden;
}
.remarkCon .shortcut-list .shortcut {
padding: 0 24rpx;
height: 59rpx;
line-height: 59rpx;
background: #F7F7F7;
border-radius: 8rpx;
font-size: 24rpx;
color: #888888;
max-width: calc(100% - 48rpx);
text-align: center;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
margin: 0 0 20rpx 12rpx;
} }
\ No newline at end of file \ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!