xxyy
2025-02-12 96b1afcbf80cd6b12c1108b61ba2cef1345b1398
Code Management/WMS/WIDESEA_WMSClient/src/views/widesea_wms/stock/DtBoxing.vue
@@ -28,6 +28,7 @@
                { 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" },
@@ -60,17 +61,31 @@
            }
        };
    },
    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() {