Commit 2a34dcf1 by 张立顺

bug修复

1 parent c1250cf0
......@@ -18,7 +18,7 @@ export const appId = 'wx570d9331f9ace0bd'
* 4预发布
* 5cdptest
*/
let index = 2
let index = 1
const accountInfo = wx.getAccountInfoSync()
const systemInfo = wx.getSystemInfoSync()
......
......@@ -230,6 +230,7 @@
display: flex;
align-items: center;
font-size: 32rpx;
font-weight: 600;
color: #333333;
}
......@@ -240,7 +241,7 @@
}
.list .header-status {
font-weight: 500;
font-weight: 600;
font-size: 28rpx;
}
......@@ -439,7 +440,7 @@
.pricePay .header-price {
font-family: 'numberBold';
font-weight: 700;
/* font-weight: 700; */
font-size: 36rpx;
color: #347BFF;
}
......
// tabWorkOrder/pages/createOrder/createOrder.js
// import deepClone from '~/utils/deepClone'
import {getQuotationInfoById,updateCustomerInfo} from '../../../api'
import {
getQuotationInfoById,
updateCustomerInfo
} from '../../../api'
// import { getYQorderInfo } from '~/store/index'
let toastList = {
userId: '销售顾问不能为空',
customerName: '车主姓名不能为空',
owner: '车主姓名不能为空',
customerPhone: '手机号不能为空',
sellerUserId: '转化人员不能为空',
customerCouponCode: '精品礼券不能为空'
......@@ -17,8 +20,7 @@ Page({
*/
data: {
phoneShow: false,
payTypeList: [
{
payTypeList: [{
name: '门店收款',
value: 2
},
......@@ -61,9 +63,13 @@ Page({
showPopup(e) {
let {
goodsData,
orderObj: { selectPayType }
orderObj: {
selectPayType
}
} = this.data
let { showName } = e.currentTarget.dataset
let {
showName
} = e.currentTarget.dataset
if (showName == 'goodsBox') {
if (selectPayType == 0) return
if (goodsData.length < 1) {
......@@ -76,7 +82,9 @@ Page({
})
},
changeExperience(e) {
let { experience } = e.currentTarget.dataset
let {
experience
} = e.currentTarget.dataset
console.log(experience)
wx.vibrateShort()
this.setData({
......@@ -85,9 +93,15 @@ Page({
},
input(e) {
// userInfo
let { orderObj } = this.data
let { value } = e.detail
let { name } = e.currentTarget.dataset
let {
orderObj
} = this.data
let {
value
} = e.detail
let {
name
} = e.currentTarget.dataset
// let flag = (name == 'customer.customerPhone' && phoneRex.test(value)) || name != 'customer.customerPhone'
// if (!flag) return
this.setData({
......@@ -135,13 +149,20 @@ Page({
})
},
submit(i) {
let { giveup } = i.currentTarget.dataset
let {
giveup
} = i.currentTarget.dataset
// console.log(giveUp)
// console.log(i.currentTarget)
if (giveup) {
return this.back()
return this.back()
}
let {orderObj,orderObj:{owner}} = this.data
let {
orderObj,
orderObj: {
owner
}
} = this.data
let key = this.checkRequired(orderObj)
console.log(key)
......@@ -165,17 +186,17 @@ Page({
}
}
let params = {
id:orderObj.id,
notes: orderObj.notes||'',
owner:{
id:orderObj.owner.id,
owner:owner.owner,
phone:owner.phone,
carVin:owner.carVin|| '',
certificateNo:owner.certificateNo|| ''
id: orderObj.id,
notes: orderObj.notes || '',
owner: {
id: orderObj.owner.id,
owner: owner.owner,
phone: owner.phone,
carVin: owner.carVin || '',
certificateNo: owner.certificateNo || ''
}
}
console.log(params,'params');
console.log(params, 'params');
// if (!scene) {
// if (!orderObj.orderCode) delete orderObj.orderCode
// }
......@@ -234,7 +255,10 @@ Page({
},
setOrderObj(options) {
// console.log(options)
let { scene, userInfo } = this.data
let {
scene,
userInfo
} = this.data
console.log('setOrderObj', options)
// wx.$util.showLoading('加载中...')
let orderObj = {}
......@@ -261,11 +285,15 @@ Page({
})
},
getQuotationInfoById(id) {
getQuotationInfoById({id}).then(res=>{
getQuotationInfoById({
id
}).then(res => {
console.log(res);
let {data,} = res
let {
data,
} = res
this.setData({
orderObj:data
orderObj: data
})
})
},
......@@ -345,4 +373,4 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage: function () {}
})
})
\ No newline at end of file
<!-- 订单修改 -->
<!-- <block wx:if="{{flag}}"> -->
<view class="main {{isFullSucreen?'isFullSucreen':''}}">
<view class="box">
<view class="customerName owner">
<gl-cell border valueAlign="right" label="车主姓名" requiredAfter labelWidth="140rpx" required>
<input placeholder="点击输入" class="input" placeholder-class="placeholder-class" maxlength="16" value="{{orderObj.owner.owner}}" bindinput="input" data-name="owner.owner" always-embed></input>
</gl-cell>
</view>
<!-- <gl-cell border label="性别" valueAlign="right" labelWidth="140rpx">
<view class="main {{isFullSucreen?'isFullSucreen':''}}">
<view class="box">
<view class="customerName owner">
<gl-cell border valueAlign="right" label="车主姓名" requiredAfter labelWidth="140rpx" required>
<input placeholder="点击输入" class="input" placeholder-class="placeholder-class" maxlength="16" value="{{orderObj.owner.owner}}" bindinput="input" data-name="owner.owner" always-embed></input>
</gl-cell>
</view>
<!-- <gl-cell border label="性别" valueAlign="right" labelWidth="140rpx">
<view class="gender-box">
<view class="block text-center {{orderObj.customer.customerSex==1?'':'right'}}" />
<view class="male text-center {{orderObj.customer.customerSex == 1?'active':''}}" bindtap="changeGender" data-gender="1">
......@@ -18,18 +18,18 @@
</view>
</view>
</gl-cell> -->
<view class="customerPhone phone" >
<gl-cell border valueAlign="right" label="手机号" requiredAfter labelWidth="140rpx" required>
<input placeholder="点击输入" class="input" type="number" maxlength="11" placeholder-class="placeholder-class" value="{{orderObj.owner.phone}}" bindinput="input" data-name="customer.phone" disabled="{{orderObj.orderSource == 5||orderObj.orderSource == 6}}" always-embed></input>
</gl-cell>
</view>
<gl-cell border valueAlign="right" label="车架号( VIN码 )" labelWidth="240rpx">
<input placeholder="点击输入" class="input" placeholder-class="placeholder-class" value="{{orderObj.owner.carVin}}" bindinput="input" data-name="customer.carVin" maxlength="17" always-embed></input>
</gl-cell>
<gl-cell border valueAlign="right" label="身份证号" labelWidth="240rpx">
<input placeholder="点击输入" class="input" placeholder-class="placeholder-class" value="{{orderObj.owner.certificateNo}}" bindinput="input" data-name="customer.certificateNo" maxlength="20" always-embed></input>
</gl-cell>
<!-- <gl-cell border label="是否体验" valueAlign="right" labelWidth="140rpx">
<view class="customerPhone phone">
<gl-cell border valueAlign="right" label="手机号" requiredAfter labelWidth="140rpx" required>
<input placeholder="点击输入" class="input" type="number" maxlength="11" placeholder-class="placeholder-class" value="{{orderObj.owner.phone}}" bindinput="input" data-name="owner.phone" disabled="{{orderObj.orderSource == 5||orderObj.orderSource == 6}}" always-embed></input>
</gl-cell>
</view>
<gl-cell border valueAlign="right" label="车架号( VIN码 )" labelWidth="240rpx">
<input placeholder="点击输入" class="input" placeholder-class="placeholder-class" value="{{orderObj.owner.carVin}}" bindinput="input" data-name="customer.carVin" maxlength="17" always-embed></input>
</gl-cell>
<gl-cell border valueAlign="right" label="身份证号" labelWidth="240rpx">
<input placeholder="点击输入" class="input" placeholder-class="placeholder-class" value="{{orderObj.owner.certificateNo}}" bindinput="input" data-name="customer.certificateNo" maxlength="20" always-embed></input>
</gl-cell>
<!-- <gl-cell border label="是否体验" valueAlign="right" labelWidth="140rpx">
<view class="gender-box">
<view class="block text-center {{orderObj.customer.experienceFlag=='Y'?'':'right'}}" />
<view class="male text-center {{orderObj.customer.experienceFlag == 'Y'?'active':''}}" bindtap="changeExperience" data-experience="Y">
......@@ -40,30 +40,21 @@
</view>
</view>
</gl-cell> -->
<view class="remark_box">
<view class="label">订单备注</view>
<view class="textArea_box">
<textarea value="{{orderObj.notes}}" placeholder="请输入" class="textarea" bindinput="remarkInput" />
<view class="currentWordNumber">{{currentWordNumber || 0}} / 100</view>
</view>
</view>
</view>
</view>
<view class="btns {{isFullSucreen?'isFullSucreen-btn':''}}">
<!-- <text class="tips x-center">客户信息仅支持修改以上部分。</text> -->
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
<view class="btns-con">
<view class="save text-center"
data-giveUp="{{true}}"
bindtap="submit"
data-save data-save>放弃</view>
<view class="confirm text-center" bindtap="submit">提交修改</view>
</view>
</view>
<remark-popup
wx:if="{{showRemark}}"
show="{{showRemark}}"
bindconfirm="remarkConfirm"
placeholder="请填写内容,最多30个字"
maxlength="30"
value="{{orderObj.remark}}" />
<view class="remark_box">
<view class="label">订单备注</view>
<view class="textArea_box">
<textarea value="{{orderObj.notes}}" placeholder="请输入" class="textarea" bindinput="remarkInput" />
<view class="currentWordNumber">{{currentWordNumber || 0}} / 100</view>
</view>
</view>
</view>
</view>
<view class="btns {{isFullSucreen?'isFullSucreen-btn':''}}">
<!-- <text class="tips x-center">客户信息仅支持修改以上部分。</text> -->
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
<view class="btns-con">
<view class="save text-center" data-giveUp="{{true}}" bindtap="submit" data-save data-save>放弃</view>
<view class="confirm text-center" bindtap="submit">提交修改</view>
</view>
</view>
<remark-popup wx:if="{{showRemark}}" show="{{showRemark}}" bindconfirm="remarkConfirm" placeholder="请填写内容,最多30个字" maxlength="30" value="{{orderObj.remark}}" />
\ No newline at end of file
......@@ -4,78 +4,27 @@
"miniprogram": {
"list": [
{
<<<<<<< HEAD
"name": "个人中心",
"pathName": "pages/tabMine/pages/index/index",
=======
"name": "技师设置",
"pathName": "tabMine/pages/technicianSetup/technicianSetup",
>>>>>>> a6d09dbf096e7ca9edfd223c82da4a502f034061
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "权益修改客户信息",
"pathName": "packageEquity/pages/carQuotation/updateOrderInfo/updateOrderInfo",
"query": "id=1912",
"launchMode": "default",
"scene": null
},
{
"name": "2.1订单下单",
"pathName": "packageEquity/pages/carQuotation/createOrderCarQuotationSimple/createOrderCarQuotationSimple",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "2.1 订单支付",
"pathName": "packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "2.1 列表",
"pathName": "packageEquity/pages/TabBar/equityPage",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "2.1 支付",
"pathName": "packageEquity/pages/carQuotation/CarQuotationPay/CarQuotationPay",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "选择账号",
"pathName": "pages/accountItems/accountItems",
"name": "技师设置",
"pathName": "tabMine/pages/technicianSetup/technicianSetup",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "login",
"pathName": "pages/wxLogin/wxLogin",
"name": "1.1 列表",
"pathName": "pages/tabWorkOrder/pages/index/index",
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "订单详情",
"pathName": "tabWorkOrder/pages/constructionOrderDetail/constructionOrderDetail",
"query": "orderCode=2206221654033208",
"launchMode": "default",
"scene": null
}
]
}
},
"libVersion": "3.0.0",
"setting": {
"urlCheck": false
}
}
\ No newline at end of file
// tabMine/pages/completeBuild/completeBuild.js
import api from '../../api.js'
import {
ImgUrl
ImgUrl
} from '~/config';
const app = getApp()
Page({
/**
* 页面的初始数据
*/
data: {
IMG_URL: ImgUrl,
isYqdSuper: '',
tipsProps: {
tipsText: '小程序下单后,驻店员工需让客户在订单中签名确认订单,才可完结为最终施工单',
showTips: true,
type: 1
},
/**
* 页面的初始数据
*/
data: {
IMG_URL: ImgUrl,
isYqdSuper: '',
tipsProps: {
tipsText: '小程序下单后,驻店员工需让客户在订单中签名确认订单,才可完结为最终施工单',
showTips: true,
type: 1
},
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getMerchantConfiguration()
this.setData({
isYqdSuper: app.globalData.isYqdSuper,
})
},
/**
* 生命周期函数--监听页面加载
*/
onLoad(options) {
this.getMerchantConfiguration()
this.setData({
isYqdSuper: app.globalData.isYqdSuper,
})
},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面初次渲染完成
*/
onReady() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面显示
*/
onShow() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面隐藏
*/
onHide() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
onPullDownRefresh() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 页面上拉触底事件的处理函数
*/
onReachBottom() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
/**
* 用户点击右上角分享
*/
onShareAppMessage() {},
// 获取商户配置
getMerchantConfiguration() {
let {
saturdayFlag
} = this.data
let {
merchantId
} = wx.$util.getUserInfo()
api.getMerchantConfiguration({
merchantId,
sceneType: '1'
}).then(res => {
let {
code,
data
} = res
if (code == '0') {
if (data) {
saturdayFlag = data.signatureSwitch ? true : false
}
} else {
this.showToast(message)
}
this.setData({
saturdayFlag
})
})
},
// 获取商户配置
getMerchantConfiguration() {
let {
saturdayFlag
} = this.data
let {
shopMerchantId: merchantId
} = wx.$util.getUserInfo()
api.getMerchantConfiguration({
merchantId,
sceneType: '1'
}).then(res => {
let {
code,
data
} = res
if (code == '0') {
if (data) {
saturdayFlag = data.signatureSwitch ? true : false
}
} else {
this.showToast(message)
}
this.setData({
saturdayFlag
})
})
},
//是否开启电子签名
changeSwitch(e) {
let {
userInfo
} = this.data
if (userInfo.userType == 2) return
console.log('e', e);
let {
value
} = e.detail
let {
target
} = e.currentTarget.dataset
this.setData({
[target]: value
})
this.updateSignatureConfiguration()
},
//是否开启电子签名
changeSwitch(e) {
let {
userInfo
} = this.data
if (userInfo.userType == 2) return
console.log('e', e);
let {
value
} = e.detail
let {
target
} = e.currentTarget.dataset
this.setData({
[target]: value
})
this.updateSignatureConfiguration()
},
// 修改配置
updateSignatureConfiguration() {
let {
saturdayFlag
} = this.data
let {
merchantId
} = wx.$util.getUserInfo()
let signatureSwitch = saturdayFlag ? 1 : 0
api.updateSignatureConfiguration({
merchantId,
sceneType: '1',
signatureSwitch
}).then(res => {
let {
code,
data
} = res
if (code == '0') {
console.log('data', data);
} else {
this.showToast(message)
}
})
},
// 修改配置
updateSignatureConfiguration() {
let {
saturdayFlag
} = this.data
let {
shopMerchantId: merchantId
} = wx.$util.getUserInfo()
let signatureSwitch = saturdayFlag ? 1 : 0
api.updateSignatureConfiguration({
merchantId,
sceneType: '1',
signatureSwitch
}).then(res => {
let {
code,
data
} = res
if (code == '0') {
console.log('data', data);
} else {
this.showToast(message)
}
})
},
})
\ No newline at end of file
......@@ -28,11 +28,24 @@ Page({
this.getList(true)
},
addTechnicalItem() {
let {
technicianList,
userInfo
} = this.data
if (userInfo.userType == 2) return
// 默认添加离开弹框 提交成功后取消
wx.enableAlertBeforeUnload &&
wx.enableAlertBeforeUnload({
title: '温馨提示',
message: '技师信息未提交,请提交后返回',
success: function (res) {
console.log('成功:', res)
},
fail: function (err) {
console.log('失败:', err)
}
})
technicianList.unshift({
staffName: '',
staffPhone: '',
......@@ -65,11 +78,11 @@ Page({
} = this.data
let params = wx.$util.deepClone(technicianList[index])
if (!params.staffName) {
wx.$util.showToast('请输入姓名')
return wx.$util.showToast('请输入姓名')
}
const phoneRex = /^[1]([3-9])[0-9]{9}$/
if (!params.staffPhone || !phoneRex.test(params.staffPhone)) {
wx.$util.showToast('请输入正确手机号')
return wx.$util.showToast('请输入正确手机号')
}
params.technicianName = params.staffName
params.technicianPhone = params.staffPhone
......@@ -92,9 +105,15 @@ Page({
} = res
if (code == 0) {
wx.$util.showToast(params.id ? '修改成功' : '新增成功')
technicianList[index].isEdit = false
this.setData({
[`technicianList[${index}].isEdit`]: false
})
// let {}
debugger
let isAllEdit = technicianList.every(item => !item.isEdit)
isAllEdit && wx.disableAlertBeforeUnload()
} else {
wx.$util.showToast(message)
}
......@@ -249,14 +268,14 @@ Page({
* 生命周期函数--监听页面隐藏
*/
onHide() {
// wx.disableAlertBeforeUnload()
},
/**
* 生命周期函数--监听页面卸载
*/
onUnload() {
// console.log(onUnload);
},
/**
......
......@@ -79,6 +79,8 @@ page {
background: #FFFFFF;
border: 2rpx solid #DEE0E3;
border-radius: 12rpx;
margin-left: 12rpx;
margin-right: auto;
}
.btn {
......@@ -113,11 +115,12 @@ page {
font-size: 20rpx;
background: #EAF1FF;
border: 1rpx solid #347bff80;
padding: 4rpx 16rpx;
padding: 4rpx 14rpx;
font-family: PingFangSC-SNaNrpxibold;
font-weight: 600;
font-size: 20rpx;
color: #347BFF;
border-radius: 4rpx;
}
}
......@@ -147,6 +150,6 @@ page {
color: #BEC1C7;
}
.disabled {
.disabled {
opacity: .5;
}
\ No newline at end of file
......@@ -5,7 +5,7 @@
<view class="merchantNameCon">
<view class="name">{{userInfo.merchantName}}</view>
<view class="addIcon {{userInfo.userType == 2 ?'disabled':''}}" bind:tap="addTechnicalItem">
<image class="icon-plus" src="{{IMG_URL}}/miniProgram/icon-plus.png" />
<image class="icon-plus" src="{{IMG_URL}}/miniProgram/iconBoldPlus.png" />
技师
</view>
</view>
......
......@@ -476,7 +476,8 @@
</view>
</block>
<view class="addBtn" bindtap="addUserItem" id="addBtn" wx:if="{{ notUpgradeOrderList.length < 10 }}">
<image class="addIcon" src="../../images/addIcon.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" />
<!-- <image class="addIcon" src="../../images/addIcon.png" mode="scaleToFill|aspectFit|aspectFill|widthFix" /> -->
<image class="addIcon" src="{{IMG_URL}}/miniProgram/iconBoldPlus.png" />
<text class="text">新增客户<text class="customerNum">(已有{{notUpgradeOrderList.length?notUpgradeOrderList.length:''}}个)</text></text>
</view>
</scroll-view>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!