Browse Source

Merge branch 'master' of http://47.100.37.243:10080/ZHOU/yunsu

5 years ago
parent
commit
5b59d4f65f

+ 0 - 1
ys_vue/src/views/base/comp.vue

@@ -123,7 +123,6 @@
                     return callback(new Error('请输入联系方式'));
                     return callback(new Error('请输入联系方式'));
                 } else {
                 } else {
                     const reg = /^1[0-9]\d{9}$/
                     const reg = /^1[0-9]\d{9}$/
-                    console.log(reg.test(value));
                     if (reg.test(value)) {
                     if (reg.test(value)) {
                         callback();
                         callback();
                     } else {
                     } else {

+ 2 - 4
ys_vue/src/views/base/factory.vue

@@ -58,7 +58,7 @@
 					<el-input v-model="addForm.companyName" autocomplete="off" placeholder="请输入生产方名称"></el-input>
 					<el-input v-model="addForm.companyName" autocomplete="off" placeholder="请输入生产方名称"></el-input>
 				</el-form-item>
 				</el-form-item>
                 <el-form-item label="关联资产方" v-show="addState">
                 <el-form-item label="关联资产方" v-show="addState">
-                    <el-select v-model="addForm.companyIds" clearable multiple filterable placeholder="请选择产方" style="width:533px">
+                    <el-select v-model="addForm.companyIds" clearable multiple filterable placeholder="请选择产方" style="width:533px">
                         <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
                         <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
                         </el-option>
                         </el-option>
                     </el-select>
                     </el-select>
@@ -93,7 +93,7 @@
 					<el-input v-model="editForm.companyName" autocomplete="off" placeholder="请输入生产方名称"></el-input>
 					<el-input v-model="editForm.companyName" autocomplete="off" placeholder="请输入生产方名称"></el-input>
 				</el-form-item>
 				</el-form-item>
                 <el-form-item label="关联资产方">
                 <el-form-item label="关联资产方">
-                    <el-select v-model="editForm.companyIds" clearable multiple filterable placeholder="请选择产方" style="width:533px">
+                    <el-select v-model="editForm.companyIds" clearable multiple filterable placeholder="请选择产方" style="width:533px">
                         <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
                         <el-option v-for="item in companys" :key="item.id" :label="item.companyName" :value="item.id">
                         </el-option>
                         </el-option>
                     </el-select>
                     </el-select>
@@ -430,7 +430,6 @@
                     companyIds: array,
                     companyIds: array,
                     flag: 1
                     flag: 1
                 };
                 };
-                console.log(this.editForm.companyIds)
             },
             },
             
             
 			//编辑
 			//编辑
@@ -439,7 +438,6 @@
 					if (valid) {
 					if (valid) {
                         this.editLoading = true;
                         this.editLoading = true;
                         var str = "";
                         var str = "";
-                        console.log(this.editForm.companyIds.length)
                         for(var i in this.editForm.companyIds){
                         for(var i in this.editForm.companyIds){
                             if(i == this.editForm.companyIds.length-1){
                             if(i == this.editForm.companyIds.length-1){
                                 str += this.editForm.companyIds[i]
                                 str += this.editForm.companyIds[i]

+ 0 - 1
ys_vue/src/views/map/map.vue

@@ -267,7 +267,6 @@
                             return null;
                             return null;
                         }
                         }
                         // var parts = item.split(',');
                         // var parts = item.split(',');
-                        // console.log(item)
                         //返回经纬度
                         //返回经纬度
                         //return [parseFloat(parts[0]), parseFloat(parts[1])];
                         //return [parseFloat(parts[0]), parseFloat(parts[1])];
                         return [parseFloat(item.lng), parseFloat(item.lat)];
                         return [parseFloat(item.lng), parseFloat(item.lat)];

+ 33 - 20
ys_vue/src/views/message.vue

@@ -14,12 +14,15 @@
       <el-tabs v-model="activePage" @tab-click="handleClick" type="card">
       <el-tabs v-model="activePage" @tab-click="handleClick" type="card">
         <el-tab-pane name="0" label="审批">
         <el-tab-pane name="0" label="审批">
           <div :style="heightString">
           <div :style="heightString">
-            <div class="message-div" v-for="item in messages[0]">
+            <span v-if="messages[0].length == 0">目前暂无消息</span>
+            <div
+              class="message-div"
+              v-for="item in messages[0]"
+              @click="locationHerf(item.id, item.refId, item.noticeType)"
+            >
               <p>
               <p>
-                <span
-                  class="message-title"
-                  @click="locationHerf(item.refId, item.noticeType)"
-                >{{item.projectName}}</span>
+                <span class="message-title isRead" v-if="item.isRead == 1">{{item.projectName}}</span>
+                <span class="message-title" v-else>{{item.projectName}}</span>
                 <span class="message-time">{{item.indate}}</span>
                 <span class="message-time">{{item.indate}}</span>
               </p>
               </p>
               <p class="message-article">{{item.content}}</p>
               <p class="message-article">{{item.content}}</p>
@@ -40,12 +43,15 @@
         </el-tab-pane>
         </el-tab-pane>
         <el-tab-pane name="1" label="警告">
         <el-tab-pane name="1" label="警告">
           <div :style="heightString">
           <div :style="heightString">
-            <div class="message-div" v-for="item in messages[1]">
+            <span v-if="messages[1].length == 0">目前暂无消息</span>
+            <div
+              class="message-div"
+              v-for="item in messages[1]"
+              @click="locationHerf(item.id, item.refId, item.noticeType)"
+            >
               <p>
               <p>
-                <span
-                  class="message-title"
-                  @click="locationHerf(item.refId, item.noticeType)"
-                >{{item.projectName}}</span>
+                <span class="message-title isRead" v-if="item.isRead == 1">{{item.projectName}}</span>
+                <span class="message-title" v-else>{{item.projectName}}</span>
                 <span class="message-time">{{item.indate}}</span>
                 <span class="message-time">{{item.indate}}</span>
               </p>
               </p>
               <p class="message-article">{{item.content}}</p>
               <p class="message-article">{{item.content}}</p>
@@ -66,12 +72,15 @@
         </el-tab-pane>
         </el-tab-pane>
         <el-tab-pane name="2" label="保养">
         <el-tab-pane name="2" label="保养">
           <div :style="heightString">
           <div :style="heightString">
-            <div class="message-div" v-for="item in messages[2]">
+            <span v-if="messages[2].length == 0">目前暂无消息</span>
+            <div
+              class="message-div"
+              v-for="item in messages[2]"
+              @click="locationHerf(item.id, item.refId, item.noticeType)"
+            >
               <p>
               <p>
-                <span
-                  class="message-title"
-                  @click="locationHerf(item.refId, item.noticeType)"
-                >{{item.projectName}}</span>
+                <span class="message-title isRead" v-if="item.isRead == 1">{{item.projectName}}</span>
+                <span class="message-title" v-else>{{item.projectName}}</span>
                 <span class="message-time">{{item.indate}}</span>
                 <span class="message-time">{{item.indate}}</span>
               </p>
               </p>
               <p class="message-article">{{item.content}}</p>
               <p class="message-article">{{item.content}}</p>
@@ -100,7 +109,7 @@ import util from "../common/js/util";
 export default {
 export default {
   data() {
   data() {
     return {
     return {
-      messages: [],
+      messages: [[], [], []],
       page0: 1,
       page0: 1,
       page1: 1,
       page1: 1,
       page2: 1,
       page2: 1,
@@ -176,7 +185,7 @@ export default {
       );
       );
     },
     },
     //点击消息的跳转
     //点击消息的跳转
-    locationHerf(id, type) {
+    locationHerf(id, refid, type) {
       this.http.post(
       this.http.post(
         this.port.notice.read,
         this.port.notice.read,
         {
         {
@@ -200,13 +209,13 @@ export default {
       );
       );
       if (type == 0) {
       if (type == 0) {
         //审批 跳转到模具详情
         //审批 跳转到模具详情
-        this.$router.push("/moldList/" + id);
+        this.$router.push("/moldList/" + refid);
       } else if (type == 1) {
       } else if (type == 1) {
         //警告 跳转到运行监测
         //警告 跳转到运行监测
         this.$router.push("/detection");
         this.$router.push("/detection");
       } else if (type == 2) {
       } else if (type == 2) {
         //保养 跳转到运行监测详情
         //保养 跳转到运行监测详情
-        this.$router.push("/detection/" + id);
+        this.$router.push("/detection/" + refid);
       }
       }
     }
     }
   },
   },
@@ -223,6 +232,7 @@ export default {
 
 
 <style scoped>
 <style scoped>
 .message-div {
 .message-div {
+  cursor: pointer;
   padding: 5px 0;
   padding: 5px 0;
 }
 }
 
 
@@ -241,11 +251,14 @@ export default {
 }
 }
 
 
 .message-title {
 .message-title {
-  cursor: pointer;
   color: #409eff;
   color: #409eff;
 }
 }
 
 
 .message-article {
 .message-article {
   color: #555;
   color: #555;
 }
 }
+
+.isRead {
+  color: #999 !important;
+}
 </style>
 </style>

+ 23 - 18
ys_vue/src/views/mold/moldDetail.vue

@@ -371,19 +371,23 @@
                     <el-table :data="documents.abandon" highlight-current-row v-loading="listLoading" style="width: 100%;">
                     <el-table :data="documents.abandon" highlight-current-row v-loading="listLoading" style="width: 100%;">
                         <el-table-column type="index" width="40"></el-table-column>
                         <el-table-column type="index" width="40"></el-table-column>
                         <el-table-column prop="fileName" label="申请单名称" sortable>
                         <el-table-column prop="fileName" label="申请单名称" sortable>
-                            <template slot-scope="scope" v-if="scope.row.fileUrl != null">
-                                <a v-if="download == 1 && scope.row.state == 3" :href="scope.row.fileUrl" :download="scope.row.fileName" @click="dowloadfile(scope.row.id)">
-                                    {{scope.row.fileName}}
-                                </a>
+                            <template slot-scope="scope">
+                                <div v-if="scope.row.fileUrl != null">
+                                    <a style="color:#20a0ff" v-if="download == 1 && scope.row.state == 3" :href="scope.row.fileUrl" :download="scope.row.fileName" @click="dowloadfile(scope.row.id)">
+                                        {{scope.row.fileName}}
+                                    </a>
+                                </div>
                                 <span v-else>{{scope.row.fileName}}</span>
                                 <span v-else>{{scope.row.fileName}}</span>
                             </template>
                             </template>
                         </el-table-column>
                         </el-table-column>
                         <el-table-column prop="fileSize" label="申请单大小" width="130" sortable></el-table-column>
                         <el-table-column prop="fileSize" label="申请单大小" width="130" sortable></el-table-column>
                         <el-table-column prop="fileName2" label="报废单名称" sortable>
                         <el-table-column prop="fileName2" label="报废单名称" sortable>
-                            <template slot-scope="scope" v-if="scope.row.fileUrl != null">
-                                <a v-if="download == 1 && scope.row.state == 3" :href="scope.row.fileUrl2" :download="scope.row.fileName2" @click="dowloadfile(scope.row.id)">
-                                    {{scope.row.fileName2}}
-                                </a>
+                            <template slot-scope="scope">
+                                <div v-if="scope.row.fileUrl != null">
+                                    <a style="color:#20a0ff" v-if="download == 1 && scope.row.state == 3" :href="scope.row.fileUrl2" :download="scope.row.fileName2" @click="dowloadfile(scope.row.id)">
+                                        {{scope.row.fileName2}}
+                                    </a>
+                                </div>
                                 <span v-else>{{scope.row.fileName2}}</span>
                                 <span v-else>{{scope.row.fileName2}}</span>
                             </template>
                             </template>
                         </el-table-column>
                         </el-table-column>
@@ -474,19 +478,21 @@
         </el-dialog>
         </el-dialog>
 
 
         <!-- 模具报废上传弹窗 -->
         <!-- 模具报废上传弹窗 -->
-        <el-dialog title="模具报废上传" :visible.sync="centerDialog2Visible" width="450px" :before-close="clearFileRecord">
-            <p style="height:60px;">
-                <span style="float:left;margin-right:30px;">申请单</span>
-                <el-upload ref="upload1" action="customize" :http-request="uploadDiscardFile1" :limit="1" :before-remove="beforeRemove1" style="float:left">
+        <el-dialog title="模具报废上传" :visible.sync="centerDialog2Visible" width="500px" :before-close="clearFileRecord">
+            <div >
+                <div style="height:30px;line-height:30px;">申请单</div>
+                <br>
+                <el-upload ref="upload1" action="customize" :http-request="uploadDiscardFile1" :limit="1" :before-remove="beforeRemove1">
                     <el-button size="small" type="primary">上传</el-button>
                     <el-button size="small" type="primary">上传</el-button>
                 </el-upload>
                 </el-upload>
-            </p>
-            <p style="height:60px;">
-                <span style="float:left;margin-right:30px;">报废单</span>
-                <el-upload ref="upload2" action="customize" :http-request="uploadDiscardFile2" :limit="1" :before-remove="beforeRemove2" style="float:left">
+            </div>
+            <div style="margin-top:15px;">
+                <div style="height:30px;line-height:30px;">报废单</div>
+                <br>
+                <el-upload ref="upload2" action="customize" :http-request="uploadDiscardFile2" :limit="1" :before-remove="beforeRemove2">
                     <el-button size="small" type="primary">上传</el-button>
                     <el-button size="small" type="primary">上传</el-button>
                 </el-upload>
                 </el-upload>
-            </p>
+            </div>
             <span slot="footer" class="dialog-footer">
             <span slot="footer" class="dialog-footer">
                 <el-button @click="discardUpload" :loading="uploading">确定</el-button>
                 <el-button @click="discardUpload" :loading="uploading">确定</el-button>
             </span>
             </span>
@@ -1429,7 +1435,6 @@
                         this.uploading = false;
                         this.uploading = false;
                     });
                     });
                 } else {
                 } else {
-                    console.log(this.files2);
                     this.$message({
                     this.$message({
                         message: "必须各上传一个文件",
                         message: "必须各上传一个文件",
                         type: "error"
                         type: "error"

+ 0 - 1
ys_vue/src/views/mold/moldDownload.vue

@@ -198,7 +198,6 @@ export default {
       row.forEach(item => {
       row.forEach(item => {
         this.selectedArray.push(item.id);
         this.selectedArray.push(item.id);
       });
       });
-      //console.log(this.selectedArray);
     },
     },
     //下载
     //下载
     download(type) {
     download(type) {

+ 1 - 1
ys_vue/src/views/project/project.vue

@@ -302,7 +302,7 @@
                         for(var i in this.addForm.mold){
                         for(var i in this.addForm.mold){
                             if(cId.indexOf(this.addForm.mold[i].produceCompanyId) == -1){
                             if(cId.indexOf(this.addForm.mold[i].produceCompanyId) == -1){
                                 cId += this.addForm.mold[i].produceCompanyId + ",";
                                 cId += this.addForm.mold[i].produceCompanyId + ",";
-                                cName += this.addForm.mold[i].produceCompany + ",";
+                                cName += this.addForm.mold[i].produceCompanyName + ",";
                             }
                             }
                             mId += this.addForm.mold[i].id + ","
                             mId += this.addForm.mold[i].id + ","
                         }
                         }

+ 4 - 2
ys_vue/src/views/project/projectDetail.vue

@@ -151,7 +151,7 @@
                         <el-select v-model="editForm.modelIds" @change="companyChange" clearable filterable multiple placeholder="请选择项目模具" value-key='id' style="width:510px">
                         <el-select v-model="editForm.modelIds" @change="companyChange" clearable filterable multiple placeholder="请选择项目模具" value-key='id' style="width:510px">
                             <el-option v-for="item in molds" :key="item.id" :label="item.modelName" :value="item">
                             <el-option v-for="item in molds" :key="item.id" :label="item.modelName" :value="item">
                                 <span style="float: left">{{ item.modelName }}</span>
                                 <span style="float: left">{{ item.modelName }}</span>
-                                <span style="float: right; color: #8492a6; font-size: 6px;margin-right:17px;">{{ item.produceCompany }}</span>
+                                <span style="float: right; color: #8492a6; font-size: 6px;margin-right:17px;">{{ item.produceCompanyName }}</span>
                             </el-option>
                             </el-option>
                         </el-select>
                         </el-select>
                     </el-form-item>
                     </el-form-item>
@@ -630,7 +630,9 @@
                                 produce.push(list[i])
                                 produce.push(list[i])
                             }
                             }
                         }
                         }
-
+                        this.editForm.managerId = "";
+                        this.editForm.customerApproverId = "";
+                        this.editForm.users = [];
                         this.allUser = res.data;
                         this.allUser = res.data;
                         this.charger = res.data;
                         this.charger = res.data;
                         this.assets = assets;
                         this.assets = assets;