huk 3 năm trước cách đây
mục cha
commit
6f5f8779f6

+ 1 - 16
build/utils.js

@@ -15,22 +15,7 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 // ['index', 'sales', '  ', 'standard', 'qualityControl', 'produce', 'workshop',
 //    物流         进程     成本   报表          基础配置        系统配置
 //  'logistics', 'process', '   ', 'reportform', 'basicconfig', 'system']
-// let devModules = ['index', 'qualityControl', 'standard', 'basicconfig'];
-// let devModules = ['index','devops','workFlow','systemConfig', 'microService'];
-// let devModules = ['all'];
-// let devModules = ['index','TMS','RMS']
-// let devModules = ['index','SporadicManage','TMS']
-// let devModules = ['index','SporadicManage'];
-// let devModules = ['index','systemConfig', 'formGenerator', 'preview', 'metaData', 'serviceManager', 'configManager', 'custom'];
-// let devModules = ['index', 'systemConfig','formGenerator', 'preview', 'metaData', 'serviceManager', 'configManager', 'btnControll'];
- //let devModules = ['all'];
-// let devModules = ['index','RMS']
-//let devModules = ['index','SporadicManage','TMS']
-// let devModules = ['index','SporadicManage'];
-// let devModules = ['index','systemConfig', 'formGenerator', 'preview', 'metaData', 'serviceManager', 'configManager', 'custom'];
-// let devModules = ['index', 'systemConfig','formGenerator', 'preview', 'metaData', 'serviceManager', 'configManager', 'btnControll'];
-// let devModules = ['index','inward','SporadicManage']
-let devModules = ['index','RMS']
+let devModules = ['index','RMS','systemConfig']
 // let devModules = ['all'];
 // let devModules = ['index','inward','appoint','sale']
 

+ 1 - 1
config/index.js

@@ -56,7 +56,7 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://172.16.33.166:8080",
+    target: "http://192.168.1.113:8080",
     ws: true,
     pathRewrite: {
       "^/api/v1": "/api/v1"

+ 1 - 3
index.html

@@ -4,9 +4,7 @@
     <meta charset="utf-8">
     <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
     <title>工业互联网平台 iCore-ICP</title>
-    <script>
-     
-      window.location.href='./views/download.html';
+    <script> window.location.href='./views/download.html';
     </script>
   </head>
   <body>

+ 0 - 14
src/js/QueueStartList.js

@@ -1,14 +0,0 @@
-import axios from 'axios'
-//返回月台
-export function loadingPoint(URL){
-  let loadingpoint = []
-  axios.get(URL).then((res)=>{
-    res.data.data.forEach(e => {
-      let arr = {
-          value:e.GRID_NAME
-      };
-    loadingpoint.push(arr)
-    });
-  })
-  return loadingpoint;
-}

+ 0 - 47
src/js/sharedJsFile.js

@@ -1,47 +0,0 @@
- //把时间戳改为正常可读的时间
-export function renderTime(date) {
-    if(date !== null){
-        let dateee = new Date(date).toJSON();
-        return new Date(+new Date(dateee) + 8 * 3600 * 1000).toISOString().replace(/T/g, " ").replace(/\.[\d]{3}Z/, "");
-    }
-    return null;
-}
-//把毫秒数转换分
-export function getDuration(my_time) { 
-    if(my_time !== null){
-        return Math.floor(my_time / 1000 / 60);
-    }
-    return null;
-}
-export function sjTime(orderPlanInTime) {
-    var stringTime = renderTime(orderPlanInTime);
-    var timestamp1 = stringTime.replace(/-/g, "/");
-    return new Date(timestamp1).getTime();
-}
-//验证电话号码
-export function VerifyPhoneNumber(Phone) {
-    var myreg=/^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
-    if (!myreg.test(Phone)) {
-        return false;
-    } else {
-        return true;
-    }
-}
-export function isNumber(value) {
-    //验证是否为数字
-    var patrn = /^(-)?\d+(\.\d+)?$/;
-    if (patrn.exec(value) == null || value == "") {
-      return false;
-    } else {
-      return true;
-    }
-  }
-export function isIntegerNumber(value) {
-    //验证是否为整数
-    var patrn = /^\+?[1-9][0-9]*$/g;
-    if (patrn.exec(value) == null || value == "") {
-      return false;
-    } else {
-      return true;
-    }
-  }

+ 55 - 14
src/views/RMS/components/addCarrier.vue

@@ -12,6 +12,16 @@
       >
       </el-input>
     </div>
+    <div class="user_code">
+      <span class="text">用户名</span>
+      <el-input
+        class="input"
+        placeholder="请输入用户名(必填项)"
+        v-model="user_Name"
+        clearable
+      >
+      </el-input>
+    </div>
     <div class="form_box" style="margin-right: 10rem">
       <dil-form :formId="330" v-model="form1"></dil-form>
     </div>
@@ -118,6 +128,7 @@ export default {
   components: { PageTitle },
   data() {
     return {
+      user_Name:'',
       //营业执照
       businessLicense1: null,
       //营业执照
@@ -149,6 +160,14 @@ export default {
     };
   },
   methods: {
+    VerifyPhoneNumber(Phone) {
+      var myreg=/^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
+      if (!myreg.test(Phone)) {
+          return false;
+      } else {
+          return true;
+      }
+    },
     upCLick(val) {
       this.num = val;
     },
@@ -207,21 +226,26 @@ export default {
     },
     makeSure() {
       let status = false;
+      this.form1.carrierContactNumber = parseInt(this.form1.carrierContactNumber);
       if (!this.input) {
         this.$message.error("账号不能为空");
-      } else if (!this.form1.carrierName) {
+      } else if(!this.user_Name){
+        this.$message.error("用户名不能为空");
+      }else if (!this.form1.carrierName) {
         this.$message.error("承运商名称不能为空");
       } else if (!this.form1.carrierType) {
         this.$message.error("承运商类型不能为空");
-      }
-      //  else if (!this.imageUrl1) {
-      //   this.$message.error("请上传运输证");
-      // } else if (!this.imageUrl2) {
-      //   this.$message.error("请上传经营许可证");
-      // } else if (!this.imageUrl3) {
-      //   this.$message.error("请上传营业执照");
-      // }
-      else {
+      }else if(!this.form1.contactsName){
+        this.$message.error("联系人不能为空");
+      }else if(!this.form1.carrierContactNumber){
+        this.$message.error("联系电话不能为空");
+      }else if (!this.imageUrl1) {
+        this.$message.error("请上传运输证");
+      } else if (!this.imageUrl2) {
+        this.$message.error("请上传经营许可证");
+      } else if (!this.imageUrl3) {
+        this.$message.error("请上传营业执照");
+      }else {
         status = true;
       }
       if (this.form1.registerDate) {
@@ -234,7 +258,7 @@ export default {
         }
         let fromData = new FormData();
         fromData.append("userCode", this.input);
-        fromData.append("userName", this.form1.carrierName);
+        fromData.append("userName", this.user_Name);
         fromData.append("orgCode", "chengyunshang");
         fromData.append("mobile", "133" + rand);
         fromData.append("email", "133" + rand + "@163.com");
@@ -246,6 +270,7 @@ export default {
         this.$store
           .dispatch("system/usersManage/addUser", fromData)
           .then((res) => {
+            console.log(1)
             if (res.code === "0") {
               let userId = res.data.userId;
               this.axios
@@ -257,31 +282,46 @@ export default {
                     "&roleId=924449091658846208"
                 )
                 .then((res) => {
+                  console.log(2)
                   if (res.code == "0") {
+                    //图片地址
                     let imageUrls = {
+                      //运输证
                       imageUrl1: this.imageUrl1,
+                      //经营许可证
                       imageUrl2: this.imageUrl2,
+                      //营业执照
                       imageUrl3: this.imageUrl3,
                     };
+                    //传给后端的数据
                     let mapValue = {
+                      //表单数据
                       from: this.form1,
+                      //图片数据
                       imageUrls: imageUrls,
+                      //sso的用户Id
                       userId: userId,
                     };
                     this.axios
                       .post("/api/v1/rms/insertCarrier", mapValue)
                       .then((res) => {
+                        console.log(2)
                         if (res.data.code == "200") {
+                          this.cancel();
                           this.$message.success("添加成功");
                         } else {
-                          this.$message.error("添加失败");
+                          this.axios
+                          .delete("pass/v1/sysusers/" + userId)
+                          .then((res) => {
+                            this.$message.error("添加失败");
+                          });
                         }
                       })
                       .catch(() => {
                         this.axios
                           .delete("pass/v1/sysusers/" + userId)
                           .then((res) => {
-                            console.log(res.data, "data");
+                            this.$message.error("添加失败");
                           });
                       });
                   }
@@ -302,11 +342,12 @@ export default {
   .user_code {
     display: flex;
     justify-content: center;
+    margin: 10px;
     .text {
       display: flex;
       justify-content: center;
       align-items: center;
-      margin-right: 15px;
+      margin-right: 10px;
     }
     .input {
       width: 250px;

+ 13 - 4
src/views/RMS/components/capacity.vue

@@ -25,13 +25,13 @@
             >
               修改
             </el-button>
-            <el-button
+            <!-- <el-button
               type="text"
               size="mini"
               @click="deleteCapacity(scope)"
             >
               删除
-            </el-button>
+            </el-button> -->
           </template>
         </el-table-column>
       </dilTable>
@@ -39,21 +39,30 @@
   </div>
 </template>
 <script>
+import { getCookie } from "@/utils/util.js";
 export default {
   data(){
     return{
      name:"homeworkPath",
      textInput:"",
      restaurants: [],
+     ssoId:null,
      options:{
         // first请求数据的地址
-        requestUrl: "/api/v1/rms/getCapacityList?apiId=397",
+        requestUrl: "",
       },
     }
   },
+  created(){
+    if(getCookie("orgCode") == "chengyunshang"){
+      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ getCookie("userId");
+    }else{
+      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId=" + this.ssoId;
+    }
+  },
   methods:{
     onclick(){
-      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&con=" +this.textInput;
+      this.options.requestUrl = "/api/v1/rms/getCapacityList?apiId=397&carrierSSOId="+ getCookie("userId") +"&con=" +this.textInput;
     },
      toInsert() {
       this.$router.push("/addCapacity");

+ 2 - 2
src/views/RMS/components/carrier.vue

@@ -18,9 +18,9 @@
             <el-button type="text" size="small" @click="updateCarrier(scope)">
               修改
             </el-button>
-            <el-button type="text" size="mini" @click="deleteCarrier(scope)">
+            <!-- <el-button type="text" size="mini" @click="deleteCarrier(scope)">
               删除
-            </el-button>
+            </el-button> -->
           </template>
         </el-table-column>
       </dilTable>

+ 20 - 18
src/views/RMS/components/editCarrier.vue

@@ -5,12 +5,12 @@
     <div class="main">
     </div>
     <div class="contractTitle">
-      <div class="form-box">
+      <div class="form_box">
           <dil-form :formId="330" v-model="form1"></dil-form>
       </div>
     </div>
 
-    <div class="form-box f1">
+    <div class="form_box f1">
       <el-form :inline="true" :model="formInline" class="demo-form-inline">
     <el-form-item>
     <el-button type="primary" @click="drawer = true">添加中标区域信息</el-button>
@@ -167,29 +167,31 @@ export default {
   },
 };
 </script>
-<style lang='scss' scoped>
- .form-box {
-    width: 100%;
-    margin-top: 30px;
+<style lang='scss'>
+
+  .form_box {
     display: flex;
     justify-content: center;
-    .el-form-item{
+    margin-left: 170px;
+    margin-top: 15px;
+    .el-form-item {
       display: flex;
       justify-content: center;
-      .el-form-item__label{
+      .el-form-item__label {
         display: flex;
         align-items: center;
       }
-      .el-form-item__content{
-         .el-select{
-            width: 250px;
-          }
-          .el-input{
-            width: 250px;
-          }
-      }
-       .el-radio{
-        width: 25px;
+      .el-form-item__content {
+        width: 250px;
+        .el-radio-group {
+          width: 500px;
+        }
+        .el-date-editor {
+          width: 250px;
+        }
+        .el-input__inner {
+          width: 250px;
+        }
       }
     }
   }

+ 1 - 9
src/views/homepage/app.js

@@ -48,15 +48,7 @@ export function sjTime(orderPlanInTime) {
   var timestamp1 = stringTime.replace(/-/g, "/");
   return new Date(timestamp1).getTime();
 }
-//验证电话号码
-export function VerifyPhoneNumber(Phone) {
-  var myreg=/^(13[0-9]|14[5|7]|15[0|1|2|3|4|5|6|7|8|9]|18[0|1|2|3|5|6|7|8|9])\d{8}$/;
-  if (!myreg.test(Phone)) {
-      return false;
-  } else {
-      return true;
-  }
-}
+
 export function isNumber(value) {
   //验证是否为数字
   var patrn = /^(-)?\d+(\.\d+)?$/;

+ 4 - 75
src/views/homepage/components/homepage.vue

@@ -1,84 +1,13 @@
 <template>
-  <div>
-    首页
-    <el-button @click="onClick">ces1</el-button>
-  </div>
+  <div>首页</div>
 </template>
 
 <script>
 export default {
-  methods: {
-    onClick() {
-      let data = {
-        userId: "",
-        userCode: "A12345",
-        userName: "A12345",
-        qrCode: "",
-        sex: "",
-        age: "",
-        cardNo: "",
-        birthDate: "",
-        nativePlace: "",
-        orgCode: "yunli",
-        orgName: "运力",
-        dep: "",
-        workTeam: "",
-        profilePhoto: "",
-        photo: "",
-        mobile: "13487481520",
-        qq: "",
-        wechat: "",
-        tel: "",
-        email: "213213@qq.com",
-        homeAddr: "",
-        entryDate: "",
-        workDate: "",
-        political: "",
-        title: "",
-        degree: "",
-        major: "",
-        gradSchool: "",
-        ability: "",
-        tranHis: "",
-        certificate: "",
-        special: "",
-        assessment: "",
-        leaveStatus: "",
-        onlineStatus: "",
-        status: "",
-        remark: "",
-        expireDays: "",
-        leave: "",
-        address: "",
-        ip: "",
-        rank: "",
-        responsibility: "",
-        groupData: "",
-        companyData: "",
-        groupId: "506514577756917769",
-        companyId: "713710108567277568",
-        photoType: "",
-        orgId: "922512907093282816",
-      };
-      this.store.dispatch("system/usersManage/addUser", data).then((res) => {
-        console.log(res);
-        if (res.code === "0") {
-          if (this.qrRole.length > 0) {
-            this.addRoleToUser(res.data.userId, res.data.userCode);
-          }
-          if (form.dutys.length > 0) {
-            this.addUserDutys(res.data.userId, form.dutys);
-          }
-          this.$message.success("添加成功");
-          this.$emit("on-then", "success", form);
-        } else {
-          this.$message.error(res.message);
-        }
-      });
-    },
-  },
-};
+
+}
 </script>
 
 <style>
+
 </style>

+ 2 - 0
src/views/index/components/login.vue

@@ -115,6 +115,7 @@ export default {
             .dispatch("index/login/login", form)
             .then((res) => {
               if (res.code === "0") {
+                console.log(res,"res")
                 //  登录成功
                 //  设置缓存信息
                 setCookie("accessToken", res.data.accessToken, cookieTime, "/");
@@ -124,6 +125,7 @@ export default {
                   cookieTime,
                   "/"
                 );
+                setCookie("orgCode", res.data.user.orgCode);
                 setCookie("userId", res.data.user.userId);
                 setCookie("appId", res.data.appId);
                 setCookie("loginId", res.data.user.userId); // 为配合bms取值添加