From ddfa6f728c57b5d072544c5d79a8c5fc47d1baf9 Mon Sep 17 00:00:00 2001
From: qushaowei <qushaowei@163.com>
Date: 星期六, 19 八月 2023 14:42:28 +0800
Subject: [PATCH] 单位  单位类型

---
 src/views/eam/modules/unit/MomUnitForm.vue                          |  226 +++++++
 src/views/eam/modules/unit/MomUnitConversionForm.vue                |  255 ++++++++
 src/views/eam/modules/unit/MomUnitListLeft.vue                      |   54 +
 src/views/eam/modules/unitCategory/MomBaseUnitCategoryListLeft.vue  |   59 +
 src/views/eam/modules/unit/MomUnitListRight.vue                     |  336 ++++++++++
 src/views/eam/UnitCategoryList.vue                                  |  185 +++++
 src/views/eam/modules/unit/MomUnitModal.vue                         |   63 ++
 src/views/eam/modules/unit/MomUnitConversionModal.vue               |   63 ++
 src/views/eam/modules/unitCategory/MomBaseUnitCategoryForm.vue      |  229 +++++++
 src/views/eam/modules/unitCategory/MomBaseUnitCategoryModal.vue     |   63 ++
 src/views/eam/UnitList.vue                                          |  189 ++++++
 src/views/eam/modules/unitCategory/MomBaseUnitCategoryListRight.vue |  137 ++++
 12 files changed, 1,859 insertions(+), 0 deletions(-)

diff --git a/src/views/eam/UnitCategoryList.vue b/src/views/eam/UnitCategoryList.vue
new file mode 100644
index 0000000..6632556
--- /dev/null
+++ b/src/views/eam/UnitCategoryList.vue
@@ -0,0 +1,185 @@
+<template>
+  <div>
+    <a-card
+      :bordered="true"
+      style="height: 50%"
+    >
+      <a-row type="flex">
+        <a-col><a-button
+            type="primary"
+            @click="handleAdd(da)"
+          >鏂板缓</a-button></a-col>
+        <a-col><a-button
+            type="primary"
+            @click="handleEdit(da)"
+          >缂栬緫</a-button></a-col>
+        <a-col><a-button
+            type="primary"
+            @click="batchDel(da)"
+          >鍒犻櫎</a-button></a-col>
+        <a-col style="left: 5%"><a-button type="primary">妯℃澘</a-button></a-col>
+        <a-col style="left: 5%"><a-button type="primary">瀵煎叆</a-button></a-col>
+        <a-col style="left: 5%"><a-button type="primary">瀵煎嚭</a-button></a-col>
+      </a-row>
+    </a-card>
+    <a-row
+      type="flex"
+      :gutter="16"
+    >
+      <a-col
+        :md="5"
+        :sm="24"
+      >
+        聽 聽 聽
+        <MomBaseUnitCategoryListLeft
+          ref="MomBaseUnitCategoryListLeft"
+          class="MomBaseUnitCategoryListLeft"
+          @treeSelect="treeSelect"
+        />
+        聽 聽
+      </a-col>
+      <a-col
+        :md="24 - 5"
+        :sm="24"
+      >
+        <MomBaseUnitCategoryListRight
+          ref="MomBaseUnitCategoryListRight"
+          class="MomBaseUnitCategoryListRight"
+          @searchkeys="selectedKeys"
+        />
+      </a-col>
+    </a-row>
+    <mom-base-unit-category-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></mom-base-unit-category-modal>
+  </div>
+</template>
+
+<script>
+import MomBaseUnitCategoryListLeft from './modules/unitCategory/MomBaseUnitCategoryListLeft'
+import MomBaseUnitCategoryListRight from './modules/unitCategory/MomBaseUnitCategoryListRight'
+import MomBaseUnitCategoryModal from './modules/unitCategory/MomBaseUnitCategoryModal'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { deleteAction } from '@/api/manage'
+
+export default {
+  name: 'MomBaseUnitCategoryList',
+  mixins: [JeecgListMixin],
+  components: { MomBaseUnitCategoryListLeft, MomBaseUnitCategoryListRight, MomBaseUnitCategoryModal },
+  data() {
+    return {
+      description: '璁¢噺鍗曚綅鍒嗙被椤甸潰',
+      currentOrgCode: '',
+      selectedRowKeys: [],
+      selectionRows: [],
+      url: {
+        list: '/base/getTree',
+        deleteBatch: '/base/delete',
+      },
+      da: [],
+    }
+  },
+
+  methods: {
+    //鏂板鏁版嵁锛堟柊寤烘寜閽Е鍙戯級
+    handleAdd(da) {
+      if (this.da.length <= 0) {
+        this.$message.warning('璇烽�夋嫨涓�涓爲鑺傜偣锛�')
+        return
+      } else {
+        this.$refs.modalForm.add(da, { cb: this.callback })
+      }
+    },
+    //淇敼鏁版嵁锛堜慨鏀规寜閽Е鍙戯級
+    handleEdit(da) {
+      if (this.da.length <= 0) {
+        this.$message.warning('璇烽�夋嫨涓�涓爲鑺傜偣锛�')
+        return
+      } else {
+        this.$refs.modalForm.edit(da, { cb: this.loadTree })
+      }
+    },
+    //鎵归噺鍒犻櫎鍙充晶鏁版嵁锛堝垹闄ゆ寜閽Е鍙戯級
+    batchDel(da) {
+      if (!this.url.deleteBatch) {
+        this.$message.error('璇疯缃畊rl.deleteBatch灞炴��!')
+        return
+      }
+      if (this.selectedRowKeys.length <= 0) {
+        this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒')
+        return
+      } else {
+        var ids = ''
+        for (var a = 0; a < this.selectedRowKeys.length; a++) {
+          ids += this.selectedRowKeys[a] + ','
+        }
+        var that = this
+        this.$confirm({
+          title: '纭鍒犻櫎',
+          content: '鏄惁鍒犻櫎閫変腑鏁版嵁?',
+          onOk: function () {
+            that.loading = true
+            deleteAction(that.url.deleteBatch, { ids: ids })
+              .then((res) => {
+                if (res.success) {
+                  that.$message.success(res.message)
+                } else {
+                  that.$message.warning(res.message)
+                }
+              })
+              .finally(() => {
+                that.loading = false
+                //閲嶆柊璁$畻鍒嗛〉闂
+                that.reCalculatePage(that.selectedRowKeys.length)
+                that.onClearSelected()
+                that.$refs.MomBaseUnitCategoryListRight.loadData({ id: da.id })
+                that.loadTree()
+              })
+          },
+        })
+      }
+    },
+    //閲嶆柊璁$畻鍒嗛〉
+    reCalculatePage(count) {
+      //鎬绘暟閲�-count
+      let total = this.ipagination.total - count
+      //鑾峰彇鍒犻櫎鍚庣殑鍒嗛〉鏁�
+      let currentIndex = Math.ceil(total / this.ipagination.pageSize)
+      //鍒犻櫎鍚庣殑鍒嗛〉鏁�<鎵�鍦ㄥ綋鍓嶉〉
+      if (currentIndex < this.ipagination.current) {
+        this.ipagination.current = currentIndex
+      }
+      console.log('currentIndex', currentIndex)
+    },
+    //娓呴櫎鍙充晶閫変腑椤�
+    onClearSelected() {
+      this.selectedRowKeys = []
+      this.selectionRows = []
+    },
+    //宸﹀彸鑱斿姩锛坉a涓哄乏渚ч�変腑鏍戠殑鏁版嵁锛屽瓙鎺т欢涓繑鍥烇級
+    treeSelect(da) {
+      let id = da.id
+      this.da = da
+      this.onClearSelected()
+      this.$refs.MomBaseUnitCategoryListRight.loadData({ id })
+    },
+    //鍙充晶鍒楄〃閫変腑浜嬩欢
+    selectedKeys(selectedRowKeys) {
+      this.selectedRowKeys = selectedRowKeys
+    },
+    //鍔犺浇宸︿晶鏍�
+    loadTree() {
+      this.$refs.MomBaseUnitCategoryListLeft.queryTreeData()
+    },
+    //鏂板缂栬緫淇濆瓨鍚庡洖璋冨嚱鏁板洖鏄鹃〉闈㈡暟鎹�
+    callback(id) {
+      this.$refs.MomBaseUnitCategoryListLeft.queryTreeData()
+      this.$refs.MomBaseUnitCategoryListRight.loadData({ id: id })
+    },
+  },
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>
\ No newline at end of file
diff --git a/src/views/eam/UnitList.vue b/src/views/eam/UnitList.vue
new file mode 100644
index 0000000..66f0a18
--- /dev/null
+++ b/src/views/eam/UnitList.vue
@@ -0,0 +1,189 @@
+<template>
+  <div>
+    <a-card
+      :bordered="true"
+      style="height: 50%"
+    >
+      <a-row type="flex">
+        <a-col><a-button
+            type="primary"
+            @click="handleAdd(da)"
+          >鏂板缓</a-button></a-col>
+        <a-col><a-button
+            type="primary"
+            @click="handleEdit(selectedRows)"
+          >缂栬緫</a-button></a-col>
+        <a-col><a-button
+            type="primary"
+            @click="batchDel(da)"
+          >鍒犻櫎</a-button></a-col>
+        <a-col style="left: 5%"><a-button type="primary">妯℃澘</a-button></a-col>
+        <a-col style="left: 5%"><a-button type="primary">瀵煎叆</a-button></a-col>
+        <a-col style="left: 5%"><a-button type="primary">瀵煎嚭</a-button></a-col>
+      </a-row>
+    </a-card>
+    <a-row
+      type="flex"
+      :gutter="16"
+    >
+      <a-col
+        :md="5"
+        :sm="24"
+      >
+        聽 聽 聽
+        <MomUnitListLeft
+          ref="MomUnitListLeft"
+          class="MomUnitListLeft"
+          @treeSelect="treeSelect"
+        />
+        聽 聽
+      </a-col>
+      <a-col
+        :md="24 - 5"
+        :sm="24"
+      >
+        <MomUnitListRight
+          ref="MomUnitListRight"
+          class="MomUnitListRight"
+          @searchkeys="selectedKeys"
+        />
+      </a-col>
+    </a-row>
+    <mom-unit-modal
+      ref="modalForm"
+      @ok="modalFormOk"
+    ></mom-unit-modal>
+  </div>
+</template>
+
+<script>
+import MomUnitListLeft from './modules/unit/MomUnitListLeft'
+import MomUnitListRight from './modules/unit/MomUnitListRight'
+import MomUnitModal from './modules/unit/MomUnitModal'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+import { deleteAction } from '@/api/manage'
+
+export default {
+  name: 'MomUnitList',
+  mixins: [JeecgListMixin],
+  components: { MomUnitListLeft, MomUnitListRight, MomUnitModal },
+  data() {
+    return {
+      description: '璁¢噺鍗曚綅椤甸潰',
+      currentOrgCode: '',
+      selectedRowKeys: [],
+      selectedRows: [],
+      url: {
+        list: '/base/getTree',
+        deleteBatch: '/base/unit/deleteMomUnit',
+      },
+      da: [],
+    }
+  },
+
+  methods: {
+    //鏂板鏁版嵁锛堟柊寤烘寜閽Е鍙戯級
+    handleAdd(da) {
+      if (this.da.length <= 0) {
+        this.$message.warning('璇烽�夋嫨涓�涓爲鑺傜偣锛�')
+        return
+      } else {
+        this.$refs.modalForm.add(da, { cb: this.callback })
+      }
+    },
+    //淇敼鏁版嵁锛堜慨鏀规寜閽Е鍙戯級
+    handleEdit(selectedRows) {
+      if (this.selectedRows.length <= 0) {
+        this.$message.warning('璇烽�夋嫨涓�鏉¢渶瑕佷慨鏀圭殑璁¢噺鍗曚綅锛�')
+        return
+      } else if (this.selectedRows.length > 1) {
+        this.$message.warning('娉ㄦ剰锛氬彧鑳介�夋嫨涓�鏉¤閲忓崟浣嶈繘琛屼慨鏀癸紒')
+        return
+      } else {
+        this.$refs.modalForm.edit(selectedRows, { cb: this.callback })
+      }
+    },
+    //鎵归噺鍒犻櫎鍙充晶鏁版嵁锛堝垹闄ゆ寜閽Е鍙戯級
+    batchDel(da) {
+      if (!this.url.deleteBatch) {
+        this.$message.error('璇疯缃畊rl.deleteBatch灞炴��!')
+        return
+      }
+      if (this.selectedRowKeys.length <= 0) {
+        this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒')
+        return
+      } else {
+        var ids = ''
+        for (var a = 0; a < this.selectedRowKeys.length; a++) {
+          ids += this.selectedRowKeys[a] + ','
+        }
+        var that = this
+        this.$confirm({
+          title: '纭鍒犻櫎',
+          content: '鏄惁鍒犻櫎閫変腑鏁版嵁?',
+          onOk: function () {
+            that.loading = true
+            deleteAction(that.url.deleteBatch, { ids: ids })
+              .then((res) => {
+                if (res.success) {
+                  that.$message.success(res.message)
+                } else {
+                  that.$message.warning(res.message)
+                }
+              })
+              .finally(() => {
+                that.loading = false
+                //閲嶆柊璁$畻鍒嗛〉闂
+                that.reCalculatePage(that.selectedRowKeys.length)
+                that.onClearSelected()
+                that.$refs.MomUnitListRight.loadData({ id: da.id })
+                that.loadTree()
+              })
+          },
+        })
+      }
+    },
+    //閲嶆柊璁$畻鍒嗛〉
+    reCalculatePage(count) {
+      //鎬绘暟閲�-count
+      let total = this.ipagination.total - count
+      //鑾峰彇鍒犻櫎鍚庣殑鍒嗛〉鏁�
+      let currentIndex = Math.ceil(total / this.ipagination.pageSize)
+      //鍒犻櫎鍚庣殑鍒嗛〉鏁�<鎵�鍦ㄥ綋鍓嶉〉
+      if (currentIndex < this.ipagination.current) {
+        this.ipagination.current = currentIndex
+      }
+      console.log('currentIndex', currentIndex)
+    },
+    //娓呴櫎鍙充晶閫変腑椤�
+    onClearSelected() {
+      this.selectedRowKeys = []
+      this.selectedRows = []
+    },
+    //宸﹀彸鑱斿姩锛坉a涓哄乏渚ч�変腑鏍戠殑鏁版嵁锛屽瓙鎺т欢涓繑鍥烇級
+    treeSelect(da) {
+      let id = da.id
+      this.da = da
+      this.onClearSelected()
+      this.$refs.MomUnitListRight.loadData({ unitCategoryId: id })
+    },
+    //鍙充晶鍒楄〃閫変腑浜嬩欢
+    selectedKeys(selectedRowKeys, selectedRows) {
+      this.selectedRowKeys = selectedRowKeys
+      this.selectedRows = selectedRows
+    },
+    //鍔犺浇宸︿晶鏍�
+    loadTree() {
+      this.$refs.MomUnitListLeft.queryTreeData()
+    },
+    //鏂板缂栬緫淇濆瓨鍚庡洖璋冨嚱鏁板洖鏄鹃〉闈㈡暟鎹�
+    callback(id) {
+      this.$refs.MomUnitListRight.loadData({ id: id })
+      this.$refs.MomUnitListRight.getList()
+    },
+  },
+}
+</script>
+<style scoped>
+@import '~@assets/less/common.less';
+</style>
\ No newline at end of file
diff --git a/src/views/eam/modules/unit/MomUnitConversionForm.vue b/src/views/eam/modules/unit/MomUnitConversionForm.vue
new file mode 100644
index 0000000..f133c4d
--- /dev/null
+++ b/src/views/eam/modules/unit/MomUnitConversionForm.vue
@@ -0,0 +1,255 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" slot="detail" :rules="validatorRules">
+        <a-row type="flex" :gutter="16">
+          <a-col :span="24">
+            <a-form-model-item label="鐩爣璁¢噺鍗曚綅浠g爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="targetUnitId">
+              <a-tree-select
+            style="width:100%"
+            :dropdownStyle="{ maxHeight: '200px', overflow: 'auto' }"
+            :treeData="treeData"
+            v-model="model.targetUnitId"
+            placeholder="璇烽�夋嫨鐖剁骇鑿滃崟"
+            :replace-fields="replaceFields"
+            :disabled="false"
+            @change="handleParentIdChange">
+          </a-tree-select>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item label="鎹㈢畻姣斾緥" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conversionRatio">
+              <a-input style="width: 48%" :min="1" defaultValue="1" :disabled="true" ></a-input>
+              <span>锛�</span>
+              <a-input style="width: 49%" :min="1" v-model="model.conversionRatio" placeholder="璇疯緭鍏ユ崲绠楁瘮渚�"></a-input>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-input style="width: 100%" :min="1" v-model="model.remark" placeholder="璇疯緭鍏ュ娉�"></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row type="flex" :gutter="16" justify="center">
+          <a-col>
+            <a-button type="primary" @click="submitForm">淇濆瓨</a-button>
+          </a-col>
+
+          <a-col>
+            <a-button type="primary" @click="submitFormAndAdd">淇濆瓨骞舵柊澧�</a-button>
+          </a-col>
+
+          <a-col>
+            <a-button type="primary" @click="close">鍙栨秷</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from '@/api/manage'
+import { validateDuplicateValue } from '@/utils/util'
+import JFormContainer from '@/components/jeecg/JFormContainer'
+import JDate from '@/components/jeecg/JDate'
+import JDictSelectTag from '@/components/dict/JDictSelectTag'
+
+export default {
+  name: 'MomUnitConversionForm',
+  components: {
+    JFormContainer,
+    JDate,
+    JDictSelectTag,
+  },
+  props: {
+    formData: {
+      type: Object,
+      default: () => {},
+      required: false,
+    },
+    normal: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { status: 1 },
+      id: '',
+      treeData: null,
+      replaceFields: {
+          children:"children",
+          title: 'codeName',
+          key:"code",
+          value:"id"
+        },
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      url: {
+        addMomUnit: '/base/unit/addMomUnit',
+        deleteMomUnit: '/base/unit/deleteMomUnit',
+        addMomUnitOnversion: '/base/unit/onversion/addMomUnitOnversion',
+        deleteMomUnitOnversion:'/base/unit/onversion/deleteMomUnitOnversion',
+        treeList:'/base/getUnitTree'
+      },
+      validatorRules: {
+        targetUnitId: [{ required: true, message: '璇烽�夋嫨鐩爣璁¢噺鍗曚綅浠g爜!' }, { trigger: 'blur' }],
+        conversionRatio: [{ required: true, message: '璇疯緭鍏ユ崲绠楁瘮渚�!' }, { trigger: 'blur' }],
+      },
+      cb: null,
+    }
+  },
+  computed: {
+    formDisabled() {
+      if (this.normal === false) {
+        if (this.formData.disabled === false) {
+          return false
+        } else {
+          return true
+        }
+      }
+      return this.disabled
+    },
+    disabledId() {
+      return this.id ? true : false
+    },
+    showFlowSubmitButton() {
+      if (this.normal === false) {
+        if (this.formData.disabled === false) {
+          return true
+        } else {
+          return false
+        }
+      } else {
+        return false
+      }
+    },
+  },
+  created() {
+    this.showFlowData()
+    this.loadTree()
+  },
+  methods: {
+    showAdd(record, { cb }) {
+      this.cb = cb
+      this.model = record ? Object.assign({}, record) : this.model
+      this.id = record ? record.id : ''
+      this.model.id=''
+      this.model.name=''
+      this.model.remark=''
+      this.model.unitId=record[0].id
+      this.visible = true
+    },
+    show(record, { cb }) {
+      this.cb = cb
+      this.model = record[0] ? Object.assign({}, record[0]) : this.model
+      this.id = record[0] ? record[0].id : ''
+      this.visible = true
+       this.loadTree();
+    },
+    showFlowData() {
+      if (this.normal === false) {
+        let params = { id: this.formData.dataId }
+        getAction(this.url.queryById, params).then((res) => {
+          if (res.success) {
+            this.edit(res.result)
+          }
+        })
+      }
+    },
+    //淇濆瓨鎸夐挳瑙﹀彂
+    submitForm() {
+      const that = this
+      // 瑙﹀彂琛ㄥ崟楠岃瘉
+      that.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true
+          let httpurl = this.url.addMomUnitOnversion
+          let method = 'post'
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+                that.$emit('ok')
+              } else {
+                that.$message.warning(res.message)
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false
+              this.cb(this.id)
+              this.cb = null
+            })
+        } else {
+          return false
+        }
+      })
+    },
+    //淇濆瓨骞舵柊澧炴寜閽Е鍙�
+    submitFormAndAdd() {
+      const that = this
+      // 瑙﹀彂琛ㄥ崟楠岃瘉
+      that.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true
+          let httpurl = this.url.addMomUnit
+          let method = 'post'
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+              } else {
+                that.$message.warning(res.message)
+              }
+            })
+            .finally(() => {
+              this.confirmLoading = false
+              this.model.id = ''
+              this.model.num = ''
+              this.model.name = ''
+              this.cb(this.id)
+            })
+        } else {
+          return false
+        }
+      })
+    },
+    loadTree(){
+      var that = this;
+      getAction(that.url.treeList).then((res) => {
+          if (res.success) {
+            that.treeData = res.result
+          }
+        })
+    },
+    handleParentIdChange(value){
+        if(!value){
+          this.validateStatus="error"
+        }else{
+          this.validateStatus="success"
+        }
+      },
+    //鍙栨秷鎸夐挳瑙﹀彂
+    close() {
+      this.$emit('ok')
+      this.visible = false
+    },
+  },
+}
+</script>
diff --git a/src/views/eam/modules/unit/MomUnitConversionModal.vue b/src/views/eam/modules/unit/MomUnitConversionModal.vue
new file mode 100644
index 0000000..0c6b27d
--- /dev/null
+++ b/src/views/eam/modules/unit/MomUnitConversionModal.vue
@@ -0,0 +1,63 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    :footer="null"
+    >
+    <mom-unit-conversion-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></mom-unit-conversion-form>
+  </j-modal>
+</template>
+
+<script>
+  import MomUnitConversionForm from './MomUnitConversionForm'
+  export default {
+    name: "MomUnitConversionModal",
+    components: {
+      MomUnitConversionForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add (record,{cb}) {
+        this.title="鏂板缓"
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.showAdd(record,{cb});
+        })
+      },
+      edit (record,{cb}) {
+        this.title="缂栬緫"
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.show(record,{cb});
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      },
+    
+    }
+  }
+</script>
\ No newline at end of file
diff --git a/src/views/eam/modules/unit/MomUnitForm.vue b/src/views/eam/modules/unit/MomUnitForm.vue
new file mode 100644
index 0000000..aeee10e
--- /dev/null
+++ b/src/views/eam/modules/unit/MomUnitForm.vue
@@ -0,0 +1,226 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" slot="detail" :rules="validatorRules">
+        <a-row type="flex" :gutter="16">
+          <a-col :span="24">
+            <a-form-model-item label="璁¢噺鍗曚綅缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="num">
+              <a-input v-model="model.num" placeholder="璇疯緭鍏ヨ閲忓崟浣嶇紪鐮�"></a-input>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item label="璁¢噺鍗曚綅鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
+              <a-input style="width: 100%" :min="1" v-model="model.name" placeholder="璇疯緭鍏ヨ閲忓崟浣嶅悕绉�"></a-input>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item label="鍒嗙被鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="categoryName">
+              <a-input style="width: 100%" :min="1" v-model="model.categoryName" :disabled="true"></a-input>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-input style="width: 100%" :min="1" v-model="model.remark" placeholder="璇疯緭鍏ュ娉�"></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row type="flex" :gutter="16" justify="center">
+          <a-col>
+            <a-button type="primary" @click="submitForm">淇濆瓨</a-button>
+          </a-col>
+
+          <a-col>
+            <a-button type="primary" @click="submitFormAndAdd">淇濆瓨骞舵柊澧�</a-button>
+          </a-col>
+
+          <a-col>
+            <a-button type="primary" @click="close">鍙栨秷</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from '@/api/manage'
+import { validateDuplicateValue } from '@/utils/util'
+import JFormContainer from '@/components/jeecg/JFormContainer'
+import JDate from '@/components/jeecg/JDate'
+import JDictSelectTag from '@/components/dict/JDictSelectTag'
+
+export default {
+  name: 'MomUnitForm',
+  components: {
+    JFormContainer,
+    JDate,
+    JDictSelectTag,
+  },
+  props: {
+    formData: {
+      type: Object,
+      default: () => {},
+      required: false,
+    },
+    normal: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { status: 1 },
+      id: '',
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      url: {
+        addMomUnit: '/base/unit/addMomUnit',
+        deleteMomUnit: '/base/unit/deleteMomUnit',
+        addMomUnitOnversion: '/base/unit/onversion/addMomUnitOnversion',
+        deleteMomUnitOnversion:'/base/unit/onversion/deleteMomUnitOnversion'
+      },
+      validatorRules: {
+        num: [{ required: true, message: '璇疯緭鍏ヨ閲忓崟浣嶇紪鐮�!' }, { trigger: 'blur' }],
+        name: [{ required: true, message: '璇疯緭鍏ヨ閲忓崟浣嶅悕绉�!' }, { trigger: 'blur' }],
+      },
+      cb: null,
+    }
+  },
+  computed: {
+    formDisabled() {
+      if (this.normal === false) {
+        if (this.formData.disabled === false) {
+          return false
+        } else {
+          return true
+        }
+      }
+      return this.disabled
+    },
+    disabledId() {
+      return this.id ? true : false
+    },
+    showFlowSubmitButton() {
+      if (this.normal === false) {
+        if (this.formData.disabled === false) {
+          return true
+        } else {
+          return false
+        }
+      } else {
+        return false
+      }
+    },
+  },
+  created() {
+    this.showFlowData()
+  },
+  methods: {
+    showAdd(record, { cb }) {
+      this.cb = cb
+      this.model = record ? Object.assign({}, record) : this.model
+      this.id = record ? record.id : ''
+      this.model.id=''
+      this.model.name=''
+      this.model.remark=''
+      this.model.unitCategoryId=record.id
+      this.model.categoryName = record.codeName
+      this.visible = true
+    },
+    show(record, { cb }) {
+      this.cb = cb
+      this.model = record[0] ? Object.assign({}, record[0]) : this.model
+      this.id = record[0] ? record[0].id : ''
+      this.visible = true
+    },
+    showFlowData() {
+      if (this.normal === false) {
+        let params = { id: this.formData.dataId }
+        getAction(this.url.queryById, params).then((res) => {
+          if (res.success) {
+            this.edit(res.result)
+          }
+        })
+      }
+    },
+    //淇濆瓨鎸夐挳瑙﹀彂
+    submitForm() {
+      const that = this
+      // 瑙﹀彂琛ㄥ崟楠岃瘉
+      that.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true
+          let httpurl = this.url.addMomUnit
+          let method = 'post'
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+                that.$emit('ok')
+              } else {
+                that.$message.warning(res.message)
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false
+              this.cb(this.id)
+              this.cb = null
+            })
+        } else {
+          return false
+        }
+      })
+    },
+    //淇濆瓨骞舵柊澧炴寜閽Е鍙�
+    submitFormAndAdd() {
+      const that = this
+      // 瑙﹀彂琛ㄥ崟楠岃瘉
+      that.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true
+          let httpurl = this.url.addMomUnit
+          let method = 'post'
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+              } else {
+                that.$message.warning(res.message)
+              }
+            })
+            .finally(() => {
+              this.confirmLoading = false
+              this.model.id = ''
+              this.model.num = ''
+              this.model.name = ''
+              this.cb(this.id)
+            })
+        } else {
+          return false
+        }
+      })
+    },
+    //鍙栨秷鎸夐挳瑙﹀彂
+    close() {
+      this.$emit('ok')
+      this.visible = false
+    },
+  },
+}
+</script>
diff --git a/src/views/eam/modules/unit/MomUnitListLeft.vue b/src/views/eam/modules/unit/MomUnitListLeft.vue
new file mode 100644
index 0000000..c439fe4
--- /dev/null
+++ b/src/views/eam/modules/unit/MomUnitListLeft.vue
@@ -0,0 +1,54 @@
+<template>
+ <a-card :bordered="false" style="height: 100%;">
+      <a-tree
+        showLine
+        checkStrictly
+        :replace-fields="replaceFields"
+        :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
+        :treeData="treeDataSource"
+        @select="handleTreeSelect"
+      >
+      <a-icon slot="switcherIcon" type="folder" /></a-tree>
+ </a-card>
+</template>
+
+<script>
+import { getAction } from '@/api/manage'
+
+  export default {
+    name: 'MomUnitListLeft',
+    data() {
+      return {
+        treeDataSource:[],
+        replaceFields: {
+          title: 'codeName',
+        },
+        url:{
+          getTree:'/base/getTree'
+        }
+      }
+    },
+    created() {
+      this.queryTreeData()
+    },
+    methods: {
+
+      queryTreeData() {
+        getAction(this.url.getTree).then((res)=>{
+          this.treeDataSource = res.result;
+        })
+      },
+      //宸︿晶鏍戠偣鍑昏Е鍙�
+      handleTreeSelect(selectedKeys, event) {
+        let da = event.node.dataRef;
+        this.$emit("treeSelect", da);
+      }
+      
+
+    }
+  }
+</script>
+
+<style scoped>
+
+</style>
\ No newline at end of file
diff --git a/src/views/eam/modules/unit/MomUnitListRight.vue b/src/views/eam/modules/unit/MomUnitListRight.vue
new file mode 100644
index 0000000..6e2e6ea
--- /dev/null
+++ b/src/views/eam/modules/unit/MomUnitListRight.vue
@@ -0,0 +1,336 @@
+<template>
+  <a-card class="j-address-list-right-card-box" :bordered="false">
+    <a-table
+      ref="table"
+      size="middle"
+      :row-selection="rowSelection"
+      bordered
+      rowKey="id"
+      :columns="columns"
+      :dataSource="dataSource"
+    >
+    </a-table>
+    <a-tabs type="card">
+      <a-tab-pane key="1" tab="鍗曚綅鎹㈢畻">
+        <a-row type="flex" :gutter="5" justify="end">
+        <a-col><a-button type="text" style="float:right" @click="batchDel(selectedDownRows)"><a-icon type="minus" style="color:rgba(28, 106, 235, 1)"></a-icon></a-button></a-col>
+        <a-col><a-button type="text" style="float:right" @click="handleAdd(selectedRows)"><a-icon type="plus" style="color:rgba(28, 106, 235, 1)"></a-icon></a-button></a-col>
+        <a-col><a-button type="text" style="float:right" @click="handleEdit(selectedDownRows)"><a-icon type="form" style="color:rgba(28, 106, 235, 1)"></a-icon></a-button></a-col>
+      </a-row>
+      </a-tab-pane>
+    </a-tabs>
+    <a-table
+      ref="table"
+      size="middle"
+      :row-selection="rowDownSelection"
+      bordered
+      rowKey="id"
+      :columns="downColumns"
+      :dataSource="downDataSource"
+    >
+    </a-table>
+    <mom-unit-conversion-modal ref="modalForm" ></mom-unit-conversion-modal>
+  </a-card>
+</template>
+
+<script>
+import { getAction } from '@/api/manage'
+import MomUnitConversionModal from './MomUnitConversionModal'
+import { deleteAction } from '@/api/manage'
+import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+export default {
+  name: 'MomUnitListRight',
+  mixins: [JeecgListMixin],
+  components: { MomUnitConversionModal },
+  props: ['value'],
+  data() {
+    return {
+      description: '璁¢噺鍗曚綅淇℃伅',
+      positionInfo: {},
+      dataSource: null,
+      unitCategoryId:"",
+      downDataSource: null,
+      selectedRowKeys:[],
+      selectedRows:[],
+      ids:"",
+      selectedDownRowKeys:[],
+      selectedDownRows:[],
+      url: {
+        deleteBatch: '/base/unit/onversion/deleteMomUnitOnversion',
+        getListByUnitCategoryId:'/base/unit/getListByUnitCategoryId'
+      },
+      columns: [
+        {
+          title: '鍗曚綅浠g爜',
+          width: '10%',
+          align: 'center',
+          dataIndex: 'num',
+        },
+        {
+          title: '鍗曚綅鍚嶇О',
+          width: '15%',
+          align: 'center',
+          dataIndex: 'name',
+        },
+        {
+          title: '鍒嗙被鍚嶇О',
+          width: '15%',
+          align: 'center',
+          dataIndex: 'categoryName',
+        },
+        {
+          title: '鍒涘缓浜�',
+          width: '10%',
+          align: 'center',
+          dataIndex: 'createBy',
+        },
+        {
+          title: '鍒涘缓鏃堕棿',
+          width: '15%',
+          align: 'center',
+          dataIndex: 'createTime',
+        },
+        {
+          title: '鏇存柊浜�',
+          width: '10%',
+          align: 'center',
+          dataIndex: 'updateBy',
+        },
+        {
+          title: '鏇存柊鏃堕棿',
+          width: '15%',
+          align: 'center',
+          dataIndex: 'updateTime',
+        },
+        {
+          title: '澶囨敞',
+          width: '10%',
+          align: 'center',
+          dataIndex: 'remark',
+        },
+      ],
+      downColumns: [
+        {
+            title: '#',
+            key: 'rowIndex',
+            dataIndex: '',
+            width: 40,
+            align: 'center',
+            customRender: (t, r, i) => parseInt(i) + 1
+        },
+        {
+          title: '鐩爣鍗曚綅浠g爜',
+          width: '12%',
+          align: 'center',
+          dataIndex: 'targetUnitNum',
+        },
+        {
+          title: '鐩爣鍗曚綅鍚嶇О',
+          width: '12%',
+          align: 'center',
+          dataIndex: 'targetUnitName',
+        },
+        {
+          title: '鎹㈢畻姣斾緥',
+          width: '15%',
+          align: 'center',
+          dataIndex: 'conversionRatio',
+        },
+        {
+          title: '鍒涘缓浜�',
+          width: '10%',
+          align: 'center',
+          dataIndex: 'createBy',
+        },
+        {
+          title: '鍒涘缓鏃堕棿',
+          width: '15%',
+          align: 'center',
+          dataIndex: 'createTime',
+        },
+        {
+          title: '鏇存柊浜�',
+          width: '10%',
+          align: 'center',
+          dataIndex: 'updateBy',
+        },
+        {
+          title: '鏇存柊鏃堕棿',
+          width: '15%',
+          align: 'center',
+          dataIndex: 'updateTime',
+        },
+        {
+          title: '澶囨敞',
+          width: '10%',
+          align: 'center',
+          dataIndex: 'remark',
+        },
+      ],
+    }
+  },
+  computed: {
+    rowSelection() {
+      return {
+        onChange: (selectedRowKeys, selectedRows) => {
+          this.selectedRowKeys = selectedRowKeys
+          this.selectedRows = selectedRows
+          this.$emit('searchkeys', selectedRowKeys,selectedRows)
+          this.ids=selectedRowKeys.join(",")
+          this.getList()
+        },
+        getCheckboxProps: (record) => ({
+          props: {
+            disabled: record.name === 'Disabled User', // Column configuration not to be checked
+            name: record.name,
+          },
+        }),
+      }
+    },
+    rowDownSelection() {
+      return {
+        onChange: (selectedDownRowKeys, selectedDownRows) => {
+          this.selectedDownRowKeys = selectedDownRowKeys
+          this.selectedDownRows = selectedDownRows
+        },
+        getCheckboxProps: (record) => ({
+          props: {
+            disabled: record.name === 'Disabled User', // Column configuration not to be checked
+            name: record.name,
+          },
+        }),
+      }
+    },
+  },
+  created() {
+    this.loadData({ unitCategoryId: ''})
+  },
+  methods: {
+    loadData({ unitCategoryId }) {
+      let momUnit = {
+        unitCategoryId,
+      }
+      
+      getAction(this.url.getListByUnitCategoryId, momUnit)
+        .then((res) => {
+          if (res.success) {
+            this.dataSource = res.result
+        
+          }
+        })
+        .finally(() => {
+          this.loading = false
+          this.cardLoading = false
+        })
+        
+    },
+    //鏍规嵁閫変腑鐨勮閲忓崟浣峣d璋冪敤鏌ヨ鍗曚綅鎹㈢畻鍒楄〃鎺ュ彛
+    getList(){
+      getAction('/base/unit/onversion/getListByUnitId', {ids:this.ids})
+        .then((res) => {
+          if (res.success) {
+            this.downDataSource = res.result
+          }
+        })
+        .finally(() => {
+          this.loading = false
+          this.cardLoading = false
+        })
+    },
+    //澧炲姞鍗曚綅鎹㈢畻鏂规硶
+    handleAdd(selectedRows){
+      if (this.selectedRows.length <= 0) {
+        this.$message.warning('璇烽�夋嫨涓�鏉¢渶瑕佸鍔犲崟浣嶆崲绠楃殑璁¢噺鍗曚綅锛�')
+        return
+      } else if (this.selectedRows.length > 1) {
+        this.$message.warning('娉ㄦ剰锛氬彧鑳介�夋嫨涓�鏉¢渶瑕佸鍔犲崟浣嶆崲绠楃殑璁¢噺鍗曚綅锛�')
+        return
+      } else {
+        this.$refs.modalForm.add(selectedRows,{cb: this.getList})
+      }
+    },
+    //淇敼鏁版嵁锛堜慨鏀规寜閽Е鍙戯級
+    handleEdit(selectedDownRows) {
+      if (this.selectedDownRows.length <= 0) {
+        this.$message.warning('璇烽�夋嫨涓�鏉¢渶瑕佷慨鏀圭殑鍗曚綅鎹㈢畻淇℃伅锛�')
+        return
+      } else if (this.selectedDownRows.length > 1) {
+        this.$message.warning('娉ㄦ剰锛氬彧鑳介�夋嫨涓�鏉″崟浣嶅垝绠椾俊鎭繘琛屼慨鏀癸紒')
+        return
+      } else {
+        this.$refs.modalForm.edit(selectedDownRows, { cb: this.getList })
+      }
+    },
+    //鎵归噺鍒犻櫎鍙充晶鏁版嵁锛堝垹闄ゆ寜閽Е鍙戯級
+    batchDel() {
+      if (!this.url.deleteBatch) {
+        this.$message.error('璇疯缃畊rl.deleteBatch灞炴��!')
+        return
+      }
+      if (this.selectedDownRowKeys.length <= 0) {
+        this.$message.warning('璇烽�夋嫨涓�鏉¤褰曪紒')
+        return
+      } else {
+        var ids = ''
+        for (var a = 0; a < this.selectedDownRowKeys.length; a++) {
+          ids += this.selectedDownRowKeys[a] + ','
+        }
+        var that = this
+        this.$confirm({
+          title: '纭鍒犻櫎',
+          content: '鏄惁鍒犻櫎閫変腑鏁版嵁?',
+          onOk: function () {
+            that.loading = true
+            deleteAction(that.url.deleteBatch, { ids: ids })
+              .then((res) => {
+                if (res.success) {
+                  that.$message.success(res.message)
+                } else {
+                  that.$message.warning(res.message)
+                }
+              })
+              .finally(() => {
+                that.loading = false
+                //閲嶆柊璁$畻鍒嗛〉闂
+                that.reCalculatePage(that.selectedDownRowKeys.length)
+                that.onClearSelected()
+                this.getList()
+                that.loadTree()
+              })
+          },
+        })
+      }
+    },
+    //閲嶆柊璁$畻鍒嗛〉
+    reCalculatePage(count) {
+      //鎬绘暟閲�-count
+      let total = this.ipagination.total - count
+      //鑾峰彇鍒犻櫎鍚庣殑鍒嗛〉鏁�
+      let currentIndex = Math.ceil(total / this.ipagination.pageSize)
+      //鍒犻櫎鍚庣殑鍒嗛〉鏁�<鎵�鍦ㄥ綋鍓嶉〉
+      if (currentIndex < this.ipagination.current) {
+        this.ipagination.current = currentIndex
+      }
+      console.log('currentIndex', currentIndex)
+    },
+    //娓呴櫎鍗曚綅鎹㈢畻閫変腑椤�
+    onClearSelected() {
+      this.selectedDownRowKeys = []
+      this.selectedDownRows = []
+    },
+    
+  },
+}
+</script>
+<style>
+.j-address-list-right-card-box .ant-table-placeholder {
+  min-height: 46px;
+}
+</style>
+<style scoped>
+.j-address-list-right-card-box {
+  height: 100%;
+  min-height: 300px;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/eam/modules/unit/MomUnitModal.vue b/src/views/eam/modules/unit/MomUnitModal.vue
new file mode 100644
index 0000000..c9f906e
--- /dev/null
+++ b/src/views/eam/modules/unit/MomUnitModal.vue
@@ -0,0 +1,63 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    :footer="null"
+    >
+    <mom-unit-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></mom-unit-form>
+  </j-modal>
+</template>
+
+<script>
+  import MomUnitForm from './MomUnitForm'
+  export default {
+    name: "MomUnitModal",
+    components: {
+      MomUnitForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add (record,{cb}) {
+        this.title="鏂板缓"
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.showAdd(record,{cb});
+        })
+      },
+      edit (record,{cb}) {
+        this.title="缂栬緫"
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.show(record,{cb});
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      },
+    
+    }
+  }
+</script>
\ No newline at end of file
diff --git a/src/views/eam/modules/unitCategory/MomBaseUnitCategoryForm.vue b/src/views/eam/modules/unitCategory/MomBaseUnitCategoryForm.vue
new file mode 100644
index 0000000..8e6b0de
--- /dev/null
+++ b/src/views/eam/modules/unitCategory/MomBaseUnitCategoryForm.vue
@@ -0,0 +1,229 @@
+<template>
+  <a-spin :spinning="confirmLoading">
+    <j-form-container :disabled="formDisabled">
+      <a-form-model ref="form" :model="model" slot="detail" :rules="validatorRules">
+        <a-row type="flex" :gutter="16">
+          <a-col :span="24">
+            <a-form-model-item label="璁¢噺鍗曚綅鍒嗙被缂栫爜" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="code">
+              <a-input v-model="model.code" placeholder="璇疯緭鍏ヨ閲忓崟浣嶅垎绫荤紪鐮�"></a-input>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item label="璁¢噺鍗曚綅鍒嗙被鍚嶇О" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="name">
+              <a-input style="width: 100%" :min="1" v-model="model.name" placeholder="璇疯緭鍏ヨ閲忓崟浣嶅垎绫诲悕绉�"></a-input>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item label="涓婄骇鍒嗙被" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="pName">
+              <a-input style="width: 100%" :min="1" v-model="model.pname" :disabled="true"></a-input>
+            </a-form-model-item>
+          </a-col>
+
+          <a-col :span="24">
+            <a-form-model-item label="澶囨敞" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-input style="width: 100%" :min="1" v-model="model.remark" placeholder="璇疯緭鍏ュ娉�"></a-input>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row type="flex" :gutter="16" justify="center">
+          <a-col>
+            <a-button type="primary" @click="submitForm">淇濆瓨</a-button>
+          </a-col>
+
+          <a-col>
+            <a-button type="primary" @click="submitFormAndAdd">淇濆瓨骞舵柊澧�</a-button>
+          </a-col>
+
+          <a-col>
+            <a-button type="primary" @click="close">鍙栨秷</a-button>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </j-form-container>
+  </a-spin>
+</template>
+
+<script>
+import { httpAction, getAction } from '@/api/manage'
+import { validateDuplicateValue } from '@/utils/util'
+import JFormContainer from '@/components/jeecg/JFormContainer'
+import JDate from '@/components/jeecg/JDate'
+import JDictSelectTag from '@/components/dict/JDictSelectTag'
+
+export default {
+  name: 'MomBaseUnitCategoryForm',
+  components: {
+    JFormContainer,
+    JDate,
+    JDictSelectTag,
+  },
+  props: {
+    formData: {
+      type: Object,
+      default: () => {},
+      required: false,
+    },
+    normal: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+    disabled: {
+      type: Boolean,
+      default: false,
+      required: false,
+    },
+  },
+  data() {
+    return {
+      model: { status: 1 },
+      id: '',
+      labelCol: {
+        xs: { span: 24 },
+        sm: { span: 5 },
+      },
+      wrapperCol: {
+        xs: { span: 24 },
+        sm: { span: 16 },
+      },
+      confirmLoading: false,
+      url: {
+        add: '/base/add',
+        delete: '/base/delete',
+      },
+      validatorRules: {
+        code: [{ required: true, message: '璇疯緭鍏ヨ閲忓崟浣嶅垎绫荤紪鐮�!' }, { trigger: 'blur' }],
+        name: [{ required: true, message: '璇疯緭鍏ヨ閲忓崟浣嶅垎绫诲悕绉�!' }, { trigger: 'blur' }],
+      },
+      cb: null,
+    }
+  },
+  computed: {
+    formDisabled() {
+      if (this.normal === false) {
+        if (this.formData.disabled === false) {
+          return false
+        } else {
+          return true
+        }
+      }
+      return this.disabled
+    },
+    disabledId() {
+      return this.id ? true : false
+    },
+    showFlowSubmitButton() {
+      if (this.normal === false) {
+        if (this.formData.disabled === false) {
+          return true
+        } else {
+          return false
+        }
+      } else {
+        return false
+      }
+    },
+  },
+  created() {
+    this.showFlowData()
+  },
+  methods: {
+    showAdd(record, { cb }) {
+      this.cb = cb
+      this.model = record ? Object.assign({}, record) : this.model
+      this.id = record ? record.id : ''
+      this.model.id = ''
+      this.model.code = ''
+      this.model.name = ''
+      this.model.remark = ''
+      this.model.createBy = ''
+      this.model.createTime = ''
+      this.model.updateBy = ''
+      this.model.updateTime = ''
+      this.model.pid = record.id
+      this.model.pname = record.codeName
+      this.visible = true
+    },
+    show(record, { cb }) {
+      this.cb = cb
+      this.model = record ? Object.assign({}, record) : this.model
+      this.id = record ? record.id : ''
+      this.visible = true
+    },
+    showFlowData() {
+      if (this.normal === false) {
+        let params = { id: this.formData.dataId }
+        getAction(this.url.queryById, params).then((res) => {
+          if (res.success) {
+            this.edit(res.result)
+          }
+        })
+      }
+    },
+    //淇濆瓨鎸夐挳瑙﹀彂
+    submitForm() {
+      const that = this
+      // 瑙﹀彂琛ㄥ崟楠岃瘉
+      that.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true
+          let httpurl = this.url.add
+          let method = 'post'
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+                that.$emit('ok')
+              } else {
+                that.$message.warning(res.message)
+              }
+            })
+            .finally(() => {
+              that.confirmLoading = false
+              this.cb(this.id)
+              this.cb = null
+            })
+        } else {
+          return false
+        }
+      })
+    },
+    //淇濆瓨骞舵柊澧炴寜閽Е鍙�
+    submitFormAndAdd() {
+      const that = this
+      // 瑙﹀彂琛ㄥ崟楠岃瘉
+      that.$refs.form.validate((valid) => {
+        if (valid) {
+          that.confirmLoading = true
+          let httpurl = this.url.add
+          let method = 'post'
+          httpAction(httpurl, this.model, method)
+            .then((res) => {
+              if (res.success) {
+                that.$message.success(res.message)
+              } else {
+                that.$message.warning(res.message)
+              }
+            })
+            .finally(() => {
+              this.confirmLoading = false
+              this.model.id = ''
+              this.model.code = ''
+              this.model.name = ''
+              this.cb(this.id)
+            })
+        } else {
+          return false
+        }
+      })
+    },
+    //鍙栨秷鎸夐挳瑙﹀彂
+    close() {
+      this.$emit('ok')
+      this.visible = false
+    },
+  },
+}
+</script>
diff --git a/src/views/eam/modules/unitCategory/MomBaseUnitCategoryListLeft.vue b/src/views/eam/modules/unitCategory/MomBaseUnitCategoryListLeft.vue
new file mode 100644
index 0000000..6f6d800
--- /dev/null
+++ b/src/views/eam/modules/unitCategory/MomBaseUnitCategoryListLeft.vue
@@ -0,0 +1,59 @@
+<template>
+  <a-card
+    :bordered="false"
+    style="height: 100%;"
+  >
+    <a-tree
+      showLine
+      checkStrictly
+      :replace-fields="replaceFields"
+      :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"
+      :treeData="treeDataSource"
+      @select="handleTreeSelect"
+    >
+      <a-icon
+        slot="switcherIcon"
+        type="folder"
+      /></a-tree>
+  </a-card>
+</template>
+
+<script>
+import { getAction } from '@/api/manage'
+
+export default {
+  name: 'MomBaseUnitCategoryListLeft',
+  data() {
+    return {
+      treeDataSource: [],
+      replaceFields: {
+        title: 'codeName',
+      },
+      url: {
+        getTree: '/base/getTree'
+      }
+    }
+  },
+  created() {
+    this.queryTreeData()
+  },
+  methods: {
+
+    queryTreeData() {
+      getAction(this.url.getTree).then((res) => {
+        this.treeDataSource = res.result;
+      })
+    },
+    //宸︿晶鏍戠偣鍑昏Е鍙�
+    handleTreeSelect(selectedKeys, event) {
+      let da = event.node.dataRef;
+      this.$emit("treeSelect", da);
+    }
+
+
+  }
+}
+</script>
+
+<style scoped>
+</style>
\ No newline at end of file
diff --git a/src/views/eam/modules/unitCategory/MomBaseUnitCategoryListRight.vue b/src/views/eam/modules/unitCategory/MomBaseUnitCategoryListRight.vue
new file mode 100644
index 0000000..bf7c075
--- /dev/null
+++ b/src/views/eam/modules/unitCategory/MomBaseUnitCategoryListRight.vue
@@ -0,0 +1,137 @@
+<template>
+  <a-card class="j-address-list-right-card-box" :bordered="false">
+    <a-table
+      ref="table"
+      size="middle"
+      :row-selection="rowSelection"
+      bordered
+      rowKey="id"
+      :columns="columns"
+      :dataSource="dataSource"
+    >
+    </a-table>
+  </a-card>
+</template>
+
+<script>
+import { getAction } from '@/api/manage'
+
+export default {
+  name: 'MomBaseUnitCategoryListRight',
+  components: {},
+  props: ['value'],
+  data() {
+    return {
+      description: '璁¢噺鍗曚綅鍒嗙被淇℃伅',
+      positionInfo: {},
+      dataSource: null,
+      url:{
+          getList:'/base/getList'
+        },
+      columns: [
+        {
+          title: '鍒嗙被缂栫爜',
+          width: '10%',
+          align: 'center',
+          dataIndex: 'code',
+        },
+        {
+          title: '鍒嗙被鍚嶇О',
+          width: '15%',
+          align: 'center',
+          dataIndex: 'name',
+          key: 'name',
+        },
+        {
+          title: '涓婄骇鍒嗙被',
+          width: '10%',
+          align: 'center',
+          dataIndex: 'codeName',
+        },
+        {
+          title: '鍒涘缓浜�',
+          width: '10%',
+          align: 'center',
+          dataIndex: 'createBy',
+        },
+        {
+          title: '鍒涘缓鏃堕棿',
+          width: '15%',
+          align: 'center',
+          dataIndex: 'createTime',
+        },
+        {
+          title: '鏇存柊浜�',
+          width: '10%',
+          align: 'center',
+          dataIndex: 'updateBy',
+        },
+        {
+          title: '鏇存柊鏃堕棿',
+          width: '15%',
+          align: 'center',
+          dataIndex: 'updateTime',
+        },
+        {
+          title: '澶囨敞',
+          width: '15%',
+          align: 'center',
+          dataIndex: 'remark',
+        },
+      ],
+    }
+  },
+  computed: {
+    rowSelection() {
+      return {
+        onChange: (selectedRowKeys, selectedRows) => {
+          this.selectedRowKeys = selectedRowKeys
+          this.selectedRows = selectedRows
+          this.$emit('searchkeys', selectedRowKeys,selectedRows)
+          this.ids=selectedRowKeys.join(",")
+          //this.getList()
+        },
+        getCheckboxProps: (record) => ({
+          props: {
+            disabled: record.name === 'Disabled User', // Column configuration not to be checked
+            name: record.name,
+          },
+        }),
+      }
+    },
+  },
+  created() {
+    this.loadData({ id: '' })
+  },
+  methods: {
+    loadData({ id }) {
+      let momBaseUnitCategory = {
+        id,
+      }
+      getAction(this.url.getList, momBaseUnitCategory)
+        .then((res) => {
+          if (res.success) {
+            this.dataSource = res.result
+          }
+        })
+        .finally(() => {
+          this.loading = false
+          this.cardLoading = false
+        })
+      // update-end- --- author:wangshuai ------ date:20200102 ---- for:浼犺繃鏉ョ殑閮ㄩ棬缂栫爜涓虹┖鍏ㄦ煡
+    },
+    
+  },
+}
+</script>
+<style>
+.j-address-list-right-card-box .ant-table-placeholder {
+  min-height: 46px;
+}
+</style>
+<style scoped>
+.j-address-list-right-card-box {
+  height: 100%;
+  min-height: 300px;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/eam/modules/unitCategory/MomBaseUnitCategoryModal.vue b/src/views/eam/modules/unitCategory/MomBaseUnitCategoryModal.vue
new file mode 100644
index 0000000..bb9348c
--- /dev/null
+++ b/src/views/eam/modules/unitCategory/MomBaseUnitCategoryModal.vue
@@ -0,0 +1,63 @@
+<template>
+  <j-modal
+    :title="title"
+    :width="width"
+    :visible="visible"
+    switchFullscreen
+    @ok="handleOk"
+    :okButtonProps="{ class:{'jee-hidden': disableSubmit} }"
+    @cancel="handleCancel"
+    :footer="null"
+    >
+    <mom-base-unit-category-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></mom-base-unit-category-form>
+  </j-modal>
+</template>
+
+<script>
+  import MomBaseUnitCategoryForm from './MomBaseUnitCategoryForm'
+  export default {
+    name: "MomBaseUnitCategoryModal",
+    components: {
+      MomBaseUnitCategoryForm
+    },
+    data () {
+      return {
+        title:'',
+        width:800,
+        visible: false,
+        disableSubmit: false
+      }
+    },
+    methods: {
+      add (record,{cb}) {
+        this.title="鏂板缓"
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.showAdd(record,{cb});
+        })
+      },
+      edit (record,{cb}) {
+        this.title="缂栬緫"
+        this.visible=true
+        this.$nextTick(()=>{
+          this.$refs.realForm.show(record,{cb});
+        })
+      },
+      close () {
+        this.$emit('close');
+        this.visible = false;
+      },
+      handleOk () {
+        this.$refs.realForm.submitForm();
+      },
+      submitCallback(){
+        this.$emit('ok');
+        this.visible = false;
+      },
+      handleCancel () {
+        this.close()
+      },
+    
+    }
+  }
+</script>
\ No newline at end of file

--
Gitblit v1.9.3