Explorar el Código

删掉物品信息代码

ysy hace 2 años
padre
commit
b0a7c8a26f

+ 0 - 356
src/views/ItemInformation/components/Dialog-item.vue

@@ -1,356 +0,0 @@
-<template>
-  <div>
-    <el-dialog
-      top="3vh"
-      title="新建物品"
-      :visible.sync="dialogVisible"
-      width="80%"
-      :before-close="handleClose"
-      :append-to-body="true"
-    >
-      <el-form
-        :model="formData"
-        :rules="rules"
-        ref="ruleForm"
-        label-width="80px"
-      >
-        <div class="main">
-          <div class="left">
-            <el-card class="box-card">
-              <el-form-item label="物品类别" prop="categoryLevelId">
-                <el-select
-                  v-model="formData.categoryLevelId"
-                  @change="chooseItem"
-                >
-                  <el-option
-                    v-for="(item, index) in typeList"
-                    :key="index"
-                    :label="item.name"
-                    :value="item.id"
-                  ></el-option>
-                </el-select>
-              </el-form-item>
-              <el-form-item label="分类" prop="categoryLevelPathId">
-                <el-cascader
-                  @change="shooteCategory"
-                  v-model="formData.categoryLevelPathId"
-                  :options="classList"
-                  :props="{ value: 'id', label: 'name' }"
-                ></el-cascader>
-              </el-form-item>
-              <el-form-item label="物品编码" prop="code">
-                <el-input placeholder="请输入" v-model="formData.code">
-                  <template slot="prepend">{{ formData.code1 }}</template>
-                </el-input>
-              </el-form-item>
-              <el-form-item label="物品名称" prop="name">
-                <el-input placeholder="请输入" v-model="formData.name">
-                </el-input>
-              </el-form-item>
-              <el-form-item label="计量单位" prop="unit">
-                <div class="dj">
-                  <el-input placeholder="请输入" v-model="formData.unit">
-                  </el-input>
-                  <DictSelection
-                    dictName="计量单位"
-                    clearable
-                    filterable
-                    v-model="formData.measuringUnit"
-                  />
-                </div>
-              </el-form-item>
-              <el-form-item label="包装单位" prop="packingUnit">
-                <el-input placeholder="请输入" v-model="formData.packingUnit">
-                </el-input>
-              </el-form-item>
-              <el-form-item label="参考单价">
-                <div class="dj">
-                  <el-input-number
-                    style="width: 300px"
-                    v-model="formData.price"
-                    :min="1"
-                    placeholder="请输入"
-                  ></el-input-number>
-                  <DictSelection
-                    dictName="金额单位"
-                    clearable
-                    filterable
-                    v-model="formData.priceUnit"
-                  >
-                  </DictSelection>
-                </div>
-              </el-form-item>
-              <el-form-item label="保质期">
-                <div class="dj">
-                  <el-input-number
-                    style="width: 300px"
-                    v-model="formData.warrantyPeriod"
-                    :min="1"
-                    placeholder="请输入"
-                  ></el-input-number>
-
-                  <DictSelection
-                    dictName="时间单位"
-                    clearable
-                    filterable
-                    v-model="formData.warrantyPeriodUnit"
-                  >
-                  </DictSelection>
-                </div>
-              </el-form-item>
-              <el-form-item label="安全库存" prop="secureInventory">
-                <el-input
-                  placeholder="请输入"
-                  v-model="formData.secureInventory"
-                >
-                </el-input>
-              </el-form-item>
-              <el-form-item label="盘点模式" prop="inventoryMode">
-                <el-radio v-model="formData.inventoryMode" label="1"
-                  >逐个盘点</el-radio
-                >
-                <el-radio v-model="formData.inventoryMode" label="2"
-                  >批量盘点</el-radio
-                >
-              </el-form-item>
-              <el-form-item label="允许拆包">
-                <el-switch v-model="formData.isUnpack" active-color="#13ce66">
-                </el-switch>
-              </el-form-item>
-              <el-form-item label="描述">
-                <el-input
-                  type="textarea"
-                  placeholder="请输入"
-                  v-model="formData.description"
-                >
-                </el-input>
-              </el-form-item>
-            </el-card>
-          </div>
-          <div class="right">
-            <el-card class="box-card">
-              <el-row :gutter="20">
-                <el-col :span="8">
-                  <el-form-item label="规格">
-                    <el-input
-                      placeholder="请输入"
-                      v-model="formData.specification"
-                    >
-                    </el-input>
-                  </el-form-item>
-                </el-col>
-                <el-col :span="8">
-                  <el-form-item label="型号">
-                    <el-input placeholder="请输入" v-model="formData.modelType">
-                    </el-input>
-                  </el-form-item>
-                </el-col>
-                <!-- <el-col :span="8">
-                  <el-form-item label="标准产能">
-                    <el-input placeholder="请输入" v-model="formData.cn">
-                      <span slot="append">/小时</span>
-                    </el-input>
-                  </el-form-item>
-                </el-col> -->
-              </el-row>
-              <div class="dashed-line"></div>
-              <div class="production-device">
-                <productionDevice
-                  ref="productionDeviceRef"
-                  :categoryLevelId="formData.categoryLevelId"
-                />
-              </div>
-            </el-card>
-          </div>
-        </div>
-      </el-form>
-
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" :loading="loading" @click="submit"
-          >确 定</el-button
-        >
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-  import { getTreeByPid } from '@/api/classifyManage';
-  import {
-    informationAdd,
-    getOrderNo
-  } from '@/api/classifyManage/itemInformation';
-
-  import productionDevice from './production-device.vue';
-  export default {
-    components: { productionDevice },
-    data() {
-      return {
-        dialogVisible: false,
-        formData: {
-          categoryLevelId: '',
-          isUnpack: true,
-          inventoryMode: '2',
-          warrantyPeriodUnit: 'minute',
-          priceUnit: 'yuan'
-        },
-        rules: {
-          categoryLevelId: [
-            { required: true, message: '请选择', trigger: 'change' }
-          ],
-          warrantyPeriod: [
-            { required: true, message: '请输入', trigger: 'blur' }
-          ],
-          warrantyPeriodUnit: [
-            { required: true, message: '请选择', trigger: 'change' }
-          ],
-          inventoryMode: [
-            { required: true, message: '请选择', trigger: 'change' }
-          ],
-
-          name: [{ required: true, message: '请输入物品名称', trigger: 'blur' }]
-        },
-        classList: [],
-
-        typeList: [],
-
-        // 提交状态
-        loading: false
-      };
-    },
-    methods: {
-      submit() {
-        this.$refs.ruleForm.validate((valid) => {
-          if (valid) {
-            this.loading = true;
-            let newFormData = {
-              ...this.formData,
-              categoryLevelPathId: this.formData.categoryLevelPathId.pop(),
-              categoryLevelPathIdParent:
-                this.formData.categoryLevelPathId.shift(),
-              categoryLevelGroupId: '1678277959244431361',
-              categoryRelationPOList:
-                this.$refs.productionDeviceRef.datasource.map((item) => {
-                  return {
-                    categoryId: item.id
-                  };
-                })
-            };
-            console.log(newFormData);
-            informationAdd({ category: newFormData })
-              .then((msg) => {
-                this.formData = {};
-                this.loading = false;
-                this.$message.success(msg);
-                this.handleClose();
-                this.$emit('done');
-              })
-              .finally(() => {
-                this.loading = false;
-              });
-          }
-        });
-      },
-      async handleTree(code) {
-        const res = await getTreeByPid(code);
-        this.classList = res.data;
-        this.typeList = res.data.map((item) => {
-          return { id: item.id, name: item.code + ' ' + item.name };
-        });
-      },
-      async open() {
-        this.dialogVisible = true;
-        await this.handleTree(0);
-        //默认物品类别===》生产设备
-        this.formData.categoryLevelId = '9';
-        this.formData.code1 = 'W1';
-      },
-      handleClose() {
-        this.dialogVisible = false;
-      },
-      shooteCategory(val) {
-        console.log(this.classList);
-        const row = this.findItemsByIds(this.classList, val);
-        this.formData.categoryLevelPath = row.join('/');
-      },
-      //递归
-      findItemById(arr, id) {
-        for (let i = 0; i < arr.length; i++) {
-          const item = arr[i];
-          if (item.id == id) {
-            return item;
-          }
-          if (item.children && item.children.length > 0) {
-            const childResult = this.findItemById(item.children, id);
-            if (childResult) {
-              return childResult;
-            }
-          }
-        }
-        return null;
-      },
-      findItemsByIds(array, ids) {
-        return ids.map((id) => {
-          const item = this.findItemById(array, id);
-          return item ? item.name : null;
-        });
-      },
-      chooseItem(val) {
-        this.classList.map(async (item) => {
-          if (item.id == val) {
-            // const res = await getOrderNo(item.code);
-            // console.log(res);
-            this.formData.code1 = item.code;
-            // this.itemForm.code = val;
-            // this.getTreeData(item.code);
-          }
-        });
-      }
-    },
-    mounted() {}
-  };
-</script>
-
-<style lang="scss" scoped>
-  .el-card {
-    height: 100%;
-  }
-
-  .tabs {
-    margin-top: 20px;
-  }
-
-  .dashed-line {
-    border-bottom: 1px dashed #999;
-    margin: 10px 0;
-  }
-
-  .dj {
-    display: flex;
-
-    ::v-deep .el-select {
-      margin-left: 10px;
-    }
-  }
-
-  ::v-deep .el-cascader,
-  .el-select {
-    width: 100%;
-  }
-
-  .main {
-    display: flex;
-    width: 100%;
-
-    .left {
-      margin-right: 5px;
-      width: 30%;
-    }
-
-    .right {
-      margin-left: 5px;
-      width: 70%;
-    }
-  }
-</style>

+ 0 - 177
src/views/ItemInformation/components/add-table.vue

@@ -1,177 +0,0 @@
-<template>
-  <div class="add-table">
-    <el-dialog
-      :append-to-body="true"
-      top="15vh"
-      :title="dialogParams.title"
-      :visible.sync="dialogVisible"
-      width="60%"
-      :before-close="handleClose"
-    >
-      <div class="main">
-        <div class="left">
-          <el-input
-            size="small"
-            v-model="item"
-            placeholder="输入物品编码或名称"
-          ></el-input>
-          <div class="tree-layout">
-            <AssetTree
-              ref="assetTreeRef"
-              :id="localCategoryLevelId"
-              @handleNodeClick="handleNodeClick"
-            />
-          </div>
-        </div>
-        <div class="right">
-          <div class="but">
-            <el-button size="small" type="primary">查询</el-button>
-            <el-button size="small">重置</el-button>
-          </div>
-          <div class="table">
-            <ele-pro-table
-              ref="table"
-              :columns="columns"
-              :datasource="datasource"
-              height="calc(100vh - 500px)"
-              class="dict-table"
-              @selection-change="handleSelectionChange"
-            >
-            </ele-pro-table>
-          </div>
-        </div>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" :loading="loading" @click="submit"
-          >确 定</el-button
-        >
-      </span>
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-  import AssetTree from '@/components/AssetTree';
-  import { getList, pageSubstance } from '@/api/classifyManage/itemInformation';
-  export default {
-    components: { AssetTree },
-    props: {
-      categoryLevelId: {
-        typeof: String,
-        default: ''
-      }
-    },
-    data() {
-      return {
-        localCategoryLevelId: '',
-        dialogVisible: false,
-        loading: false,
-        item: '',
-        columns: [
-          {
-            type: 'selection',
-            width: '55px',
-            align: 'center'
-          },
-          {
-            prop: 'code',
-            label: '物品编码',
-            minWidth: 100
-          },
-          {
-            prop: 'name',
-            label: '物品名称',
-            showOverflowTooltip: true,
-            minWidth: 130
-          },
-          {
-            prop: 'modelType',
-            label: '型号',
-            minWidth: 130
-          }
-        ],
-        dialogParams: {},
-        selectData: []
-      };
-    },
-    watch: {
-      categoryLevelId(newValue) {
-        // 监听 categoryLevelId 的变化,并更新本地的 localCategoryLevelId
-        this.localCategoryLevelId = newValue;
-      }
-    },
-    methods: {
-      submit() {
-        try {
-          this.loading = true;
-          this.$emit('successTable', this.selectData);
-          this.dialogVisible = false;
-        } finally {
-          this.loading = false;
-        }
-      },
-      handleSelectionChange(row) {
-        this.selectData = row;
-      },
-      /* 表格数据源 */
-      datasource({ page, where, limit }) {
-        return getList({
-          ...where,
-          pageNum: page,
-          size: limit,
-          isProduct: false,
-          categoryLevelId: this.localCategoryLevelId,
-          rootCategoryLevelId: 4
-        });
-      },
-      open(row, data) {
-        this.dialogVisible = true;
-        this.dialogParams = row;
-        this.localCategoryLevelId = this.categoryLevelId;
-
-        this.$nextTick(() => {
-          this.$refs.table.reload();
-          this.$refs.table.clearSelection();
-          if (data.length != 0) {
-            // this.$refs.tablesetSelection([1])
-            const arr = data.map((item) => {
-              return item.id;
-            });
-          } else {
-            this.selectData = [];
-          }
-        });
-      },
-      handleClose() {
-        this.dialogVisible = false;
-      },
-      handleNodeClick(data) {
-        this.localCategoryLevelId = data.id;
-        this.$refs.table.reload();
-      }
-    }
-  };
-</script>
-
-<style lang="scss" scoped>
-  .main {
-    display: flex;
-    .left {
-      width: 30%;
-      margin-right: 5px;
-      .tree-layout {
-        margin-top: 10px;
-        border: 1px solid #ededed;
-        height: calc(100vh - 453px);
-      }
-    }
-    .right {
-      width: 70%;
-      margin-left: 5px;
-      .table {
-        margin-top: 10px;
-      }
-    }
-  }
-</style>

+ 0 - 224
src/views/ItemInformation/components/link-msg.vue

@@ -1,224 +0,0 @@
-<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 - 104
src/views/ItemInformation/components/product-search.vue

@@ -1,104 +0,0 @@
-<!-- 搜索表单 -->
-<template>
-  <el-form
-    label-width="77px"
-    class="ele-form-search"
-    @keyup.enter.native="search"
-    @submit.native.prevent
-  >
-    <el-row :gutter="10">
-      <el-col v-bind="styleResponsive ? { md: 5 } : { span: 4 }">
-        <el-form-item label="物品编码">
-          <el-input clearable v-model="where.code" placeholder="请输入" />
-        </el-form-item>
-      </el-col>
-      <el-col v-bind="styleResponsive ? { md: 5 } : { span: 4 }">
-        <el-form-item label="物品名称">
-          <el-input clearable v-model="where.name" placeholder="请输入" />
-        </el-form-item>
-      </el-col>
-      <el-col v-bind="styleResponsive ? { md: 5 } : { span: 4 }">
-        <el-form-item label="牌号">
-          <el-input clearable v-model="where.brandNum" placeholder="请输入" />
-        </el-form-item>
-      </el-col>
-      <el-col v-bind="styleResponsive ? { md: 5 } : { span: 4 }">
-        <el-form-item label="型号">
-          <el-input clearable v-model="where.modelType" placeholder="请输入" />
-        </el-form-item>
-      </el-col>
-      <el-col v-bind="styleResponsive ? { md: 4 } : { span: 4 }">
-        <div class="ele-form-actions">
-          <el-button
-            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
-          >
-        </div>
-      </el-col>
-    </el-row>
-  </el-form>
-</template>
-
-<script>
-  export default {
-    data() {
-      // 默认表单数据
-      const defaultWhere = {
-        name: '',
-        code: '',
-        brandNum: '',
-        modelType: ''
-      };
-      return {
-        options: [
-          { value: 0, label: '全部' },
-          { value: 1, label: '业务字典' },
-          { value: 2, label: '数据字典' }
-        ],
-        defaultWhere,
-        // 表单数据
-        where: { ...defaultWhere }
-      };
-    },
-    computed: {
-      // 是否开启响应式布局
-      styleResponsive() {
-        return this.$store.state.theme.styleResponsive;
-      }
-    },
-    methods: {
-      /* 搜索 */
-      search() {
-        if (this.where.appType === 0) {
-          this.where.appType = '';
-        }
-        this.$emit('search', this.where);
-      },
-      /*  重置 */
-      reset() {
-        this.where = { ...this.defaultWhere };
-        this.search();
-      }
-    }
-  };
-</script>
-
-<style>
-  .ele-form-actions {
-    display: inline-block;
-    transform: translate(0);
-    transition: all;
-  }
-</style>

+ 0 - 165
src/views/ItemInformation/components/production-device.vue

@@ -1,165 +0,0 @@
-<!-- 生产设备 -->
-<template>
-  <div class="productionDevice">
-    <div class="tabs">
-      <el-tabs v-model="activeName" type="card">
-        <el-tab-pane label="匹配模具" name="first">
-          <div class="table">
-            <ele-pro-table
-              ref="table"
-              :columns="columns"
-              :datasource="datasource"
-              height="calc(100vh - 500px)"
-              class="dict-table"
-            >
-              <template v-slot:toolbar>
-                <el-button
-                  size="small"
-                  type="primary"
-                  icon="el-icon-plus"
-                  class="ele-btn-icon"
-                  @click="add"
-                >
-                  添加
-                </el-button>
-              </template>
-              <!-- 表头工具栏 -->
-              <template v-slot:action="{ row }">
-                <el-link
-                  type="danger"
-                  :underline="false"
-                  icon="el-icon-delete"
-                  @click="handleDel(row)"
-                >
-                  删除
-                </el-link>
-              </template>
-            </ele-pro-table>
-          </div>
-        </el-tab-pane>
-        <el-tab-pane label="匹配备品备件" name="second">
-          <div class="one">
-            <el-button type="primary">添加</el-button>
-          </div>
-          <div class="table">
-            <el-table :data="tableData" style="width: 100%">
-              <el-table-column prop="date" label="序号" width="60">
-              </el-table-column>
-              <el-table-column prop="wpmc" label="物品名称"> </el-table-column>
-              <el-table-column prop="wpmc" label="物品名称"> </el-table-column>
-              <el-table-column prop="wpmc" label="型号"> </el-table-column>
-              <el-table-column prop="wpmc" label="物品类型"> </el-table-column>
-              <el-table-column prop="wpmc" label="分类"> </el-table-column>
-              <el-table-column prop="wpmc" label="操作"> </el-table-column>
-            </el-table>
-          </div>
-        </el-tab-pane>
-      </el-tabs>
-    </div>
-    <addTable
-      ref="addTableRef"
-      @successTable="addTableList"
-      :categoryLevelId="categoryLevelId"
-    />
-  </div>
-</template>
-
-<script>
-  import addTable from './add-table.vue';
-  export default {
-    components: { addTable },
-    props: {
-      categoryLevelId: {
-        typeof: String,
-        default: ''
-      }
-    },
-    data() {
-      return {
-        tableData: [],
-        activeName: 'first',
-        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: 'brandNum',
-            label: '牌号',
-            width: 70
-          },
-          {
-            prop: 'modelType',
-            label: '型号',
-            minWidth: 130
-          },
-          {
-            prop: 'ssxs',
-            label: '收缩系数',
-            width: 80
-          },
-          {
-            prop: 'dmtxh',
-            label: '大模体型号',
-            width: 80
-          },
-          {
-            prop: 'weightUnit',
-            label: '物品类型',
-            width: 80
-          },
-
-          {
-            prop: 'productCategoryLevelName',
-            label: '分类',
-            width: 100
-          },
-          {
-            action: 'action',
-            slot: 'action',
-            label: '操作'
-          }
-        ],
-        datasource: []
-      };
-    },
-    methods: {
-      handleDel(row) {
-        const index = this.datasource.indexOf(row);
-        if (index !== -1) {
-          this.datasource.splice(index, 1);
-        }
-      },
-      addTableList(list) {
-        this.datasource = list;
-      },
-
-      add() {
-        const dialogParams = { title: '选择设备' };
-        this.$refs.addTableRef.open(dialogParams, this.datasource);
-      }
-    }
-  };
-</script>
-
-<style lang="scss" scoped>
-  .table {
-    margin-top: 10px;
-  }
-</style>

+ 0 - 421
src/views/ItemInformation/detail.vue

@@ -1,421 +0,0 @@
-<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 '../material/manage/components/GroupDialog.vue';
-  import CategoryDialog from '../material/manage/components/CategoryDialog.vue';
-  import WarehouseInfo from '../material/manage/components/WarehouseInfo.vue';
-  import ProcureInfo from '../material/manage/components/ProcureInfo.vue';
-  import ProductionInfo from '../material/manage/components/ProductionInfo.vue';
-  import PlanInfo from '../material/manage/components/PlanInfo.vue';
-  import SalesInfo from '../material/manage/components/SalesInfo.vue';
-  import QualityInfo from '../material/manage/components/QualityInfo.vue';
-  import BoatInfo from '../material/manage/components/BoatInfo.vue';
-  import TurnoverInfo from '../material/manage/components/TurnoverInfo.vue';
-  import MoldInfo from '../material/manage/components/MoldInfo.vue';
-  import RemarkInfo from '../material/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>

+ 0 - 181
src/views/ItemInformation/index.vue

@@ -1,181 +0,0 @@
-<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"
-            id="4"
-            @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:toolbar>
-              <el-button
-                size="small"
-                type="primary"
-                icon="el-icon-plus"
-                class="ele-btn-icon"
-                @click="add"
-              >
-                新建物品
-              </el-button>
-            </template>
-            <!-- 表头工具栏 -->
-            <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>
-    <DialogItem ref="dialogItemRef" />
-  </div>
-</template>
-
-<script>
-  import AssetTree from '@/components/AssetTree';
-  import ProductSearch from './components/product-search.vue';
-  import { getList, pageSubstance } from '@/api/classifyManage/itemInformation';
-  import DialogItem from './components/Dialog-item.vue';
-
-  export default {
-    name: 'SystemDictionary',
-    components: { AssetTree, ProductSearch, DialogItem },
-    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: '4'
-      };
-    },
-
-    methods: {
-      /* 新建物品 */
-      add() {
-        this.$refs.dialogItemRef.open();
-      },
-      /* 表格数据源 */
-      datasource({ page, where, limit }) {
-        return getList({
-          ...where,
-          pageNum: page,
-          size: limit,
-          isProduct: false,
-          categoryLevelId: this.categoryLevelId,
-          rootCategoryLevelId: 4
-        });
-      },
-      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>