From f5f7e30fe99fffd13b808b1bc1f31a2ed7f2de15 Mon Sep 17 00:00:00 2001
From: Junjie <540245094@qq.com>
Date: 星期四, 04 七月 2024 09:52:56 +0800
Subject: [PATCH] #

---
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/MatService.java          |    8 
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/controller/MenuController.java |    3 
 zy-asrs-wms/src/main/java/mat.sql                                               |    9 
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/Mat.java                  |  408 ++++++++++++++++++++
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/CodeBuilder.java                |    4 
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/mapper/MatMapper.java            |   12 
 zy-asrs-admin/src/views/base/mat/index.vue                                      |  360 ++++++++++++++++++
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MatController.java    |  102 +++++
 zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/MatServiceImpl.java |   12 
 zy-asrs-admin/src/views/base/mat/edit.vue                                       |  233 +++++++++++
 zy-asrs-admin/src/locales/en_US.js                                              |    9 
 zy-asrs-wms/src/main/resources/mapper/asrs/MatMapper.xml                        |    5 
 12 files changed, 1,163 insertions(+), 2 deletions(-)

diff --git a/zy-asrs-admin/src/locales/en_US.js b/zy-asrs-admin/src/locales/en_US.js
index cc4c080..7f6f5fc 100644
--- a/zy-asrs-admin/src/locales/en_US.js
+++ b/zy-asrs-admin/src/locales/en_US.js
@@ -134,6 +134,15 @@
     '':'',
     '':'',
     '':'',
+    'base.base':'Base',
+    'base.tag':'Tag',
+    'base.mat':'Mat',
+    '':'',
+    '':'',
+    '':'',
+    '':'',
+    '':'',
+    '':'',
     '':'',
     '':'',
     '':'',
diff --git a/zy-asrs-admin/src/views/base/mat/edit.vue b/zy-asrs-admin/src/views/base/mat/edit.vue
new file mode 100644
index 0000000..e7bc654
--- /dev/null
+++ b/zy-asrs-admin/src/views/base/mat/edit.vue
@@ -0,0 +1,233 @@
+<script setup>
+import { ref, nextTick } from 'vue';
+import { get, post, postBlob, postForm } from '@/utils/request.js'
+import { formatMessage } from '@/utils/localeUtils.js';
+import { message } from 'ant-design-vue';
+
+const formTable = ref(null);
+const submitButton = ref(null);
+const isSave = ref(true);
+const open = ref(false);
+const initFormData = {}
+let formData = ref(initFormData);
+
+const emit = defineEmits(['tableReload'])
+
+const handleOk = (e) => {
+    nextTick(() => {
+        setTimeout(() => {
+            submitButton.value.$el.click();
+        }, 100);
+    });
+};
+
+const onFinish = values => {
+    // console.log('Success:', values);
+    open.value = false;
+    post(isSave.value ? '/api/mat/save' : '/api/mat/update', formData.value).then((resp) => {
+        let result = resp.data;
+        if (result.code === 200) {
+            message.success(formatMessage('page.update.success', '鏇存柊鎴愬姛'));
+        } else {
+            message.error(result.msg);
+        }
+        emit('tableReload', 'reload')
+        nextTick(() => {
+            formTable.value.resetFields()
+        })
+    })
+};
+const onFinishFailed = errorInfo => {
+    console.log('Failed:', errorInfo);
+};
+
+const UserQueryList = ref(null);
+UserQuery();
+function UserQuery() {
+    postForm('/api/user/query', {}).then(resp => {
+        let result = resp.data;
+        UserQueryList.value = result.data;
+    })
+}
+const TagQueryTree = ref(null);
+TagQuery();
+function TagQuery() {
+    post('/api/tag/tree', {}).then(resp => {
+        let result = resp.data;
+        TagQueryTree.value = result.data;
+    })
+}
+
+
+defineExpose({
+    open,
+    formData,
+    initFormData,
+    isSave,
+})
+
+</script>
+
+<script>
+export default {
+    name: '鍟嗗搧妗f-edit'
+}
+</script>
+
+<template>
+    <div>
+        <a-modal v-model:open="open"
+            :title="isSave ? formatMessage('page.add', '娣诲姞') : formatMessage('page.edit', '缂栬緫')" @ok="handleOk"
+            style="width: 600px;">
+            <a-form :model="formData" ref="formTable" name="formTable" :label-col="{ span: 8 }"
+                :wrapper-col="{ span: 16 }" style="display: flex;justify-content: space-between;flex-wrap: wrap;"
+                autocomplete="off" @finish="onFinish" @finishFailed="onFinishFailed">
+                <!-- <a-form-item :label="formatMessage('db.man_mat.uuid', '缂栧彿')" name="uuid" style="width: 250px;">
+                    <a-input v-model:value="formData.uuid" />
+                </a-form-item> -->
+                <!-- <a-form-item :label="formatMessage('db.man_mat.create_time', '娣诲姞鏃堕棿')" name="createTime"
+                    style="width: 250px;">
+                    <a-date-picker v-model:value="formData.createTime" show-time format="YYYY-MM-DD HH:mm:ss"
+                        value-format="YYYY-MM-DD HH:mm:ss" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.create_by', '娣诲姞浜哄憳')" name="createBy"
+                    style="width: 250px;">
+                    <a-select v-model:value="formData.createBy" :placeholder="formatMessage('common.select', '璇烽�夋嫨')"
+                        style="width: 100%" show-search :options="UserQueryList" optionFilterProp="label"
+                        optionLabelProp="label">
+                    </a-select>
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.update_time', '淇敼鏃堕棿')" name="updateTime"
+                    style="width: 250px;">
+                    <a-date-picker v-model:value="formData.updateTime" show-time format="YYYY-MM-DD HH:mm:ss"
+                        value-format="YYYY-MM-DD HH:mm:ss" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.update_by', '淇敼浜哄憳')" name="updateBy"
+                    style="width: 250px;">
+                    <a-select v-model:value="formData.updateBy" :placeholder="formatMessage('common.select', '璇烽�夋嫨')"
+                        style="width: 100%" show-search :options="UserQueryList" optionFilterProp="label"
+                        optionLabelProp="label">
+                    </a-select>
+                </a-form-item> -->
+                <!-- <a-form-item :label="formatMessage('db.man_mat.tag_id', '鎵�灞炲綊绫�')" name="tagId" style="width: 250px;">
+                    <a-select v-model:value="formData.tagId" :placeholder="formatMessage('common.select', '璇烽�夋嫨')"
+                        style="width: 100%" show-search :options="TagQueryList" optionFilterProp="label"
+                        optionLabelProp="label">
+                    </a-select>
+                </a-form-item> -->
+                <a-form-item :label="formatMessage('db.man_mat.tag_id', '鎵�灞炲綊绫�')" name="tagId" style="width: 250px;"
+                    :rules="[{ required: true, message: '涓婄骇鑿滃崟涓嶈兘涓虹┖!' }]">
+                    <a-tree-select v-model:value="formData.tagId" show-search style="width: 100%"
+                        :dropdown-style="{ maxHeight: '400px', overflow: 'auto' }" :placeholder="formatMessage('page.input', '璇疯緭鍏�')"
+                        allow-clea tree-data-simple-mode :tree-data="TagQueryTree" tree-node-filter-prop="name"
+                        :field-names="{
+                            children: 'children',
+                            label: 'name',
+                            value: 'id',
+                        }">
+                        <template #title="{ value: id, name }">
+                            {{ name }}
+                        </template>
+                    </a-tree-select>
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.matnr', '鍟嗗搧缂栧彿')" name="matnr" style="width: 250px;"
+                    :rules="[{ required: true }]">
+                    <a-input v-model:value="formData.matnr" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.maktx', '鍟嗗搧鍚嶇О')" name="maktx" style="width: 250px;">
+                    <a-input v-model:value="formData.maktx" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.name', '鍒悕')" name="name" style="width: 250px;">
+                    <a-input v-model:value="formData.name" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.specs', '瑙勬牸')" name="specs" style="width: 250px;">
+                    <a-input v-model:value="formData.specs" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.model', '鍨嬪彿')" name="model" style="width: 250px;">
+                    <a-input v-model:value="formData.model" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.color', '棰滆壊')" name="color" style="width: 250px;">
+                    <a-input v-model:value="formData.color" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.brand', '鍝佺墝')" name="brand" style="width: 250px;">
+                    <a-input v-model:value="formData.brand" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.unit', '鍗曚綅')" name="unit" style="width: 250px;">
+                    <a-input v-model:value="formData.unit" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.price', '鍗曚环')" name="price" style="width: 250px;">
+                    <a-input v-model:value="formData.price" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.sku', 'sku')" name="sku" style="width: 250px;">
+                    <a-input v-model:value="formData.sku" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.units', '鍗曚綅閲�')" name="units" style="width: 250px;">
+                    <a-input v-model:value="formData.units" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.barcode', '鏉$爜')" name="barcode" style="width: 250px;">
+                    <a-input v-model:value="formData.barcode" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.origin', '浜у湴')" name="origin" style="width: 250px;">
+                    <a-input v-model:value="formData.origin" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.manu', '鍘傚')" name="manu" style="width: 250px;">
+                    <a-input v-model:value="formData.manu" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.manu_date', '鐢熶骇鏃ユ湡')" name="manuDate"
+                    style="width: 250px;">
+                    <a-input v-model:value="formData.manuDate" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.item_num', '鍝侀」鏁�')" name="itemNum" style="width: 250px;">
+                    <a-input v-model:value="formData.itemNum" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.weight', '閲嶉噺')" name="weight" style="width: 250px;">
+                    <a-input v-model:value="formData.weight" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.length', '闀垮害')" name="length" style="width: 250px;">
+                    <a-input v-model:value="formData.length" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.volume', '浣撶Н')" name="volume" style="width: 250px;">
+                    <a-input v-model:value="formData.volume" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.three_code', '涓夋柟缂栫爜')" name="threeCode"
+                    style="width: 250px;">
+                    <a-input v-model:value="formData.threeCode" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.supp', '渚涘簲鍟�')" name="supp" style="width: 250px;">
+                    <a-input v-model:value="formData.supp" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.supp_code', '渚涘簲鍟嗙紪鐮�')" name="suppCode"
+                    style="width: 250px;">
+                    <a-input v-model:value="formData.suppCode" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.dead_time', '淇濊川鏈�')" name="deadTime"
+                    style="width: 250px;">
+                    <a-input v-model:value="formData.deadTime" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.flag', '鏍囪瘑')" name="flag" style="width: 250px;">
+                    <a-input v-model:value="formData.flag" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.sort', '鎺掑簭')" name="sort" style="width: 250px;">
+                    <a-input v-model:value="formData.sort" />
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.status', '鐘舵��')" name="status" style="width: 250px;">
+                    <a-select v-model:value="formData.status" :options="[
+                        { label: '姝e父', value: 1 },
+                        { label: '绂佺敤', value: 0 },
+                    ]">
+                    </a-select>
+                </a-form-item>
+                <a-form-item :label="formatMessage('db.man_mat.memo', '澶囨敞')" name="memo" style="width: 250px;">
+                    <a-input v-model:value="formData.memo" />
+                </a-form-item>
+
+                <a-form-item>
+                    <a-button type="primary" html-type="submit" ref="submitButton"
+                        style="visibility: hidden;">Submit</a-button>
+                </a-form-item>
+            </a-form>
+        </a-modal>
+    </div>
+</template>
+
+<style></style>
diff --git a/zy-asrs-admin/src/views/base/mat/index.vue b/zy-asrs-admin/src/views/base/mat/index.vue
new file mode 100644
index 0000000..414c1ee
--- /dev/null
+++ b/zy-asrs-admin/src/views/base/mat/index.vue
@@ -0,0 +1,360 @@
+<script setup>
+import { getCurrentInstance, ref, computed, reactive } from 'vue';
+import { useRouter } from "vue-router";
+import { get, post, postBlob } from '@/utils/request.js'
+import { message, Modal } from 'ant-design-vue';
+import { logout } from '@/config.js';
+import EditView from './edit.vue'
+import { formatMessage } from '@/utils/localeUtils.js';
+const context = getCurrentInstance()?.appContext.config.globalProperties;
+
+const router = useRouter();
+
+const TABLE_KEY = 'table-mat';
+let currentPage = 1;
+let pageSize = 10;
+const searchInput = ref("")
+const editChild = ref(null)
+
+let tableData = ref([]);
+getPage();
+
+const columns = [
+  {
+    title: formatMessage('db.man_mat.tag_id', '鎵�灞炲綊绫�'),
+    dataIndex: 'tagId$',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.matnr', '鍟嗗搧缂栧彿'),
+    dataIndex: 'matnr',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.maktx', '鍟嗗搧鍚嶇О'),
+    dataIndex: 'maktx',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.name', '鍒悕'),
+    dataIndex: 'name',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.specs', '瑙勬牸'),
+    dataIndex: 'specs',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.model', '鍨嬪彿'),
+    dataIndex: 'model',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.color', '棰滆壊'),
+    dataIndex: 'color',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.brand', '鍝佺墝'),
+    dataIndex: 'brand',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.unit', '鍗曚綅'),
+    dataIndex: 'unit',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.price', '鍗曚环'),
+    dataIndex: 'price',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.sku', 'sku'),
+    dataIndex: 'sku',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.units', '鍗曚綅閲�'),
+    dataIndex: 'units',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.barcode', '鏉$爜'),
+    dataIndex: 'barcode',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.origin', '浜у湴'),
+    dataIndex: 'origin',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.manu', '鍘傚'),
+    dataIndex: 'manu',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.manu_date', '鐢熶骇鏃ユ湡'),
+    dataIndex: 'manuDate',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.item_num', '鍝侀」鏁�'),
+    dataIndex: 'itemNum',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.weight', '閲嶉噺'),
+    dataIndex: 'weight',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.length', '闀垮害'),
+    dataIndex: 'length',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.volume', '浣撶Н'),
+    dataIndex: 'volume',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.three_code', '涓夋柟缂栫爜'),
+    dataIndex: 'threeCode',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.supp', '渚涘簲鍟�'),
+    dataIndex: 'supp',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.supp_code', '渚涘簲鍟嗙紪鐮�'),
+    dataIndex: 'suppCode',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.dead_time', '淇濊川鏈�'),
+    dataIndex: 'deadTime',
+    width: 140,
+    ellipsis: true,
+  },
+
+  {
+    title: formatMessage('db.man_mat.uuid', '缂栧彿'),
+    dataIndex: 'uuid',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.flag', '鏍囪瘑'),
+    dataIndex: 'flag',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.sort', '鎺掑簭'),
+    dataIndex: 'sort',
+    width: 140,
+    ellipsis: true,
+  },
+  {
+    title: formatMessage('db.man_mat.status', '鐘舵��'),
+    dataIndex: 'status$',
+    width: 140,
+    ellipsis: true,
+  },
+  // {
+  //   title: formatMessage('db.man_mat.create_time', '娣诲姞鏃堕棿'),
+  //   dataIndex: 'createTime$',
+  //   width: 140,
+  //   ellipsis: true,
+  // },
+  // {
+  //   title: formatMessage('db.man_mat.create_by', '娣诲姞浜哄憳'),
+  //   dataIndex: 'createBy$',
+  //   width: 140,
+  //   ellipsis: true,
+  // },
+  // {
+  //   title: formatMessage('db.man_mat.update_time', '淇敼鏃堕棿'),
+  //   dataIndex: 'updateTime$',
+  //   width: 140,
+  //   ellipsis: true,
+  // },
+  // {
+  //   title: formatMessage('db.man_mat.update_by', '淇敼浜哄憳'),
+  //   dataIndex: 'updateBy$',
+  //   width: 140,
+  //   ellipsis: true,
+  // },
+  {
+    title: formatMessage('db.man_mat.memo', '澶囨敞'),
+    dataIndex: 'memo',
+    width: 140,
+    ellipsis: true,
+  },
+
+  {
+    title: formatMessage('common.operation', '鎿嶄綔'),
+    name: 'oper',
+    dataIndex: 'oper',
+    key: 'oper',
+    width: 140,
+  },
+];
+
+const state = reactive({
+  selectedRowKeys: [],
+  loading: false,
+});
+const hasSelected = computed(() => state.selectedRowKeys.length > 0);
+const start = () => {
+  state.loading = true;
+  // ajax request after empty completing
+  setTimeout(() => {
+    state.loading = false;
+    state.selectedRowKeys = [];
+  }, 1000);
+};
+const onSelectChange = selectedRowKeys => {
+  // console.log('selectedRowKeys changed: ', selectedRowKeys);
+  state.selectedRowKeys = selectedRowKeys;
+};
+
+function getPage() {
+  post('/api/mat/page', {
+    current: currentPage,
+    pageSize: pageSize,
+    condition: searchInput.value
+  }).then((resp) => {
+    let result = resp.data;
+    if (result.code == 200) {
+      let data = result.data;
+      tableData.value = data;
+    } else if (result.code === 401) {
+      message.error(result.msg);
+      logout()
+    } else {
+      message.error(result.msg);
+    }
+  })
+}
+
+const handleEdit = (item) => {
+  editChild.value.open = true;
+  editChild.value.formData = item == null ? editChild.value.initFormData : JSON.parse(JSON.stringify(item));
+  editChild.value.isSave = item == null;
+}
+
+const handleDel = (rows) => {
+  Modal.confirm({
+    title: formatMessage('page.delete', '鍒犻櫎'),
+    content: formatMessage('page.delete.confirm', '纭畾鍒犻櫎璇ラ」鍚楋紵'),
+    maskClosable: true,
+    onOk: async () => {
+      const hide = message.loading(formatMessage('common.loading', '璇锋眰涓�'));
+      try {
+        post('/api/mat/remove/' + rows.map((row) => row.id).join(','), {}).then(resp => {
+          let result = resp.data;
+          if (result.code === 200) {
+            message.success(result.msg);
+          } else {
+            message.error(result.msg);
+          }
+          getPage()
+          hide()
+        })
+      } catch (error) {
+        message.error(formatMessage('common.fail', '璇锋眰澶辫触'));
+      }
+    },
+  });
+}
+
+const handleExport = async (intl) => {
+  postBlob('/api/mat/export', {}).then(result => {
+    const blob = new Blob([result.data], { type: 'application/vnd.ms-excel' });
+    window.location.href = window.URL.createObjectURL(blob);
+    return true;
+  })
+};
+
+const onSearch = () => {
+  // console.log('search');
+  getPage()
+}
+
+const onPageChange = (page, size) => {
+  currentPage = page;
+  pageSize = size;
+  getPage();
+}
+
+function handleTableReload(value) {
+  getPage()
+}
+
+</script>
+
+<script>
+export default {
+  name: '鍟嗗搧妗f'
+}
+</script>
+
+<template>
+  <div>
+    <EditView ref="editChild" @tableReload="handleTableReload" />
+    <div class="table-header">
+      <a-input-search v-model:value="searchInput" :placeholder="formatMessage('page.input', '璇疯緭鍏�')"
+        style="width: 200px;" @search="onSearch" />
+      <div class="table-header-right">
+        <a-button @click="handleEdit(null)" type="primary">{{ formatMessage('page.add', '娣诲姞') }}</a-button>
+        <a-button @click="handleExport">{{ formatMessage('page.export', '瀵煎嚭') }}</a-button>
+      </div>
+    </div>
+    <a-table :row-selection="{ selectedRowKeys: state.selectedRowKeys, onChange: onSelectChange }"
+      :data-source="tableData.records" :defaultExpandAllRows="false" :key="TABLE_KEY" rowKey="id"
+      :pagination="{ total: tableData.total, onChange: onPageChange }"
+      :scroll="{ y: 768, scrollToFirstRowOnChange: true }" :columns="columns">
+      <template #bodyCell="{ column, text, record }">
+        <template v-if="column.dataIndex === 'oper'">
+          <div style="display: flex;justify-content: space-evenly;">
+            <a-button type="link" primary @click="handleEdit(record)">{{ formatMessage('page.edit', '缂栬緫') }}</a-button>
+            <a-button type="link" danger @click="handleDel([record])">
+              {{ formatMessage('page.delete', '鍒犻櫎') }}
+            </a-button>
+          </div>
+        </template>
+      </template>
+    </a-table>
+  </div>
+</template>
+
+<style></style>
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MatController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MatController.java
new file mode 100644
index 0000000..34e2c0e
--- /dev/null
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/controller/MatController.java
@@ -0,0 +1,102 @@
+package com.zy.asrs.wms.asrs.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.zy.asrs.framework.common.Cools;
+import com.zy.asrs.framework.common.R;
+import com.zy.asrs.wms.common.annotation.OperationLog;
+import com.zy.asrs.wms.common.domain.BaseParam;
+import com.zy.asrs.wms.common.domain.KeyValVo;
+import com.zy.asrs.wms.common.domain.PageParam;
+import com.zy.asrs.wms.asrs.entity.Mat;
+import com.zy.asrs.wms.asrs.service.MatService;
+import com.zy.asrs.wms.system.controller.BaseController;
+import com.zy.asrs.wms.utils.ExcelUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.servlet.http.HttpServletResponse;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Map;
+
+@RestController
+@RequestMapping("/api")
+public class MatController extends BaseController {
+
+    @Autowired
+    private MatService matService;
+
+    @PreAuthorize("hasAuthority('asrs:mat:list')")
+    @PostMapping("/mat/page")
+    public R page(@RequestBody Map<String, Object> map) {
+        BaseParam baseParam = buildParam(map, BaseParam.class);
+        PageParam<Mat, BaseParam> pageParam = new PageParam<>(baseParam, Mat.class);
+        return R.ok().add(matService.page(pageParam, pageParam.buildWrapper(true)));
+    }
+
+    @PreAuthorize("hasAuthority('asrs:mat:list')")
+    @PostMapping("/mat/list")
+    public R list(@RequestBody Map<String, Object> map) {
+        return R.ok().add(matService.list());
+    }
+
+    @PreAuthorize("hasAuthority('asrs:mat:list')")
+    @GetMapping("/mat/{id}")
+    public R get(@PathVariable("id") Long id) {
+        return R.ok().add(matService.getById(id));
+    }
+
+    @PreAuthorize("hasAuthority('asrs:mat:save')")
+    @OperationLog("娣诲姞鍟嗗搧妗f")
+    @PostMapping("/mat/save")
+    public R save(@RequestBody Mat mat) {
+        if (!matService.save(mat)) {
+            return R.error("娣诲姞澶辫触");
+        }
+        return R.ok("娣诲姞鎴愬姛");
+    }
+
+    @PreAuthorize("hasAuthority('asrs:mat:update')")
+    @OperationLog("淇敼鍟嗗搧妗f")
+    @PostMapping("/mat/update")
+    public R update(@RequestBody Mat mat) {
+        if (!matService.updateById(mat)) {
+            return R.error("淇敼澶辫触");
+        }
+        return R.ok("淇敼鎴愬姛");
+    }
+
+    @PreAuthorize("hasAuthority('asrs:mat:remove')")
+    @OperationLog("鍒犻櫎鍟嗗搧妗f")
+    @PostMapping("/mat/remove/{ids}")
+    public R remove(@PathVariable Long[] ids) {
+        if (!matService.removeByIds(Arrays.asList(ids))) {
+            return R.error("鍒犻櫎澶辫触");
+        }
+        return R.ok("鍒犻櫎鎴愬姛");
+    }
+
+    @PreAuthorize("hasAuthority('asrs:mat:list')")
+    @PostMapping("/mat/query")
+    public R query(@RequestParam(required = false) String condition) {
+        List<KeyValVo> vos = new ArrayList<>();
+        LambdaQueryWrapper<Mat> wrapper = new LambdaQueryWrapper<>();
+        if (!Cools.isEmpty(condition)) {
+            wrapper.like(Mat::getId, condition);
+        }
+        matService.page(new Page<>(1, 30), wrapper).getRecords().forEach(
+                item -> vos.add(new KeyValVo(item.getId(), item.getId()))
+        );
+        return R.ok().add(vos);
+    }
+
+    @PreAuthorize("hasAuthority('asrs:mat:list')")
+    @PostMapping("/mat/export")
+    public void export(@RequestBody Map<String, Object> map, HttpServletResponse response) throws Exception {
+        ExcelUtil.build(ExcelUtil.create(matService.list(), Mat.class), response);
+    }
+
+}
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/Mat.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/Mat.java
new file mode 100644
index 0000000..0d7fcaf
--- /dev/null
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/entity/Mat.java
@@ -0,0 +1,408 @@
+package com.zy.asrs.wms.asrs.entity;
+
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.zy.asrs.wms.asrs.service.TagService;
+import com.zy.asrs.wms.system.entity.Host;
+import com.zy.asrs.wms.system.entity.User;
+import org.springframework.format.annotation.DateTimeFormat;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import com.zy.asrs.framework.common.Cools;
+import com.zy.asrs.framework.common.SpringUtils;
+import com.zy.asrs.wms.system.service.UserService;
+import com.zy.asrs.wms.system.service.HostService;
+
+import java.io.Serializable;
+import java.util.Date;
+
+@Data
+@TableName("man_mat")
+public class Mat implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * ID
+     */
+    @ApiModelProperty(value= "ID")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Long id;
+
+    /**
+     * 缂栧彿
+     */
+    @ApiModelProperty(value= "缂栧彿")
+    private String uuid;
+
+    /**
+     * 鏍囪瘑
+     */
+    @ApiModelProperty(value= "鏍囪瘑")
+    private String flag;
+
+    /**
+     * 鎺掑簭
+     */
+    @ApiModelProperty(value= "鎺掑簭")
+    private Integer sort;
+
+    /**
+     * 鎵�灞炴満鏋�
+     */
+    @ApiModelProperty(value= "鎵�灞炴満鏋�")
+    private Long hostId;
+
+    /**
+     * 鐘舵�� 1: 姝e父  0: 绂佺敤  
+     */
+    @ApiModelProperty(value= "鐘舵�� 1: 姝e父  0: 绂佺敤  ")
+    private Integer status;
+
+    /**
+     * 鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  
+     */
+    @ApiModelProperty(value= "鏄惁鍒犻櫎 1: 鏄�  0: 鍚�  ")
+    @TableLogic
+    private Integer deleted;
+
+    /**
+     * 娣诲姞鏃堕棿
+     */
+    @ApiModelProperty(value= "娣诲姞鏃堕棿")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+    /**
+     * 娣诲姞浜哄憳
+     */
+    @ApiModelProperty(value= "娣诲姞浜哄憳")
+    private Long createBy;
+
+    /**
+     * 淇敼鏃堕棿
+     */
+    @ApiModelProperty(value= "淇敼鏃堕棿")
+    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 淇敼浜哄憳
+     */
+    @ApiModelProperty(value= "淇敼浜哄憳")
+    private Long updateBy;
+
+    /**
+     * 澶囨敞
+     */
+    @ApiModelProperty(value= "澶囨敞")
+    private String memo;
+
+    /**
+     * 鎵�灞炲綊绫�
+     */
+    @ApiModelProperty(value= "鎵�灞炲綊绫�")
+    private Long tagId;
+
+    /**
+     * 鍟嗗搧缂栧彿
+     */
+    @ApiModelProperty(value= "鍟嗗搧缂栧彿")
+    private String matnr;
+
+    /**
+     * 鍟嗗搧鍚嶇О
+     */
+    @ApiModelProperty(value= "鍟嗗搧鍚嶇О")
+    private String maktx;
+
+    /**
+     * 鍒悕
+     */
+    @ApiModelProperty(value= "鍒悕")
+    private String name;
+
+    /**
+     * 瑙勬牸
+     */
+    @ApiModelProperty(value= "瑙勬牸")
+    private String specs;
+
+    /**
+     * 鍨嬪彿
+     */
+    @ApiModelProperty(value= "鍨嬪彿")
+    private String model;
+
+    /**
+     * 棰滆壊
+     */
+    @ApiModelProperty(value= "棰滆壊")
+    private String color;
+
+    /**
+     * 鍝佺墝
+     */
+    @ApiModelProperty(value= "鍝佺墝")
+    private String brand;
+
+    /**
+     * 鍗曚綅
+     */
+    @ApiModelProperty(value= "鍗曚綅")
+    private String unit;
+
+    /**
+     * 鍗曚环
+     */
+    @ApiModelProperty(value= "鍗曚环")
+    private Double price;
+
+    /**
+     * sku
+     */
+    @ApiModelProperty(value= "sku")
+    private String sku;
+
+    /**
+     * 鍗曚綅閲�
+     */
+    @ApiModelProperty(value= "鍗曚綅閲�")
+    private String units;
+
+    /**
+     * 鏉$爜
+     */
+    @ApiModelProperty(value= "鏉$爜")
+    private String barcode;
+
+    /**
+     * 浜у湴
+     */
+    @ApiModelProperty(value= "浜у湴")
+    private String origin;
+
+    /**
+     * 鍘傚
+     */
+    @ApiModelProperty(value= "鍘傚")
+    private String manu;
+
+    /**
+     * 鐢熶骇鏃ユ湡
+     */
+    @ApiModelProperty(value= "鐢熶骇鏃ユ湡")
+    private String manuDate;
+
+    /**
+     * 鍝侀」鏁�
+     */
+    @ApiModelProperty(value= "鍝侀」鏁�")
+    private String itemNum;
+
+    /**
+     * 閲嶉噺
+     */
+    @ApiModelProperty(value= "閲嶉噺")
+    private String weight;
+
+    /**
+     * 闀垮害
+     */
+    @ApiModelProperty(value= "闀垮害")
+    private String length;
+
+    /**
+     * 浣撶Н
+     */
+    @ApiModelProperty(value= "浣撶Н")
+    private String volume;
+
+    /**
+     * 涓夋柟缂栫爜
+     */
+    @ApiModelProperty(value= "涓夋柟缂栫爜")
+    private String threeCode;
+
+    /**
+     * 渚涘簲鍟�
+     */
+    @ApiModelProperty(value= "渚涘簲鍟�")
+    private String supp;
+
+    /**
+     * 渚涘簲鍟嗙紪鐮�
+     */
+    @ApiModelProperty(value= "渚涘簲鍟嗙紪鐮�")
+    private String suppCode;
+
+    /**
+     * 淇濊川鏈�
+     */
+    @ApiModelProperty(value= "淇濊川鏈�")
+    private String deadTime;
+
+    public Mat() {}
+
+    public Mat(String uuid,String flag,Integer sort,Long hostId,Integer status,Integer deleted,Date createTime,Long createBy,Date updateTime,Long updateBy,String memo,Long tagId,String matnr,String maktx,String name,String specs,String model,String color,String brand,String unit,Double price,String sku,String units,String barcode,String origin,String manu,String manuDate,String itemNum,String weight,String length,String volume,String threeCode,String supp,String suppCode,String deadTime) {
+        this.uuid = uuid;
+        this.flag = flag;
+        this.sort = sort;
+        this.hostId = hostId;
+        this.status = status;
+        this.deleted = deleted;
+        this.createTime = createTime;
+        this.createBy = createBy;
+        this.updateTime = updateTime;
+        this.updateBy = updateBy;
+        this.memo = memo;
+        this.tagId = tagId;
+        this.matnr = matnr;
+        this.maktx = maktx;
+        this.name = name;
+        this.specs = specs;
+        this.model = model;
+        this.color = color;
+        this.brand = brand;
+        this.unit = unit;
+        this.price = price;
+        this.sku = sku;
+        this.units = units;
+        this.barcode = barcode;
+        this.origin = origin;
+        this.manu = manu;
+        this.manuDate = manuDate;
+        this.itemNum = itemNum;
+        this.weight = weight;
+        this.length = length;
+        this.volume = volume;
+        this.threeCode = threeCode;
+        this.supp = supp;
+        this.suppCode = suppCode;
+        this.deadTime = deadTime;
+    }
+
+//    Mat mat = new Mat(
+//            null,    // 缂栧彿
+//            null,    // 鏍囪瘑
+//            null,    // 鎺掑簭
+//            null,    // 鎵�灞炴満鏋�
+//            null,    // 鐘舵��
+//            null,    // 鏄惁鍒犻櫎
+//            null,    // 娣诲姞鏃堕棿
+//            null,    // 娣诲姞浜哄憳
+//            null,    // 淇敼鏃堕棿
+//            null,    // 淇敼浜哄憳
+//            null,    // 澶囨敞
+//            null,    // 鎵�灞炲綊绫�
+//            null,    // 鍟嗗搧缂栧彿[闈炵┖]
+//            null,    // 鍟嗗搧鍚嶇О
+//            null,    // 鍒悕
+//            null,    // 瑙勬牸
+//            null,    // 鍨嬪彿
+//            null,    // 棰滆壊
+//            null,    // 鍝佺墝
+//            null,    // 鍗曚綅
+//            null,    // 鍗曚环
+//            null,    // sku
+//            null,    // 鍗曚綅閲�
+//            null,    // 鏉$爜
+//            null,    // 浜у湴
+//            null,    // 鍘傚
+//            null,    // 鐢熶骇鏃ユ湡
+//            null,    // 鍝侀」鏁�
+//            null,    // 閲嶉噺
+//            null,    // 闀垮害
+//            null,    // 浣撶Н
+//            null,    // 涓夋柟缂栫爜
+//            null,    // 渚涘簲鍟�
+//            null,    // 渚涘簲鍟嗙紪鐮�
+//            null    // 淇濊川鏈�
+//    );
+
+    public String getHostId$(){
+        HostService service = SpringUtils.getBean(HostService.class);
+        Host host = service.getById(this.hostId);
+        if (!Cools.isEmpty(host)){
+            return String.valueOf(host.getName());
+        }
+        return null;
+    }
+
+    public String getStatus$(){
+        if (null == this.status){ return null; }
+        switch (this.status){
+            case 1:
+                return "姝e父";
+            case 0:
+                return "绂佺敤";
+            default:
+                return String.valueOf(this.status);
+        }
+    }
+
+    public String getDeleted$(){
+        if (null == this.deleted){ return null; }
+        switch (this.deleted){
+            case 1:
+                return "鏄�";
+            case 0:
+                return "鍚�";
+            default:
+                return String.valueOf(this.deleted);
+        }
+    }
+
+    public String getCreateTime$(){
+        if (Cools.isEmpty(this.createTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.createTime);
+    }
+
+    public String getCreateBy$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.getById(this.createBy);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+    public String getUpdateTime$(){
+        if (Cools.isEmpty(this.updateTime)){
+            return "";
+        }
+        return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
+    }
+
+    public String getUpdateBy$(){
+        UserService service = SpringUtils.getBean(UserService.class);
+        User user = service.getById(this.updateBy);
+        if (!Cools.isEmpty(user)){
+            return String.valueOf(user.getNickname());
+        }
+        return null;
+    }
+
+    public String getTagId$(){
+        TagService service = SpringUtils.getBean(TagService.class);
+        Tag tag = service.getById(this.tagId);
+        if (!Cools.isEmpty(tag)){
+            return String.valueOf(tag.getName());
+        }
+        return null;
+    }
+
+
+}
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/mapper/MatMapper.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/mapper/MatMapper.java
new file mode 100644
index 0000000..4563734
--- /dev/null
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/mapper/MatMapper.java
@@ -0,0 +1,12 @@
+package com.zy.asrs.wms.asrs.mapper;
+
+import com.zy.asrs.wms.asrs.entity.Mat;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.springframework.stereotype.Repository;
+
+@Mapper
+@Repository
+public interface MatMapper extends BaseMapper<Mat> {
+
+}
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/MatService.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/MatService.java
new file mode 100644
index 0000000..9d20bb6
--- /dev/null
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/MatService.java
@@ -0,0 +1,8 @@
+package com.zy.asrs.wms.asrs.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.zy.asrs.wms.asrs.entity.Mat;
+
+public interface MatService extends IService<Mat> {
+
+}
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/MatServiceImpl.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/MatServiceImpl.java
new file mode 100644
index 0000000..07f2e47
--- /dev/null
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/asrs/service/impl/MatServiceImpl.java
@@ -0,0 +1,12 @@
+package com.zy.asrs.wms.asrs.service.impl;
+
+import com.zy.asrs.wms.asrs.mapper.MatMapper;
+import com.zy.asrs.wms.asrs.entity.Mat;
+import com.zy.asrs.wms.asrs.service.MatService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+@Service("matService")
+public class MatServiceImpl extends ServiceImpl<MatMapper, Mat> implements MatService {
+
+}
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/controller/MenuController.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/controller/MenuController.java
index cc6b5f5..75af03f 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/controller/MenuController.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/system/controller/MenuController.java
@@ -61,6 +61,9 @@
     @GetMapping("/menu/get/route")
     public R getByRoute(@RequestParam("route") String route) {
         Menu menu = menuService.getOne(new LambdaQueryWrapper<Menu>().eq(Menu::getRoute, route).eq(Menu::getStatus, 1).last("limit 1"));
+        if (menu == null) {
+            return R.error("404");
+        }
         return R.ok().add(menu);
     }
 
diff --git a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/CodeBuilder.java b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/CodeBuilder.java
index c377e10..e6f97e0 100644
--- a/zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/CodeBuilder.java
+++ b/zy-asrs-wms/src/main/java/com/zy/asrs/wms/utils/CodeBuilder.java
@@ -22,8 +22,8 @@
 //        generator.username="sa";
 //        generator.password="Zoneyung@zy56$";
 
-        generator.table="man_tag";
-        generator.tableName="褰掔被绠$悊";
+        generator.table="man_mat";
+        generator.tableName="鍟嗗搧妗f";
         generator.packagePath="com.zy.asrs.wms.asrs";
 
         generator.build();
diff --git a/zy-asrs-wms/src/main/java/mat.sql b/zy-asrs-wms/src/main/java/mat.sql
new file mode 100644
index 0000000..7465f99
--- /dev/null
+++ b/zy-asrs-wms/src/main/java/mat.sql
@@ -0,0 +1,9 @@
+-- save mat record
+-- mysql
+insert into `sys_menu` ( `name`, `parent_id`, `route`, `component`, `type`, `sort`, `host_id`, `status`) values ( '鍟嗗搧妗f绠$悊', '0', '/asrs/mat', '/asrs/mat', '0' , '0', '1' , '1');
+
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `host_id`, `status`) values ( '鏌ヨ鍟嗗搧妗f', '', '1', 'asrs:mat:list', '0', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `host_id`, `status`) values ( '娣诲姞鍟嗗搧妗f', '', '1', 'asrs:mat:save', '1', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `host_id`, `status`) values ( '淇敼鍟嗗搧妗f', '', '1', 'asrs:mat:update', '2', '1', '1');
+insert into `sys_menu` ( `name`, `parent_id`, `type`, `authority`, `sort`, `host_id`, `status`) values ( '鍒犻櫎鍟嗗搧妗f', '', '1', 'asrs:mat:remove', '3', '1', '1');
+
diff --git a/zy-asrs-wms/src/main/resources/mapper/asrs/MatMapper.xml b/zy-asrs-wms/src/main/resources/mapper/asrs/MatMapper.xml
new file mode 100644
index 0000000..880bcc8
--- /dev/null
+++ b/zy-asrs-wms/src/main/resources/mapper/asrs/MatMapper.xml
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.zy.asrs.wms.asrs.mapper.MatMapper">
+
+</mapper>

--
Gitblit v1.9.1