| | |
| | | <div v-if="!detailEnter" style="margin: 10px"> |
| | | <el-button size="small" type="primary" @click="add">新增</el-button> |
| | | <!-- <el-button size="small" type="primary" disabled>导入明细</el-button> --> |
| | | <el-button size="small" type="primary">清空</el-button> |
| | | <el-button size="small" type="primary">重算</el-button> |
| | | <el-button size="small" type="primary" @click="empty">清空</el-button> |
| | | <el-button size="small" type="primary" @click="recalculate">重算</el-button> |
| | | </div> |
| | | <div v-if="showSummary.total || showSummary.refundable" style="height: 42px; line-height: 42px"> |
| | | <el-row :gutter="10"> |
| | | <el-col v-if="showSummary.total" :span="2" :offset="22"> |
| | | <span style="font-weight: bold">合计</span> |
| | | <span style="margin-left: 10px">0.00</span> |
| | | <span style="margin-left: 10px">{{ total }}</span> |
| | | </el-col> |
| | | <el-col v-if="showSummary.refundable" :span="2" :offset="22"> |
| | | <span style="font-weight: bold">应退款</span> |
| | |
| | | } |
| | | }, |
| | | data() { |
| | | return {} |
| | | return { |
| | | total: 0 |
| | | } |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | |
| | | return this.number_format(prev, 2, ".", ",") |
| | | } |
| | | }, 0) |
| | | if (column.property === "total") { |
| | | this.total = sums[index] |
| | | } |
| | | sums[index] |
| | | } |
| | | }) |
| | |
| | | } |
| | | return s.join(dec) |
| | | }, |
| | | // 新增 |
| | | add() { |
| | | this.$emit("addProductClick") |
| | | }, |
| | |
| | | console.log(val, prop) |
| | | console.log(row) |
| | | this.$emit("inputContent", val, prop, row) |
| | | }, |
| | | // 清空 |
| | | empty() { |
| | | this.$emit("emptyProductClick") |
| | | }, |
| | | // 重算 |
| | | recalculate() { |
| | | this.$confirm("确定要重算明细所有行?", "提示", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | this.$emit("recalculateProductClick") |
| | | }) |
| | | .catch(() => {}) |
| | | } |
| | | } |
| | | } |