Explorar o código

feat 手动发单

Funny %!s(int64=3) %!d(string=hai) anos
pai
achega
5c208f23c1
Modificáronse 3 ficheiros con 46 adicións e 20 borrados
  1. 10 5
      src/components/Home.vue
  2. 35 14
      src/components/manualCreate.vue
  3. 1 1
      src/components/orderSearch.vue

+ 10 - 5
src/components/Home.vue

@@ -13,11 +13,11 @@
       <el-col :span="9" class="search">
         <div class="header_serch">
           <div class="search_inp">
-            <el-input size="medium" class="inp" v-model="searchKey" placeholder="请输入手机号/姓名/地址/订单编号" @keydown.enter.native="seachEnterFun" clearable></el-input>
-            <el-button size="medium" type="primary" @click.stop="search" slot="append" icon="el-icon-search"></el-button>
+            <el-input size="small" class="inp" v-model="searchKey" placeholder="请输入手机号/姓名/地址/订单编号" @keydown.enter.native="seachEnterFun" clearable></el-input>
+            <el-button size="small" style="background: #0D1E40;color:#fff" type="info" @click.stop="search" slot="append" icon="el-icon-search"></el-button>
           </div>
           <!-- 1.0.0版本暂不开发该功能 -->
-          <!-- <div class="Manual">手动发单</div> -->
+          <el-button class="btn" size='small' @click="$router.push({path:'/manualCreate'})">手动发单</el-button>
         </div>
       </el-col>
     </el-row>
@@ -284,7 +284,7 @@ export default {
           console.log("1111", deliveryList);
           deliveryList.forEach((item) => {
             this.orderList = this.orderList.filter((v) => {
-              console.log('2222',v,item);
+              console.log("2222", v, item);
               return v.id !== item;
             });
           });
@@ -387,7 +387,12 @@ export default {
           line-height: 44px;
           margin-left: 18px;
         }
-
+        .btn {
+          background: #fc7200;
+          border-color: #fc7200;
+          color: #fff !important;
+          margin-left: 10px;
+        }
         .search_inp {
           width: 380px;
           height: 44px;

+ 35 - 14
src/components/manualCreate.vue

@@ -54,11 +54,14 @@
             物品信息
           </div>
           <el-form-item label="物品类型" required>
-            <div class="category_box">
+            <!-- <div class="category_box">
               <div class="item" :class="form.productId === item.id ? 'active':''" v-for="(item,i) in products" :key="i" @click="$set(form,'productId',item.id)">
                 {{item.name}}
               </div>
-            </div>
+            </div> -->
+            <el-radio-group class="category_box" v-model="form.productId">
+              <el-radio class="item" v-for="(item,i) in products" :key="i" :label="item.id">{{item.name}}</el-radio>
+            </el-radio-group>
           </el-form-item>
           <el-form-item label="物品重量">
             <div class="printer-num">
@@ -77,7 +80,7 @@
           </el-form-item>
           <el-form-item label="发单时间">
             <el-button @click="form.takeType = 0" :class="!form.takeType ? 'but active' : 'but'" type="info">立即发单</el-button>
-            <el-button @click="form.takeType = 1" :class="form.takeType ? 'but active' : 'but'" type="info">预约发单</el-button>
+            <el-button @click="form.takeType = 1" :class="form.takeType ? 'but but-r active' : 'but'" type="info">预约发单</el-button>
             <el-date-picker size="small" v-show="form.takeType === 1" v-model="form.takeTime" type="datetime" placeholder="选择日期时间" default-time="12:00:00">
             </el-date-picker>
           </el-form-item>
@@ -260,7 +263,7 @@ export default {
       // 预约发单
       if (this.form.takeType) {
         this.form.takeTime = this.$tool.getFormatDate(this.form.takeTime);
-        this.form.saveFlag = 1
+        this.form.saveFlag = 1;
         this.saveOrder();
       } else {
         this.form.takeTime = this.$tool.getFormatDate(new Date());
@@ -334,7 +337,6 @@ export default {
   flex-direction: column;
   align-items: center;
   width: calc(100% - 40px);
-  // height: calc(100% - 40px);
   padding: 20px;
   background: #fff;
   .moudle-list {
@@ -343,6 +345,13 @@ export default {
     .moudle {
       width: 600px;
       margin: 0 100px 50px 0;
+      /deep/ .el-radio__input.is-checked .el-radio__inner {
+        border-color: #fc7200;
+        background: #fc7200;
+      }
+      /deep/ .el-radio__input.is-checked + .el-radio__label {
+        color: #fc7200;
+      }
       .category_box {
         display: flex;
         flex-wrap: wrap;
@@ -352,11 +361,9 @@ export default {
         .item {
           display: flex;
           align-items: center;
-          justify-content: center;
           width: 92px;
           height: 30px;
           margin: 10px 10px 0 0;
-          background: #f4f4f4;
           border-radius: 2px;
           cursor: pointer;
 
@@ -386,8 +393,8 @@ export default {
   .btn {
     width: 200px;
     height: 40px;
+    font-size: 14px;
     background: #fc7200;
-
     border: #fc7200;
   }
   /deep/ .el-form {
@@ -400,20 +407,34 @@ export default {
   }
   .title {
     font-weight: bold;
-    color: #777777;
+    color: #333;
     margin-bottom: 20px;
   }
+  .title:before {
+    content: "";
+    display: inline-block;
+    width: 3px;
+    height: 14px;
+    background-color: #fc7200;
+  }
   .but {
     display: flex;
     align-items: center;
     justify-content: center;
-    margin-right: 20px;
+    margin: 0;
+    border-radius: 0;
     height: 32px;
+    background: #ebebeb;
+    border-color: #ebebeb;
+    color: #666;
     &.active {
       color: #ffffff;
       background: #fc7200;
       border-color: #fc7200 !important;
     }
+    &.but-r {
+      margin-right: 20px;
+    }
   }
   .but1 {
     display: flex;
@@ -436,8 +457,8 @@ export default {
     display: flex;
     align-items: center;
     .reduce {
-      width: 30px;
-      height: 30px;
+      width: 32px;
+      height: 32px;
       cursor: pointer;
     }
     .num {
@@ -445,8 +466,8 @@ export default {
       width: 150px;
     }
     .add {
-      width: 30px;
-      height: 30px;
+      width: 32px;
+      height: 32px;
       cursor: pointer;
     }
     .name {

+ 1 - 1
src/components/orderSearch.vue

@@ -33,7 +33,7 @@
             </el-date-picker>
           </div>
           <el-button size='small' @click="search" style="background: #0D1E40;color:#fff">查询</el-button>
-          <el-button size='small' @click="search" class="btn">手动发单</el-button>
+          <el-button size='small' @click="$router.push({path:'/manualCreate'})" class="btn">手动发单</el-button>
         </div>
       </el-col>
     </el-row>