Commit 38bcf14c by 前端

Merge branch 'SAAS+V4.48-0103' into 'SAAS+V4.49.0-0121'

上线合并

See merge request !355
2 parents 9a18b0d6 17f878c3
Showing 38 changed files with 1285 additions and 752 deletions
// import api from './request.js' // import api from './request.js'
import api from "~/utils/request/request.js"; import api from '~/utils/request/request.js'
module.exports = { module.exports = {
/**微信登录 */ /**微信登录 */
wxLogin(data) { wxLogin(data) {
data.productCode = "PC00c2"; data.productCode = 'PC00c2'
return api.post("dj.api.smartcarlife.jscode.login", data); return api.post('dj.api.smartcarlife.jscode.login', data)
}, },
/**微信登录 */ /**微信登录 */
ssoLogin(data) { ssoLogin(data) {
return api.post( return api.post(
"scrm.api.sso.weapp.jscode.getOpenId", 'scrm.api.sso.weapp.jscode.getOpenId',
data, data,
[], [],
"/rop-scrm-sso/router", '/rop-scrm-sso/router',
"scrm", 'scrm',
false false
); )
}, },
/**微信手机号登录 */ /**微信手机号登录 */
authPhone(data) { authPhone(data) {
data.productCode = "PC00c2"; data.productCode = 'PC00c2'
return api.post("dj.api.smartcarlife.auth.phone", data); return api.post('dj.api.smartcarlife.auth.phone', data)
}, },
/**账号登录 */ /**账号登录 */
accountAndPwd(data) { accountAndPwd(data) {
data.productCode = "PC00c2"; data.productCode = 'PC00c2'
return api.post("dj.api.smartcarlife.login.accountAndPwd", data); return api.post('dj.api.smartcarlife.login.accountAndPwd', data)
}, },
/**验证码 */ /**验证码 */
getSMS(data) { getSMS(data) {
return api.post("dj.api.smartcarlife.sms.get.code", data); return api.post('dj.api.smartcarlife.sms.get.code', data)
}, },
/** 免登录 */ /** 免登录 */
noLogin(data) { noLogin(data) {
data.productCode = "PC00c2"; data.productCode = 'PC00c2'
return api.post("dj.api.smartcarlife.sms.not.code.login", data); return api.post('dj.api.smartcarlife.sms.not.code.login', data)
}, },
/** 免登录 */ /** 免登录 */
loginLogAdd(data) { loginLogAdd(data) {
data.productCode = "PC00c2"; data.productCode = 'PC00c2'
return api.post("dj.api.smartcarlife.login.log.add", data); return api.post('dj.api.smartcarlife.login.log.add', data)
}, },
/** 记录登录设置类型 */ /** 记录登录设置类型 */
reNoSignIn(data) { reNoSignIn(data) {
data.productCode = "PC00c2"; data.productCode = 'PC00c2'
return api.post("dj.api.smartcarlife.sms.noSignIn.login", data); return api.post('dj.api.smartcarlife.sms.noSignIn.login', data)
}, },
/**手机验证码登录 /1.0.0 */ /**手机验证码登录 /1.0.0 */
smsLogin(data = {}) { smsLogin(data = {}) {
data.source = "MINIAPP"; data.source = 'MINIAPP'
data.productCode = "PC00c2"; data.productCode = 'PC00c2'
return api.post("dj.api.smartcarlife.sms.login", data); return api.post('dj.api.smartcarlife.sms.login', data)
}, },
/**获取账号列表 */ /**获取账号列表 */
getListSelectAccount() { getListSelectAccount() {
return api.post("dj.api.smartcarlife.workWechat.listSelectAccount"); return api.post('dj.api.smartcarlife.workWechat.listSelectAccount')
}, },
selectAccountLogin(data) { selectAccountLogin(data) {
return api.post("dj.api.smartcarlife.workWechat.selectAccountLogin", data); return api.post('dj.api.smartcarlife.workWechat.selectAccountLogin', data)
}, },
/** 车品牌 */ /** 车品牌 */
getBrandList(data) { getBrandList(data) {
return api.post("dj.api.get.car.brandList", data); return api.post('dj.api.get.car.brandList', data)
}, },
/**获取当前登录账号能查看的园区店列表 */ /**获取当前登录账号能查看的园区店列表 */
getYQList() { getYQList() {
return api.post("dj.api.smartcarlife.serviceMerchant.curYqList"); return api.post('dj.api.smartcarlife.serviceMerchant.curYqList')
}, },
/** 根据商户号获取员工列表信息(转化人员) */ /** 根据商户号获取员工列表信息(转化人员) */
getConversionEmployeeList(data) { getConversionEmployeeList(data) {
// 0->2.0 1->1.1 2->1.2 3->1.3 场景对应 // 0->2.0 1->1.1 2->1.2 3->1.3 场景对应
// data.sceneList = [1] // data.sceneList = [1]
return api.post("dj.api.smartcarlife.employee.getByMerchantId", data); return api.post('dj.api.smartcarlife.employee.getByMerchantId', data)
},
getEmployeeList(data) {
// 0->2.0 1->1.1 2->1.2 3->1.3 场景对应
// data.sceneList = [1]
return api.post(
'dj.api.smartcarlife.employee.onTheJob.getByMerchantId',
data
)
// return api.post("dj.api.smartcarlife.employee.getByMerchantId", data);
}, },
/** 根据园区店商户号获取绑定4S店列表 */ /** 根据园区店商户号获取绑定4S店列表 */
getServiceMerchantList(data) { getServiceMerchantList(data) {
return api.post("dj.api.smartcarlife.serviceMerchant.list", data); return api.post('dj.api.smartcarlife.serviceMerchant.list', data)
}, },
/** 根据4S店商户号获取二级流量方列表 */ /** 根据4S店商户号获取二级流量方列表 */
getSubShopMerchantList(data) { getSubShopMerchantList(data) {
return api.post( return api.post(
"dj.api.smartcarlife.diversionMerchant.getDiversionMerchantRef", 'dj.api.smartcarlife.diversionMerchant.getDiversionMerchantRef',
data data
); )
}, },
/**商品类型 */ /**商品类型 */
getGoodsTypeList(data) { getGoodsTypeList(data) {
return api.post("dj.api.goods.type.list", data); return api.post('dj.api.goods.type.list', data)
}, },
/**客户优惠券 */ /**客户优惠券 */
getCustomerCouponList(data) { getCustomerCouponList(data) {
return api.post("dj.api.customer.coupon.list", data); return api.post('dj.api.customer.coupon.list', data)
}, },
/**礼券列表 */ /**礼券列表 */
getCouponList(data) { getCouponList(data) {
return api.post("dj.api.smartCarLife.merchant.coupon.list", data); return api.post('dj.api.smartCarLife.merchant.coupon.list', data)
}, },
/**上传图片 /1.0.0*/ /**上传图片 /1.0.0*/
uploadImg(data) { uploadImg(data) {
return api.post("dj.api.smartcarlife.common.uploadImg", data, ["file"]); return api.post('dj.api.smartcarlife.common.uploadImg', data, ['file'])
}, },
/** ocr图片识别功能 */ /** ocr图片识别功能 */
ocr(data) { ocr(data) {
return api.post("dj.api.common.ocr.recognition", data); return api.post('dj.api.common.ocr.recognition', data)
}, },
/** 不升级常用字符列表 */ /** 不升级常用字符列表 */
getConfigList(data) { getConfigList(data) {
return api.post("dj.api.smartcarlife.config.list", data); return api.post('dj.api.smartcarlife.config.list', data)
}, },
/** 获取指定商户指定日期范围的邀约统计 */ /** 获取指定商户指定日期范围的邀约统计 */
getInviteDateList(data) { getInviteDateList(data) {
return api.post("dj.api.smartcarlife.inviteStat.merchant.list", data); return api.post('dj.api.smartcarlife.inviteStat.merchant.list', data)
}, },
/** 获取WebSocket地址 */ /** 获取WebSocket地址 */
getWsUrl() { getWsUrl() {
return api.post("dj.api.smartcarlife.getWsUrl"); return api.post('dj.api.smartcarlife.getWsUrl')
}, },
/**根据sceneId 查参数 */ /**根据sceneId 查参数 */
getSceneById(data) { getSceneById(data) {
return api.post("dj.api.smartcarlife.common.getSceneById", data); return api.post('dj.api.smartcarlife.common.getSceneById', data)
}, },
// 生成生成小程序码 // 生成生成小程序码
createQrcodeImage(data) { createQrcodeImage(data) {
// dj.api.smartcarlife.serviceMerchant.getByMerchantId // dj.api.smartcarlife.serviceMerchant.getByMerchantId
return api.post("dj.api.smartcarlife.common.createWeappQrcode", data); return api.post('dj.api.smartcarlife.common.createWeappQrcode', data)
}, },
/** 获取商户生效的财务结算规则 */ /** 获取商户生效的财务结算规则 */
merchantSettleAccountRule(data) { merchantSettleAccountRule(data) {
return api.post("dj.api.smartcarlife.merchantSettleAccountRule.get", data); return api.post('dj.api.smartcarlife.merchantSettleAccountRule.get', data)
}, },
/** 获取商户业务指定生效日期的结算规则 */ /** 获取商户业务指定生效日期的结算规则 */
merchantSettleAccountRuleGetByEffectDate(data) { merchantSettleAccountRuleGetByEffectDate(data) {
return api.post( return api.post(
"dj.api.smartcarlife.merchantSettleAccountRule.getByEffectDate", 'dj.api.smartcarlife.merchantSettleAccountRule.getByEffectDate',
data data
); )
}, },
/** 获取商户订单设置 */ /** 获取商户订单设置 */
getMerchantRecordingSettings(data) { getMerchantRecordingSettings(data) {
return api.post( return api.post(
"dj.api.smartcarlife.recordingSettings.getMerchantRecordingSettings", 'dj.api.smartcarlife.recordingSettings.getMerchantRecordingSettings',
data data
); )
}, },
/** 设置商户订单设置 */ /** 设置商户订单设置 */
setMerchantRecordingSettings(data) { setMerchantRecordingSettings(data) {
return api.post( return api.post(
"dj.api.smartcarlife.recordingSettings.insertOrUpdateSettings", 'dj.api.smartcarlife.recordingSettings.insertOrUpdateSettings',
data data
); )
}, },
/**补录订单 */ /**补录订单 */
waitinputorder(data) { waitinputorder(data) {
data.inputStatus = 0; data.inputStatus = 0
// data.payType = 1 // data.payType = 1
return api.post("dj.api.smartcarlife.weapp.waitinputorder.page", data); return api.post('dj.api.smartcarlife.weapp.waitinputorder.page', data)
}, },
/** 获取转化员上一笔订单的销售顾问 */ /** 获取转化员上一笔订单的销售顾问 */
getLastUserOrderInfo(data) { getLastUserOrderInfo(data) {
return api.post("dj.api.smartcarlife.order.getLastUser", data); return api.post('dj.api.smartcarlife.order.getLastUser', data)
}, },
// 获取订单信息 // 获取订单信息
getWorkList(data) { getWorkList(data) {
let params = data || {}; let params = data || {}
params.sceneType = 1; params.sceneType = 1
return api.post("dj.api.smartcarlife.order.search", params); return api.post('dj.api.smartcarlife.order.search', params)
}, },
/**搜索订单(含套餐) */ /**搜索订单(含套餐) */
getWorkPackageGoodsList(data) { getWorkPackageGoodsList(data) {
...@@ -185,118 +194,114 @@ module.exports = { ...@@ -185,118 +194,114 @@ module.exports = {
pageSize: 10, pageSize: 10,
...params ...params
}) })
}, },
// 获取园区店开通的场景入口 // 获取园区店开通的场景入口
getYqMerchantSceneConfigAPI(data) { getYqMerchantSceneConfigAPI(data) {
return api.post("dj.api.smartcarlife.select.openScene.info", data); return api.post('dj.api.smartcarlife.select.openScene.info', data)
}, },
// 获取园区店下的4s店 // 获取园区店下的4s店
getSceneMerchantRefStoreList(data) { getSceneMerchantRefStoreList(data) {
// 校验session // 校验session
return api.post("dj.api.scenemerchantref.query4SRefByYqShopByLogin", data); return api.post('dj.api.scenemerchantref.query4SRefByYqShopByLogin', data)
// 不校验session // 不校验session
// return api.post('dj.api.scenemerchantref.query4SRefByYqShop', data) // return api.post('dj.api.scenemerchantref.query4SRefByYqShop', data)
}, },
// 获取门店下的员工(推荐人)众筹场景 // 获取门店下的员工(推荐人)众筹场景
getStaffListByMerchantAPI(data) { getStaffListByMerchantAPI(data) {
let params = data || {}; let params = data || {}
params.sceneList = [3]; params.sceneList = [3]
return api.post("dj.api.smartcarlife.employee.getByMerchantId", params); return api.post('dj.api.smartcarlife.employee.getByMerchantId', params)
}, },
// 获取园区店配置 // 获取园区店配置
getYqStoreConfig(data) { getYqStoreConfig(data) {
return api.get("dj.api.smarcarlife.yqMerchantConfig.detail", data); return api.get('dj.api.smarcarlife.yqMerchantConfig.detail', data)
}, },
//插入埋点记录 //插入埋点记录
burialPointRecord(data) { burialPointRecord(data) {
return api.get("dj.api.smartcarlife.common.insertRecord", data); return api.get('dj.api.smartcarlife.common.insertRecord', data)
}, },
// 获取精品升级场景 太阳膜类商品部位数据 // 获取精品升级场景 太阳膜类商品部位数据
getPositionList(data) { getPositionList(data) {
return api.post("dj.api.smartcarlife.goodsPosition.list", data); return api.post('dj.api.smartcarlife.goodsPosition.list', data)
}, },
// 选择4s店和场景 // 选择4s店和场景
selectMerchantScene(data) { selectMerchantScene(data) {
return api.post("dj.api.smartcarlife.selectMerchantScene", data); return api.post('dj.api.smartcarlife.selectMerchantScene', data)
}, },
// 按客户查找门店工单/预约 // 按客户查找门店工单/预约
searchOrderCustomer(data) { searchOrderCustomer(data) {
return api.post("dj.api.smartcarlife.order.searchOrderCustomer", data); return api.post('dj.api.smartcarlife.order.searchOrderCustomer', data)
}, },
// 获取服务商库存管理模式(是否使用膜卷号) // 获取服务商库存管理模式(是否使用膜卷号)
getServiceFilmRollSetting(data) { getServiceFilmRollSetting(data) {
return api.post("dj.api.smarcarlife.stock.management.mode", data); return api.post('dj.api.smarcarlife.stock.management.mode', data)
}, },
/**退出*/ /**退出*/
logout() { logout() {
return api.post("dj.api.smartcarlife.logout"); return api.post('dj.api.smartcarlife.logout')
}, },
// 分页获取场景值关联园区店数据 // 分页获取场景值关联园区店数据
getYqMerchantListPage(data) { getYqMerchantListPage(data) {
return api.post("dj.api.scenemerchantref.listYqShopByRef.page", data); return api.post('dj.api.scenemerchantref.listYqShopByRef.page', data)
}, },
// 获取超管及区域督导账号侧边栏的4S店列表 // 获取超管及区域督导账号侧边栏的4S店列表
serviceMerchantCurshopList(data) { serviceMerchantCurshopList(data) {
return api.post("dj.api.smartcarlife.serviceMerchant.curShopList", data); return api.post('dj.api.smartcarlife.serviceMerchant.curShopList', data)
}, },
// 分页获取场景值关联4s店数据 // 分页获取场景值关联4s店数据
getMerchantListPage(data) { getMerchantListPage(data) {
return api.post("dj.api.scenemerchantref.listShop4sByRef.page", data); return api.post('dj.api.scenemerchantref.listShop4sByRef.page', data)
}, },
/** 查询员工或园区店商户是否开启了工资绩效 */ /** 查询员工或园区店商户是否开启了工资绩效 */
isBusinessSchoolEnableCurrentUser(data) { isBusinessSchoolEnableCurrentUser(data) {
return api.post( return api.post(
"dj.api.businessSchool.isBusinessSchoolEnable.currentUser", 'dj.api.businessSchool.isBusinessSchoolEnable.currentUser',
data data
); )
}, },
/** /**
* 客户线索新增客户提醒 */ * 客户线索新增客户提醒 */
getCustomerClueRemind(params = {}) { getCustomerClueRemind(params = {}) {
return api.post("dj.api.smartcarlife.customer.clue.tips.newCount", params); return api.post('dj.api.smartcarlife.customer.clue.tips.newCount', params)
}, },
/** 获取驻店员工目标任务 */ /** 获取驻店员工目标任务 */
getStaffTargetTaskApi(data) { getStaffTargetTaskApi(data) {
return api.post( return api.post('dj.api.smartcarlife.staffTargetCheck.getTargetCheck', data)
"dj.api.smartcarlife.staffTargetCheck.getTargetCheck",
data
);
}, },
/** 查询员工待办事项列表 */ /** 查询员工待办事项列表 */
getStaffRemindList(data) { getStaffRemindList(data) {
return api.post("dj.api.smartcarlife.staff.reminder.list", data); return api.post('dj.api.smartcarlife.staff.reminder.list', data)
}, },
/** 关闭员工待办事项 */ /** 关闭员工待办事项 */
shutDownTaskApi(data) { shutDownTaskApi(data) {
return api.post("dj.api.smartcarlife.staff.reminder.shutdown", data); return api.post('dj.api.smartcarlife.staff.reminder.shutdown', data)
}, },
/** 将当前门店的员工目标任务弹窗标记为已弹起过 */ /** 将当前门店的员工目标任务弹窗标记为已弹起过 */
setTaskDialog(data) { setTaskDialog(data) {
return api.post("dj.api.smartcarlife.staffTargetCheck.promptYes", data); return api.post('dj.api.smartcarlife.staffTargetCheck.promptYes', data)
}, },
/** /**
* 获取客户档案列表 * 获取客户档案列表
*/ */
getCustomerFileList(data) { getCustomerFileList(data) {
return api.post( return api.post(
"dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.page", 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.page',
data data
); )
}, },
/** /**
...@@ -305,24 +310,24 @@ module.exports = { ...@@ -305,24 +310,24 @@ module.exports = {
loginRecordSave(data, name) { loginRecordSave(data, name) {
// console.log(name, 'loginRecordSave'); // console.log(name, 'loginRecordSave');
// debugger // debugger
return api.post("dj.api.smartcarlife.staff.login.record.save", data); return api.post('dj.api.smartcarlife.staff.login.record.save', data)
//selectMerchantScene //selectMerchantScene
}, },
// 获取侧边栏切换门店4s店列表 // 获取侧边栏切换门店4s店列表
getCurShopList(data) { getCurShopList(data) {
return api.post("dj.api.smartcarlife.serviceMerchant.curShopList", data); return api.post('dj.api.smartcarlife.serviceMerchant.curShopList', data)
}, },
/** 查询该店员工日报是否开启 */ /** 查询该店员工日报是否开启 */
staffDailyReportMerchantValid(data) { staffDailyReportMerchantValid(data) {
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data) // return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
return api.post("dj.api.smartcarlife.staff.daily.report.popup.need", data); return api.post('dj.api.smartcarlife.staff.daily.report.popup.need', data)
}, },
/** 校验手机号是否配置打卡和是否打卡 */ /** 校验手机号是否配置打卡和是否打卡 */
clockInConfigPhone(data) { clockInConfigPhone(data) {
// return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data) // return api.post('dj.api.smartcarlife.staff.daily.report.merchant.valid', data)
return api.post("dj.api.smartcarlife.clock.in.config.phone", data); return api.post('dj.api.smartcarlife.clock.in.config.phone', data)
}, },
// 获取积分审批列表数据 // 获取积分审批列表数据
...@@ -334,4 +339,4 @@ module.exports = { ...@@ -334,4 +339,4 @@ module.exports = {
approvedPointsAPI(data) { approvedPointsAPI(data) {
return api.post('dj.api.smartcarlife.staff.motivation.audit', data) return api.post('dj.api.smartcarlife.staff.motivation.audit', data)
} }
}; }
...@@ -14,10 +14,11 @@ Component({ ...@@ -14,10 +14,11 @@ Component({
}, },
carSeriesId: { carSeriesId: {
type: Number, type: Number,
// observer: function (n) { observer: function (n) {
// console.log('carSeriesId') let { storageData, equityFlag } = this.data
// if (n) this.init() // 数字报价单获取详情接口, carSeriesId通过接口获取会出现慢的情况,重新整理车型数据将已选值置为选中状态
// } if (equityFlag && n && storageData?.length) this.setCar(storageData, true)
}
}, },
merchantId: { merchantId: {
type: Number, type: Number,
...@@ -26,6 +27,9 @@ Component({ ...@@ -26,6 +27,9 @@ Component({
if (n) this.init(n, true); if (n) this.init(n, true);
}, },
}, },
equityFlag: {
type: Boolean
}
}, },
/** /**
...@@ -356,18 +360,20 @@ Component({ ...@@ -356,18 +360,20 @@ Component({
}); });
}, },
confirm() { confirm() {
let { chooseItem } = this.data; let { chooseItem, equityFlag } = this.data;
let thisPage = wx.$router.getPageInstance(); let thisPage = wx.$router.getPageInstance();
let { if (!equityFlag) {
orderObj: { customer }, let {
} = thisPage.data; orderObj: { customer },
customer = { } = thisPage.data;
...customer, customer = {
...chooseItem, ...customer,
}; ...chooseItem,
thisPage.setData({ };
["orderObj.customer"]: customer, thisPage.setData({
}); ["orderObj.customer"]: customer,
});
}
this.setData({ this.setData({
show: false, show: false,
}); });
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
title="选择车型" title="选择车型"
show="{{show}}" show="{{show}}"
bindconfirm="confirm" bindconfirm="confirm"
height="90%"> height="{{ equityFlag ? '85%' : '90%' }}">
<view class="car-brands-box"> <view class="car-brands-box">
<search-input bindsearch="searchCar" /> <search-input bindsearch="searchCar" />
<view class="car-brands"> <view class="car-brands">
......
...@@ -33,13 +33,14 @@ ...@@ -33,13 +33,14 @@
padding-left: var(--fontSize32); padding-left: var(--fontSize32);
font-size: var(--fontSize32); font-size: var(--fontSize32);
font-weight: 700; font-weight: 700;
color: #323436;
} }
.child { .child {
font-weight: normal; font-weight: normal;
padding-left: var(--fontSize96); padding-left: var(--fontSize96);
font-size: var(--fontSize28); font-size: var(--fontSize28);
color: #888888; color: #323436;
position: relative; position: relative;
} }
......
...@@ -6,12 +6,11 @@ ...@@ -6,12 +6,11 @@
<view class="box"> <view class="box">
<block wx:for="{{customerCouponList}}" wx:key="index"> <block wx:for="{{customerCouponList}}" wx:key="index">
<block wx:if="{{!item.flag}}"> <block wx:if="{{!item.flag}}">
<view class="item {{item.active?'active':''}}" data-key="customerCouponId" bindtap="choose" <view class="item {{item.active?'active':''}} " data-key="customerCouponId" bindtap="choose" data-index="{{index}}" data-item="{{item}}">
data-index="{{index}}" data-item="{{item}}">
<view class="text-hide"> <view class="text-hide">
{{item.couponName}}{{item.customerCouponCode}}(客户拥有的券) {{item.couponName}}{{item.customerCouponCode}}(客户拥有的券)
</view> </view>
<view class="icon"> <view class="iconCoupon">
<image src="../images/choose.png"></image> <image src="../images/choose.png"></image>
</view> </view>
</view> </view>
...@@ -24,12 +23,11 @@ ...@@ -24,12 +23,11 @@
<view class="title">{{item.title}}</view> <view class="title">{{item.title}}</view>
<view class="box"> <view class="box">
<block wx:for="{{item.list}}" wx:key="ind" wx:for-index="ind" wx:for-item="i"> <block wx:for="{{item.list}}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
<view class="item {{i.active?'active':''}} {{i.disabled?'disabled':''}}" bindtap="choose" <view class="item {{i.active?'active':''}} {{i.disabled?'disabled':''}}" bindtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}" data-key="merchantCouponId">
data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}" data-key="merchantCouponId">
<view class="text-hide"> <view class="text-hide">
{{i.couponName}}{{i.merchantCouponCode}} {{i.couponName}}{{i.merchantCouponCode}}
</view> </view>
<view class="icon"> <view class="iconCoupon">
<image src="../images/choose.png"></image> <image src="../images/choose.png"></image>
</view> </view>
</view> </view>
......
...@@ -21,7 +21,8 @@ ...@@ -21,7 +21,8 @@
height: var(--fontSize88); height: var(--fontSize88);
box-sizing: border-box; box-sizing: border-box;
} }
.text-center{
.text-center {
text-align: center; text-align: center;
} }
...@@ -34,15 +35,18 @@ ...@@ -34,15 +35,18 @@
color: #888888; color: #888888;
position: relative; position: relative;
} }
.item.disabled{
.item.disabled {
color: #ccc; color: #ccc;
} }
.text-hide { .text-hide {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.item .icon{
.item .iconCoupon {
display: none; display: none;
width: var(--fontSize32); width: var(--fontSize32);
height: var(--fontSize32); height: var(--fontSize32);
...@@ -51,13 +55,16 @@ ...@@ -51,13 +55,16 @@
left: calc(-1 * var(--fontSize52)); left: calc(-1 * var(--fontSize52));
transform: translateY(-50%); transform: translateY(-50%);
} }
.item.active{
.item.active {
color: #347BFF; color: #347BFF;
} }
.item.active .icon{
.item.active .iconCoupon {
display: block; display: block;
} }
.nothing{
.nothing {
padding: var(--fontSize100); padding: var(--fontSize100);
text-align: center; text-align: center;
color: #999; color: #999;
......
Component({ Component({
options: {
styleIsolation: 'isolated',//表示样式隔离,默认隔离
},
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
max-width: 85%; max-width: 85%;
} }
.item .value .name .warning_text{ .item .value .name .warning_text {
color: #F24724; color: #F24724;
margin-left: var(--fontSize10); margin-left: var(--fontSize10);
font-size: var(--fontSize22); font-size: var(--fontSize22);
...@@ -78,20 +78,40 @@ ...@@ -78,20 +78,40 @@
opacity: 0.4; opacity: 0.4;
} }
.item .icon { .choose {
display: block; width: var(--fontSize32);
height: var(--fontSize32);
margin: 0 var(--fontSize32);
// position: absolute;
// top: 50%;
// left: calc(-1 * var(--fontSize52));
// transform: translateY(-50%);
.arc {
width: 100%;
height: 100%;
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
} }
.item .icon .arc {
width: 100%;
height: 100%;
border: var(--fontSize2) solid #979797;
border-radius: 100%;
box-sizing: border-box;
}
.nothing { .nothing {
padding: var(--fontSize100); padding: var(--fontSize100);
text-align: center; text-align: center;
color: #999; color: #999;
}
.box {
padding-left: 0;
}
.itemBox {
display: flex;
align-items: center;
.item {
flex: 1;
}
} }
\ No newline at end of file \ No newline at end of file
<wxs src="index.wxs" module="filter" /> <wxs src="index.wxs" module="filter" />
<popup show="{{show}}" title="选择商品" bindconfirm="confirm" bindcancel="cancel"> <popup show="{{show}}" title="选择商品" bindconfirm="confirm" bindcancel="cancel">
<view class="coupon-box"> <view class="coupon-box">
<search-input bindsearch="searchGoods" value="{{keyWord}}" /> <search-input bindsearch="searchGoods" value="{{keyWord}}" />
<scroll-view class="coupon" scroll-y> <scroll-view class="coupon" scroll-y>
<block wx:if="{{goodsList.length > 0}}"> <block wx:if="{{goodsList.length > 0}}">
<block wx:for="{{goodsList}}" wx:key="index"> <block wx:for="{{goodsList}}" wx:key="index">
<view class="title"> <view class="title">
{{item.goodsTypeName}} {{item.goodsTypeName}}
<text class="tips">|建议价</text> <text class="tips">|建议价</text>
</view> </view>
<view class="box"> <view class="box">
<block <view class="itemBox" wx:for="{{item.upgradeGoodsList}}" wx:key="ind" wx:for-index="ind" wx:for-item="i">
wx:for="{{item.upgradeGoodsList}}" <view class="choose" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
wx:key="ind" <image src="{{filter.getImageSrc(i.active)}}" />
wx:for-index="ind" </view>
wx:for-item="i"> <view class="item {{minPrice?(minPrice/100)>= i.shopMinPrice ?'':'disableSelect':'' }}">
<view class="item {{minPrice?(minPrice/100)>= i.shopMinPrice ?'':'disableSelect':'' }}"> <view class="value {{i.active?'labelWidth':''}}" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<!-- {{i.shopMinPrice}} --> <view class="name text-hide {{i.active?'textWidth':''}}">
<view <text>{{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || filter.replaceItemText(i.goodsInfo.goodsName)}}</text>
class="value {{i.active?'labelWidth':''}}"
catchtap="choose"
data-index="{{index}}"
data-ind="{{ind}}"
data-item="{{i}}">
<view class="name text-hide {{i.active?'textWidth':''}}">
<text>{{filter.replaceItemText(i.upgradeGoodsAlias) ||filter.replaceItemText(i.upgradeGoodsName) || filter.replaceItemText(i.goodsInfo.goodsName)}}</text>
<text wx:if="{{i.merchantGoodsPosition && (i.goodsInfo.goodsType == 1 || i.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">{{'「' + i.positionStr+'」'}}</text> <text wx:if="{{i.merchantGoodsPosition && (i.goodsInfo.goodsType == 1 || i.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">{{'「' + i.positionStr+'」'}}</text>
<text class="warning_text" wx:if="{{!i.merchantGoodsPosition && (i.goodsInfo.goodsType == 1 || i.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">无部位</text> <text class="warning_text" wx:if="{{!i.merchantGoodsPosition && (i.goodsInfo.goodsType == 1 || i.goodsInfo.goodsType == baseConfigData.selfBuildFilmType)}}">无部位</text>
</view> </view>
<view class="last" wx:if="{{!i.active}}"> <view class="last" wx:if="{{!i.active}}">
<!-- | --> <text class="price">¥{{i.upgradePrice}}</text>
<text class="price">¥{{i.upgradePrice}}</text> </view>
</view> </view>
</view> <block wx:if="{{i.active}}">
<block wx:if="{{i.active}}"> <view class="control">
<view class="control"> <view class="minus" catchtap="addCount" data-count="{{-1}}" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<view -
class="minus" </view>
catchtap="addCount" <input type="number" catchtap="noScroll" class="input" value="{{i.count || 1}}" catchinput="input" data-index="{{index}}" data-ind="{{ind}}" />
data-count="{{-1}}" <view class="add" catchtap="addCount" data-count="{{1}}" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
data-index="{{index}}" +
data-ind="{{ind}}" </view>
data-item="{{i}}"> </view>
- </block>
</view>
<input
type="number"
catchtap="noScroll"
class="input"
value="{{i.count || 1}}"
catchinput="input"
data-index="{{index}}"
data-ind="{{ind}}" />
<view
class="add"
catchtap="addCount"
data-count="{{1}}"
data-index="{{index}}"
data-ind="{{ind}}"
data-item="{{i}}">
+
</view>
</view>
</block>
<view
class="icon"
catchtap="choose"
data-index="{{index}}"
data-ind="{{ind}}"
data-item="{{i}}">
<block wx:if="{{i.active}}">
<image src="../images/radio.png" />
</block>
<block wx:else>
<view class="arc" />
</block>
</view>
</view>
</block>
</view>
</block>
</block>
<block wx:else>
<view class="nothing">暂无数据</view>
</block>
</scroll-view>
</view>
</popup>
<!-- <view class=" choose" catchtap="choose" data-index="{{index}}" data-ind="{{ind}}" data-item="{{i}}">
<block wx:if="{{i.active}}">
<image src="../images/radio.png" />
</block>
<block wx:else>
<view class="arc" />
</block>
</view> -->
</view>
</view>
</view>
</block>
</block>
<block wx:else>
<view class="nothing">暂无数据</view>
</block>
</scroll-view>
</view>
</popup>
\ No newline at end of file \ No newline at end of file
var replaceItemText = function (item) { var replaceItemText = function (item) {
var reg = getRegExp(';~;', 'g') var reg = getRegExp(';~;', 'g')
return item?item.replace(reg, ' '):'' return item ? item.replace(reg, ' ') : ''
}
var getImageSrc = function (active) {
var baseImagePath = active ? '../images/radio.png' : '../images/radio_icon.png';
var timestamp = Date.now(); // 使用 Date.now() 获取当前时间戳
return baseImagePath + '?t=' + timestamp; // 使用字符串拼接
} }
/* /*
* 导出 * 导出
*/ */
module.exports = { module.exports = {
replaceItemText: replaceItemText replaceItemText: replaceItemText,
getImageSrc: getImageSrc
} }
...@@ -2,11 +2,24 @@ ...@@ -2,11 +2,24 @@
import api from "../../api/api"; import api from "../../api/api";
// import util from '../../utils/util.js' // import util from '../../utils/util.js'
Component({ Component({
// options: {
// styleIsolation: 'shared'
// },
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
properties: { properties: {
show: Boolean, show: {
type: Boolean,
observer: function (n) {
// console.log('userInfo', n)
// 先请求导流方接口
if (n) this.setData({
keyWord: ''
});
this.getMerchantList()
},
},
title: String, title: String,
subTitle: String, subTitle: String,
userInfo: { userInfo: {
...@@ -46,6 +59,7 @@ Component({ ...@@ -46,6 +59,7 @@ Component({
this.getMerchantList(); this.getMerchantList();
this.setData({ this.setData({
sellerUserId: id, sellerUserId: id,
keyWord: ''
}); });
} }
}, },
...@@ -61,12 +75,25 @@ Component({ ...@@ -61,12 +75,25 @@ Component({
isFirst: true, isFirst: true,
sellerUserId: "", sellerUserId: "",
orderSellerInfo: "", orderSellerInfo: "",
keyWord: ''
}, },
/** /**
* 组件的方法列表 * 组件的方法列表
*/ */
methods: { methods: {
search(e) {
let { detail: { value } } = e
this.setData({
keyWord: value
})
let { orderObj } = this.data
this.getConversionEmployeeList(orderObj.merchantId, true);
},
changSelectList(e) {
// let {value:text} = e.currentTarget
// let {selesList} =
},
showMoreMerchant() { showMoreMerchant() {
this.setData({ this.setData({
moreMerchant: !this.data.moreMerchant, moreMerchant: !this.data.moreMerchant,
...@@ -84,7 +111,6 @@ Component({ ...@@ -84,7 +111,6 @@ Component({
let { orderObj } = thisPage.data; let { orderObj } = thisPage.data;
let isSellerInfo, orderSellerInfo; let isSellerInfo, orderSellerInfo;
// console.log('orderObj', orderObj) // console.log('orderObj', orderObj)
let callBackName = let callBackName =
type == 1 ? "getSceneMerchantRefStoreList" : "getYQList"; type == 1 ? "getSceneMerchantRefStoreList" : "getYQList";
// debugger // debugger
...@@ -95,10 +121,10 @@ Component({ ...@@ -95,10 +121,10 @@ Component({
api[callBackName]( api[callBackName](
type == 1 type == 1
? { ? {
merchantId: userInfo.merchantId, merchantId: userInfo.merchantId,
scene, scene,
staffUUID: orderObj.sellerUserId, staffUUID: orderObj.sellerUserId,
} }
: {} : {}
).then(async (res) => { ).then(async (res) => {
// let userInfo = wx.$util.getUserInfo() // let userInfo = wx.$util.getUserInfo()
...@@ -134,8 +160,6 @@ Component({ ...@@ -134,8 +160,6 @@ Component({
let result = await api.getLastUserOrderInfo({ let result = await api.getLastUserOrderInfo({
sellerUserId: userInfo.subLoginUser.uuid, sellerUserId: userInfo.subLoginUser.uuid,
}); });
// let {data} = result
if ( if (
result.data && result.data &&
result.data.merchantId == userInfo?.shopMerchantId result.data.merchantId == userInfo?.shopMerchantId
...@@ -198,14 +222,16 @@ Component({ ...@@ -198,14 +222,16 @@ Component({
orderObj: comOrderObj, orderObj: comOrderObj,
orderSellerInfo, orderSellerInfo,
scene, scene,
keyWord
} = this.data; } = this.data;
let thisPage = wx.$router.getPageInstance(); let thisPage = wx.$router.getPageInstance();
let { orderObj } = thisPage.data; let { orderObj } = thisPage.data;
api api
.getConversionEmployeeList({ .getEmployeeList({
merchantId, merchantId,
sceneList: type == 1 ? [scene] : "", sceneList: type == 1 ? [scene] : "",
name: keyWord
}) })
.then(async (res) => { .then(async (res) => {
wx.$util.hideLoading(); wx.$util.hideLoading();
...@@ -242,6 +268,7 @@ Component({ ...@@ -242,6 +268,7 @@ Component({
thisPage.data.orderCreateType, thisPage.data.orderCreateType,
"thisPage.data.orderCreateType" "thisPage.data.orderCreateType"
); );
// debugger
if (type == 1 && isFirst) { if (type == 1 && isFirst) {
// debugger // debugger
// console.log(merchantId) // console.log(merchantId)
...@@ -324,9 +351,9 @@ Component({ ...@@ -324,9 +351,9 @@ Component({
// 还要订单不是回显的 // 还要订单不是回显的
console.log( console.log(
type == 1 && type == 1 &&
merchantList.length == 1 && merchantList.length == 1 &&
!orderObj.merchantId && !orderObj.merchantId &&
!orderObj.merchantName !orderObj.merchantName
); );
if ( if (
type == 1 && type == 1 &&
...@@ -348,11 +375,11 @@ Component({ ...@@ -348,11 +375,11 @@ Component({
selesList = selesList.length selesList = selesList.length
? selesList ? selesList
: [ : [
{ {
uuid: -1, uuid: -1,
staffName: "系统", staffName: "系统",
}, },
]; ];
selesList.forEach((element, index) => { selesList.forEach((element, index) => {
if (index == 0) { if (index == 0) {
element.active = true; element.active = true;
......
...@@ -4,8 +4,7 @@ ...@@ -4,8 +4,7 @@
<view class="sub-title">{{title}}</view> <view class="sub-title">{{title}}</view>
<view class="merchant-box" style="max-height:{{moreMerchant?merchantList.length * 100 :''}}rpx"> <view class="merchant-box" style="max-height:{{moreMerchant?merchantList.length * 100 :''}}rpx">
<block wx:for="{{merchantList}}" wx:key="index"> <block wx:for="{{merchantList}}" wx:key="index">
<view class="merchantList {{item.active?'active':''}}" bindtap="changeMerchant" data-item="{{item}}" <view class="merchantList {{item.active?'active':''}}" bindtap="changeMerchant" data-item="{{item}}" data-index="{{index}}">
data-index="{{index}}">
<view class="text-hide">{{item.merchantName}}</view> <view class="text-hide">{{item.merchantName}}</view>
</view> </view>
</block> </block>
...@@ -15,14 +14,16 @@ ...@@ -15,14 +14,16 @@
<image src="../images/open.png" class="icon {{moreMerchant ? 'hide':''}}"></image> <image src="../images/open.png" class="icon {{moreMerchant ? 'hide':''}}"></image>
</view> </view>
</block> </block>
<view class="sub-title">{{subTitle}}</view> <view class="sub-title">{{subTitle}}
</view>
<search-input styleValue=" border-bottom:none" wx:if="{{type == 1 }}" value="{{keyWord}}" bindsearch="search" placeholder="请输入" />
<view class="seles-list"> <view class="seles-list">
<block wx:for="{{selesList}}" wx:key="index"> <block wx:for="{{selesList}}" wx:key="index">
<view class="seles text-center {{item.active?'active':''}}" bindtap="changeSelesMan" data-index="{{index}}" <view class="seles text-center {{item.active?'active':''}}" bindtap="changeSelesMan" data-index="{{index}}" data-item="{{item}}">
data-item="{{item}}">
{{item.staffName}} {{item.staffName}}
</view> </view>
</block> </block>
<view class="center " wx:if="{{type == 1&&keyWord&&selesList.length == 0 }}">暂无数据</view>
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
......
/* components/Merchant-Seles/Merchant-Seles.wxss */ /* components/Merchant-Seles/Merchant-Seles.wxss */
.text-hide { .text-hide {
white-space:nowrap; white-space: nowrap;
overflow:hidden; overflow: hidden;
text-overflow:ellipsis; text-overflow: ellipsis;
} }
.text-center{
.text-center {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.seles-box{
.seles-list .center {
width: 100%;
text-align: center;
}
.seles-box {
height: 100%; height: 100%;
width: calc(100% + var(--fontSize64)); width: calc(100% + var(--fontSize64));
transform: translateX(calc(-1 * var(--fontSize32))); transform: translateX(calc(-1 * var(--fontSize32)));
} }
.box{
.box {
padding: 0 var(--fontSize32); padding: 0 var(--fontSize32);
} }
.merchant-box{
.merchant-box {
max-height: var(--fontSize300); max-height: var(--fontSize300);
overflow: hidden; overflow: hidden;
transition: all .25s; transition: all .25s;
} }
.merchantList { .merchantList {
width: calc(100% - var(--fontSize50)); width: calc(100% - var(--fontSize50));
height: var(--fontSize98); height: var(--fontSize98);
...@@ -55,12 +65,14 @@ ...@@ -55,12 +65,14 @@
text-align: center; text-align: center;
margin: var(--fontSize28) auto 0; margin: var(--fontSize28) auto 0;
} }
.more .icon{
.more .icon {
width: var(--fontSize24); width: var(--fontSize24);
height: var(--fontSize22); height: var(--fontSize22);
transition: all .25s; transition: all .25s;
} }
.more .icon.hide{
.more .icon.hide {
transform: rotate(-180deg); transform: rotate(-180deg);
} }
...@@ -81,7 +93,7 @@ ...@@ -81,7 +93,7 @@
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
flex-direction: row; flex-direction: row;
padding-bottom: var(--fontSize40); padding-bottom: var(--fontSize40);
} }
...@@ -94,8 +106,13 @@ ...@@ -94,8 +106,13 @@
height: var(--fontSize60); height: var(--fontSize60);
margin: 0 var(--fontSize40) var(--fontSize20) 0; margin: 0 var(--fontSize40) var(--fontSize20) 0;
} }
.seles.active{
background: rgba(53,130,238,0.08); .seles.active {
background: rgba(53, 130, 238, 0.08);
color: #347BFF; color: #347BFF;
border-color: #347BFF; border-color: #347BFF;
}
.search-input search-input {
border: none;
} }
\ No newline at end of file \ No newline at end of file
// components/SearchInput/SearchInput.js // components/SearchInput/SearchInput.js
Component({ Component({
// options: {
// styleIsolation: 'shared'
// },
/** /**
* 组件的属性列表 * 组件的属性列表
*/ */
...@@ -14,6 +17,10 @@ Component({ ...@@ -14,6 +17,10 @@ Component({
filterEmoji: { filterEmoji: {
type: Boolean, type: Boolean,
value: true value: true
},
styleValue: {
type: String,
value: ''
} }
}, },
...@@ -60,7 +67,7 @@ Component({ ...@@ -60,7 +67,7 @@ Component({
}, },
emit(e) { emit(e) {
let { let {
detail:{ detail: {
value value
}, },
type type
......
<view class="search-box"> <view class="search-box" style="{{styleValue}}">
<view class="search-input"> <view class="search-input">
<block wx:if="{{!edit}}"> <block wx:if="{{!edit}}">
<view class="input {{value?'':'placeholder'}}" bindtap="open"> <view class="input {{value?'':'placeholder'}}" bindtap="open">
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
</view> </view>
</block> </block>
<block wx:else> <block wx:else>
<input type="text" maxlength="{{maxlength}}" class="input" value='{{value}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm"/> <input type="text" maxlength="{{maxlength}}" class="input" value='{{value}}' focus='{{inputFocus}}' confirm-type="search" bindinput='input' bindblur="inputBlur" bindconfirm="inputConfifm" />
</block> </block>
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd"; ...@@ -18,7 +18,7 @@ export const appId = "wx570d9331f9ace0bd";
* 4预发布 * 4预发布
* 5cdptest * 5cdptest
*/ */
let index = 2; let index = 1;
const accountInfo = wx.getAccountInfoSync(); const accountInfo = wx.getAccountInfoSync();
const systemInfo = wx.getSystemInfoSync(); const systemInfo = wx.getSystemInfoSync();
const envName = accountInfo.miniProgram.envVersion; const envName = accountInfo.miniProgram.envVersion;
......
...@@ -97,7 +97,7 @@ ...@@ -97,7 +97,7 @@
<picker <picker
wx:if="{{item.type == 'pickerTime'}}" wx:if="{{item.type == 'pickerTime'}}"
mode="date" mode="date"
value="{{formData[name]}}" value="{{formData[name] || formData[item.name]}}"
start="{{item.start || ''}}" start="{{item.start || ''}}"
end="{{item.end || ''}}" end="{{item.end || ''}}"
bindchange="handleTimeChange" bindchange="handleTimeChange"
......
...@@ -55,6 +55,7 @@ Component({ ...@@ -55,6 +55,7 @@ Component({
formRule: constantData.formRule, formRule: constantData.formRule,
energyFormRule: constantData.energyFormRule, energyFormRule: constantData.energyFormRule,
oilFormRule: constantData.oilFormRule, oilFormRule: constantData.oilFormRule,
extendServiceFormRule: constantData.extendServiceFormRule,
isShowObj: { isShowObj: {
car: true, car: true,
customer: true, customer: true,
...@@ -138,6 +139,16 @@ Component({ ...@@ -138,6 +139,16 @@ Component({
formData formData
}) })
}, },
// 切换排量/功率
changeType(e) {
let { type, index } = e.currentTarget.dataset
let idName = 'extendService'
let childCom = this.selectComponent('#' + idName + index)
childCom.parentSetData('displacementPowerFlag', type)
this.setData({
[`serviceInfo.goodInfoList[${index}].displacementPowerFlag`]: type
})
},
onClickShow(e) { onClickShow(e) {
const { type } = e.target.dataset const { type } = e.target.dataset
this.setData({ imgShow: true, imgType: type }) this.setData({ imgShow: true, imgType: type })
...@@ -197,7 +208,7 @@ Component({ ...@@ -197,7 +208,7 @@ Component({
let { value } = e.detail let { value } = e.detail
let formData = this.getPageData() let formData = this.getPageData()
let curitem = formData.goodInfoList[popObj.idx] let curitem = formData.goodInfoList[popObj.idx]
let idName = curitem.itemsCode == 'YB0003' ? 'oil' : 'energy' let idName = curitem.itemsCode == 'YB0003' ? 'oil' : (curitem.itemsCode == 'YB0001' || curitem.itemsCode == 'YB0002') ? 'energy' : 'extendService'
let childCom = this.selectComponent('#' + idName + popObj.idx) let childCom = this.selectComponent('#' + idName + popObj.idx)
childCom.parentSetData(popObj.attr, value) childCom.parentSetData(popObj.attr, value)
this.setData({ this.setData({
...@@ -249,7 +260,7 @@ Component({ ...@@ -249,7 +260,7 @@ Component({
}) })
}, },
handleConfirm(e) { handleConfirm(e) {
var { formRule, serviceInfo, imgObj, imgToInfo, energyFormRule, oilFormRule,retrofitInfo } = this.data var { formRule, serviceInfo, imgObj, imgToInfo, energyFormRule, oilFormRule,retrofitInfo, extendServiceFormRule } = this.data
let formData = this.getPageData() let formData = this.getPageData()
let validObj = fn.checkRequired(formData, formRule) let validObj = fn.checkRequired(formData, formRule)
if (validObj) { if (validObj) {
...@@ -286,7 +297,7 @@ Component({ ...@@ -286,7 +297,7 @@ Component({
// 延保产品-验证 // 延保产品-验证
if (item.printType == 2) { if (item.printType == 2) {
// itemsCode标识:YB0001-延保-6大件,YB0002-延保-3电,YB0003-延保-油车 // itemsCode标识:YB0001-延保-6大件,YB0002-延保-3电,YB0003-延保-油车
let subValidObj = fn.checkRequired(item, item.itemsCode == 'YB0003' ? oilFormRule : energyFormRule) let subValidObj = fn.checkRequired(item, item.itemsCode == 'YB0003' ? oilFormRule : (item.itemsCode == 'YB0001' || item.itemsCode == 'YB0002') ? energyFormRule : extendServiceFormRule)
if (subValidObj) { if (subValidObj) {
wx.$util.showToast(subValidObj.message) wx.$util.showToast(subValidObj.message)
return return
...@@ -330,7 +341,7 @@ Component({ ...@@ -330,7 +341,7 @@ Component({
number += `.${decimal}` number += `.${decimal}`
value = number value = number
} }
let idName = curitem.itemsCode == 'YB0003' ? 'oil' : 'energy' let idName = curitem.itemsCode == 'YB0003' ? 'oil' : (curitem.itemsCode == 'YB0001' || curitem.itemsCode == 'YB0002') ? 'energy' : 'extendService'
let childCom = this.selectComponent('#' + idName + idx) let childCom = this.selectComponent('#' + idName + idx)
childCom.parentSetData(attr, value) childCom.parentSetData(attr, value)
this.setData({ this.setData({
......
...@@ -146,7 +146,7 @@ ...@@ -146,7 +146,7 @@
</view> </view>
</gl-form> </gl-form>
<gl-form <gl-form
wx:else wx:if="{{ item.itemsCode == 'YB0001' || item.itemsCode == 'YB0002' }}"
id="{{ 'energy' + index }}" id="{{ 'energy' + index }}"
background="#F4F5F7" background="#F4F5F7"
formData="{{ item }}" formData="{{ item }}"
...@@ -190,6 +190,39 @@ ...@@ -190,6 +190,39 @@
<text class="input-suffix">万公里</text> <text class="input-suffix">万公里</text>
</view> </view>
</gl-form> </gl-form>
<gl-form
wx:if="{{ item.itemsCode != 'YB0001' && item.itemsCode != 'YB0002' && item.itemsCode != 'YB0003' }}"
id="{{ 'extendService' + index }}"
background="#F4F5F7"
formData="{{ item }}"
dataAttrName="{{ 'serviceInfo.goodInfoList[' + index +']' }}"
formDataList="{{ secondObj.productFormList[0].extendServiceFormList }}">
<view slot="displacementPower" class="displacementPower">
<view class="tab-box">
<view class="tab-item {{item.displacementPowerFlag == 0 ? 'active' : ''}}" data-type="0" data-index="{{index}}" bindtap="changeType">排量</view>
<view class="tab-item {{item.displacementPowerFlag == 1 ? 'active' : ''}}" data-type="1" data-index="{{index}}" bindtap="changeType">功率</view>
</view>
<view class="value">
<van-field
class="textarea between"
custom-style="width: var(--fontSize100);font-size: var(--fontSize28); padding: var(--fontSize30) 0; background: #F4F5F7;"
border="{{ false }}"
value="{{ item.displacementPowerValue }}"
input-align="right"
autosize
hold-keyboard
type="number"
placeholder="请输入"
maxlength="140"
data-attr="displacementPowerValue"
data-idx="{{ index }}"
data-curitem="{{ item }}"
bindinput="handleWarrantyInput"
/>
<text class="input-suffix">{{item.displacementPowerFlag == 0 ? 'L' : 'KW'}}</text>
</view>
</view>
</gl-form>
</view> </view>
<gl-form <gl-form
wx:else wx:else
......
...@@ -377,4 +377,41 @@ ...@@ -377,4 +377,41 @@
.pay-type .cell { .pay-type .cell {
padding-left: var(--fontSize20) !important; padding-left: var(--fontSize20) !important;
}
.displacementPower {
width: 100%;
display: flex;
align-items: center;
justify-content: space-between;
}
.displacementPower .tab-box{
width: var(--fontSize192);
height: var(--fontSize52);
background: #F3F3F5;
border-radius: var(--fontSize8);
display: flex;
align-items: center;
border: var(--fontSize2) solid #3582EE;
}
.displacementPower .tab-box .tab-item{
width: var(--fontSize96);
height: var(--fontSize52);
text-align: center;
line-height: var(--fontSize52);
border-radius: var(--fontSize8);
transition: all .25s;
color: #3582EE;
}
.displacementPower .tab-box .tab-item.active {
background-color: #3582EE;
color: #fff;
}
.displacementPower .value {
display: flex;
justify-content: flex-end;
align-items: center;
} }
\ No newline at end of file \ No newline at end of file
...@@ -190,6 +190,44 @@ const oilFormRule = { ...@@ -190,6 +190,44 @@ const oilFormRule = {
] ]
} }
const extendServiceFormRule = {
servicePeriod: [{ required: true, message: '服务年限不能为空' }],
displacementPowerValue: [
{ required: true, message: '排量或功率不能为空' },
{
validator: (rule, value) => {
return /^\d+(\.\d{1,2})?$/.test(value) ? null : { message: '排量或功率请输入仅有两位小数的数字' }
}
}
],
buyDate: [{ required: true, message: '购车发票日期不能为空' }],
qualityBeginDate: [{ required: true, message: '原厂质保开始日期不能为空' }],
warrantyPeriod: [
{ required: true, message: '原厂质保年限不能为空' },
{
validator: (rule, value) => {
return /^\d+$/.test(value) ? null : { message: '原厂质保年限请输入整数' }
}
}
],
warrantyKm: [
{ required: true, message: '原厂质保公里不能为空' },
{
validator: (rule, value) => {
return /^\d+(\.\d{1,2})?$/.test(value) ? null : { message: '原厂质保公里请输入仅有两位小数的数字' }
}
}
],
mileage: [
{ required: true, message: '合同购买时的公里数不能为空' },
{
validator: (rule, value) => {
return /^\d+(\.\d{1,2})?$/.test(value) ? null : { message: '合同购买时的公里数请输入仅有两位小数的数字' }
}
}
]
}
const secondObj = { const secondObj = {
carFormList: [ carFormList: [
{ {
...@@ -466,6 +504,70 @@ const secondObj = { ...@@ -466,6 +504,70 @@ const secondObj = {
noCellHeight: true, noCellHeight: true,
cellStyle: 'height: var(--fontSize90); border-bottom: 0;' cellStyle: 'height: var(--fontSize90); border-bottom: 0;'
} }
],
// 延保配置服务项目
extendServiceFormList: [
{
label: '服务年限',
name: 'servicePeriod',
type: 'input',
disabled: true,
suffix: '年',
noCellHeight: true,
cellStyle: 'height: var(--fontSize90);'
},
{
label: '',
name: 'displacementPower',
type: 'slot',
noCellHeight: true,
cellBoxStyle: 'width: 100%;',
labelWidth: '0px',
labelStyle: 'display: none;'
},
{
label: '购车发票日期',
name: 'buyDate',
type: 'pickerTime',
end: Util.tsFormatTime(new Date(), 'Y-M-D'),
labelWidth: 'var(--fontSize220)',
noCellHeight: true,
cellStyle: 'height: var(--fontSize90);',
haveArrow: true
},
{
label: '原厂质保开始日期',
name: 'qualityBeginDate',
type: 'pickerTime',
labelWidth: 'var(--fontSize240)',
noCellHeight: true,
cellStyle: 'height: var(--fontSize90);',
haveArrow: true
},
{
label: '原厂质保年限',
name: 'warrantyPeriod',
type: 'input',
noCellHeight: true,
cellStyle: 'height: var(--fontSize90);',
labelWidth: 'var(--fontSize220)',
},
{
label: '原厂质保公里(万公里)',
name: 'warrantyKm',
type: 'input',
noCellHeight: true,
cellStyle: 'height: var(--fontSize90);',
labelWidth: 'var(--fontSize340)',
},
{
label: '合同购买时的公里数',
name: 'mileage',
type: 'input',
noCellHeight: true,
cellStyle: 'height: var(--fontSize90);',
labelWidth: 'var(--fontSize280)',
}
] ]
}, },
// { // {
...@@ -503,6 +605,10 @@ const secondObj = { ...@@ -503,6 +605,10 @@ const secondObj = {
label: '', label: '',
name: 'tireRule', name: 'tireRule',
type: 'otherSlot', type: 'otherSlot',
isShowObj: {
attr: 'tireFlag',
list: ['1']
},
list: [ list: [
{ {
label: '轮胎规格', label: '轮胎规格',
...@@ -519,6 +625,10 @@ const secondObj = { ...@@ -519,6 +625,10 @@ const secondObj = {
type: 'slot', type: 'slot',
labelWidth: '0rpx', labelWidth: '0rpx',
noCellHeight: true, noCellHeight: true,
isShowObj: {
attr: 'tireFlag',
list: ['1']
},
tireObj: { tireObj: {
tire: '' tire: ''
}, },
...@@ -650,7 +760,7 @@ const secondObj = { ...@@ -650,7 +760,7 @@ const secondObj = {
maxlength: '100' maxlength: '100'
} }
], ],
retrofitList:[{ retrofitList: [{
label: ' ', label: ' ',
name: 'upload', name: 'upload',
type: 'slot', type: 'slot',
...@@ -665,5 +775,6 @@ export default { ...@@ -665,5 +775,6 @@ export default {
formRule, formRule,
energyFormRule, energyFormRule,
oilFormRule, oilFormRule,
secondObj secondObj,
extendServiceFormRule
} }
...@@ -100,6 +100,12 @@ Page({ ...@@ -100,6 +100,12 @@ Page({
if (item.vehicleRegistrationDate) { if (item.vehicleRegistrationDate) {
item.vehicleRegistrationDate = new Date(item.vehicleRegistrationDate).format('yyyy-MM-dd') item.vehicleRegistrationDate = new Date(item.vehicleRegistrationDate).format('yyyy-MM-dd')
} }
if (item.buyDate) {
item.buyDate = new Date(item.buyDate).format('yyyy-MM-dd')
}
if (item.qualityBeginDate) {
item.qualityBeginDate = new Date(item.qualityBeginDate).format('yyyy-MM-dd')
}
if (item.itemsCode == 'YB0003') { if (item.itemsCode == 'YB0003') {
item.gearbox = item.gearbox || '' item.gearbox = item.gearbox || ''
item.vehicleNature = typeof item.vehicleNature == 'number' ? item.vehicleNature : 1 item.vehicleNature = typeof item.vehicleNature == 'number' ? item.vehicleNature : 1
...@@ -186,6 +192,9 @@ Page({ ...@@ -186,6 +192,9 @@ Page({
this.getInterestCardSetting(data.goodId) this.getInterestCardSetting(data.goodId)
} }
// data.attachmentList = data.attachmentList // data.attachmentList = data.attachmentList
data?.goodInfoList?.forEach(val => {
if (val.printType == 2 && !['YB0001', 'YB0002', 'YB0003'].includes(val.itemsCode)) val.displacementPowerFlag = val.displacementPowerFlag || 0 // 默认是选中排量
})
this.setData({ this.setData({
serviceInfo: data, serviceInfo: data,
['serviceInfo.attachmentList']:data?.attachmentList||[], ['serviceInfo.attachmentList']:data?.attachmentList||[],
......
...@@ -148,6 +148,9 @@ Component({ ...@@ -148,6 +148,9 @@ Component({
// 获取推荐人列表 // 获取推荐人列表
getEmployee() { getEmployee() {
let userInfo = wx.$util.getStorageSync('dj_boutique_user_info') let userInfo = wx.$util.getStorageSync('dj_boutique_user_info')
this.setData({
userInfo
})
let params = { let params = {
merchantId: userInfo.default4SStoreInfo.merchantId merchantId: userInfo.default4SStoreInfo.merchantId
} }
...@@ -241,7 +244,25 @@ Component({ ...@@ -241,7 +244,25 @@ Component({
}, },
// 品牌车型 // 品牌车型
handleJumpBrand(e) { handleJumpBrand(e) {
wx.$router.go('packageEquity.carBrands') // wx.$router.go('packageEquity.carBrands')
this.setData({
showCarBrands: true, // 选择时再加载车型组件
carBrandBox: true
})
},
chooseCar(e) {
let { dataAttrName } = this.data
let { carBrand, carBrandId, carChildsBrandId, carChildsBrandName, carSeriesId, carSeriesName } = e.detail
let thisPage = wx.$router.getPageInstance()
thisPage.setData({
[dataAttrName + '.' + 'carBrand']: carBrand,
[dataAttrName + '.' + 'carBrandId']: carBrandId,
[dataAttrName + '.' + 'carChildsBrandId']: carChildsBrandId,
[dataAttrName + '.' + 'carChildsBrandName']: carChildsBrandName,
[dataAttrName + '.' + 'carSeriesId']: carSeriesId,
[dataAttrName + '.' + 'carSeriesName']: carSeriesName
})
}, },
/**获取园区配置 */ /**获取园区配置 */
async getYqStoreConfig() { async getYqStoreConfig() {
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
"gl-form": "/packageEquity/components/GLForm/GLForm", "gl-form": "/packageEquity/components/GLForm/GLForm",
"Gl-Button-Group": "../../../../components/GlButtonGroup/GlButtonGroup", "Gl-Button-Group": "../../../../components/GlButtonGroup/GlButtonGroup",
"store-referrer-picker": "../storeReferrerPicker/storeReferrerPicker", "store-referrer-picker": "../storeReferrerPicker/storeReferrerPicker",
"customerInfo": "/components/CustomerInfo/CustomerInfo" "customerInfo": "/components/CustomerInfo/CustomerInfo",
"car-brands": "/components/CarBrands/CarBrands"
} }
} }
...@@ -49,7 +49,7 @@ ...@@ -49,7 +49,7 @@
<gl-form disable="{{disable}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" bind:inputEvent="inputEvent" formDataList="{{first.carFormList}}"> <gl-form disable="{{disable}}" formData="{{serviceInfo}}" dataAttrName="{{dataAttrName}}" bind:inputEvent="inputEvent" formDataList="{{first.carFormList}}">
<view slot="brands" class="brand" bindtap="handleJumpBrand"> <view slot="brands" class="brand" bindtap="handleJumpBrand">
<view wx:if="{{serviceInfo.carBrandId}}"> <view wx:if="{{serviceInfo.carBrandId}}">
{{serviceInfo.carBrand || ''}}/{{serviceInfo.carChildsBrandName || ''}}/{{serviceInfo.carSeriesName || ''}} {{serviceInfo.carBrand || ''}}-{{serviceInfo.carChildsBrandName || ''}}-{{serviceInfo.carSeriesName || ''}}
</view> </view>
<view wx:else class="placeholder-class">请选择</view> <view wx:else class="placeholder-class">请选择</view>
</view> </view>
...@@ -59,4 +59,6 @@ ...@@ -59,4 +59,6 @@
</view> </view>
<store-referrer-picker bindconfirm="handleSalesChange" show="{{referrerPicker}}" referrerId="{{orderInfo.referrerId}}" pickerListAll="{{employeeList}}" /> <store-referrer-picker bindconfirm="handleSalesChange" show="{{referrerPicker}}" referrerId="{{orderInfo.referrerId}}" pickerListAll="{{employeeList}}" />
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" apiType="2" />
\ No newline at end of file \ No newline at end of file
<customerInfo show="{{ customerInfoBox }}" bindconfirm="chooseCustomerInfo" apiType="2" />
<car-brands show="{{ carBrandBox }}" bindconfirm="chooseCar" carSeriesId="{{ serviceInfo.carSeriesId || '' }}" equityFlag="true" merchantId="{{ userInfo.default4SStoreInfo.merchantId || undefined }}" />
\ No newline at end of file \ No newline at end of file
...@@ -293,7 +293,7 @@ Component({ ...@@ -293,7 +293,7 @@ Component({
name = c.goods.goodsAlias || c.goods.upgradeGoodsName || c.goods.goodsName name = c.goods.goodsAlias || c.goods.upgradeGoodsName || c.goods.goodsName
} }
if (c.packageGoods) { if (c.packageGoods) {
name = c.packageGoods.packageName name = c.packageGoods.packageAlias || c.packageGoods.packageName
} }
if (name.indexOf(value) != -1) { if (name.indexOf(value) != -1) {
arr.push(c) arr.push(c)
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
<view class="childbox"> <view class="childbox">
<view class="item"> <view class="item">
<view class="name text-hide "> <view class="name text-hide ">
<view>{{i.packageGoods.packageName}}</view> <view>{{i.packageGoods.packageAlias || i.packageGoods.packageName}}</view>
</view> </view>
<view class="last"> <view class="last">
<text class="price">¥{{i.packageGoods.sellPrice}}</text> <text class="price">¥{{i.packageGoods.sellPrice}}</text>
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
<view class="deleteicon" bindtap="delGoodsList" data-index="{{ index }}"> <view class="deleteicon" bindtap="delGoodsList" data-index="{{ index }}">
<image src="./images/del.png" /> <image src="./images/del.png" />
</view> </view>
<view class="name text-hide">{{item.packageGoods.packageName}}</view> <view class="name text-hide">{{item.packageGoods.packageAlias || item.packageGoods.packageNameAlias || item.packageGoods.packageName}}</view>
<view class="package-price">¥{{item.price}}</view> <view class="package-price">¥{{item.price}}</view>
<!-- <view class="count" catchtap="showPopup" data-show-name="goodsBox">x{{item.count||1}}</view> --> <!-- <view class="count" catchtap="showPopup" data-show-name="goodsBox">x{{item.count||1}}</view> -->
</view> </view>
......
...@@ -440,6 +440,7 @@ Page({ ...@@ -440,6 +440,7 @@ Page({
let obj = { let obj = {
packageId: item.packageCode, packageId: item.packageCode,
packageName: item.packageName, packageName: item.packageName,
packageNameAlias: item.packageAlias || item.packageNameAlias,
goodsId: ele.merchantGoodsId || ele.upgradeGoodsId, goodsId: ele.merchantGoodsId || ele.upgradeGoodsId,
goodsName: ele.upgradeGoodsName || ele.goodsName, goodsName: ele.upgradeGoodsName || ele.goodsName,
goodsNameAlias: ele.goodsAlias || ele.goodsNameAlias, goodsNameAlias: ele.goodsAlias || ele.goodsNameAlias,
......
...@@ -222,6 +222,7 @@ Page({ ...@@ -222,6 +222,7 @@ Page({
let obj = { let obj = {
packageId: item.packageCode, packageId: item.packageCode,
packageName: item.packageName, packageName: item.packageName,
packageNameAlias: item.packageAlias || item.packageNameAlias,
goodsId: ele.merchantGoodsId || ele.upgradeGoodsId, goodsId: ele.merchantGoodsId || ele.upgradeGoodsId,
goodsName: ele.upgradeGoodsName || ele.goodsName, goodsName: ele.upgradeGoodsName || ele.goodsName,
goodsNameAlias: ele.goodsAlias || ele.goodsNameAlias, goodsNameAlias: ele.goodsAlias || ele.goodsNameAlias,
...@@ -292,6 +293,7 @@ Page({ ...@@ -292,6 +293,7 @@ Page({
let obj = { let obj = {
packageId: packageGoods.packageCode, packageId: packageGoods.packageCode,
packageName: packageGoods.packageName, packageName: packageGoods.packageName,
packageNameAlias: packageGoods.packageAlias || pachageGoods.packageNameAlias,
goodsId: ele.goodsId, goodsId: ele.goodsId,
goodsName: ele.goodsName, goodsName: ele.goodsName,
goodsNameAlias: ele.goodsNameAlias, goodsNameAlias: ele.goodsNameAlias,
......
...@@ -294,6 +294,7 @@ Page({ ...@@ -294,6 +294,7 @@ Page({
let obj = { let obj = {
packageId: item.packageCode, packageId: item.packageCode,
packageName: item.packageName, packageName: item.packageName,
packageNameAlias: item.packageAlias || item.packageNameAlias,
goodsId: ele.merchantGoodsId || ele.upgradeGoodsId, goodsId: ele.merchantGoodsId || ele.upgradeGoodsId,
goodsName: ele.upgradeGoodsName || ele.goodsName, goodsName: ele.upgradeGoodsName || ele.goodsName,
goodsNameAlias: ele.goodsAlias || ele.goodsNameAlias, goodsNameAlias: ele.goodsAlias || ele.goodsNameAlias,
...@@ -364,6 +365,7 @@ Page({ ...@@ -364,6 +365,7 @@ Page({
let obj = { let obj = {
packageId: packageGoods.packageCode, packageId: packageGoods.packageCode,
packageName: packageGoods.packageName, packageName: packageGoods.packageName,
packageNameAlias: packageGoods.packageAlias || packageGoods.packageNameAlias,
goodsId: ele.goodsId, goodsId: ele.goodsId,
goodsName: ele.goodsName, goodsName: ele.goodsName,
goodsNameAlias: ele.goodsNameAlias, goodsNameAlias: ele.goodsNameAlias,
......
...@@ -372,6 +372,17 @@ export const getPositionList = options => { ...@@ -372,6 +372,17 @@ export const getPositionList = options => {
api.getPositionList({}).then(res => { api.getPositionList({}).then(res => {
let { code, data } = res let { code, data } = res
if (code == 0) { if (code == 0) {
// const namReplaceobj = {
// 2: '前侧窗玻璃',
// 3: '后侧窗玻璃',
// 4: '后挡'
// }
// data = data.map(item => {
// if (namReplaceobj[item.positionValue]) {
// item.positionName = namReplaceobj[item.positionValue]
// }
// return item;
// })
app.globalData.positionTypeList = data app.globalData.positionTypeList = data
} }
resolve(app.globalData.positionTypeList) resolve(app.globalData.positionTypeList)
......
...@@ -26,6 +26,8 @@ Page({ ...@@ -26,6 +26,8 @@ Page({
skylight: "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/skylight.png", skylight: "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/skylight.png",
tricorn: "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/tricorn.png", tricorn: "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/tricorn.png",
windshield: "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/windshield.png", windshield: "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/windshield.png",
sideIcorn: "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/sideIcon.png",
afterIcorn: "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/afterIcon.png",
scanIcon: scanIcon:
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/ocr_icon.png", "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/ocr_icon.png",
selectIcon: selectIcon:
...@@ -97,6 +99,8 @@ Page({ ...@@ -97,6 +99,8 @@ Page({
frontGearArr: [], // 前挡 frontGearArr: [], // 前挡
sideRearGearArr: [], // 侧后挡 sideRearGearArr: [], // 侧后挡
skylightArr: [], // 天窗 skylightArr: [], // 天窗
sideBeforeRearGearArr: [], // 前侧窗玻璃
sideAfterRearGearArr: [], // 后档
baseConfigData: {}, baseConfigData: {},
showSource: false, showSource: false,
Sourcecolumns: [ Sourcecolumns: [
...@@ -213,7 +217,8 @@ Page({ ...@@ -213,7 +217,8 @@ Page({
orderObj: { selectPayType }, orderObj: { selectPayType },
baseConfigData, baseConfigData,
} = this.data; } = this.data;
let { showName, type } = e.currentTarget.dataset; let { showName, type, positionnnum: positionNum } = e.currentTarget.dataset;
console.log(positionNum, 'positionNum');
let arr = []; let arr = [];
if (showName == "goodsBox") { if (showName == "goodsBox") {
// type 产品类型 1前挡 2侧后挡 3天窗 4其它精品 根据类型过滤显示商品弹窗数据 // type 产品类型 1前挡 2侧后挡 3天窗 4其它精品 根据类型过滤显示商品弹窗数据
...@@ -248,9 +253,10 @@ Page({ ...@@ -248,9 +253,10 @@ Page({
) )
arr[i].upgradeGoodsList = arr2; arr[i].upgradeGoodsList = arr2;
} }
console.log([positionNum], [positionNum].includes(subVal.merchantGoodsPosition));
if ( if (
type == 2 && type == 2 &&
[2, 3, 4].includes(subVal.merchantGoodsPosition) [Number(positionNum)].includes(subVal.merchantGoodsPosition)
) { ) {
arr2.push(subVal); arr2.push(subVal);
if ( if (
...@@ -452,8 +458,11 @@ Page({ ...@@ -452,8 +458,11 @@ Page({
setGoodsTotal(goodsList) { setGoodsTotal(goodsList) {
let total = 0; let total = 0;
goodsList.forEach((i) => { goodsList.forEach((i) => {
console.log(i.shopMinPrice, i.price, i.shopMinPrice > i.price, ' i.shopMinPrice > i.price');
if (i.validMinSellPrice == 'Y' && i.shopMinPrice > i.price) { if (i.validMinSellPrice == 'Y' && i.shopMinPrice > i.price) {
i.errorTarget = true i.errorTarget = true
} else {
i.errorTarget = false
} }
if (i.goodsList) { if (i.goodsList) {
i.goodsList.forEach((item) => { i.goodsList.forEach((item) => {
...@@ -1020,7 +1029,9 @@ Page({ ...@@ -1020,7 +1029,9 @@ Page({
first, first,
orderObj, orderObj,
frontGearArr, // 前挡 frontGearArr, // 前挡
sideBeforeRearGearArr, // 前侧窗玻璃
sideRearGearArr, // 侧后挡 sideRearGearArr, // 侧后挡
sideAfterRearGearArr, // 后档
skylightArr, // 天窗 skylightArr, // 天窗
} = this.data; } = this.data;
let { subOrderList } = orderObj; let { subOrderList } = orderObj;
...@@ -1040,7 +1051,7 @@ Page({ ...@@ -1040,7 +1051,7 @@ Page({
}) })
.then((res) => { .then((res) => {
let { code, data, message } = res; let { code, data, message } = res;
console.log(subOrderList, 'subOrderList') console.log(subOrderList, res, 'subOrderList')
if (code == 0) { if (code == 0) {
wx.hideLoading(); wx.hideLoading();
data?.forEach((val) => { data?.forEach((val) => {
...@@ -1049,9 +1060,16 @@ Page({ ...@@ -1049,9 +1060,16 @@ Page({
if ([1].includes(subVal.merchantGoodsPosition)) { if ([1].includes(subVal.merchantGoodsPosition)) {
frontGearArr.push(subVal); frontGearArr.push(subVal);
} }
if ([2, 3, 4].includes(subVal.merchantGoodsPosition)) {
if ([2].includes(subVal.merchantGoodsPosition)) {
sideBeforeRearGearArr.push(subVal);
}
if ([3,].includes(subVal.merchantGoodsPosition)) {
sideRearGearArr.push(subVal); sideRearGearArr.push(subVal);
} }
if ([4].includes(subVal.merchantGoodsPosition)) {
sideAfterRearGearArr.push(subVal);
}
if ([5, 6, 7].includes(subVal.merchantGoodsPosition)) { if ([5, 6, 7].includes(subVal.merchantGoodsPosition)) {
skylightArr.push(subVal); skylightArr.push(subVal);
} }
...@@ -1063,8 +1081,10 @@ Page({ ...@@ -1063,8 +1081,10 @@ Page({
subV.upgradeGoodsPosition && subV.upgradeGoodsPosition &&
subVal.merchantGoodsPosition != subV.upgradeGoodsPosition && subVal.merchantGoodsPosition != subV.upgradeGoodsPosition &&
subVal.upgradeGoodsId == subV.upgradeGoodsId subVal.upgradeGoodsId == subV.upgradeGoodsId
) ) {
debugger
subV.upgradeGoodsPosition = subVal.merchantGoodsPosition; subV.upgradeGoodsPosition = subVal.merchantGoodsPosition;
}
}); });
} }
}); });
...@@ -1124,6 +1144,8 @@ Page({ ...@@ -1124,6 +1144,8 @@ Page({
copyGoodsData: goodsData, copyGoodsData: goodsData,
goodsList: subOrderList, goodsList: subOrderList,
frontGearArr, frontGearArr,
sideBeforeRearGearArr,
sideAfterRearGearArr,
sideRearGearArr, sideRearGearArr,
skylightArr, skylightArr,
// orderObj // orderObj
......
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<gl-cell border valueAlign="right" label="精品礼券" labelWidth="var(--fontSize140)" haveArrow requiredAfter required value="{{ (orderObj.couponName || '') + (orderObj.customerCouponCode || '') }}" placeholder="点击选择" bindclick="showPopup" data-show-name="couponBox" disabled="{{ orderObj.orderSource == 5 }}" /> <gl-cell border valueAlign="right" label="精品礼券" labelWidth="var(--fontSize140)" haveArrow requiredAfter required value="{{ (orderObj.couponName || '') + (orderObj.customerCouponCode || '') }}" placeholder="点击选择" bindclick="showPopup" data-show-name="couponBox" disabled="{{ orderObj.orderSource == 5 }}" />
<!-- class="{{orderObj.selectPayType ==0?'item-disabled':''}}" --> <!-- class="{{orderObj.selectPayType ==0?'item-disabled':''}}" -->
<view class="goods_box"> <view class="goods_box">
<view class="label" style="margin-bottom: {{ !frontGearArr.length && !sideRearGearArr.length && !skylightArr.length ? 'var(--fontSize40)' : '' }};"> <view class="label" style="margin-bottom: {{ !frontGearArr.length && !sideRearGearArr.length && !skylightArr.length&&!sideBeforeRearGearArr.length&&!sideAfterRearGearArr.length ? 'var(--fontSize40)' : '' }};">
请选择产品 请选择产品
<text class="required">*</text> <text class="required">*</text>
</view> </view>
...@@ -148,13 +148,79 @@ ...@@ -148,13 +148,79 @@
</view> </view>
</block> </block>
</block> </block>
<block wx:if="{{ sideBeforeRearGearArr.length }}">
<gl-cell border valueAlign="right" label="前侧窗玻璃" logoSrc="{{ tricorn }}" labelWidth="var(--fontSize180)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="2" data-positionnnum="2" />
<block wx:if="{{ goodsList.length > 0 }}">
<view class="goods-box">
<block wx:for="{{ goodsList }}" wx:key="index">
<!-- 前侧窗玻璃 -->
<view class="goods" wx:if="{{ filter.filterIncludes((item.merchantGoodsPosition || item.upgradeGoodsPosition), [2]) }}">
<view class="name_box">
<view class="name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}}
</view>
</view>
<view class="bottom_box">
<!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 -->
<view class="position" wx:if="{{ (item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) }}">{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view>
<view class="position red_text" wx:if="{{ (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition }}">无部位属性</view>
<view class="position" wx:else></view>
<view class="price_count">
<view class="price">
<text>¥</text>
<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 class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
</view>
</view>
<view class="icon" bindtap="delGoodsList" data-index="{{ index }}">
<image src="../../images/del.png" />
</view>
</view>
</block>
</view>
</block>
</block>
<block wx:if="{{ sideRearGearArr.length }}"> <block wx:if="{{ sideRearGearArr.length }}">
<gl-cell border valueAlign="right" label="侧后挡" logoSrc="{{ tricorn }}" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="2" /> <gl-cell border valueAlign="right" label="后侧窗玻璃" logoSrc="{{ sideIcorn }}" labelWidth="var(--fontSize180)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="2" data-positionnnum="3" />
<block wx:if="{{ goodsList.length > 0 }}">
<view class="goods-box">
<block wx:for="{{ goodsList }}" wx:key="index">
<!-- 后侧窗玻璃 -->
<view class="goods" wx:if="{{ filter.filterIncludes((item.merchantGoodsPosition || item.upgradeGoodsPosition), [3]) }}">
<view class="name_box">
<view class="name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}}
</view>
</view>
<view class="bottom_box">
<!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 -->
<view class="position" wx:if="{{ (item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) }}">{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view>
<view class="position red_text" wx:if="{{ (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition }}">无部位属性</view>
<view class="position" wx:else></view>
<view class="price_count">
<view class="price">
<text>¥</text>
<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 class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
</view>
</view>
<view class="icon" bindtap="delGoodsList" data-index="{{ index }}">
<image src="../../images/del.png" />
</view>
</view>
</block>
</view>
</block>
</block>
<block wx:if="{{ sideAfterRearGearArr.length }}">
<gl-cell border valueAlign="right" label="后档" logoSrc="{{ afterIcorn }}" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-type="2" data-positionnnum="4" />
<block wx:if="{{ goodsList.length > 0 }}"> <block wx:if="{{ goodsList.length > 0 }}">
<view class="goods-box"> <view class="goods-box">
<block wx:for="{{ goodsList }}" wx:key="index"> <block wx:for="{{ goodsList }}" wx:key="index">
<!-- 侧后挡 --> <!-- 后档 -->
<view class="goods" wx:if="{{ filter.filterIncludes((item.merchantGoodsPosition || item.upgradeGoodsPosition), [2, 3, 4]) }}"> <view class="goods" wx:if="{{ filter.filterIncludes((item.merchantGoodsPosition || item.upgradeGoodsPosition), [4]) }}">
<view class="name_box"> <view class="name_box">
<view class="name text-hide"> <view class="name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}} {{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}}
......
// tabWorkOrder/pages/defeatOrder/defeatOrder.js // tabWorkOrder/pages/defeatOrder/defeatOrder.js
import api from "../../api"; import api from '../../api'
import api2 from "~/api/api.js"; import api2 from '~/api/api.js'
import { getYQorderInfo, getPositionList, setConfigInfo } from "~/store/index"; import { getYQorderInfo, getPositionList, setConfigInfo } from '~/store/index'
const phoneRex = /^[1]([3-9])[0-9]{9}$/; const phoneRex = /^[1]([3-9])[0-9]{9}$/
const app = getApp(); const app = getApp()
let toastList = { let toastList = {
employeeName: "销售顾问不能为空", employeeName: '销售顾问不能为空',
subShopMerchantId: "二级流量方不能为空", subShopMerchantId: '二级流量方不能为空',
sellerUserId: "转化人员不能为空", sellerUserId: '转化人员不能为空',
refusalReason: "拒升理由不能为空", refusalReason: '拒升理由不能为空'
}; }
import { ImgUrl } from "~/config"; import { ImgUrl } from '~/config'
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
...@@ -18,8 +18,13 @@ Page({ ...@@ -18,8 +18,13 @@ Page({
data: { data: {
IMG_URL: ImgUrl, IMG_URL: ImgUrl,
scanIcon: scanIcon:
"https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/ocr_icon.png", 'https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/ocr_icon.png',
name: "createdOrder", skylight: "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/skylight.png",
tricorn: "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/tricorn.png",
windshield: "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/windshield.png",
sideIcorn: "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/sideIcon.png",
afterIcorn: "https://img02.glsx.com.cn/weapp/resource/dj-car-boutique-work-wechat/miniProgram/afterIcon.png",
name: 'createdOrder',
shortcutList: [], shortcutList: [],
phoneShow: false, phoneShow: false,
orderObj: {}, orderObj: {},
...@@ -28,25 +33,25 @@ Page({ ...@@ -28,25 +33,25 @@ Page({
notUpgradeOrderList: [ notUpgradeOrderList: [
{ {
customer: { customer: {
customerName: "", customerName: '',
customerPhone: "", customerPhone: '',
standNo: "", standNo: '',
plateNumber: "", plateNumber: '',
customerSex: 1, customerSex: 1,
experienceFlag: "Y", experienceFlag: 'Y'
}, },
confirmIndex: false, confirmIndex: false,
subOrderList: [], subOrderList: []
}, }
], ],
dateObj: { dateObj: {
beforeDay: "", beforeDay: '',
today: "", today: '',
nextDay: "", nextDay: '',
maxDate: "", maxDate: '',
todayShow: "", todayShow: ''
}, },
toView: "", toView: '',
typeIndx: 0, typeIndx: 0,
isPlateNumber: false, isPlateNumber: false,
isStandNo: false, isStandNo: false,
...@@ -55,66 +60,71 @@ Page({ ...@@ -55,66 +60,71 @@ Page({
isShowSubShopMerchant: false, isShowSubShopMerchant: false,
requiredList: [], requiredList: [],
tipsProps: { tipsProps: {
tipsText: "本表单用于快速生成战败客户订单", tipsText: '本表单用于快速生成战败客户订单',
showTips: false, showTips: false,
type: 1, type: 1
}, },
selectCustomIndex: 0, // 选择产品对应客户 selectCustomIndex: 0, // 选择产品对应客户
copyGoodsData: [], copyGoodsData: [],
frontGearArr: [], frontGearArr: [], // 前挡
sideRearGearArr: [], sideRearGearArr: [], // 侧后挡
skylightArr: [], skylightArr: [], // 天窗
sideBeforeRearGearArr: [], // 前侧窗玻璃
sideAfterRearGearArr: [], // 后档
customerInfoBox: false, customerInfoBox: false,
baseConfigData: {}, baseConfigData: {}
}, },
routerBack() { routerBack() {
wx.$router.back(); wx.$router.back()
}, },
reWrite(type, data) { reWrite(type, data) {
let { notUpgradeOrderList, typeIndx } = this.data; let { notUpgradeOrderList, typeIndx } = this.data
notUpgradeOrderList[typeIndx][type] = data; notUpgradeOrderList[typeIndx][type] = data
this.setData({ this.setData({
notUpgradeOrderList, notUpgradeOrderList
}); })
}, },
navOcr(e) { navOcr(e) {
let { type, index } = e.currentTarget.dataset; let { type, index } = e.currentTarget.dataset
this.setData({ this.setData({
typeIndx: index, typeIndx: index
}); })
wx.$router.go(`ocr?type=${type}`); wx.$router.go(`ocr?type=${type}`)
}, },
changeExperience(e) { changeExperience(e) {
// let { gender, index } = e.currentTarget.dataset // let { gender, index } = e.currentTarget.dataset
let { experience, index } = e.currentTarget.dataset; let { experience, index } = e.currentTarget.dataset
let prop = `notUpgradeOrderList[${index}].customer.experienceFlag`; let prop = `notUpgradeOrderList[${index}].customer.experienceFlag`
this.setData({ this.setData({
[prop]: experience, [prop]: experience
}); })
// console.log(experience) // console.log(experience)
wx.vibrateShort(); wx.vibrateShort()
// this.setData({ // this.setData({
// ['orderObj.customer.experienceFlag']: experience // ['orderObj.customer.experienceFlag']: experience
// }) // })
}, },
// 选择产品确定 // 选择产品确定
chooseGoods(e) { chooseGoods(e) {
let { selectCustomIndex } = this.data; let { selectCustomIndex } = this.data
let arr = e.detail || []; let arr = e.detail || []
let subOrderListProp = `notUpgradeOrderList[${selectCustomIndex}].subOrderList`; let subOrderListProp = `notUpgradeOrderList[${selectCustomIndex}].subOrderList`
this.setData({ this.setData({
[subOrderListProp]: arr, [subOrderListProp]: arr
}); })
}, },
chooseCustomerInfo(e) { chooseCustomerInfo(e) {
let { detail } = e; let { detail } = e
let { selectCustomIndex } = this.data; console.log(detail, 'detail')
let prop = `notUpgradeOrderList[${selectCustomIndex}].customer`; let { selectCustomIndex } = this.data
let propCustomer = `notUpgradeOrderList[${selectCustomIndex}].customer`
let prop = `notUpgradeOrderList[${selectCustomIndex}]`
this.setData({ this.setData({
[prop]: { [propCustomer]: {
customerName: detail.customer.customerName, customerName: detail.customer.customerName,
customerSex: detail.customer.customerSex, customerSex: detail.customer.customerSex,
customerPhone: detail.customer.customerPhone, customerPhone: detail.customer.customerPhone,
carBrandId: detail.customer.carBrandId, carBrandId: detail.customer.carBrandId,
carBrand: detail.customer.carBrand, carBrand: detail.customer.carBrand,
carChildsBrandId: detail.customer.carChildsBrandId, carChildsBrandId: detail.customer.carChildsBrandId,
...@@ -123,153 +133,156 @@ Page({ ...@@ -123,153 +133,156 @@ Page({
carSeriesName: detail.customer.carSeriesName, carSeriesName: detail.customer.carSeriesName,
standNo: detail.customer.standNo, standNo: detail.customer.standNo,
plateNumber: detail.customer.plateNumber, plateNumber: detail.customer.plateNumber,
experienceFlag: detail.customer.experienceFlag || 'Y'
}, },
}); [prop + '.customerCouponCode']: detail.customerCoupon?.customerCouponCode,
[prop + '.customerCouponId']: detail?.customerCouponId, // 客户券id
})
}, },
showCustomPop(e) { showCustomPop(e) {
let { index } = e.currentTarget.dataset; let { index } = e.currentTarget.dataset
this.setData({ this.setData({
customerInfoBox: true, customerInfoBox: true,
selectCustomIndex: index, selectCustomIndex: index
}); })
}, },
addUserItem() { addUserItem() {
let { notUpgradeOrderList, copyGoodsData, shortcutList } = this.data; let { notUpgradeOrderList, copyGoodsData, shortcutList } = this.data
if (notUpgradeOrderList.length >= 10) return; if (notUpgradeOrderList.length >= 10) return
notUpgradeOrderList.push({ notUpgradeOrderList.push({
customer: { customer: {
customerName: "", customerName: '',
customerPhone: "", customerPhone: '',
standNo: "", standNo: '',
customerSex: 1, customerSex: 1,
plateNumber: "", plateNumber: '',
experienceFlag: "Y", experienceFlag: 'Y'
}, },
shortcutList: wx.$util.deepClone(shortcutList), 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'
}); })
}, 0); }, 0)
}, },
/**设置日期 */ /**设置日期 */
setTimeList(dateNum) { setTimeList(dateNum) {
let maxDate = new Date().format("yyyy-MM-dd"); let maxDate = new Date().format('yyyy-MM-dd')
let today = dateNum || new Date().format("yyyy-MM-dd"); let today = dateNum || new Date().format('yyyy-MM-dd')
/** /**
* 根据日期字符串获取星期几 * 根据日期字符串获取星期几
* @param dateString 日期字符串(如:2020-05-02) * @param dateString 日期字符串(如:2020-05-02)
* @returns {String} * @returns {String}
*/ */
var dateArray = today.split("-"); var dateArray = today.split('-')
let date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2]); let date = new Date(dateArray[0], parseInt(dateArray[1] - 1), dateArray[2])
let todayShow = " 周" + "日一二三四五六".charAt(date.getDay()); let todayShow = ' 周' + '日一二三四五六'.charAt(date.getDay())
todayShow = todayShow =
dateArray[0] + dateArray[0] +
"年" + '年' +
dateArray[1] + dateArray[1] +
"月" + '月' +
dateArray[2] + dateArray[2] +
"日 " + '日 ' +
todayShow; todayShow
this.setData({ this.setData({
dateObj: { dateObj: {
today, today,
maxDate, maxDate,
todayShow, todayShow
}, }
}); })
}, },
chooseCar(e) { chooseCar(e) {
let { selectCustomIndex, notUpgradeOrderList } = this.data; let { selectCustomIndex, notUpgradeOrderList } = this.data
notUpgradeOrderList[selectCustomIndex] = { notUpgradeOrderList[selectCustomIndex] = {
...notUpgradeOrderList[selectCustomIndex], ...notUpgradeOrderList[selectCustomIndex],
customer: { customer: {
...notUpgradeOrderList[selectCustomIndex].customer, ...notUpgradeOrderList[selectCustomIndex].customer,
...e.detail, ...e.detail
}, }
}; }
this.setData({ this.setData({
notUpgradeOrderList, notUpgradeOrderList
}); })
}, },
dateChange(e) { dateChange(e) {
let { type } = e.currentTarget.dataset; let { type } = e.currentTarget.dataset
let { dateObj } = this.data; let { dateObj } = this.data
this.calendar = this.selectComponent("#calender"); this.calendar = this.selectComponent('#calender')
if (type == "before") { if (type == 'before') {
this.setTimeList(dateObj.beforeDay); this.setTimeList(dateObj.beforeDay)
} else { } else {
this.setTimeList(dateObj.nextDay); this.setTimeList(dateObj.nextDay)
} }
this.calendar.resetData( this.calendar.resetData(
type == "before" ? dateObj.beforeDay : dateObj.nextDay type == 'before' ? dateObj.beforeDay : dateObj.nextDay
); )
}, },
// 获取选中天数 // 获取选中天数
rangeSelect(e) { rangeSelect(e) {
let { date } = e.detail; let { date } = e.detail
this.setTimeList(date); this.setTimeList(date)
}, },
delBtn(e) { delBtn(e) {
let ind = e.currentTarget.dataset.ind; let ind = e.currentTarget.dataset.ind
let { notUpgradeOrderList } = this.data; let { notUpgradeOrderList } = this.data
notUpgradeOrderList.splice(ind, 1); notUpgradeOrderList.splice(ind, 1)
this.setData({ this.setData({
notUpgradeOrderList, notUpgradeOrderList
}); })
}, },
touchE: function (e) { touchE: function (e) {
var that = this; var that = this
if (e.changedTouches.length == 1) { if (e.changedTouches.length == 1) {
//手指移动结束后触摸点位置的X坐标 //手指移动结束后触摸点位置的X坐标
var endX = e.changedTouches[0].clientX; var endX = e.changedTouches[0].clientX
//触摸开始与结束,手指移动的距离 //触摸开始与结束,手指移动的距离
var disX = that.data.startX - endX; var disX = that.data.startX - endX
var delBtnWidth = that.data.delBtnWidth; var delBtnWidth = that.data.delBtnWidth
//如果距离小于删除按钮的1/2,不显示删除按钮 //如果距离小于删除按钮的1/2,不显示删除按钮
var txtStyle = var txtStyle =
disX > delBtnWidth / 2 ? "left:-" + delBtnWidth + "rpx" : "left:0"; disX > delBtnWidth / 2 ? 'left:-' + delBtnWidth + 'rpx' : 'left:0'
//获取手指触摸的是哪一项 //获取手指触摸的是哪一项
var index = e.currentTarget.dataset.index; var index = e.currentTarget.dataset.index
var ind = e.currentTarget.dataset.ind; var ind = e.currentTarget.dataset.ind
var notUpgradeOrderList = that.data.notUpgradeOrderList; var notUpgradeOrderList = that.data.notUpgradeOrderList
notUpgradeOrderList[index].txtStyle = txtStyle; notUpgradeOrderList[index].txtStyle = txtStyle
//更新列表的状态 //更新列表的状态
that.setData({ that.setData({
notUpgradeOrderList, notUpgradeOrderList
}); })
} }
}, },
//手指触摸动作开始 记录起点X坐标 //手指触摸动作开始 记录起点X坐标
touchstart: function (e) { touchstart: function (e) {
//开始触摸时 重置所有删除 //开始触摸时 重置所有删除
this.data.notUpgradeOrderList.forEach((item) => { this.data.notUpgradeOrderList.forEach(item => {
item.isTouchMove = false; item.isTouchMove = false
item.confirmIndex = false; item.confirmIndex = false
}); })
this.setData({ this.setData({
startX: e.changedTouches[0].clientX, startX: e.changedTouches[0].clientX,
startY: e.changedTouches[0].clientY, startY: e.changedTouches[0].clientY,
notUpgradeOrderList: this.data.notUpgradeOrderList, notUpgradeOrderList: this.data.notUpgradeOrderList
}); })
}, },
//滑动事件处理 //滑动事件处理
touchmove: function (e) { touchmove: function (e) {
let { notUpgradeOrderList } = this.data; let { notUpgradeOrderList } = this.data
// 为1就不能再删除了 // 为1就不能再删除了
if (notUpgradeOrderList.length == 1) return; if (notUpgradeOrderList.length == 1) return
var that = this, var that = this,
// index = e.currentTarget.dataset.index, //当前索引 // index = e.currentTarget.dataset.index, //当前索引
...@@ -282,29 +295,29 @@ Page({ ...@@ -282,29 +295,29 @@ Page({
angle = that.angle( angle = that.angle(
{ {
X: startX, X: startX,
Y: startY, Y: startY
}, },
{ {
X: touchMoveX, X: touchMoveX,
Y: touchMoveY, Y: touchMoveY
} }
); )
notUpgradeOrderList.forEach(function (v, i) { notUpgradeOrderList.forEach(function (v, i) {
v.isTouchMove = false; v.isTouchMove = false
//滑动超过30度角 return //滑动超过30度角 return
if (Math.abs(angle) > 30) return; if (Math.abs(angle) > 30) return
if (i == ind) { if (i == ind) {
if (touchMoveX > startX) if (touchMoveX > startX)
//右滑 //右滑
v.isTouchMove = false; v.isTouchMove = false
//左滑 //左滑
else v.isTouchMove = true; else v.isTouchMove = true
} }
}); })
//更新数据 //更新数据
that.setData({ that.setData({
notUpgradeOrderList, notUpgradeOrderList
}); })
}, },
/** /**
* 计算滑动角度 * 计算滑动角度
...@@ -313,15 +326,15 @@ Page({ ...@@ -313,15 +326,15 @@ Page({
*/ */
angle: function (start, end) { angle: function (start, end) {
var _X = end.X - start.X, var _X = end.X - start.X,
_Y = end.Y - start.Y; _Y = end.Y - start.Y
//返回角度 /Math.atan()返回数字的反正切值 //返回角度 /Math.atan()返回数字的反正切值
return (360 * Math.atan(_Y / _X)) / (2 * Math.PI); return (360 * Math.atan(_Y / _X)) / (2 * Math.PI)
}, },
showPopup(e) { showPopup(e) {
let { copyGoodsData, baseConfigData } = this.data; let { copyGoodsData, baseConfigData } = this.data
let { showName, index, type } = e.currentTarget.dataset; let { showName, index, type, positionnnum: positionNum } = e.currentTarget.dataset
let arr = []; let arr = []
if (showName == "goodsBox") { if (showName == 'goodsBox') {
// type 产品类型 1前挡 2侧后挡 3天窗 根据类型过滤显示商品弹窗数据 // type 产品类型 1前挡 2侧后挡 3天窗 根据类型过滤显示商品弹窗数据
copyGoodsData?.forEach((val, index) => { copyGoodsData?.forEach((val, index) => {
if ( if (
...@@ -331,8 +344,8 @@ Page({ ...@@ -331,8 +344,8 @@ Page({
arr.push({ arr.push({
goodsType: val.goodsType, goodsType: val.goodsType,
goodsTypeName: val.goodsTypeName, goodsTypeName: val.goodsTypeName,
upgradeGoodsList: [], upgradeGoodsList: []
}); })
for (var i = 0; i < arr?.length; i++) { for (var i = 0; i < arr?.length; i++) {
let arr2 = []; let arr2 = [];
val?.upgradeGoodsList?.forEach((subVal, subInd) => { val?.upgradeGoodsList?.forEach((subVal, subInd) => {
...@@ -344,9 +357,10 @@ Page({ ...@@ -344,9 +357,10 @@ Page({
) )
arr[i].upgradeGoodsList = arr2; arr[i].upgradeGoodsList = arr2;
} }
console.log([positionNum], [positionNum].includes(subVal.merchantGoodsPosition));
if ( if (
type == 2 && type == 2 &&
[2, 3, 4].includes(subVal.merchantGoodsPosition) [Number(positionNum)].includes(subVal.merchantGoodsPosition)
) { ) {
arr2.push(subVal); arr2.push(subVal);
if ( if (
...@@ -369,121 +383,172 @@ Page({ ...@@ -369,121 +383,172 @@ Page({
}); });
if (!arr[i]?.upgradeGoodsList?.length) arr.splice(i, 1); if (!arr[i]?.upgradeGoodsList?.length) arr.splice(i, 1);
} }
// for (var i = 0; i < arr?.length; i++) {
// let arr2 = []
// val?.upgradeGoodsList?.forEach((subVal, subInd) => {
// if (type == 1 && [1].includes(subVal.merchantGoodsPosition)) {
// arr2.push(subVal)
// if (
// subVal?.goodsInfo?.goodsType == arr[i]?.goodsType ||
// subVal?.upgradeGoodsType == arr[i]?.goodsType
// )
// arr[i].upgradeGoodsList = arr2
// }
// if (
// type == 2 &&
// [2, 3, 4].includes(subVal.merchantGoodsPosition)
// ) {
// arr2.push(subVal)
// if (
// subVal?.goodsInfo?.goodsType == arr[i]?.goodsType ||
// subVal?.upgradeGoodsType == arr[i]?.goodsType
// )
// arr[i].upgradeGoodsList = arr2
// }
// if (
// type == 3 &&
// [5, 6, 7].includes(subVal.merchantGoodsPosition)
// ) {
// arr2.push(subVal)
// if (
// subVal?.goodsInfo?.goodsType == arr[i]?.goodsType ||
// subVal?.upgradeGoodsType == arr[i]?.goodsType
// )
// arr[i].upgradeGoodsList = arr2
// }
// })
// if (!arr[i]?.upgradeGoodsList?.length) arr.splice(i, 1)
// }
} }
}); })
} }
this.setData({ this.setData({
[showName]: true, [showName]: true,
goodsData: arr, goodsData: arr,
selectCustomIndex: index, selectCustomIndex: index
}); })
}, },
input(e) { input(e) {
let { value } = e.detail; let { value } = e.detail
let { name, index } = e.currentTarget.dataset; let { name, index } = e.currentTarget.dataset
let prop = `notUpgradeOrderList[${index}].${name}`; let prop = `notUpgradeOrderList[${index}].${name}`
this.setData({ this.setData({
[prop]: value, [prop]: value
}); })
}, },
changeGender(e) { changeGender(e) {
let { gender, index } = e.currentTarget.dataset; let { gender, index } = e.currentTarget.dataset
wx.vibrateShort(); wx.vibrateShort()
let prop = `notUpgradeOrderList[${index}].customer.customerSex`; let prop = `notUpgradeOrderList[${index}].customer.customerSex`
this.setData({ this.setData({
[prop]: gender, [prop]: gender
}); })
}, },
// 获取商品 // 获取商品
async getOrderBaseGoodsList(merchantId) { async getOrderBaseGoodsList(merchantId) {
const positionTypeList = (await getPositionList()) || []; const positionTypeList = (await getPositionList()) || []
// 获取配置服务数据 // 获取配置服务数据
let baseConfigData = await setConfigInfo(app.globalData); let baseConfigData = await setConfigInfo(app.globalData)
let { frontGearArr, sideRearGearArr, skylightArr } = this.data; let {
frontGearArr, // 前挡
sideBeforeRearGearArr, // 前侧窗玻璃
sideRearGearArr, // 侧后挡
sideAfterRearGearArr, // 后档
skylightArr // 天窗
} = this.data
this.setData({ this.setData({
positionTypeList, positionTypeList,
baseConfigData, baseConfigData
}); })
api api
.getOrderBaseGoodsList({ .getOrderBaseGoodsList({
merchantId, merchantId,
upradeFlag: "N", upradeFlag: 'N'
}) })
.then((res) => { .then(res => {
let { code, data, message } = res; let { code, data, message } = res
if (code == 0) { if (code == 0) {
wx.hideLoading(); wx.hideLoading()
// 筛选出太阳膜商品 goodsType 1太阳膜 自建商品-太阳膜 // 筛选出太阳膜商品 goodsType 1太阳膜 自建商品-太阳膜
let arrData = []; let arrData = []
data?.forEach((val) => { data?.forEach(val => {
if ([1, baseConfigData?.selfBuildFilmType].includes(val.goodsType)) if ([1, baseConfigData?.selfBuildFilmType].includes(val.goodsType))
arrData.push(val); arrData.push(val)
val?.upgradeGoodsList?.forEach((subVal) => { val?.upgradeGoodsList?.forEach(subVal => {
subVal.merchantGoodsId = subVal.id; subVal.merchantGoodsId = subVal.id
if ([1].includes(subVal.merchantGoodsPosition)) { if ([1].includes(subVal.merchantGoodsPosition)) {
frontGearArr.push(subVal); frontGearArr.push(subVal)
} }
if ([2, 3, 4].includes(subVal.merchantGoodsPosition)) {
sideRearGearArr.push(subVal); if ([2].includes(subVal.merchantGoodsPosition)) {
sideBeforeRearGearArr.push(subVal)
}
if ([3].includes(subVal.merchantGoodsPosition)) {
sideRearGearArr.push(subVal)
}
if ([4].includes(subVal.merchantGoodsPosition)) {
sideAfterRearGearArr.push(subVal)
} }
if ([5, 6, 7].includes(subVal.merchantGoodsPosition)) { if ([5, 6, 7].includes(subVal.merchantGoodsPosition)) {
skylightArr.push(subVal); skylightArr.push(subVal)
} }
}); })
}); })
let goodsData = arrData; let goodsData = arrData
const filterList = goodsData.reduce((list, item) => { const filterList = goodsData.reduce((list, item) => {
item.upgradeGoodsList.forEach((val) => { item.upgradeGoodsList.forEach(val => {
val.positionStr = positionTypeList.filter( val.positionStr = positionTypeList.filter(
(v) => v.positionValue == val.merchantGoodsPosition v => v.positionValue == val.merchantGoodsPosition
)[0]?.positionName; )[0]?.positionName
}); })
item.upgradeGoodsList && list.push(...item.upgradeGoodsList); item.upgradeGoodsList && list.push(...item.upgradeGoodsList)
return list; return list
}, []); }, [])
data.forEach((item) => { data.forEach(item => {
item.upgradeGoodsList.forEach((v) => { item.upgradeGoodsList.forEach(v => {
v.price = 0; v.price = 0
v.shopMinPrice = 0; v.shopMinPrice = 0
v.upgradePrice = 0; v.upgradePrice = 0
v.totalPrice = 0; v.totalPrice = 0
v.number = 1; v.number = 1
}); })
}); })
this.setData({ this.setData({
goodsData, goodsData,
frontGearArr, frontGearArr,
sideBeforeRearGearArr,
sideAfterRearGearArr,
sideRearGearArr, sideRearGearArr,
skylightArr, skylightArr,
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)
} }
}); })
}, },
defaultChoose(index) { defaultChoose(index) {
let { frontGearArr, sideRearGearArr, skylightArr } = this.data; let { frontGearArr, sideRearGearArr, skylightArr } = this.data
// 仅有一个商品直接选中 // 仅有一个商品直接选中
let arr = [].concat( let arr = [].concat(
sideRearGearArr.length == 1 ? sideRearGearArr : [], sideRearGearArr.length == 1 ? sideRearGearArr : [],
frontGearArr.length == 1 ? frontGearArr : [], frontGearArr.length == 1 ? frontGearArr : [],
skylightArr.length == 1 ? skylightArr : [] skylightArr.length == 1 ? skylightArr : []
); )
arr.forEach((val) => { arr.forEach(val => {
val.count = 1; val.count = 1
val.active = true; val.active = true
}); })
let prop = `notUpgradeOrderList[${index}].subOrderList`; let prop = `notUpgradeOrderList[${index}].subOrderList`
this.setData({ this.setData({
[prop]: arr, [prop]: arr
}); })
}, },
staffDailyReportMerchantValid(userInfo) { staffDailyReportMerchantValid(userInfo) {
// let { userInfo } = this.data // let { userInfo } = this.data
...@@ -495,66 +560,65 @@ Page({ ...@@ -495,66 +560,65 @@ Page({
merchantId: userInfo.shopMerchantId, merchantId: userInfo.shopMerchantId,
yqMerchantId: userInfo.merchantId, yqMerchantId: userInfo.merchantId,
staffUuid: userInfo.uuid, staffUuid: userInfo.uuid,
sceneType: 1, sceneType: 1
}) })
.then((res) => { .then(res => {
if (res.data) { if (res.data) {
// 获取当前日期 // 获取当前日期
let currentDate = new Date(); let currentDate = new Date()
// 获取上一天的日期 // 获取上一天的日期
let previousDate = new Date(currentDate); let previousDate = new Date(currentDate)
previousDate.setDate(currentDate.getDate() - 1); previousDate.setDate(currentDate.getDate() - 1)
// toISOString 方法会丢失时区 导致与北京时间差八小时 // toISOString 方法会丢失时区 导致与北京时间差八小时
let hour = previousDate.getHours() + 8; let hour = previousDate.getHours() + 8
previousDate.setHours(hour); previousDate.setHours(hour)
// 格式化日期为"yyyy-mm-dd" // 格式化日期为"yyyy-mm-dd"
let formattedDate = previousDate.toISOString().split("T")[0]; let formattedDate = previousDate.toISOString().split('T')[0]
if (wx.__HAS_NOREPORT_MODAL || wx.__HAS_NOTLOGIN_MODAL) if (wx.__HAS_NOREPORT_MODAL || wx.__HAS_NOTLOGIN_MODAL) return false
return false; wx.__HAS_NOREPORT_MODAL = true
wx.__HAS_NOREPORT_MODAL = true;
wx.showModal({ wx.showModal({
title: "日报提醒", title: '日报提醒',
content: "您有未填写的日报,请点击前往。", content: '您有未填写的日报,请点击前往。',
showCancel: false, showCancel: false,
// cancelText: '取消', // '取消 // cancelText: '取消', // '取消
cancelColor: "#292D33", cancelColor: '#292D33',
confirmText: "前往填写", confirmText: '前往填写',
confirmColor: "#347BFF", confirmColor: '#347BFF',
success(res) { success(res) {
if (res.confirm) { if (res.confirm) {
wx.$router.go("tabWorkOrder.upgradeStaffDaily", { wx.$router.go('tabWorkOrder.upgradeStaffDaily', {
// reportDate: hasNeedReport.date // reportDate: hasNeedReport.date
reportDate: formattedDate, reportDate: formattedDate
}); })
} }
}, },
complete: () => { complete: () => {
// 这个延迟的目的是为了避免短时间内重复弹出 // 这个延迟的目的是为了避免短时间内重复弹出
// 你要是没有这个需要也可以去掉,直接把标志位改成 false 就行 // 你要是没有这个需要也可以去掉,直接把标志位改成 false 就行
setTimeout(() => { setTimeout(() => {
wx.__HAS_NOREPORT_MODAL = false; wx.__HAS_NOREPORT_MODAL = false
}, 2000); }, 2000)
}, }
}); })
// return false // return false
resolve(res.data); resolve(res.data)
} else { } else {
resolve(res.data); resolve(res.data)
} }
}) })
.catch((err) => { .catch(err => {
console.log(err); console.log(err)
}); })
}); })
}, },
async submit(i) { async submit(i) {
let userInfo = wx.$util.getUserInfo(); let userInfo = wx.$util.getUserInfo()
// 校验是否填写昨日日报 // 校验是否填写昨日日报
let staffCheck = await this.staffDailyReportMerchantValid(userInfo); let staffCheck = await this.staffDailyReportMerchantValid(userInfo)
if (staffCheck) return false; if (staffCheck) return false
this.checkPhoneUseConfig(); this.checkPhoneUseConfig()
let { let {
orderObj, orderObj,
notUpgradeOrderList, notUpgradeOrderList,
...@@ -564,171 +628,174 @@ Page({ ...@@ -564,171 +628,174 @@ Page({
isPlateNumber, isPlateNumber,
refusalReason, refusalReason,
isExpiredTraffic isExpiredTraffic
} = this.data; } = this.data
let key = this.checkRequired(orderObj); let key = this.checkRequired(orderObj)
if (key) { if (key) {
this.showToast(toastList[key]); this.showToast(toastList[key])
wx.pageScrollTo({ wx.pageScrollTo({
selector: `.${key}`, selector: `.${key}`
}); })
return; return
} }
for (let index = 0; index < notUpgradeOrderList.length; index++) { for (let index = 0; index < notUpgradeOrderList.length; index++) {
if (!notUpgradeOrderList[index].customer.customerName) { if (!notUpgradeOrderList[index].customer.customerName) {
return this.showToast(`请输入第${index + 1}位客户姓名`); return this.showToast(`请输入第${index + 1}位客户姓名`)
} }
if (!phoneRex.test(notUpgradeOrderList[index].customer.customerPhone)) { if (!phoneRex.test(notUpgradeOrderList[index].customer.customerPhone)) {
this.showToast(`请输入第${index + 1}位客户正确的手机号`); this.showToast(`请输入第${index + 1}位客户正确的手机号`)
return; return
} }
if (isCarBrand && !notUpgradeOrderList[index].customer.carSeriesName) { if (isCarBrand && !notUpgradeOrderList[index].customer.carSeriesName) {
return this.showToast(`请输入第${index + 1}位客户车型`); return this.showToast(`请输入第${index + 1}位客户车型`)
} }
if (isStandNo && !notUpgradeOrderList[index].customer.standNo) { if (isStandNo && !notUpgradeOrderList[index].customer.standNo) {
return this.showToast(`请输入第${index + 1}位客户车架号`); return this.showToast(`请输入第${index + 1}位客户车架号`)
} }
if (isPlateNumber && !notUpgradeOrderList[index].customer.plateNumber) { if (isPlateNumber && !notUpgradeOrderList[index].customer.plateNumber) {
return this.showToast(`请输入第${index + 1}位客户车牌号`); return this.showToast(`请输入第${index + 1}位客户车牌号`)
} }
if (!notUpgradeOrderList[index].subOrderList?.length && !isExpiredTraffic) { if (
return this.showToast(`请选择第${index + 1}位客户产品`); !notUpgradeOrderList[index].subOrderList?.length &&
!isExpiredTraffic
) {
return this.showToast(`请选择第${index + 1}位客户产品`)
} }
if (refusalReason && !notUpgradeOrderList[index].customer.refusalReason) { if (refusalReason && !notUpgradeOrderList[index].customer.refusalReason) {
return this.showToast(`请输入第${index + 1}位客户拒升理由`); return this.showToast(`请输入第${index + 1}位客户拒升理由`)
} }
} }
notUpgradeOrderList?.forEach((val) => { notUpgradeOrderList?.forEach(val => {
let arr = []; let arr = []
val?.subOrderList?.forEach((subVal) => { val?.subOrderList?.forEach(subVal => {
let obj = { let obj = {
baseGoodsId: subVal.baseGoodsId, baseGoodsId: subVal.baseGoodsId,
totalPrice: Number(subVal.price) || 0, totalPrice: Number(subVal.price) || 0,
number: subVal.count, number: subVal.count,
merchantGoodsId: subVal.id || subVal.merchantGoodsId, merchantGoodsId: subVal.id || subVal.merchantGoodsId
}; }
arr.push(obj); arr.push(obj)
}); })
val.subOrderList = !isExpiredTraffic ? arr : []; val.subOrderList = !isExpiredTraffic ? arr : []
if (isExpiredTraffic) { if (isExpiredTraffic) {
delete val.customer?.['experienceFlag'] // 删除是否体验参数 delete val.customer?.['experienceFlag'] // 删除是否体验参数
val['packageGoodsList'] = [] // 删除商品参数 val['packageGoodsList'] = [] // 删除商品参数
} }
}); })
orderObj = { orderObj = {
...orderObj, ...orderObj,
notUpgradeOrderList, notUpgradeOrderList,
createDate: dateObj.today, createDate: dateObj.today
}; }
delete orderObj.customer; delete orderObj.customer
delete orderObj?.packageGoodsList; delete orderObj?.packageGoodsList
delete orderObj?.subOrderList; delete orderObj?.subOrderList
console.log(orderObj, "orderObj"); console.log(orderObj, 'orderObj')
// return; // return;
wx.$util.showLoading("提交中..."); wx.$util.showLoading('提交中...')
// this.showLoading() // this.showLoading()
api.notUpgradeOrder({ json: JSON.stringify(orderObj) }).then((res) => { api.notUpgradeOrder({ json: JSON.stringify(orderObj) }).then(res => {
wx.hideLoading(); wx.hideLoading()
let { code, data, message } = res; let { code, data, message } = res
if (code == 0) { if (code == 0) {
// 状态更新 需刷新工单列表和预约管理列表 // 状态更新 需刷新工单列表和预约管理列表
wx.$util.refreshPageData(); wx.$util.refreshPageData()
wx.$util.showToast({ wx.$util.showToast({
icon: "success", icon: 'success',
title: "提交成功", title: '提交成功'
}); })
wx.$router.go("pages.index"); wx.$router.go('pages.index')
} else { } else {
wx.$util.showToast(message); wx.$util.showToast(message)
} }
}); })
}, },
checkRequired(obj) { checkRequired(obj) {
// 导入动态校验字段 // 导入动态校验字段
let { requiredList } = this.data; let { requiredList } = this.data
let target = [...requiredList, "employeeName"]; let target = [...requiredList, 'employeeName']
try { try {
target.map((key) => { target.map(key => {
if (!obj[key]) { if (!obj[key]) {
throw key; throw key
} }
}); })
} catch (error) { } catch (error) {
return error; return error
} }
return false; return false
}, },
checkPhoneUseConfig() { checkPhoneUseConfig() {
let { phoneShow, orderObj, notUpgradeOrderList } = this.data; let { phoneShow, orderObj, notUpgradeOrderList } = this.data
if (phoneShow && orderObj.merchantName && orderObj.employeeName) { if (phoneShow && orderObj.merchantName && orderObj.employeeName) {
let phoneConfig = let phoneConfig =
phoneShow.find((item) => { phoneShow.find(item => {
item.shopMerchantId == orderObj.merchantId; item.shopMerchantId == orderObj.merchantId
}) || phoneShow.pop(); }) || phoneShow.pop()
notUpgradeOrderList.forEach((item) => { notUpgradeOrderList.forEach(item => {
item.customer.customerPhone = item.customer.customerPhone =
item.customer.customerPhone || phoneConfig?.phoneNumber; item.customer.customerPhone || phoneConfig?.phoneNumber
}); })
this.setData({ this.setData({
notUpgradeOrderList, notUpgradeOrderList
}); })
} }
}, },
delGoodsList(e) { delGoodsList(e) {
let { index, customIndex } = e.currentTarget.dataset; let { index, customIndex } = e.currentTarget.dataset
let { notUpgradeOrderList } = this.data; let { notUpgradeOrderList } = this.data
notUpgradeOrderList[customIndex]?.subOrderList?.splice(index, 1); notUpgradeOrderList[customIndex]?.subOrderList?.splice(index, 1)
this.setData({ this.setData({
notUpgradeOrderList, notUpgradeOrderList
}); })
}, },
blur(e) { blur(e) {
let { liindex } = e.currentTarget.dataset; let { liindex } = e.currentTarget.dataset
console.log(e, liindex); console.log(e, liindex)
console.log(e); console.log(e)
let { value } = e.detail; let { value } = e.detail
let { notUpgradeOrderList } = this.data; let { notUpgradeOrderList } = this.data
value = value.substring(0, 30); value = value.substring(0, 30)
let shortcutList = notUpgradeOrderList[liindex].shortcutList; let shortcutList = notUpgradeOrderList[liindex].shortcutList
if (!value) { if (!value) {
shortcutList = shortcutList.map((i) => { shortcutList = shortcutList.map(i => {
i.active = false; i.active = false
return i; return i
}); })
} }
let prop = `notUpgradeOrderList[${liindex}].shortcutList`; let prop = `notUpgradeOrderList[${liindex}].shortcutList`
let prop2 = `notUpgradeOrderList[${liindex}].focus`; let prop2 = `notUpgradeOrderList[${liindex}].focus`
let prop3 = `notUpgradeOrderList[${liindex}].customer.refusalReason`; let prop3 = `notUpgradeOrderList[${liindex}].customer.refusalReason`
console.log(value, "value"); console.log(value, 'value')
this.setData({ this.setData({
[prop3]: value, [prop3]: value,
[prop]: shortcutList, [prop]: shortcutList,
[prop2]: false, [prop2]: false
}); })
}, },
chooseShortcut(e) { chooseShortcut(e) {
let { item, index, liindex } = e.currentTarget.dataset; let { item, index, liindex } = e.currentTarget.dataset
console.log(item, index, liindex); console.log(item, index, liindex)
let { notUpgradeOrderList } = this.data; let { notUpgradeOrderList } = this.data
// console.log(object); // console.log(object);
// debugger // debugger
// if (notUpgradeOrderList[liindex].shortcutList[index].active) return // if (notUpgradeOrderList[liindex].shortcutList[index].active) return
let refusalReason = let refusalReason =
notUpgradeOrderList[liindex].customer.refusalReason || ""; notUpgradeOrderList[liindex].customer.refusalReason || ''
refusalReason += item.confValue; refusalReason += item.confValue
refusalReason = refusalReason.substring(0, 30); refusalReason = refusalReason.substring(0, 30)
let prop = `notUpgradeOrderList[${liindex}].shortcutList[${index}].active`; let prop = `notUpgradeOrderList[${liindex}].shortcutList[${index}].active`
// let prop2 = `notUpgradeOrderList[${liindex}].focus` // let prop2 = `notUpgradeOrderList[${liindex}].focus`
let prop3 = `notUpgradeOrderList[${liindex}].customer.refusalReason`; let prop3 = `notUpgradeOrderList[${liindex}].customer.refusalReason`
this.setData({ this.setData({
[prop3]: refusalReason, [prop3]: refusalReason,
[prop]: true, [prop]: true
// [prop2]: true // [prop2]: true
}); })
console.log(refusalReason, this.data.notUpgradeOrderList); console.log(refusalReason, this.data.notUpgradeOrderList)
}, },
getSetting() { getSetting() {
// 动态获取 车型 车架 车牌 是否必填 // 动态获取 车型 车架 车牌 是否必填
...@@ -738,217 +805,219 @@ Page({ ...@@ -738,217 +805,219 @@ Page({
isCarBrand, isCarBrand,
isPlateNumber, isPlateNumber,
experienceFlag, experienceFlag,
refusalReason, refusalReason
} = this.data; } = this.data
// app . // app .
getYQorderInfo() getYQorderInfo()
.then((merchantSettingInfo) => { .then(merchantSettingInfo => {
// let { requiredList } = this.data // 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") if (merchantSettingInfo.plateNumRequiredFlag == 'Y')
isPlateNumber = true; // 车牌必填 isPlateNumber = true // 车牌必填
if (merchantSettingInfo.foEfRequiredFlag == "Y") experienceFlag = true; // 战败订单是否体验 if (merchantSettingInfo.foEfRequiredFlag == 'Y') experienceFlag = true // 战败订单是否体验
if (merchantSettingInfo.foRrRequiredFlag == "Y") refusalReason = true; // 战败订单拒升理由 if (merchantSettingInfo.foRrRequiredFlag == 'Y') refusalReason = true // 战败订单拒升理由
this.setData({ this.setData({
isStandNo, isStandNo,
isCarBrand, isCarBrand,
isPlateNumber, isPlateNumber,
experienceFlag, experienceFlag,
refusalReason, refusalReason,
phoneShow: wx.$util.deepClone(merchantSettingInfo.yqPhoneConfig), phoneShow: wx.$util.deepClone(merchantSettingInfo.yqPhoneConfig)
}); })
})
.catch(err => {
console.log(err)
}) })
.catch((err) => {
console.log(err);
});
api2 api2
.getConfigList({ .getConfigList({
confGroup: "SMARTCARLIFE_NOT_UPGRADE_LABEL", confGroup: 'SMARTCARLIFE_NOT_UPGRADE_LABEL'
}) })
.then((res) => { .then(res => {
console.log(res); console.log(res)
let list = []; let list = []
let { code, data } = res; let { code, data } = res
if (code == 0) { if (code == 0) {
list = data; list = data
} }
let prop = `notUpgradeOrderList[0].shortcutList`; let prop = `notUpgradeOrderList[0].shortcutList`
this.setData({ this.setData({
shortcutList: list, shortcutList: list,
[prop]: list, [prop]: list
}); })
}); })
}, },
init(userInfo) { init(userInfo) {
let { orderObj, scene } = this.data; let { orderObj, scene } = this.data
orderObj.sellerMerchantName = userInfo.merchantName; orderObj.sellerMerchantName = userInfo.merchantName
orderObj.sellerMerchantId = userInfo.merchantId; orderObj.sellerMerchantId = userInfo.merchantId
orderObj.sellerName = userInfo.name; orderObj.sellerName = userInfo.name
orderObj.sellerUserId = userInfo.uuid; orderObj.sellerUserId = userInfo.uuid
this.setData({ this.setData({
orderObj, orderObj
}); })
if (scene) { if (scene) {
let id = scene.split("=")[1]; let id = scene.split('=')[1]
api api
.getCouponDeatil({ .getCouponDeatil({
id, id
}) })
.then((info) => { .then(info => {
let { code, data, message } = info; let { code, data, message } = info
if (code == 0) { if (code == 0) {
if (data.usedFlag == "Y") { if (data.usedFlag == 'Y') {
wx.showModal({ wx.showModal({
content: "该礼券已被使用", content: '该礼券已被使用',
confirmText: "知道了", confirmText: '知道了',
confirmColor: "#347BFF", confirmColor: '#347BFF',
showCancel: false, showCancel: false,
success(res) { success(res) {
if (res.confirm) wx.$router.back(); if (res.confirm) wx.$router.back()
}, }
}); })
return; return
} }
this.setOrderObj(data); this.setOrderObj(data)
api api
.getOrderByCustomerCouponId({ .getOrderByCustomerCouponId({
customerCouponId: id, customerCouponId: id
}) })
.then((res) => { .then(res => {
let { code, data, message } = res; let { code, data, message } = res
if (code == 0) { if (code == 0) {
console.log(data.orderCode, "getOrderByCustomerCouponId"); console.log(data.orderCode, 'getOrderByCustomerCouponId')
this.setData({ this.setData({
["orderObj.orderCode"]: data.orderCode, ['orderObj.orderCode']: data.orderCode
}); })
} else { } else {
this.showToast(message); this.showToast(message)
} }
}); })
} else { } else {
this.showToast(message); this.showToast(message)
} }
}); })
} }
}, },
setOrderObj(options) { setOrderObj(options) {
let { scene, userInfo } = this.data; let { scene, userInfo } = this.data
console.log("setOrderObj", options); console.log('setOrderObj', options)
wx.$util.showLoading("加载中..."); wx.$util.showLoading('加载中...')
let orderObj = {}; let orderObj = {}
Object.keys(options).map((e) => { Object.keys(options).map(e => {
if (options[e] != null && options[e] != undefined) { if (options[e] != null && options[e] != undefined) {
if (typeof options[e] == "object") { if (typeof options[e] == 'object') {
Object.keys(options[e]).map((key) => { Object.keys(options[e]).map(key => {
if (options[e][key] == null || options[e][key] == undefined) if (options[e][key] == null || options[e][key] == undefined)
delete options[e][key]; delete options[e][key]
}); })
} }
orderObj[e] = options[e]; orderObj[e] = options[e]
} }
}); })
console.log(orderObj); console.log(orderObj)
// 去除优惠券 参数 // 去除优惠券 参数
// delete orderObj.couponName; delete orderObj.customerCouponId;
delete orderObj.couponName;
// 使用优惠券的merchantId 避免优惠券和店区不一致的情况 // 使用优惠券的merchantId 避免优惠券和店区不一致的情况
if (!orderObj.merchantId) if (!orderObj.merchantId)
orderObj.merchantId = orderObj.merchantCoupon.merchantId; orderObj.merchantId = orderObj.merchantCoupon.merchantId
if (!orderObj.customer) orderObj.customer = orderObj.customerInfo || {}; if (!orderObj.customer) orderObj.customer = orderObj.customerInfo || {}
// 是扫码核销值为3 预录值为2 // 是扫码核销值为3 预录值为2
if (orderObj.selectPayType == null || orderObj.selectPayType == undefined) if (orderObj.selectPayType == null || orderObj.selectPayType == undefined)
orderObj.selectPayType = scene ? 3 : 2; orderObj.selectPayType = scene ? 3 : 2
// 是再次下单的 就删除优惠券字段 不是就赋值 // 是再次下单的 就删除优惠券字段 不是就赋值
// || orderObj.associatedOrderCode // || orderObj.associatedOrderCode
if (orderObj.customerCoupon && orderObj.constructionFlag != "Y") { // if (orderObj.customerCoupon && orderObj.constructionFlag != 'Y') {
orderObj.couponName = orderObj.customerCoupon.couponName; // orderObj.couponName = orderObj.customerCoupon.couponName
orderObj.customerCouponCode = // orderObj.customerCouponCode =
orderObj.customerCoupon.customerCouponCode?.split("-")[0]; // orderObj.customerCoupon.customerCouponCode?.split('-')[0]
if (orderObj.couponId) { // if (orderObj.couponId) {
orderObj.customerCouponId = orderObj.id; // orderObj.customerCouponId = orderObj.id
} // }
} else { // } else {
delete orderObj.merchantCouponId; // delete orderObj.merchantCouponId
} // }
if (scene) { if (scene) {
orderObj.customerCouponId = orderObj.id; orderObj.customerCouponId = orderObj.id
orderObj.orderSource = 5; orderObj.orderSource = 5
orderObj.sellerMerchantName = userInfo.merchantName; orderObj.sellerMerchantName = userInfo.merchantName
orderObj.sellerName = userInfo.name; orderObj.sellerName = userInfo.name
orderObj.sellerMerchantId = userInfo.merchantId; orderObj.sellerMerchantId = userInfo.merchantId
orderObj.sellerUserId = userInfo.uuid; orderObj.sellerUserId = userInfo.uuid
delete orderObj.remark; delete orderObj.remark
} else { } else {
orderObj.orderSource = orderObj.orderSource; orderObj.orderSource = orderObj.orderSource
} }
console.log(orderObj.customer, "orderObj.customer"); console.log(orderObj.customer, 'orderObj.customer')
if (!orderObj?.customer.customerSex) orderObj.customer.customerSex = 1; if (!orderObj?.customer.customerSex) orderObj.customer.customerSex = 1
if (!orderObj?.customer.experienceFlag) if (!orderObj?.customer.experienceFlag)
orderObj.customer.experienceFlag = "N"; orderObj.customer.experienceFlag = 'N'
// 预约工单跳转下单(处理园区店id参数 保证可以拿到园区店的礼券yqMerchantId) // 预约工单跳转下单(处理园区店id参数 保证可以拿到园区店的礼券yqMerchantId)
if (options.yqMerchantId && options.isAppointment) { if (options.yqMerchantId && options.isAppointment) {
orderObj.sellerMerchantId = options.yqMerchantId; orderObj.sellerMerchantId = options.yqMerchantId
} }
if (!orderObj.customer.salesType) orderObj.customer.salesType = 0; if (!orderObj.customer.salesType) orderObj.customer.salesType = 0
console.log(orderObj, "orderObj"); console.log(orderObj, 'orderObj')
if (orderObj.packageGoodsList) { if (orderObj.packageGoodsList) {
console.log(orderObj.packageGoodsList); console.log(orderObj.packageGoodsList)
orderObj.packageGoodsList.forEach((item) => { orderObj.packageGoodsList.forEach(item => {
item.active = true; item.active = true
item.isType = "meal"; item.isType = 'meal'
item.packageGoodsOrderList.forEach((g) => { item.packageGoodsOrderList.forEach(g => {
g.sellPrice = g.upgradePrice; g.sellPrice = g.upgradePrice
g.price = g.totalPrice g.price = g.totalPrice
? Number(g.totalPrice) / Number(g.number) ? Number(g.totalPrice) / Number(g.number)
: g.upgradePrice; : g.upgradePrice
}); })
item.goodsList = item.packageGoodsOrderList; item.goodsList = item.packageGoodsOrderList
item.upgradePrice = item.goodsList.reduce((prev, cur) => { item.upgradePrice = item.goodsList.reduce((prev, cur) => {
return prev + cur.sellPrice; return prev + cur.sellPrice
}, 0); }, 0)
item.count = item.goodsList.length ? item.goodsList[0].number : 1; item.count = item.goodsList.length ? item.goodsList[0].number : 1
item.price = item.goodsList.reduce((prev, cur) => { item.price = item.goodsList.reduce((prev, cur) => {
return prev + Number(cur.totalPrice) / Number(cur.number); return prev + Number(cur.totalPrice) / Number(cur.number)
}, 0); }, 0)
let total = item.price * item.count; let total = item.price * item.count
item.totalPrice = wx.$util.decimal(total, 2); item.totalPrice = wx.$util.decimal(total, 2)
}); })
} }
let f = "notUpgradeOrderList[" + 0 + "]"; let f = 'notUpgradeOrderList[' + 0 + ']'
this.setData({ this.setData({
currentWordNumber: orderObj?.remark?.length || 0, currentWordNumber: orderObj?.remark?.length || 0,
orderObj, orderObj,
[f]: { ...orderObj }, [f]: { ...orderObj },
first: true, first: true,
flag: true, flag: true
}); })
this.getOrderBaseGoodsList(orderObj.merchantId); this.getOrderBaseGoodsList(orderObj.merchantId)
}, },
initOPtions(res) { initOPtions(res) {
if (res.customerName) { if (res.customerName) {
// 解码 // 解码
for (const key in res) { for (const key in res) {
res[key] = decodeURIComponent(res[key]); res[key] = decodeURIComponent(res[key])
} }
let f = "notUpgradeOrderList[" + 0 + "].customerName"; let f = 'notUpgradeOrderList[' + 0 + '].customerName'
this.setData({ this.setData({
[f]: res.customerName, [f]: res.customerName
}); })
} }
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad: function (res) { onLoad: function (res) {
this.setTimeList(); this.setTimeList()
res && this.initOPtions(res); res && this.initOPtions(res)
if (res.scene) { if (res.scene) {
this.setData(res); this.setData(res)
} }
}, },
/** /**
...@@ -960,26 +1029,26 @@ Page({ ...@@ -960,26 +1029,26 @@ Page({
*/ */
onShow: function (res) { }, onShow: function (res) { },
onRoute(res) { onRoute(res) {
console.log(res, "onroute"); console.log(res, 'onroute')
this.setData({isExpiredTraffic: res?.isExpiredTraffic}) this.setData({ isExpiredTraffic: res?.isExpiredTraffic })
if (res.scene) { if (res.scene) {
let { isAlreadyExistOrder } = this.data; let { isAlreadyExistOrder } = this.data
res.returnFun = true; res.returnFun = true
// 扫描核销进入战败工单 不可建档 // 扫描核销进入战败工单 不可建档
isAlreadyExistOrder = true; isAlreadyExistOrder = true
// 修复 res 为...res 解决对象没有拓展的问题 // 修复 res 为...res 解决对象没有拓展的问题
this.setData({ this.setData({
...res, ...res,
isAlreadyExistOrder, isAlreadyExistOrder
}); })
} }
// res && this.initOPtions(res); // res && this.initOPtions(res);
this.getSetting(); this.getSetting()
if (res.merchantId) { if (res.merchantId) {
this.setData({ this.setData({
returnFun: true, returnFun: true
}); })
this.setOrderObj(res); this.setOrderObj(res)
} }
}, },
/** /**
...@@ -1005,5 +1074,5 @@ Page({ ...@@ -1005,5 +1074,5 @@ Page({
/** /**
* 用户点击右上角分享 * 用户点击右上角分享
*/ */
onShareAppMessage: function () { }, onShareAppMessage: function () { }
}); })
...@@ -75,13 +75,14 @@ ...@@ -75,13 +75,14 @@
<gl-cell wx:if="{{ orderObj.selectPayType !=0 }}" required="{{ isPlateNumber }}" border valueAlign="right" iconSrc="{{ scanIcon }}" bindtitleClick="navOcr" data-type="plateNumber" label="车牌号" requiredAfter labelWidth="var(--fontSize240)"> <gl-cell wx:if="{{ orderObj.selectPayType !=0 }}" required="{{ isPlateNumber }}" border valueAlign="right" iconSrc="{{ scanIcon }}" bindtitleClick="navOcr" data-type="plateNumber" label="车牌号" requiredAfter labelWidth="var(--fontSize240)">
<input placeholder="点击输入" class="input" placeholder-class="placeholder-class" value="{{ li.customer.plateNumber }}" bindinput="input" data-name="customer.plateNumber" data-index="{{ ind }}" maxlength="8" always-embed></input> <input placeholder="点击输入" class="input" placeholder-class="placeholder-class" value="{{ li.customer.plateNumber }}" bindinput="input" data-name="customer.plateNumber" data-index="{{ ind }}" maxlength="8" always-embed></input>
</gl-cell> </gl-cell>
<view class="goods_box" wx:if="{{!isExpiredTraffic}}"> <view class="goods_box" wx:if="{{ !isExpiredTraffic }}">
<view class="label" style="margin-bottom: {{ !frontGearArr.length && !sideRearGearArr.length && !skylightArr.length ? 'var(--fontSize40)' : '' }};"> <view class="label" style="margin-bottom: {{ !frontGearArr.length && !sideRearGearArr.length && !skylightArr.length ? 'var(--fontSize40)' : '' }};">
请选择产品 请选择产品
<text class="required">*</text> <text class="required">*</text>
</view> </view>
<block wx:if="{{ frontGearArr.length }}"> <block wx:if="{{ frontGearArr.length }}">
<gl-cell border valueAlign="right" label="前挡" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-index="{{ ind }}" data-type="1" /> <gl-cell border valueAlign="right" label="前挡" logoSrc="{{ windshield }}" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-index="{{ ind }}" data-type="1" />
<block wx:if="{{ li.subOrderList.length > 0 }}"> <block wx:if="{{ li.subOrderList.length > 0 }}">
<view class="goods-box"> <view class="goods-box">
<block wx:for="{{ li.subOrderList }}" wx:key="index"> <block wx:for="{{ li.subOrderList }}" wx:key="index">
...@@ -113,13 +114,46 @@ ...@@ -113,13 +114,46 @@
</view> </view>
</block> </block>
</block> </block>
<block wx:if="{{ sideBeforeRearGearArr.length }}">
<gl-cell border valueAlign="right" label="前侧窗玻璃" logoSrc="{{ tricorn }}" labelWidth="var(--fontSize180)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-index="{{ ind }}" data-type="2" data-positionnnum="2" />
<block wx:if="{{ goodsList.length > 0 }}">
<view class="goods-box">
<block wx:for="{{ goodsList }}" wx:key="index">
<!-- 前侧窗玻璃 -->
<view class="goods" wx:if="{{ filter.filterIncludes((item.merchantGoodsPosition || item.upgradeGoodsPosition), [2]) }}">
<view class="name_box">
<view class="name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}}
</view>
</view>
<view class="bottom_box">
<!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 -->
<view class="position" wx:if="{{ (item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) }}">{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view>
<view class="position red_text" wx:if="{{ (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition }}">无部位属性</view>
<view class="position" wx:else></view>
<view class="price_count">
<view class="price">
<text>¥</text>
<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 class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
</view>
</view>
<view class="icon" bindtap="delGoodsList" data-index="{{ index }}">
<image src="../../images/del.png" />
</view>
</view>
</block>
</view>
</block>
</block>
<block wx:if="{{ sideRearGearArr.length }}"> <block wx:if="{{ sideRearGearArr.length }}">
<gl-cell border valueAlign="right" label="侧后挡" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-index="{{ ind }}" data-type="2" /> <gl-cell border valueAlign="right" label="后侧窗玻璃" logoSrc="{{ sideIcorn }}" labelWidth="var(--fontSize180)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-index="{{ ind }}" data-type="2" data-positionnnum="3" />
<block wx:if="{{ li.subOrderList.length > 0 }}"> <block wx:if="{{ goodsList.length > 0 }}">
<view class="goods-box"> <view class="goods-box">
<block wx:for="{{ li.subOrderList }}" wx:key="index"> <block wx:for="{{ goodsList }}" wx:key="index">
<!-- 侧后挡 --> <!-- 后侧窗玻璃 -->
<view class="goods" wx:if="{{ filter.filterIncludes((item.merchantGoodsPosition || item.upgradeGoodsPosition), [2, 3, 4]) }}"> <view class="goods" wx:if="{{ filter.filterIncludes((item.merchantGoodsPosition || item.upgradeGoodsPosition), [3]) }}">
<view class="name_box"> <view class="name_box">
<view class="name text-hide"> <view class="name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}} {{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}}
...@@ -133,12 +167,45 @@ ...@@ -133,12 +167,45 @@
<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="{{ true }}" data-item="{{ item }}" bindblur="priceBlur" data-index="{{ index }}" class="{{ item.price < 0 && (orderObj.selectPayType !=0) ? 'error':'' }} '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-index="{{ ind }}" 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>
</view> </view>
<view class="icon" bindtap="delGoodsList" data-index="{{ index }}" data-custom-index="{{ ind }}"> <view class="icon" bindtap="delGoodsList" data-index="{{ index }}">
<image src="../../images/del.png" />
</view>
</view>
</block>
</view>
</block>
</block>
<block wx:if="{{ sideAfterRearGearArr.length }}">
<gl-cell border valueAlign="right" label="后档" logoSrc="{{ afterIcorn }}" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-index="{{ ind }}" data-type="2" data-positionnnum="4" />
<block wx:if="{{ goodsList.length > 0 }}">
<view class="goods-box">
<block wx:for="{{ goodsList }}" wx:key="index">
<!-- 后档 -->
<view class="goods" wx:if="{{ filter.filterIncludes((item.merchantGoodsPosition || item.upgradeGoodsPosition), [4]) }}">
<view class="name_box">
<view class="name text-hide">
{{filter.replaceItemText(item.upgradeGoodsAlias) ||filter.replaceItemText(item.upgradeGoodsName) || filter.replaceItemText(item.goodsInfo.goodsName)}}
</view>
</view>
<view class="bottom_box">
<!-- merchantGoodsPosition商品列表部位字段 upgradeGoodsPosition订单详情部位字段 -->
<view class="position" wx:if="{{ (item.merchantGoodsPosition || item.upgradeGoodsPosition) && (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) }}">{{filter.formatPosition((item.merchantGoodsPosition || item.upgradeGoodsPosition), positionTypeList)}}</view>
<view class="position red_text" wx:if="{{ (item.goodsInfo.goodsType == 1 || item.upgradeGoodsType == 1 || item.goodsInfo.goodsType == baseConfigData.selfBuildFilmType || item.upgradeGoodsType == baseConfigData.selfBuildFilmType) && !item.merchantGoodsPosition && !item.upgradeGoodsPosition }}">无部位属性</view>
<view class="position" wx:else></view>
<view class="price_count">
<view class="price">
<text>¥</text>
<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 class="count" catchtap="showPopup" data-show-name="goodsBox" data-type="2">x{{item.count}}</view>
</view>
</view>
<view class="icon" bindtap="delGoodsList" data-index="{{ index }}">
<image src="../../images/del.png" /> <image src="../../images/del.png" />
</view> </view>
</view> </view>
...@@ -147,7 +214,7 @@ ...@@ -147,7 +214,7 @@
</block> </block>
</block> </block>
<block wx:if="{{ skylightArr.length }}"> <block wx:if="{{ skylightArr.length }}">
<gl-cell border valueAlign="right" label="天窗" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-index="{{ ind }}" data-type="3" /> <gl-cell border valueAlign="right" label="天窗" logoSrc="{{ skylight }}" labelWidth="var(--fontSize140)" haveArrow placeholder="点击选择" bindclick="showPopup" data-show-name="goodsBox" data-index="{{ ind }}" data-type="3" />
<block wx:if="{{ li.subOrderList.length > 0 }}"> <block wx:if="{{ li.subOrderList.length > 0 }}">
<view class="goods-box"> <view class="goods-box">
<block wx:for="{{ li.subOrderList }}" wx:key="index"> <block wx:for="{{ li.subOrderList }}" wx:key="index">
......
...@@ -62,7 +62,8 @@ const domain_items = { ...@@ -62,7 +62,8 @@ const domain_items = {
// dj: 'http://192.168.1.104:8292', //叶立庆 // dj: 'http://192.168.1.104:8292', //叶立庆
// dj: "http://192.168.1.169:8292", //蔡远明 // dj: "http://192.168.1.169:8292", //蔡远明
// dj: 'http://192.168.1.174:8292',//范富荣 // dj: 'http://192.168.1.174:8292',//范富荣
dj: 'http://192.168.1.89:8292', //周杭 // dj: 'http://192.168.1.89:8292', //周杭
dj: 'http://192.168.1.89:8292', //璐琦
// dj: 'http://192.168.1.116:8292',//陈希 // dj: 'http://192.168.1.116:8292',//陈希
// dj: 'http://192.168.1.60:8292',//周立明 // dj: 'http://192.168.1.60:8292',//周立明
// dj: 'http://192.168.148.235:8292',// 熊正顺 // dj: 'http://192.168.148.235:8292',// 熊正顺
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!