Commit 43397bcd by 胡悦

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

2 parents e960d981 8b9c8344
<template> <template>
<view class="customer-list"> <view class="customer-list">
<template v-for="(i, index) in listData"> <template v-for="(i, index) in listData">
<view :key="index" @click="choose(i)" :class="['item flex', { active: checkActive(i) }]"> <view
:key="index"
@click="choose(i)"
:class="['item flex', { active: checkActive(i) }]"
>
<view class="sprite-icon icon-tag-checked"></view> <view class="sprite-icon icon-tag-checked"></view>
<template v-if="i.customerName || (i.customer && i.customer.customerName)"> <view class="info flex text-hide">
{{ i.customerName || (i.customer && i.customer.customerName) }} <template v-if="i.customerName || (i.customer && i.customer.customerName)">
</template> {{ i.customerName || (i.customer && i.customer.customerName) }}
<template v-if="i.carSeriesName || i.carType"> </template>
<view class="car-model">({{ i.carType ? i.carType : i.carChildsBrandName + '-' + i.carSeriesName || '' }})</view> <template v-if="i.carSeriesName || i.carType">
</template> <view class="car-model text-hide">({{ i.carType ? i.carType : i.carChildsBrandName + '-' + i.carSeriesName || '' }})</view>
</template>
</view>
<template v-if="i.customerPhone || i.customer.customerPhone"> <template v-if="i.customerPhone || i.customer.customerPhone">
<view class="phone">|{{ i.customerPhone || (i.customer && i.customer.customerPhone) }}</view> <view class="phone">|{{ i.customerPhone || (i.customer && i.customer.customerPhone) }}</view>
</template> </template>
...@@ -23,14 +29,14 @@ export default { ...@@ -23,14 +29,14 @@ export default {
mixins: [popupmixin], mixins: [popupmixin],
name: 'Customer', name: 'Customer',
inject: ['userInfo'], inject: ['userInfo'],
data() { data () {
return { return {
} }
}, },
mounted() { mounted () {
}, },
methods: { methods: {
async getList(searchValue, search) { async getList (searchValue, search) {
const { userInfo, params } = this, const { userInfo, params } = this,
{ cacheData } = params { cacheData } = params
this.currentId = '' this.currentId = ''
...@@ -48,9 +54,9 @@ export default { ...@@ -48,9 +54,9 @@ export default {
} }
let apiTargetName = !params.defeat ? 'getQuotationCustomerList' : 'getWorkPackageGoodsList' let apiTargetName = !params.defeat ? 'getQuotationCustomerList' : 'getWorkPackageGoodsList'
console.log(apiTargetName, 'apiTargetName') console.log(apiTargetName, 'apiTargetName')
if (params.defeat) { if (params.defeat) {
apiParams.keyword=searchValue 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 (params.defeat) {
...@@ -65,7 +71,7 @@ export default { ...@@ -65,7 +71,7 @@ export default {
console.log(customerList, 'customerList') console.log(customerList, 'customerList')
this.updateParams(params, customerList || []) this.updateParams(params, customerList || [])
}, },
initData(list) { initData (list) {
const { params: { idKey, defeat }, data } = this const { params: { idKey, defeat }, data } = this
let key = defeat ? 'id' : 'customerPhone' let key = defeat ? 'id' : 'customerPhone'
console.log(data, idKey) console.log(data, idKey)
...@@ -77,17 +83,17 @@ export default { ...@@ -77,17 +83,17 @@ export default {
this.list = list this.list = list
this.$emit('onComplete') this.$emit('onComplete')
}, },
handleSearch(searchValue) { handleSearch (searchValue) {
this.list = [] this.list = []
this.getList(searchValue, true) this.getList(searchValue, true)
}, },
choose(i) { choose (i) {
let { params } = this let { params } = this
let key = params.defeat ? 'id' : 'customerPhone' let key = params.defeat ? '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 } = this
let key = params.defeat ? 'id' : 'customerPhone' let key = params.defeat ? 'id' : 'customerPhone'
return currentId ? (i[key] == currentId) : (i[key]) == data[params.idKey] return currentId ? (i[key] == currentId) : (i[key]) == data[params.idKey]
...@@ -99,7 +105,7 @@ export default { ...@@ -99,7 +105,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.customer-list { .customer-list {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, minmax(0, 1fr));
gap: toRpx(32); gap: toRpx(32);
margin: 0 toRpx(48); margin: 0 toRpx(48);
...@@ -119,6 +125,12 @@ export default { ...@@ -119,6 +125,12 @@ export default {
top: 0; top: 0;
right: 0; right: 0;
} }
.info{
max-width: 70%;
}
.phone{
flex-shrink: 0;
}
} }
.active { .active {
......
<template> <template>
<view class="employee-list"> <view class="employee-list">
<template v-for="(i, index) in list"> <template v-for="(i, index) in listData">
<view :key="index" @click="choose(i)" :class="['item flex', { active: checkActive(i) }]"> <view
:key="index"
@click="choose(i)"
:class="['item flex', { active: checkActive(i) }]"
>
<view class="sprite-icon icon-tag-checked"></view> <view class="sprite-icon icon-tag-checked"></view>
{{ i.staffName }} {{ i.staffName }}
</view> </view>
...@@ -35,11 +39,12 @@ export default { ...@@ -35,11 +39,12 @@ export default {
this.currentId = '' this.currentId = ''
if (!search && cacheData && cacheData.length) { if (!search && cacheData && cacheData.length) {
this.initData(cacheData) this.initData(cacheData)
if (searchValue) this.handleSearch(searchValue)
return return
} }
this.componentLoading(params) this.componentLoading(params)
const { shopMerchantId, sceneType, merchantId } = userInfo, const { shopMerchantId, sceneType, merchantId } = userInfo,
apiTargetName = sceneType == 1||params.defeat ? '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],
...@@ -49,12 +54,10 @@ export default { ...@@ -49,12 +54,10 @@ export default {
this.updateParams(params, data || []) this.updateParams(params, data || [])
}, },
initData (list) { initData (list) {
const { idKey, data,params } = this const { idKey, data } = this
console.log(idKey,data)
if (data[idKey]) { if (data[idKey]) {
this.currentId = data[idKey] this.currentId = data[idKey]
let item = list.find(i => i.uuid == this.currentId) let item = list.find(i => i.uuid == this.currentId)
console.log(item) console.log(item)
this.$emit('choose', item) this.$emit('choose', item)
} }
...@@ -62,8 +65,26 @@ export default { ...@@ -62,8 +65,26 @@ export default {
this.$emit('onComplete') this.$emit('onComplete')
}, },
handleSearch (searchValue) { handleSearch (searchValue) {
this.list = [] const { sceneType } = this
this.getList(searchValue, true) if (sceneType == 1) {
this.list = []
this.getList(searchValue, true)
} else this.originalDataSearch(searchValue)
},
originalDataSearch (searchValue) {
console.log(searchValue, '===')
if (!searchValue) this.searchStatus = false
else {
searchValue = searchValue.toUpperCase()
let { list } = this,
employeeList = JSON.parse(JSON.stringify(list)),
arr = []
employeeList.map(e => {
if (e.staffName && e.staffName.toUpperCase().indexOf(searchValue) != -1) arr.push(e)
})
this.searchList = arr
this.searchStatus = true
}
}, },
choose (i) { choose (i) {
let { idKey, data } = this, let { idKey, data } = this,
......
...@@ -235,24 +235,23 @@ export default { ...@@ -235,24 +235,23 @@ export default {
this.viewKey = Date.now() this.viewKey = Date.now()
}, },
handleCell (val) { handleCell (val) {
console.log(val)
if (['calendar', 'futureCalendar'].includes(val.key)) return this.$refs[val.key]?.open() if (['calendar', 'futureCalendar'].includes(val.key)) return this.$refs[val.key]?.open()
this.popupType = Object.keys(EQUITY_POPUP_ENUM).find(key => EQUITY_POPUP_ENUM[key].key === val.key) * 1 this.popupType = Object.keys(EQUITY_POPUP_ENUM).find(key => EQUITY_POPUP_ENUM[key].key === val.key) * 1
this.orderPopupRef.open() this.orderPopupRef.open()
}, },
onConfirm (val) { onConfirm (val) {
console.log(val)
const { chooseContent, popupType } = val, const { chooseContent, popupType } = val,
_typeValue = EQUITY_POPUP_ENUM[popupType] _typeValue = EQUITY_POPUP_ENUM[popupType]
console.log(_typeValue)
if (_typeValue.key == 'carBrand') { if (_typeValue.key == 'carBrand') {
Object.assign(this.orderObj, chooseContent) Object.assign(this.orderObj, chooseContent)
this.$set(this.orderObj, 'carBrandText', this.$set(this.orderObj, 'carBrandText',
`${chooseContent.vehicleBrandName}/${chooseContent.vehicleSubBrandName}/${chooseContent.vehicleSeriesName}/${chooseContent.vehicleShapeName}`) `${chooseContent.vehicleBrandName}/${chooseContent.vehicleSubBrandName}/${chooseContent.vehicleSeriesName}/${chooseContent.vehicleShapeName}`)
this.viewKey = Date.now()
return return
} else if (_typeValue.options) { } else if (_typeValue.options) {
this.$set(this.orderObj, _typeValue.targetIdKey, chooseContent[_typeValue.sourceIdKey || 'optionId']) this.$set(this.orderObj, _typeValue.targetIdKey, chooseContent[_typeValue.sourceIdKey || 'optionId'])
this.$set(this.orderObj, _typeValue.targetNameKey, chooseContent[_typeValue.sourceNameKey || 'optionLabel']) this.$set(this.orderObj, _typeValue.targetNameKey, chooseContent[_typeValue.sourceNameKey || 'optionLabel'])
this.viewKey = Date.now()
return return
} }
this.$set(this.orderObj, _typeValue.value, chooseContent) this.$set(this.orderObj, _typeValue.value, chooseContent)
...@@ -397,7 +396,6 @@ export default { ...@@ -397,7 +396,6 @@ export default {
this.formList[4].map(e => { this.formList[4].map(e => {
if (e.value == 'inclueType') e.current = inclueType if (e.value == 'inclueType') e.current = inclueType
}) })
console.log(JSON.parse(JSON.stringify(this.orderObj)))
this.viewKey = Date.now() this.viewKey = Date.now()
this.loadComplete = true this.loadComplete = true
uni.hideLoading() uni.hideLoading()
...@@ -497,7 +495,6 @@ export default { ...@@ -497,7 +495,6 @@ export default {
this.confirm(params, operationType) this.confirm(params, operationType)
return return
} }
console.log(params)
if (!this.checkOrder(params)) return uni.hideLoading() if (!this.checkOrder(params)) return uni.hideLoading()
const { code, message } = await uni.$api.equityApi.checkVinBuyEquityOrder({ const { code, message } = await uni.$api.equityApi.checkVinBuyEquityOrder({
vin: orderObj.vin vin: orderObj.vin
...@@ -524,7 +521,6 @@ export default { ...@@ -524,7 +521,6 @@ export default {
} else { } else {
if (validatorCheck && validatorCheck.validator) { if (validatorCheck && validatorCheck.validator) {
const res = validatorCheck.validator('', params[key]) const res = validatorCheck.validator('', params[key])
console.log(res, key)
if (res && res.message) throw res.message if (res && res.message) throw res.message
} }
} }
...@@ -588,7 +584,6 @@ export default { ...@@ -588,7 +584,6 @@ export default {
} }
} }
} catch (error) { } catch (error) {
console.log(error, '===')
uni.showToast({ uni.showToast({
title: error, title: error,
icon: 'none' icon: 'none'
...@@ -601,7 +596,6 @@ export default { ...@@ -601,7 +596,6 @@ export default {
try { try {
let params = utils.deepClone(paramsData) let params = utils.deepClone(paramsData)
this.$refs.reportNotice.close() this.$refs.reportNotice.close()
console.log(params, '===')
// 0草稿,1提单 // 0草稿,1提单
params.operationType = operationType params.operationType = operationType
params.addOnsFlag = params.inclueType == 2 ? 0 : 1 params.addOnsFlag = params.inclueType == 2 ? 0 : 1
...@@ -667,7 +661,6 @@ export default { ...@@ -667,7 +661,6 @@ export default {
} else throw message } else throw message
} catch (error) { } catch (error) {
console.log(error)
uni.hideLoading() uni.hideLoading()
if (error) uni.showToast({ if (error) uni.showToast({
title: error, title: error,
......
...@@ -99,7 +99,7 @@ const extendServiceFormList = [ ...@@ -99,7 +99,7 @@ const extendServiceFormList = [
label: '购车发票日期', label: '购车发票日期',
value: 'buyDate', value: 'buyDate',
type: 'single-calendar', type: 'single-calendar',
endDate: dayjs().subtract(1, 'day').format('YYYY-MM-DD') endDate: dayjs().format('YYYY-MM-DD')
}, },
{ {
label: '原厂质保开始日期', label: '原厂质保开始日期',
......
...@@ -20,8 +20,29 @@ ...@@ -20,8 +20,29 @@
</view> </view>
<view class="order-card-bottom-box"> <view class="order-card-bottom-box">
<view class="info-box"> <view class="info-box">
<view class="order-list align-center" v-for="(item, sindex) in orderCardDetail.deliveryUserId ? pointsMultiObj : orderObj" :key="sindex"> <view class="order-list align-center" v-for="(item, sindex) in orderCardDetail.deliveryId ? pointsMultiObj : orderObj" :key="sindex">
<view class="order flex align-center"> <view v-if="item.key == 'remark' || item.key == 'payTime' || item.key == 'createdTime'">
<view class="order flex align-center" v-if="item.key == 'remark' && orderCardDetail.orderStatus == '-1'">
<view class="order-label">{{ item.label }}</view>
<view class="order-value">
<view>{{ orderCardDetail[item.key] || '' }}</view>
</view>
</view>
<view class="order flex align-center" v-if="item.key == 'payTime' && (orderCardDetail.orderStatus == '3' || orderCardDetail.orderStatus == '5')">
<view class="order-label">{{ item.label }}</view>
<view class="order-value">
<view>{{ orderCardDetail[item.key] || '' }}</view>
</view>
</view>
<!-- &&( item.orderStatus == '3'||item.orderStatus =='5') -->
<view class="order flex align-center" v-if="item.key == 'createdTime'">
<view class="order-label">{{ item.label }}</view>
<view class="order-value">
<view>{{ orderCardDetail[item.key] || '' }}</view>
</view>
</view>
</view>
<view class="order flex align-center" v-else>
<view class="order-label">{{ item.label }}</view> <view class="order-label">{{ item.label }}</view>
<view class="order-value flex"> <view class="order-value flex">
<view v-if="item.arr" class="flex"> <view v-if="item.arr" class="flex">
...@@ -62,15 +83,15 @@ ...@@ -62,15 +83,15 @@
{{ orderCardDetail.refundAmount }} {{ orderCardDetail.refundAmount }}
</view> </view>
<!-- 已录单未签名 --> <!-- 已录单未签名 -->
<!-- <view wx:if="{{(item.orderStatus == '3' && item.equityOrderStatus == '0') || (item.orderStatus == '5' && item.equityOrderStatus == '0')}}" class="orange-txt"> <!-- <view v-if="{{(item.orderStatus == '3' && item.equityOrderStatus == '0') || (item.orderStatus == '5' && item.equityOrderStatus == '0')}}" class="orange-txt">
<image class="icon-info" src="/packageEquity/images/icon-info.png"></image> <image class="icon-info" src="/packageEquity/images/icon-info.png"></image>
订单已支付,未录入权益合同 订单已支付,未录入权益合同
</view> </view>
<view wx:elif="{{item.orderStatus == '3' && item.equityOrderStatus == '2'}}" class="orange-txt"> <view v-elif="{{item.orderStatus == '3' && item.equityOrderStatus == '2'}}" class="orange-txt">
<image class="icon-info" src="/packageEquity/images/icon-info.png"></image> <image class="icon-info" src="/packageEquity/images/icon-info.png"></image>
订单已支付,尚未签名确认 订单已支付,尚未签名确认
</view> --> </view> -->
<!-- <view wx:else>创建时间:{{item.createdTime}}</view> --> <!-- <view v-else>创建时间:{{item.createdTime}}</view> -->
</view> </view>
</view> </view>
<!-- 施工技师 --> <!-- 施工技师 -->
...@@ -117,6 +138,7 @@ ...@@ -117,6 +138,7 @@
</view> </view>
</view> </view>
<NoticePopup ref="notice" title="提示" text="是否撤销该笔客户工单,撤销后客户工单为「已撤销」状态,不再统计订单数和订单金额。" type="warning"></NoticePopup> <NoticePopup ref="notice" title="提示" text="是否撤销该笔客户工单,撤销后客户工单为「已撤销」状态,不再统计订单数和订单金额。" type="warning"></NoticePopup>
<NoticePopup ref="reportNotice" :title="noticeObj.title" :text="noticeObj.text" :type="noticeObj.type || 'success'" :buttons="noticeObj.buttons"></NoticePopup>
<ContractPopup ref="contractPopupRef" @onConfirm="onConfirm"></ContractPopup> <ContractPopup ref="contractPopupRef" @onConfirm="onConfirm"></ContractPopup>
<PublishPopup ref="defeatOrderPopup" popupClass="defeatOrderPopup" type="center" :showClose="true" :isMaskClick="false" title="战败原因"> <PublishPopup ref="defeatOrderPopup" popupClass="defeatOrderPopup" type="center" :showClose="true" :isMaskClick="false" title="战败原因">
<template #content> <template #content>
...@@ -440,7 +462,8 @@ export default { ...@@ -440,7 +462,8 @@ export default {
'-1': '去报价', '-1': '去报价',
5: '去处理' 5: '去处理'
}, },
textareaValue: '' textareaValue: '',
noticeObj: {}
} }
}, },
mounted() { mounted() {
...@@ -501,29 +524,36 @@ export default { ...@@ -501,29 +524,36 @@ export default {
}, },
// 撤销工单方法 // 撤销工单方法
revokeOrder() { revokeOrder() {
const that = this
// 配置弹窗按钮 // 配置弹窗按钮
this.$refs.notice.buttonsList = [ that.$refs.notice.buttonsList = [
{ {
text: '取消', text: '取消',
type: 'default', type: 'default',
callback: () => { callback: () => {
this.transmissionOfData = null that.transmissionOfData = null
this.$refs.notice.close() that.$refs.notice.close()
} }
}, },
{ {
text: '撤销', text: '撤销',
type: 'primary', type: 'primary',
callback: async () => { callback: async () => {
// 校验订单是否可撤销(在退款流程中无法撤销) console.log(that.orderCardDetail)
let refundStep = await uni.$api.equityApi.getOrderRefundStep({ orderCode: this.orderCardDetail.payId }) if (that.orderCardDetail.payId) {
if (refundStep?.data == 'Y') return _this.showRefundAlert() // 校验订单是否可撤销(在退款流程中无法撤销)
this.repeal(this.orderCardDetail.id) let refundStep = await uni.$api.equityApi.getOrderRefundStep({ orderCode: that.orderCardDetail.payId })
console.log(refundStep, 'refundStep')
if (refundStep == 'Y') return that.showRefundAlert()
that.repeal(that.orderCardDetail.id)
} else {
that.repeal(that.orderCardDetail.id)
}
} }
} }
] ]
// 打开弹窗 // 打开弹窗
this.$refs.notice.open() that.$refs.notice.open()
}, },
//修改客户信息 //修改客户信息
jumpUpdate() { jumpUpdate() {
...@@ -554,12 +584,36 @@ export default { ...@@ -554,12 +584,36 @@ export default {
}, },
showRefundAlert(type) { showRefundAlert(type) {
const text = type == 'error' ? '订单已发起退款,禁止标记为错误工单!如需标记错误请联系总部运营。' : '订单已发起退款,禁止撤销!如需撤销请联系总部运营。' const text = type == 'error' ? '订单已发起退款,禁止标记为错误工单!如需标记错误请联系总部运营。' : '订单已发起退款,禁止撤销!如需撤销请联系总部运营。'
uni.showModal({ console.log(text, 'text')
title: '提示', let title = '提示',
content: text, btnText = '好的',
showCancel: false, callbackFun = () => {
confirmText: '好的' this.$refs.notice.close()
}) this.$refs.reportNotice.close()
}
this.noticeObj = {
title,
text: text,
type: 'warning',
buttons: [
{
text: btnText,
type: 'primary',
callback: callbackFun
}
]
}
console.log(this.$refs.reportNotice)
this.$nextTick(() => this.$refs.reportNotice.open())
// uni.showModal({
// title: '提示',
// content: text,
// showCancel: false,
// confirmText: '好的'
// })
},
openNotice(message, params) {
uni.hideLoading()
}, },
repeal(id, revokeReason) { repeal(id, revokeReason) {
uni.showLoading({ uni.showLoading({
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!