| | |
| | | erpPriceMultiply, |
| | | } from '@vben/utils'; |
| | | |
| | | import { Input, InputNumber, Select } from 'ant-design-vue'; |
| | | import { Input, InputNumber, Select, Tag } from 'ant-design-vue'; |
| | | |
| | | import { TableAction, useVbenVxeGrid } from '#/adapter/vxe-table'; |
| | | import { getItemPage } from '#/api/mdm/item'; |
| | |
| | | taxPrice: undefined, |
| | | totalPrice: undefined, |
| | | remark: undefined, |
| | | needProduction: 1, // 默认需要生产 |
| | | }; |
| | | tableData.value.push(newRow); |
| | | // 通知父组件更新 |
| | |
| | | erpPriceMultiply(row.totalProductPrice, (row.taxPercent || 0) / 100) ?? 0; |
| | | row.totalPrice = row.totalProductPrice + row.taxPrice; |
| | | } |
| | | // 默认需要生产 |
| | | if (row.needProduction === undefined) { |
| | | row.needProduction = 1; |
| | | } |
| | | } |
| | | |
| | | /** 表单校验 */ |
| | |
| | | /> |
| | | <span v-else>{{ row.productName || '-' }}</span> |
| | | </template> |
| | | <template #needProduction="{ row }"> |
| | | <Select |
| | | v-if="!disabled" |
| | | v-model:value="row.needProduction" |
| | | :options="[ |
| | | { label: '是', value: 1 }, |
| | | { label: '否', value: 0 }, |
| | | ]" |
| | | class="w-full" |
| | | placeholder="请选择" |
| | | @change="handleRowChange(row)" |
| | | /> |
| | | <Tag v-else-if="row.needProduction === 1" color="success">是</Tag> |
| | | <Tag v-else color="default">否</Tag> |
| | | </template> |
| | | <template #count="{ row }"> |
| | | <InputNumber |
| | | v-if="!disabled" |