소스 검색

[add] 预约下单

BKGin 9 달 전
부모
커밋
35aee9bd96
3개의 변경된 파일43개의 추가작업 그리고 49개의 파일을 삭제
  1. 24 20
      src/views/order/cloth/collectCloth.vue
  2. 1 1
      src/views/order/cloth/component/cashCloth.vue
  3. 18 28
      src/views/workbench/workAppointmentOrder/index.vue

+ 24 - 20
src/views/order/cloth/collectCloth.vue

@@ -165,16 +165,16 @@
             ></el-date-picker>
           </el-form-item> -->
 
-                    <!--          <el-form-item label="取衣方式" prop="sendClothWay">-->
-                    <!--            <el-select v-model="orderForm.sendClothWay" placeholder="请选择" clearable>-->
-                    <!--              <el-option-->
-                    <!--                v-for="dict in dict.type.cloth_send_type"-->
-                    <!--                :key="dict.value"-->
-                    <!--                :label="dict.label"-->
-                    <!--                :value="dict.value"-->
-                    <!--              />-->
-                    <!--            </el-select>-->
-                    <!--          </el-form-item>-->
+                  <el-form-item label="取衣方式" prop="sendClothWay">
+                    <el-select v-model="orderForm.sendClothWay" placeholder="请选择" clearable>
+                      <el-option
+                        v-for="dict in dict.type.cloth_send_type"
+                        :key="dict.value"
+                        :label="dict.label"
+                        :value="dict.value"
+                      />
+                    </el-select>
+                  </el-form-item>
 
                     <el-form-item label="备注" prop="remark">
                         <el-input v-model="orderForm.remark" placeholder="请输入订单备注" clearable />
@@ -206,7 +206,7 @@
                     <div style="height: 20px"></div>
                 </el-col>
                 <el-col :span="24" v-if="addClothActiveTab == 0">
-                    <div style="margin-left: 55px"> 
+                    <div style="margin-left: 55px">
                         <el-input v-model="defaultList.type" placeholder="请输入要搜索的衣服分类" style="width: 300px;" clearable>
                             <el-button slot="append" icon="el-icon-search" @click="searchCloth('type', 'clothTypes')"></el-button>
                         </el-input>
@@ -218,7 +218,7 @@
                     </div>
                 </el-col>
                 <el-col :span="24" v-if="addClothActiveTab == 1">
-                    <div style="margin-left: 55px; margin-bottom: 10px"> 
+                    <div style="margin-left: 55px; margin-bottom: 10px">
                         <el-input v-model="defaultList.item" placeholder="请输入要搜索的衣服类型" style="width: 300px;" clearable>
                             <el-button slot="append" icon="el-icon-search" @click="searchCloth('item', 'clothItems')"></el-button>
                         </el-input>
@@ -237,7 +237,7 @@
                     </div>
                 </el-col>
                 <el-col :span="24" v-if="addClothActiveTab == 2">
-                    <div style="margin-left: 55px; margin-bottom: 10px"> 
+                    <div style="margin-left: 55px; margin-bottom: 10px">
                         <el-input v-model="defaultList.color" placeholder="请输入要搜索的衣服颜色" style="width: 300px;" clearable>
                             <el-button slot="append" icon="el-icon-search" @click="searchCloth('color', 'clothColors')"></el-button>
                         </el-input>
@@ -257,7 +257,7 @@
                     </div>
                 </el-col>
                 <el-col :span="24" v-if="addClothActiveTab == 3">
-                    <div style="margin-left: 55px;"> 
+                    <div style="margin-left: 55px;">
                         <el-input v-model="defaultList.brand" placeholder="请输入要搜索的衣服品牌" style="width: 300px;" clearable>
                             <el-button slot="append" icon="el-icon-search" @click="searchCloth('brand', 'clothBrands')"></el-button>
                         </el-input>
@@ -271,7 +271,7 @@
                 <el-col :span="24" v-if="addClothActiveTab == 4">
                     <el-tabs type="border-card" @tab-click="changeClothTab">
                         <el-tab-pane label="全部">
-                            <div style="margin-left: 15px;"> 
+                            <div style="margin-left: 15px;">
                                 <el-input v-model="defaultList.flaw" placeholder="请输入要搜索的衣服瑕疵" style="width: 300px;" clearable>
                                     <el-button slot="append" icon="el-icon-search" @click="searchCloth('flaw', 'clothFlaws')"></el-button>
                                 </el-input>
@@ -281,7 +281,7 @@
                             </el-tag>
                         </el-tab-pane>
                         <el-tab-pane :label="clothFlawType.name" v-for="clothFlawType in clothFlawTypes">
-                            <div style="margin-left: 15px;"> 
+                            <div style="margin-left: 15px;">
                                 <el-input v-model="defaultList.flaw" placeholder="请输入要搜索的衣服瑕疵" style="width: 300px;" clearable>
                                     <el-button slot="append" icon="el-icon-search" @click="searchCloth('flaw', 'clothFlaws')"></el-button>
                                 </el-input>
@@ -298,7 +298,7 @@
                     <el-row :gutter="20">
                         <el-col :span="8">
                             <div>选择附件</div>
-                            <div style="margin-left: 15px; margin-top: 10px;"> 
+                            <div style="margin-left: 15px; margin-top: 10px;">
                                  <el-input v-model="defaultList.adjunct" placeholder="请输入要搜索的衣服附件" style="width: 300px;" clearable>
                                     <el-button slot="append" icon="el-icon-search" @click="searchCloth('adjunct', 'clothAdjuncts')"></el-button>
                                 </el-input>
@@ -334,7 +334,7 @@
             <el-row :gutter="20">
                 <el-col :span="8">
                     <div>选择附件</div>
-                    <div style="margin-left: 55px"> 
+                    <div style="margin-left: 55px">
                         <el-input v-model="defaultList.adjunct" placeholder="请输入要搜索的衣服附件" style="width: 300px;" clearable>
                             <el-button slot="append" icon="el-icon-search" @click="searchCloth('adjunct', 'clothAdjuncts')"></el-button>
                         </el-input>
@@ -1049,7 +1049,7 @@ export default {
                         this.addClothAdjuncts = []
                         this.$forceUpdate()
                     })
-                } 
+                }
             } else if (this.addClothActiveTab == 5) {
                 this.orderClothItemDTOS.push(this.form)
                 this.addClothAdjunctSubmit()
@@ -1379,6 +1379,10 @@ export default {
 
                 return
             }
+            if (!this.orderForm.sendClothWay) {
+              this.$message.error('请先选取衣方式')
+              return
+            }
 
             if (this.orderForm.isAppointment == 'Y') {
                 var res = await getInfoByOrderNo({ orderNo: this.orderForm.orderNo, appUserId: this.appUserInfo.id })
@@ -1386,7 +1390,7 @@ export default {
                     this.$message.error('未查询到预约订单')
                     return
                 }
-                this.orderForm.sendClothWay = res.data.sendClothWay
+                // this.orderForm.sendClothWay = res.data.sendClothWay
             }
 
             //

+ 1 - 1
src/views/order/cloth/component/cashCloth.vue

@@ -904,7 +904,7 @@ export default {
                         params.activityId = this.activity.id
                         params.activityDiscountAmount = this.calculateTotalDiscountByActivity(this.activity, 'A4')
                     }
-
+                  params.sendClothWay = this.orderForm.sendClothWay
                     console.log(params)
                     const loading = this.$loading({
                         lock: true,

+ 18 - 28
src/views/workbench/workAppointmentOrder/index.vue

@@ -53,27 +53,17 @@
         <el-table-column label="件数" align="center" prop="appointmentCount" width="80px" />
         <el-table-column label="客户信息" align="center" prop="contactName" width="120px">
           <template slot-scope="scope">
-            <span>{{ scope.row.orderClothAddress ? scope.row.orderClothAddress.contactName : '--' }}</span>
-            <br />
-            <span>{{ scope.row.orderClothAddress ? scope.row.orderClothAddress.contactPhone : '' }}</span>
-          </template>
-        </el-table-column>
-        <el-table-column label="地址明细" align="center" width="220px" show-overflow-tooltip>
-          <template slot-scope="scope">
-            <span v-if="scope.row.orderClothAddress != null">{{ scope.row.orderClothAddress.province
-              }}{{ scope.row.orderClothAddress.city }}{{ scope.row.orderClothAddress.area }}</span>
-            <br />
-            <span v-if="scope.row.orderClothAddress != null">{{ scope.row.orderClothAddress.address
-              }}{{ scope.row.orderClothAddress.addressDetail }}</span>
-            <span>--</span>
+            <div>{{ scope.row.contactName }}</div>
+            <div>{{ scope.row.contactPhone }}</div>
           </template>
         </el-table-column>
+        <el-table-column label="地址明细" align="center" prop="address" width="220px" show-overflow-tooltip></el-table-column>
         <el-table-column label="取衣方式" align="center" width="100px">
           <template slot-scope="scope">
             <dict-tag :options="dict.type.cloth_take_type" :value="scope.row.takeClothWay" />
           </template>
         </el-table-column>
-        <el-table-column label="配送方式" align="center" width="100px" v-if="queryParams.appointmentStatus != 0">
+        <el-table-column label="配送方式" align="center" width="100px">
           <template slot-scope="scope">
             <dict-tag :options="dict.type.order_cloth_delivery_way" :value="scope.row.deliveryWay" />
           </template>
@@ -81,26 +71,26 @@
         <el-table-column label="派送员" align="center" width="100px">
           <template slot-scope="scope">
             <span v-if="scope.row.takeClothAppUserId == null || scope.row.takeClothAppUserId == ''">- -</span>
-            <span
-              v-if="scope.row.takeClothAppUserId != null || scope.row.takeClothAppUserId != ''">{{ scope.row.takeClothAppUserName
-              }}</span>
+            <span v-if="scope.row.takeClothAppUserId != null || scope.row.takeClothAppUserId != ''">
+              {{ scope.row.takeClothAppUserName }}
+            </span>
           </template>
         </el-table-column>
         <el-table-column label="派送员手机号" align="center" width="120px">
           <template slot-scope="scope">
             <span v-if="scope.row.takeClothAppUserId == null || scope.row.takeClothAppUserId == ''">- -</span>
-            <span
-              v-if="scope.row.takeClothAppUserId != null || scope.row.takeClothAppUserId != ''">{{ scope.row.takeClothAppUserPhone
-              }}</span>
+            <span v-if="scope.row.takeClothAppUserId != null || scope.row.takeClothAppUserId != ''">
+              {{ scope.row.takeClothAppUserPhone }}
+            </span>
           </template>
         </el-table-column>
         <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" width="150">
           <template slot-scope="scope">
             <el-button type="text" icon="el-icon-edit" @click="handleUpdate(scope.row)"
-                       v-if="queryParams.appointmentStatus == '1' || queryParams.appointmentStatus == '8'">派单
+                       v-if="scope.row.orderStatus == '0' || scope.row.orderStatus == '9'">派单
             </el-button>
             <el-button type="text" icon="el-icon-delete" @click="handleCancel(scope.row)"
-                       v-if="queryParams.appointmentStatus == '1'">取消订单
+                       v-if="scope.row.deliveryStatus == '10000'">取消订单
             </el-button>
           </template>
         </el-table-column>
@@ -116,7 +106,7 @@
             <el-col :span="24">
               <el-form-item label="配送方式" prop="service_trans_id">
                 <el-radio-group v-model="form.service_trans_id">
-                  <el-radio-button key="0" label="0">第三方配送</el-radio-button>
+                  <el-radio-button v-if="virtualListStatus !== 1" key="0" label="0">第三方配送</el-radio-button>
                   <el-radio-button key="1" label="1">门店配送</el-radio-button>
                 </el-radio-group>
               </el-form-item>
@@ -375,7 +365,6 @@ export default {
     }
     return {
       orderStatus: '1',
-      appointmentStatus: '1',
       virtualListStatus: 1,
       // 遮罩层
       loading: true,
@@ -593,7 +582,6 @@ export default {
     /** 派单按钮操作 */
     handleUpdate(row) {
       this.reset()
-      console.log('this.form.appointmentStatus', row.appointmentStatus)
       var userInfoVO = this.getUserInfo()
       if (userInfoVO.userType == '01') {
         this.openDeliveryPage = true
@@ -611,10 +599,12 @@ export default {
         this.deliTime = `${hours}:${minutes}:${seconds}`
         this.deliveryVo.orderNo = row.orderNo
       } else {
+        if (this.virtualListStatus === 1) {
+          this.form.service_trans_id = '1'
+        }
         this.open = true
         this.form.orderNo = row.orderNo
-        this.form.appointmentStatus = row.appointmentStatus
-
+        this.form.orderStatus = row.orderStatus
       }
     },
     /** 提交按钮 */
@@ -628,7 +618,7 @@ export default {
               this.getList()
             })
           } else {
-            if (this.form.appointmentStatus == '1' || this.form.appointmentStatus == '2') {
+            if (this.form.orderStatus == '0') {
               setDeliveryManByAppointment({
                 deliveryId: this.form.takeClothAppUserId,
                 orderNo: this.form.orderNo