Commit 233b64b7 by 张立顺

feat 质保价格和最低价格检验功能开发

1 parent acefcac6
/* packageEquity/pages/TabBar/equityPage.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -195,7 +195,20 @@ Page({ ...@@ -195,7 +195,20 @@ Page({
_userPortrait.push(item.optionList.find(k => k.confId == n).confName) _userPortrait.push(item.optionList.find(k => k.confId == n).confName)
}) })
} else { } else {
_userPortrait.push(item.optionList.find(k => k.confId == info[item.name])?.otherName || item.optionList.find(k => k.confId == info[item.name])?.confName) // _userPortrait.push(item.optionList.find(k => k.confId == info[item.name])?.otherName || item.optionList.find(k => k.confId == info[item.name])?.confName)
let labelName = item.optionList.find((k) => k.confId == info[item.name])
if (labelName?.label) {
_userPortrait.push(
labelName?.otherName ||
labelName?.confName + ' ' + labelName?.label
);
} else {
_userPortrait.push(
labelName?.otherName ||
labelName?.confName
);
}
} }
} }
} }
......
...@@ -44,6 +44,88 @@ const maritalStatus = [ ...@@ -44,6 +44,88 @@ const maritalStatus = [
confName: '未婚' confName: '未婚'
} }
] ]
// "职业(1:公务员(公检法),2:医生,3:教师,4:老板,5:律师,6:企业高管,7:IT/工程师,8:公司职员,9:其他")
const career = [
{
confId: '1',
confName: '公务员(公检法)'
},
{
confId: '2',
confName: '医生'
},
{
confId: '3',
confName: '教师'
},
{
confId: '4',
confName: '老板'
},
{
confId: '5',
confName: '律师'
},
{
confId: '6',
confName: '企业高管'
},
{
confId: '7',
confName: 'IT/工程师'
},
{
confId: '8',
confName: '公司职员'
},
{
confId: '9',
confName: '其他'
},
]
// (1:S 爽快型,2:K 侃价型,3:Y 依赖型,4:W 无语型,5:O 偶伴型,6:R 认捧型,7:T 挑剔型,8:H 好奇型")
const personality = [
{
confId: '1',
confName: 'S 爽快型',
label: '冲动、承担风险'
},
{
confId: '2',
confName: 'K 侃价型',
label: '谨慎、避免损失'
},
{
confId: '3',
confName: 'Y 依赖型',
label: '顺从别人'
},
{
confId: '4',
confName: 'W 无语型',
label: '内向、避免损失'
},
{
confId: '5',
confName: '0 偶伴型',
label: '避免损失、集体决策'
},
{
confId: '6',
confName: 'R 认捧型',
label: '寻求认同'
},
{
confId: '7',
confName: 'T 挑剔型',
label: '谨慎、避免损失'
},
{
confId: '8',
confName: 'H 好奇型',
label: '追求新奇'
},
]
const giftProduct = [ const giftProduct = [
{ {
confId: '1', confId: '1',
...@@ -179,14 +261,30 @@ var formData = [ ...@@ -179,14 +261,30 @@ var formData = [
optionsName: 'maritalStatus' optionsName: 'maritalStatus'
}, },
{ {
label: '附赠产品(每类产品只支持选一个选项)', label: '职业',
name: 'giftProductList', name: 'career',
isMult: true, optionList: career,
optionList: giftProduct,
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'sexList' optionsName: 'career'
}, },
{
label: '性格类型',
name: 'personality',
optionList: personality,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'personality'
},
// {
// label: '附赠产品(每类产品只支持选一个选项)',
// name: 'giftProductList',
// isMult: true,
// optionList: giftProduct,
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'sexList'
// },
{ {
label: '买车情况(单选)', label: '买车情况(单选)',
...@@ -253,5 +351,7 @@ export default { ...@@ -253,5 +351,7 @@ export default {
promoteList, promoteList,
satisfiedList, satisfiedList,
timeList, timeList,
formData formData,
career,
personality
} }
...@@ -34,17 +34,6 @@ ...@@ -34,17 +34,6 @@
catchinput="input" catchinput="input"
/> />
</view> </view>
<!-- <view class="fixed-remark">
<gl-textarea
value="{{value}}"
show="{{show}}"
bindinput="blur"
maxlength="{{maxlength}}"
placeholder="{{placeholder || '请输入'}}"
isLimitNum="{{isLimitNum}}"
isInt="{{isInt}}"
customMaxLength></gl-textarea>
</view> -->
</view> </view>
<view class="fixed-footer"> <view class="fixed-footer">
<view class="fixed-cancel text-center" bindtap="showPopup" data-btnName="cancel" data-name="passwordPop">取消</view> <view class="fixed-cancel text-center" bindtap="showPopup" data-btnName="cancel" data-name="passwordPop">取消</view>
......
/* pages/sceneIndex/sceneIndex.wxss */
\ No newline at end of file \ No newline at end of file
/* pages/sceneIndex/sceneIndex.wxss */
\ No newline at end of file \ No newline at end of file
...@@ -106,7 +106,7 @@ Page({ ...@@ -106,7 +106,7 @@ Page({
}); });
} }
}, },
error: () => {}, error: () => { },
}, },
"#modal2" "#modal2"
); );
...@@ -202,12 +202,18 @@ Page({ ...@@ -202,12 +202,18 @@ Page({
); );
}); });
} else { } else {
let labelName = item.optionList.find((k) => k.confId == info[item.name])
if (labelName?.label) {
_userPortrait.push( _userPortrait.push(
item.optionList.find((k) => k.confId == info[item.name]) labelName?.otherName ||
?.otherName || labelName?.confName + ' ' + labelName?.label
item.optionList.find((k) => k.confId == info[item.name])
?.confName
); );
} else {
_userPortrait.push(
labelName?.otherName ||
labelName?.confName
);
}
} }
} }
} }
...@@ -263,8 +269,7 @@ Page({ ...@@ -263,8 +269,7 @@ Page({
}); });
} }
if (detail.carSeriesName) if (detail.carSeriesName)
detail.carType = `${detail.carBrand}-${ detail.carType = `${detail.carBrand}-${detail.carChildsBrandName || ""
detail.carChildsBrandName || ""
}-${detail.carSeriesName}`; }-${detail.carSeriesName}`;
if (detail.customerCoupon.createdDate) if (detail.customerCoupon.createdDate)
detail.time = new Date(detail.customerCoupon.createdDate).format( detail.time = new Date(detail.customerCoupon.createdDate).format(
...@@ -389,7 +394,7 @@ Page({ ...@@ -389,7 +394,7 @@ Page({
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady: function () {}, onReady: function () { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
...@@ -404,25 +409,25 @@ Page({ ...@@ -404,25 +409,25 @@ Page({
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide: function () {}, onHide: function () { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload: function () {}, onUnload: function () { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh: function () {}, onPullDownRefresh: function () { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom: function () {}, onReachBottom: function () { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () {}, onShareAppMessage: function () { },
}); });
...@@ -44,6 +44,88 @@ const maritalStatus = [ ...@@ -44,6 +44,88 @@ const maritalStatus = [
confName: '未婚' confName: '未婚'
} }
] ]
// "职业(1:公务员(公检法),2:医生,3:教师,4:老板,5:律师,6:企业高管,7:IT/工程师,8:公司职员,9:其他")
const career = [
{
confId: '1',
confName: '公务员(公检法)'
},
{
confId: '2',
confName: '医生'
},
{
confId: '3',
confName: '教师'
},
{
confId: '4',
confName: '老板'
},
{
confId: '5',
confName: '律师'
},
{
confId: '6',
confName: '企业高管'
},
{
confId: '7',
confName: 'IT/工程师'
},
{
confId: '8',
confName: '公司职员'
},
{
confId: '9',
confName: '其他'
},
]
// (1:S 爽快型,2:K 侃价型,3:Y 依赖型,4:W 无语型,5:O 偶伴型,6:R 认捧型,7:T 挑剔型,8:H 好奇型")
const personality = [
{
confId: '1',
confName: 'S 爽快型',
label: '冲动、承担风险'
},
{
confId: '2',
confName: 'K 侃价型',
label: '谨慎、避免损失'
},
{
confId: '3',
confName: 'Y 依赖型',
label: '顺从别人'
},
{
confId: '4',
confName: 'W 无语型',
label: '内向、避免损失'
},
{
confId: '5',
confName: '0 偶伴型',
label: '避免损失、集体决策'
},
{
confId: '6',
confName: 'R 认捧型',
label: '寻求认同'
},
{
confId: '7',
confName: 'T 挑剔型',
label: '谨慎、避免损失'
},
{
confId: '8',
confName: 'H 好奇型',
label: '追求新奇'
},
]
const giftProduct = [ const giftProduct = [
{ {
confId: '1', confId: '1',
...@@ -179,14 +261,30 @@ var formData = [ ...@@ -179,14 +261,30 @@ var formData = [
optionsName: 'maritalStatus' optionsName: 'maritalStatus'
}, },
{ {
label: '附赠产品(每类产品只支持选一个选项)', label: '职业',
name: 'giftProductList', name: 'career',
isMult: true, optionList: career,
optionList: giftProduct,
optionId: 'confId', optionId: 'confId',
optionLabel: 'confName', optionLabel: 'confName',
optionsName: 'sexList' optionsName: 'career'
}, },
{
label: '性格类型',
name: 'personality',
optionList: personality,
optionId: 'confId',
optionLabel: 'confName',
optionsName: 'personality'
},
// {
// label: '附赠产品(每类产品只支持选一个选项)',
// name: 'giftProductList',
// isMult: true,
// optionList: giftProduct,
// optionId: 'confId',
// optionLabel: 'confName',
// optionsName: 'sexList'
// },
{ {
label: '买车情况(单选)', label: '买车情况(单选)',
...@@ -253,5 +351,7 @@ export default { ...@@ -253,5 +351,7 @@ export default {
promoteList, promoteList,
satisfiedList, satisfiedList,
timeList, timeList,
formData formData,
career,
personality
} }
...@@ -11,13 +11,14 @@ Page({ ...@@ -11,13 +11,14 @@ Page({
detailForm: { detailForm: {
additionalInformation: '' additionalInformation: ''
}, },
customerSex:1 customerSex: 1
}, },
click(e) { click(e) {
let { pidx, idx } = e.currentTarget.dataset let { pidx, idx } = e.currentTarget.dataset
let { formData } = this.data let { formData } = this.data
let _item = formData[pidx] let _item = formData[pidx]
let _active = formData[pidx].optionList[idx].active let _active = formData[pidx].optionList[idx].active
// debugger
if (!_item.isMult) { if (!_item.isMult) {
this.setData({ this.setData({
[`formData[${pidx}].optionList`]: JSON.parse(JSON.stringify(CONSTANTDATA[_item.optionsName])) [`formData[${pidx}].optionList`]: JSON.parse(JSON.stringify(CONSTANTDATA[_item.optionsName]))
...@@ -25,10 +26,10 @@ Page({ ...@@ -25,10 +26,10 @@ Page({
} }
// 赙赠产品 每类只能二选一 // 赙赠产品 每类只能二选一
if (_item.name == 'giftProductList' ) { if (_item.name == 'giftProductList') {
const noActiveIdx = idx % 2 == 0? idx+1:idx-1 const noActiveIdx = idx % 2 == 0 ? idx + 1 : idx - 1
this.setData({ this.setData({
[`formData[${pidx}].optionList[${noActiveIdx}].active`]:false [`formData[${pidx}].optionList[${noActiveIdx}].active`]: false
}) })
} }
...@@ -46,15 +47,15 @@ Page({ ...@@ -46,15 +47,15 @@ Page({
}, },
async recoverPortrait(id) { async recoverPortrait(id) {
let {code,data:info} = await api.portraitQuery({id}) let { code, data: info } = await api.portraitQuery({ id })
console.log(info); console.log(info);
if (code!= 0 ) return if (code != 0) return
let { formData } = this.data let { formData } = this.data
formData.forEach(item => { formData.forEach(item => {
if (info[item.name]) { if (info[item.name]) {
if (item.isMult) { if (item.isMult) {
console.log(item.name,info[item.name],'info[item.name]'); console.log(item.name, info[item.name], 'info[item.name]');
// let _list = info[item.name].split(',') // let _list = info[item.name].split(',')
let _list = info[item.name] let _list = info[item.name]
_list.forEach(n => { _list.forEach(n => {
...@@ -66,7 +67,7 @@ if (code!= 0 ) return ...@@ -66,7 +67,7 @@ if (code!= 0 ) return
// } // }
} else { } else {
if (item.name == 'customerSex') { if (item.name == 'customerSex') {
let {customerSex} = this.data let { customerSex } = this.data
item.optionList.find(k => k.confId == customerSex).active = true item.optionList.find(k => k.confId == customerSex).active = true
} }
} }
...@@ -77,19 +78,19 @@ if (code!= 0 ) return ...@@ -77,19 +78,19 @@ if (code!= 0 ) return
}, },
reset() { reset() {
let {formData} = this.data let { formData } = this.data
formData.forEach(item => { formData.forEach(item => {
// console.log(item?.optionList,'item?.optionList'); // console.log(item?.optionList,'item?.optionList');
// if(item.isMult) params[item.name] = [] // if(item.isMult) params[item.name] = []
if (item.name!='customerSex') { if (item.name != 'customerSex') {
item?.optionList?.forEach(subItem => { item?.optionList?.forEach(subItem => {
subItem.active = false subItem.active = false
}) })
} }
}) })
console.log(formData,'formData'); console.log(formData, 'formData');
this.setData({ this.setData({
formData formData
}) })
...@@ -100,10 +101,10 @@ if (code!= 0 ) return ...@@ -100,10 +101,10 @@ if (code!= 0 ) return
let params = {} let params = {}
formData.forEach(item => { formData.forEach(item => {
// console.log(item?.optionList,'item?.optionList'); // console.log(item?.optionList,'item?.optionList');
if(item.isMult) params[item.name] = [] if (item.isMult) params[item.name] = []
item?.optionList?.forEach(subItem => { item?.optionList?.forEach(subItem => {
if (subItem.active) { if (subItem.active) {
item.isMult? params[item.name].push(subItem.confId):( params[item.name] = subItem.confId) item.isMult ? params[item.name].push(subItem.confId) : (params[item.name] = subItem.confId)
} }
}) })
}) })
...@@ -150,7 +151,7 @@ if (code!= 0 ) return ...@@ -150,7 +151,7 @@ if (code!= 0 ) return
}, },
onRoute(options) { onRoute(options) {
console.log(options); console.log(options);
const {customerId,customer} = options const { customerId, customer } = options
// let detail = { // let detail = {
// ...options.customerCoupon, // ...options.customerCoupon,
// ...options.customer, // ...options.customer,
...@@ -158,7 +159,7 @@ if (code!= 0 ) return ...@@ -158,7 +159,7 @@ if (code!= 0 ) return
// } // }
this.setData({ this.setData({
customerId, customerId,
customerSex:customer?.customerSex||1 customerSex: customer?.customerSex || 1
}) })
console.log(customerId, 'customerId') console.log(customerId, 'customerId')
this.recoverPortrait(customerId) this.recoverPortrait(customerId)
...@@ -166,35 +167,35 @@ if (code!= 0 ) return ...@@ -166,35 +167,35 @@ if (code!= 0 ) return
/** /**
* 生命周期函数--监听页面初次渲染完成 * 生命周期函数--监听页面初次渲染完成
*/ */
onReady() {}, onReady() { },
/** /**
* 生命周期函数--监听页面显示 * 生命周期函数--监听页面显示
*/ */
onShow() {}, onShow() { },
/** /**
* 生命周期函数--监听页面隐藏 * 生命周期函数--监听页面隐藏
*/ */
onHide() {}, onHide() { },
/** /**
* 生命周期函数--监听页面卸载 * 生命周期函数--监听页面卸载
*/ */
onUnload() {}, onUnload() { },
/** /**
* 页面相关事件处理函数--监听用户下拉动作 * 页面相关事件处理函数--监听用户下拉动作
*/ */
onPullDownRefresh() {}, onPullDownRefresh() { },
/** /**
* 页面上拉触底事件的处理函数 * 页面上拉触底事件的处理函数
*/ */
onReachBottom() {}, onReachBottom() { },
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage() {} onShareAppMessage() { }
}) })
...@@ -6,8 +6,9 @@ ...@@ -6,8 +6,9 @@
<textarea type="text" placeholder="{{item.placeholder || '请输入' + item.label}}" maxlength="{{item.maxlength}}" class="input" value="{{detailForm[item.name]}}" placeholder-class="input-placeholder" data-attr="{{item.name}}" bindinput="handleInput" /> <textarea type="text" placeholder="{{item.placeholder || '请输入' + item.label}}" maxlength="{{item.maxlength}}" class="input" value="{{detailForm[item.name]}}" placeholder-class="input-placeholder" data-attr="{{item.name}}" bindinput="handleInput" />
</view> </view>
<view wx:if="{{item.optionList}}" class="check-block"> <view wx:if="{{item.optionList}}" class="check-block">
<view class="check-box {{subItem.active ? 'active' : ''}}" wx:for="{{item.optionList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" bindtap="click" data-pidx="{{index}}" data-idx="{{idx}}"> <view class="check-box {{subItem.active ? 'active' : ''}} {{subItem.label?'labelText':''}}" wx:for="{{item.optionList}}" wx:for-item="subItem" wx:for-index="idx" wx:key="idx" bindtap="click" data-pidx="{{index}}" data-idx="{{idx}}">
{{subItem.confName}} <view class="labelTextName"> {{subItem.confName}}</view>
<view class="labelTextName labelTextNameColor">{{subItem.label}}</view>
<image wx:if="{{item.isMult && subItem.active}}" class="mult" src="../../images/check-active.png"></image> <image wx:if="{{item.isMult && subItem.active}}" class="mult" src="../../images/check-active.png"></image>
</view> </view>
</view> </view>
......
...@@ -33,6 +33,25 @@ ...@@ -33,6 +33,25 @@
margin-right: var(--fontSize20); margin-right: var(--fontSize20);
} }
.user-portrait .labelText {
height: var(--fontSize100);
display: flex;
flex-wrap: wrap;
flex-direction: column;
justify-content: center;
color: #292D33;
}
.user-portrait .labelText .labelTextName {
line-height: var(--fontSize32);
}
.user-portrait .labelText .labelTextNameColor {
/* line-height: var(--fontSize32); */
font-size: var(--fontSize20);
color: #999EA8;
}
.user-portrait .check-box.active { .user-portrait .check-box.active {
background: #347BFF14; background: #347BFF14;
border: var(--fontSize2) solid #347BFF; border: var(--fontSize2) solid #347BFF;
......
...@@ -234,4 +234,9 @@ module.exports = { ...@@ -234,4 +234,9 @@ module.exports = {
// params.payType = 1 // params.payType = 1
return api.post("dj.api.smartcarlife.weapp.waitinputorder.count", params); return api.post("dj.api.smartcarlife.weapp.waitinputorder.count", params);
}, },
/** 质保价格编辑接口 */
modifyWarrantyPrice(data) {
return api.post("dj.api.smartcarlife.customer.warrantyCard.modifyWarrantyPrice", data);
},
}; };
...@@ -29,6 +29,7 @@ Page({ ...@@ -29,6 +29,7 @@ Page({
showRatingPopup: false, showRatingPopup: false,
showRatingCard: true, // 显示评价卡片 showRatingCard: true, // 显示评价卡片
isMake: true, isMake: true,
warrantyEditObj: {}
}, },
RatingPopupSetting() { RatingPopupSetting() {
this.setData({ this.setData({
...@@ -45,6 +46,60 @@ Page({ ...@@ -45,6 +46,60 @@ Page({
selectTypeOrder: type, selectTypeOrder: type,
}); });
}, },
blur(e) {
console.log(e)
let { value } = e.detail
// let { shortcutList } = this.data
value = value.substring(0, 50)
// if (!value) {
// shortcutList.map(i => (i.active = false))
// }
this.setData({
['warrantyEditObj.warrantyPrice']: value,
// shortcutList,
focus: false
})
},
// 确定是否要显示
showWarranty(e) {
let { item } = e.currentTarget.dataset;
this.setData({
warrantyEditObj: item,
focus: true
})
wx.$modal(
this,
{
show: true,
title: '',
tabTitleShow: false,
success: (res) => {
let { orderCode } = this.data
api.modifyWarrantyPrice({ ...this.data.warrantyEditObj }).then((result) => {
wx.$util.showToast('更新成功')
this.getOrderDetail(orderCode);
}).catch((err) => {
});
// 跳转新增订单页面 并带特定参数
// let { selectType } = this.data;
// if (selectType == 1) {
// wx.$router.go("tabWorkOrder.createOrder", {
// scene,
// ...item,
// });
// } else {
// wx.$router.go("tabWorkOrder.defeatOrder", {
// scene,
// ...item,
// });
// }
},
error: () => { },
},
"#modal4"
);
},
// 确定是否要显示 // 确定是否要显示
showSelectTypeOrder({ scene = "", item = {} }) { showSelectTypeOrder({ scene = "", item = {} }) {
let { orderInfo } = this.data; let { orderInfo } = this.data;
...@@ -370,6 +425,7 @@ Page({ ...@@ -370,6 +425,7 @@ Page({
warrantyPeriod: e.upgradeWarrantyPeriod, warrantyPeriod: e.upgradeWarrantyPeriod,
goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName, goodsName: e.upgradeGoodsAlias || e.upgradeGoodsName,
cardCode: e.cardCode, cardCode: e.cardCode,
warrantyPrice: e.warrantyPrice
}); });
} }
} }
......
...@@ -790,6 +790,54 @@ page { ...@@ -790,6 +790,54 @@ page {
border: 2rpx solid #347BFF; border: 2rpx solid #347BFF;
color: #3582EE; color: #3582EE;
} }
.modatcontent {
padding: 50rpx var(--fontSize48) 32rpx;
}
.textarea {
background: #F7F7F7;
border: var(--fontSize1) solid #C3C3C3;
border-radius: var(--fontSize12);
// width: calc(100% - var(--fontSize80));
width: 100%;
height: var(--fontSize240);
box-sizing: border-box;
margin: 0 auto var(--fontSize12);
padding: var(--fontSize25) 0;
font-size: var(--fontSize28);
color: #333333;
}
.title {
font-weight: 500;
font-size: 32rpx;
color: #292D33;
text-align: center;
margin-bottom: 32rpx
}
.productName {
font-weight: 400;
font-size: 30rpx;
color: #5A5E66;
text-align: center;
margin-bottom: 32rpx
}
.label {
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 30rpx;
color: #5A5E66;
margin-bottom: 16rpx
}
.tips {
font-weight: 400;
font-size: 24rpx;
color: #999EA8;
}
} }
.meal-box { .meal-box {
...@@ -871,63 +919,30 @@ page { ...@@ -871,63 +919,30 @@ page {
margin-left: var(--fontSize12); margin-left: var(--fontSize12);
} }
.modal text, .modatcontentOrder {
.modal { padding: 30rpx 50rpx;
font-size: var(--fontSize28);
color: #333333;
}
.modal .orderCode {
margin-bottom: var(--fontSize20);
}
.modal .code {
color: #888888;
} }
.modal .color { .editIcon {
color: #F24724; margin-left: auto;
width: 32rpx;
height: 32rpx;
} }
.modal { .warranty-name {
.icon { display: flex;
width: 96rpx; align-items: center;
height: 96rpx;
margin-right: 30rpx;
}
.modalbox { .right {
display: flex; display: flex;
align-items: center; align-items: center;
box-sizing: border-box; margin-left: auto;
width: 522rpx; justify-content: center;
height: 136rpx;
background: #F7F8FA;
border-radius: 8rpx;
font-family: PingFangSC-Medium;
font-weight: 500;
font-size: 28rpx;
color: #292D33;
padding-left: 24rpx;
margin: 0 auto;
&+.modalbox { .warranty-price {
margin-top: 16rpx; margin-left: 8rpx;
font-size: 28rpx;
color: #347BFF;
} }
} }
.act {
background: #347bff1a;
border: 2rpx solid #347BFF;
color: #3582EE;
}
}
.modatcontent {
box-sizing: border-box;
padding: var(--fontSize48) 0;
}
.modatcontentOrder {
padding: 30rpx 50rpx;
} }
\ No newline at end of file \ No newline at end of file
...@@ -67,9 +67,7 @@ ...@@ -67,9 +67,7 @@
<view class="price">¥{{item.price}}</view> <view class="price">¥{{item.price}}</view>
</view> </view>
<view class="subItem_box"> <view class="subItem_box">
<view <view style="{{ !orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;' }}">
style="{{ !orderInfo.isOpenArtificer || !item.upgradeGoodsPosition ? 'display: flex; justify-content: space-between; width: 100%;' : 'display: flex;' }}"
>
<view class="position"> <view class="position">
{{item.positionStr || item.upgradeGoodsTypeName}} {{item.positionStr || item.upgradeGoodsTypeName}}
<text class="type">x{{item.number}}</text> <text class="type">x{{item.number}}</text>
...@@ -140,14 +138,7 @@ ...@@ -140,14 +138,7 @@
<view class="cell"> <view class="cell">
<view class="label">付款凭证</view> <view class="label">付款凭证</view>
<view class="image-box"> <view class="image-box">
<view <view class="value" bindtap="previewImage" wx:for="{{ orderInfo.payVoucherList }}" wx:key="index" data-index="{{ index }}" data-url="{{ orderInfo.payVoucherList }}">
class="value"
bindtap="previewImage"
wx:for="{{ orderInfo.payVoucherList }}"
wx:key="index"
data-index="{{ index }}"
data-url="{{ orderInfo.payVoucherList }}"
>
<view class="image"> <view class="image">
<image src="{{ item.payVoucher }}" /> <image src="{{ item.payVoucher }}" />
</view> </view>
...@@ -163,18 +154,11 @@ ...@@ -163,18 +154,11 @@
<view class="title userTitle"> <view class="title userTitle">
<view>客户信息</view> <view>客户信息</view>
<!-- 已退款或已开票不可修改客户任何信息 --> <!-- 已退款或已开票不可修改客户任何信息 -->
<view <view bindtap="jumpUserPortrait" class="updateInfo icon {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ||!isMake? 'isHide' : '' }}">
bindtap="jumpUserPortrait"
class="updateInfo icon {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ||!isMake? 'isHide' : '' }}"
>
<image src="{{ IMG_URL }}miniProgram/custom_portrait_icon.png" class="iconImage"></image> <image src="{{ IMG_URL }}miniProgram/custom_portrait_icon.png" class="iconImage"></image>
画像 画像
</view> </view>
<view <view wx:if="{{ isYqdSuper||isStaff }}" bindtap="jumpUpdate" class="updateInfo {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ||!isMake? 'isHide' : '' }}">
wx:if="{{ isYqdSuper||isStaff }}"
bindtap="jumpUpdate"
class="updateInfo {{ orderInfo.status == 12 || orderInfo.invoiceStatus == 2 ||!isMake? 'isHide' : '' }}"
>
<image src="{{ IMG_URL }}miniProgram/edit_icon.png" class="iconImage"></image> <image src="{{ IMG_URL }}miniProgram/edit_icon.png" class="iconImage"></image>
客户信息 客户信息
</view> </view>
...@@ -238,7 +222,15 @@ ...@@ -238,7 +222,15 @@
<view class="warranty-box"> <view class="warranty-box">
<block wx:for="{{ warrantyCardList }}" wx:key="index"> <block wx:for="{{ warrantyCardList }}" wx:key="index">
<view class="warranty-card"> <view class="warranty-card">
<view class="name text-hide">{{filter.replaceItemText(item.goodsName)}}</view> <view class="warranty-name">
<view class="name text-hide value">{{filter.replaceItemText(item.goodsName)}}</view>
<view wx:if="{{item.warrantyPeriod}}" class="right" bind:tap="showWarranty" data-item="{{item}}">
<gl-image class="editIcon" src="/miniProgram/edit_icon.png"></gl-image>
<view class="warranty-price">
质保价格
</view>
</view>
</view>
<view class="value"> <view class="value">
质保期 质保期
<text>{{item.warrantyPeriod}}年</text> <text>{{item.warrantyPeriod}}年</text>
...@@ -329,10 +321,22 @@ ...@@ -329,10 +321,22 @@
</view> </view>
</view> </view>
</modal> </modal>
<orderRatingPopup
bind:close="RatingPopupSetting"
title="客户签字"
flag="{{ showRatingPopup }}"
wx:if="{{ showRatingPopup }}"
orderInfoSetting="{{ orderInfo }}"
/>
\ No newline at end of file \ No newline at end of file
<modal id="modal4" class="modal" custom="true" btns="{{ ['取消','确定'] }}">
<view class="modatcontent">
<view class="title">
质保价格
</view>
<view class="productName">
产品: {{filter.replaceItemText(warrantyEditObj.goodsName)}}
</view>
<view class="label">质保价格</view>
<view class="textarea">
<gl-textarea focus="{{focus}}" value="{{warrantyEditObj.warrantyPrice}}" bindinput="blur" bindblur="blur" maxlength="50" placeholder="请输入内容,最多50字" />
</view>
<view class="tips">
质保价格输入的内容会在车主查询质保卡时显示
</view>
</view>
</modal>
<orderRatingPopup bind:close="RatingPopupSetting" title="客户签字" flag="{{ showRatingPopup }}" wx:if="{{ showRatingPopup }}" orderInfoSetting="{{ orderInfo }}" />
\ No newline at end of file \ No newline at end of file
...@@ -370,16 +370,29 @@ Page({ ...@@ -370,16 +370,29 @@ Page({
console.log(e); console.log(e);
let { goodsList } = this.data; let { goodsList } = this.data;
let { value } = e.detail; let { value } = e.detail;
let { index, gindex } = e.currentTarget.dataset; let { index, gindex, item } = e.currentTarget.dataset;
let number = wx.$util.removeLeadingZerosAndEnsureNonNegative(value); let number = wx.$util.removeLeadingZerosAndEnsureNonNegative(value);
console.log(item, 'item');
// item.minSellPrice = 100
// item.validMinSellPrice = 'Y'
// 如果开启了最低价格校验
if (item.validMinSellPrice == 'Y' && item.minSellPrice > number) {
goodsList[index].goodsList[gindex].errorTarget = true
wx.$util.showToast('单价不可低于商品最低价')
// return false;
} else {
goodsList[index].goodsList[gindex].errorTarget = false
}
goodsList[index].goodsList[gindex].price = number; goodsList[index].goodsList[gindex].price = number;
//获取套餐内商品价格 //获取套餐内商品价格
goodsList[index].price = goodsList[index].goodsList.reduce((prev, cur) => { goodsList[index].price = goodsList[index].goodsList.reduce((prev, cur) => {
return Number(prev) + Number(cur.price); return Number(prev) + Number(cur.price);
}, 0); }, 0);
//获取套餐内商品总价 //获取套餐内商品总价
let total = goodsList[index].price * goodsList[index].count; let total = goodsList[index].price * goodsList[index].count;
goodsList[index].totalPrice = wx.$util.decimal(total, 2); goodsList[index].totalPrice = wx.$util.decimal(total, 2);
this.setData( this.setData(
{ {
goodsList, goodsList,
...@@ -393,33 +406,29 @@ Page({ ...@@ -393,33 +406,29 @@ Page({
let { orderObj, goodsList } = this.data; let { orderObj, goodsList } = this.data;
let { value } = e.detail; let { value } = e.detail;
let { index, item } = e.currentTarget.dataset; let { index, item } = e.currentTarget.dataset;
console.log(item, 'item');
let target = `goodsList[${index}].price`; let target = `goodsList[${index}].price`;
let number = wx.$util.removeLeadingZerosAndEnsureNonNegative(value); let number = wx.$util.removeLeadingZerosAndEnsureNonNegative(value);
this.setData({ this.setData({
[target]: number, //价格不能低于0 [target]: number, //价格不能低于0
}); });
// 如果开启了最低价格校验
let errorTarget = `goodsList[${index}].errorTarget`;
if (item.validMinSellPrice == 'Y' && item.shopMinPrice > number) {
// number = item.shopMinPrice > number
// this.setData({
// [errorTarget]: true, //显示错误
// });
wx.$util.showToast('单价不可低于商品最低价')
// return false;
} else {
this.setData({
[errorTarget]: false, //显示错误
});
}
this.setGoodsTotal(goodsList); this.setGoodsTotal(goodsList);
}, },
// removeLeadingZerosAndEnsureNonNegative(inputStr) {
// // 使用正则表达式去掉前导零
// let trimmedStr = inputStr.replace(/^0+/, "");
// let [number, decimal] = trimmedStr.split(".");
// if (decimal != undefined) {
// decimal = decimal.substring(0, 2);
// number += `.${decimal}`;
// trimmedStr = number;
// }
// // 将字符串转换为浮点数
// const numberValue = parseFloat(trimmedStr);
// // 如果转换后的值为 NaN 或者小于 0,则默认为 0
// if (isNaN(numberValue) || numberValue < 0) {
// return 0;
// }
// return trimmedStr;
// },
priceBlur(e) { priceBlur(e) {
let { index, item } = e.currentTarget.dataset; let { index, item } = e.currentTarget.dataset;
let target = `goodsList[${index}].price`; let target = `goodsList[${index}].price`;
...@@ -432,8 +441,22 @@ Page({ ...@@ -432,8 +441,22 @@ Page({
}, },
setGoodsTotal(goodsList) { setGoodsTotal(goodsList) {
let total = 0; let total = 0;
goodsList.map((i) => (total += i.count * i.price)); goodsList.forEach((i) => {
if (i.validMinSellPrice == 'Y' && i.shopMinPrice > i.price) {
i.errorTarget = true
}
if (i.goodsList) {
i.goodsList.forEach((item) => {
if (item.validMinSellPrice == 'Y' && item.minSellPrice > item.price) {
item.errorTarget = true
}
})
}
total += i.count * i.price
});
this.setData({ this.setData({
goodsList,
total: wx.$util.decimal(total, 2), total: wx.$util.decimal(total, 2),
}); });
}, },
...@@ -618,9 +641,13 @@ Page({ ...@@ -618,9 +641,13 @@ Page({
let { baseConfigData } = this.data; let { baseConfigData } = this.data;
let filmArr = []; let filmArr = [];
let arr = []; let arr = [];
let errTargetNum = 0
if (goodsList) { if (goodsList) {
goodsList.map((e) => { goodsList.map((e) => {
if (!e.isType) { if (!e.isType) {
if (e.errorTarget) {
errTargetNum++;
}
let obj = { let obj = {
baseGoodsId: e.baseGoodsId, baseGoodsId: e.baseGoodsId,
// upgradeGoodsId: e.id, // upgradeGoodsId: e.id,
...@@ -644,6 +671,9 @@ Page({ ...@@ -644,6 +671,9 @@ Page({
goodsList.map((e) => { goodsList.map((e) => {
if (e.isType) { if (e.isType) {
e.goodsList.forEach((g) => { e.goodsList.forEach((g) => {
if (g.errorTarget) {
errTargetNum++;
}
arr.push({ arr.push({
packageCode: e.packageCode, packageCode: e.packageCode,
packageName: e.packageName, packageName: e.packageName,
...@@ -662,6 +692,9 @@ Page({ ...@@ -662,6 +692,9 @@ Page({
if (orderObj.subOrderList.length == 0) { if (orderObj.subOrderList.length == 0) {
return "商品不能为空"; return "商品不能为空";
} }
if (errTargetNum) {
return "商品不能低于最低价格";
}
// } else { // } else {
// // 不升级删除商品参数 // // 不升级删除商品参数
// delete orderObj.subOrderList // delete orderObj.subOrderList
......
...@@ -294,7 +294,7 @@ page { ...@@ -294,7 +294,7 @@ page {
} }
.goods-box .goods .price input.error { .goods-box .goods .price input.error {
color: red; border: var(--fontSize2) solid #F24724;
} }
.goods-box .goods .price input.disabled { .goods-box .goods .price input.disabled {
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.price < 0 && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="1">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="1">x{{item.count}}</view>
</view> </view>
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.price < 0 && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
</view> </view>
...@@ -201,7 +201,7 @@ ...@@ -201,7 +201,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.price < 0 && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view>
</view> </view>
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ g.price }}" bindinput="changeMealPrice" data-item="{{ g }}" data-gindex="{{ gInx }}" data-index="{{ index }}" always-embed /> <input type="digit" value="{{ g.price }}" class="{{ g.errorTarget? 'error':''}}" bindinput="changeMealPrice" data-item="{{ g }}" data-gindex="{{ gInx }}" data-index="{{ index }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="3">x{{item.count}}</view>
</view> </view>
...@@ -268,7 +268,7 @@ ...@@ -268,7 +268,7 @@
<view class="price_count"> <view class="price_count">
<view class="price"> <view class="price">
<text>¥</text> <text>¥</text>
<input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.price < 0 && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed /> <input type="digit" value="{{ item.price }}" bindinput="changePrice" disabled="{{ orderObj.selectPayType ==0 }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.errorTarget && (orderObj.selectPayType !=0) ? 'error':''}} {{orderObj.selectPayType ==0?'disabled':'' }}" always-embed />
</view> </view>
<view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="4">x{{item.count}}</view> <view class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="4">x{{item.count}}</view>
</view> </view>
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
<tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" /> <tips-bottom style="width: 100%;box-sizing: border-box;" tipsProps="{{ tipsProps }}" />
</view> </view>
<recording-order-popup wx:if="{{showOrderpop && !(isErrorOrder)}}" outTradeNo="{{outTradeNo}}" show="{{showOrderpop}}" bind:success="navigator" title="请选择交易参考号" /> <recording-order-popup wx:if="{{showOrderpop && !(isErrorOrder)}}" outTradeNo="{{outTradeNo}}" show="{{showOrderpop}}" bind:success="navigator" title="请选择交易参考号" />
<merchant-seles show="{{ salesmanBox }}" isDefault="{{ isDefault }}" title="选择园区店" sub-title="选择转化人员" userInfo="{{ userInfo }}" type="2" scene="1"/> <merchant-seles show="{{ salesmanBox }}" isDefault="{{ isDefault }}" title="选择园区店" sub-title="选择转化人员" userInfo="{{ userInfo }}" type="2" scene="1" />
<merchant-seles show="{{ selesBox }}" title="选择合作门店" orderObj="{{ orderObj }}" sub-title="选择销售顾问" userInfo="{{ userInfo }}" singleSeller="{{ true }}" type="1" scene="1" /> <merchant-seles show="{{ selesBox }}" title="选择合作门店" orderObj="{{ orderObj }}" sub-title="选择销售顾问" userInfo="{{ userInfo }}" singleSeller="{{ true }}" type="1" scene="1" />
<sub-shop-merchant show="{{ subShopMerchantBox }}" title="选择二级流量方" selectedSelesMerchantId="{{ orderObj.merchantId }}" selectedCustomerInfo="{{ orderObj.customer.customerId }}" selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}" /> <sub-shop-merchant show="{{ subShopMerchantBox }}" title="选择二级流量方" selectedSelesMerchantId="{{ orderObj.merchantId }}" selectedCustomerInfo="{{ orderObj.customer.customerId }}" selectedSubShopMerchantId="{{ orderObj.subShopMerchantId }}" />
<car-brands show="{{ carBrandBox }}" bindconfirm="chooseCar" carSeriesId="{{ orderObj.customer.carSeriesId || '' }}" merchantId="{{ orderObj.merchantId || undefined }}" /> <car-brands show="{{ carBrandBox }}" bindconfirm="chooseCar" carSeriesId="{{ orderObj.customer.carSeriesId || '' }}" merchantId="{{ orderObj.merchantId || undefined }}" />
......
/* tabWorkOrder/pages/ocr/ocr.wxss */
\ No newline at end of file \ No newline at end of file
/* tabWorkOrder/pages/orderDetail/orderDetail.wxss */
\ 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!