zhangdan 4 years ago
parent
commit
089b02255c

+ 35 - 31
src/views/CouponStatistics/CouponStatistics.vue

@@ -2,19 +2,19 @@
   <a-card :bordered="false">
     <!-- 搜索条件 -->
     <div class="CouponStatistics-searchForm">
-      <a-form layout="inline">
+      <a-form layout="inline" ref="searchForm">
         <a-row :gutter="48">
           <a-col :span="6">
             <a-form-item label="发券网点">
-              <a-input v-model.trim="searchForm.num" placeholder="请输入" allowClear style="width: 200px;"/>
+              <a-input v-model.trim="searchForm.num" placeholder="请输入" allowClear style="width: 200px;" />
             </a-form-item>
           </a-col>
           <a-col :span="6">
             <a-form-item label="优惠券名称">
-              <a-input v-model.trim="searchForm.num" placeholder="请输入" allowClear style="width: 200px;"/>
-              
+              <a-input v-model.trim="searchForm.num" placeholder="请输入" allowClear style="width: 200px;" />
+
             </a-form-item>
-          </a-col> 
+          </a-col>
           <a-col :span="6">
             <a-form-item label="优惠券类型">
               <v-select v-model="searchForm.name" placeholder="请选择" allowClear style="width: 200px;"></v-select>
@@ -23,18 +23,12 @@
           <a-col :span="6">
             <a-button style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
             <a-button type="" @click="resetForm">重置</a-button>
-          </a-col>  
-        </a-row> 
+          </a-col>
+        </a-row>
       </a-form>
     </div>
     <!-- 列表 -->
-    <s-table
-      ref="tableData"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      bordered>
+    <s-table ref="table" size="default" :rowKey="(record) => record.id" :columns="columns" :data="loadData" bordered>
       <!-- 状态 -->
       <span slot="status" slot-scope="text, record">
         <template></template>
@@ -50,23 +44,28 @@
 </template>
 
 <script>
-  import { STable, VSelect } from '@/components'
-  export default{
-    components: { STable, VSelect },
-    data(){
-      return{
-        searchForm:{
-          name:'',
-          num:''
+  import {
+    STable,
+    VSelect
+  } from '@/components'
+  export default {
+    components: {
+      STable,
+      VSelect
+    },
+    data() {
+      return {
+        searchForm: {
+          name: '',
+          num: ''
         },
-        columns:[
-          {
+        columns: [{
             title: '序号',
             dataIndex: 'no',
             minWidth: '40',
             align: 'center'
           },
-          
+
           {
             title: '发券网点',
             dataIndex: 'no',
@@ -114,14 +113,18 @@
             dataIndex: 'status',
             minWidth: '40',
             align: 'center',
-            scopedSlots: { customRender: 'status' }
+            scopedSlots: {
+              customRender: 'status'
+            }
           },
           {
             title: '操作',
             dataIndex: 'action',
             minWidth: '40',
             align: 'center',
-            scopedSlots: { customRender: 'action' }
+            scopedSlots: {
+              customRender: 'action'
+            }
           }
         ],
         // 加载数据方法 必须为 Promise 对象
@@ -140,17 +143,18 @@
         }
       }
     },
-    methods:{
+    methods: {
       // 重置
-      resetForm(){
-        
+      resetForm() {
+        this.$refs.searchForm.resetFields()
+        this.$refs.table.refresh(true)
       }
     }
   }
 </script>
 
 <style>
-  .CouponStatistics-searchForm .ant-form-inline .ant-form-item{
+  .CouponStatistics-searchForm .ant-form-inline .ant-form-item {
     margin-bottom: 50px;
   }
 </style>

+ 74 - 62
src/views/Order/OrderCenter.vue

@@ -6,19 +6,19 @@
         <a-row :gutter="48">
           <a-col :span="8">
             <a-form-item label="创建时间">
-              <a-range-picker v-model="time" :placeholder="['开始时间','结束时间']" @change="onChange"/>
+              <a-range-picker v-model="time" :placeholder="['开始时间','结束时间']" @change="onChange" />
             </a-form-item>
           </a-col>
           <a-col :span="6">
             <a-form-item label="网点名称">
               <v-select v-model="searchForm.name" placeholder="请选择" allowClear style="width: 200px;"></v-select>
             </a-form-item>
-          </a-col> 
+          </a-col>
           <a-col :span="6">
             <a-form-item label="单号">
-              <a-input v-model.trim="searchForm.num" placeholder="请输入" allowClear style="width: 200px;"/>
+              <a-input v-model.trim="searchForm.num" placeholder="请输入" allowClear style="width: 200px;" />
             </a-form-item>
-          </a-col> 
+          </a-col>
         </a-row>
         <a-row :gutter="48">
           <a-col :span="8">
@@ -28,7 +28,7 @@
           </a-col>
           <a-col :span="6">
             <a-form-item label="手机号码">
-              <a-input v-model.trim="searchForm.num" placeholder="请输入" allowClear maxLength="11" style="width: 200px;"/>
+              <a-input v-model.trim="searchForm.num" placeholder="请输入" allowClear maxLength="11" style="width: 200px;" />
             </a-form-item>
           </a-col>
           <a-col :span="6">
@@ -39,8 +39,8 @@
           <a-col :span="4">
             <a-button style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
             <a-button type="" @click="resetForm">重置</a-button>
-          </a-col> 
-        </a-row>  
+          </a-col>
+        </a-row>
       </a-form>
     </div>
     <!-- 合计 -->
@@ -48,13 +48,7 @@
       <a-alert message="合计: 40单, 实收: 2000元" type="info" show-icon />
     </div>
     <!-- 列表 -->
-    <s-table 
-      ref="table"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      bordered>
+    <s-table ref="table" size="default" :rowKey="(record) => record.id" :columns="columns" :data="loadData" bordered>
       <!-- 状态 -->
       <span slot="status" slot-scope="text, record">
         <template></template>
@@ -69,21 +63,26 @@
 </template>
 
 <script>
-  import { STable, VSelect } from '@/components'
-  export default{
-    components: { STable, VSelect },
-    data(){
-      return{
+  import {
+    STable,
+    VSelect
+  } from '@/components'
+  export default {
+    components: {
+      STable,
+      VSelect
+    },
+    data() {
+      return {
         // 查询参数
         searchForm: {
-          beginDate:null,
-          endDate:null,
+          beginDate: null,
+          endDate: null,
           name: '',
           num: ''
         },
-        time:null,
-        columns:[
-          {
+        time: null,
+        columns: [{
             title: '创建时间',
             dataIndex: 'createTime',
             minWidth: '40',
@@ -94,42 +93,42 @@
             dataIndex: 'createTime',
             minWidth: '40',
             align: 'center'
-            
+
           },
           {
             title: '网点名称',
             dataIndex: 'createTime',
             minWidth: '40',
             align: 'center'
-            
+
           },
           {
             title: '服务项目',
             dataIndex: 'createTime',
             minWidth: '40',
             align: 'center'
-            
+
           },
           {
             title: '手机号码',
             dataIndex: 'createTime',
             minWidth: '40',
             align: 'center'
-            
+
           },
           {
             title: '应收(¥)',
             dataIndex: 'createTime',
             minWidth: '40',
             align: 'center'
-            
+
           },
           {
             title: '实收(¥)',
             dataIndex: 'createTime',
             minWidth: '40',
             align: 'center'
-            
+
           },
           {
             title: '优惠(¥)',
@@ -142,15 +141,19 @@
             dataIndex: 'status',
             minWidth: '40',
             align: 'center',
-            scopedSlots: { customRender: 'status' }
+            scopedSlots: {
+              customRender: 'status'
+            }
           },
           {
             title: '操作',
             dataIndex: 'action',
             minWidth: '40',
             align: 'center',
-            scopedSlots: { customRender: 'action' }
-            
+            scopedSlots: {
+              customRender: 'action'
+            }
+
           }
         ],
         // 加载数据方法 必须为 Promise 对象
@@ -169,56 +172,65 @@
         }
       }
     },
-    methods:{
+    methods: {
       // 创建时间change
-      onChange (dates, dateStrings) {
+      onChange(dates, dateStrings) {
         if ((dates, dateStrings)) {
           this.searchForm.beginDate = dateStrings[0]
-          this.searchForm.endDate = dateStrings[1] 
-      }
+          this.searchForm.endDate = dateStrings[1]
+        }
         console.log(this.searchForm.beginDate, this.searchForm.endDate)
       },
       // 查看详情--跳转到对应的详情页
-      seeDetail(row){
-        this.$router.push({ name: 'OrderDetail', query: { id: row.id } })
+      seeDetail(row) {
+        this.$router.push({
+          name: 'OrderDetail',
+          query: {
+            id: row.id
+          }
+        })
       },
       // 退款
       refund(row) {
-      	const _this = this
-      	this.$confirm({
-      		title: '警告',
-      		content: '确认退款后 款项将通过原渠道退回 且不可撤回,确认退款?',
-      		okText: '确定',
-      		cancelText: '取消',
-      		// onOk() {
-      		// 	deleteItem({
-      		// 		id: row.id
-      		// 	}).then(res => {
-      		// 		if (res.status == 200) {
-      		// 			_this.$message.success('退款成功')
-      		// 			_this.$refs.table.refresh()
-      		// 		}
-      		// 	})
-      		// }
-      	})
+        const _this = this
+        this.$confirm({
+          title: '警告',
+          content: '确认退款后 款项将通过原渠道退回 且不可撤回,确认退款?',
+          okText: '确定',
+          cancelText: '取消',
+          // onOk() {
+          // 	deleteItem({
+          // 		id: row.id
+          // 	}).then(res => {
+          // 		if (res.status == 200) {
+          // 			_this.$message.success('退款成功')
+          // 			_this.$refs.table.refresh()
+          // 		}
+          // 	})
+          // }
+        })
       },
       // 重置
-      resetForm(){
+      resetForm() {
         this.$refs.searchForm.resetFields()
+        this.$refs.table.refresh()
       }
     }
-    
+
   }
 </script>
 
 <style>
-  .orderCenter-searchForm ,.addButton{
+  .orderCenter-searchForm,
+  .addButton {
     margin-bottom: 0;
   }
-  .orderCenter-searchForm .ant-form-inline .ant-form-item{
+
+  .orderCenter-searchForm .ant-form-inline .ant-form-item {
     margin-bottom: 15px;
   }
-  .total{
-    margin-bottom:15px;
+
+  .total {
+    margin-bottom: 15px;
   }
 </style>

+ 2 - 0
src/views/Order/OrderDetail.vue

@@ -62,12 +62,14 @@
          <a-col :span="8">
            <a-form-item label="洗车照片">
              <div style="display: flex;">
+               <!-- 洗车前照片 -->
                 <div style="margin-right: 20px;">
                   <div style="border: 1px solid #eee;overflow: hidden;padding: 8px">
                     <img :src="advertisementImg" style="width: 100px; height: 100px;" alt=""/>
                   </div>
                   <div style="text-align: center;">洗车前</div> 
                 </div>
+                <!-- 洗车后照片 -->
                 <div>
                   <div id="img" style="border: 1px solid #eee;overflow: hidden;padding: 8px">
                     <img class="img1" src="../../assets/avatar2.jpg" alt=""/>

+ 46 - 43
src/views/RefundRecord/RefundRecord.vue

@@ -2,27 +2,27 @@
   <a-card :bordered="false">
     <!-- 搜索条件 -->
     <div class="orderCenter-searchForm">
-      <a-form layout="inline">
+      <a-form layout="inline" ref="searchForm">
         <a-row :gutter="48">
           <a-col :span="8">
             <a-form-item label="创建时间">
-              <a-range-picker v-model="time" :placeholder="['开始时间','结束时间']" @change="onChange"/>
+              <a-range-picker v-model="time" :placeholder="['开始时间','结束时间']" @change="onChange" />
             </a-form-item>
           </a-col>
           <a-col :span="6">
             <a-form-item label="关联订单号">
-              <a-input v-model.trim="searchForm.num" placeholder="请输入" allowClear style="width: 200px;"/>
+              <a-input v-model.trim="searchForm.num" placeholder="请输入" allowClear style="width: 200px;" />
             </a-form-item>
           </a-col>
           <a-col :span="6">
             <a-form-item label="网点名称">
               <v-select v-model="searchForm.name" placeholder="请选择" allowClear style="width: 200px;"></v-select>
             </a-form-item>
-          </a-col> 
+          </a-col>
           <a-col :span="4">
             <a-button style="margin-right: 10px;" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
             <a-button type="" @click="resetForm">重置</a-button>
-          </a-col>  
+          </a-col>
         </a-row>
         <a-row :gutter="48">
           <a-col :span="8">
@@ -31,11 +31,11 @@
             </a-form-item>
           </a-col>
           <a-col :span="6">
-            <a-form-item label="退款状态" >
+            <a-form-item label="退款状态">
               <v-select v-model="searchForm.name" placeholder="请选择" allowClear style="width: 200px;"></v-select>
             </a-form-item>
           </a-col>
-        </a-row>  
+        </a-row>
       </a-form>
     </div>
     <!-- 合计 -->
@@ -43,13 +43,7 @@
       <a-alert message="合计: 40单, 实收: 2000元" type="info" show-icon />
     </div>
     <!-- 列表 -->
-    <s-table 
-      ref="tableData"
-      size="default"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      bordered>
+    <s-table ref="table" size="default" :rowKey="(record) => record.id" :columns="columns" :data="loadData" bordered>
       <!-- 退款状态 -->
       <span slot="status" slot-scope="text, record">
         <template></template>
@@ -59,81 +53,88 @@
 </template>
 
 <script>
-  import { STable, VSelect } from '@/components'
-  export default{
-    components: { STable, VSelect },
-    data(){
-      return{
+  import {
+    STable,
+    VSelect
+  } from '@/components'
+  export default {
+    components: {
+      STable,
+      VSelect
+    },
+    data() {
+      return {
         // 查询参数
         searchForm: {
-          beginDate:null,
-          endDate:null,
+          beginDate: null,
+          endDate: null,
           name: '',
           num: ''
         },
-        time:null,
-        columns:[
-          {
+        time: null,
+        columns: [{
             title: '创建时间',
             dataIndex: 'createTime',
             minWidth: '100',
             align: 'center'
-            
+
           },
           {
             title: '交易流水号',
             dataIndex: 'createTime',
             minWidth: '100',
             align: 'center'
-            
+
           },
           {
             title: '关联订单号',
             dataIndex: 'createTime',
             width: '100',
             align: 'center'
-            
+
           },
           {
             title: '网点名称',
             dataIndex: 'createTime',
             minWidth: '100',
             align: 'center'
-            
+
           },
           {
             title: '退款项目',
             dataIndex: 'createTime',
             minWidth: '100',
             align: 'center'
-            
+
           },
           {
             title: '退款金额(¥)',
             dataIndex: 'createTime',
             minWidth: '40',
             align: 'center'
-            
+
           },
           {
             title: '退款人',
             dataIndex: 'createTime',
             minWidth: '100',
             align: 'center'
-            
+
           },
           {
             title: '退款状态',
             dataIndex: 'createTime',
             minWidth: '100',
             align: 'center',
-            scopedSlots: { customRender: 'status' }
+            scopedSlots: {
+              customRender: 'status'
+            }
           },
           {
             title: '备注',
             dataIndex: 'status',
             minWidth: '100',
-            align: 'center', 
+            align: 'center',
           },
         ],
         // 加载数据方法 必须为 Promise 对象
@@ -152,17 +153,17 @@
         }
       }
     },
-    methods:{
+    methods: {
       // 创建时间change
-      onChange (dates, dateStrings) {
+      onChange(dates, dateStrings) {
         if ((dates, dateStrings)) {
-      				this.searchForm.beginDate = dateStrings[0]
-      				this.searchForm.endDate = dateStrings[1]
+          this.searchForm.beginDate = dateStrings[0]
+          this.searchForm.endDate = dateStrings[1]
         }
         console.log(this.searchForm.beginDate, this.searchForm.endDate)
       },
       // 重置
-      resetForm(){
+      resetForm() {
         this.$refs.searchForm.resetFields()
         this.$refs.table.refresh(true)
       },
@@ -171,14 +172,16 @@
 </script>
 
 <style>
-  .orderCenter-searchForm ,.addButton{
+  .orderCenter-searchForm,
+  .addButton {
     margin-bottom: 0;
   }
-  .orderCenter-searchForm .ant-form-inline .ant-form-item{
+
+  .orderCenter-searchForm .ant-form-inline .ant-form-item {
     margin-bottom: 15px;
   }
-  .total{
-    margin-bottom:15px;
+
+  .total {
+    margin-bottom: 15px;
   }
 </style>
-