Compare commits
2 Commits
ae598d2287
...
62b0a3e246
| Author | SHA1 | Date |
|---|---|---|
|
|
62b0a3e246 | |
|
|
7afb585a14 |
|
|
@ -10,7 +10,7 @@
|
||||||
<el-table-column prop="number" label="数量">
|
<el-table-column prop="number" label="数量">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div v-if="props.status">
|
<div v-if="props.status">
|
||||||
<el-input-number v-model="scope.row.selectedNum" min="0" @change="handleNumChange"
|
<el-input-number v-model="scope.row.selectedNum" :min="0" @change="handleNumChange"
|
||||||
size="small"></el-input-number>
|
size="small"></el-input-number>
|
||||||
<el-dropdown>
|
<el-dropdown>
|
||||||
<span style="line-height: 30px;margin-left: 10px">{{ scope.row.selectedUnit }}</span>
|
<span style="line-height: 30px;margin-left: 10px">{{ scope.row.selectedUnit }}</span>
|
||||||
|
|
@ -117,16 +117,7 @@ const getTotalPrice = () => {
|
||||||
|
|
||||||
return totalPrice;
|
return totalPrice;
|
||||||
}
|
}
|
||||||
const disabled = ref<any>(false)
|
|
||||||
|
|
||||||
watchEffect(() => {
|
|
||||||
if (props.status == 2 || props.status == 0) {
|
|
||||||
disabled.value = true
|
|
||||||
} else {
|
|
||||||
disabled.value = false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
)
|
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
:deep(.el-table__cell) {
|
:deep(.el-table__cell) {
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="数量">
|
<el-table-column label="数量">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-input-number v-if="props.status" v-model="scope.row.selectedNum" min="0"
|
<el-input-number v-if="props.status" v-model="scope.row.selectedNum" :min="0"
|
||||||
@change="handleNumChange" size="small"></el-input-number>
|
@change="handleNumChange" size="small"></el-input-number>
|
||||||
<span v-else>{{ scope.row.selectedNum }}</span>
|
<span v-else>{{ scope.row.selectedNum }}</span>
|
||||||
{{ scope.row.selectedUnit }}
|
{{ scope.row.selectedUnit }}
|
||||||
|
|
|
||||||
|
|
@ -47,10 +47,10 @@
|
||||||
</Panel>
|
</Panel>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 24px">
|
<div style="margin-top: 24px">
|
||||||
<ServiceDetail v-model="formData.itemDetail" :status="statusDisabled" @totalPriceChange="getOrderTotalPrice"></ServiceDetail>
|
<ServiceDetail v-model="formData.itemDetail" :status="formData.status == 0" @totalPriceChange="getOrderTotalPrice"></ServiceDetail>
|
||||||
</div>
|
</div>
|
||||||
<div style="margin-top: 24px">
|
<div style="margin-top: 24px">
|
||||||
<GoodsDetail v-model="formData.goodsDetail" :status="statusDisabled" @totalPriceChange="getOrderTotalPrice"></GoodsDetail>
|
<GoodsDetail v-model="formData.goodsDetail" :status="formData.status == 0" @totalPriceChange="getOrderTotalPrice"></GoodsDetail>
|
||||||
</div>
|
</div>
|
||||||
<div class="bottom" >
|
<div class="bottom" >
|
||||||
<TotalPrice v-model="formData.totalPrice" @edit="saveAndCharge" :status="formData.status" ></TotalPrice>
|
<TotalPrice v-model="formData.totalPrice" @edit="saveAndCharge" :status="formData.status" ></TotalPrice>
|
||||||
|
|
@ -174,11 +174,12 @@ onMounted(() => {
|
||||||
list()
|
list()
|
||||||
})
|
})
|
||||||
const getOrderTotalPrice = () => {
|
const getOrderTotalPrice = () => {
|
||||||
|
debugger
|
||||||
let totalPrice = 0
|
let totalPrice = 0
|
||||||
formData.value.itemDetail?.forEach((item: any) => {
|
formData.value.itemDetail?.forEach((item: any) => {
|
||||||
totalPrice += item.selectedPrice * item.selectedNum
|
totalPrice += item.selectedPrice * item.selectedNum
|
||||||
})
|
})
|
||||||
formData.value.goodsList.forEach((item: any) => {
|
formData.value.goodsDetail.forEach((item: any) => {
|
||||||
totalPrice += item.selectedPrice * item.selectedNum
|
totalPrice += item.selectedPrice * item.selectedNum
|
||||||
})
|
})
|
||||||
formData.value.preTotalPrice = totalPrice
|
formData.value.preTotalPrice = totalPrice
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue