Commit 8fa1de09 by cen

fix:修改bug

1 parent 90a2c2e3
......@@ -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],
......
......@@ -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()
......
......@@ -206,7 +206,7 @@ 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' },
......
......@@ -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') || {}
......@@ -234,7 +206,7 @@ export default {
merchantName: userInfo.shopMerchantName
})
}
await this.getEmployeeList()
// await this.getEmployeeList()
this.getLastUserOrderInfo()
this.getGoodsProduct()
},
......@@ -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,10 @@ 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.$set(this.orderObj, 'defeatEmployeeName', res.employeeName)
this.orderObj.userId = res.userId
this.orderObj.referrerId = res.userId
console.log(res, '上一个订单的销售顾问信息')
},
// 单选框change事件
radioChange(e, val) {
......@@ -325,9 +297,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 +304,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
}
......
......@@ -161,6 +161,8 @@ export default {
console.log(this.searchObj)
if (!this.searchObj.orderStatus) {
this.tabIndex = 0
} else {
this.tabIndex = this.tabList.findIndex(item => item.value === this.searchObj.orderStatus)
}
this.search()
},
......@@ -194,6 +196,7 @@ export default {
merchantIds: [localUserInfo.shopMerchantId],
...this.searchObj
}
delete params.orderStatus
if (params?.zyPayStatus == '1') params.orderStatus = 7
uni.$api.equityApi
.orderStatistics(params)
......
......@@ -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 }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!