Przeglądaj źródła

修改托运人

胡半仙 3 lat temu
rodzic
commit
c21bac638c

+ 2 - 2
build/utils.js

@@ -16,11 +16,11 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //       统计报表       组织机构/系统管理 采购  仓储
 //  'statisticalReport','systemConfig','TMS','WMS','workFlow']
 
- let devModules = ['all']
+//  let devModules = ['all']
 // let devModules = ['index','inward']
 //  let devModules = ['index','WMS','sale','TMS','inward','SporadicManage']
 // let devModules = ['index','SporadicManage','TMS','statisticalReport','RMS'];
-// let devModules = ['index','appoint','WMS'];
+let devModules = ['index','RMS'];
 
 
 if (pathSrc.indexOf('node_modules') > -1) {

+ 2 - 2
config/index.js

@@ -64,8 +64,8 @@ let proxyTable = {
   },
   // 所有数据的请求域名地址
   "/api/v1": {
-    target: "http://172.16.33.166:8080",
-    // target: "http://localhost:8081",
+    // target: "http://172.16.33.166:8080",
+    target: "http://localhost:8019",
     // target: "http://localhost:8082",
     ws: true,
     pathRewrite: {

+ 62 - 3
src/views/RMS/components/addRmsShipper.vue

@@ -6,6 +6,22 @@
        <!-- 323 -->
         <dil-form :formId="323" v-model="form1" ref="from1"></dil-form>
       </div>
+      <div class="department2">
+         <span>二级部门:</span>
+        <el-select v-model="value1" placeholder="请选择" @change="onchange1">
+          <el-option
+            v-for="(item,i) in options1"
+            :key="i"
+            :label="item.label"
+            :value="item.value"
+            >
+            </el-option>
+          </el-select>       
+      </div>
+      <div class="department2">
+        <span>三级部门:</span>
+        <el-input v-model="input" placeholder="请输入内容"></el-input>
+      </div>
     <div class="button-box">
       <el-button @click="cancel">取消</el-button>
       <el-button type="primary" @click="makeSure">确定</el-button>
@@ -23,22 +39,59 @@ export default {
       form1: {},
       value: undefined,
       shipperName:"四川达钢",
-      shipperAbbreviation:"四川达钢"
+      shipperAbbreviation:"四川达钢",
+      //二级部门
+      options1:[],
+      //选中的二级部门名称
+      value1:'',
+      input:''
     };
   },
   mounted() {
     this.form1.shipperName = this.shipperName;
     this.form1.shipperAbbreviation = this.shipperAbbreviation;
+    //初始化二级机构和角色
+    this.initialization();
   },
   methods: {
+    initialization(){
+       //初始化选择二级机构
+         this.axios.get('/api/v1/rms/getSecondShipper').then((res)=>{
+             this.options1 = res.data.data;
+         })
+         //初始化角色
+        const formData = new FormData();
+        this.$store.dispatch('system/rolesManage/list',formData)
+        .then((res)=>{
+          var roleList = [];
+          roleList=res.data;
+          roleList.forEach((item,i)=>{
+              if(item.roleId!='superadmin'){
+                this.options3.push(item);
+              }
+          })
+          // this.options3 = res.data;
+        })
+     },
+    onchange1(val){
+            //  查询选中的二级机构下的三级机构
+             this.value2 = '';
+             this.axios.get('/api/v1/rms/getThirdShipper?shipperId='+val).then((res)=>{
+             this.options2 = res.data.data;    
+         })
+         //获取二级部门的机构ID和机构编码
+         this.axios.post('/api/v1/rms/getShipperMap?shipperId='+val).then((res)=>{
+             this.map1 = res.data.data;
+         })
+     },
      makeSure() {
        console.log(this.form1)
        let RmsShipper={
         shipperName: this.form1.shipperName,
         shipperAbbreviation: this.form1.shipperAbbreviation,
         shipperId:this.form1.shipperId,
-        shipperCompanyBranch:this.form1.shipperCompanyBranch,
-        shipperBranchFactory:this.form1.shipperBranchFactory
+        shipperCompanyBranch:this.value1,
+        shipperBranchFactory:this.input
       };
       if(
         RmsShipper.shipperName==null ||
@@ -102,4 +155,10 @@ export default {
     }
   }
 }
+.department2{
+  display: flex;
+  justify-content: center;
+  margin-left: 36%;
+  width: 250px;
+}
 </style>

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

@@ -46,13 +46,13 @@ export default {
       inputText:"",
       options:{
         // first请求数据的地址
-        requestUrl: "/api/v1/rms/getShipperList?apiId=344",
+        requestUrl: "/api/v1/rms/getShipperList?apiId=451",
       },
     }
   },
   methods:{
     onclick(){
-      this.options.requestUrl="/api/v1/rms/getShipperList?apiId=344&con=" + this.inputText;
+      this.options.requestUrl="/api/v1/rms/getShipperList?apiId=451&con=" + this.inputText;
       console.log(this.textInput)
     },
     toInsert() {