This commit is contained in:
bb_pan 2025-10-14 19:47:17 +08:00
parent 2c9274247f
commit 613fcadf12
1 changed files with 28 additions and 26 deletions

View File

@ -69,7 +69,7 @@
v-model="goods.isChecked" v-model="goods.isChecked"
@change="onChangeGoods(index)" @change="onChangeGoods(index)"
:key="goods.id" :key="goods.id"
:disabled="goods.maStatus != 2" :disabled="goods.maStatus != 1"
> >
</el-checkbox> </el-checkbox>
</div> </div>
@ -77,7 +77,7 @@
<el-col :span="9" class="goods-info"> <el-col :span="9" class="goods-info">
<div class="img-box"> <div class="img-box">
<img :src="goods.picUrl" alt="" /> <img :src="goods.picUrl" alt="" />
<div class="img-mask" v-if="goods.maStatus != 2"> <div class="img-mask" v-if="goods.maStatus != 1">
<span> 装备已下架 </span> <span> 装备已下架 </span>
</div> </div>
</div> </div>
@ -106,7 +106,7 @@
size="large" size="large"
placeholder="选择日期" placeholder="选择日期"
@onLeaseDateChange="onLeaseDateChange" @onLeaseDateChange="onLeaseDateChange"
:isDisabled="goods.maStatus != 2" :isDisabled="goods.maStatus != 1"
/> />
</div> </div>
</el-col> </el-col>
@ -123,7 +123,7 @@
:min="goods.num || 1" :min="goods.num || 1"
:max="goods.deviceCount || 1" :max="goods.deviceCount || 1"
size="small" size="small"
:disabled="goods.maStatus != 2" :disabled="goods.maStatus != 1"
/> />
</div> </div>
</el-col> </el-col>
@ -563,7 +563,7 @@ const onChangeAll = (e: boolean) => {
cardList.value.forEach((item: any) => { cardList.value.forEach((item: any) => {
item.isChecked = e item.isChecked = e
item.devInfoVoList.forEach((j: any) => { item.devInfoVoList.forEach((j: any) => {
if (j.maStatus == 2) { if (j.maStatus == 1) {
j.isChecked = e j.isChecked = e
} }
}) })
@ -579,7 +579,7 @@ const onChangeGoods = (index: number) => {
// //
const onChangeCompany = (e: boolean, index: number, item: any) => { const onChangeCompany = (e: boolean, index: number, item: any) => {
cardList.value[index].devInfoVoList.every((j: any) => { cardList.value[index].devInfoVoList.every((j: any) => {
if (j.maStatus == 2) { if (j.maStatus == 1) {
j.isChecked = e j.isChecked = e
} }
}) })
@ -598,7 +598,7 @@ const allChecked = computed(() => {
if (cardList.value.length < 1) { if (cardList.value.length < 1) {
return false return false
} else { } else {
return cardList.value.every((e: any) => e.maStatus == 2 && e.isChecked === true) return cardList.value.every((e: any) => e.maStatus == 1 && e.isChecked === true)
} }
}) })
@ -607,7 +607,7 @@ const amountDevice = computed(() => {
let amountNum = 0 let amountNum = 0
cardList.value.forEach((e: any) => { cardList.value.forEach((e: any) => {
e.devInfoVoList.forEach((g: any) => { e.devInfoVoList.forEach((g: any) => {
if (g.isChecked && g.maStatus == 2) { if (g.isChecked && g.maStatus == 1) {
amountNum++ amountNum++
} }
}) })
@ -619,7 +619,7 @@ const amountDeviceList = computed(() => {
let selectList: any = [] let selectList: any = []
cardList.value.forEach((e: any) => { cardList.value.forEach((e: any) => {
e.devInfoVoList.forEach((g: any) => { e.devInfoVoList.forEach((g: any) => {
if (g.isChecked && g.maStatus == 2) { if (g.isChecked && g.maStatus == 1) {
selectList.push(g) selectList.push(g)
} }
}) })
@ -632,7 +632,7 @@ const orderAmountPice = computed(() => {
let orderAmountPice = 0 let orderAmountPice = 0
cardList.value.forEach((e: any) => { cardList.value.forEach((e: any) => {
e.devInfoVoList.forEach((g: any) => { e.devInfoVoList.forEach((g: any) => {
if (g.isChecked && g.maStatus == 2) { if (g.isChecked && g.maStatus == 1) {
orderAmountPice = g.num * g.dayLeasePrice * g.days + orderAmountPice orderAmountPice = g.num * g.dayLeasePrice * g.days + orderAmountPice
} }
}) })
@ -650,21 +650,21 @@ const onCartSubmit = debounce(async () => {
}) })
return return
} }
let isRead = false // let isRead = false
try { // try {
cardList.value.forEach((e: any) => { // cardList.value.forEach((e: any) => {
const isSelect = e.devInfoVoList.some((j: any) => j.isChecked === true) // const isSelect = e.devInfoVoList.some((j: any) => j.isChecked === true)
if (isSelect && !e.protocolChecked) { // if (isSelect && !e.protocolChecked) {
ElMessageBox.alert('请阅读公司合同', '提示', { // ElMessageBox.alert('', '', {
confirmButtonText: '确定', // confirmButtonText: '',
type: 'error', // type: 'error',
}) // })
isRead = true // isRead = true
throw new Error() // throw new Error()
} // }
}) // })
} catch (error) {} // } catch (error) {}
if (isRead) return // if (isRead) return
if (addressTitle.value === '请选择收货地址') { if (addressTitle.value === '请选择收货地址') {
ElMessageBox.alert('请选择收货地址', '提示', { ElMessageBox.alert('请选择收货地址', '提示', {
@ -683,6 +683,7 @@ const onCartSubmit = debounce(async () => {
type: 'error', type: 'error',
}) })
isDays = true isDays = true
console.log('🚀 ~ isDays:', isDays)
throw new Error() throw new Error()
} }
}) })
@ -750,7 +751,8 @@ const onCartSubmit = debounce(async () => {
userStore.editcurrentMenuItem('orderManagement') userStore.editcurrentMenuItem('orderManagement')
setTimeout(() => { setTimeout(() => {
router.push({ router.push({
name: 'my-user', // name: 'my-user',
path: '/mall-view/equipList',
}) })
}, 500) }, 500)
// allKey.value++ // allKey.value++