Quellcode durchsuchen

物料管理 列表, 分类

ysy vor 2 Jahren
Ursprung
Commit
b98aa9815e

+ 224 - 0
src/views/material/product copy/components/link-msg.vue

@@ -0,0 +1,224 @@
+<template>
+  <div class="link-msg">
+    <headerTitle title="关联信息"></headerTitle>
+    <el-tabs v-model="activeTab">
+      <el-tab-pane label="可用模具">
+        <ele-pro-table :columns="moduleColumn" :datasource="moduleData">
+        </ele-pro-table>
+      </el-tab-pane>
+      <el-tab-pane label="BOM">
+        <ele-pro-table :columns="BOMColumn" :datasource="bomData">
+        </ele-pro-table
+      ></el-tab-pane>
+      <el-tab-pane label="工艺路线">
+        <ele-pro-table :columns="pathColumn" :datasource="pathData">
+        </ele-pro-table
+      ></el-tab-pane>
+      <!-- <el-tab-pane label="质量标准"></el-tab-pane> -->
+      <!-- <el-tab-pane label="文件">
+        <ele-pro-table :columns="fileColumn" :datasource="[]"> </ele-pro-table
+      ></el-tab-pane> -->
+      <el-tab-pane label="关联设备">
+        <ele-pro-table :columns="equiColumn" :datasource="eqData">
+        </ele-pro-table
+      ></el-tab-pane>
+    </el-tabs>
+  </div>
+</template>
+
+<script>
+  import { getBomRoutingList } from '@/api/material/manage.js';
+  import { getRelatesInformationList } from '@/api/material/product.js';
+  import dictMixins from '@/mixins/dictMixins';
+  export default {
+    mixins: [dictMixins],
+    props: {
+      id: [Number, String],
+      categoryLevelId: [Number, String],
+      categoryLevelGroupId: [Number, String]
+    },
+    data () {
+      return {
+        activeTab: '0',
+        moduleColumn: [
+          {
+            type: 'index',
+            label: '序号',
+            width: '55px',
+            align: 'center'
+          },
+          {
+            label: '编码',
+            prop: 'code'
+          },
+          {
+            label: '名称',
+            prop: 'name'
+          },
+          {
+            label: '牌号',
+            prop: 'brandNum'
+          },
+          {
+            label: '型号',
+            prop: 'modelType'
+          },
+          {
+            label: '收缩系数',
+            prop: 'extendInfo.shrinkEffictive'
+          },
+          {
+            label: '大模体型号',
+            prop: 'extendInfo.maxMoldType'
+          },
+          // {
+          //   label: '物品类型',
+          //   prop: ''
+          // },
+          {
+            label: '分类',
+            prop: 'categoryLevelGroupName'
+          }
+        ],
+        BOMColumn: [
+          {
+            label: 'BOM编码',
+            prop: 'code'
+          },
+          {
+            label: 'BOM名称',
+            prop: 'name'
+          },
+          {
+            label: '版本号',
+            prop: 'version'
+          },
+          {
+            label: '基本数量',
+            prop: 'baseCount'
+          },
+          {
+            label: '单位',
+            prop: 'baseCountUnit'
+          }
+        ],
+        pathColumn: [
+          {
+            label: '工艺路线组编码',
+            prop: 'code'
+          },
+          {
+            label: '工艺路线名称',
+            prop: 'name'
+          },
+          {
+            label: '生产版本',
+            prop: ''
+          },
+          {
+            label: '工艺路线版本',
+            prop: 'version'
+          }
+        ],
+        fileColumn: [
+          {
+            label: '文件编码'
+          },
+          {
+            label: '文件名称'
+          }
+        ],
+        equiColumn: [
+          // {
+          //   type: 'selection'
+          // },
+          {
+            label: '设备分类',
+            prop: 'categoryLevelGroupName'
+          },
+          {
+            label: '设备编码',
+            prop: 'code'
+          },
+          {
+            label: '设备名称',
+            prop: 'name'
+          },
+          {
+            label: '产能',
+            formatter: (row) => {
+              return (
+                row.quantity &&
+                `${row.quantity}/${this.getDictValue(
+                  '重量单位',
+                  row.quantityUnitId
+                )}`
+              );
+            }
+          }
+        ],
+        moduleData: [],
+        eqData: [],
+        bomData: [],
+        pathData: []
+      };
+    },
+    watch: {
+      id: {
+        handler (val) {
+          if (val) {
+            this.getData();
+          }
+        },
+        immediate: true
+      },
+      categoryLevelId: {
+        handler (val) {
+          if (val) {
+            this.getModuleData();
+            this.getEqData();
+          }
+        },
+        immediate: true
+      }
+    },
+    created () {
+      this.requestDict('重量单位');
+    },
+    methods: {
+      async getData () {
+        const data = await getBomRoutingList(this.id);
+
+        this.bomData = data?.bomList || [];
+        this.pathData = data?.routingList || [];
+      },
+      // 关联设备
+      async getEqData () {
+        const data = await getRelatesInformationList({
+          mainCategoryId: this.categoryLevelId,
+          categoryLevelRootId: 4 ,//设备
+          categoryLevelGroupId:this.categoryLevelGroupId
+        });
+
+        this.eqData = data;
+      },
+      // 关联舟皿
+      async getModuleData () {
+        const data = await getRelatesInformationList({
+          mainCategoryId: this.categoryLevelId,
+          categoryLevelRootId: 5 ,//模具
+          categoryLevelGroupId:this.categoryLevelGroupId
+        });
+
+        this.moduleData = data;
+      }
+    }
+  };
+</script>
+<style lang="scss" scoped>
+  .link-msg {
+    background: #fff;
+
+    padding: 1px 17px;
+  }
+</style>

+ 0 - 0
src/views/material/product/components/product-search.vue → src/views/material/product copy/components/product-search.vue


+ 421 - 0
src/views/material/product copy/detail.vue

@@ -0,0 +1,421 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never">
+      <el-form
+        label-width="120px"
+        ref="manageForm"
+        :model="form"
+        :rules="rules"
+      >
+        <headerTitle title="基本信息">
+          <el-button @click="cancel">返回</el-button>
+          <el-button type="primary" @click="submit" :loading="loading"
+            >保存</el-button
+          ></headerTitle
+        >
+        <!-- <div class="divider">
+          <div class="title">
+            <div class="ele-bg-primary"></div>
+            <span>基本信息</span>
+          </div>
+          <div class="ele-bg-primary ele-width"></div>
+        </div> -->
+        <el-row :gutter="24">
+          <el-col :span="8">
+            <el-form-item label="编码" prop="code">
+              <el-input v-model="form.code" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="名称" prop="name">
+              <el-input v-model="form.name" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="分类" prop="categoryLevelName">
+              <el-input
+                v-model="form.categoryLevelName"
+                @click.native="openCategory"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="牌号" prop="brandNum">
+              <el-input v-model="form.brandNum" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="规格" prop="specification">
+              <el-input v-model="form.specification" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="型号" prop="modelType">
+              <el-input v-model="form.modelType" />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="计量单位" prop="measuringUnit">
+              <DictSelection
+                dictName="计量单位"
+                clearable
+                v-model="form.measuringUnit"
+              >
+              </DictSelection>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="包装单位" prop="packingUnit">
+              <DictSelection
+                dictName="包装单位"
+                clearable
+                v-model="form.packingUnit"
+              >
+              </DictSelection>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="体积">
+              <div class="form-line">
+                <el-input v-model="form.volume" />
+                <DictSelection
+                  class="line-select"
+                  dictName="体积单位"
+                  clearable
+                  v-model="form.volumeUnit"
+                >
+                </DictSelection>
+              </div>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="毛重">
+              <div class="form-line">
+                <el-input v-model="form.roughWeight" />
+                <DictSelection
+                  class="line-select"
+                  dictName="重量单位"
+                  clearable
+                  v-model="form.weightUnit"
+                >
+                </DictSelection>
+              </div>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="净重">
+              <div class="form-line">
+                <el-input v-model="form.netWeight" />
+                <DictSelection
+                  class="line-select"
+                  dictName="重量单位"
+                  clearable
+                  v-model="form.weightUnit"
+                >
+                </DictSelection>
+              </div>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="所属部门">
+              <deptSelect
+                v-model="form.deptLeaderId"
+                @changeGroup="searchDeptNodeClick"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="负责人">
+              <personSelect
+                ref="directorRef"
+                v-model="form.deptId"
+                @selfChange="handleDirectorChange"
+                :init="false"
+              />
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </el-card>
+
+    <!-- 分类选择弹窗 -->
+    <CategoryDialog ref="categoryRefs" @chooseCategory="confirmCategory" />
+    <!-- 仓储配置 -->
+    <WarehouseInfo ref="warehouseRefs" :form="categoryWms" />
+    <!-- 生产信息 -->
+    <ProductionInfo ref="productionRefs" :form="categoryMes" />
+    <!-- 计划 -->
+    <PlanInfo ref="planRefs" :form="categoryAps" />
+    <!-- 质量配置 -->
+    <QualityInfo ref="qualityRefs" :form="categoryQms" />
+    <!-- 舟皿信息 -->
+    <BoatInfo ref="qualityRefs" :form="categoryPallet" />
+    <!-- 周转车信息 -->
+    <TurnoverInfo ref="turnoverRefs" :form="categoryVehicle" />
+    <!-- 模具信息 -->
+    <MoldInfo ref="moldRefs" :form="categoryMold" />
+    <!-- 备注信息 -->
+    <RemarkInfo ref="remarkRefs" :form="remarkform" />
+    <!-- 关联信息 -->
+    <linkMsg
+      ref="linkMsgRef"
+      :id="$route.query.id"
+      :categoryLevelId="form.categoryLevelId"
+      :categoryLevelGroupId = "form.categoryLevelGroupId"
+    />
+  </div>
+</template>
+
+<script>
+  import GroupDialog from '../manage/components/GroupDialog.vue';
+  import CategoryDialog from '../manage/components/CategoryDialog.vue';
+  import WarehouseInfo from '../manage/components/WarehouseInfo.vue';
+  import ProcureInfo from '../manage/components/ProcureInfo.vue';
+  import ProductionInfo from '../manage/components/ProductionInfo.vue';
+  import PlanInfo from '../manage/components/PlanInfo.vue';
+  import SalesInfo from '../manage/components/SalesInfo.vue';
+  import QualityInfo from '../manage/components/QualityInfo.vue';
+  import BoatInfo from '../manage/components/BoatInfo.vue';
+  import TurnoverInfo from '../manage/components/TurnoverInfo.vue';
+  import MoldInfo from '../manage/components/MoldInfo.vue';
+  import RemarkInfo from '../manage/components/RemarkInfo.vue';
+  import deptSelect from '@/components/CommomSelect/dept-select.vue';
+  import personSelect from '@/components/CommomSelect/person-select.vue';
+  import linkMsg from './components/link-msg.vue';
+  import { getDetails } from '@/api/classifyManage/itemInformation';
+  import { addMaterial } from '@/api/material/manage.js';
+  import { deepClone } from '@/utils/index';
+  import { finishPageTab, reloadPageTab } from '@/utils/page-tab-util';
+  export default {
+    name: 'ManageMaterial',
+    components: {
+      linkMsg,
+      GroupDialog,
+      deptSelect,
+      personSelect,
+      WarehouseInfo,
+      ProcureInfo,
+      ProductionInfo,
+      PlanInfo,
+      SalesInfo,
+      QualityInfo,
+      BoatInfo,
+      TurnoverInfo,
+      MoldInfo,
+      RemarkInfo,
+      CategoryDialog
+    },
+    data () {
+      return {
+        loading: false,
+        form: {
+          categoryLevelGroupName: '',
+          categoryLevelName: ''
+        },
+        remarkform: {
+          remarkAttach: []
+        },
+        categoryAps: {},
+        categoryMes: {},
+        categoryMold: {},
+        categoryPallet: {},
+        categoryQms: {},
+        categoryVehicle: {},
+        categoryWms: {},
+        // 表单验证规则
+        rules: {
+          categoryLevelGroupName: [
+            { required: true, message: '请选择所属物料组', trigger: 'change' }
+          ],
+          code: [{ required: true, message: '请输入编码', trigger: 'blur' }],
+          name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
+          categoryLevelName: [
+            { required: true, message: '请选择所属分类', trigger: 'change' }
+          ],
+          measuringUnit: [
+            { required: true, message: '请选择计量单位', trigger: 'change' }
+          ]
+        },
+        PathInfo: {},
+        id: null
+      };
+    },
+    created () {
+      this._getDetails();
+    },
+    methods: {
+      async _getDetails () {
+        const data = await getDetails(this.$route.query.id);
+        const info = deepClone(data);
+        this.form = {
+          ...info.category
+        };
+        this.judgeSet(info);
+        this.searchDeptNodeClick(this.form.deptLeaderId);
+      },
+      // 判断字段类型并赋值
+      judgeSet (info) {
+        if (typeof info.categoryAps == 'string') {
+          this.categoryAps = {};
+        } else {
+          this.categoryAps = info.categoryAps;
+        }
+        if (typeof info.categoryMes == 'string') {
+          this.categoryMes = {};
+        } else {
+          this.categoryMes = info.categoryMes;
+        }
+        if (typeof info.categoryMold == 'string') {
+          this.categoryMold = {};
+        } else {
+          this.categoryMold = info.categoryMold;
+        }
+        if (typeof info.categoryPallet == 'string') {
+          this.categoryPallet = {};
+        } else {
+          this.categoryPallet = info.categoryPallet;
+        }
+        if (typeof info.categoryQms == 'string') {
+          this.categoryQms = {};
+        } else {
+          this.categoryQms = info.categoryQms;
+        }
+        if (typeof info.categoryVehicle == 'string') {
+          this.categoryVehicle = {};
+        } else {
+          this.categoryVehicle = info.categoryVehicle;
+        }
+        if (typeof info.categoryWms == 'string') {
+          this.categoryWms = {};
+        } else {
+          this.categoryWms = info.categoryWms;
+        }
+      },
+      // 选择所属部门
+      searchDeptNodeClick (id, info) {
+        // 根据部门获取人员
+        const params = { executeGroupId: id };
+        this.$nextTick(() => {
+          this.$refs.directorRef.getList(params);
+        });
+      },
+      //选择负责人
+      handleDirectorChange (id, info) {},
+      // 确定分类
+      confirmCategory (node, title, PathInfo) {
+        if (title == '选择产品分类') {
+          this.$set(this.form, 'productCategoryLevelName', node.name);
+          this.$set(this.form, 'productCategoryLevelId', node.id);
+        } else {
+          this.$set(this.form, 'categoryLevelName', node.name);
+          this.$set(this.form, 'categoryLevelId', node.id);
+          this.$set(this.form, 'categoryLevelPath', node.name);
+          this.$set(this.form, 'categoryLevelPathId', node.id);
+          this.PathInfo = PathInfo;
+        }
+      },
+      openCategory () {
+        this.$refs.categoryRefs.open(this.form.categoryLevelId);
+      },
+      cancel () {
+        finishPageTab();
+        this.$router.go(-1);
+      },
+
+      // 保存
+      submit () {
+        this.$refs.manageForm.validate((valid) => {
+          if (!valid) {
+            return false;
+          }
+          this.loading = true;
+          // const imgList = this.remarkform.imgList;
+          // const arr = [];
+          // if (imgList.length) {
+          //   imgList.map((item) => {
+          //     arr.push(item.storePath);
+          //   });
+          //   this.form.remarkAttach = arr.join(',');
+          // }
+          // this.form.remark = this.remarkform.remark
+          //   ? this.remarkform.remark
+          //   : '';
+          const data = {
+            categoryWms: this.categoryWms,
+            categoryAps: this.categoryAps,
+            categoryMes: this.categoryMes,
+            categoryMold: this.categoryMold,
+            categoryPallet: this.categoryPallet,
+            categoryQms: this.categoryQms,
+            categoryVehicle: this.categoryVehicle,
+            category: {
+              ...this.form,
+              ...this.remarkform,
+              ...this.PathInfo
+            }
+          };
+          addMaterial(data)
+            .then((msg) => {
+              this.loading = false;
+              this.$message.success(msg);
+              finishPageTab();
+              reloadPageTab({ fullPath: '/material/product' });
+              this.$router.go(-1);
+            })
+            .catch((e) => {
+              this.loading = false;
+            });
+        });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .ele-page-header {
+    border: none;
+  }
+  .body-top {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    background: #fff;
+    .top-left {
+      display: flex;
+      align-items: center;
+      justify-content: flex-start;
+      margin-left: -25px;
+      .el-form-item {
+        margin-bottom: 0;
+      }
+    }
+  }
+  .divider {
+    margin: 20px 0;
+    .title {
+      display: flex;
+      align-items: center;
+      margin-bottom: 10px;
+      div {
+        width: 8px;
+        height: 20px;
+        margin-right: 10px;
+      }
+      span {
+        font-size: 20px;
+      }
+    }
+    .ele-width {
+      width: 100%;
+      height: 2px;
+    }
+  }
+  .form-line {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .line-select {
+      margin-left: 15px;
+    }
+  }
+</style>

+ 165 - 0
src/views/material/product copy/index.vue

@@ -0,0 +1,165 @@
+<template>
+  <div class="ele-body">
+    <el-card shadow="never">
+      <ProductSearch @search="reload" />
+      <ele-split-layout
+        width="244px"
+        allow-collapse
+        :right-style="{ overflow: 'hidden' }"
+      >
+        <div class="ele-border-lighter split-layout-right-content">
+          <AssetTree
+            ref="assetTreeRef"
+            type="1"
+            @handleNodeClick="handleNodeClick"
+          />
+        </div>
+        <!-- 表格 -->
+        <template v-slot:content>
+          <ele-pro-table
+            ref="table"
+            :columns="columns"
+            :datasource="datasource"
+            height="calc(100vh - 350px)"
+            class="dict-table"
+          >
+            <!-- 表头工具栏 -->
+            <template v-slot:action="{ row }">
+               <el-link
+                type="primary"
+                :underline="false"
+                icon="el-icon-edit"
+                @click="handleEdit(row)"
+              >
+                修改
+              </el-link> 
+            </template>
+          </ele-pro-table>
+        </template>
+      </ele-split-layout>
+    </el-card>
+  </div>
+</template>
+
+<script>
+  import AssetTree from '@/components/AssetTree/group.vue';
+  import ProductSearch from './components/product-search.vue';
+  import { getList } from '@/api/classifyManage/itemInformation';
+
+  export default {
+    name: 'SystemDictionary',
+    components: { AssetTree, ProductSearch },
+    data () {
+      return {
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'index',
+            type: 'index',
+            width: 55,
+            align: 'center',
+            reserveSelection: true,
+            label: '序号',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'code',
+            label: '产品编码',
+            minWidth: 100
+          },
+          {
+            prop: 'name',
+            label: '产品名称',
+            showOverflowTooltip: true,
+            minWidth: 130
+          },
+
+          {
+            prop: 'categoryLevelGroupCode',
+            label: '物料组编码',
+            showOverflowTooltip: true,
+            width: 100
+          },
+
+          {
+            prop: 'brandNum',
+            label: '牌号',
+            width: 70
+          },
+          {
+            prop: 'modelType',
+            label: '型号',
+            minWidth: 130
+          },
+          {
+            prop: 'measuringUnit',
+            label: '计量单位',
+            width: 80
+          },
+          {
+            prop: 'weightUnit',
+            label: '重量单位',
+            width: 80
+          },
+
+          {
+            prop: 'roughWeight',
+            label: '毛重',
+            width: 100
+        
+          },
+
+          {
+            prop: 'netWeight',
+            label: '净重',
+            width: 100
+       
+          },
+
+          {
+            prop: 'packingUnit',
+            label: '包装单位',
+            width: 80
+          },
+          {
+            action: 'action',
+            slot: 'action',
+            label: '操作'
+          }
+        ],
+        categoryLevelId: '9'
+      };
+    },
+
+    methods: {
+      /* 表格数据源 */
+      datasource ({ page, where, limit }) {
+        return getList({
+          ...where,
+          pageNum: page,
+          size: limit,
+          isProduct: true,
+          categoryLevelId: this.categoryLevelId
+        });
+      },
+      handleNodeClick (data) {
+        this.categoryLevelId = data.id;
+        this.reload();
+      },
+      /* 刷新表格 */
+      reload (where) {
+        this.$refs.table.reload({ where });
+      },
+      handleEdit ({ id }) {
+        this.$router.push({
+          path: '/material/product/detail',
+          query: {
+            id
+          }
+        });
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped></style>

+ 105 - 0
src/views/material/product/components/BoatInfo.vue

@@ -0,0 +1,105 @@
+<template>
+  <div class="other">
+      <el-form label-width="120px"  ref="form" :model="form">
+         <div class="divider">
+           <div class="title">
+             <div class="ele-bg-primary"></div>
+             <span>舟皿信息</span>
+           </div>
+           <div class="ele-bg-primary ele-width"></div>
+         </div>
+         <el-row :gutter="24">
+           <el-col :span="8">
+             <el-form-item label="槽数" prop="slotNum">
+                <el-input  v-model="form.slotNum"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="角度" prop="angle">
+                <DictSelection dictName="角度" clearable v-model="form.angle">
+                </DictSelection>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="长" prop="palletLen">
+                <el-input v-model="form.palletLen">
+                    <template slot="append">mm</template>
+                </el-input>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="宽" prop="wilde">
+                <el-input v-model="form.wilde">
+                    <template slot="append">mm</template>
+                </el-input>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="高" prop="hight">
+                <el-input v-model="form.hight">
+                    <template slot="append">mm</template>
+                </el-input>
+             </el-form-item>
+           </el-col>
+         </el-row>
+      </el-form>
+  </div>
+</template>
+
+<script>
+  export default {
+    props: {
+      form: {
+        type: Object,
+        default: {}
+      }
+    },
+    components: { },
+    data() {
+      return {
+
+
+      };
+    },
+
+    methods: {
+
+
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .other{
+    background: #fff;
+    padding: 1px 17px;
+  }
+  .divider {
+    margin: 0px 0 20px;
+    .title {
+      display: flex;
+      align-items: center;
+      margin-bottom: 10px;
+      div {
+        width: 8px;
+        height: 20px;
+        margin-right: 10px;
+      }
+      span {
+        font-size: 20px;
+      }
+    }
+    .ele-width{
+      width: 100%;
+      height: 2px;
+    }
+  }
+  .form-line{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .line-select{
+      margin-left:15px;
+    }
+  }
+</style>

+ 125 - 0
src/views/material/product/components/CategoryDialog.vue

@@ -0,0 +1,125 @@
+<template>
+  <ele-modal
+    :title="title"
+    :visible.sync="treeVisible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="40%"
+  >
+    <div class="ele-border-lighter sys-organization-list">
+      <el-tree
+        ref="tree"
+        :data="treeData"
+        highlight-current
+        node-key="id"
+        :props="{ label: 'name' }"
+        :expand-on-click-node="false"
+        :default-expand-all="true"
+        @node-click="onNodeClick"
+      />
+    </div>
+    <template v-slot:footer>
+      <el-button @click="handleClose">关闭</el-button>
+      <el-button type="primary" @click="selected">选择</el-button>
+    </template>
+  </ele-modal>
+</template>
+
+<script>
+ import { getTreeByPid } from '@/api/material/manage.js'
+export default {
+  data () {
+    return {
+      treeVisible: false,
+      treeData: [],
+      current:null,
+      title:'选择分类',
+      pathList:[]
+    }
+  },
+
+  watch: {
+
+  },
+  methods: {
+    open(pid,title){
+      this.treeVisible = true
+      this.title = title
+      this.getTree(pid)
+    },
+    handleClose () {
+      this.treeVisible = false
+      this.current = null
+    },
+    getTree(pid){
+      getTreeByPid(pid).then(res=>{
+         this.treeData = res
+      })
+    },
+    onNodeClick(node){
+       this.current = node
+    },
+    selected(){
+       if(!this.current){
+         return this.$message.warning(`请${this.title}`)
+       }
+       this.pathList = this.findParent([],this.current,this.treeData)
+       this.pathList.unshift(this.current)
+       const PathInfo = {
+         categoryLevelPath:'',
+         categoryLevelPathId:[]
+       }
+       const pathName = []
+       this.pathList.map(item=>{
+          pathName.unshift(item.name)
+          PathInfo.categoryLevelPathId.unshift(item.id)
+       })
+       PathInfo.categoryLevelPath = pathName.join('-')
+       PathInfo.categoryLevelPathId = PathInfo.categoryLevelPathId.join(',')
+       this.$emit('chooseCategory',this.current,this.title,PathInfo)
+       this.handleClose()
+    },
+
+    // parents:用于返回的数组,childNode:要查询的节点,treeData:json树形数据
+    findParent (parents, childNode, treeData) {
+      for (let i = 0; i < treeData.length; i++) {
+        // 父节点查询条件
+        if (treeData[i].id === childNode.parentId) {
+          // 如果找到结果,保存当前节点
+          parents.push(treeData[i])
+          // 用当前节点再去原数据查找当前节点的父节点
+          this.findParent(parents, treeData[i],this.treeData)
+          break
+        } else {
+          if (treeData[i].children instanceof Array) {
+            //	没找到,遍历该节点的子节点
+            this.findParent(parents, childNode, treeData[i].children)
+          }
+        }
+      }
+      return parents
+    }
+
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+  .sys-organization-list {
+    height: calc(100vh - 264px);
+    box-sizing: border-box;
+    border-width: 1px;
+    border-style: solid;
+    overflow: auto;
+  }
+
+  .sys-organization-list :deep(.el-tree-node__content) {
+    height: 40px;
+
+    & > .el-tree-node__expand-icon {
+      margin-left: 10px;
+    }
+  }
+</style>

+ 151 - 0
src/views/material/product/components/GroupDialog.vue

@@ -0,0 +1,151 @@
+<template>
+  <el-dialog
+    title="选择物料组"
+    :visible.sync="groupVisible"
+    :before-close="handleClose"
+    :close-on-click-modal="false"
+    :close-on-press-escape="false"
+    append-to-body
+    width="60%"
+  >
+    <div>
+      <el-row>
+        <el-col :span="24" class="table_col">
+          <el-table
+            :data="tableData"
+            height="450"
+            highlight-current-row
+            @row-click="single"
+          >
+            <el-table-column label="物料组名称" prop="name" width="200"></el-table-column>
+            <el-table-column label="物料组编码" prop="code"></el-table-column>
+            <el-table-column label="分类树" prop="categoryLevelRootName">
+               <template slot-scope="scope">
+                   {{scope.row.categoryLevelRootName+'分类'}}
+               </template>
+            </el-table-column>
+            <el-table-column label="选择" align="center">
+               <template slot-scope="scope">
+            	   <el-radio class="radio" v-model="radio" :label="scope.row.id"><i></i></el-radio>
+               </template>
+            </el-table-column>
+          </el-table>
+         <div class="pagination">
+            <el-pagination
+              background
+              layout="total, sizes, prev, pager, next, jumper"
+              :total="total"
+              :page-sizes="[10, 20, 50, 100]"
+              :page-size="pagination.size"
+              :current-page.sync="pagination.pageNum"
+              @current-change="handleCurrent"
+              @size-change="handleSize"
+            >
+            </el-pagination>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+    <div class="btns">
+      <el-button type="primary" size="small" @click="selected">选择</el-button>
+      <el-button size="small" @click="handleClose">关闭</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+ import { getGroupPage } from '@/api/material/list';
+export default {
+  data () {
+    return {
+      groupVisible: false,
+      tableData: [],
+      search:{},
+      pagination: {
+        pageNum: 1,
+        size: 10,
+      },
+      total: 0,
+      radio: '',
+      current:null
+    }
+  },
+
+  watch: {
+
+  },
+  methods: {
+    open(item){
+      if(item){
+        this.current = item
+        this.radio = item.id
+      }
+      this.groupVisible = true
+      this.getList()
+    },
+
+    // 单击获取id
+    single (row) {
+        this.current = row
+        this.radio = row.id
+    },
+
+    handleClose () {
+      this.groupVisible = false
+      this.current = null
+      this.radio = ''
+    },
+    handleCurrent (page) {
+      this.pagination.pageNum = page
+      this.getList()
+    },
+    handleSize (size) {
+      this.pagination.pageNum = 1
+      this.pagination.size = size
+      this.getList()
+    },
+    getList(){
+      let params = {...this.pagination}
+      getGroupPage(params).then(res=>{
+         this.tableData = res.list
+         this.total = res.count
+      })
+    },
+    selected(){
+       if(!this.current){
+         return this.$message.warning('请选择物料组')
+       }
+       this.$emit('changeMaterial',this.current)
+       this.handleClose()
+    },
+
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.tree_col {
+  border: 1px solid #eee;
+  padding: 10px 0;
+  box-sizing: border-box;
+  height: 500px;
+  overflow: auto;
+}
+.table_col {
+  padding-left: 10px;
+  ::v-deep .el-table th.el-table__cell {
+    background: #f2f2f2;
+  }
+}
+.pagination {
+  text-align: right;
+  padding: 10px 0;
+}
+.btns {
+  text-align: center;
+  padding: 10px 0;
+}
+.topsearch{
+	margin-bottom:15px;
+}
+</style>

+ 114 - 0
src/views/material/product/components/MoldInfo.vue

@@ -0,0 +1,114 @@
+<template>
+  <div class="other">
+      <el-form label-width="120px"  ref="form" :model="form">
+         <div class="divider">
+           <div class="title">
+             <div class="ele-bg-primary"></div>
+             <span>模具信息</span>
+           </div>
+           <div class="ele-bg-primary ele-width"></div>
+         </div>
+         <el-row :gutter="24">
+           <el-col :span="8">
+             <el-form-item label="收缩系数" prop="shrinkEffictive">
+                <el-input  v-model="form.shrinkEffictive"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="芯杆数量" prop="coreBarNum">
+                <el-input  v-model="form.coreBarNum"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="模孔数量" prop="dieHoleNum">
+                <el-input v-model="form.dieHoleNum">
+                </el-input>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="上冲头数量" prop="upperPunchNum">
+                <el-input v-model="form.upperPunchNum">
+                </el-input>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="下冲头数量" prop="downPunchNum">
+                <el-input v-model="form.downPunchNum">
+                </el-input>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="最大冲压次数" prop="maxCyTimes">
+                <el-input v-model="form.maxCyTimes">
+                </el-input>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="大模体型号" prop="maxMoldType">
+                <el-input v-model="form.maxMoldType">
+                </el-input>
+             </el-form-item>
+           </el-col>
+
+         </el-row>
+      </el-form>
+  </div>
+</template>
+
+<script>
+  export default {
+    props: {
+      form: {
+        type: Object,
+        default: {}
+      }
+    },
+    components: { },
+    data() {
+      return {
+
+
+      };
+    },
+
+    methods: {
+
+
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .other{
+    background: #fff;
+    padding: 1px 17px;
+  }
+  .divider {
+    margin: 0px 0 20px;
+    .title {
+      display: flex;
+      align-items: center;
+      margin-bottom: 10px;
+      div {
+        width: 8px;
+        height: 20px;
+        margin-right: 10px;
+      }
+      span {
+        font-size: 20px;
+      }
+    }
+    .ele-width{
+      width: 100%;
+      height: 2px;
+    }
+  }
+  .form-line{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .line-select{
+      margin-left:15px;
+    }
+  }
+</style>

+ 124 - 0
src/views/material/product/components/PlanInfo.vue

@@ -0,0 +1,124 @@
+<template>
+  <div class="other">
+      <el-form label-width="120px"  ref="form" :model="form">
+         <div class="divider">
+           <div class="title">
+             <div class="ele-bg-primary"></div>
+             <span>计划</span>
+           </div>
+           <div class="ele-bg-primary ele-width"></div>
+         </div>
+         <el-row :gutter="24">
+           <el-col :span="8">
+             <el-form-item label="固定提前期" prop="fixLeadTime">
+                <el-input  v-model="form.fixLeadTime" @input="inputFix"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="变动提前期" prop="changeLeadTime">
+                <el-input  v-model="form.changeLeadTime" @input="inputChange"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="检验提前期" prop="checkLeadTime">
+                <el-input  v-model="form.checkLeadTime" @input="inputCheck"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="累计提前期" prop="cumLeadTime">
+                <el-input  v-model="form.cumLeadTime" readonly/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="提前期单位" prop="unit">
+                <DictSelection dictName="提前期单位" clearable v-model="form.unit">
+                </DictSelection>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="订货间隔期" prop="scheduleType">
+                <div class="form-line">
+                  <el-input  v-model="form.orderIntervalTime"/>
+                  <DictSelection class="line-select" dictName="提前期单位" clearable v-model="form.orderIntervalUnit">
+                  </DictSelection>
+                </div>
+             </el-form-item>
+           </el-col>
+         </el-row>
+      </el-form>
+  </div>
+</template>
+
+<script>
+  export default {
+    props: {
+      form: {
+        type: Object,
+        default: {}
+      }
+    },
+    components: { },
+    data() {
+      return {
+
+
+      };
+    },
+
+    methods: {
+      inputFix(val){
+         const  changeLeadTime = this.form.changeLeadTime?Number(this.form.changeLeadTime):0
+         const  checkLeadTime = this.form.checkLeadTime?Number(this.form.checkLeadTime):0
+         val = val?Number(val):0
+         this.form.cumLeadTime = val + changeLeadTime  + checkLeadTime
+      },
+      inputChange(val){
+        const  fixLeadTime = this.form.fixLeadTime?Number(this.form.fixLeadTime):0
+        const  checkLeadTime = this.form.checkLeadTime?Number(this.form.checkLeadTime):0
+        val = val?Number(val):0
+         this.form.cumLeadTime = val + fixLeadTime  + checkLeadTime
+      },
+      inputCheck(val){
+          const  fixLeadTime = this.form.fixLeadTime?Number(this.form.fixLeadTime):0
+          const  changeLeadTime = this.form.changeLeadTime?Number(this.form.changeLeadTime):0
+          val = val?Number(val):0
+         this.form.cumLeadTime = val + fixLeadTime  + changeLeadTime
+      }
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .other{
+    background: #fff;
+    padding: 1px 17px;
+  }
+  .divider {
+    margin: 0px 0 20px;
+    .title {
+      display: flex;
+      align-items: center;
+      margin-bottom: 10px;
+      div {
+        width: 8px;
+        height: 20px;
+        margin-right: 10px;
+      }
+      span {
+        font-size: 20px;
+      }
+    }
+    .ele-width{
+      width: 100%;
+      height: 2px;
+    }
+  }
+  .form-line{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .line-select{
+      margin-left:15px;
+    }
+  }
+</style>

+ 183 - 0
src/views/material/product/components/ProcureInfo.vue

@@ -0,0 +1,183 @@
+<template>
+  <div class="other">
+      <el-form label-width="120px"  ref="form" :model="form">
+         <div class="divider">
+           <div class="title">
+             <div class="ele-bg-primary"></div>
+             <span>采购</span>
+           </div>
+           <div class="ele-bg-primary ele-width"></div>
+         </div>
+         <el-row :gutter="24">
+           <el-col :span="8">
+             <el-form-item label="采购单位">
+                <el-input  v-model="form.procureUnit"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="计价单位">
+                <el-input  v-model="form.priceUnit"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="采购组织" prop="procureGroup">
+               <deptSelect v-model="form.procureGroup" @changeGroup="searchDeptNodeClick"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="采购员" prop="purchaserId">
+               <personSelect
+                 ref="directorRef"
+                 v-model="form.purchaserId"
+                 @selfChange="handleDirectorChange"
+                 :init="false"
+               />
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="默认供应商" prop="supplier">
+                <el-input  v-model="form.supplier"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="允许退料" prop="isReturn">
+               <el-radio v-model="form.isReturn" label="1">是</el-radio>
+               <el-radio v-model="form.isReturn" label="0">否</el-radio>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="是否请购" prop="isApplay" >
+                <el-radio v-model="form.isApplay" label="1">是</el-radio>
+                <el-radio v-model="form.isApplay" label="0">否</el-radio>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="货源控制" prop="isControl">
+                <el-radio v-model="form.isControl" label="1">是</el-radio>
+                <el-radio v-model="form.isControl" label="0">否</el-radio>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="收货上限比例" prop="upperLimit">
+                <el-input v-model="form.upperLimit">
+                    <template slot="append">%</template>
+                </el-input>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="收货提前天数" prop="earlyDays">
+                <el-input  v-model="form.earlyDays"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="收货延迟天数" prop="delayDays">
+                <el-input  v-model="form.delayDays"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="收货下限比例" prop="lowerLimit">
+                <el-input v-model="form.lowerLimit">
+                    <template slot="append">%</template>
+                </el-input>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="默认条码规则" prop="earlyDays">
+                <el-input  v-model="form.earlyDays"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="最小包装数" prop="earlyDays">
+                <el-input  v-model="form.earlyDays"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="重复打印数" prop="earlyDays">
+                <el-input  v-model="form.earlyDays"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="委外单位" prop="earlyDays">
+                <el-input  v-model="form.earlyDays"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="委外计价单位" prop="earlyDays">
+                <el-input  v-model="form.earlyDays"/>
+             </el-form-item>
+           </el-col>
+         </el-row>
+      </el-form>
+  </div>
+</template>
+
+<script>
+  import deptSelect from '@/components/CommomSelect/dept-select.vue'
+  import personSelect from '@/components/CommomSelect/person-select.vue';
+  export default {
+    props: {
+      form: {
+        type: Object,
+        default: {}
+      }
+    },
+    components: { deptSelect , personSelect },
+    data() {
+      return {
+
+
+      };
+    },
+
+    methods: {
+      // 选择所属部门
+      searchDeptNodeClick (id, info) {
+        // 根据部门获取人员
+        const params = { executeGroupId: id };
+        this.$nextTick(() => {
+          this.$refs.directorRef.getList(params);
+        });
+      },
+      //选择负责人
+      handleDirectorChange (id, info) {
+      },
+
+
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .other{
+    background: #fff;
+    padding: 1px 17px;
+  }
+  .divider {
+    margin: 0px 0 20px;
+    .title {
+      display: flex;
+      align-items: center;
+      margin-bottom: 10px;
+      div {
+        width: 8px;
+        height: 20px;
+        margin-right: 10px;
+      }
+      span {
+        font-size: 20px;
+      }
+    }
+    .ele-width{
+      width: 100%;
+      height: 2px;
+    }
+  }
+  .form-line{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .line-select{
+      margin-left:15px;
+    }
+  }
+</style>

+ 153 - 0
src/views/material/product/components/ProductionInfo.vue

@@ -0,0 +1,153 @@
+<template>
+  <div class="other">
+      <el-form label-width="120px"  ref="form" :model="form">
+         <div class="divider">
+           <div class="title">
+             <div class="ele-bg-primary"></div>
+             <span>生产信息</span>
+           </div>
+           <div class="ele-bg-primary ele-width"></div>
+         </div>
+         <el-row :gutter="24">
+           <el-col :span="8">
+             <el-form-item label="是否齐套件">
+                <el-radio v-model="form.isCompleteSet" :label="1">是</el-radio>
+                <el-radio v-model="form.isCompleteSet" :label="0">否</el-radio>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="消耗波动" prop="consumWave">
+                <el-input v-model="form.consumWave">
+                    <template slot="append">%</template>
+                </el-input>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="变动损耗率" prop="changeLossRate">
+                <el-input v-model="form.changeLossRate">
+                    <template slot="append">%</template>
+                </el-input>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="固定损耗数" prop="fixLossNum">
+                <el-input  v-model="form.fixLossNum"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="排程类型" prop="apsType">
+                <DictSelection dictName="排程类型" clearable v-model="form.apsType">
+                </DictSelection>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="允许改型" prop="isModify">
+               <el-radio v-model="form.isModify" :label="1">是</el-radio>
+               <el-radio v-model="form.isModify" :label="0">否</el-radio>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="允许返工返修" prop="isRework">
+               <el-radio v-model="form.isRework" :label="1">是</el-radio>
+               <el-radio v-model="form.isRework" :label="0">否</el-radio>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="是否返回料" prop="isRematerial">
+               <el-radio v-model="form.isRematerial" :label="1">是</el-radio>
+               <el-radio v-model="form.isRematerial" :label="0">否</el-radio>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="是否副产品" prop="isByProduct">
+               <el-radio v-model="form.isByProduct" :label="1">是</el-radio>
+               <el-radio v-model="form.isByProduct" :label="0">否</el-radio>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="是否废品" prop="isWaste">
+               <el-radio v-model="form.isWaste" :label="1">是</el-radio>
+               <el-radio v-model="form.isWaste" :label="0">否</el-radio>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="是否不良品" prop="isDefective">
+               <el-radio v-model="form.isDefective" :label="1">是</el-radio>
+               <el-radio v-model="form.isDefective" :label="0">否</el-radio>
+             </el-form-item>
+           </el-col>
+         </el-row>
+      </el-form>
+  </div>
+</template>
+
+<script>
+  import deptSelect from '@/components/CommomSelect/dept-select.vue'
+  import personSelect from '@/components/CommomSelect/person-select.vue';
+  export default {
+    props: {
+      form: {
+        type: Object,
+        default: {}
+      }
+    },
+    components: { deptSelect , personSelect },
+    data() {
+      return {
+
+
+      };
+    },
+
+    methods: {
+      // 选择所属部门
+      searchDeptNodeClick (id, info) {
+        // 根据部门获取人员
+        const params = { executeGroupId: id };
+        this.$nextTick(() => {
+          this.$refs.directorRef.getList(params);
+        });
+      },
+      //选择负责人
+      handleDirectorChange (id, info) {
+      },
+
+
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .other{
+    background: #fff;
+    padding: 1px 17px;
+  }
+  .divider {
+    margin: 0px 0 20px;
+    .title {
+      display: flex;
+      align-items: center;
+      margin-bottom: 10px;
+      div {
+        width: 8px;
+        height: 20px;
+        margin-right: 10px;
+      }
+      span {
+        font-size: 20px;
+      }
+    }
+    .ele-width{
+      width: 100%;
+      height: 2px;
+    }
+  }
+  .form-line{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .line-select{
+      margin-left:15px;
+    }
+  }
+</style>

+ 120 - 0
src/views/material/product/components/QualityInfo.vue

@@ -0,0 +1,120 @@
+<template>
+  <div class="other">
+      <el-form label-width="120px"  ref="form" :model="form">
+         <div class="divider">
+           <div class="title">
+             <div class="ele-bg-primary"></div>
+             <span>质量配置</span>
+           </div>
+           <div class="ele-bg-primary ele-width"></div>
+         </div>
+         <el-row :gutter="24">
+           <el-col :span="8">
+             <el-form-item label="是否来料检验" prop="isComeCheck">
+                 <el-radio v-model="form.isComeCheck" :label="1">是</el-radio>
+                 <el-radio v-model="form.isComeCheck" :label="0">否</el-radio>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="检验方案" prop="checkFormula">
+                <DictSelection dictName="检验方案" clearable v-model="form.checkFormula">
+                </DictSelection>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="采购组织" prop="checkDepart">
+               <deptSelect v-model="form.checkDepart" @changeGroup="searchDeptNodeClick"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="采购员" prop="checkPerson">
+               <personSelect
+                 ref="directorRef"
+                 v-model="form.checkPerson"
+                 @selfChange="handleDirectorChange"
+                 :init="false"
+               />
+             </el-form-item>
+           </el-col>
+         </el-row>
+      </el-form>
+  </div>
+</template>
+
+<script>
+  import deptSelect from '@/components/CommomSelect/dept-select.vue'
+  import personSelect from '@/components/CommomSelect/person-select.vue';
+  export default {
+    props: {
+      form: {
+        type: Object,
+        default: {}
+      }
+    },
+    components: { deptSelect , personSelect },
+    data() {
+      return {
+      };
+    },
+    watch: {
+      form(data) {
+        if (data.checkDepart) {
+           const params = { executeGroupId: data.checkDepart };
+            this.$nextTick(() => {
+              this.$refs.directorRef.getList(params);
+            });
+        }
+      }
+    },
+    methods: {
+      // 选择所属部门
+      searchDeptNodeClick (id, info) {
+        // 根据部门获取人员
+        const params = { executeGroupId: id };
+        this.$nextTick(() => {
+          this.$refs.directorRef.getList(params);
+        });
+      },
+      //选择负责人
+      handleDirectorChange (id, info) {
+      },
+
+
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .other{
+    background: #fff;
+    padding: 1px 17px;
+  }
+  .divider {
+    margin: 0px 0 20px;
+    .title {
+      display: flex;
+      align-items: center;
+      margin-bottom: 10px;
+      div {
+        width: 8px;
+        height: 20px;
+        margin-right: 10px;
+      }
+      span {
+        font-size: 20px;
+      }
+    }
+    .ele-width{
+      width: 100%;
+      height: 2px;
+    }
+  }
+  .form-line{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .line-select{
+      margin-left:15px;
+    }
+  }
+</style>

+ 77 - 0
src/views/material/product/components/RemarkInfo.vue

@@ -0,0 +1,77 @@
+<template>
+  <div class="other">
+    <el-form label-width="120px"  ref="form" :model="form">
+         <div class="divider">
+           <div class="title">
+             <div class="ele-bg-primary"></div>
+             <span>备注信息</span>
+           </div>
+           <div class="ele-bg-primary ele-width"></div>
+         </div>
+         <el-row :gutter="24">
+           <el-col :span="24">
+             <el-form-item label="附件" prop="allowReturns">
+                 <fileUpload v-model="form.remarkAttach" module="file" :limit="4" ></fileUpload>
+             </el-form-item>
+           </el-col>
+           <el-col :span="24">
+             <el-form-item label="备注" prop="remark">
+                <el-input  v-model="form.remark" type="textarea" :row="5" resize="none"/>
+             </el-form-item>
+           </el-col>
+         </el-row>
+      </el-form>
+  </div>
+</template>
+
+<script>
+  import fileUpload from '@/components/upload/fileUpload';
+  export default {
+    props: {
+      form: {
+        type: Object,
+        default: {}
+      }
+    },
+    components: { fileUpload },
+    data () {
+      return {};
+    },
+    methods: {}
+  };
+</script>
+
+<style lang="scss" scoped>
+  .other {
+    background: #fff;
+    padding: 1px 17px;
+  }
+  .divider {
+    margin: 0px 0 20px;
+    .title {
+      display: flex;
+      align-items: center;
+      margin-bottom: 10px;
+      div {
+        width: 8px;
+        height: 20px;
+        margin-right: 10px;
+      }
+      span {
+        font-size: 20px;
+      }
+    }
+    .ele-width {
+      width: 100%;
+      height: 2px;
+    }
+  }
+  .form-line {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .line-select {
+      margin-left: 15px;
+    }
+  }
+</style>

+ 113 - 0
src/views/material/product/components/SalesInfo.vue

@@ -0,0 +1,113 @@
+<template>
+  <div class="other">
+      <el-form label-width="120px"  ref="form" :model="form">
+         <div class="divider">
+           <div class="title">
+             <div class="ele-bg-primary"></div>
+             <span>销售信息</span>
+           </div>
+           <div class="ele-bg-primary ele-width"></div>
+         </div>
+         <el-row :gutter="24">
+           <el-col :span="8">
+             <el-form-item label="允许退货" prop="allowReturns">
+                 <el-radio v-model="form.allowReturns" label="1">是</el-radio>
+                 <el-radio v-model="form.allowReturns" label="0">否</el-radio>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="计价单位" prop="lossRate">
+                <DictSelection dictName="重量单位" clearable v-model="form.scheduleType">
+                </DictSelection>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="起订量" prop="fixedNum">
+                <el-input  v-model="form.fixedNum"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="超发上限" prop="fixedNum">
+                <el-input v-model="form.lossRate">
+                    <template slot="append">%</template>
+                </el-input>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="超发下限" prop="consumeWave">
+                <el-input v-model="form.lossRate">
+                    <template slot="append">%</template>
+                </el-input>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="参考单价" prop="scheduleType">
+                <div class="form-line">
+                  <el-input  v-model="form.date"/>
+                  <DictSelection class="line-select" dictName="价格单位" clearable v-model="form.dateUnit">
+                  </DictSelection>
+                </div>
+             </el-form-item>
+           </el-col>
+         </el-row>
+      </el-form>
+  </div>
+</template>
+
+<script>
+  export default {
+    props: {
+      form: {
+        type: Object,
+        default: {}
+      }
+    },
+    components: { },
+    data() {
+      return {
+
+
+      };
+    },
+
+    methods: {
+
+
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .other{
+    background: #fff;
+    padding: 1px 17px;
+  }
+  .divider {
+    margin: 0px 0 20px;
+    .title {
+      display: flex;
+      align-items: center;
+      margin-bottom: 10px;
+      div {
+        width: 8px;
+        height: 20px;
+        margin-right: 10px;
+      }
+      span {
+        font-size: 20px;
+      }
+    }
+    .ele-width{
+      width: 100%;
+      height: 2px;
+    }
+  }
+  .form-line{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .line-select{
+      margin-left:15px;
+    }
+  }
+</style>

+ 104 - 0
src/views/material/product/components/TurnoverInfo.vue

@@ -0,0 +1,104 @@
+<template>
+  <div class="other">
+    <el-form label-width="120px" ref="form" :model="form">
+      <div class="divider">
+        <div class="title">
+          <div class="ele-bg-primary"></div>
+          <span>周转车信息</span>
+        </div>
+        <div class="ele-bg-primary ele-width"></div>
+      </div>
+      <el-row :gutter="24">
+        <el-col :span="8">
+          <el-form-item label="层数" prop="levelNum">
+            <el-input v-model="form.levelNum" />
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="材质" prop="materialQuality">
+            <DictSelection
+              dictName="周转车材质"
+              clearable
+              v-model="form.materialQuality"
+            >
+            </DictSelection>
+            <!-- <el-input  v-model="form.materialQuality"/> -->
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="长" prop="vehicleLen">
+            <el-input v-model="form.vehicleLen">
+              <template slot="append">mm</template>
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="宽" prop="wilde">
+            <el-input v-model="form.wilde">
+              <template slot="append">mm</template>
+            </el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :span="8">
+          <el-form-item label="高" prop="hight">
+            <el-input v-model="form.hight">
+              <template slot="append">mm</template>
+            </el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+  </div>
+</template>
+
+<script>
+  export default {
+    props: {
+      form: {
+        type: Object,
+        default: {}
+      }
+    },
+    components: {},
+    data () {
+      return {};
+    },
+
+    methods: {}
+  };
+</script>
+
+<style lang="scss" scoped>
+  .other {
+    background: #fff;
+    padding: 1px 17px;
+  }
+  .divider {
+    margin: 0px 0 20px;
+    .title {
+      display: flex;
+      align-items: center;
+      margin-bottom: 10px;
+      div {
+        width: 8px;
+        height: 20px;
+        margin-right: 10px;
+      }
+      span {
+        font-size: 20px;
+      }
+    }
+    .ele-width {
+      width: 100%;
+      height: 2px;
+    }
+  }
+  .form-line {
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .line-select {
+      margin-left: 15px;
+    }
+  }
+</style>

+ 133 - 0
src/views/material/product/components/WarehouseInfo.vue

@@ -0,0 +1,133 @@
+<template>
+  <div class="other">
+      <el-form label-width="120px"  ref="form" :model="form">
+         <div class="divider">
+           <div class="title">
+             <div class="ele-bg-primary"></div>
+             <span>仓储配置</span>
+           </div>
+           <div class="ele-bg-primary ele-width"></div>
+         </div>
+         <el-row :gutter="24">
+           <el-col :span="8">
+             <el-form-item label="启用库存预警">
+                <el-radio v-model="form.isWarn" :label="1">是</el-radio>
+                <el-radio v-model="form.isWarn" :label="0">否</el-radio>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="允许拆包" prop="isUnpack">
+                <el-switch v-model="form.isUnpack" :active-value="1" :inactive-value="0"> </el-switch>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="安全库存" prop="secureInventory">
+                <el-input  v-model="form.secureInventory"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="最小库存" prop="minInventory">
+                <el-input  v-model="form.minInventory"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="最大库存" prop="maxInventory">
+                <el-input  v-model="form.maxInventory"/>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="盘点模式" prop="inventoryMode">
+               <el-radio v-model="form.inventoryMode" :label="1">逐个盘点</el-radio>
+               <el-radio v-model="form.inventoryMode" :label="2">批量盘点</el-radio>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="质保预警参考" prop="warrantyWarnRefer">
+                <DictSelection dictName="质保预警参考" clearable v-model="form.warrantyWarnRefer">
+                </DictSelection>
+             </el-form-item>
+           </el-col>
+           <el-col :span="8">
+             <el-form-item label="保质期">
+                <div class="form-line">
+                  <el-input  v-model="form.warrantyPeriod"/>
+                  <DictSelection class="line-select" dictName="保质期单位" clearable v-model="form.warrantyPeriodUnit">
+                  </DictSelection>
+                </div>
+             </el-form-item>
+           </el-col>
+         </el-row>
+      </el-form>
+  </div>
+</template>
+
+<script>
+  import deptSelect from '@/components/CommomSelect/dept-select.vue'
+  import personSelect from '@/components/CommomSelect/person-select.vue';
+  export default {
+    props: {
+      form: {
+        type: Object,
+        default: {}
+      }
+    },
+    components: { deptSelect , personSelect },
+    data() {
+      return {
+
+
+      };
+    },
+
+    methods: {
+      // 选择所属部门
+      searchDeptNodeClick (id, info) {
+        // 根据部门获取人员
+        const params = { executeGroupId: id };
+        this.$nextTick(() => {
+          this.$refs.directorRef.getList(params);
+        });
+      },
+      //选择负责人
+      handleDirectorChange (id, info) {
+      },
+
+
+    }
+  };
+</script>
+
+<style lang="scss" scoped>
+  .other{
+    background: #fff;
+    padding: 1px 17px;
+  }
+  .divider {
+    margin: 0px 0 20px;
+    .title {
+      display: flex;
+      align-items: center;
+      margin-bottom: 10px;
+      div {
+        width: 8px;
+        height: 20px;
+        margin-right: 10px;
+      }
+      span {
+        font-size: 20px;
+      }
+    }
+    .ele-width{
+      width: 100%;
+      height: 2px;
+    }
+  }
+  .form-line{
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    .line-select{
+      margin-left:15px;
+    }
+  }
+</style>

+ 232 - 0
src/views/material/product/components/index-data.vue

@@ -0,0 +1,232 @@
+<template>
+  <div>
+    <!-- 数据表格 -->
+    <ele-pro-table
+      ref="table"
+      :columns="columns"
+      :datasource="datasource"
+      :need-page="true"
+      :selection.sync="selection"
+      height="calc(100vh - 412px)"
+      full-height="calc(100vh - 116px)"
+      tool-class="ele-toolbar-form"
+      cache-key="systemDictDataTable"
+    >
+      <!-- 表头工具栏 -->
+      <template v-slot:toolbar>
+        <el-button
+          size="small"
+          type="primary"
+          icon="el-icon-plus"
+          class="ele-btn-icon"
+          @click="openEdit({}, 2)"
+        >
+          新建物料
+        </el-button>
+      </template>
+      <template v-slot:action="{ row }">
+        <el-link
+          type="primary"
+          :underline="false"
+          icon="el-icon-copy-document"
+          @click="openEdit(row, 1)"
+        >
+          复制
+        </el-link>
+        <el-link
+          type="primary"
+          :underline="false"
+          icon="el-icon-edit"
+          @click="openEdit(row, 0)"
+        >
+          修改
+        </el-link>
+        <el-popconfirm
+          class="ele-action"
+          title="确定要删除此物料吗?"
+          @confirm="remove(row)"
+        >
+          <template v-slot:reference>
+            <el-link type="danger" :underline="false" icon="el-icon-delete">
+              删除
+            </el-link>
+          </template>
+        </el-popconfirm>
+      </template>
+    </ele-pro-table>
+    <!-- 编辑弹窗 -->
+    <!--    <dict-edit :visible.sync="showEdit" :id="id" @done="reload" /> -->
+  </div>
+</template>
+
+<script>
+  import { getMaterialList, removeMaterial } from '@/api/material/manage.js';
+  export default {
+    components: {},
+    props: {
+      // 物料组id
+      currentId: [Number, String],
+      data: Object,
+      rootId:  [Number, String],
+    },
+    data () {
+      return {
+        // 表格列配置
+        columns: [
+          {
+            columnKey: 'index',
+            type: 'index',
+            width: 50,
+            align: 'center',
+            showOverflowTooltip: true,
+            label: '序号'
+          },
+          {
+            prop: 'code',
+            label: '编码',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+          {
+            prop: 'name',
+            label: '名称',
+            align: 'center',
+            showOverflowTooltip: true,
+            minWidth: 110
+          },
+      
+          {
+            prop: 'brandNum',
+            align: 'center',
+            label: '牌号',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'modelType',
+            label: '型号',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'specification',
+            label: '规格',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'measuringUnit',
+            label: '计量单位',
+            showOverflowTooltip: true,
+            minWidth: 90
+          },
+
+          {
+            prop: 'weightUnit',
+            label: '重量单位',
+            showOverflowTooltip: true,
+            minWidth: 90
+          },
+
+          {
+            prop: 'roughWeight',
+            label: '毛重',
+            showOverflowTooltip: true,
+            minWidth: 90
+          },
+
+          {
+            prop: 'netWeight',
+            label: '净重',
+            showOverflowTooltip: true,
+            minWidth: 90
+          },
+
+
+          {
+            prop: 'packingUnit',
+            align: 'center',
+            label: '包装单位',
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'categoryLevelPath',
+            label: '分类',
+            align: 'center',
+            showOverflowTooltip: true
+          },
+          {
+            columnKey: 'action',
+            label: '操作',
+            width: 200,
+            align: 'center',
+            resizable: false,
+            slot: 'action',
+            showOverflowTooltip: true,
+            fixed: 'right'
+          }
+        ],
+        types: {
+          1: '业务字典',
+          2: '数据字典'
+        },
+        // 表格选中数据
+        selection: [],
+        // 是否显示编辑弹窗
+        showEdit: false,
+        id: null
+      };
+    },
+
+    methods: {
+      /* 表格数据源 */
+      datasource ({ page, limit, where, order }) {
+        return getMaterialList({
+          pageNum: page,
+          size: limit,
+          ...where,
+          categoryLevelGroupId: this.currentId
+        });
+      },
+      /* 刷新表格 */
+      reload (where) {
+        this.$refs.table.reload({
+          page: 1,
+          where: where,
+          categoryLevelGroupId: this.currentId
+        });
+      },
+      /* 显示编辑 */
+      openEdit (row, status) {
+        this.$router.push({
+          path: '/treeClassify/manageMaterial',
+          query: {
+            id: row.id ? row.id : null,
+            status: status,
+            rootId: this.rootId
+          }
+        });
+      },
+      /* 删除 */
+      remove (row) {
+        const loading = this.$loading({ lock: true });
+        removeMaterial(row.id)
+          .then((msg) => {
+            loading.close();
+            this.$message.success('删除' + msg);
+            this.reload();
+          })
+          .catch((e) => {
+            loading.close();
+            // this.$message.error(e.message);
+          });
+      }
+    },
+    watch: {
+      // 监听物料组id变化
+      currentId () {
+        this.reload();
+      }
+    }
+  };
+</script>

+ 128 - 0
src/views/material/product/components/index-search.vue

@@ -0,0 +1,128 @@
+<!-- 搜索表单 -->
+<template>
+  <el-form
+    size="small"
+    label-width="60px"
+    class="ele-form-search"
+    @keyup.enter.native="search"
+    @submit.native.prevent
+  >
+    <el-row :gutter="10">
+      <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
+        <el-form-item label="编码">
+          <el-input
+            clearable
+            size="small"
+            v-model="where.code"
+            placeholder="请输入"
+          />
+        </el-form-item>
+      </el-col>
+      <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
+        <el-form-item label="名称">
+          <el-input
+            clearable
+            size="small"
+            v-model="where.name"
+            placeholder="请输入"
+          />
+        </el-form-item>
+      </el-col>
+
+      <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
+        <el-form-item label="型号">
+          <el-input
+            clearable
+            size="small"
+            v-model="where.modelType"
+            placeholder="请输入"
+          />
+        </el-form-item>
+      </el-col>
+
+
+
+      <el-col v-bind="styleResponsive ? { md: 6 } : { span: 4 }">
+        <el-form-item>
+          <el-button
+            size="small"
+            type="primary"
+            icon="el-icon-search"
+            class="ele-btn-icon"
+            @click="search"
+          >
+            查询
+          </el-button>
+
+          <el-button
+            @click="reset"
+            icon="el-icon-refresh"
+            class="ele-btn-icon"
+            size="medium"
+            >重置</el-button
+          >
+
+          <el-button
+            type="primary"
+            icon="el-icon-refresh-left"
+            class="ele-btn-icon"
+            @click='refreshData'
+            :loading="loading"
+          >刷新</el-button>
+
+          <slot></slot>
+        </el-form-item>
+      </el-col>
+    </el-row>
+  </el-form>
+</template>
+
+<script>
+  import { syncMateriel } from '@/api/material/list';
+  export default {
+    data() {
+      // 默认表单数据
+      const defaultWhere = {
+        name: '',
+        code: ''
+      };
+      return {
+        defaultWhere,
+        // 表单数据
+        where: { ...defaultWhere },
+        loading:false
+      };
+    },
+    computed: {
+      // 是否开启响应式布局
+      styleResponsive() {
+        return this.$store.state.theme.styleResponsive;
+      }
+    },
+    methods: {
+      /* 搜索 */
+      search() {
+        this.$emit('search', this.where);
+      },
+      /*  重置 */
+      reset() {
+        this.where = { ...this.defaultWhere };
+        this.search();
+      },
+      // 刷新数据
+      refreshData(){
+          this.loading = true;
+          syncMateriel().then(res=>{
+             if(res=='0'){
+               this.loading = false;
+                this.$message.success('数据刷新成功!')
+                this.search()
+             }
+          })
+          .catch((e) => {
+            this.loading = false;
+          });
+      }
+    }
+  };
+</script>

+ 12 - 12
src/views/material/product/detail.vue

@@ -167,18 +167,18 @@
 </template>
 
 <script>
-  import GroupDialog from '../manage/components/GroupDialog.vue';
-  import CategoryDialog from '../manage/components/CategoryDialog.vue';
-  import WarehouseInfo from '../manage/components/WarehouseInfo.vue';
-  import ProcureInfo from '../manage/components/ProcureInfo.vue';
-  import ProductionInfo from '../manage/components/ProductionInfo.vue';
-  import PlanInfo from '../manage/components/PlanInfo.vue';
-  import SalesInfo from '../manage/components/SalesInfo.vue';
-  import QualityInfo from '../manage/components/QualityInfo.vue';
-  import BoatInfo from '../manage/components/BoatInfo.vue';
-  import TurnoverInfo from '../manage/components/TurnoverInfo.vue';
-  import MoldInfo from '../manage/components/MoldInfo.vue';
-  import RemarkInfo from '../manage/components/RemarkInfo.vue';
+  import GroupDialog from './components/GroupDialog.vue';
+  import CategoryDialog from './components/CategoryDialog.vue';
+  import WarehouseInfo from './components/WarehouseInfo.vue';
+  import ProcureInfo from './components/ProcureInfo.vue';
+  import ProductionInfo from './components/ProductionInfo.vue';
+  import PlanInfo from './components/PlanInfo.vue';
+  import SalesInfo from './components/SalesInfo.vue';
+  import QualityInfo from './components/QualityInfo.vue';
+  import BoatInfo from './components/BoatInfo.vue';
+  import TurnoverInfo from './components/TurnoverInfo.vue';
+  import MoldInfo from './components/MoldInfo.vue';
+  import RemarkInfo from './components/RemarkInfo.vue';
   import deptSelect from '@/components/CommomSelect/dept-select.vue';
   import personSelect from '@/components/CommomSelect/person-select.vue';
   import linkMsg from './components/link-msg.vue';

+ 204 - 144
src/views/material/product/index.vue

@@ -1,165 +1,225 @@
 <template>
   <div class="ele-body">
     <el-card shadow="never">
-      <ProductSearch @search="reload" />
       <ele-split-layout
-        width="244px"
+        width="336px"
         allow-collapse
         :right-style="{ overflow: 'hidden' }"
       >
-        <div class="ele-border-lighter split-layout-right-content">
-          <AssetTree
-            ref="assetTreeRef"
-            type="1"
-            @handleNodeClick="handleNodeClick"
-          />
-        </div>
-        <!-- 表格 -->
+       
+          <div class="ele-border-lighter sys-organization-list">
+            <el-tree
+              :data="treeList"
+              :props="defaultProps"
+              ref="treeRef"
+              :default-expanded-keys="current && current.id ? [current.id] : []"
+              :highlight-current="true"
+              node-key="id"
+              @node-click="handleNodeClick"
+            ></el-tree>
+          </div>
+       
         <template v-slot:content>
-          <ele-pro-table
-            ref="table"
-            :columns="columns"
-            :datasource="datasource"
-            height="calc(100vh - 350px)"
-            class="dict-table"
-          >
-            <!-- 表头工具栏 -->
-            <template v-slot:action="{ row }">
-               <el-link
-                type="primary"
-                :underline="false"
-                icon="el-icon-edit"
-                @click="handleEdit(row)"
-              >
-                修改
-              </el-link> 
-            </template>
-          </ele-pro-table>
+          <div class="ele-border-lighter form-content" v-loading="loading">
+            <div class="form-wrapper">
+              <el-form size="mini" label-width="100px" class="ele-form-detail">
+                <el-row :gutter="15" v-if="current.parentId == 0">
+                  <el-col v-bind="styleResponsive ? { sm: 6 } : { span: 6 }">
+                    <el-form-item label="类型编码:">
+                      <div class="ele-text-secondary">
+                        {{ current.code }}
+                      </div>
+                    </el-form-item>
+                  </el-col>
+                  <el-col v-bind="styleResponsive ? { sm: 6 } : { span: 6 }">
+                    <el-form-item label="类型名称:">
+                      <div class="ele-text-secondary">
+                        {{ current.name }}
+                      </div>
+                    </el-form-item>
+                  </el-col>
+
+                  <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
+                    <el-form-item label="描述:">
+                      <div class="ele-text-secondary">
+                        {{ current.remark }}
+                      </div>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+                <el-row :gutter="15" v-else>
+                  <el-col v-bind="styleResponsive ? { sm: 6 } : { span: 6 }">
+                    <el-form-item label="节点编码:">
+                      <div class="ele-text-secondary">
+                        {{ current.code }}
+                      </div>
+                    </el-form-item>
+                  </el-col>
+
+                  <el-col v-bind="styleResponsive ? { sm: 6 } : { span: 6 }">
+                    <el-form-item label="节点名称:">
+                      <div class="ele-text-secondary">
+                        {{ current.name }}
+                      </div>
+                    </el-form-item>
+                  </el-col>
+
+                  <el-col v-bind="styleResponsive ? { sm: 12 } : { span: 12 }">
+                    <el-form-item label="层级全览:">
+                      <div class="ele-text-secondary">
+                        {{ fullName }}
+                      </div>
+                    </el-form-item>
+                  </el-col>
+                </el-row>
+              </el-form>
+            </div>
+
+            <IndexSearch @search="reload" />
+
+            <IndexData
+              ref="listData"
+              v-if="current"
+              :current-id="current.id"
+              :data="current"
+              :rootId="rootId"
+            >
+            </IndexData>
+          </div>
         </template>
       </ele-split-layout>
     </el-card>
   </div>
 </template>
-
 <script>
-  import AssetTree from '@/components/AssetTree/group.vue';
-  import ProductSearch from './components/product-search.vue';
-  import { getList } from '@/api/classifyManage/itemInformation';
-
-  export default {
-    name: 'SystemDictionary',
-    components: { AssetTree, ProductSearch },
-    data () {
-      return {
-        // 表格列配置
-        columns: [
-          {
-            columnKey: 'index',
-            type: 'index',
-            width: 55,
-            align: 'center',
-            reserveSelection: true,
-            label: '序号',
-            showOverflowTooltip: true
-          },
-          {
-            prop: 'code',
-            label: '产品编码',
-            minWidth: 100
-          },
-          {
-            prop: 'name',
-            label: '产品名称',
-            showOverflowTooltip: true,
-            minWidth: 130
-          },
-
-          {
-            prop: 'categoryLevelGroupCode',
-            label: '物料组编码',
-            showOverflowTooltip: true,
-            width: 100
-          },
-
-          {
-            prop: 'brandNum',
-            label: '牌号',
-            width: 70
-          },
-          {
-            prop: 'modelType',
-            label: '型号',
-            minWidth: 130
-          },
-          {
-            prop: 'measuringUnit',
-            label: '计量单位',
-            width: 80
-          },
-          {
-            prop: 'weightUnit',
-            label: '重量单位',
-            width: 80
-          },
-
-          {
-            prop: 'roughWeight',
-            label: '毛重',
-            width: 100
-        
-          },
-
-          {
-            prop: 'netWeight',
-            label: '净重',
-            width: 100
-       
-          },
-
-          {
-            prop: 'packingUnit',
-            label: '包装单位',
-            width: 80
-          },
-          {
-            action: 'action',
-            slot: 'action',
-            label: '操作'
-          }
-        ],
-        categoryLevelId: '9'
-      };
+import IndexData from './components/index-data.vue';
+import IndexSearch from './components/index-search.vue';
+
+import dictMixins from '@/mixins/dictMixins';
+import { getTreeByGroup } from '@/api/classifyManage';
+
+import { getInfoById } from '@/api/classifyManage';
+
+export default {
+  components: {
+    IndexData,
+    IndexSearch
+  },
+  mixins: [dictMixins],
+  data() {
+    return {
+      loading: false,
+      current: {},
+      curNode: {},
+      treeList: [],
+      treeLoading: false,
+      formData: {},
+      defaultProps: {
+        children: 'children',
+        label: 'name'
+      }
+    };
+  },
+
+  computed: {
+    // 是否开启响应式布局
+    styleResponsive() {
+      return this.$store.state.theme.styleResponsive;
+    },
+    rootId() {
+      return this.$route.query.id;
     },
+    fullName() {
+      let str = '';
+      let codeStr = '';
+      let node = this.curNode;
+      while (node?.data?.name) {
+        str = node.data.name + '-' + str;
+        codeStr = node.data.code + '-' + codeStr;
+        node = node?.parent;
+      }
 
-    methods: {
-      /* 表格数据源 */
-      datasource ({ page, where, limit }) {
-        return getList({
-          ...where,
-          pageNum: page,
-          size: limit,
-          isProduct: true,
-          categoryLevelId: this.categoryLevelId
-        });
-      },
-      handleNodeClick (data) {
-        this.categoryLevelId = data.id;
-        this.reload();
-      },
-      /* 刷新表格 */
-      reload (where) {
-        this.$refs.table.reload({ where });
-      },
-      handleEdit ({ id }) {
-        this.$router.push({
-          path: '/material/product/detail',
-          query: {
-            id
-          }
+      return (str.substring(str, str.length - 1))
+      // return (
+      //   str.substring(str, str.length - 1) +
+      //   `(${codeStr.substring(str, str.length - 1)})`
+      // );
+    }
+  },
+  created() {
+    this.getTreeData();
+  },
+  methods: {
+    async getTreeData() {
+      try {
+        this.treeLoading = true;
+
+        const res = await getTreeByGroup({ type: 1 });
+        this.treeLoading = false;
+        if (res?.code === '0') {
+          this.treeList = res.data;
+
+          this.$nextTick(() => {
+            // 默认高亮第一级树节点
+            if (this.treeList[0]) {
+              this.$refs.treeRef.setCurrentKey(this.treeList[0].id);
+              this.getDetail(this.treeList[0].id);
+            }
+          });
+          return this.treeList;
+        }
+      } catch (error) {}
+      this.treeLoading = false;
+    },
+
+    async getDetail(id) {
+      this.loading = true;
+      const res = await getInfoById(id);
+      this.loading = false;
+      if (res.code == '0') {
+        this.current = res.data;
+        this.$nextTick(() => {
+          this.$refs.treeRef.setCurrentKey(this.current.id);
         });
       }
+    },
+
+    handleNodeClick(data, node) {
+      this.curNode = node;
+      this.getDetail(data.id);
+    },
+
+    /* 刷新表格 */
+    reload(where) {
+      this.$refs.listData.reload(where);
     }
-  };
+  }
+};
 </script>
+<style lang="scss" scoped>
+.sys-organization-list {
+  height: calc(100vh - 165px);
+  box-sizing: border-box;
+  border-width: 1px;
+  border-style: solid;
+  overflow: auto;
+}
+
+.sys-organization-list :deep(.el-tree-node__content) {
+  height: 40px;
+
+  & > .el-tree-node__expand-icon {
+    margin-left: 10px;
+  }
+}
+
+.form-content {
+  height: 50px;
+  border: 1px solid;
+  box-sizing: border-box;
+}
 
-<style lang="scss" scoped></style>
+.form-wrapper {
+  padding: 12px 24px;
+}
+</style>