Commit f9ecc239 by 岑成威

fix: 新增客户档案信息

1 parent ce72508f
......@@ -116,16 +116,15 @@ module.exports = {
},
/**搜索订单(含套餐) */
getWorkPackageGoodsList (data) {
let params = data || {}
params.sceneType = 1
return http.post(
{
method: 'dj.api.smartcarlife.order.search.containPackageGoods',
projectName: 'boutique',
...data,
pageSize: 10,
pageSize: 999999,
statusList: [1]
pageSize: 20,
pageNum: 1,
statusList: [1],
sceneType: 1,
...data
},
false,
'dj',
......
......@@ -45,21 +45,28 @@ export default {
return
}
this.componentLoading(params)
const { shopMerchantId } = userInfo,
apiParams = {
const { shopMerchantId } = userInfo
const isOrderSearch = !params.defeat && userInfo.sceneType == 1
const useWorkPackageGoods = params.defeat || isOrderSearch
let apiTargetName = useWorkPackageGoods ? 'getWorkPackageGoodsList' : 'getQuotationCustomerList'
let apiParams = useWorkPackageGoods
? {
merchantId: shopMerchantId,
pageSize: 20,
pageNum: 1,
statusList: [1],
sceneType: 1,
keyword: searchValue || ''
}
: {
merchantId: shopMerchantId,
pageSize: 999999,
currentPage: 1,
search: searchValue
}
let apiTargetName = !params.defeat ? 'getQuotationCustomerList' : 'getWorkPackageGoodsList'
console.log(apiTargetName, 'apiTargetName')
if (params.defeat) {
apiParams.keyword = searchValue
}
const { list } = await uni.$api.popupApi[apiTargetName](apiParams)
let customerList = list
if (params.defeat) {
if (useWorkPackageGoods) {
const listArray = list.map(item => {
if (item.customer && item.customer.carSeriesName) {
item.carType = `${item.customer.carBrand || ''}-${item.customer.carChildsBrandName || ''}-${item.customer.carSeriesName || ''}`
......@@ -72,8 +79,9 @@ export default {
this.updateParams(params, customerList || [])
},
initData (list) {
const { params: { idKey, defeat }, data } = this
let key = defeat ? 'id' : 'customerPhone'
const { params: { idKey, defeat }, data, userInfo } = this
const isOrderSearch = !defeat && userInfo.sceneType == 1
let key = defeat || isOrderSearch ? 'id' : 'customerPhone'
console.log(data, idKey)
if (data[idKey]) {
this.currentId = data[idKey]
......@@ -88,14 +96,16 @@ export default {
this.getList(searchValue, true)
},
choose (i) {
let { params } = this
let key = params.defeat ? 'id' : 'customerPhone'
let { params, userInfo } = this
const isOrderSearch = !params.defeat && userInfo.sceneType == 1
let key = params.defeat || isOrderSearch ? 'id' : 'customerPhone'
this.currentId = i[key]
this.$emit('choose', i)
},
checkActive (i) {
let { currentId, data, params } = this
let key = params.defeat ? 'id' : 'customerPhone'
let { currentId, data, params, userInfo } = this
const isOrderSearch = !params.defeat && userInfo.sceneType == 1
let key = params.defeat || isOrderSearch ? 'id' : 'customerPhone'
return currentId ? (i[key] == currentId) : (i[key]) == data[params.idKey]
}
}
......
......@@ -654,7 +654,12 @@ const popupTypeEnum = {
// 订单类型弹窗(OrderTypePopup)
key: 'djOrderType',
list: ''
},
19: {
key: 'customer'
}
}
export { FORM_LIST, popupTypeEnum, payTypeList, DEFEAT_FORM_LIST }
const titleList = [null, { addHtml: 'customer' }]
export { FORM_LIST, popupTypeEnum, payTypeList, DEFEAT_FORM_LIST, titleList }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!