123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <template>
- <el-dialog
- append-to-body
- title="历史明细"
- class="el-dialogDeep"
- :visible.sync="historyVisible"
- width="70%"
- :close-on-click-modal="false"
- :destroy-on-close="true"
- :close-on-press-escape="false"
- v-dialog-drag
- :before-close="closeDialog"
- >
- <avue-crud
- ref="historyCrud"
- :data="historyData"
- :option="historyOption"
- ></avue-crud>
- <span slot="footer" class="dialog-footer">
- <el-button @click="closeDialog">关 闭</el-button>
- </span>
- </el-dialog>
- </template>
- <script>
- import {historyPrice} from "@/api/dealer/sales";
- export default {
- name: "history",
- props: {
- params: {
- type: Object,
- default: {}
- }
- },
- data() {
- return {
- historyVisible: false,
- historyData: [],
- historyOption: {
- stripe: true,
- border: true,
- index: true,
- viewBtn: false,
- editBtn: false,
- delBtn: false,
- addBtn: false,
- menu: false,
- align: "center",
- menuWidth: "180",
- selection: false,
- tip: false,
- column: [
- {
- label: "价格",
- prop: "price",
- index: 1,
- overHidden: true
- },
- {
- label: "日期",
- prop: "businesDate",
- index: 2,
- overHidden: true
- },
- {
- label: "备注",
- prop: "remarks",
- index: 3,
- overHidden: true
- },
- ]
- },
- }
- },
- methods: {
- init() {
- this.historyVisible = true;
- historyPrice(this.params).then(res => {
- this.historyData = res.data.data? res.data.data: [];
- this.$set(this.historyOption, 'height', window.innerHeight - 240)
- })
- },
- // 关闭弹窗
- closeDialog() {
- this.historyVisible = false;
- this.historyData = [];
- this.$emit("closeDialog")
- },
- },
- }
- </script>
- <style scoped>
- </style>
|