Commit f9ecc239 by 岑成威

fix: 新增客户档案信息

1 parent ce72508f
...@@ -116,16 +116,15 @@ module.exports = { ...@@ -116,16 +116,15 @@ module.exports = {
}, },
/**搜索订单(含套餐) */ /**搜索订单(含套餐) */
getWorkPackageGoodsList (data) { getWorkPackageGoodsList (data) {
let params = data || {}
params.sceneType = 1
return http.post( return http.post(
{ {
method: 'dj.api.smartcarlife.order.search.containPackageGoods', method: 'dj.api.smartcarlife.order.search.containPackageGoods',
projectName: 'boutique', projectName: 'boutique',
...data, pageSize: 20,
pageSize: 10, pageNum: 1,
pageSize: 999999, statusList: [1],
statusList: [1] sceneType: 1,
...data
}, },
false, false,
'dj', 'dj',
......
...@@ -45,21 +45,28 @@ export default { ...@@ -45,21 +45,28 @@ export default {
return return
} }
this.componentLoading(params) this.componentLoading(params)
const { shopMerchantId } = userInfo, const { shopMerchantId } = userInfo
apiParams = { 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, merchantId: shopMerchantId,
pageSize: 999999, pageSize: 999999,
currentPage: 1, currentPage: 1,
search: searchValue 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) const { list } = await uni.$api.popupApi[apiTargetName](apiParams)
let customerList = list let customerList = list
if (params.defeat) { if (useWorkPackageGoods) {
const listArray = list.map(item => { const listArray = list.map(item => {
if (item.customer && item.customer.carSeriesName) { if (item.customer && item.customer.carSeriesName) {
item.carType = `${item.customer.carBrand || ''}-${item.customer.carChildsBrandName || ''}-${item.customer.carSeriesName || ''}` item.carType = `${item.customer.carBrand || ''}-${item.customer.carChildsBrandName || ''}-${item.customer.carSeriesName || ''}`
...@@ -72,8 +79,9 @@ export default { ...@@ -72,8 +79,9 @@ export default {
this.updateParams(params, customerList || []) this.updateParams(params, customerList || [])
}, },
initData (list) { initData (list) {
const { params: { idKey, defeat }, data } = this const { params: { idKey, defeat }, data, userInfo } = this
let key = defeat ? 'id' : 'customerPhone' const isOrderSearch = !defeat && userInfo.sceneType == 1
let key = defeat || isOrderSearch ? 'id' : 'customerPhone'
console.log(data, idKey) console.log(data, idKey)
if (data[idKey]) { if (data[idKey]) {
this.currentId = data[idKey] this.currentId = data[idKey]
...@@ -88,14 +96,16 @@ export default { ...@@ -88,14 +96,16 @@ export default {
this.getList(searchValue, true) this.getList(searchValue, true)
}, },
choose (i) { choose (i) {
let { params } = this let { params, userInfo } = this
let key = params.defeat ? 'id' : 'customerPhone' const isOrderSearch = !params.defeat && userInfo.sceneType == 1
let key = params.defeat || isOrderSearch ? 'id' : 'customerPhone'
this.currentId = i[key] this.currentId = i[key]
this.$emit('choose', i) this.$emit('choose', i)
}, },
checkActive (i) { checkActive (i) {
let { currentId, data, params } = this let { currentId, data, params, userInfo } = this
let key = params.defeat ? 'id' : 'customerPhone' const isOrderSearch = !params.defeat && userInfo.sceneType == 1
let key = params.defeat || isOrderSearch ? 'id' : 'customerPhone'
return currentId ? (i[key] == currentId) : (i[key]) == data[params.idKey] return currentId ? (i[key] == currentId) : (i[key]) == data[params.idKey]
} }
} }
......
...@@ -654,7 +654,12 @@ const popupTypeEnum = { ...@@ -654,7 +654,12 @@ const popupTypeEnum = {
// 订单类型弹窗(OrderTypePopup) // 订单类型弹窗(OrderTypePopup)
key: 'djOrderType', key: 'djOrderType',
list: '' 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!