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 = {
/**
* 订单详情
*/
getOrderDetail (data) {
getOrderDetail(data) {
return http.post({
method: 'dj.api.smartcarlife.order.detail',
projectName: 'boutique',
......@@ -54,7 +54,7 @@ module.exports = {
})
},
/**pos支付 */
getPosQr (data) {
getPosQr(data) {
return http.post({
method: 'dj.api.smartcarlife.payOrder.create',
projectName: 'boutique',
......@@ -65,7 +65,7 @@ module.exports = {
* 查询门店录单设置
},
*/
orderSettingList (data) {
orderSettingList(data) {
return http.post({
method: 'dj.api.smartcarlife.order.field.setting.list',
projectName: 'boutique',
......@@ -74,7 +74,7 @@ module.exports = {
},
/** 报价单分页列表 */
quotationPage (data) {
quotationPage(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.page',
projectName: 'boutique',
......@@ -82,7 +82,7 @@ module.exports = {
})
},
/** 根据id查询报价单数据 */
getQuotationInfo (data) {
getQuotationInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.generate',
projectName: 'boutique',
......@@ -90,7 +90,7 @@ module.exports = {
})
},
/** 修改车损报价单客户基本信息信息 */
updateCustomerInfo (data) {
updateCustomerInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.customer.base.info.update',
projectName: 'boutique',
......@@ -99,7 +99,7 @@ module.exports = {
},
/** 报价单订单分状态统计信息 */
orderStatistics (data) {
orderStatistics(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.order.status.statistics',
projectName: 'boutique',
......@@ -107,7 +107,7 @@ module.exports = {
})
},
// 查询订单是否支持状态变更
getOrderRefundStep (data) {
getOrderRefundStep(data) {
return http.post({
method: 'dj.api.smartcarlife.refundApplyRecord.isExist',
projectName: 'boutique',
......@@ -115,7 +115,7 @@ module.exports = {
})
},
/**报价单-撤销工单 */
cancelOrderById (data) {
cancelOrderById(data) {
return http.post({
method: 'dj.api.smartcarlife.quotation.cancel',
projectName: 'boutique',
......@@ -123,7 +123,7 @@ module.exports = {
})
},
// 车损报价单战败订单创建
defeatOrderCreate (data) {
defeatOrderCreate(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.add.defeat.order',
projectName: 'boutique',
......@@ -131,11 +131,46 @@ module.exports = {
})
},
// 更新合同协议内容
updateZyInfo (data) {
updateZyInfo(data) {
return http.post({
method: 'dj.api.smartcarlife.vehicle.damage.upgrade.quotation.zyPayUrl.update',
projectName: 'boutique',
...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 = {
return;
}
if (!uni.$signHttp) uni.$signHttp = new Request(uni.signHttpConfig)
data.source = 1
resolve(uni.$signHttp.post(url, data, _config))
}
})
......
......@@ -23,7 +23,7 @@
</view>
</template>
<template v-for="(item, idx) in items">
<view v-if="!item.hidden">
<view v-if="!item.hidden" :key="idx">
<view
class="cell-row"
:key="idx"
......@@ -93,7 +93,7 @@
:key="radio.value + item.value"
>
<radio
style="transform: scale(0.7)"
style="transform: scale(0.65) translateY(-3px)"
:value="radio.value"
:disabled="item.disabled || radio.disabled"
:checked="radio.value == item.current"
......
......@@ -54,10 +54,10 @@ export default {
this.updateParams(params, list || [])
},
initData (list) {
const { params: { idKey }, data } = this
const { params: { idKey }, data } = this
if (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.list = list
......@@ -68,12 +68,12 @@ export default {
this.getList(searchValue, true)
},
choose (i) {
this.currentId = i.customerPhone
this.currentId = i.id
this.$emit('choose', i)
},
checkActive (i) {
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>
<view class="employee-list">
<template v-for="(i, index) in list">
<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>
{{ i.staffName }}
</view>
......
......@@ -313,7 +313,7 @@ export default {
if (e.goodsFlag != 2) {
let id = ''
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.chooseList.push(e)
}
......@@ -339,19 +339,28 @@ export default {
id = packageCode
} else {
let { goodsId } = i.goods
id = goodsId
id = String(goodsId)
}
let { currentIds } = this,
index = currentIds.indexOf(id)
if (index == -1) {
let { currentIds, chooseList } = this,
delIndex = currentIds.indexOf(id)
if (delIndex == -1) {
this.currentIds.push(id)
this.chooseList.push(i)
} else {
this.currentIds.splice(index, 1)
this.chooseList.splice(index, 1)
this.currentIds.splice(delIndex, 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) {
console.log(error)
}
......@@ -374,12 +383,11 @@ export default {
chooseList.map(e => {
if (e.goodsFlag == 2) ids.push(e.multipleSpecificationsGoods.id)
})
return ids.includes(i.multipleSpecificationsGoods.id)
}
if (goodsFlag == 3) id = packageGoods.packageCode
else id = goods.goodsId
if (currentIds.length) active = currentIds.includes(id)
if (currentIds.length) active = currentIds.includes(String(id))
return active
},
handlePickerChange (e, {
......@@ -411,11 +419,17 @@ export default {
let goodsArr = goodsList[index].multipleSpecificationsGoods.specificationGoodsMap[str]
//当多规格商品只有一个时,直接选中
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].multipleSpecificationsGoods.goods = goodsArr[0]
goodsList[index].multipleSpecificationsGoods.goods.goodsId = goodsList[index].multipleSpecificationsGoods.goods.merchantGoodsId
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)
} else {
//多个多规格商品时出现弹窗
......@@ -442,12 +456,16 @@ export default {
})
let { chooseList } = this
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)
console.log(chooseList)
}
})
// this.chooseList = chooseList
console.log(this.chooseList)
this.$emit('choose', this.chooseList)
}
// console.log(this.list, index, goodsList[index])
this.$set(this.list, index, goodsList[index])
} else {
if (goodsList[index].active) {
......@@ -458,7 +476,7 @@ export default {
})
let { chooseList } = this
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)
}
})
......@@ -551,9 +569,10 @@ export default {
.title {
min-height: toRpx(88);
padding: toRpx(24) 0 toRpx(20);
.goods-name {
max-width: 80%;
}
}
.goods-name {
max-width: 80%;
word-break: break-all;
}
.base-tips {
margin-bottom: 20rpx;
......
......@@ -220,7 +220,7 @@ const componentConfig = {
loadComplete: false,
placeholder: '查找',
nullTips: '请选择客户',
idKey: 'phone',
idKey: 'customerId',
cacheData: [],
loadComplete: false,
searchValue: '',
......
const target = ['ip', 'dev', 'uat', 'prod', 'beta']
const index = 1
const index = 2
/**
*
0本地
......
......@@ -68,11 +68,11 @@ uni.signHttpConfig = {
},
error: (error, config) => {
console.log('error事件触发', error, config)
if(error && error.errMsg == 'request:fail') {
if (error && error.errMsg == 'request:fail') {
return uni.showToast({
title: '网络异常',
icon: 'none',
})
title: '网络异常',
icon: 'none',
})
}
uni.showToast({
title: error.msg || '业务异常',
......
......@@ -431,15 +431,7 @@ export default {
}
if (this.orderObj.standNo) {
const vinRex = /^(?=.*[A-Za-z])[A-Za-z0-9]{17}$/
console.log(this.orderObj.standNo, vinRex.test(this.orderObj.standNo))
if (!vinRex.test(this.orderObj.standNo)) {
uni.showToast({
title: `请输入正确的VIN码`,
icon: 'none'
})
return false
}
if (!utils.validateVIN(this.orderObj.standNo)) throw '车架号校验不匹配,请核对后重新输入'
}
// 处理onlyLabel为true的特殊校验
......
......@@ -127,7 +127,7 @@
:placeholder="i.inputPlaceholder || '请输入'"
placeholder-class="placeholder"
@blur="handleCarInputBlur($event, i , item , index)"
:maxlength="3"
:maxlength="i.maxlength || 3"
:key="dateKey[`${i.key}_${index}`]"
auto-blur
>
......@@ -353,6 +353,7 @@ export default {
required: true,
min: 0,
max: 3000,
maxlength: 4,
inputPlaceholder: ''
},
{
......@@ -362,6 +363,7 @@ export default {
required: true,
min: 0,
max: 3000,
maxlength: 4,
inputPlaceholder: ''
},
]),
......@@ -635,11 +637,11 @@ export default {
handleCarInputBlur (e, i, item, index) {
let { value } = e.detail
if (value) {
let { key } = i,
let { key, max } = i,
numbers = value.match(/\d+/g)
numbers = numbers ? numbers.join('') : ''
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()
}
},
......
......@@ -87,7 +87,18 @@ export default {
methods: {
open(data) {
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.$refs.popup.open()
})
......@@ -270,7 +281,7 @@ export default {
// 获取合同文件数组
getContractFiles() {
const files = this.contractData[this.uploadField.key]
return Array.isArray(files) ? files : []
return Array.isArray(files) ? files : []
},
// 检查是否是PDF文件
......@@ -367,10 +378,19 @@ export default {
}
return true
},
confirm () {
if (this.validate){
this.$emit('onConfirm',this.contractData)
}
confirm() {
if (this.validate) {
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] || '未知文件'
},
}
}
......
......@@ -388,7 +388,7 @@ export default {
},
infoObject () {
let { tabIndex, carBandList, orderObj: { templateType, totalOrderMoney } } = this,
{ brandType, firstBrandId } = carBandList[tabIndex],
{ brandType, firstBrandId } = carBandList[tabIndex],
/**模版为广联权益 */
TemplateType3 = templateType == 3,//
NotAitoAndTemplateType3 = brandType != 0 || TemplateType3, //非问界 或者 广联权益 时隐藏
......@@ -637,6 +637,8 @@ export default {
...carBand,
firstBrandId,
firstBrandName,
deliveryCountRecord: carBand.deliveryCount,
notDeliveryCountRecord: carBand.notDeliveryCount,
brandId,
brandName,
brandType,
......@@ -687,9 +689,9 @@ export default {
if (numbers.length > 1) numbers = numbers.replace(/^0+/, '')
this.orderObj[key] = Math.min(Math.max(Number(numbers), 0), 100).toString()
this.dateKey[key] = Date.now()
console.log(key)
if (
this.isNotEmpty(orderObj.recordStaffCount) &&
this.isNotEmpty(value) &&
orderObj.recordStaffCount != value &&
orderObj.lastStaffUuid &&
userInfo.uuid != orderObj.lastStaffUuid
......@@ -718,6 +720,11 @@ export default {
)
},
handleCarInputBlur (e, i, item, index) {
const { orderObj,
userInfo,
carBandList
} = this
console.log(carBandList,'===')
let { value } = e.detail
if (value) {
let { key, max } = i,
......@@ -726,6 +733,31 @@ export default {
if (numbers.length > 1) numbers = numbers.replace(/^0+/, '')
item[key] = Math.min(Math.max(Number(numbers), 0), max).toString()
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 () {
......@@ -842,7 +874,7 @@ export default {
showModal = true
carBandList.forEach(el => {
if (el.brandType == item.brandType) {
context += `【${item.brandName}】 店端总未触客数+门店售前触客数与当月实际交车数不符,差异值${item.differenceValue
context += `【${item.tabName}】 店端总未触客数+门店售前触客数与当月实际交车数不符,差异值${item.differenceValue
},请相关驻店销售对齐核销再次提交\t\n`
}
})
......
......@@ -118,13 +118,24 @@
</view>
<NoticePopup ref="notice" title="提示" text="是否撤销该笔客户工单,撤销后客户工单为「已撤销」状态,不再统计订单数和订单金额。" type="warning"></NoticePopup>
<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>
</template>
<script>
import order_mixins from '../../order_mixins.js'
import { interceptionMixin } from '@/mixin/index'
import utils from '@/utils/utils'
import { checkDailyReport, showNextModal } from '@/utils/modalUtils'
import PublishPopup from '@/components/PublishPopup.vue'
import NoticePopup from '@/components/NoticePopup.vue'
import ContractPopup from './ContractPopup.vue'
......@@ -380,7 +391,8 @@ export default {
3: '去处理',
'-1': '去报价',
5: '去处理'
}
},
textareaValue: ''
}
},
mounted() {
......@@ -419,6 +431,7 @@ export default {
break
case 'defeat':
// 处理战败
this.defeatOrder()
break
case 'revoke':
// 处理撤销
......@@ -468,7 +481,11 @@ export default {
},
//上传协议
uploadContract() {
this.$refs.contractPopupRef.open({})
this.$refs.contractPopupRef.open(this.orderCardDetail)
},
//战败
defeatOrder() {
this.$refs.defeatOrderPopup.open(this.orderCardDetail)
},
showRefundAlert(type) {
const text = type == 'error' ? '订单已发起退款,禁止标记为错误工单!如需标记错误请联系总部运营。' : '订单已发起退款,禁止撤销!如需撤销请联系总部运营。'
......@@ -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) {
console.log(val)
let urls = []
......@@ -568,16 +610,19 @@ export default {
</script>
<style lang="scss" scoped>
// Popup样式
::v-deep .recordOrderPopup .uni-popup__wrapper {
::v-deep .defeatOrderPopup .uni-popup__wrapper {
position: relative;
border-radius: toRpx(32);
opacity: 1;
width: toRpx(848);
height: toRpx(968);
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%);
background-color: #fff !important;
.popup-top-box {
text-align: left;
padding: toRpx(48) toRpx(64);
border-radius: toRpx(32) toRpx(32) 0 0;
background: linear-gradient(180deg, #e6f0ff 0%, #ffffff 100%);
&-title {
color: #1a1a1a;
font-size: toRpx(40);
......@@ -644,6 +689,17 @@ export default {
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 {
padding: toRpx(36) toRpx(32);
......
......@@ -119,6 +119,9 @@ export default {
mounted() {
uni.$track.add({ eventCode: 'app_order_management' })
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()
},
methods: {
......@@ -177,15 +180,12 @@ export default {
},
getStatByStatus() {
const localUserInfo = uni.$storage.get('userInfo')
console.log(this.searchObj)
console.log(this.searchObj, 'this.searchObj')
let params = {
customerName: this.customerName,
merchantIds: [localUserInfo.shopMerchantId],
...this.searchObj
}
if (!localUserInfo.isSuper && localUserInfo.loginRole != 3 && localUserInfo?.loginRole != 6) {
params.transferIds = [localUserInfo.uuid]
}
if (params?.zyPayStatus == '1') params.orderStatus = 7
uni.$api.equityApi
.orderStatistics(params)
......@@ -252,9 +252,7 @@ export default {
merchantIds: [localUserInfo.shopMerchantId],
...this.searchObj
}
if (!localUserInfo.isSuper && localUserInfo.loginRole != 3 && localUserInfo?.loginRole != 6) {
params.transferIds = [localUserInfo.uuid]
}
if (params?.zyPayStatus == '1') params.orderStatus = 7
// if (staffUuid) {
// params.transferIds = [staffUuid]
// } else {
......
......@@ -143,6 +143,7 @@ export default {
closePopup () {
this.show = false
this.$refs.payPopup.closePopup()
this.$emit('closePopup')
}
}
......
......@@ -192,7 +192,6 @@ export default {
// 验证价格输入
validatePrice (event, item, index, cindex) {
let value = event.detail.value
console.log('value', value)
// 如果为空则设置为0
if (!value || value.trim() === '') {
value = '0'
......@@ -223,7 +222,6 @@ export default {
// if (!item.multipleSpecificationsGoods) {
// // 普通商品的最小价格检查
// if (item.goods.validMinSellPrice === 'Y' && item.goods.minSellPrice && parseFloat(value) < parseFloat(item.goods.minSellPrice)) {
// console.log('最小值', item.goods.minSellPrice)
// uni.showToast({
// title: '单价不可低于商品最低价',
// icon: 'none'
......@@ -233,7 +231,6 @@ export default {
// } else if (item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) {
// // 多规格商品的最小价格检查
// 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({
// title: '单价不可低于商品最低价',
// icon: 'none'
......@@ -246,7 +243,6 @@ export default {
//如果没有多规格商品,更新普通商品的价格
this.$set(this.list[index].goods, 'sellPrice', value)
} else {
console.log(123)
this.$set(this.list[index].packageGoods.goodsList[cindex], 'sellPrice', value)
}
} else if (item.multipleSpecificationsGoods && item.multipleSpecificationsGoods.goods) {
......@@ -264,7 +260,6 @@ export default {
if (!value || value.trim() === '' || parseInt(value) === 0) {
value = '1'
}
console.log(value, '1')
// 更新值
if (!item.multipleSpecificationsGoods) {
this.$set(item.goods, 'number', value)
......@@ -272,7 +267,6 @@ export default {
// 强制更新多规格商品的数量
this.$set(item.multipleSpecificationsGoods, 'number', value)
}
console.log(item, '2')
this.$emit('changeTotalPrice')
},
// 增加数量
......@@ -356,7 +350,7 @@ export default {
<style scoped lang="scss">
.shop-list {
padding-right: toRpx(32);
padding: 0 toRpx(32) toRpx(32) 0;
.shop-item {
display: flex;
......
......@@ -102,7 +102,7 @@ const FORM_LIST = [
value: 'carBrandText',
type: 'select',
key: 'carBrand',
required:false
required: false
},
{
label: '车辆颜色',
......@@ -115,7 +115,7 @@ const FORM_LIST = [
value: 'carVin',
maxlength: '17',
type: 'input',
required:false
required: false
},
{
label: '座位数',
......@@ -129,7 +129,8 @@ const FORM_LIST = [
value: 'price',
maxlength: '8',
type: 'input',
required: true
required: true,
inputType: 'digit'
}
],
[
......
......@@ -265,6 +265,28 @@ const filterValue = (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 {
compareVersions,
convertDateTimeFormat,
......@@ -285,5 +307,6 @@ export default {
showNoAccess,
setCopyData,
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!