Commit 8fa1de09 by cen

fix:修改bug

1 parent 90a2c2e3
...@@ -39,7 +39,7 @@ export default { ...@@ -39,7 +39,7 @@ export default {
} }
this.componentLoading(params) this.componentLoading(params)
const { shopMerchantId, sceneType, merchantId } = userInfo, const { shopMerchantId, sceneType, merchantId } = userInfo,
apiTargetName = sceneType == 1 ? 'getEmployeeList' : 'getOrderScreenEmployeeList', apiTargetName = sceneType == 1||params.defeat ? 'getEmployeeList' : 'getOrderScreenEmployeeList',
apiParams = { apiParams = {
merchantId: params.idKey == 'sellerUserId' ? merchantId : shopMerchantId, merchantId: params.idKey == 'sellerUserId' ? merchantId : shopMerchantId,
sceneList: params.idKey == 'sellerUserId' ? '' : [sceneType], sceneList: params.idKey == 'sellerUserId' ? '' : [sceneType],
......
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
* 24: 车辆使用性质 * 24: 车辆使用性质
* 25: 选择品牌车系 * 25: 选择品牌车系
* 26: 变速箱类型 * 26: 变速箱类型
* 27: 权益战败推荐人员
*/ */
const componentConfig = { const componentConfig = {
...@@ -253,22 +254,28 @@ const componentConfig = { ...@@ -253,22 +254,28 @@ const componentConfig = {
idKey: 'customerType', idKey: 'customerType',
hideSearch: true, hideSearch: true,
loadComplete: false, loadComplete: false,
options: [{ options: [
{
optionId: 1, optionId: 1,
optionLabel: '个人' optionLabel: '个人'
}, { },
{
optionId: 2, optionId: 2,
optionLabel: '企业' optionLabel: '企业'
}, { },
{
optionId: 3, optionId: 3,
optionLabel: '个人(港澳)' optionLabel: '个人(港澳)'
}, { },
{
optionId: 4, optionId: 4,
optionLabel: '个人(台)' optionLabel: '个人(台)'
}, { },
{
optionId: 5, optionId: 5,
optionLabel: '个人(军官)' optionLabel: '个人(军官)'
}] }
]
}, },
22: { 22: {
name: 'Options', name: 'Options',
...@@ -277,25 +284,32 @@ const componentConfig = { ...@@ -277,25 +284,32 @@ const componentConfig = {
idKey: 'cardType', idKey: 'cardType',
hideSearch: true, hideSearch: true,
loadComplete: false, loadComplete: false,
options: [{ options: [
{
optionId: 1, optionId: 1,
optionLabel: '身份证' optionLabel: '身份证'
}, { },
{
optionId: 2, optionId: 2,
optionLabel: '统一社会信息代码' optionLabel: '统一社会信息代码'
}, { },
{
optionId: 3, optionId: 3,
optionLabel: '港澳返乡证' optionLabel: '港澳返乡证'
}, { },
{
optionId: 4, optionId: 4,
optionLabel: '台胞证' optionLabel: '台胞证'
}, { },
{
optionId: 5, optionId: 5,
optionLabel: '军官证' optionLabel: '军官证'
}, { },
{
optionId: 7, optionId: 7,
optionLabel: '护照' optionLabel: '护照'
}] }
]
}, },
23: { 23: {
name: 'Options', name: 'Options',
...@@ -304,13 +318,16 @@ const componentConfig = { ...@@ -304,13 +318,16 @@ const componentConfig = {
idKey: 'buyCarType', idKey: 'buyCarType',
hideSearch: true, hideSearch: true,
loadComplete: false, loadComplete: false,
options: [{ options: [
{
optionId: 0, optionId: 0,
optionLabel: '贷款车' optionLabel: '贷款车'
}, { },
{
optionId: 1, optionId: 1,
optionLabel: '全款车' optionLabel: '全款车'
}] }
]
}, },
24: { 24: {
name: 'Options', name: 'Options',
...@@ -319,13 +336,16 @@ const componentConfig = { ...@@ -319,13 +336,16 @@ const componentConfig = {
idKey: 'vehicleNature', idKey: 'vehicleNature',
hideSearch: true, hideSearch: true,
loadComplete: false, loadComplete: false,
options: [{ options: [
{
optionId: 0, optionId: 0,
optionLabel: '营运' optionLabel: '营运'
}, { },
{
optionId: 1, optionId: 1,
optionLabel: '非营运' optionLabel: '非营运'
}] }
]
}, },
25: { 25: {
name: 'CarBrand', name: 'CarBrand',
...@@ -348,5 +368,16 @@ const componentConfig = { ...@@ -348,5 +368,16 @@ const componentConfig = {
hideSearch: true, hideSearch: true,
loadComplete: false loadComplete: false
}, },
27: {
name: 'EmployeeList',
title: '销售顾问/录单员',
placeholder: '请输入姓名',
idKey: ['referrerId', 'userId'],
cacheData: [],
loadComplete: false,
searchValue: '',
noData: false,
defeat: true
}
} }
export default { componentConfig } export default { componentConfig }
...@@ -26,11 +26,11 @@ export default { ...@@ -26,11 +26,11 @@ export default {
value: 0, value: 0,
id: 1 id: 1
}, },
{ // {
name: '待确认', // name: '待确认',
value: 1, // value: 1,
id: 2 // id: 2
}, // },
{ {
name: '待支付', name: '待支付',
value: 2, value: 2,
......
...@@ -99,6 +99,15 @@ export default { ...@@ -99,6 +99,15 @@ export default {
}, },
clear() { clear() {
this.chooseContent = {} 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() this.viewKey = Date.now()
}, },
close() { close() {
...@@ -110,7 +119,7 @@ export default { ...@@ -110,7 +119,7 @@ export default {
let updatedChooseContent = { ...this.chooseContent }; let updatedChooseContent = { ...this.chooseContent };
let needRefresh = false; let needRefresh = false;
// 有订单状态,将合同协议状态置为全部 // 有订单状态,将合同协议状态置为全部
if (key == 'orderStatus' && value) { if (key == 'orderStatus' && (value || value== 0)) {
if (updatedChooseContent.zyPayStatus !== undefined) { if (updatedChooseContent.zyPayStatus !== undefined) {
this.$delete(updatedChooseContent, 'zyPayStatus') this.$delete(updatedChooseContent, 'zyPayStatus')
needRefresh = true needRefresh = true
...@@ -145,8 +154,8 @@ export default { ...@@ -145,8 +154,8 @@ export default {
delete chooseContent.payTimeId delete chooseContent.payTimeId
delete chooseContent.orderTimeId delete chooseContent.orderTimeId
Object.keys(chooseContent).map(e => { Object.keys(chooseContent).map(e => {
if (e == 'placeOrderStartDateStr' || e == 'installUpgradeBeginTimeStr') chooseContent[e] = `${chooseContent[e]} 00:00:00` if (e == 'placeOrderStartDateStr' || e == 'installUpgradeBeginTimeStr' || e== 'minCreateTime'|| e== 'minPayTime') chooseContent[e] = `${chooseContent[e]} 00:00:00`
if (e == 'placeOrderEndDateStr' || e == 'installUpgradeEndTimeStr') chooseContent[e] = `${chooseContent[e]} 23:59:59` if (e == 'placeOrderEndDateStr' || e == 'installUpgradeEndTimeStr' || e== 'maxCreateTime'|| e== 'maxPayTime') chooseContent[e] = `${chooseContent[e]} 23:59:59`
}) })
this.$emit('onConfirm', chooseContent) this.$emit('onConfirm', chooseContent)
this.close() this.close()
......
...@@ -206,7 +206,7 @@ module.exports = { ...@@ -206,7 +206,7 @@ module.exports = {
userInfo: {}, userInfo: {},
orderStatusObj: { orderStatusObj: {
0: { text: '待报价', color: '#F7A431', background: '#FFF5E6' }, 0: { text: '待报价', color: '#F7A431', background: '#FFF5E6' },
1: { text: '待确认', color: '#F7A431', background: '#FFF5E6' }, // 1: { text: '待确认', color: '#F7A431', background: '#FFF5E6' },
2: { text: '待支付', color: '#F7A431', background: '#FFF5E6' }, 2: { text: '待支付', color: '#F7A431', background: '#FFF5E6' },
3: { text: '已支付', color: '#2CCA74', background: '#EAF9F1' }, 3: { text: '已支付', color: '#2CCA74', background: '#EAF9F1' },
4: { text: '已支付', color: '#2CCA74', background: '#EAF9F1' }, 4: { text: '已支付', color: '#2CCA74', background: '#EAF9F1' },
......
...@@ -77,37 +77,9 @@ export default { ...@@ -77,37 +77,9 @@ export default {
} = newVal } = 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]]))) 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}` this.orderObj.carBrand = `${customer.carBrand}-${customer.carChildsBrandName}-${customer.carSeriesName}`
const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'] const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
this.$set(this.orderObj, 'todayShow', dayjs(this.orderObj.createDate).format('YYYY-MM-DD') + ' ' + weeks[dayjs(this.orderObj.createDate).day()]) 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 { ...@@ -196,7 +168,7 @@ export default {
console.log(options, 'options') console.log(options, 'options')
}, },
mounted() { mounted() {
uni.$track.add({ eventCode: 'app_defeat_order' }) uni.$track.add({ eventCode: 'app_equity_defeat_order' })
console.log('mounted', this.orderCreateType) console.log('mounted', this.orderCreateType)
this.userInfo = uni.$storage.get('userInfo') || {} this.userInfo = uni.$storage.get('userInfo') || {}
this.baseConfigData = uni.$storage.get('mock_data') || {} this.baseConfigData = uni.$storage.get('mock_data') || {}
...@@ -234,7 +206,7 @@ export default { ...@@ -234,7 +206,7 @@ export default {
merchantName: userInfo.shopMerchantName merchantName: userInfo.shopMerchantName
}) })
} }
await this.getEmployeeList() // await this.getEmployeeList()
this.getLastUserOrderInfo() this.getLastUserOrderInfo()
this.getGoodsProduct() this.getGoodsProduct()
}, },
...@@ -284,6 +256,7 @@ export default { ...@@ -284,6 +256,7 @@ export default {
this.$set(this.orderObj, 'employeeName', data[0].staffName) this.$set(this.orderObj, 'employeeName', data[0].staffName)
this.orderObj.userId = data[0].uuid this.orderObj.userId = data[0].uuid
this.orderObj.referrerId = data[0].uuid this.orderObj.referrerId = data[0].uuid
// this.orderObj.referrerId = data[0].uuid
console.log(this.orderObj, 'this.orderObj') console.log(this.orderObj, 'this.orderObj')
} }
}, },
...@@ -292,11 +265,10 @@ export default { ...@@ -292,11 +265,10 @@ export default {
const res = await uni.$api.boutiqueApi.getLastUserOrderInfo({ const res = await uni.$api.boutiqueApi.getLastUserOrderInfo({
sellerUserId: this.userInfo.subLoginUser.uuid sellerUserId: this.userInfo.subLoginUser.uuid
}) })
console.log(res, '上一个订单的销售顾问信息')
this.$set(this.orderObj, 'employeeName', res.employeeName) this.$set(this.orderObj, 'employeeName', res.employeeName)
this.$set(this.orderObj, 'defeatEmployeeName', res.employeeName)
this.orderObj.userId = res.userId this.orderObj.userId = res.userId
this.orderObj.referrerId = res.userId this.orderObj.referrerId = res.userId
console.log(res, '上一个订单的销售顾问信息')
}, },
// 单选框change事件 // 单选框change事件
radioChange(e, val) { radioChange(e, val) {
...@@ -325,9 +297,6 @@ export default { ...@@ -325,9 +297,6 @@ export default {
const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六'] const weeks = ['星期日', '星期一', '星期二', '星期三', '星期四', '星期五', '星期六']
this.$set(this.orderObj, 'todayShow', dayjs(chooseContent).format('YYYY-MM-DD') + ' ' + weeks[dayjs(chooseContent).day()]) 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')) 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) { if (val.popupType == 20) {
...@@ -335,9 +304,10 @@ export default { ...@@ -335,9 +304,10 @@ export default {
this.orderObj.customerName = chooseContent.customer.customerName this.orderObj.customerName = chooseContent.customer.customerName
this.orderObj.customerPhone = chooseContent.customer.customerPhone this.orderObj.customerPhone = chooseContent.customer.customerPhone
} }
if (val.popupType == 0) { if (val.popupType == 27) {
console.log(chooseContent, 'chooseContent') console.log(chooseContent, 'chooseContent')
this.orderObj.employeeName = chooseContent.staffName this.orderObj.employeeName = chooseContent.staffName
this.orderObj.defeatEmployeeName = chooseContent.staffName
this.orderObj.userId = chooseContent.uuid this.orderObj.userId = chooseContent.uuid
this.orderObj.referrerId = chooseContent.uuid this.orderObj.referrerId = chooseContent.uuid
} }
......
...@@ -161,6 +161,8 @@ export default { ...@@ -161,6 +161,8 @@ export default {
console.log(this.searchObj) console.log(this.searchObj)
if (!this.searchObj.orderStatus) { if (!this.searchObj.orderStatus) {
this.tabIndex = 0 this.tabIndex = 0
} else {
this.tabIndex = this.tabList.findIndex(item => item.value === this.searchObj.orderStatus)
} }
this.search() this.search()
}, },
...@@ -194,6 +196,7 @@ export default { ...@@ -194,6 +196,7 @@ export default {
merchantIds: [localUserInfo.shopMerchantId], merchantIds: [localUserInfo.shopMerchantId],
...this.searchObj ...this.searchObj
} }
delete params.orderStatus
if (params?.zyPayStatus == '1') params.orderStatus = 7 if (params?.zyPayStatus == '1') params.orderStatus = 7
uni.$api.equityApi uni.$api.equityApi
.orderStatistics(params) .orderStatistics(params)
......
...@@ -216,9 +216,9 @@ const DEFEAT_FORM_LIST = [ ...@@ -216,9 +216,9 @@ const DEFEAT_FORM_LIST = [
}, },
{ {
label: '推荐人员', label: '推荐人员',
value: 'employeeName', value: 'defeatEmployeeName',
type: 'select', type: 'select',
key: 'employeeName', key: 'defeatEmployeeName',
required: true, required: true,
showText: 'shopMerchantName' showText: 'shopMerchantName'
} }
...@@ -390,6 +390,11 @@ const popupTypeEnum = { ...@@ -390,6 +390,11 @@ const popupTypeEnum = {
}, },
20: { 20: {
key: 'defeatCustomer' key: 'defeatCustomer'
},
27: {
key: 'defeatEmployeeName',
targetIdKey: 'referrerId',
targetNameKey: 'referrer'
} }
} }
const titleList = [null, { addHtml: 'customer' }, { name: '车辆信息' }, { name: '增值车损险' }, { name: '其他信息' }] const titleList = [null, { addHtml: 'customer' }, { name: '车辆信息' }, { name: '增值车损险' }, { name: '其他信息' }]
...@@ -455,7 +460,7 @@ const EQUITY_FORM_LIST = [ ...@@ -455,7 +460,7 @@ const EQUITY_FORM_LIST = [
label: '车架号', label: '车架号',
value: 'vin', value: 'vin',
maxlength: '17', maxlength: '17',
type: 'input', type: 'input'
}, },
{ {
label: '车辆发票价', label: '车辆发票价',
...@@ -467,7 +472,7 @@ const EQUITY_FORM_LIST = [ ...@@ -467,7 +472,7 @@ const EQUITY_FORM_LIST = [
label: '座位数', label: '座位数',
value: 'seat', value: 'seat',
type: 'select', type: 'select',
key: 'seat', key: 'seat'
}, },
{ {
label: '发动机号', label: '发动机号',
...@@ -491,8 +496,8 @@ const EQUITY_FORM_LIST = [ ...@@ -491,8 +496,8 @@ const EQUITY_FORM_LIST = [
label: '品牌车系', label: '品牌车系',
value: 'carBrandText', value: 'carBrandText',
type: 'select', type: 'select',
key: 'carBrand', key: 'carBrand'
}, }
], ],
[ [
{ {
...@@ -530,7 +535,7 @@ const EQUITY_FORM_LIST = [ ...@@ -530,7 +535,7 @@ const EQUITY_FORM_LIST = [
value: 'customerAddress', value: 'customerAddress',
maxlength: '100', maxlength: '100',
type: 'input' type: 'input'
}, }
], ],
[ [
{ {
...@@ -557,7 +562,7 @@ const EQUITY_FORM_LIST = [ ...@@ -557,7 +562,7 @@ const EQUITY_FORM_LIST = [
label: '第一受益人', label: '第一受益人',
value: 'compensationName', value: 'compensationName',
type: 'input' type: 'input'
}, }
], ],
[ [
{ {
...@@ -580,7 +585,7 @@ const EQUITY_FORM_LIST = [ ...@@ -580,7 +585,7 @@ const EQUITY_FORM_LIST = [
value: '2', value: '2',
name: '否' name: '否'
} }
], ]
}, },
{ {
hidden: true, hidden: true,
...@@ -605,7 +610,7 @@ const EQUITY_FORM_LIST = [ ...@@ -605,7 +610,7 @@ const EQUITY_FORM_LIST = [
value: 'merchantAddress', value: 'merchantAddress',
maxlength: '100', maxlength: '100',
type: 'input' type: 'input'
}, }
] ]
] ]
...@@ -626,24 +631,23 @@ const EQUITY_POPUP_ENUM = { ...@@ -626,24 +631,23 @@ const EQUITY_POPUP_ENUM = {
options: true, options: true,
key: 'customerType', key: 'customerType',
targetIdKey: 'customerType', targetIdKey: 'customerType',
targetNameKey: 'customerTypeName', targetNameKey: 'customerTypeName'
}, },
22: { 22: {
options: true, options: true,
key: 'cardType', key: 'cardType',
targetIdKey: 'cardType', targetIdKey: 'cardType',
targetNameKey: 'cardTypeName', targetNameKey: 'cardTypeName'
}, },
23: { 23: {
options: true, options: true,
key: 'buyCarType', key: 'buyCarType',
targetIdKey: 'buyCarType', targetIdKey: 'buyCarType',
targetNameKey: 'buyCarTypeName', targetNameKey: 'buyCarTypeName'
}, },
25: { 25: {
key: 'carBrand' key: 'carBrand'
} }
} }
/**轮胎配置 */ /**轮胎配置 */
...@@ -873,14 +877,4 @@ const extendServiceFormRule = { ...@@ -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!