浏览代码

修改bug

lichao 3 年之前
父节点
当前提交
f30b6602ed

+ 8 - 4
src/page/index/top/top-notice.vue

@@ -30,6 +30,7 @@
 
 <script>
   import { getMsgLogs , getMsgDetail,getMessage } from "@/api/logs";
+  import { getToken } from "@/util/auth";
 export default {
   name: "top-notice",
   data () {
@@ -110,10 +111,13 @@ export default {
       console.log("socket已经关闭")
     },
     assistMessage(){
-      //辅助消息接口
-      getMessage().then(res=>{
-        this.getMessage(JSON.stringify(res))
-      })
+      // 判断是否有token
+      if (getToken() !== undefined) {
+        //辅助消息接口
+        getMessage().then(res=>{
+          this.getMessage(JSON.stringify(res))
+        })
+      }
     },
     goUrl(row){
       if(row.url){

+ 2 - 0
src/views/dealer/purchase/detail.vue

@@ -142,6 +142,7 @@
                 type="primary"
                 size="small"
                 icon="el-icon-upload"
+                :disabled="disabled || confirmDisabled"
               >导 入</el-button>
             </el-upload>
           </template>
@@ -1332,6 +1333,7 @@ export default {
       res.data.forEach(item => {
       })
       this.dataList = this.dataList.concat(res.data)
+      this.$message.success('导入成功')
     },
     uploadError(err, file, fileList) {
       this.openFullScreen(true)

+ 2 - 0
src/views/dealer/purchaseContract/detail.vue

@@ -167,6 +167,7 @@
                 type="primary"
                 size="small"
                 icon="el-icon-upload"
+                :disabled="disabled || confirmDisabled || checkDisabled"
               >导 入</el-button>
             </el-upload>
           </template>
@@ -1404,6 +1405,7 @@ export default {
       res.data.forEach(item => {
       })
       this.dataList = this.dataList.concat(res.data)
+      this.$message.success('导入成功')
     },
     uploadError(err, file, fileList) {
       this.openFullScreen(true)

+ 23 - 4
src/views/workManagement/handoverSheet/detail.vue

@@ -111,6 +111,25 @@
               ></el-option>
             </el-select>
           </template>
+          <template slot="handingUserName">
+            <el-select
+              v-model="form.handingUserName"
+              filterable
+              clearable
+              allow-create
+              default-first-option
+              size="small"
+              placeholder="请选择"
+              :disabled="disabled || checkDisabled || form.chargeStatus == 0 || confirmDisabled"
+            >
+              <el-option
+                v-for="(item,index) in userList"
+                :key="index"
+                :label="item.realName"
+                :value="item.realName"
+              ></el-option>
+            </el-select>
+          </template>
           <template slot="external">
             <el-switch
               v-model="form.external"
@@ -328,7 +347,7 @@ export default {
   data() {
     const validateHandingUser = (rule, value, callback) => {
       if (this.form.chargeStatus == 1 && !this.form.handingUser) {
-        callback(new Error('接人不能为空'))
+        callback(new Error('接人不能为空'))
       } else {
         callback()
       }
@@ -392,7 +411,7 @@ export default {
             span: 8,
           },
           {
-            label: "接人",
+            label: "接人",
             prop: "handingUser",
             span: 8,
             rules: [
@@ -738,9 +757,9 @@ export default {
     chargeStatusChange(data) {
       if (data === 0) this.form.handingUser = null;
     },
-    // 接人选择触发
+    // 接人选择触发
     handingUserChange(data) {
-      this.$set(this.form, 'handingUserName', this.userList.find(item => data == item.id).realName);
+      this.$set(this.form, 'handingUserName', this.userList.find(item => data == item.id)? this.userList.find(item => data == item.id).realName: null);
     },
     // 提交确认
     submitConfirm() {