| | |
| | | </el-table-column> |
| | | <el-table-column label="数量" |
| | | prop="quantity" /> |
| | | <el-table-column label="销售发货数量" |
| | | prop="shippedQuantity" /> |
| | | <el-table-column label="可用数量" |
| | | prop="availableQuality" /> |
| | | <el-table-column label="退货数量" |
| | |
| | | width="200" |
| | | show-overflow-tooltip |
| | | :formatter="formattedNumber" /> |
| | | <el-table-column label="实际合同金额(元)" |
| | | prop="netContractAmount" |
| | | width="200" |
| | | show-overflow-tooltip |
| | | :formatter="(_, __, cellValue) => formatMoney(cellValue)" /> |
| | | <el-table-column label="录入人" |
| | | prop="recorderName" |
| | | width="120" |
| | |
| | | <el-button link |
| | | type="primary" |
| | | @click="openForm('edit', scope.row)" |
| | | :disabled="scope.row.stockInStatus === '完全入库'">编辑 |
| | | :disabled="scope.row.approvalStatus === 3">编辑 |
| | | </el-button> |
| | | <el-button link |
| | | type="primary" |
| | |
| | | }, |
| | | }); |
| | | const { form, rules } = toRefs(data); |
| | | const { form: searchForm } = useFormData({ |
| | | ...data.searchForm, |
| | | // 设置录入日期范围为当天 |
| | | entryDate: [ |
| | | dayjs().startOf("day").format("YYYY-MM-DD"), |
| | | dayjs().endOf("day").format("YYYY-MM-DD"), |
| | | ], |
| | | entryDateStart: dayjs().startOf("day").format("YYYY-MM-DD"), |
| | | entryDateEnd: dayjs().endOf("day").format("YYYY-MM-DD"), |
| | | }); |
| | | const { form: searchForm } = useFormData(data.searchForm); |
| | | |
| | | // 产品表单弹框数据 |
| | | const productFormVisible = ref(false); |
| | |
| | | }; |
| | | // 主表合计方法 |
| | | const summarizeMainTable = param => { |
| | | return proxy.summarizeTable(param, ["contractAmount"]); |
| | | return proxy.summarizeTable(param, ["contractAmount", "netContractAmount"]); |
| | | }; |
| | | const formatMoney = value => { |
| | | if (value === null || value === undefined || value === "") { |
| | | return "--"; |
| | | } |
| | | const num = Number(value); |
| | | return Number.isFinite(num) ? num.toFixed(2) : "--"; |
| | | }; |
| | | // 子表合计方法 |
| | | const summarizeProTable = param => { |
| | |
| | | }; |
| | | // 删除产品 |
| | | const deleteProduct = () => { |
| | | if (productData.value.length <= 1) { |
| | | proxy.$modal.msgWarning("采购台账至少需要保留一条产品数据"); |
| | | return; |
| | | } |
| | | if (productSelectedRows.value.length === 0) { |
| | | proxy.$modal.msgWarning("请选择数据"); |
| | | return; |
| | |
| | | return; |
| | | } |
| | | const ids = selectedRows.value.map((item) => item.id); |
| | | |
| | | |
| | | ElMessageBox.confirm("确认批量生成数据?", "批量生成", { |
| | | confirmButtonText: "确认", |
| | | cancelButtonText: "取消", |