| | |
| | | <script setup> |
| | | import {onMounted, reactive, ref, watch} from "vue" |
| | | import {computed, onMounted, reactive, ref, watch} from "vue" |
| | | import {filterChanged} from "@/hook" |
| | | import {useI18n} from "vue-i18n" |
| | | import {ElMessage} from "element-plus"; |
| | |
| | | // {field: 'buildingNumber',width:120, title: '楼号',editRender: { name: 'input'},filters:[{ data: '' }],slots: { filter: 'num1_filter'}, sortable: true,filterMethod:filterChanged}, |
| | | {field: 'alias', title:'其他加工',editRender: { name: 'input'},minWith:'130'}, |
| | | {field: 'price', title:'单价',editRender: { name: 'input'}}, |
| | | {field: 'quantity', title:'数量',editRender: { name: 'input'} }, |
| | | {field: 'quantity', title:'数量' }, |
| | | {field: 'money', slots:{default:'default'}, title:'金额'} |
| | | ], |
| | | //表单验证 |
| | |
| | | xGrid.value.reloadData(prop.otherMoney) |
| | | }) |
| | | |
| | | const countAmount = (row)=>{ |
| | | const countAmount = computed(() => (row) => { |
| | | const price = row.price===null?0:row.price |
| | | const quantity = row.quantity===null?0:row.quantity |
| | | return parseFloat((row.price * row.quantity).toFixed(2)) |
| | | } |
| | | }) |
| | | |
| | | |
| | | const validate = async () => { |
| | | const errMap = await xGrid.value.validate(true) |