Commit 4f0c3eaf by 胡悦

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

2 parents 1c4a7e97 7113e787
...@@ -46,7 +46,7 @@ module.exports = { ...@@ -46,7 +46,7 @@ module.exports = {
/** /**
* 订单详情 * 订单详情
*/ */
getOrderDetail (data) { getOrderDetail(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.order.detail', method: 'dj.api.smartcarlife.order.detail',
projectName: 'boutique', projectName: 'boutique',
...@@ -54,7 +54,7 @@ module.exports = { ...@@ -54,7 +54,7 @@ module.exports = {
}) })
}, },
/**pos支付 */ /**pos支付 */
getPosQr (data) { getPosQr(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.payOrder.create', method: 'dj.api.smartcarlife.payOrder.create',
projectName: 'boutique', projectName: 'boutique',
...@@ -65,7 +65,7 @@ module.exports = { ...@@ -65,7 +65,7 @@ module.exports = {
* 查询门店录单设置 * 查询门店录单设置
}, },
*/ */
orderSettingList (data) { orderSettingList(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.order.field.setting.list', method: 'dj.api.smartcarlife.order.field.setting.list',
projectName: 'boutique', projectName: 'boutique',
...@@ -74,7 +74,7 @@ module.exports = { ...@@ -74,7 +74,7 @@ module.exports = {
}, },
/** 报价单分页列表 */ /** 报价单分页列表 */
quotationPage (data) { quotationPage(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page',
projectName: 'boutique', projectName: 'boutique',
...@@ -82,7 +82,7 @@ module.exports = { ...@@ -82,7 +82,7 @@ module.exports = {
}) })
}, },
/** 根据id查询报价单数据 */ /** 根据id查询报价单数据 */
getQuotationInfo (data) { getQuotationInfo(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.generate', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.generate',
projectName: 'boutique', projectName: 'boutique',
...@@ -90,7 +90,7 @@ module.exports = { ...@@ -90,7 +90,7 @@ module.exports = {
}) })
}, },
/** 修改车损报价单客户基本信息信息 */ /** 修改车损报价单客户基本信息信息 */
updateCustomerInfo (data) { updateCustomerInfo(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.base.info.update', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.base.info.update',
projectName: 'boutique', projectName: 'boutique',
...@@ -99,7 +99,7 @@ module.exports = { ...@@ -99,7 +99,7 @@ module.exports = {
}, },
/** 报价单订单分状态统计信息 */ /** 报价单订单分状态统计信息 */
orderStatistics (data) { orderStatistics(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics',
projectName: 'boutique', projectName: 'boutique',
...@@ -107,7 +107,7 @@ module.exports = { ...@@ -107,7 +107,7 @@ module.exports = {
}) })
}, },
// 查询订单是否支持状态变更 // 查询订单是否支持状态变更
getOrderRefundStep (data) { getOrderRefundStep(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.refundApplyRecord.isExist', method: 'dj.api.smartcarlife.refundApplyRecord.isExist',
projectName: 'boutique', projectName: 'boutique',
...@@ -115,7 +115,7 @@ module.exports = { ...@@ -115,7 +115,7 @@ module.exports = {
}) })
}, },
/**报价单-撤销工单 */ /**报价单-撤销工单 */
cancelOrderById (data) { cancelOrderById(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.quotation.cancel', method: 'dj.api.smartcarlife.quotation.cancel',
projectName: 'boutique', projectName: 'boutique',
...@@ -123,7 +123,7 @@ module.exports = { ...@@ -123,7 +123,7 @@ module.exports = {
}) })
}, },
// 车损报价单战败订单创建 // 车损报价单战败订单创建
defeatOrderCreate (data) { defeatOrderCreate(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add.defeat.order', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add.defeat.order',
projectName: 'boutique', projectName: 'boutique',
...@@ -131,11 +131,46 @@ module.exports = { ...@@ -131,11 +131,46 @@ module.exports = {
}) })
}, },
// 更新合同协议内容 // 更新合同协议内容
updateZyInfo (data) { updateZyInfo(data) {
return http.post({ return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.update', method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.update',
projectName: 'boutique', projectName: 'boutique',
...data ...data
}) })
},
/** 根据商户号商品id获取可选升级商品列表 */
quotationGoodsList(data) {
return http.post({
method: 'dj.api.smartcarlife.quotationGoods.list',
projectName: 'boutique',
...data
})
},
/**
* /** 修改车损报价单信息 */
updateQuotation(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.update',
projectName: 'boutique',
...data
})
},
getCheckEmployeeList(data) {
// 0->2.0 1->1.1 2->1.2 3->1.3 场景对应
// data.sceneList = [1]
return http.post({
method: 'dj.api.smartcarlife.employee.onTheJob.getByMerchantId',
projectName: 'boutique',
...data
})
// return api.post("dj.api.smartcarlife.employee.getByMerchantId", data);
},
/** 更新报价单状态 */
updateOrderStatus(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.status.update',
projectName: 'boutique',
...data
})
} }
} }
...@@ -13,6 +13,7 @@ module.exports = { ...@@ -13,6 +13,7 @@ module.exports = {
return; return;
} }
if (!uni.$signHttp) uni.$signHttp = new Request(uni.signHttpConfig) if (!uni.$signHttp) uni.$signHttp = new Request(uni.signHttpConfig)
data.source = 1
resolve(uni.$signHttp.post(url, data, _config)) resolve(uni.$signHttp.post(url, data, _config))
} }
}) })
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
</view> </view>
</template> </template>
<template v-for="(item, idx) in items"> <template v-for="(item, idx) in items">
<view v-if="!item.hidden"> <view v-if="!item.hidden" :key="idx">
<view <view
class="cell-row" class="cell-row"
:key="idx" :key="idx"
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
:key="radio.value + item.value" :key="radio.value + item.value"
> >
<radio <radio
style="transform: scale(0.7)" style="transform: scale(0.65) translateY(-3px)"
:value="radio.value" :value="radio.value"
:disabled="item.disabled || radio.disabled" :disabled="item.disabled || radio.disabled"
:checked="radio.value == item.current" :checked="radio.value == item.current"
......
...@@ -57,7 +57,7 @@ export default { ...@@ -57,7 +57,7 @@ export default {
const { params: { idKey }, data } = this const { params: { idKey }, data } = this
if (data[idKey]) { if (data[idKey]) {
this.currentId = data[idKey] this.currentId = data[idKey]
let item = list.find(i => i.customerPhone == this.currentId) let item = list.find(i => i.id == this.currentId)
this.$emit('choose', item) this.$emit('choose', item)
} }
this.list = list this.list = list
...@@ -68,12 +68,12 @@ export default { ...@@ -68,12 +68,12 @@ export default {
this.getList(searchValue, true) this.getList(searchValue, true)
}, },
choose (i) { choose (i) {
this.currentId = i.customerPhone this.currentId = i.id
this.$emit('choose', i) this.$emit('choose', i)
}, },
checkActive (i) { checkActive (i) {
let { currentId, data, params } = this let { currentId, data, params } = this
return currentId ? i.customerPhone == currentId : i.customerPhone == data[params.idKey] return currentId ? i.id == currentId : i.id == data[params.idKey]
} }
} }
} }
......
<template> <template>
<view class="employee-list"> <view class="employee-list">
<template v-for="(i, index) in list"> <template v-for="(i, index) in list">
<view <view :key="index" @click="choose(i)" :class="['item flex', { active: checkActive(i) }]">
: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>
......
...@@ -313,7 +313,7 @@ export default { ...@@ -313,7 +313,7 @@ export default {
if (e.goodsFlag != 2) { if (e.goodsFlag != 2) {
let id = '' let id = ''
if (e.goodsFlag == 3) id = e.packageGoods.packageCode if (e.goodsFlag == 3) id = e.packageGoods.packageCode
if (e.goodsFlag == 1) id = e.goods.goodsId if (e.goodsFlag == 1) id = String(e.goods.goodsId)
this.currentIds.push(id) this.currentIds.push(id)
this.chooseList.push(e) this.chooseList.push(e)
} }
...@@ -339,19 +339,28 @@ export default { ...@@ -339,19 +339,28 @@ export default {
id = packageCode id = packageCode
} else { } else {
let { goodsId } = i.goods let { goodsId } = i.goods
id = goodsId id = String(goodsId)
} }
let { currentIds } = this, let { currentIds, chooseList } = this,
index = currentIds.indexOf(id) delIndex = currentIds.indexOf(id)
if (index == -1) { if (delIndex == -1) {
this.currentIds.push(id) this.currentIds.push(id)
this.chooseList.push(i) this.chooseList.push(i)
} else { } else {
this.currentIds.splice(index, 1) this.currentIds.splice(delIndex, 1)
this.chooseList.splice(index, 1)
const delChooseIndex = chooseList.findIndex(e => {
let chooseId = ''
if (e.goodsFlag == 3) chooseId = e.packageGoods.packageCode
if (e.goodsFlag == 1) chooseId = String(e.goods.goodsId)
if (e.goodsFlag == i.goodsFlag) {
if (id == chooseId) return e
} }
})
if (delChooseIndex != -1) this.chooseList.splice(delChooseIndex, 1)
} }
this.$emit('choose', this.chooseList) this.$emit('choose', this.chooseList)
}
} catch (error) { } catch (error) {
console.log(error) console.log(error)
} }
...@@ -374,12 +383,11 @@ export default { ...@@ -374,12 +383,11 @@ export default {
chooseList.map(e => { chooseList.map(e => {
if (e.goodsFlag == 2) ids.push(e.multipleSpecificationsGoods.id) if (e.goodsFlag == 2) ids.push(e.multipleSpecificationsGoods.id)
}) })
return ids.includes(i.multipleSpecificationsGoods.id) return ids.includes(i.multipleSpecificationsGoods.id)
} }
if (goodsFlag == 3) id = packageGoods.packageCode if (goodsFlag == 3) id = packageGoods.packageCode
else id = goods.goodsId else id = goods.goodsId
if (currentIds.length) active = currentIds.includes(id) if (currentIds.length) active = currentIds.includes(String(id))
return active return active
}, },
handlePickerChange (e, { handlePickerChange (e, {
...@@ -411,11 +419,17 @@ export default { ...@@ -411,11 +419,17 @@ export default {
let goodsArr = goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str] let goodsArr = goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]
//当多规格商品只有一个时,直接选中 //当多规格商品只有一个时,直接选中
if (goodsArr.length == 1) { if (goodsArr.length == 1) {
let { chooseList } = this,
addIndex = -1
chooseList.map((item, ind) => {
if (item.goodsFlag == 2 && item.multipleSpecificationsGoods.id == goodsList[index].multipleSpecificationsGoods.id) addIndex = ind
})
goodsList[index].active = true goodsList[index].active = true
goodsList[index].multipleSpecificationsGoods.goods = goodsArr[0] goodsList[index].multipleSpecificationsGoods.goods = goodsArr[0]
goodsList[index].multipleSpecificationsGoods.goods.goodsId = goodsList[index].multipleSpecificationsGoods.goods.merchantGoodsId goodsList[index].multipleSpecificationsGoods.goods.goodsId = goodsList[index].multipleSpecificationsGoods.goods.merchantGoodsId
goodsList[index].multipleSpecificationsGoods.goods.specificationStr = goodsList[index].multipleSpecificationsGoods.goods.specificationData.replace(/;~;/g, '/') goodsList[index].multipleSpecificationsGoods.goods.specificationStr = goodsList[index].multipleSpecificationsGoods.goods.specificationData.replace(/;~;/g, '/')
this.chooseList.push(goodsList[index]) if (addIndex == -1) this.chooseList.push(goodsList[index])
else this.chooseList[addIndex] = goodsList[index]
this.$emit('choose', this.chooseList) this.$emit('choose', this.chooseList)
} else { } else {
//多个多规格商品时出现弹窗 //多个多规格商品时出现弹窗
...@@ -442,12 +456,16 @@ export default { ...@@ -442,12 +456,16 @@ export default {
}) })
let { chooseList } = this let { chooseList } = this
chooseList.forEach((item, ind) => { chooseList.forEach((item, ind) => {
if (item.multipleSpecificationsGoods.id === goodsList[index].multipleSpecificationsGoods.id) { if (item.goodsFlag == 2 && item.multipleSpecificationsGoods.id == goodsList[index].multipleSpecificationsGoods.id) {
chooseList.splice(ind, 1) chooseList.splice(ind, 1)
console.log(chooseList)
} }
}) })
// this.chooseList = chooseList
console.log(this.chooseList)
this.$emit('choose', this.chooseList) this.$emit('choose', this.chooseList)
} }
// console.log(this.list, index, goodsList[index])
this.$set(this.list, index, goodsList[index]) this.$set(this.list, index, goodsList[index])
} else { } else {
if (goodsList[index].active) { if (goodsList[index].active) {
...@@ -458,7 +476,7 @@ export default { ...@@ -458,7 +476,7 @@ export default {
}) })
let { chooseList } = this let { chooseList } = this
chooseList.forEach((item, ind) => { chooseList.forEach((item, ind) => {
if (item.multipleSpecificationsGoods.id === goodsList[index].multipleSpecificationsGoods.id) { if (item.goodsFlag == 2 && item.multipleSpecificationsGoods.id === goodsList[index].multipleSpecificationsGoods.id) {
chooseList.splice(ind, 1) chooseList.splice(ind, 1)
} }
}) })
...@@ -551,9 +569,10 @@ export default { ...@@ -551,9 +569,10 @@ export default {
.title { .title {
min-height: toRpx(88); min-height: toRpx(88);
padding: toRpx(24) 0 toRpx(20); padding: toRpx(24) 0 toRpx(20);
}
.goods-name { .goods-name {
max-width: 80%; max-width: 80%;
} word-break: break-all;
} }
.base-tips { .base-tips {
margin-bottom: 20rpx; margin-bottom: 20rpx;
......
...@@ -220,7 +220,7 @@ const componentConfig = { ...@@ -220,7 +220,7 @@ const componentConfig = {
loadComplete: false, loadComplete: false,
placeholder: '查找', placeholder: '查找',
nullTips: '请选择客户', nullTips: '请选择客户',
idKey: 'phone', idKey: 'customerId',
cacheData: [], cacheData: [],
loadComplete: false, loadComplete: false,
searchValue: '', searchValue: '',
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta'] const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 1 const index = 2
/** /**
* *
0本地 0本地
......
...@@ -68,7 +68,7 @@ uni.signHttpConfig = { ...@@ -68,7 +68,7 @@ uni.signHttpConfig = {
}, },
error: (error, config) => { error: (error, config) => {
console.log('error事件触发', error, config) console.log('error事件触发', error, config)
if(error && error.errMsg == 'request:fail') { if (error && error.errMsg == 'request:fail') {
return uni.showToast({ return uni.showToast({
title: '网络异常', title: '网络异常',
icon: 'none', icon: 'none',
......
...@@ -431,15 +431,7 @@ export default { ...@@ -431,15 +431,7 @@ export default {
} }
if (this.orderObj.standNo) { if (this.orderObj.standNo) {
const vinRex = /^(?=.*[A-Za-z])[A-Za-z0-9]{17}$/ if (!utils.validateVIN(this.orderObj.standNo)) throw '车架号校验不匹配,请核对后重新输入'
console.log(this.orderObj.standNo, vinRex.test(this.orderObj.standNo))
if (!vinRex.test(this.orderObj.standNo)) {
uni.showToast({
title: `请输入正确的VIN码`,
icon: 'none'
})
return false
}
} }
// 处理onlyLabel为true的特殊校验 // 处理onlyLabel为true的特殊校验
......
...@@ -127,7 +127,7 @@ ...@@ -127,7 +127,7 @@
:placeholder="i.inputPlaceholder || '请输入'" :placeholder="i.inputPlaceholder || '请输入'"
placeholder-class="placeholder" placeholder-class="placeholder"
@blur="handleCarInputBlur($event, i , item , index)" @blur="handleCarInputBlur($event, i , item , index)"
:maxlength="3" :maxlength="i.maxlength || 3"
:key="dateKey[`${i.key}_${index}`]" :key="dateKey[`${i.key}_${index}`]"
auto-blur auto-blur
> >
...@@ -353,6 +353,7 @@ export default { ...@@ -353,6 +353,7 @@ export default {
required: true, required: true,
min: 0, min: 0,
max: 3000, max: 3000,
maxlength: 4,
inputPlaceholder: '' inputPlaceholder: ''
}, },
{ {
...@@ -362,6 +363,7 @@ export default { ...@@ -362,6 +363,7 @@ export default {
required: true, required: true,
min: 0, min: 0,
max: 3000, max: 3000,
maxlength: 4,
inputPlaceholder: '' inputPlaceholder: ''
}, },
]), ]),
...@@ -635,11 +637,11 @@ export default { ...@@ -635,11 +637,11 @@ export default {
handleCarInputBlur (e, i, item, index) { handleCarInputBlur (e, i, item, index) {
let { value } = e.detail let { value } = e.detail
if (value) { if (value) {
let { key } = i, let { key, max } = i,
numbers = value.match(/\d+/g) numbers = value.match(/\d+/g)
numbers = numbers ? numbers.join('') : '' numbers = numbers ? numbers.join('') : ''
if (numbers.length > 1) numbers = numbers.replace(/^0+/, '') if (numbers.length > 1) numbers = numbers.replace(/^0+/, '')
item[key] = Math.min(Math.max(Number(numbers), 0), 100).toString() item[key] = Math.min(Math.max(Number(numbers), 0), max).toString()
this.dateKey[`${key}_${index}`] = Date.now() this.dateKey[`${key}_${index}`] = Date.now()
} }
}, },
......
...@@ -87,7 +87,18 @@ export default { ...@@ -87,7 +87,18 @@ export default {
methods: { methods: {
open(data) { open(data) {
this.currentId = '' this.currentId = ''
this.data = data console.log('data', data)
if (data && data.zyPayUrl) {
const urls = data.zyPayUrl.split(',').filter(url => url.trim())
this.$set(this.contractData, this.uploadField.key, urls.map(url => ({
url: url.trim(),
type: this.getFileTypeFromUrl(url.trim()),
name: this.getFileNameFromUrl(url.trim()),
size: 0 // 从字符串无法获取文件大小
})))
console.log('this.contractData', this.contractData)
}
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.popup.open() this.$refs.popup.open()
}) })
...@@ -367,11 +378,20 @@ export default { ...@@ -367,11 +378,20 @@ export default {
} }
return true return true
}, },
confirm () { confirm() {
if (this.validate){ if (this.validate) {
this.$emit('onConfirm',this.contractData) this.$emit('onConfirm', this.contractData)
} }
}, },
getFileTypeFromUrl(url) {
const ext = url.split('.').pop().toLowerCase()
return ext === 'pdf' ? 'pdf' : 'image'
},
// 从URL获取文件名
getFileNameFromUrl(url) {
return url.split('/').pop().split('?')[0] || '未知文件'
},
} }
} }
</script> </script>
......
...@@ -637,6 +637,8 @@ export default { ...@@ -637,6 +637,8 @@ export default {
...carBand, ...carBand,
firstBrandId, firstBrandId,
firstBrandName, firstBrandName,
deliveryCountRecord: carBand.deliveryCount,
notDeliveryCountRecord: carBand.notDeliveryCount,
brandId, brandId,
brandName, brandName,
brandType, brandType,
...@@ -687,9 +689,9 @@ export default { ...@@ -687,9 +689,9 @@ export default {
if (numbers.length > 1) numbers = numbers.replace(/^0+/, '') if (numbers.length > 1) numbers = numbers.replace(/^0+/, '')
this.orderObj[key] = Math.min(Math.max(Number(numbers), 0), 100).toString() this.orderObj[key] = Math.min(Math.max(Number(numbers), 0), 100).toString()
this.dateKey[key] = Date.now() this.dateKey[key] = Date.now()
console.log(key)
if ( if (
this.isNotEmpty(orderObj.recordStaffCount) && this.isNotEmpty(orderObj.recordStaffCount) &&
this.isNotEmpty(value) &&
orderObj.recordStaffCount != value && orderObj.recordStaffCount != value &&
orderObj.lastStaffUuid && orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid userInfo.uuid != orderObj.lastStaffUuid
...@@ -718,6 +720,11 @@ export default { ...@@ -718,6 +720,11 @@ export default {
) )
}, },
handleCarInputBlur (e, i, item, index) { handleCarInputBlur (e, i, item, index) {
const { orderObj,
userInfo,
carBandList
} = this
console.log(carBandList,'===')
let { value } = e.detail let { value } = e.detail
if (value) { if (value) {
let { key, max } = i, let { key, max } = i,
...@@ -726,6 +733,31 @@ export default { ...@@ -726,6 +733,31 @@ export default {
if (numbers.length > 1) numbers = numbers.replace(/^0+/, '') if (numbers.length > 1) numbers = numbers.replace(/^0+/, '')
item[key] = Math.min(Math.max(Number(numbers), 0), max).toString() item[key] = Math.min(Math.max(Number(numbers), 0), max).toString()
this.dateKey[`${key}_${index}`] = Date.now() this.dateKey[`${key}_${index}`] = Date.now()
if (['deliveryCount', 'notDeliveryCount'].includes(key) && orderObj.onBreak == 'N') {
let checkName = `${key}Record`,
checkValue = carBandList[index][checkName]
if (
this.isNotEmpty(item[key]) &&
this.isNotEmpty(carBandList[index][checkName]) &&
checkValue != value &&
orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid) {
let context = i.label
this.noticeObj = {
title: '重要提示',
text: `${context}与 ${orderObj.lastStaffName} 提交不一致,再次确认!不一致提交日报时,${context}将被清空。`,
type: 'warning',
buttons: [
{
text: '确定',
type: 'primary',
}
]
}
this.$nextTick(() => this.$refs.reportNotice.open())
}
}
console.log(key)
} }
}, },
async submit () { async submit () {
...@@ -842,7 +874,7 @@ export default { ...@@ -842,7 +874,7 @@ export default {
showModal = true showModal = true
carBandList.forEach(el => { carBandList.forEach(el => {
if (el.brandType == item.brandType) { if (el.brandType == item.brandType) {
context += `【${item.brandName}】 店端总未触客数+门店售前触客数与当月实际交车数不符,差异值${item.differenceValue context += `【${item.tabName}】 店端总未触客数+门店售前触客数与当月实际交车数不符,差异值${item.differenceValue
},请相关驻店销售对齐核销再次提交\t\n` },请相关驻店销售对齐核销再次提交\t\n`
} }
}) })
......
...@@ -118,13 +118,24 @@ ...@@ -118,13 +118,24 @@
</view> </view>
<NoticePopup ref="notice" title="提示" text="是否撤销该笔客户工单,撤销后客户工单为「已撤销」状态,不再统计订单数和订单金额。" type="warning"></NoticePopup> <NoticePopup ref="notice" title="提示" text="是否撤销该笔客户工单,撤销后客户工单为「已撤销」状态,不再统计订单数和订单金额。" type="warning"></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="战败原因">
<template #content>
<view class="defeat-order-box modatcontent">
<textarea class="defeat-textarea" placeholder="请填写战败原因" maxlength="15" v-model="textareaValue" />
</view>
</template>
<template #footer>
<view class="footer-box flex justify-center">
<view class="cancle-btn btn" @click.stop="cancelSelection">取消</view>
<view class="sure-btn btn" @click.stop="confirmSelection">确认</view>
</view>
</template>
</PublishPopup>
</view> </view>
</template> </template>
<script> <script>
import order_mixins from '../../order_mixins.js' import order_mixins from '../../order_mixins.js'
import { interceptionMixin } from '@/mixin/index' import { interceptionMixin } from '@/mixin/index'
import utils from '@/utils/utils'
import { checkDailyReport, showNextModal } from '@/utils/modalUtils'
import PublishPopup from '@/components/PublishPopup.vue' import PublishPopup from '@/components/PublishPopup.vue'
import NoticePopup from '@/components/NoticePopup.vue' import NoticePopup from '@/components/NoticePopup.vue'
import ContractPopup from './ContractPopup.vue' import ContractPopup from './ContractPopup.vue'
...@@ -380,7 +391,8 @@ export default { ...@@ -380,7 +391,8 @@ export default {
3: '去处理', 3: '去处理',
'-1': '去报价', '-1': '去报价',
5: '去处理' 5: '去处理'
} },
textareaValue: ''
} }
}, },
mounted() { mounted() {
...@@ -419,6 +431,7 @@ export default { ...@@ -419,6 +431,7 @@ export default {
break break
case 'defeat': case 'defeat':
// 处理战败 // 处理战败
this.defeatOrder()
break break
case 'revoke': case 'revoke':
// 处理撤销 // 处理撤销
...@@ -468,7 +481,11 @@ export default { ...@@ -468,7 +481,11 @@ export default {
}, },
//上传协议 //上传协议
uploadContract() { uploadContract() {
this.$refs.contractPopupRef.open({}) this.$refs.contractPopupRef.open(this.orderCardDetail)
},
//战败
defeatOrder() {
this.$refs.defeatOrderPopup.open(this.orderCardDetail)
}, },
showRefundAlert(type) { showRefundAlert(type) {
const text = type == 'error' ? '订单已发起退款,禁止标记为错误工单!如需标记错误请联系总部运营。' : '订单已发起退款,禁止撤销!如需撤销请联系总部运营。' const text = type == 'error' ? '订单已发起退款,禁止标记为错误工单!如需标记错误请联系总部运营。' : '订单已发起退款,禁止撤销!如需撤销请联系总部运营。'
...@@ -508,6 +525,31 @@ export default { ...@@ -508,6 +525,31 @@ export default {
} }
}) })
}, },
confirmSelection() {
if (this.textareaValue) {
uni.$api.equityApi
.updateOrderStatus({
id: this.orderCardDetail.id,
orderStatus: -1,
remark: this.textareaValue
})
.then(res => {
uni.showToast({
title: '提交成功',
icon: 'none'
})
setTimeout(() => {
this.$emit('refresh')
// _this.getList();
}, 500)
})
} else {
uni.showToast({
title: '内容不能为空',
icon: 'none'
})
}
},
onConfirm(val) { onConfirm(val) {
console.log(val) console.log(val)
let urls = [] let urls = []
...@@ -568,16 +610,19 @@ export default { ...@@ -568,16 +610,19 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// Popup样式 // Popup样式
::v-deep .recordOrderPopup .uni-popup__wrapper { ::v-deep .defeatOrderPopup .uni-popup__wrapper {
position: relative; position: relative;
border-radius: toRpx(32); border-radius: toRpx(32);
opacity: 1; opacity: 1;
width: toRpx(848); width: toRpx(848);
height: toRpx(968); height: toRpx(968);
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%); background-color: #fff !important;
.popup-top-box { .popup-top-box {
text-align: left; text-align: left;
padding: toRpx(48) toRpx(64); padding: toRpx(48) toRpx(64);
border-radius: toRpx(32) toRpx(32) 0 0;
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%);
&-title { &-title {
color: #1a1a1a; color: #1a1a1a;
font-size: toRpx(40); font-size: toRpx(40);
...@@ -644,6 +689,17 @@ export default { ...@@ -644,6 +689,17 @@ export default {
margin-left: toRpx(32); margin-left: toRpx(32);
} }
} }
.defeat-textarea {
height: toRpx(568);
border-radius: toRpx(16);
background: #f5f7fa;
width: 100%;
padding: toRpx(24);
box-sizing: border-box;
.uni-input-wrapper {
background: #f5f7fa;
}
}
} }
.order-card { .order-card {
padding: toRpx(36) toRpx(32); padding: toRpx(36) toRpx(32);
......
...@@ -119,6 +119,9 @@ export default { ...@@ -119,6 +119,9 @@ export default {
mounted() { mounted() {
uni.$track.add({ eventCode: 'app_order_management' }) uni.$track.add({ eventCode: 'app_order_management' })
this.localUserInfo = uni.$storage.get('userInfo') || {} this.localUserInfo = uni.$storage.get('userInfo') || {}
if (!this.localUserInfo.isSuper && this.localUserInfo.loginRole != 3 && this.localUserInfo?.loginRole != 6) {
this.searchObj.transferIds = [this.localUserInfo.uuid]
}
this.search() this.search()
}, },
methods: { methods: {
...@@ -177,15 +180,12 @@ export default { ...@@ -177,15 +180,12 @@ export default {
}, },
getStatByStatus() { getStatByStatus() {
const localUserInfo = uni.$storage.get('userInfo') const localUserInfo = uni.$storage.get('userInfo')
console.log(this.searchObj) console.log(this.searchObj, 'this.searchObj')
let params = { let params = {
customerName: this.customerName, customerName: this.customerName,
merchantIds: [localUserInfo.shopMerchantId], merchantIds: [localUserInfo.shopMerchantId],
...this.searchObj ...this.searchObj
} }
if (!localUserInfo.isSuper && localUserInfo.loginRole != 3 && localUserInfo?.loginRole != 6) {
params.transferIds = [localUserInfo.uuid]
}
if (params?.zyPayStatus == '1') params.orderStatus = 7 if (params?.zyPayStatus == '1') params.orderStatus = 7
uni.$api.equityApi uni.$api.equityApi
.orderStatistics(params) .orderStatistics(params)
...@@ -252,9 +252,7 @@ export default { ...@@ -252,9 +252,7 @@ export default {
merchantIds: [localUserInfo.shopMerchantId], merchantIds: [localUserInfo.shopMerchantId],
...this.searchObj ...this.searchObj
} }
if (!localUserInfo.isSuper && localUserInfo.loginRole != 3 && localUserInfo?.loginRole != 6) { if (params?.zyPayStatus == '1') params.orderStatus = 7
params.transferIds = [localUserInfo.uuid]
}
// if (staffUuid) { // if (staffUuid) {
// params.transferIds = [staffUuid] // params.transferIds = [staffUuid]
// } else { // } else {
......
...@@ -143,6 +143,7 @@ export default { ...@@ -143,6 +143,7 @@ export default {
closePopup () { closePopup () {
this.show = false this.show = false
this.$refs.payPopup.closePopup() this.$refs.payPopup.closePopup()
this.$emit('closePopup')
} }
} }
......
...@@ -192,7 +192,6 @@ export default { ...@@ -192,7 +192,6 @@ export default {
// 验证价格输入 // 验证价格输入
validatePrice (event, item, index, cindex) { validatePrice (event, item, index, cindex) {
let value = event.detail.value let value = event.detail.value
console.log('value', value)
// 如果为空则设置为0 // 如果为空则设置为0
if (!value || value.trim() === '') { if (!value || value.trim() === '') {
value = '0' value = '0'
...@@ -223,7 +222,6 @@ export default { ...@@ -223,7 +222,6 @@ export default {
// if (!item.multipleSpecificationsGoods) { // if (!item.multipleSpecificationsGoods) {
// // 普通商品的最小价格检查 // // 普通商品的最小价格检查
// if (item.goods.validMinSellPrice === 'Y' && item.goods.minSellPrice && parseFloat(value) < parseFloat(item.goods.minSellPrice)) { // if (item.goods.validMinSellPrice === 'Y' && item.goods.minSellPrice && parseFloat(value) < parseFloat(item.goods.minSellPrice)) {
// console.log('最小值', item.goods.minSellPrice)
// uni.showToast({ // uni.showToast({
// title: '单价不可低于商品最低价', // title: '单价不可低于商品最低价',
// icon: 'none' // icon: 'none'
...@@ -233,7 +231,6 @@ export default { ...@@ -233,7 +231,6 @@ export default {
// } else if (item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) { // } else if (item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) {
// // 多规格商品的最小价格检查 // // 多规格商品的最小价格检查
// if (item.multipleSpecificationsGoods.goods.validMinSellPrice === 'Y' && item.multipleSpecificationsGoods.goods.minSellPrice && parseFloat(value) < parseFloat(item.multipleSpecificationsGoods.goods.minSellPrice)) { // if (item.multipleSpecificationsGoods.goods.validMinSellPrice === 'Y' && item.multipleSpecificationsGoods.goods.minSellPrice && parseFloat(value) < parseFloat(item.multipleSpecificationsGoods.goods.minSellPrice)) {
// console.log('最小值', item.multipleSpecificationsGoods.goods.minSellPrice)
// uni.showToast({ // uni.showToast({
// title: '单价不可低于商品最低价', // title: '单价不可低于商品最低价',
// icon: 'none' // icon: 'none'
...@@ -246,7 +243,6 @@ export default { ...@@ -246,7 +243,6 @@ export default {
//如果没有多规格商品,更新普通商品的价格 //如果没有多规格商品,更新普通商品的价格
this.$set(this.list[index].goods, 'sellPrice', value) this.$set(this.list[index].goods, 'sellPrice', value)
} else { } else {
console.log(123)
this.$set(this.list[index].packageGoods.goodsList[cindex], 'sellPrice', value) this.$set(this.list[index].packageGoods.goodsList[cindex], 'sellPrice', value)
} }
} else if (item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) { } else if (item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) {
...@@ -264,7 +260,6 @@ export default { ...@@ -264,7 +260,6 @@ export default {
if (!value || value.trim() === '' || parseInt(value) === 0) { if (!value || value.trim() === '' || parseInt(value) === 0) {
value = '1' value = '1'
} }
console.log(value, '1')
// 更新值 // 更新值
if (!item.multipleSpecificationsGoods) { if (!item.multipleSpecificationsGoods) {
this.$set(item.goods, 'number', value) this.$set(item.goods, 'number', value)
...@@ -272,7 +267,6 @@ export default { ...@@ -272,7 +267,6 @@ export default {
// 强制更新多规格商品的数量 // 强制更新多规格商品的数量
this.$set(item.multipleSpecificationsGoods, 'number', value) this.$set(item.multipleSpecificationsGoods, 'number', value)
} }
console.log(item, '2')
this.$emit('changeTotalPrice') this.$emit('changeTotalPrice')
}, },
// 增加数量 // 增加数量
...@@ -356,7 +350,7 @@ export default { ...@@ -356,7 +350,7 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.shop-list { .shop-list {
padding-right: toRpx(32); padding: 0 toRpx(32) toRpx(32) 0;
.shop-item { .shop-item {
display: flex; display: flex;
......
...@@ -102,7 +102,7 @@ const FORM_LIST = [ ...@@ -102,7 +102,7 @@ const FORM_LIST = [
value: 'carBrandText', value: 'carBrandText',
type: 'select', type: 'select',
key: 'carBrand', key: 'carBrand',
required:false required: false
}, },
{ {
label: '车辆颜色', label: '车辆颜色',
...@@ -115,7 +115,7 @@ const FORM_LIST = [ ...@@ -115,7 +115,7 @@ const FORM_LIST = [
value: 'carVin', value: 'carVin',
maxlength: '17', maxlength: '17',
type: 'input', type: 'input',
required:false required: false
}, },
{ {
label: '座位数', label: '座位数',
...@@ -129,7 +129,8 @@ const FORM_LIST = [ ...@@ -129,7 +129,8 @@ const FORM_LIST = [
value: 'price', value: 'price',
maxlength: '8', maxlength: '8',
type: 'input', type: 'input',
required: true required: true,
inputType: 'digit'
} }
], ],
[ [
......
...@@ -265,6 +265,28 @@ const filterValue = (val, unit = '') => { ...@@ -265,6 +265,28 @@ const filterValue = (val, unit = '') => {
return `${val}${unit}` return `${val}${unit}`
} }
/**
*
* 检测VIN码
*/
function validateVIN(vin) {
if (vin.length !== 17) return false;
const weights = [8, 7, 6, 5, 4, 3, 2, 10, 0, 9, 8, 7, 6, 5, 4, 3, 2];
const charMap = {
'A': 1, 'B': 2, 'C': 3, 'D': 4, 'E': 5, 'F': 6, 'G': 7, 'H': 8,
'J': 1, 'K': 2, 'L': 3, 'M': 4, 'N': 5, 'P': 7, 'R': 9, 'S': 2,
'T': 3, 'U': 4, 'V': 5, 'W': 6, 'X': 7, 'Y': 8, 'Z': 9
};
let sum = 0;
for (let i = 0; i < 17; i++) {
const char = vin[i].toUpperCase();
const value = charMap[char] || parseInt(char, 10);
sum += value * weights[i];
}
const checkDigit = (sum % 11) === 10 ? 'X' : (sum % 11).toString();
return checkDigit === vin[8];
}
export default { export default {
compareVersions, compareVersions,
convertDateTimeFormat, convertDateTimeFormat,
...@@ -285,5 +307,6 @@ export default { ...@@ -285,5 +307,6 @@ export default {
showNoAccess, showNoAccess,
setCopyData, setCopyData,
refreshPageData, refreshPageData,
filterValue filterValue,
validateVIN
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!