Your Name 3 år sedan
förälder
incheckning
0a70c3ce7a

+ 2 - 2
build/utils.js

@@ -16,9 +16,9 @@ const devPathSrc = path.resolve(__dirname, '../../../src'); // node_modules应
 //    物流         进程     成本   报表          基础配置        系统配置
 //  'logistics', 'process', '   ', 'reportform', 'basicconfig', 'system']
 // let devModules = ['index','RMS','systemConfig','TMS']
-let devModules = ['all'];
+// let devModules = ['all'];
 // let devModules = ['index','inward','appoint','sale']
-// let devModules = ['index','SporadicManage']
+let devModules = ['index','SporadicManage']
 if (pathSrc.indexOf('node_modules') > -1) {
     devModules = require('../../../cors.js').devModules;
 }

+ 2 - 2
src/assets/css/el/el-form.css

@@ -1,4 +1,4 @@
-.el-form-item {
+/* .el-form-item {
     margin-bottom: 13px;
 }
 
@@ -30,4 +30,4 @@
 .el-form--inline .el-form-item {
     margin-right: 5px;
 }
-
+ */

+ 2 - 2
src/assets/css/el/index.css

@@ -1,4 +1,4 @@
-@import './el-breadcrumb.css';
+/* @import './el-breadcrumb.css';
 @import './el-button.css';
 @import './el-checkbox.css';
 @import './el-date.css';
@@ -21,4 +21,4 @@
 
 .el-breadcrumb__inner, .el-breadcrumb__item:last-child .el-breadcrumb__inner, .el-breadcrumb__separator {
     color: #fff;
-}
+} */

+ 135 - 67
src/views/SporadicManage/components/sporadicMaterial/transportAppoint/addSporadicTransportAppoint.vue

@@ -7,35 +7,48 @@
         <el-form
         :inline="true"
         class="demo-form-inline"
-        :label-position="left"
         label-width="80px"
-      >
+        >
         <el-form-item label="发货单位">
-          <el-input v-model="supplierName" placeholder="必填" disabled>
-          </el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="ondrawer(2)">浏览</el-button>
+         <el-autocomplete
+          class="inline-input"
+          v-model="stateSupplier"
+          :fetch-suggestions="querySearchSupplier"
+          placeholder="请输入发货单位名称"
+          :trigger-on-focus="false"
+          @select="handleSelectSupplier"
+          @input="oninputSupplier"
+        >
+        <template slot-scope="{ item }">
+          <div class="name">{{ item.supplierName }}</div>
+        </template>
+        </el-autocomplete>
         </el-form-item>
         </el-form>
         <el-form
         :inline="true"
         class="demo-form-inline"
-        :label-position="left"
         label-width="80px"
-      >
+        >
         <el-form-item label="收货单位">
-          <el-input v-model="receiveName" placeholder="必填" disabled>
-          </el-input>
-        </el-form-item>
-        <el-form-item>
-          <el-button type="primary" @click="ondrawer(1)">浏览</el-button>
+         <el-autocomplete
+          class="inline-input"
+          v-model="stateConsignee"
+          :fetch-suggestions="querySearchConsignee"
+          placeholder="请输入收货单位名称"
+          :trigger-on-focus="false"
+          @select="handleSelectConsignee"
+          @input="oninputConsignee"
+        >
+        <template slot-scope="{ item }">
+          <div class="name">{{ item.consigneeCompanyName }}</div>
+        </template>
+        </el-autocomplete>
         </el-form-item>
         </el-form>
         <el-form
         :inline="true"
         class="demo-form-inline"
-        :label-position="left"
         label-width="80px"
       >
         <el-form-item label="流向">
@@ -53,7 +66,6 @@
         <el-form
         :inline="true"
         class="demo-form-inline"
-        :label-position="left"
         label-width="80px"
       >
         <el-form-item label="选择路线">
@@ -67,21 +79,20 @@
         <el-form
         :inline="true"
         class="demo-form-inline"
-        :label-position="left"
         label-width="80px"
       >
         <el-form-item label="选择承运商">
          <el-autocomplete
           class="inline-input"
-          v-model="state2"
-          :fetch-suggestions="querySearch"
+          v-model="stateCarrier"
+          :fetch-suggestions="querySearchCarrier"
           placeholder="请输入承运商名称"
           :trigger-on-focus="false"
-          @select="handleSelect"
-          @input="oninput"
+          @select="handleSelectCarrier"
+          @input="oninputCarrier"
         >
         <template slot-scope="{ item }">
-          <div class="name">{{ item.value }}</div>
+          <div class="name">{{ item.carrierName }}</div>
         </template>
         </el-autocomplete>
         </el-form-item>
@@ -89,7 +100,6 @@
         <el-form
         :inline="true"
         class="demo-form-inline"
-        :label-position="left"
         label-width="80px"
       >
         <el-form-item label="选择物资">      
@@ -122,7 +132,6 @@
       </el-tooltip>
     </div>
     </div>
-
     <!-- 物资表格 -->
     <div class="truckListTable">
     <div class="selectionTable">
@@ -236,12 +245,6 @@
           @radio-change="currentRadioChange2"
         ></dilTable>
       </div>
-      <div v-show="a == 3">
-        <dilTable
-          v-bind.sync="third"
-          @selection-change="currentRadioChange3"
-        ></dilTable>
-      </div>
       <div v-show="a == 5">
         <dilTable
           v-bind.sync="line"
@@ -258,15 +261,19 @@
 </template>
 <script>
 import PageTitle from "@/components/Page/Title";
-import { Checkbox } from 'element-ui';
-
 export default {
   components: { PageTitle },
   data() {
     return {
+      options: [],
+      value: '',
       receiveName:'',
-      state2:null,
-      restaurants: [],
+      stateCarrier:null,
+      stateSupplier:null,
+      stateConsignee:null,
+      restaurantsConsignee:null,
+      restaurantsSupplier:null,
+      restaurantsCarrier: [],
       orderTypeList:[
         {
           value:12,
@@ -276,6 +283,7 @@ export default {
           label:'出厂'
         }
       ],
+      likeCarrierLike:'',
       orderType:12,
       // 线路名称
       lineName: "",
@@ -346,12 +354,6 @@ export default {
             "/api/v1/uc/selectAllMaterialName?apiId=395",
            selectionType: "select",
       },
-      secend: {
-        requestUrl:
-          "/api/v1/uc/querySupplierByLike?apiId=247",
-        selectionType: "radio",
-        mapList2: [],
-      },
       receiveOptions:{
         requestUrl:
           "/api/v1/uc/queryConsigneeByLike?apiId=396",
@@ -392,40 +394,85 @@ export default {
       this.selectionList1 = []
       this.table = true
     },
-    handleSelect(item){
-      this.carrierId = item.carrierId
-      item.carrierName = this.state2
+    //收货单位弹出层
+    handleSelectConsignee(item){
+      console.log(this.consigneeId)
+      this.consigneeId = item.consigneeId
+      item.consigneeCompanyName = this.consigneeCompanyName
+      console.log(this.consigneeId)
+      console.log('这是选中的收货单位')
     },
-    oninput(){
-      this.axios.post('/api/v1/uc/getCarrierMesByLike?index='+this.state2).then((res)=>{
+    //以下是发货单位边输边查搜索
+    querySearchConsignee(queryString, cb) {
+      this.axios.post('/api/v1/uc/getConsigneeByLike?index='+queryString).then((res)=>{
         if(res.data.code == "200"){
           console.log(res)
-          this.restaurants = res.data.data
+          var restaurantsConsignee = res.data.data
+          var results = queryString ? restaurantsConsignee.filter(this.createFilterConsignee(queryString)) :restaurantsConsignee;
+            // 调用 callback 返回建议列表的数据
+          console.log(results,"results");
+          cb(results);
         }
-      })
+      })    
+      },
+    createFilterConsignee(queryString) {
+        return (restaurantsConsignee) => {
+          return (restaurantsConsignee.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+      //以上是返回单位边输边查搜索
+     //发货单位弹出层
+    handleSelectSupplier(item){
+      this.supplierId = item.supplierId
+      item.supplierName = this.supplierName
     },
-    //搜索
-    querySearch(queryString, cb) {
-        var restaurants = this.restaurants;
-        console.log(this.restaurants,"this.restaurants");
-        var results = queryString ? restaurants.filter(this.createFilter(queryString)) :restaurants;
-        // 调用 callback 返回建议列表的数据
-        console.log(results,"results");
-        cb(results);
+    //以下是发货单位边输边查搜索
+    querySearchSupplier(queryString, cb) {
+        this.axios.post('/api/v1/uc/getSupplierMesByLike?index='+this.stateSupplier).then((res)=>{
+        if(res.data.code == "200"){    
+          var restaurantsSupplier = res.data.data
+          var results = queryString ? restaurantsSupplier.filter(this.createFilterSupplier(queryString)) :restaurantsSupplier;
+          // 调用 callback 返回建议列表的数据
+          cb(results);
+        }
+      })  
       },
-      createFilter(queryString) {
-        return (restaurants) => {
-          return (restaurants.value.toLowerCase().indexOf(queryString.toLowerCase()) === 0);
+    createFilterSupplier(queryString) {
+        return (restaurantsSupplier) => {
+          return (restaurantsSupplier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
         };
       },
+      //以上是返回单位边输边查搜索
+    //承运商弹出层
+    handleSelectCarrier(item){    
+      this.carrierId = item.carrierId
+      item.carrierName = this.stateCarrier
+    },
+    //以下是承运商边输边查搜索
+    querySearchCarrier(queryString, cb) {
+        this.axios.post('/api/v1/uc/getCarrierMesByLike?index='+queryString).then((res)=>{
+        if(res.data.code == "200"){
+          var restaurantsCarrier = res.data.data
+          console.log(restaurantsCarrier,"restaurantsCarrier");
+          var results = queryString ? restaurantsCarrier.filter(this.createFilterCarrier(queryString)) :restaurantsCarrier;
+           // 调用 callback 返回建议列表的数据
+          cb(results);
+        }
+        })     
+      },
+    createFilterCarrier(queryString) {
+        return (restaurantsCarrier)  =>  {
+          return (restaurantsCarrier.value.toLowerCase().indexOf(queryString.toLowerCase()) > -1);
+        };
+      },
+    //以上是承运商边输边查搜索
     //删除行
     deleteRow(index, rows) {
       rows.splice(index, 1);
     },
     // 返回主界面
     makeSure1() {
-      console.log(this.selectionList1)
-      debugger  
+      console.log(this.selectionList1) 
       this.selectionList1.forEach((e) => {
         var addmap = {
           materialCode: e.materialCode,
@@ -433,7 +480,7 @@ export default {
           Specification: e.materialSpecification+e.materialModel,
           orderMaterialWeight: null,        
           materialId: e.materialId,
-          materialPriority:e.materialPriority,
+          materialPriority:null,
         };
           this.tableData.push(addmap);
       });     
@@ -515,18 +562,39 @@ export default {
     },
     // 确认
     makeSure() {
-      console.log(this.tableData)
+        console.log(this.supplierId,"this.supplierId")
+        console.log(this.consigneeId,"this.consigneeId")
+        console.log(this.carrierId,"this.carrierId")
+        console.log(this.lineId,"this.lineId")
+        console.log(this.tableData)
+        if(this.supplierId==null||this.lineId==null||this.carrierId==null||this.consigneeId==null){
+          this.$alert('存在空值')
+          return
+        }else if(this.tableData.length == 0){
+          this.$alert('请点击浏览勾选物资')
+          return
+        }
+        this.tableData.forEach((e) => {
+          if(e.materialPriority == null){
+            this.$alert('装卸货优先级未填写')
+            return
+          }else if(e.orderMaterialWeight == null){
+            this.$alert('物资重量未填写')
+            return
+          }
+          return            
+        })
+        console.log(this.tableData)
+        debugger
         let amsOrder = {
           supplierId:this.supplierId,
-          unloadPointId:this.unloadPointId,
           lineId:this.lineId,
           orderType:this.orderType,
           carrierId: this.carrierId,
-          receiveId: this.receiveId,
+          receiveId: this.consigneeId,
           mapList: this.tableData,
         };
-        console.log(amsOrder);
-      
+        console.log(amsOrder);     
         this.axios.post("/api/v1/ams/addSporadicOrders", amsOrder).then((res) => {
           if (res.data.code == "200") {
             this.$router.go(-1)
@@ -580,7 +648,7 @@ export default {
   }
 }
 .button-box {
-  margin-left: 25px !important;
+  margin-left: 45% ;
 }
 }
 </style>

+ 35 - 20
src/views/SporadicManage/components/sporadicMaterial/transportOrder/transportOrder.vue

@@ -72,7 +72,7 @@
       </el-tabs>
     </div>
 
-    <el-dialog
+    <!-- <el-dialog
       title="请选择车辆"
       :visible.sync="dialogVisible"
       :close-on-click-modal="false"
@@ -83,16 +83,7 @@
       modal
       lock-scroll
     >
-      <el-input placeholder="请输入内容" v-model="capacityNumber" disabled>
-      </el-input>
-      <el-button type="primary" @click="onDrawer">浏 览</el-button>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="determine">确 定</el-button>
-      </span>
-    </el-dialog>
-
-    <el-drawer
+     <el-drawer
       title="请选择车辆信息"
       :visible.sync="drawer"
       :direction="direction"
@@ -116,6 +107,28 @@
         ></dilTable>
       </div>
     </el-drawer>
+    </el-dialog> -->
+    <el-drawer
+      title="请选择车辆信息"
+      :visible.sync="drawer"
+      :direction="direction"
+      :destroy-on-close="true"
+      :before-close="handleClose"
+    >
+      <div class="drawer_top">
+        <el-input placeholder="请输入内容" v-model="inputText" clearable>
+        </el-input>
+        <el-button type="primary" class="btn" @click="inputClick">
+          <i class="el-icon-search"></i>查询
+        </el-button>
+      </div>
+      <div class="drawer_bottom">
+        <dilTable
+          v-bind.sync="truck"
+          @radio-change="currentRadioChange"
+        ></dilTable>
+      </div>
+    </el-drawer>
   </div>
 </template>
 
@@ -181,7 +194,7 @@ export default {
       capacityId: null,
       //是否关闭模态框
       drawer: false,
-      //模态框从右往左打开
+      //模态框从左往右打开
       direction: "rtl",
       //多选的选中的订单id
       selectionList: [],
@@ -198,7 +211,10 @@ export default {
       this.truck.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246&carrierId=" + this.carrierUserId 
   },
   methods: {
-       onclick(){
+    handleClose(done){
+        done();
+    },
+    onclick(){
       if(this.input != ''){
         this.second.requestUrl = "/api/v1/oms/getCapacityAndDriverList?apiId=246&con="+this.input +"&carrierId=" + getCookie('userId');
       }else{
@@ -240,8 +256,6 @@ export default {
     },
     //对话框点击确定,执行增加车牌号
     determine() {
-      console.log(this.selectOrderId)
-      console.log(this.capacityId)
       this.axios
         .post("/api/v1/oms/updateOmstruckOrder", {
           orderId: this.selectOrderId,
@@ -267,6 +281,7 @@ export default {
           }
         });
     },
+  
     //多选的选中的数据
     selectionChange(selection) {
       this.selectionList = [];
@@ -284,19 +299,19 @@ export default {
       this.capacityNumber = row.capacityNumber;
     },
     //打开模态窗口
-    onDrawer() {
-      this.drawer = true;
-    },
+    // onDrawer() {
+    //   this.drawer = true;
+    // },
     //弹出消息窗口
     addTruck(row, index) {
       this.index = index;
       if (index == 1) {
         this.selectOrderId = row.orderId;
-        this.dialogVisible = true;
+        this.drawer = true;
       } else if (index == 2) {
         this.selectOrderId = row.orderId;
         this.capacityNumber = row.capacityNumber;
-        this.dialogVisible = true;
+        this.drawer = true;
       }
     },
     // 查看物资详情

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

@@ -223,9 +223,11 @@ export default {
                 });
               }
               this.loginBtnLoading = false;
+              this.$router.go(0)
             })
             .catch(() => {
               this.loginBtnLoading = false;
+              
             });
         } else {
           return false;

+ 3 - 3
src/views/inward/components/truckAppoint/addRequirement.vue

@@ -316,7 +316,7 @@ export default {
 .addInwardRequirement{
 .form-box {
   display: inline-block !important;
-  margin-left: 38%;
+  margin-left: 38% !important;
   .el-input {
     width: 288px;
   }
@@ -328,10 +328,10 @@ export default {
   }
 }
 .box-form {
-  display: inline-block !important ;
+  display: flex ;
   padding-left: 38%;
   .el-form-item {
-    display: flex;
+    display: flex !important;
     padding: 10px;
     .el-form-item__label {
       width: 80px !important;