gaoshp
2024-11-04 eef1ef0be935d4a3d8fc691b2666f41796b2d4a5
src/views/master/frock/tray-deposit/index.vue
@@ -119,8 +119,8 @@
                label: 'name',
                disabled: 'isArea'
            },
            exportUrl: '/api/blade-cps/tray-storage/excel/template',
            uploadUrl: '/api/blade-cps/tray-storage/excel/import',
            exportUrl: '/api/smis/tray-storage/excel/template',
            uploadUrl: '/api/smis/tray-storage/excel/import',
            treeData: [],
            selectNode: {},
            apiObj: {
@@ -128,7 +128,7 @@
                    let params = {
                        warehouseStationId: this.selectNode.id
                    }
                    return await this.$HTTP.get(`/api/blade-cps/tray-storage/list`, {}, { params }).then(res => {
                    return await this.$HTTP.get(`/api/smis/tray-storage/list`, {}, { params }).then(res => {
                        return {
                            data: {
                                records: res.data,
@@ -153,10 +153,10 @@
    },
    methods: {
        init() {
            this.$HTTP.get(`/api/blade-cps/tray-storage/tree`).then(res => {
            this.$HTTP.get(`/api/smis/tray-storage/tree`).then(res => {
                this.treeData = res.data
            })
            this.$HTTP.get(`/api/blade-cps/material-type/list`).then(res => {
            this.$HTTP.get(`/api/smis/material-type/list`).then(res => {
                this.options.typeId = res.data.map(item => ({
                    label: item.name,
                    value: item.id
@@ -174,12 +174,12 @@
            this.queryInfo(node.id)
        },
        queryInfo(id) {
            this.$HTTP.get(`/api/blade-cps/warehouse-station/get/${id}`).then(res => {
            this.$HTTP.get(`/api/smis/warehouse-station/get/${id}`).then(res => {
                this.selectNode = res.data
            })
        },
        table_add() {
            this.$HTTP.post(`/api/blade-cps/tray/un-used-tray-tree`, { groupCategory: 1, groupType: 'group_tray' }).then(res => {
            this.$HTTP.post(`/api/smis/tray/un-used-tray-tree`, { groupCategory: 1, groupType: 'group_tray' }).then(res => {
                if (res.data?.length > 0) {
                    this.todoList = res.data
                    this.dialogVisible = true
@@ -191,14 +191,14 @@
        add() {
            let ids = this.$refs.group1.getCheckedNodes()
            console.log(ids)
            this.$HTTP.post(`/api/blade-cps/tray-storage`, { warehouseStationId: this.selectNode.id, trayIds: ids.map(v => v.id) }).then(res => {
            this.$HTTP.post(`/api/smis/tray-storage`, { warehouseStationId: this.selectNode.id, trayIds: ids.map(v => v.id) }).then(res => {
                this.$message.success("操作成功")
                this.dialogVisible = false
                this.$refs.table.reload()
            })
        },
        table_del(ids) {
            this.$HTTP.delete(`/api/blade-cps/tray-storage`, { ids: ids.map(v => ({ id: v.id, othersId: v.trayId })) }).then(res => {
            this.$HTTP.delete(`/api/smis/tray-storage`, { ids: ids.map(v => ({ id: v.id, othersId: v.trayId })) }).then(res => {
                this.$message.success("操作成功")
                this.$refs.table.reload()
            })