Commit 2740a3a8 by 胡悦

Merge branch 'SAAS+V5.5.0' of http://192.168.3.233:8090/glsx/gl_tape into SAAS+V5.5.0

2 parents e7a3fabf 911dced3
......@@ -167,7 +167,8 @@ module.exports = {
// 获取商户订单设置
getMerchantRecordingSettings (data) {
return http.post({
method: 'dj.api.smartcarlife.recordingSettings.getMerchantRecordingSettings',
// method: 'dj.api.smartcarlife.recordingSettings.getMerchantRecordingSettings',
method: 'dj.api.smartcarlife.order.field.lightChange.setting.list',
projectName: 'boutique',
...data
})
......
......@@ -2,7 +2,7 @@ import http from '../request/http'
module.exports = {
/**新建车损报价单 */
quotationAdd (data) {
quotationAdd(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add',
projectName: 'boutique',
......@@ -10,7 +10,7 @@ module.exports = {
})
},
/** 报价单支付订单生成(带上签名)返回订单号(商户地址) */
quotationUpgrade (data) {
quotationUpgrade(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.pay.order.generate',
projectName: 'boutique',
......@@ -18,7 +18,7 @@ module.exports = {
})
},
// 校验订单是否需要上传合同协议
checkZyPayFlag (data) {
checkZyPayFlag(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.check',
projectName: 'boutique',
......@@ -27,7 +27,7 @@ module.exports = {
},
// 查询店铺配置
getShopMerchantPointConfig (data) {
getShopMerchantPointConfig(data) {
return http.post({
method: 'dj.api.smartcarlife.shopMerchantPointConfig.get',
projectName: 'boutique',
......@@ -36,7 +36,7 @@ module.exports = {
},
/** 查询报价单信息 */
getQuotationInfoById (data) {
getQuotationInfoById(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.find.by.id',
projectName: 'boutique',
......@@ -46,7 +46,7 @@ module.exports = {
/**
* 订单详情
*/
getOrderDetail (data) {
getOrderDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.order.detail',
projectName: 'boutique',
......@@ -54,7 +54,7 @@ module.exports = {
})
},
/**pos支付 */
getPosQr (data) {
getPosQr(data) {
return http.post({
method: 'dj.api.smartcarlife.payOrder.create',
projectName: 'boutique',
......@@ -65,7 +65,7 @@ module.exports = {
* 查询门店录单设置
},
*/
orderSettingList (data) {
orderSettingList(data) {
return http.post({
method: 'dj.api.smartcarlife.order.field.setting.list',
projectName: 'boutique',
......@@ -74,7 +74,7 @@ module.exports = {
},
/** 报价单分页列表 */
quotationPage (data) {
quotationPage(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page',
projectName: 'boutique',
......@@ -82,7 +82,7 @@ module.exports = {
})
},
/** 根据id查询报价单数据 */
getQuotationInfo (data) {
getQuotationInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.generate',
projectName: 'boutique',
......@@ -90,7 +90,7 @@ module.exports = {
})
},
/** 修改车损报价单客户基本信息信息 */
updateCustomerInfo (data) {
updateCustomerInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.base.info.update',
projectName: 'boutique',
......@@ -99,7 +99,7 @@ module.exports = {
},
/** 报价单订单分状态统计信息 */
orderStatistics (data) {
orderStatistics(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics',
projectName: 'boutique',
......@@ -107,7 +107,7 @@ module.exports = {
})
},
// 查询订单是否支持状态变更
getOrderRefundStep (data) {
getOrderRefundStep(data) {
return http.post({
method: 'dj.api.smartcarlife.refundApplyRecord.isExist',
projectName: 'boutique',
......@@ -115,7 +115,7 @@ module.exports = {
})
},
/**报价单-撤销工单 */
cancelOrderById (data) {
cancelOrderById(data) {
return http.post({
method: 'dj.api.smartcarlife.quotation.cancel',
projectName: 'boutique',
......@@ -123,7 +123,7 @@ module.exports = {
})
},
// 车损报价单战败订单创建
defeatOrderCreate (data) {
defeatOrderCreate(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add.defeat.order',
projectName: 'boutique',
......@@ -131,7 +131,7 @@ module.exports = {
})
},
// 更新合同协议内容
updateZyInfo (data) {
updateZyInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.update',
projectName: 'boutique',
......@@ -139,7 +139,7 @@ module.exports = {
})
},
/** 根据商户号商品id获取可选升级商品列表 */
quotationGoodsList (data) {
quotationGoodsList(data) {
return http.post({
method: 'dj.api.smartcarlife.quotationGoods.list',
projectName: 'boutique',
......@@ -148,14 +148,14 @@ module.exports = {
},
/**
* /** 修改车损报价单信息 */
updateQuotation (data) {
updateQuotation(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.update',
projectName: 'boutique',
...data
})
},
getCheckEmployeeList (data) {
getCheckEmployeeList(data) {
// 0->2.0 1->1.1 2->1.2 3->1.3 场景对应
// data.sceneList = [1]
return http.post({
......@@ -166,7 +166,7 @@ module.exports = {
// return api.post("dj.api.smartcarlife.employee.getByMerchantId", data);
},
/** 更新报价单状态 */
updateOrderStatus (data) {
updateOrderStatus(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.status.update',
projectName: 'boutique',
......@@ -178,7 +178,7 @@ module.exports = {
* 服务信息详情
*
*/
getServiceInfoDetail (data) {
getServiceInfoDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.detail',
projectName: 'boutique',
......@@ -186,7 +186,7 @@ module.exports = {
})
},
/** 权益单分页列表 */
equityPage (data) {
equityPage(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.page',
projectName: 'boutique',
......@@ -194,7 +194,7 @@ module.exports = {
})
},
/** 权益单统计信息 */
equityStatistics (data) {
equityStatistics(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.statics',
projectName: 'boutique',
......@@ -202,7 +202,7 @@ module.exports = {
})
},
// 更新客户签名
updateCustomerNameUrlAPI (data) {
updateCustomerNameUrlAPI(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.updateCustomerNameUrl',
projectName: 'boutique',
......@@ -210,7 +210,7 @@ module.exports = {
})
},
/** 查询合同*/
equityOrderList (data) {
equityOrderList(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.listContracts',
projectName: 'boutique',
......@@ -218,7 +218,7 @@ module.exports = {
})
},
/** 打印合同*/
printContract (data) {
printContract(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.print',
projectName: 'boutique',
......@@ -228,21 +228,53 @@ module.exports = {
/**
* 提交前检查车架号是否已购买
*/
checkVinBuyEquityOrder (data) {
checkVinBuyEquityOrder(data) {
return http.post(
{
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.vin.check',
projectName: 'boutique',
...data
},
true
)
},
/**提交权益单
*
*/
addEquityOrder(data) {
return http.post(
{
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.add',
projectName: 'boutique',
...data
},
true
)
},
/**
* 订单号查服务信息详情
*/
getEquityOrderByOrderId(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.vin.check',
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.handler',
projectName: 'boutique',
...data
}, true)
})
},
/**提交权益单
*
*/
addEquityOrder (data) {
// 查询订单是否支持状态变更
getOrderRefundStep(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.equityOrder.add',
method: 'dj.api.smartcarlife.refundApplyRecord.isExist',
projectName: 'boutique',
...data
}, true)
})
},
/** 标记错误订单 */
errorOrderById(data) {
return http.post({
method: 'dj.api.smartcarlife.quotation.correct',
projectName: 'boutique',
...data
})
}
}

2.94 MB | W: | H:

2.94 MB | W: | H:

assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
assets/images/sprite.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -39,7 +39,7 @@ export default {
}
this.componentLoading(params)
const { shopMerchantId, sceneType, merchantId } = userInfo,
apiTargetName = sceneType == 1 ? 'getEmployeeList' : 'getOrderScreenEmployeeList',
apiTargetName = sceneType == 1||params.defeat ? 'getEmployeeList' : 'getOrderScreenEmployeeList',
apiParams = {
merchantId: params.idKey == 'sellerUserId' ? merchantId : shopMerchantId,
sceneList: params.idKey == 'sellerUserId' ? '' : [sceneType],
......@@ -49,11 +49,13 @@ export default {
this.updateParams(params, data || [])
},
initData (list) {
const { idKey, data } = this
const { idKey, data,params } = this
console.log(idKey,data)
if (data[idKey]) {
this.currentId = data[idKey]
let item = list.find(i => i.uuid == this.currentId)
console.log(item)
this.$emit('choose', item)
}
this.list = list
......
......@@ -27,6 +27,7 @@
* 24: 车辆使用性质
* 25: 选择品牌车系
* 26: 变速箱类型
* 27: 权益战败推荐人员
*/
const componentConfig = {
......@@ -253,22 +254,28 @@ const componentConfig = {
idKey: 'customerType',
hideSearch: true,
loadComplete: false,
options: [{
optionId: 1,
optionLabel: '个人'
}, {
optionId: 2,
optionLabel: '企业'
}, {
optionId: 3,
optionLabel: '个人(港澳)'
}, {
optionId: 4,
optionLabel: '个人(台)'
}, {
optionId: 5,
optionLabel: '个人(军官)'
}]
options: [
{
optionId: 1,
optionLabel: '个人'
},
{
optionId: 2,
optionLabel: '企业'
},
{
optionId: 3,
optionLabel: '个人(港澳)'
},
{
optionId: 4,
optionLabel: '个人(台)'
},
{
optionId: 5,
optionLabel: '个人(军官)'
}
]
},
22: {
name: 'Options',
......@@ -277,25 +284,32 @@ const componentConfig = {
idKey: 'cardType',
hideSearch: true,
loadComplete: false,
options: [{
optionId: 1,
optionLabel: '身份证'
}, {
optionId: 2,
optionLabel: '统一社会信息代码'
}, {
optionId: 3,
optionLabel: '港澳返乡证'
}, {
optionId: 4,
optionLabel: '台胞证'
}, {
optionId: 5,
optionLabel: '军官证'
}, {
optionId: 7,
optionLabel: '护照'
}]
options: [
{
optionId: 1,
optionLabel: '身份证'
},
{
optionId: 2,
optionLabel: '统一社会信息代码'
},
{
optionId: 3,
optionLabel: '港澳返乡证'
},
{
optionId: 4,
optionLabel: '台胞证'
},
{
optionId: 5,
optionLabel: '军官证'
},
{
optionId: 7,
optionLabel: '护照'
}
]
},
23: {
name: 'Options',
......@@ -304,13 +318,16 @@ const componentConfig = {
idKey: 'buyCarType',
hideSearch: true,
loadComplete: false,
options: [{
optionId: 0,
optionLabel: '贷款车'
}, {
optionId: 1,
optionLabel: '全款车'
}]
options: [
{
optionId: 0,
optionLabel: '贷款车'
},
{
optionId: 1,
optionLabel: '全款车'
}
]
},
24: {
name: 'Options',
......@@ -319,13 +336,16 @@ const componentConfig = {
idKey: 'vehicleNature',
hideSearch: true,
loadComplete: false,
options: [{
optionId: 0,
optionLabel: '营运'
}, {
optionId: 1,
optionLabel: '非营运'
}]
options: [
{
optionId: 0,
optionLabel: '营运'
},
{
optionId: 1,
optionLabel: '非营运'
}
]
},
25: {
name: 'CarBrand',
......@@ -348,5 +368,16 @@ const componentConfig = {
hideSearch: true,
loadComplete: false
},
27: {
name: 'EmployeeList',
title: '销售顾问/录单员',
placeholder: '请输入姓名',
idKey: ['referrerId', 'userId'],
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false,
defeat: true
}
}
export default { componentConfig }
......@@ -26,11 +26,11 @@ export default {
value: 0,
id: 1
},
{
name: '待确认',
value: 1,
id: 2
},
// {
// name: '待确认',
// value: 1,
// id: 2
// },
{
name: '待支付',
value: 2,
......
......@@ -99,6 +99,15 @@ export default {
},
clear() {
this.chooseContent = {}
// 检查是否有 transferIds 字段配置,如果有则设置为当前用户的 uuid
const hasTransferIds = this.screenList.some(item => {
return item.params && item.params.idKey === 'transferIds'
})
if (hasTransferIds) {
const localUserInfo = uni.$storage.get('userInfo') || {}
console.log('localUserInfo', localUserInfo)
this.chooseContent.transferIds = [localUserInfo.uuid] || []
}
this.viewKey = Date.now()
},
close() {
......@@ -110,7 +119,7 @@ export default {
let updatedChooseContent = { ...this.chooseContent };
let needRefresh = false;
// 有订单状态,将合同协议状态置为全部
if (key == 'orderStatus' && value) {
if (key == 'orderStatus' && (value || value== 0)) {
if (updatedChooseContent.zyPayStatus !== undefined) {
this.$delete(updatedChooseContent, 'zyPayStatus')
needRefresh = true
......@@ -145,8 +154,8 @@ export default {
delete chooseContent.payTimeId
delete chooseContent.orderTimeId
Object.keys(chooseContent).map(e => {
if (e == 'placeOrderStartDateStr' || e == 'installUpgradeBeginTimeStr') chooseContent[e] = `${chooseContent[e]} 00:00:00`
if (e == 'placeOrderEndDateStr' || e == 'installUpgradeEndTimeStr') chooseContent[e] = `${chooseContent[e]} 23:59:59`
if (e == 'placeOrderStartDateStr' || e == 'installUpgradeBeginTimeStr' || e== 'minCreateTime'|| e== 'minPayTime') chooseContent[e] = `${chooseContent[e]} 00:00:00`
if (e == 'placeOrderEndDateStr' || e == 'installUpgradeEndTimeStr' || e== 'maxCreateTime'|| e== 'maxPayTime') chooseContent[e] = `${chooseContent[e]} 23:59:59`
})
this.$emit('onConfirm', chooseContent)
this.close()
......
......@@ -236,6 +236,7 @@ export default {
}
.icon-second-right {
right: toMinusRpx(100);
background-color: #eef4fe;
}
}
}
......
......@@ -860,9 +860,8 @@ export default {
}
.textarea {
width: calc(100% - #{toRpx(24)});
margin-left: toRpx(24);
text-align: right;
margin: toRpx(10) 0;
margin: toRpx(10) 0 0 toRpx(24);
// line-height: toRpx(28);
font-size: toRpx(28);
}
......
......@@ -121,6 +121,7 @@ export default {
uni.reLaunch({
url
})
uni.$storage.rm("boutique_YQorderSetting") //切换场景后清空配置
} catch (error) {
uni.$logger.local.error(`选择场景后跳转异常:${error}!`)
uni.hideLoading()
......
......@@ -206,11 +206,11 @@ module.exports = {
userInfo: {},
orderStatusObj: {
0: { text: '待报价', color: '#F7A431', background: '#FFF5E6' },
1: { text: '待确认', color: '#F7A431', background: '#FFF5E6' },
// 1: { text: '待确认', color: '#F7A431', background: '#FFF5E6' },
2: { text: '待支付', color: '#F7A431', background: '#FFF5E6' },
3: { text: '已支付', color: '#2CCA74', background: '#EAF9F1' },
4: { text: '已支付', color: '#2CCA74', background: '#EAF9F1' },
5: { text: '已完成', color: '#F7A431', background: '#FFF5E6' },
5: { text: '已完成', color: '#2CCA74', background: '#EAF9F1' },
'-1': { text: '战败', color: '#F24724', background: '#FDECE9' },
9: { text: '已撤销', color: '#999999', background: 'rgba(153, 153, 153, 0.1)' },
11: { text: '已失效', color: '#F7A431', background: '#FFF5E6' },
......
......@@ -96,8 +96,6 @@ export default {
name: this.getFileNameFromUrl(url.trim()),
size: 0 // 从字符串无法获取文件大小
})))
console.log('this.contractData', this.contractData)
}
this.$nextTick(() => {
this.$refs.popup.open()
......@@ -281,7 +279,6 @@ export default {
// 获取合同文件数组
getContractFiles() {
console.log(this.contractData,'this.contractData')
const files = this.contractData[this.uploadField.key]
return Array.isArray(files) ? files : []
},
......
......@@ -188,7 +188,12 @@ export default {
watch: {
transmissionOfData: {
handler (val) {
if (val && val.contractNo) this.getServiceInfoDetail(val.contractNo)
if (val && val.contractNo) this.getServiceInfoDetail({
contractNo: val.contractNo
}, 1)
if (val && val.orderId) this.getServiceInfoDetail({
orderId: val.orderId
}, 2)
},
deep: true,
immediate: true
......@@ -258,15 +263,14 @@ export default {
// VIN车架号动态校验:车架号字段,动态转换为大写
if (val.value === 'vin') this.validateVin()
},
async getServiceInfoDetail (contractNo) {
async getServiceInfoDetail (paramSdata, type) {
try {
uni.showLoading({
title: '加载中...',
mask: true
})
const data = await uni.$api.equityApi.getServiceInfoDetail({
contractNo
})
let targetApi = type == 1 ? 'getServiceInfoDetail' : 'getEquityOrderByOrderId'
const data = await uni.$api.equityApi[targetApi](paramSdata)
if (!data) throw '获取数据失败'
if (data.ybAttachmentFlag != 0) this.formList[3] = []
if (data.qsFlag != 1) this.formList[4] = []
......@@ -576,7 +580,7 @@ export default {
}
})
}
if (params.qsFlag == 0) {
if (params.qsFlag == 0 && params.inclueType == 1) {
params.attachmentList.map(e => {
let item = qsFlagTips[e.attachmentCode]
if (!e.attachmentFile) throw `请上传${item}`
......
......@@ -234,6 +234,7 @@ export default {
orderObj.price = this.divideByHundred(owner.price)
orderObj.insurancePrice = this.divideByHundred(insurancePrice)
orderObj.quotedPriceUpdate = this.divideByHundred(quotedPriceUpdate)
if(!data.vdQuotationGoodsList) data.vdQuotationGoodsList = []
orderObj.vdQuotationGoodsList = data.vdQuotationGoodsList.map(
item => {
item.price = this.divideByHundred(item.goodsPrice)
......@@ -347,6 +348,7 @@ export default {
return pre
}, [])
let keyList = ['mode', 'payee', 'payType', 'referrerId', 'referrer',
'deliveryId', 'deliveryName', 'notes', 'id', 'orderId'
], customerKeyList = ['owner', 'phone', 'certificateNo', 'carVin', 'seat', ,
......@@ -368,6 +370,7 @@ export default {
}, 0)
} catch (error) {
console.log(error)
uni.hideLoading()
if (error) uni.showToast({
title: error,
......@@ -807,6 +810,7 @@ export default {
res = await uni.$api.boutiqueApi.getYqStoreConfig({
yqMerchantId: merchantId
})
console.log(123)
let m = res.supportPayTypes || []
let n = this.payTypeList
let list = n.filter(k => {
......
......@@ -1003,10 +1003,8 @@ export default {
}
.textarea {
width: calc(100% - #{toRpx(24)});
margin-left: toRpx(24);
text-align: right;
margin: toRpx(10) 0;
// line-height: toRpx(28);
margin: toRpx(10) 0 0 toRpx(24);
font-size: toRpx(28);
}
}
......
......@@ -77,37 +77,9 @@ export default {
} = newVal
// 基础字段映射
const baseFields = ['id', 'orderCode', 'userId', 'employeeName', 'deliveryEmployeeName', 'deliveryUserId', 'subShopMerchantName', 'subShopMerchantId', 'sellerName', 'sellerUserId', 'sellerMerchantName', 'sellerMerchantId', 'merchantId', 'merchantName', 'customerCouponId']
const baseFields = ['id', 'orderCode', 'userId', 'employeeName', 'defeatEmployeeName', 'deliveryUserId', 'subShopMerchantName', 'subShopMerchantId', 'sellerName', 'sellerUserId', 'sellerMerchantName', 'sellerMerchantId', 'merchantId', 'merchantName', 'customerCouponId']
Object.assign(this.orderObj, Object.fromEntries(baseFields.map(field => [field, rest[field]])))
// 客户信息映射
const customerFields = ['customerName', 'customerSex', 'customerPhone', 'standNo', 'plateNumber', 'experienceFlag']
Object.assign(this.orderObj, Object.fromEntries(customerFields.map(field => [field, customer[field]])))
// 优惠券信息
const { couponName, customerCouponCode } = customerCoupon
Object.assign(this.orderObj, {
couponName,
customerCouponCode,
couponInfo: couponName + customerCouponCode
})
// 车辆信息
this.orderObj.customer = {
carBrand: customer.carBrand,
carBrandId: customer.carBrandId,
carChildsBrandId: customer.carChildsBrandId,
carChildsBrandName: customer.carChildsBrandName,
carSeriesId: customer.carSeriesId,
carSeriesName: customer.carSeriesName,
customerPhone: customer.customerPhone,
standNo: customer.standNo,
plateNumber: customer.plateNumber,
customerSex: customer.customerSex,
experienceFlag: customer.experienceFlag,
customerName: customer.customerName
}
this.orderObj.carBrand = `${customer.carBrand}-${customer.carChildsBrandName}-${customer.carSeriesName}`
const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
this.$set(this.orderObj, 'todayShow', dayjs(this.orderObj.createDate).format('YYYY-MM-DD') + ' ' + weeks[dayjs(this.orderObj.createDate).day()])
......@@ -196,7 +168,7 @@ export default {
console.log(options, 'options')
},
mounted() {
uni.$track.add({ eventCode: 'app_defeat_order' })
uni.$track.add({ eventCode: 'app_equity_defeat_order' })
console.log('mounted', this.orderCreateType)
this.userInfo = uni.$storage.get('userInfo') || {}
this.baseConfigData = uni.$storage.get('mock_data') || {}
......@@ -284,6 +256,7 @@ export default {
this.$set(this.orderObj, 'employeeName', data[0].staffName)
this.orderObj.userId = data[0].uuid
this.orderObj.referrerId = data[0].uuid
// this.orderObj.referrerId = data[0].uuid
console.log(this.orderObj, 'this.orderObj')
}
},
......@@ -292,11 +265,18 @@ export default {
const res = await uni.$api.boutiqueApi.getLastUserOrderInfo({
sellerUserId: this.userInfo.subLoginUser.uuid
})
console.log(res, '上一个订单的销售顾问信息')
this.$set(this.orderObj, 'employeeName', res.employeeName)
this.orderObj.userId = res.userId
this.orderObj.referrerId = res.userId
console.log(res, '上一个订单的销售顾问信息')
let item = this.employeeList.find(i => i.uuid == res.userId)
if (!item) {
this.$set(this.orderObj, 'employeeName', this.employeeList[0].staffName)
this.$set(this.orderObj, 'defeatEmployeeName', this.employeeList[0].staffName)
this.orderObj.userId = this.employeeList[0].uuid
this.orderObj.referrerId = this.employeeList[0].uuid
} else {
this.$set(this.orderObj, 'employeeName', res.employeeName)
this.$set(this.orderObj, 'defeatEmployeeName', res.employeeName)
this.orderObj.userId = res.userId
this.orderObj.referrerId = res.userId
}
},
// 单选框change事件
radioChange(e, val) {
......@@ -325,9 +305,6 @@ export default {
const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
this.$set(this.orderObj, 'todayShow', dayjs(chooseContent).format('YYYY-MM-DD') + ' ' + weeks[dayjs(chooseContent).day()])
this.$set(this.orderObj, 'createDate', dayjs(chooseContent).format('YYYY-MM-DD'))
} else if (_typeValue.key) {
this.orderObj[_typeValue.targetIdKey] = chooseContent[_typeValue.sourceIdKey]
this.$set(this.orderObj, _typeValue.targetNameKey, chooseContent[_typeValue.sourceNameKey])
}
// 定义产品相关字段数组
if (val.popupType == 20) {
......@@ -335,9 +312,10 @@ export default {
this.orderObj.customerName = chooseContent.customer.customerName
this.orderObj.customerPhone = chooseContent.customer.customerPhone
}
if (val.popupType == 0) {
if (val.popupType == 27) {
console.log(chooseContent, 'chooseContent')
this.orderObj.employeeName = chooseContent.staffName
this.orderObj.defeatEmployeeName = chooseContent.staffName
this.orderObj.userId = chooseContent.uuid
this.orderObj.referrerId = chooseContent.uuid
}
......
......@@ -131,6 +131,24 @@
</view>
</template>
</PublishPopup>
<PublishPopup ref="errorOrderPopup" popupClass="errorOrderPopup" type="center" :showClose="true" :isMaskClick="false" title="工单标记">
<template #content>
<view class="error-order-box modatcontent">
<view class="error-order-title">订单编号:{{ orderCardDetail.payId }}</view>
<view class="error-order-content">
若工单信息有误,确定操作可标记为
<span style="color: #4673ff">“已失效”</span>
,并补录新工单以供线下核对。
</view>
</view>
</template>
<template #footer>
<view class="footer-box flex justify-center">
<view class="cancle-btn btn" @click.stop="cancelError">取消</view>
<view class="sure-btn btn" @click.stop="confirmError">确认</view>
</view>
</template>
</PublishPopup>
</view>
</template>
<script>
......@@ -186,6 +204,16 @@ export default {
if (order.equityOrderStatus == 0 && order.equityGoodsFlag == 1) {
config.secondaryButtons.push({ text: '去处理', type: 'secondary', dataType: 'handle' })
}
// 待上传协议状态也支持撤销
if (order.payType == 1) {
// 线上支付显示"错误工单"
config.secondaryButtons.push({ text: '错误工单', type: 'secondary', dataType: 'error' })
} else {
// 非线上支付显示"撤销工单"
config.secondaryButtons.push({ text: '撤销工单', type: 'secondary', dataType: 'revoke' })
}
return config
}
......@@ -254,10 +282,30 @@ export default {
}
}
}
// 除待跟进工单,支付方式为门店收款的订单可以在工单详情页面展示撤销按钮
if (!(order.orderStatus == '-1' && order.selectPayType == 2)) {
config.secondaryButtons.push({ text: '撤销', type: 'secondary', dataType: 'revoke' })
// 战败(-1)、已退款(6)不支持撤销
if (order.orderStatus != -1 && order.orderStatus != '-1' && order.orderStatus != 6) {
// 待报价(0)、待支付(2),支持撤销
if (order.orderStatus == 0 || order.orderStatus == 2) {
config.secondaryButtons.push({ text: '撤销工单', type: 'secondary', dataType: 'revoke' })
}
// 已支付(3)、已完成(5),除了线上支付外都能撤销
else if (order.orderStatus == 3 || order.orderStatus == 5) {
if (order.payType == 1) {
// 线上支付显示"错误工单"
config.secondaryButtons.push({ text: '错误工单', type: 'secondary', dataType: 'error' })
} else {
// 非线上支付显示"撤销工单"
config.secondaryButtons.push({ text: '撤销工单', type: 'secondary', dataType: 'revoke' })
}
}
// 其他状态,支持撤销
else {
if (order.payType == 1) {
config.secondaryButtons.push({ text: '错误工单', type: 'secondary', dataType: 'error' })
} else {
config.secondaryButtons.push({ text: '撤销工单', type: 'secondary', dataType: 'revoke' })
}
}
}
}
} else {
......@@ -425,10 +473,10 @@ export default {
break
case 'price':
// 处理去报价
this.$emit('jump', 'CreateOrder', { paramsData: this.orderCardDetail, type: 'CreateOrder' })
this.$emit('jump', 'CreateOrder', { paramsData: this.orderCardDetail, type: 'CreateOrder' })
break
case 'pay':
this.$emit('openPay',this.orderCardDetail)
this.$emit('openPay', this.orderCardDetail)
// 处理去支付
break
case 'defeat':
......@@ -439,6 +487,10 @@ export default {
// 处理撤销
this.revokeOrder()
break
case 'error':
// 处理错误订单
this.isErrorOrder()
break
case 'default':
// 处理默认情况
break
......@@ -479,7 +531,9 @@ export default {
},
//去处理
createorder() {
this.$emit('jump', 'CreateOrder', { paramsData: this.orderCardDetail, type: 'CreateOrder' })
this.$emit('jump', 'CreateEquity', {
orderId: this.orderCardDetail.orderId
})
},
//上传协议
uploadContract() {
......@@ -489,6 +543,15 @@ export default {
defeatOrder() {
this.$refs.defeatOrderPopup.open(this.orderCardDetail)
},
async isErrorOrder() {
// 校验订单是否可标记为错误订单(在退款流程中无法流转)
let refundStep = await uni.$api.equityApi.getOrderRefundStep({
orderCode: this.orderCardDetail.payId
})
console.log(refundStep, 'refundStep')
if (refundStep == 'Y') return this.showRefundAlert('error')
this.$refs.errorOrderPopup.open(this.orderCardDetail)
},
showRefundAlert(type) {
const text = type == 'error' ? '订单已发起退款,禁止标记为错误工单!如需标记错误请联系总部运营。' : '订单已发起退款,禁止撤销!如需撤销请联系总部运营。'
uni.showModal({
......@@ -552,6 +615,38 @@ export default {
})
}
},
cancelSelection() {
this.$refs.defeatOrderPopup.closePopup()
},
confirmError() {
const that = this
uni.showLoading({
mask: true
})
uni.$api.equityApi
.errorOrderById({
oldQuotationId: that.orderCardDetail.id,
needCreateNewOrder: false
})
.then(res => {
console.log(res, 'res')
if (res) {
that.$refs.errorOrderPopup.closePopup()
uni.hideLoading()
uni.showToast({
title: '提交成功',
icon: 'none'
})
setTimeout(() => {
that.$emit('refresh')
// _this.getList();
}, 500)
}
})
},
cancelError() {
this.$refs.errorOrderPopup.closePopup()
},
onConfirm(val) {
console.log(val)
let urls = []
......@@ -736,6 +831,96 @@ export default {
}
}
}
::v-deep .errorOrderPopup .uni-popup__wrapper {
position: relative;
border-radius: toRpx(32);
opacity: 1;
width: toRpx(848);
height: toRpx(512);
background-color: #fff !important;
.popup-top-box {
text-align: left;
padding: toRpx(48) toRpx(64);
border-radius: toRpx(32) toRpx(32) 0 0;
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%);
&-title {
color: #1a1a1a;
font-size: toRpx(40);
font-weight: 500;
}
.icon-close {
font-size: toRpx(40) !important;
color: rgba(26, 26, 26, 0.6) !important;
}
}
.modatcontent {
box-sizing: border-box;
padding: 0 toRpx(64);
.modalbox {
display: flex;
align-items: center;
box-sizing: border-box;
border-radius: toRpx(16);
background: #f7f8fa;
height: toRpx(136);
border-radius: toRpx(8);
margin: 0 auto;
color: #292d33;
font-size: toRpx(28);
font-weight: 500;
& + .modalbox {
margin-top: toRpx(16);
}
.sprite-icon {
margin: 0 toRpx(24) 0 toRpx(32);
}
}
.act {
border: toRpx(2) solid #347bff;
background: #347bff1a;
}
.error-order-title {
color: #666666;
font-size: toRpx(32);
font-weight: 400;
}
.error-order-content {
margin-top: toRpx(16);
color: #666666;
font-size: toRpx(32);
font-weight: 400;
}
}
.footer-box {
width: 100%;
height: toRpx(164);
background-color: #fff;
position: absolute;
bottom: 0;
border-radius: 0 0 toRpx(32) toRpx(32);
.btn {
width: 40%;
height: toRpx(80);
border-radius: toRpx(48);
opacity: 1;
line-height: toRpx(80);
text-align: center;
color: rgba(26, 26, 26, 0.6);
font-size: toRpx(32);
font-weight: 500;
}
.cancle-btn {
background: #f0f1f5;
}
.sure-btn {
color: #fff;
background: linear-gradient(0deg, #2c66f7 0%, #48a6ff 100%);
margin-left: toRpx(32);
}
}
}
.order-card {
padding: toRpx(36) toRpx(32);
border-radius: toRpx(24);
......
......@@ -158,9 +158,15 @@ export default {
console.log(val)
this.searchObj = null
this.searchObj = val
if (this.searchObj?.zyPayStatus == '1') this.searchObj.orderStatus = 7
console.log(this.searchObj)
if (!this.searchObj.orderStatus) {
if (!this.searchObj.orderStatus && this.searchObj.orderStatus !== 0 && this.searchObj.orderStatus !== '0') {
this.tabIndex = 0
} else {
const index = this.tabList.findIndex(item => item.value == this.searchObj.orderStatus)
console.log(index)
this.tabIndex = index !== -1 ? index : 0
}
this.search()
},
......@@ -194,7 +200,6 @@ export default {
merchantIds: [localUserInfo.shopMerchantId],
...this.searchObj
}
if (params?.zyPayStatus == '1') params.orderStatus = 7
uni.$api.equityApi
.orderStatistics(params)
.then(result => {
......
......@@ -216,9 +216,9 @@ const DEFEAT_FORM_LIST = [
},
{
label: '推荐人员',
value: 'employeeName',
value: 'defeatEmployeeName',
type: 'select',
key: 'employeeName',
key: 'defeatEmployeeName',
required: true,
showText: 'shopMerchantName'
}
......@@ -390,6 +390,11 @@ const popupTypeEnum = {
},
20: {
key: 'defeatCustomer'
},
27: {
key: 'defeatEmployeeName',
targetIdKey: 'referrerId',
targetNameKey: 'referrer'
}
}
const titleList = [null, { addHtml: 'customer' }, { name: '车辆信息' }, { name: '增值车损险' }, { name: '其他信息' }]
......@@ -455,7 +460,7 @@ const EQUITY_FORM_LIST = [
label: '车架号',
value: 'vin',
maxlength: '17',
type: 'input',
type: 'input'
},
{
label: '车辆发票价',
......@@ -467,7 +472,7 @@ const EQUITY_FORM_LIST = [
label: '座位数',
value: 'seat',
type: 'select',
key: 'seat',
key: 'seat'
},
{
label: '发动机号',
......@@ -491,8 +496,8 @@ const EQUITY_FORM_LIST = [
label: '品牌车系',
value: 'carBrandText',
type: 'select',
key: 'carBrand',
},
key: 'carBrand'
}
],
[
{
......@@ -530,7 +535,7 @@ const EQUITY_FORM_LIST = [
value: 'customerAddress',
maxlength: '100',
type: 'input'
},
}
],
[
{
......@@ -557,7 +562,7 @@ const EQUITY_FORM_LIST = [
label: '第一受益人',
value: 'compensationName',
type: 'input'
},
}
],
[
{
......@@ -580,7 +585,7 @@ const EQUITY_FORM_LIST = [
value: '2',
name: '否'
}
],
]
},
{
hidden: true,
......@@ -605,7 +610,7 @@ const EQUITY_FORM_LIST = [
value: 'merchantAddress',
maxlength: '100',
type: 'input'
},
}
]
]
......@@ -626,24 +631,23 @@ const EQUITY_POPUP_ENUM = {
options: true,
key: 'customerType',
targetIdKey: 'customerType',
targetNameKey: 'customerTypeName',
targetNameKey: 'customerTypeName'
},
22: {
options: true,
key: 'cardType',
targetIdKey: 'cardType',
targetNameKey: 'cardTypeName',
targetNameKey: 'cardTypeName'
},
23: {
options: true,
key: 'buyCarType',
targetIdKey: 'buyCarType',
targetNameKey: 'buyCarTypeName',
targetNameKey: 'buyCarTypeName'
},
25: {
key: 'carBrand'
}
}
/**轮胎配置 */
......@@ -873,14 +877,4 @@ const extendServiceFormRule = {
]
}
export {
FORM_LIST, popupTypeEnum, payTypeList,
DEFEAT_FORM_LIST, titleList, UpdateOrderInfo,
defeat_titleList, EQUITY_FORM_LIST, EQUITY_FORM_TITLE_LIST,
EQUITY_POPUP_ENUM, tireObjList, EQUITY_FORM_RULE,
energyFormRule,
oilFormRule,
extendServiceFormRule
}
export { FORM_LIST, popupTypeEnum, payTypeList, DEFEAT_FORM_LIST, titleList, UpdateOrderInfo, defeat_titleList, EQUITY_FORM_LIST, EQUITY_FORM_TITLE_LIST, EQUITY_POPUP_ENUM, tireObjList, EQUITY_FORM_RULE, energyFormRule, oilFormRule, extendServiceFormRule }
......@@ -4,7 +4,6 @@ import { getTime, withinSpliter, daysBetween } from './util'
class LocalLog {
logger = null
constructor() {
this.logger={}
this.logger = new LogCat()
}
debug(msg) {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!