Merge remote-tracking branch 'origin/ah-simple' into ah-simple
This commit is contained in:
commit
7b52c43df8
|
|
@ -69,7 +69,7 @@
|
|||
v-model="goods.isChecked"
|
||||
@change="onChangeGoods(index)"
|
||||
:key="goods.id"
|
||||
:disabled="goods.maStatus != 2"
|
||||
:disabled="goods.maStatus != 1"
|
||||
>
|
||||
</el-checkbox>
|
||||
</div>
|
||||
|
|
@ -106,7 +106,7 @@
|
|||
size="large"
|
||||
placeholder="选择日期"
|
||||
@onLeaseDateChange="onLeaseDateChange"
|
||||
:isDisabled="goods.maStatus != 2"
|
||||
:isDisabled="goods.maStatus != 1"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
|
|
@ -123,7 +123,7 @@
|
|||
:min="goods.num || 1"
|
||||
:max="goods.deviceCount || 1"
|
||||
size="small"
|
||||
:disabled="goods.maStatus != 2"
|
||||
:disabled="goods.maStatus != 1"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
|
|
@ -563,7 +563,7 @@ const onChangeAll = (e: boolean) => {
|
|||
cardList.value.forEach((item: any) => {
|
||||
item.isChecked = e
|
||||
item.devInfoVoList.forEach((j: any) => {
|
||||
if (j.maStatus == 2) {
|
||||
if (j.maStatus == 1) {
|
||||
j.isChecked = e
|
||||
}
|
||||
})
|
||||
|
|
@ -579,7 +579,7 @@ const onChangeGoods = (index: number) => {
|
|||
// 公司全选事件
|
||||
const onChangeCompany = (e: boolean, index: number, item: any) => {
|
||||
cardList.value[index].devInfoVoList.every((j: any) => {
|
||||
if (j.maStatus == 2) {
|
||||
if (j.maStatus == 1) {
|
||||
j.isChecked = e
|
||||
}
|
||||
})
|
||||
|
|
@ -598,7 +598,7 @@ const allChecked = computed(() => {
|
|||
if (cardList.value.length < 1) {
|
||||
return false
|
||||
} 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
|
||||
cardList.value.forEach((e: any) => {
|
||||
e.devInfoVoList.forEach((g: any) => {
|
||||
if (g.isChecked && g.maStatus == 2) {
|
||||
if (g.isChecked && g.maStatus == 1) {
|
||||
amountNum++
|
||||
}
|
||||
})
|
||||
|
|
@ -619,7 +619,7 @@ const amountDeviceList = computed(() => {
|
|||
let selectList: any = []
|
||||
cardList.value.forEach((e: any) => {
|
||||
e.devInfoVoList.forEach((g: any) => {
|
||||
if (g.isChecked && g.maStatus == 2) {
|
||||
if (g.isChecked && g.maStatus == 1) {
|
||||
selectList.push(g)
|
||||
}
|
||||
})
|
||||
|
|
@ -632,7 +632,7 @@ const orderAmountPice = computed(() => {
|
|||
let orderAmountPice = 0
|
||||
cardList.value.forEach((e: 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
|
||||
}
|
||||
})
|
||||
|
|
@ -650,21 +650,21 @@ const onCartSubmit = debounce(async () => {
|
|||
})
|
||||
return
|
||||
}
|
||||
let isRead = false
|
||||
try {
|
||||
cardList.value.forEach((e: any) => {
|
||||
const isSelect = e.devInfoVoList.some((j: any) => j.isChecked === true)
|
||||
if (isSelect && !e.protocolChecked) {
|
||||
ElMessageBox.alert('请阅读公司合同', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
type: 'error',
|
||||
})
|
||||
isRead = true
|
||||
throw new Error()
|
||||
}
|
||||
})
|
||||
} catch (error) {}
|
||||
if (isRead) return
|
||||
// let isRead = false
|
||||
// try {
|
||||
// cardList.value.forEach((e: any) => {
|
||||
// const isSelect = e.devInfoVoList.some((j: any) => j.isChecked === true)
|
||||
// if (isSelect && !e.protocolChecked) {
|
||||
// ElMessageBox.alert('请阅读公司合同', '提示', {
|
||||
// confirmButtonText: '确定',
|
||||
// type: 'error',
|
||||
// })
|
||||
// isRead = true
|
||||
// throw new Error()
|
||||
// }
|
||||
// })
|
||||
// } catch (error) {}
|
||||
// if (isRead) return
|
||||
|
||||
if (addressTitle.value === '请选择收货地址') {
|
||||
ElMessageBox.alert('请选择收货地址', '提示', {
|
||||
|
|
@ -683,6 +683,7 @@ const onCartSubmit = debounce(async () => {
|
|||
type: 'error',
|
||||
})
|
||||
isDays = true
|
||||
console.log('🚀 ~ isDays:', isDays)
|
||||
throw new Error()
|
||||
}
|
||||
})
|
||||
|
|
@ -750,7 +751,8 @@ const onCartSubmit = debounce(async () => {
|
|||
userStore.editcurrentMenuItem('orderManagement')
|
||||
setTimeout(() => {
|
||||
router.push({
|
||||
name: 'my-user',
|
||||
// name: 'my-user',
|
||||
path: '/mall-view/equipList',
|
||||
})
|
||||
}, 500)
|
||||
// allKey.value++
|
||||
|
|
|
|||
Loading…
Reference in New Issue