| | |
| | | @size-change="sizeChange" |
| | | @refresh-change="refreshChange" |
| | | @on-load="onLoad" |
| | | ></avue-crud> |
| | | @row-del="rowDel"> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { getList } from "@/api/process/process" |
| | | |
| | | import { getList,remove } from "@/api/process/process" |
| | | export default { |
| | | data () { |
| | | return { |
| | |
| | | total: 0, |
| | | }, |
| | | selectionList: [], |
| | | align: "center", |
| | | menu: true, |
| | | option: { |
| | | tip: false, |
| | | searchShow: true, |
| | | searchMenuSpan: 6, |
| | | height: 520, |
| | | editBtn: false, |
| | | addBtn: false, |
| | | delBtn: true, |
| | | viewBtn: true, |
| | | delBtnText:'删除', |
| | | delBtnIcon:'el-icon-delete', |
| | | editBtn:false, |
| | | menuWidth: 200, |
| | | menuAlign: "center", |
| | | align: "center", |
| | |
| | | selectionFixed: false, |
| | | expandFixed: false, |
| | | menuFixed: false, |
| | | menu: false, |
| | | menu: true, |
| | | column: [ |
| | | { |
| | | label: "品种", |
| | |
| | | prop: "processNum" |
| | | }, |
| | | { |
| | | label: "销售时间", |
| | | label: "加工时间", |
| | | prop: "saleTime", |
| | | }, |
| | | ], |
| | |
| | | this.loading = true |
| | | getList(page.currentPage, page.pageSize, Object.assign(params, this.query)).then((res) => { |
| | | if (res.data.code == 200) { |
| | | console.log(res) |
| | | this.data = res.data.data.records |
| | | this.page.total = res.data.data.total |
| | | this.loading = false |
| | |
| | | this.onLoad(this.page, params) |
| | | done() |
| | | }, |
| | | rowDel (row) { |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning" |
| | | }).then(() => { |
| | | return remove(row.id) |
| | | }).then((res) => { |
| | | this.onLoad(this.page) |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!" |
| | | }) |
| | | }) |
| | | }, |
| | | } |
| | | } |
| | | </script> |