dev
This commit is contained in:
parent
056428efce
commit
7afb585a14
|
|
@ -10,7 +10,7 @@
|
|||
<el-table-column prop="number" label="数量">
|
||||
<template #default="scope">
|
||||
<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>
|
||||
<el-dropdown>
|
||||
<span style="line-height: 30px;margin-left: 10px">{{ scope.row.selectedUnit }}</span>
|
||||
|
|
@ -117,16 +117,7 @@ const getTotalPrice = () => {
|
|||
|
||||
return totalPrice;
|
||||
}
|
||||
const disabled = ref<any>(false)
|
||||
|
||||
watchEffect(() => {
|
||||
if (props.status == 2 || props.status == 0) {
|
||||
disabled.value = true
|
||||
} else {
|
||||
disabled.value = false
|
||||
}
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
:deep(.el-table__cell) {
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
</el-table-column>
|
||||
<el-table-column label="数量">
|
||||
<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>
|
||||
<span v-else>{{ scope.row.selectedNum }}</span>
|
||||
{{ scope.row.selectedUnit }}
|
||||
|
|
|
|||
|
|
@ -47,10 +47,10 @@
|
|||
</Panel>
|
||||
</div>
|
||||
<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 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 class="bottom" >
|
||||
<TotalPrice v-model="formData.totalPrice" @edit="saveAndCharge" :status="formData.status" ></TotalPrice>
|
||||
|
|
@ -174,11 +174,12 @@ onMounted(() => {
|
|||
list()
|
||||
})
|
||||
const getOrderTotalPrice = () => {
|
||||
debugger
|
||||
let totalPrice = 0
|
||||
formData.value.itemDetail?.forEach((item: any) => {
|
||||
totalPrice += item.selectedPrice * item.selectedNum
|
||||
})
|
||||
formData.value.goodsList.forEach((item: any) => {
|
||||
formData.value.goodsDetail.forEach((item: any) => {
|
||||
totalPrice += item.selectedPrice * item.selectedNum
|
||||
})
|
||||
formData.value.preTotalPrice = totalPrice
|
||||
|
|
|
|||
Loading…
Reference in New Issue