暂停记录优化,改成弹窗,证件验证方法优化
This commit is contained in:
		| @@ -74,16 +74,16 @@ | ||||
|       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> | ||||
|     </el-row> | ||||
|  | ||||
|     <el-table v-loading="loading" :data="customerList" @selection-change="handleSelectionChange"> | ||||
|     <el-table v-loading="loading" :data="customerList" stripe @selection-change="handleSelectionChange"> | ||||
|       <el-table-column type="selection" width="55" align="center" /> | ||||
|       <!--<el-table-column label="序号" align="center" prop="id" />--> | ||||
|       <el-table-column label="创建时间" align="center" prop="createTime" width="180"> | ||||
|       <el-table-column label="创建时间" align="center" prop="createTime" width="180" fixed="left"> | ||||
|         <template slot-scope="scope"> | ||||
|           <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="姓名" align="center" prop="name" width="120"/> | ||||
|       <el-table-column label="手机号" align="center" prop="phone" width="120"/> | ||||
|       <el-table-column label="姓名" align="center" prop="name" width="120" fixed="left"/> | ||||
|       <el-table-column label="手机号" align="center" prop="phone" width="120" fixed="left"/> | ||||
|       <el-table-column label="性别" align="center" prop="sign.sex" width="100"> | ||||
|         <template slot-scope="scope"> | ||||
|           {{scope.row.sign.sex == 0 ? `男` : '女'}} | ||||
| @@ -218,7 +218,7 @@ | ||||
|       <el-table-column label="售后营养师" align="center" prop="afterDietitian" /> | ||||
|       <el-table-column label="销售人员" align="center" prop="salesman" /> | ||||
|       <el-table-column label="负责人" align="center" prop="chargePerson" />--> | ||||
|       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120"> | ||||
|       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="120" fixed="right"> | ||||
|         <template slot-scope="scope"> | ||||
|           <el-button | ||||
|             size="mini" | ||||
|   | ||||
| @@ -255,6 +255,11 @@ | ||||
|           <span>{{ parseTime(scope.row.becomeFanTime, '{y}-{m}-{d}') }}</span> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="开始时间" align="center" prop="startTime" width="120"> | ||||
|         <template slot-scope="scope"> | ||||
|           <span>{{ parseTime(scope.row.startTime, '{y}-{m}-{d}') }}</span> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="备注" align="center" prop="remark" width="120"/> | ||||
|       <el-table-column label="操作" align="center" class-name="small-padding fixed-width" width="300" fixed="right"> | ||||
|         <template slot-scope="scope"> | ||||
| @@ -297,6 +302,15 @@ | ||||
|       <span style="margin-right: 12px;">总计:{{toThousands(this.totalAmount)}} 元</span> | ||||
|     </pagination> | ||||
|  | ||||
|     <!-- 暂停记录管理 --> | ||||
|     <el-dialog :title="pauseTitle" v-if="openPause" :visible.sync="openPause" width="900px" append-to-body> | ||||
|         <span style="color:#E6A23C;font-family:PingFang SC"> | ||||
|           注意事项: | ||||
|           <br/>1、日期包含当天,如:2021-01-01到2021-01-07,总共暂停七天,2021-01-08继续服务 | ||||
|           <br/>2、每条暂停记录的时间范围不能重叠</span> | ||||
|         <orderPause v-bind:orderPauseId="orderPauseId"></orderPause> | ||||
|     </el-dialog> | ||||
|  | ||||
|     <!-- 添加或修改销售订单对话框 --> | ||||
|     <el-dialog :title="title" :visible.sync="open" width="720px" append-to-body> | ||||
|       <el-row :gutter="15"> | ||||
| @@ -554,6 +568,7 @@ | ||||
| <script> | ||||
|   import {addOrder, delOrder, exportOrder, getOptions, getOrder, listOrder, updateOrder} from "@/api/custom/order"; | ||||
|   import dayjs from 'dayjs'; | ||||
|   import orderPause from "./orderPause"; | ||||
|  | ||||
|   const beginTime = dayjs().startOf('month').format('YYYY-MM-DD'); | ||||
|   const endTime = dayjs().format('YYYY-MM-DD'); | ||||
| @@ -581,6 +596,10 @@ | ||||
|         title: "", | ||||
|         // 是否显示弹出层 | ||||
|         open: false, | ||||
|         // 是否显示暂停记录弹窗 | ||||
|         openPause: false, | ||||
|         pauseTitle: "暂停记录", | ||||
|         orderPauseId: null, | ||||
|         // | ||||
|         totalAmount: 0, | ||||
|         // | ||||
| @@ -716,6 +735,9 @@ | ||||
|         } | ||||
|       }; | ||||
|     }, | ||||
|     components: { | ||||
|       orderPause | ||||
|     }, | ||||
|     created() { | ||||
|       this.getList(); | ||||
|       getOptions().then(response => { | ||||
| @@ -958,7 +980,10 @@ | ||||
|       }, | ||||
|       orderPauseManage(order) { | ||||
|         console.log(order.orderId); | ||||
|         this.$router.push({ name: 'orderPause', params: { 'orderId': order.orderId }}) | ||||
|         this.pauseTitle = order.customer; | ||||
|         this.orderPauseId = order.orderId; | ||||
|         this.openPause = true; | ||||
|         //this.$router.push({ name: 'orderPause', params: { 'orderId': order.orderId }}) | ||||
|       } | ||||
|     } | ||||
|   }; | ||||
|   | ||||
| @@ -94,18 +94,28 @@ | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="客户姓名" align="center" prop="customer" />--> | ||||
|       <el-table-column label="暂停开始日期" align="center" prop="pauseStartDate" width="180"> | ||||
|       <el-table-column label="暂停开始日期" align="center" prop="pauseStartDate" width="120"> | ||||
|         <template slot-scope="scope"> | ||||
|           <span>{{ parseTime(scope.row.pauseStartDate, '{y}-{m}-{d}') }}</span> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="暂停结束日期" align="center" prop="pauseEndDate" width="180"> | ||||
|       <el-table-column label="暂停结束日期" align="center" prop="pauseEndDate" width="120"> | ||||
|         <template slot-scope="scope"> | ||||
|           <span>{{ parseTime(scope.row.pauseEndDate, '{y}-{m}-{d}') }}</span> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="暂停理由" align="center" prop="reason" /> | ||||
|       <el-table-column label="备注" align="center" prop="remarks" /> | ||||
|       <el-table-column label="暂停理由" align="center" prop="reason"> | ||||
|         <template slot-scope="scope"> | ||||
|           <el-button v-show="scope.row.reason != null && scope.row.reason.length > 10" type="text" @click="openFormDialog('暂停理由', scope.row.reason)">点击查看</el-button> | ||||
|           <span v-show="scope.row.reason == null || scope.row.reason.length <= 10">{{scope.row.reason}}</span> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="备注" align="center" prop="remarks"> | ||||
|         <template slot-scope="scope"> | ||||
|           <el-button v-show="scope.row.remarks != null && scope.row.remarks.length > 10" type="text" @click="openFormDialog('备注', scope.row.remarks)">点击查看</el-button> | ||||
|           <span v-show="scope.row.remarks == null || scope.row.remarks.length <= 10">{{scope.row.remarks}}</span> | ||||
|         </template> | ||||
|       </el-table-column> | ||||
|       <el-table-column label="创建时间" align="center" prop="createTime" width="180"> | ||||
|         <template slot-scope="scope"> | ||||
|           <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span> | ||||
| @@ -136,9 +146,18 @@ | ||||
|       :total="total" | ||||
|       :page.sync="queryParams.pageNum" | ||||
|       :limit.sync="queryParams.pageSize" | ||||
|       :page-sizes="[5,10]" | ||||
|       @pagination="getList" | ||||
|     /> | ||||
|  | ||||
|     <el-dialog :title="formDialog.title" :visible.sync="formDialog.show" width="30%" append-to-body center> | ||||
|       <span>{{formDialog.content}}</span> | ||||
|       <span slot="footer" class="dialog-footer"> | ||||
|       <el-button @click="formDialog.show = false">取 消</el-button> | ||||
|         <!--<el-button type="primary" @click="experience_dialog = false">确 定</el-button>--> | ||||
|       </span> | ||||
|     </el-dialog> | ||||
|  | ||||
|     <!-- 添加或修改订单服务暂停对话框 --> | ||||
|     <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> | ||||
|       <el-form ref="form" :model="form" :rules="rules" label-width="80px"> | ||||
| @@ -224,7 +243,7 @@ | ||||
|         // 查询参数 | ||||
|         queryParams: { | ||||
|           pageNum: 1, | ||||
|           pageSize: 10, | ||||
|           pageSize: 5, | ||||
|           orderId: null, | ||||
|           createDate: null, | ||||
|           pauseEndDate: null | ||||
| @@ -245,15 +264,27 @@ | ||||
|           reason: [ | ||||
|             {required: true, message: "暂停理由不能为空", trigger: "blur"} | ||||
|           ] | ||||
|         }, | ||||
|         //查看表单内容 | ||||
|         formDialog:{ | ||||
|           title: "", | ||||
|           show: false, | ||||
|           content: "" | ||||
|         } | ||||
|       }; | ||||
|     }, | ||||
|     props: { | ||||
|       orderPauseId: { | ||||
|         type: Number, | ||||
|         default: 0 | ||||
|       }, | ||||
|     }, | ||||
|     created() { | ||||
|       this.getList(); | ||||
|     }, | ||||
|     mounted() { | ||||
|       this.orderId = this.$route.params.orderId; | ||||
|       this.queryParams.orderId = this.orderId; | ||||
|       this.orderId = this.orderPauseId; | ||||
|       this.queryParams.orderId = this.orderPauseId; | ||||
|     }, | ||||
|     methods: { | ||||
|       /** 查询订单服务暂停列表 */ | ||||
| @@ -373,11 +404,12 @@ | ||||
|         }).then(response => { | ||||
|           this.download(response.msg); | ||||
|       }).catch(function() {}); | ||||
|       }, | ||||
|       openFormDialog(title, content){ | ||||
|         this.formDialog.title = title; | ||||
|         this.formDialog.content = content; | ||||
|         this.formDialog.show = true; | ||||
|       } | ||||
|     }, | ||||
|     checkcDateScope(value){ | ||||
|        console.log(value[0]); | ||||
|        return false; | ||||
|     } | ||||
|   }; | ||||
| </script> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user