Prechádzať zdrojové kódy

add:录单增加公司字段

yangdamao 3 rokov pred
rodič
commit
037e4cd10a

+ 2 - 1
.env.development

@@ -5,7 +5,8 @@ VUE_APP_TITLE =中正云教育管理后台
 ENV = 'development'
 
 # 中正云教育管理后台/开发环境
-VUE_APP_BASE_API = 'http://192.168.1.222:5030/'
+# VUE_APP_BASE_API = 'http://192.168.1.222:5030/'
+VUE_APP_BASE_API = 'http://localhost:5030/'
 VUE_APP_IMG_API = 'https://file-dev.xyyxt.net'
 
 # 路由懒加载

+ 1 - 0
.gitignore

@@ -1,4 +1,5 @@
 .DS_Store
+.history
 node_modules/
 dist/
 npm-debug.log*

+ 22 - 2
src/views/Marketing/order/offlineOrder/batchRecord/firstStep/index.vue

@@ -174,6 +174,10 @@ export default {
           label: "学员身份证",
           prop: "idCard",
         },
+        {
+          label: "所在公司",
+          prop: "companyName",
+        },
         {
           label: "科目",
           prop: "subjectIds",
@@ -263,8 +267,24 @@ export default {
           item.subjectIds = []
         }
       });
-      let newObjs = this.tableData.concat(ays);
-      this.tableData = this.$methodsTools.uniqueFunc(newObjs, "userId");
+      if(this.tableData && this.tableData.length > 0){
+        const data = new Set()
+        this.tableData.forEach((item) => {
+          ays.forEach((as) => {
+            if(item.telphone == as.telphone){
+              item.companyName = as.companyName
+            }else{
+              data.add(as)
+            }
+          })
+        })
+        if(data && data.size > 0){
+          let newObjs = this.tableData.concat(Array.from(data));
+          this.tableData = this.$methodsTools.uniqueFunc(newObjs, "userId");
+        }
+      }else{
+        this.tableData = ays
+      }
     },
     /**
      * 导入

+ 4 - 0
src/views/Marketing/order/offlineOrder/batchRecord/firstStep/uploadStudent.vue

@@ -173,6 +173,10 @@ export default {
           label: "学员身份证",
           prop: "idCard",
         },
+        {
+          label: "所在公司",
+          prop: "companyName",
+        },
         {
           label: "绑定手机号码",
           prop: "telphone",