sunyadv 5 years ago
parent
commit
315b2525a9

+ 3 - 1
ys_vue/src/main.js

@@ -70,7 +70,9 @@ router.beforeEach((to, from, next) => {
                 } else if(routes[i].name == "项目管理") {
                 } else if(routes[i].name == "项目管理") {
                     var children = routes[i].children;
                     var children = routes[i].children;
                     for(var j in children){
                     for(var j in children){
-                        children[j].hidden = false
+                        if(children[j].name != "项目详情"){
+                            children[j].hidden = false
+                        }
                     }
                     }
                 }
                 }
             }
             }

+ 1 - 0
ys_vue/src/port.js

@@ -19,6 +19,7 @@ export default {
     },
     },
     mold: {
     mold: {
         addMold: '/mould/addOrUpdate', //添加/修改模具设备
         addMold: '/mould/addOrUpdate', //添加/修改模具设备
+        molds: '/mould/list', //模具列表
         modelList: '/mould/modelList', //给项目分配模具获取该公司下的模具列表
         modelList: '/mould/modelList', //给项目分配模具获取该公司下的模具列表
     },
     },
     // 基础管理
     // 基础管理

+ 382 - 413
ys_vue/src/views/base/allocation.vue

@@ -1,437 +1,406 @@
 <template>
 <template>
-  <section>
-    <!--工具条-->
-    <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-      <el-form :inline="true" :model="filters">
-        <el-col :span="3">
-          <el-form-item>
-            <el-select v-model="filters.value" placeholder="按公司筛选">
-              <el-option label="编号" value="0"></el-option>
-              <el-option label="名称" value="1"></el-option>
-            </el-select>
-          </el-form-item>
+    <section>
+        <!--工具条-->
+        <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
+            <el-form :inline="true" :model="filters">
+                <el-col :span="3">
+                    <el-form-item>
+                        <el-select v-model="filters.value" placeholder="按公司筛选">
+                        <el-option label="编号" value="0"></el-option>
+                        <el-option label="名称" value="1"></el-option>
+                        </el-select>
+                    </el-form-item>
+                </el-col>
+                <el-form-item>
+                    <el-input v-model="filters.name" placeholder="请输入关键字进行搜索"></el-input>
+                </el-form-item>
+                <el-form-item>
+                    <el-button type="primary">查询</el-button>
+                </el-form-item>
+                <el-form-item style="float: right;">
+                    <el-button type="primary" @click="showAllocation">新建</el-button>
+                </el-form-item>
+            </el-form>
         </el-col>
         </el-col>
-        <el-form-item>
-          <el-input v-model="filters.name" placeholder="请输入关键字进行搜索"></el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary">查询</el-button>
-        </el-form-item>
-        <el-form-item style="float: right;">
-          <el-button type="primary" @click="showAllocation">新建</el-button>
-        </el-form-item>
-      </el-form>
-    </el-col>
 
 
-    <!--列表-->
-    <el-table
-      :data="allocations"
-      :height="tableHeight"
-      highlight-current-row
-      v-loading="listLoading"
-      style="width: 100%;"
-    >
-      <el-table-column type="index" width="60"></el-table-column>
-      <el-table-column prop="equipmentNo" label="云模盒编号" width="130" sortable></el-table-column>
-      <el-table-column label="电量" width="80" sortable></el-table-column>
-      <el-table-column prop="useLife" label="倒计时" width="100" sortable>
-        <template slot-scope="scope">{{scope.row.useLife}}天</template>
-      </el-table-column>
-      <el-table-column prop="equipmentName" label="模具名称" sortable></el-table-column>
-      <el-table-column label="模具编号" sortable></el-table-column>
-      <el-table-column prop="companyName" label="资产方" sortable></el-table-column>
-      <el-table-column label="模具状态" width="100" sortable>
-        <template slot-scope="scope">
-          <span v-if="scope.row.isUse == 0">未启用</span>
-          <span v-else>已启用</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="操作" width="220" sortable>
-        <template slot-scope="scope">
-          <el-button
-            size="small"
-            type="primary"
-            @click="enable(scope.$index)"
-            :disabled="scope.row.isUse == 1"
-          >启用</el-button>
-          <el-button size="small" @click="showEdit(scope.row.id)">修改</el-button>
-          <el-button type="danger" size="small">删除</el-button>
-        </template>
-      </el-table-column>
-    </el-table>
+        <!--列表-->
+        <el-table :data="allocations" :height="tableHeight" highlight-current-row v-loading="listLoading" style="width: 100%;">
+            <el-table-column type="index" width="60"></el-table-column>
+            <el-table-column prop="equipmentNo" label="云模盒编号" width="130" sortable></el-table-column>
+            <el-table-column label="电量" width="100" sortable></el-table-column>
+            <el-table-column prop="useLife" label="倒计时" width="100" sortable>
+                <template slot-scope="scope">{{scope.row.useLife}}天</template>
+            </el-table-column>
+            <el-table-column prop="equipmentName" label="模具名称" sortable></el-table-column>
+            <el-table-column label="模具编号" sortable></el-table-column>
+            <el-table-column prop="companyName" label="公司名称" sortable></el-table-column>
+            <el-table-column label="模具状态" width="100" sortable>
+                <template slot-scope="scope">
+                <span v-if="scope.row.isUse == 0">未启用</span>
+                <span v-else>已启用</span>
+                </template>
+            </el-table-column>
+            <el-table-column label="操作" width="220" sortable>
+                <template slot-scope="scope">
+                    <el-button size="small" type="primary" @click="enable(scope.$index)" :disabled="scope.row.isUse == 1">启用</el-button>
+                    <el-button size="small" @click="showEdit(scope.$index, scope.row)">修改</el-button>
+                    <!-- <el-button type="danger" size="small">删除</el-button> -->
+                </template>
+            </el-table-column>
+        </el-table>
 
 
-    <!--工具条-->
-    <el-col :span="24" class="toolbar">
-      <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :page-sizes="[20 , 50 , 80 , 100]"
-        :page-size="20"
-        layout="total, sizes, prev, pager, next"
-        :total="total"
-        style="float:right;"
-      ></el-pagination>
-    </el-col>
+        <!--工具条-->
+        <el-col :span="24" class="toolbar">
+        <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :page-sizes="[20 , 50 , 80 , 100]"
+            :page-size="20"
+            layout="total, sizes, prev, pager, next"
+            :total="total"
+            style="float:right;"
+        ></el-pagination>
+        </el-col>
 
 
-    <!--新增界面-->
-    <el-dialog
-      title="新建模具"
-      v-if="addFormVisible"
-      :visible.sync="addFormVisible"
-      :close-on-click-modal="false"
-      customClass="customWidth"
-    >
-      <el-form
-        :model="newAllocation"
-        label-width="100px"
-        :rules="formRules"
-        ref="newAllocation"
-        :inline="true"
-        class="demo-form-inline"
-      >
-        <el-form-item label="云模盒编号" prop="equipmentNo">
-          <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请填写"></el-input>
-        </el-form-item>
-        <el-form-item label="所属公司" prop="belongCompanyId">
-          <el-select
-            v-model="newAllocation.belongCompanyId"
-            filterable
-            clearable
-            placeholder="请选择"
-            style="width: 202px"
-          >
-            <el-option
-              v-for="item in companies"
-              :key="item.id"
-              :label="item.companyName"
-              :value="item.id"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="使用年限" prop="useLife">
-          <el-input
-            v-model="newAllocation.useLife"
-            type="number"
-            autocomplete="off"
-            placeholder="请填写"
-          ></el-input>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click.native="addFormVisible = false">取消</el-button>
-        <el-button type="primary" @click="addMould()">提交</el-button>
-      </div>
-    </el-dialog>
+        <!--新增界面-->
+        <el-dialog title="新建模具" v-if="addFormVisible" :visible.sync="addFormVisible" :close-on-click-modal="false" customClass="customWidth">
+            <el-form
+                :model="newAllocation"
+                label-width="100px"
+                :rules="formRules"
+                ref="newAllocation"
+                :inline="true"
+                class="demo-form-inline"
+            >
+                <el-form-item label="云模盒编号" prop="equipmentNo">
+                <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请填写"></el-input>
+                </el-form-item>
+                <el-form-item label="所属公司" prop="belongCompanyId">
+                <el-select
+                    v-model="newAllocation.belongCompanyId"
+                    filterable
+                    clearable
+                    placeholder="请选择"
+                    style="width: 202px"
+                >
+                    <el-option
+                    v-for="item in companies"
+                    :key="item.id"
+                    :label="item.companyName"
+                    :value="item.id"
+                    ></el-option>
+                </el-select>
+                </el-form-item>
+                <el-form-item label="使用年限" prop="useLife">
+                <el-input
+                    v-model.number="newAllocation.useLife"
+                    type="age"
+                    autocomplete="off"
+                    placeholder="请填写"
+                ></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="addFormVisible = false">取消</el-button>
+                <el-button type="primary" @click="addMould()">提交</el-button>
+            </div>
+        </el-dialog>
 
 
-    <!--修改界面-->
-    <el-dialog
-      title="修改模具"
-      v-if="editFormVisible"
-      :visible.sync="editFormVisible"
-      :close-on-click-modal="false"
-      customClass="customWidth"
-    >
-      <el-form
-        :model="newAllocation"
-        label-width="100px"
-        :rules="formRules"
-        ref="newAllocation"
-        :inline="true"
-        class="demo-form-inline"
-      >
-        <el-form-item label="云模盒编号" prop="equipmentNo">
-          <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请填写"></el-input>
-        </el-form-item>
-        <el-form-item label="所属公司" prop="belongCompanyId">
-          <el-select
-            v-model="newAllocation.belongCompanyId"
-            filterable
-            clearable
-            placeholder="请选择"
-            style="width: 202px"
-          >
-            <el-option
-              v-for="item in companies"
-              :key="item.id"
-              :label="item.companyName"
-              :value="item.id"
-            ></el-option>
-          </el-select>
-        </el-form-item>
-        <el-form-item label="设备名称" prop="equipmentName">
-          <el-input v-model="newAllocation.equipmentName" autocomplete="off" placeholder="请填写"></el-input>
-        </el-form-item>
-        <el-form-item label="使用年限" prop="useLife">
-          <el-input
-            v-model="newAllocation.useLife"
-            type="number"
-            autocomplete="off"
-            placeholder="请填写"
-          ></el-input>
-        </el-form-item>
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button @click.native="editFormVisible = false">取消</el-button>
-        <el-button type="primary" @click="editMould(newAllocation.id)">提交</el-button>
-      </div>
-    </el-dialog>
-  </section>
+        <!--修改界面-->
+        <el-dialog
+        title="修改模具"
+        v-if="editFormVisible"
+        :visible.sync="editFormVisible"
+        :close-on-click-modal="false"
+        customClass="customWidth"
+        >
+            <el-form
+                :model="newAllocation"
+                label-width="100px"
+                :rules="formRules"
+                ref="newAllocation"
+                :inline="true"
+                class="demo-form-inline"
+            >
+                <el-form-item label="云模盒编号" prop="equipmentNo">
+                <el-input v-model="newAllocation.equipmentNo" autocomplete="off" placeholder="请填写"></el-input>
+                </el-form-item>
+                <el-form-item label="所属公司" prop="belongCompanyId">
+                <el-select
+                    v-model="newAllocation.belongCompanyId"
+                    filterable
+                    clearable
+                    placeholder="请选择"
+                    style="width: 202px"
+                >
+                    <el-option
+                    v-for="item in companies"
+                    :key="item.id"
+                    :label="item.companyName"
+                    :value="item.id"
+                    ></el-option>
+                </el-select>
+                </el-form-item>
+                <el-form-item label="使用年限" prop="useLife">
+                <el-input
+                    v-model.number="newAllocation.useLife"
+                    type="age"
+                    autocomplete="off"
+                    placeholder="请填写"
+                ></el-input>
+                </el-form-item>
+            </el-form>
+            <div slot="footer" class="dialog-footer">
+                <el-button @click.native="editFormVisible = false">取消</el-button>
+                <el-button type="primary" @click="editMould(newAllocation.id)">提交</el-button>
+            </div>
+        </el-dialog>
+    </section>
 </template>
 </template>
 
 
 <script>
 <script>
-import util from "../../common/js/util";
-export default {
-  data() {
-    return {
-      allocations: [],
-      companies: {},
-      newAllocation: {
-        equipmentNo: "", //设备编号
-        useLife: "", //使用年限
-        equipmentName: "", //设备名称
-        id: "", //设备id
-        belongCompanyId: "" //所属公司ID
-      },
-      filters: {
-        name: "",
-        value: ""
-      },
-      formRules: {
-        equipmentNo: [
-          { required: true, message: "请输入云模盒编号", trigger: "blur" }
-        ],
-        useLife: [
-          {
-            required: true,
-            message: "请输入使用年限",
-            trigger: "blur"
-          }
-        ],
-        equipmentName: [
-          { required: true, message: "请输入设备名称", trigger: "blur" }
-        ],
-        belongCompanyId: [
-          {
-            required: true,
-            message: "请选择所属公司",
-            trigger: ["blur", "change"]
-          }
-        ]
-      },
-      listLoading: false,
-      addLoading: false,
-      editLoading: false,
-      total: 0,
-      page: 1,
-      size: 20,
-      tableHeight: 0,
-      addFormVisible: false,
-      editFormVisible: false
-    };
-  },
-  methods: {
-    //分页
-    handleCurrentChange(val) {
-      this.page = val;
-      this.getMoulds();
-    },
-    handleSizeChange(val) {
-      this.size = val;
-      this.getMoulds();
-    },
-    //读取云模盒信息
-    getMoulds() {
-      this.listLoading = true;
-      this.http.post(
-        this.port.base.mouldeList,
-        {},
-        res => {
-          this.listLoading = false;
-          if (res.code == "ok") {
-            this.allocations = res.data.list;
-            this.total = res.data.total;
-          } else {
-            this.$message({
-              message: res.msg,
-              type: "error"
-            });
-          }
+    import util from "../../common/js/util";
+    export default {
+        data() {
+            return {
+                allocations: [],
+                companies: {},
+                newAllocation: {
+                    equipmentNo: "", //设备编号
+                    useLife: "", //使用年限
+                    equipmentName: "", //设备名称
+                    id: "", //设备id
+                    belongCompanyId: "" //所属公司ID
+                },
+                filters: {
+                    name: "",
+                    value: ""
+                },
+                formRules: {
+                    equipmentNo: [
+                        { required: true, message: "请输入云模盒编号", trigger: "blur" }
+                    ],
+                    useLife: [
+                        { required: true, message: '请输入使用年限'},
+                        { type: 'number', message: '使用年限必须为数字值'}
+                    ],
+                    belongCompanyId: [
+                        { required: true, message: "请选择所属公司", trigger: ["blur", "change"] }
+                    ]
+                },
+                listLoading: false,
+                addLoading: false,
+                editLoading: false,
+                total: 0,
+                page: 1,
+                size: 20,
+                tableHeight: 0,
+                addFormVisible: false,
+                editFormVisible: false
+            };
         },
         },
-        error => {
-          this.listLoading = false;
-          this.$message({
-            message: error,
-            type: "error"
-          });
-        }
-      );
-    },
-    //添加界面
-    showAllocation() {
-      this.addFormVisible = true;
-      this.newAllocation = {
-        id: "",
-        useLife: "",
-        equipmentName: "",
-        equipmentNo: "",
-        belongCompanyId: ""
-      };
-    },
-    //修改界面
-    showEdit(equipmentId) {
-      this.editFormVisible = true;
-      this.newAllocation = {
-        id: equipmentId,
-        useLife: "",
-        equipmentName: "",
-        equipmentNo: "",
-        belongCompanyId: ""
-      };
-    },
-    //添加模具
-    addMould() {
-      this.$refs.newAllocation.validate(valid => {
-        if (valid) {
-          this.addLoading = true;
-          this.http.post(
-            this.port.base.editMould,
-            {
-              equipmentNo: this.newAllocation.equipmentNo,
-              belongCompanyId: this.newAllocation.belongCompanyId,
-              useLife: this.newAllocation.useLife
-            },
-            res => {
-              this.addLoading = false;
-              this.addFormVisible = false;
-              if (res.code == "ok") {
-                this.$message({
-                  message: "添加成功",
-                  type: "success"
+        methods: {
+            getMsg() {
+                //获取公司下拉列表
+                this.http.post( this.port.base.comps, {},
+                res => {
+                    if (res.code == "ok") {
+                        this.companies = res.data;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
                 });
                 });
+            },
+
+            //分页
+            handleCurrentChange(val) {
+                this.page = val;
                 this.getMoulds();
                 this.getMoulds();
-              } else {
-                this.$message({
-                  message: res.msg,
-                  type: "error"
-                });
-              }
             },
             },
-            error => {
-              this.addLoading = false;
-              this.addFormVisible = false;
-              this.$message({
-                message: error,
-                type: "error"
-              });
-            }
-          );
-        }
-      });
-    },
-    //编辑模具
-    editMould() {
-      this.$refs.newAllocation.validate(valid => {
-        if (valid) {
-          this.editLoading = true;
-          this.http.post(
-            this.port.base.editMould,
-            {
-              id: this.newAllocation.id,
-              equipmentNo: this.newAllocation.equipmentNo,
-              equipmentName: this.newAllocation.equipmentName,
-              belongCompanyId: this.newAllocation.belongCompanyId,
-              useLife: this.newAllocation.useLife
+
+            handleSizeChange(val) {
+                    this.size = val;
+                    this.getMoulds();
+            },
+
+            //读取云模盒信息
+            getMoulds() {
+                this.listLoading = true;
+                this.http.post(
+                    this.port.base.mouldeList,
+                    {},
+                    res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.allocations = res.data.list;
+                        this.total = res.data.total;
+                    } else {
+                        this.$message({
+                        message: res.msg,
+                        type: "error"
+                        });
+                    }
+                    },
+                    error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                    }
+                );
+            },
+            //添加界面
+            showAllocation() {
+                this.addFormVisible = true;
+                this.newAllocation = {
+                    id: "",
+                    useLife: "",
+                    equipmentNo: "",
+                    belongCompanyId: ""
+                };
             },
             },
-            res => {
-              this.editLoading = false;
-              this.editFormVisible = false;
-              if (res.code == "ok") {
-                this.$message({
-                  message: "添加成功",
-                  type: "success"
+           
+            //添加模具
+            addMould() {
+                this.$refs.newAllocation.validate(valid => {
+                    if (valid) {
+                    this.addLoading = true;
+                    this.http.post(
+                        this.port.base.editMould,
+                        {
+                        equipmentNo: this.newAllocation.equipmentNo,
+                        belongCompanyId: this.newAllocation.belongCompanyId,
+                        useLife: this.newAllocation.useLife
+                        },
+                        res => {
+                        this.addLoading = false;
+                        this.addFormVisible = false;
+                        if (res.code == "ok") {
+                            this.$message({
+                            message: "添加成功",
+                            type: "success"
+                            });
+                            this.getMoulds();
+                        } else {
+                            this.$message({
+                            message: res.msg,
+                            type: "error"
+                            });
+                        }
+                        },
+                        error => {
+                        this.addLoading = false;
+                        this.addFormVisible = false;
+                        this.$message({
+                            message: error,
+                            type: "error"
+                        });
+                        }
+                    );
+                    }
                 });
                 });
-                this.getMoulds();
-              } else {
-                this.$message({
-                  message: res.msg,
-                  type: "error"
+            },
+
+             //修改界面
+            showEdit(index, row) {
+                this.editFormVisible = true;
+                this.newAllocation = {
+                    id: row.id,
+                    useLife: row.useLife,
+                    equipmentNo: row.equipmentNo,
+                    belongCompanyId: row.belongCompanyId
+                };
+            },
+
+            //编辑模具
+            editMould() {
+                this.$refs.newAllocation.validate(valid => {
+                    if (valid) {
+                        this.editLoading = true;
+                        this.http.post( this.port.base.editMould, {
+                            id: this.newAllocation.id,
+                            equipmentNo: this.newAllocation.equipmentNo,
+                            equipmentName: this.newAllocation.equipmentName,
+                            belongCompanyId: this.newAllocation.belongCompanyId,
+                            useLife: this.newAllocation.useLife
+                        },
+                        res => {
+                            this.editLoading = false;
+                            this.editFormVisible = false;
+                            if (res.code == "ok") {
+                                this.$message({
+                                message: "添加成功",
+                                type: "success"
+                                });
+                                this.getMoulds();
+                            } else {
+                                this.$message({
+                                message: res.msg,
+                                type: "error"
+                                });
+                            }
+                        },
+                        error => {
+                            this.editLoading = false;
+                            this.editFormVisible = false;
+                            this.$message({
+                                message: error,
+                                type: "error"
+                            });
+                        });
+                    }
                 });
                 });
-              }
             },
             },
-            error => {
-              this.editLoading = false;
-              this.editFormVisible = false;
-              this.$message({
-                message: error,
-                type: "error"
-              });
+
+            //启用设备
+            enable(index) {
+                this.allocations[index].isUse = 1;
+                this.http.post( this.port.base.enableMould, {
+                    id: this.allocations[index].id,
+                    isUse: 1
+                },
+                res => {
+                    if (res.code == "ok") {
+                        this.$message({
+                            message: "修改成功",
+                            type: "success"
+                        });
+                        this.getMoulds();
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: "error"
+                        });
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
             }
             }
-          );
-        }
-      });
-    },
-    //启用设备
-    enable(index) {
-      this.allocations[index].isUse = 1;
-      this.http.post(
-        this.port.base.enableMould,
-        {
-          id: this.allocations[index].id,
-          isUse: 1
         },
         },
-        res => {
-          if (res.code == "ok") {
-            this.$message({
-              message: "修改成功",
-              type: "success"
-            });
-            this.getMoulds();
-          } else {
-            this.$message({
-              message: res.msg,
-              type: "error"
-            });
-          }
+        created() {
+            let height = window.innerHeight;
+            this.tableHeight = height - 210;
         },
         },
-        error => {
-          this.$message({
-            message: error,
-            type: "error"
-          });
-        }
-      );
-    }
-  },
-  created() {
-    let height = window.innerHeight;
-    this.tableHeight = height - 210;
-  },
-  mounted() {
-    //获取模具列表
-    this.getMoulds();
-    //获取公司下拉列表
-    this.http.post(
-      this.port.base.comps,
-      {},
-      res => {
-        if (res.code == "ok") {
-          this.companies = res.data;
-        } else {
-          this.$message({
-            message: res.msg,
-            type: "error"
-          });
+        mounted() {
+            this.getMsg();
+            //获取模具列表
+            this.getMoulds();
         }
         }
-      },
-      error => {
-        this.$message({
-          message: error,
-          type: "error"
-        });
-      }
-    );
-  }
-};
+    };
 </script>
 </script>
 
 
 <style scoped>
 <style scoped>

+ 14 - 7
ys_vue/src/views/mold/moldDetail.vue

@@ -2,11 +2,6 @@
     <section>
     <section>
         <!--工具条-->
         <!--工具条-->
         <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
         <el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
-            <!-- <el-form :inline="true">
-                <el-form-item>
-                    <el-button type="primary" @click="backToList">返回</el-button>
-                </el-form-item>
-            </el-form> -->
             <el-form :inline="true">
             <el-form :inline="true">
                 <el-form-item>
                 <el-form-item>
                     <el-button type="text" @click="backToList" icon="el-icon-back" class="back">返回</el-button>
                     <el-button type="text" @click="backToList" icon="el-icon-back" class="back">返回</el-button>
@@ -24,7 +19,9 @@
             </el-form>
             </el-form>
         </el-col>
         </el-col>
         <el-col :span="24" :style="allDetail">
         <el-col :span="24" :style="allDetail">
-            <el-col :span="24" class="title">模具基本信息</el-col>
+            <el-col :span="24" class="title">模具基本信息
+                <i class="el-icon-edit editDetail" ></i>
+            </el-col>
             <el-col :span="24" class="main">
             <el-col :span="24" class="main">
                 <el-col :span="6" class="detail">
                 <el-col :span="6" class="detail">
                     云模盒编号:
                     云模盒编号:
@@ -72,7 +69,11 @@
                   </el-col>
                   </el-col>
             </el-col>
             </el-col>
 
 
-            <el-col :span="24" class="title">文档资料</el-col>
+            <el-col :span="24" class="title">文档资料
+                <el-upload class="upload-demo" action="customize" :http-request="uploadFile" :show-file-list="false" multiple :limit="5" style="float:right;">
+                    <el-button size="small" type="primary">点击上传</el-button>
+                </el-upload>
+            </el-col>
             <el-col :span="24">
             <el-col :span="24">
                 <el-tabs v-model="activePage" @tab-click="handleClick">
                 <el-tabs v-model="activePage" @tab-click="handleClick">
                     <el-tab-pane label="模具文档" name="0">
                     <el-tab-pane label="模具文档" name="0">
@@ -229,6 +230,12 @@
         border-left: 1px blue solid;
         border-left: 1px blue solid;
     }
     }
 
 
+    .editDetail {
+        margin-left: 10px;
+        color:#20a0ff;
+        cursor: pointer;
+    }
+
     .info {
     .info {
         color: grey;
         color: grey;
     }
     }

+ 26 - 27
ys_vue/src/views/mold/moldList.vue

@@ -144,8 +144,9 @@
                     }
                     }
                 ],
                 ],
                 filters: {
                 filters: {
-                    name: "",
-                    value: ""
+                    keyName: "",
+                    serchType: -1,
+                    projectId: ""
                 },
                 },
                 
                 
                 formRules: {
                 formRules: {
@@ -206,31 +207,29 @@
 
 
             //获取模具列表
             //获取模具列表
             getMoldList() {
             getMoldList() {
-                // this.listLoading = true;
-                // this.http.post(this.port.mold.modelList, {
-                //     keyName: this.filters.keyName,
-                //     currentPage: this.page,
-                //     pageSize: this.size,
-                //     companyId: this.filters.companyId==''?-1:this.filters.companyId,
-                //     flag: this.filters.flag=='姓名'?0:this.filters.flag
-                // }, res => {
-                //     this.listLoading = false;
-                //     if (res.code == "ok") {
-                //         this.list = res.data.list;
-                //         this.total = res.data.total;
-                //     } else {
-                //         this.$message({
-                //             message: res.msg,
-                //             type: 'error'
-                //         });
-                //     }
-                // }, error => {
-                //     this.listLoading = false;
-                //     this.$message({
-                //         message: error,
-                //         type: 'error'
-                //     });
-                // })
+                this.listLoading = true;
+                this.http.post(this.port.mold.molds, {
+                    keyName: this.filters.keyName,
+                    currentPage: this.page,
+                    pageSize: this.size
+                }, res => {
+                    this.listLoading = false;
+                    if (res.code == "ok") {
+                        this.molds = res.data.list;
+                        this.total = res.data.total;
+                    } else {
+                        this.$message({
+                            message: res.msg,
+                            type: 'error'
+                        });
+                    }
+                }, error => {
+                    this.listLoading = false;
+                    this.$message({
+                        message: error,
+                        type: 'error'
+                    });
+                })
             },
             },
             //详情
             //详情
             toDetail(id) {
             toDetail(id) {