| | |
| | | { field: 'createDate', title: '创建时间', type: 'int', sort: true, width: 100, hidden: true, align: 'left' }, |
| | | ], |
| | | detailColumns: [ |
| | | { title: "电芯序列号", field: "serialNumber", type: "text" }, |
| | | { title: "物料编号", field: "materielCode", type: "text" }, |
| | | { title: "物料名称", field: "materielName", type: "text" }, |
| | | { title: "库存状态", field: "status", type: "text" }, |
| | |
| | | } |
| | | }; |
| | | }, |
| | | |
| | | methods: { |
| | | onInit() { |
| | | this.dropdownItems.unshift({ |
| | | name: '按钮', //按钮名称 |
| | | name: '删除', //按钮名称 |
| | | icon: 'el-icon-document', //按钮图标vue2版本见iview文档icon,vue3版本见element ui文档icon(注意不是element puls文档) |
| | | type: 'primary', //按钮样式vue2版本见iview文档button,vue3版本见element ui文档button |
| | | value: '321', //按钮值 |
| | | onClick: function () { |
| | | this.$Message.success('点击了按钮'); |
| | | let rows = this.table.columns; |
| | | if (rows.length == 0) return this.$error("请选择数据!"); |
| | | if (rows.length > 1) return this.$error("只能选择一条数据!"); |
| | | this.http |
| | | .post("api/DtBoxing/Delete?locationID=" + rows[0].palletCode, "", "数据处理中...") |
| | | .then((x) => { |
| | | if (x.status) { |
| | | this.$Message.success('成功.'); |
| | | this.refresh(); |
| | | } else { |
| | | return this.$error(x.message); |
| | | } |
| | | }); |
| | | } |
| | | }); |
| | | |
| | | }, |
| | | }, |
| | | created() { |