Browse Source

2024.08.05
- 重构订单管理页,增加赠送代金券等字段显示;

zweiqin 8 months ago
parent
commit
4b6afa2064

+ 46 - 0
src/api/signInManagement/transactionSignIn.js

@@ -0,0 +1,46 @@
+import request from '@/utils/request'
+
+// 分页查询消费金签到配置
+export function getAllBeeSignConfig(data) {
+  return request({
+    url: '/buyerBeeSignConfig/getAll',
+    method: 'post',
+    data
+  })
+}
+
+// 查询消费金签到配置
+export function getByIdBeeSignConfig(params) {
+  return request({
+    url: '/buyerBeeSignConfig/getById',
+    method: 'get',
+    params
+  })
+}
+
+// 新增消费金签到配置
+export function saveBeeSignConfig(data) {
+  return request({
+    url: '/buyerBeeSignConfig/save',
+    method: 'post',
+    data
+  })
+}
+
+// 修改消费金签到配置
+export function updateBeeSignConfig(data) {
+  return request({
+    url: '/buyerBeeSignConfig/update',
+    method: 'post',
+    data
+  })
+}
+
+// 删除消费金签到配置
+export function deleteByIdBeeSignConfig(params) {
+  return request({
+    url: '/buyerBeeSignConfig/deleteById',
+    method: 'get',
+    params
+  })
+}

+ 46 - 0
src/api/signInManagement/voucherSignIn.js

@@ -0,0 +1,46 @@
+import request from '@/utils/request'
+
+// 分页查询代金券签到配置
+export function getAllVoucherSignConfig(data) {
+  return request({
+    url: '/buyerVoucherSignConfig/getAll',
+    method: 'post',
+    data
+  })
+}
+
+// 查询代金券签到配置
+export function getByIdVoucherSignConfig(params) {
+  return request({
+    url: '/buyerVoucherSignConfig/getById',
+    method: 'get',
+    params
+  })
+}
+
+// 新增代金券签到配置
+export function saveVoucherSignConfig(data) {
+  return request({
+    url: '/buyerVoucherSignConfig/save',
+    method: 'post',
+    data
+  })
+}
+
+// 修改代金券签到配置
+export function updateVoucherSignConfig(data) {
+  return request({
+    url: '/buyerVoucherSignConfig/update',
+    method: 'post',
+    data
+  })
+}
+
+// 删除代金券签到配置
+export function deleteByIdVoucherSignConfig(params) {
+  return request({
+    url: '/buyerVoucherSignConfig/deleteById',
+    method: 'get',
+    params
+  })
+}

+ 0 - 11
src/router/index.js

@@ -396,17 +396,6 @@ import Layout from '@/layout'
 //       icon: 'table'
 //     }
 //   },
-//   // pendDetails
-//   {
-//     hidden: true, // (默认 false)
-//     path: 'pendDetails',
-//     name: 'pendDetails',
-//     component: () => import('@/views/order/pending/pendDetails'),
-//     meta: {
-//       title: '订单详情',
-//       icon: 'table'
-//     }
-//   },
 //   {
 //     path: 'after',
 //     name: 'after',

+ 208 - 201
src/views/order/pending/index.vue

@@ -1,122 +1,152 @@
 <!--  -->
 <template>
-  <div class="pending">
-    <div class="tabbar">
-      <el-radio-group v-model="tabPosition" style="margin: 30px 50px;">
-        <el-radio-button label="shopping">商城</el-radio-button>
-        <el-radio-button label="business">商圈</el-radio-button>
+  <div class="app-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-radio-group v-model="listQuery.orderType" class="filter-item" size="mini" @input="handleSetOrderType">
+        <el-radio-button :label="1">商城</el-radio-button>
+        <el-radio-button :label="2">商圈</el-radio-button>
       </el-radio-group>
+      <el-radio-group
+        v-if="listQuery.orderType === 1" v-model="listQuery.state" class="filter-item"
+        style="margin-left: 10px;" size="mini" @input="handleSearch"
+      >
+        <el-radio-button label="">全部</el-radio-button>
+        <el-radio-button :label="1">待付款</el-radio-button>
+        <el-radio-button :label="2">待发货</el-radio-button>
+        <el-radio-button :label="3">已发货</el-radio-button>
+        <el-radio-button :label="4">已完成</el-radio-button>
+        <el-radio-button :label="5">已关闭</el-radio-button>
+      </el-radio-group>
+      <el-radio-group
+        v-else-if="listQuery.orderType === 2" v-model="listQuery.state" class="filter-item"
+        style="margin-left: 10px;" size="mini" @input="handleSearch"
+      >
+        <el-radio-button label="">全部</el-radio-button>
+        <el-radio-button :label="5">已取消</el-radio-button>
+        <el-radio-button :label="8">待核销</el-radio-button>
+        <el-radio-button :label="9">待核销已付款</el-radio-button>
+        <el-radio-button :label="10">已核销</el-radio-button>
+      </el-radio-group>
+      <el-input
+        v-model="listQuery.search" clearable size="mini" class="filter-item"
+        style="display: inline-table;width: 400px;margin-left: 10px;"
+        placeholder="请输入内容"
+      >
+        <template #prepend>
+          <el-select v-model="listQuery.searchType" size="mini" style="width:150px" placeholder="请选择">
+            <el-option label="订单id" value="1" />
+            <el-option label="买家账户" value="2" />
+            <el-option label="收件人姓名" value="3" />
+            <el-option label="收件人手机号" value="4" />
+            <!-- <el-option label="商品ID" value="5" /> -->
+            <el-option label="下单号码" value="6" />
+          </el-select>
+        </template>
+      </el-input>
+      <el-input
+        v-model="listQuery.shopName" maxlength="20" clearable size="mini"
+        class="filter-item" style="width: 200px;margin-left: 10px;" placeholder="请输入商户名称"
+      />
+      <!-- <el-select
+        v-model="listQuery.afterState" clearable size="mini" class="filter-item"
+        style="width: 200px;margin-left: 10px;" placeholder="请选择售后状态"
+        >
+        <el-option label="全部" :value="null" />
+        <el-option label="无售后" value="0" />
+        <el-option label="售后中" value="1" />
+        <el-option label="售后成功" value="2" />
+        <el-option label="售后关闭" value="3" />
+        </el-select> -->
+      <el-date-picker
+        v-model="listQuery.dates" type="daterange" range-separator="至"
+        start-placeholder="开始时间" end-placeholder="结束时间" size="mini"
+        class="filter-item" style="margin-left: 10px;line-height: 1;"
+      />
+      <el-button
+        size="mini" class="filter-item" type="primary" icon="el-icon-search"
+        style="margin-left:10px;"
+        @click="handleSearch"
+      >
+        查找
+      </el-button>
+      <br />
+      <el-button size="mini" type="primary" icon="el-icon-plus" @click="exportExcelVisible = true">
+        导出订单
+      </el-button>
     </div>
-    <div class="tab_show">
-      <el-tabs v-model="formInline.state" @tab-click="handleClick">
-        <el-tab-pane :label="stateText[index]" :name="item == ''?'0':item" v-for="(item, index) in stateList" :key="item"></el-tab-pane>
-        <!-- <template v-else-if="tabPosition == 'business'">
-          <el-tab-pane label="全部" :name="''" />
-          <el-tab-pane label="已取消" name="5" />
-          <el-tab-pane label="待核销" name="8" />
-          <el-tab-pane label="待核销已付款" name="9" />
-          <el-tab-pane label="已核销" name="10" />
-        </template> -->
-      </el-tabs>
-      <!-- 搜索 -->
-      <div class="formSearch">
-        <el-form :inline="true" :model="formInline" class="demo-form-inline">
 
-          <el-form-item>
-            <div>
-              <el-input v-model="formInline.search" placeholder="请输入内容">
-                <el-select slot="prepend" v-model="formInline.searchType" style="width:130px" placeholder="请选择">
-                  <el-option label="订单id" value="1" />
-                  <el-option label="买家账户" value="2" />
-                  <el-option label="收件人姓名" value="3" />
-                  <el-option label="收件人手机号" value="4" />
-                  <el-option label="下单号码" value="6" />
-                  <!-- <el-option label="商品ID" value="5" /> -->
-                </el-select>
-              </el-input>
-            </div>
-          </el-form-item>
-          <el-form-item label="商户名称">
-            <el-input v-model="formInline.shopName" maxlength="20" placeholder="请输入" />
-          </el-form-item>
-          <!-- <el-form-item label="售后状态">
-            <el-select v-model="formInline.afterState" placeholder="请选择售后状态">
-              <el-option label="全部" :value="null" />
-              <el-option label="无售后" value="0" />
-              <el-option label="售后中" value="1" />
-              <el-option label="售后成功" value="2" />
-              <el-option label="售后关闭" value="3" />
-            </el-select>
-          </el-form-item> -->
-          <el-form-item label="下单时间">
-            <el-date-picker v-model="formInline.dates" type="daterange" range-separator="至" start-placeholder="开始日期"
-              end-placeholder="结束日期" />
-          </el-form-item>
-          <el-form-item>
-            <el-button type="primary" plain @click="search">查询</el-button>
-            <el-button type="success" plain @click="exportExcelVisible = true">导出订单</el-button>
-          </el-form-item>
-        </el-form>
-      </div>
-      <!-- 表格 -->
-      <div class="tableBox">
-        <el-table ref="multipleTable" v-loading="tableLoading" :data="tableData" border stripe
-          @selection-change="handleSelectOrder" :header-cell-style="{ background: '#EEF3FF', color: '#333333' }"
-          tooltip-effect="dark" style="width: 100%">
-          <el-table-column type="selection" width="55">
-          </el-table-column>
-          <el-table-column label="订单id" width="150">
-            <template slot-scope="scope">{{ scope.row.orderId }}</template>
-          </el-table-column>
-          <el-table-column prop="customerPhone" label="下单号码" width="220" />
-          <el-table-column prop="number" label="商品数量" width="100" />
-          <el-table-column prop="orderFormid" label="订单编号" width="220" />
-          <el-table-column prop="scanType" label="订单类型" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <span v-if="scope.row.scanType == 1">常规订单</span>
-              <span v-if="scope.row.scanType == 2">收款码订单</span>
-            </template>
-          </el-table-column>
-          <el-table-column prop="shopName" label="商户名称" width="220" show-overflow-tooltip />
-          <el-table-column prop="customerName" label="下单账户" show-overflow-tooltip />
-          <el-table-column prop="receiveName" label="收件人" show-overflow-tooltip />
-          <el-table-column prop="receivePhone" label="手机号" show-overflow-tooltip />
-          <el-table-column prop="price" label="支付金额(元)" width="120" />
-          <el-table-column prop="voucherPrice" label="抵扣金额" show-overflow-tooltip />
-          <el-table-column prop="createTime" label="下单时间" show-overflow-tooltip />
-          <el-table-column label="订单状态" min-width="120" show-overflow-tooltip>
-            <template slot-scope="scope">
-							<span v-if="scope.row.state == 1">待付款</span>
-							<span v-else-if="scope.row.state == 2">待发货</span>
-							<span v-else-if="scope.row.state == 3">待收货</span>
-							<span v-else-if="scope.row.state == 4">已完成</span>
-							<span v-else-if="scope.row.state == 5">交易关闭(已取消)</span>
-							<span v-else-if="scope.row.state == 6">待成团</span>
-							<span v-else-if="scope.row.state == 7">待售后</span>
-							<span v-else-if="scope.row.state == 8">待核销(未付款)</span>
-							<span v-else-if="scope.row.state == 9">待核销(已付款)</span>
-							<span v-else-if="scope.row.state == 10">已核销</span>
-							<span v-else>--</span>
-            </template>
-          </el-table-column>
+    <!-- 查询结果 -->
+    <div v-tableHeight>
+      <el-table
+        v-loading="listLoading" height="100%" element-loading-text="正在查询中。。。" :data="list"
+        v-bind="{ stripe: true, size: 'small', border: true, fit: true, highlightCurrentRow: true }"
+        @selection-change="(e) => selectOrderIds = e"
+      >
+        <el-table-column align="center" width="55" type="selection">
+        </el-table-column>
+        <el-table-column align="center" width="120" label="订单ID" prop="orderId" fixed="left">
+          <template slot-scope="{ row }">
+            {{ row.orderId }}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" width="220" label="订单编号" prop="orderFormid" fixed="left" />
+        <el-table-column align="center" label="下单时间" prop="createTime" show-overflow-tooltip />
+        <el-table-column align="center" width="180" label="下单号码" prop="customerPhone" />
+        <el-table-column align="center" label="下单账户" prop="customerName" show-overflow-tooltip />
+        <el-table-column align="center" width="220" label="商家名称" prop="shopName" show-overflow-tooltip />
+        <el-table-column align="center" width="220" label="支付金额(元)" prop="price" />
+        <el-table-column align="center" width="120" label="商家赠送代金券" prop="shopVoucher" show-overflow-tooltip />
+        <el-table-column align="center" width="120" label="平台赠送代金券" prop="platformVoucher" show-overflow-tooltip />
+        <el-table-column align="center" width="120" label="总赠送代金券" prop="presenterVoucher" show-overflow-tooltip />
+        <el-table-column align="center" width="120" label="代金券抵扣金额" prop="voucherPrice" show-overflow-tooltip />
+        <el-table-column align="center" min-width="120" label="订单状态" prop="state" show-overflow-tooltip>
+          <template slot-scope="{ row }">
+            <span v-if="row.state == 1">待付款</span>
+            <span v-else-if="row.state == 2">待发货</span>
+            <span v-else-if="row.state == 3">待收货</span>
+            <span v-else-if="row.state == 4">已完成</span>
+            <span v-else-if="row.state == 5">交易关闭(已取消)</span>
+            <span v-else-if="row.state == 6">待成团</span>
+            <span v-else-if="row.state == 7">待售后</span>
+            <span v-else-if="row.state == 8">待核销(未付款)</span>
+            <span v-else-if="row.state == 9">待核销(已付款)</span>
+            <span v-else-if="row.state == 10">已核销</span>
+            <span v-else>--</span>
+          </template>
+        </el-table-column>
 
-          <el-table-column label="操作" show-overflow-tooltip>
-            <template slot-scope="scope">
-              <div class="btnList">
-                <el-button type="text" @click="seeMore(scope.row)">查看</el-button>
-              </div>
-            </template>
-          </el-table-column>
-        </el-table>
-        <div class="fenye">
-          <el-pagination :current-page="formInline.page" :page-sizes="[10, 20, 50, 100]" :page-size="10"
-            layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange"
-            @current-change="handleCurrentChange" />
-        </div>
-      </div>
+        <el-table-column align="center" width="100" label="商品数量" prop="number" />
+        <el-table-column align="center" label="订单类型" prop="scanType" show-overflow-tooltip>
+          <template slot-scope="{ row }">
+            <el-tag v-if="row.scanType === 1" effect="plain">常规订单</el-tag>
+            <el-tag v-else-if="row.scanType === 2" effect="plain">收款码订单</el-tag>
+            <span v-else>--</span>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="收件人" prop="receiveName" show-overflow-tooltip />
+        <el-table-column align="center" label="手机号" prop="receivePhone" show-overflow-tooltip />
+        <el-table-column align="center" label="操作" width="120" fixed="right" class-name="small-padding fixed-width">
+          <template slot-scope="{ row }">
+            <el-button type="warning" size="mini" @click="handleDetail(row)">
+              详情
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
     </div>
+
+    <div>
+      <el-pagination
+        :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="total"
+        @size-change="(val) => ((listQuery.pageSize = val) && getList())"
+        @current-change="(val) => ((listQuery.page = val) && getList())"
+      />
+    </div>
+
     <el-dialog title="订单详情" :visible.sync="detailVisible" width="74%" center :close-on-click-modal="false">
-      <OrderDetail :detail-row="form" @cancel="cancel" />
+      <OrderDetail :detail-row="form" @cancel="detailVisible = false" />
     </el-dialog>
 
     <el-dialog title="选择导出模版" :visible.sync="exportExcelVisible" center :close-on-click-modal="false">
@@ -124,11 +154,15 @@
         <el-radio :label="1">平台订单</el-radio>
         <el-radio :label="2">胖子发货订单</el-radio>
       </el-radio-group>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="exportExcelVisible = false">取 消</el-button>
-        <el-button type="primary" @click="orderDataExport" :loading="exportExcelLoading">{{ exportExcelLoading ?
-          '导出中...' : '确认导出' }}</el-button>
-      </span>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button @click="exportExcelVisible = false">取 消</el-button>
+          <el-button type="primary" :loading="exportExcelLoading" @click="handleDataExport">
+            {{ exportExcelLoading
+              ? '导出中...' : '确认导出' }}
+          </el-button>
+        </span>
+      </template>
     </el-dialog>
   </div>
 </template>
@@ -136,19 +170,17 @@
 <script>
 import OrderDetail from '@/views/order/pending/pendDetails.vue'
 import { orderGetAll, orderExport } from '@/api/order'
-import { async } from 'q'
 export default {
-  components: { OrderDetail },
+  name: 'Pending',
+  components: {
+    OrderDetail
+  },
   data() {
-    // 这里存放数据
     return {
-      activeName: 'first',
-      active: "first",
-      tabPosition: 'shopping',
-      //  存储状态
-      stateText: ["全部", "待付款", "待发货", "已发货", "已完成", "已关闭"],
-      stateList: ['', '1', '2', '3', '4', '5'],
-      formInline: {
+      list: [],
+      total: 0,
+      listLoading: true,
+      listQuery: {
         searchType: '1',
         search: '', // 搜索字段
         state: '',
@@ -156,13 +188,10 @@ export default {
         dates: [], // 下单时间数组
         page: 1,
         shopName: '',
-        pageSize: 10,
+        pageSize: 20,
         templateType: 1,
         orderType: 1
       },
-      total: 1,
-      tableData: [],
-      tableLoading: false,
       detailVisible: false,
       exportExcelVisible: false,
       form: {},
@@ -171,92 +200,50 @@ export default {
       selectOrderIds: []
     }
   },
-  // 生命周期 - 挂载完成(可以访问DOM元素)
-  mounted() {
-    this.getAll(this.formInline)
-    this.handleClick({ name: '' })
+  created() {
+    this.getList()
   },
-  watch: {
-    tabPosition(newVal, oldVal) {
-      if (newVal == "shopping") {
-        this.stateText = ["全部", "待付款", "待发货", "已发货", "已完成", "已关闭"]
-        this.stateList = ['', '1', '2', '3', '4', '5'];
-        this.formInline.orderType = 1
-      } else if (newVal == "business") {
-        this.stateText = ["全部", "已取消", "待核销", "待核销已付款", "已核销"]
-        this.stateList = ['', '5', '8', '9', '10']
-        this.formInline.orderType = 2
-      }
-      this.getAll(this.formInline)
-      this.handleClick({ name: '' })
-    },
-  },
-  // 方法集合
   methods: {
-    handleSizeChange(val) {
-      this.formInline.pageSize = val
-      this.getAll(this.formInline)
-    },
-    handleCurrentChange(val) {
-      this.formInline.page = val
-      this.getAll(this.formInline)
+    async getList() {
+      this.listLoading = true
+      try {
+        const res = await orderGetAll(this.listQuery)
+        this.list = res.data.list
+        this.total = res.data.total
+      } finally {
+        this.listLoading = false
+      }
     },
-    handleClick(tab, event) {
-      this.page = 1
-      this.formInline.state = tab.name
-      this.formInline.page = 1
-      this.getAll(this.formInline)
+    handleSetOrderType(e) {
+      this.listQuery.orderType = e
+      this.listQuery.state = ''
+      this.handleSearch()
     },
-    //  查询
-    search() {
-      this.total = 1
-      this.formInline.page = 1
-      this.getAll(this.formInline)
+    handleSearch() {
+      this.listQuery.page = 1
+      this.getList()
     },
-    // 详情
-    seeMore(row) {
+    handleDetail(row) {
       this.detailVisible = true
       this.form = row
-      // this.$router.push({
-      //   name: 'pendDetails',
-      //   params: { orderId: row.orderId }
-      // })
-    },
-    cancel() {
-      this.detailVisible = false
-    },
-    // 初始化查询所有数据
-    async getAll(formInline) {
-      this.tableLoading = true
-      let obj = JSON.parse(JSON.stringify(formInline))
-      console.log(obj);
-      if(obj.state == '0') obj.state = ''
-      const res = await orderGetAll(obj)
-      this.tableData = res.data.list
-      this.total = res.data.total
-      this.tableLoading = false
-    },
-
-    // 选择订单
-    handleSelectOrder(e) {
-      this.selectOrderIds = e
+      this.$refs.DetailModal && this.$refs.DetailModal.handleOpen(row)
     },
 
     // 导出订单
-    async orderDataExport() {
+    async handleDataExport() {
       this.$message({
         message: '数据导出中,请勿重复操作!',
         type: 'success'
       })
       try {
         this.exportExcelLoading = true
-        const exportExcelParams = { ...this.formInline, templateType: this.exportTemplate }
-        !!this.selectOrderIds.length && (exportExcelParams.orderIds = this.selectOrderIds.map(item => item.orderId))
+        const exportExcelParams = { ...this.listQuery, templateType: this.exportTemplate }
+        !!this.selectOrderIds.length && (exportExcelParams.orderIds = this.selectOrderIds.map((item) => item.orderId))
         const res = await orderExport(exportExcelParams)
         if (!res) {
           return
         }
-        const blob = new Blob([res], { type: 'application/vnd.ms-excel' })
+        const blob = new Blob([ res ], { type: 'application/vnd.ms-excel' })
         const fileName = '订单数据明细表.xls'
         if ('download' in document.createElement('a')) {
           // 非IE下载
@@ -292,11 +279,31 @@ export default {
 }
 </script>
 
-<style lang='scss' scoped>
-//@import url(); 引入公共css类
-@import url("../../../styles/elDialog.scss");
+<style lang="scss" scoped>
+.app-container {
+	padding: 20px;
+	display: flex;
+	flex-direction: column;
+
+	.filter-container {
+		.filter-item {
+			display: inline-block;
+			vertical-align: middle;
+			margin-bottom: 10px;
+		}
+	}
+
+	.small-padding {
+		.cell {
+			padding-left: 5px;
+			padding-right: 5px;
+		}
+	}
 
-.tab_show {
-  padding-left: 30px;
+	.fixed-width {
+		.el-button--mini {
+			padding: 7px 10px;
+		}
+	}
 }
 </style>

+ 9 - 39
src/views/order/pending/pendDetails.vue

@@ -139,16 +139,9 @@
         <!-- 未发货时物流信息显示去发货按钮 -->
         <div v-show="order.logisticsName && order.logisticsNum" class="logistics_info">
           <h2>物流信息</h2>
-          <!-- <p
-            v-if="!order.logisticsNum"
-            class="send_good"
-            @click="send"
-            >
-            去发货
-            </p> -->
           <el-button
-            v-if="!order.logisticsNum && order.state == 2" type="primary" class="send_good"
-            @click="send"
+            v-if="!order.logisticsNum && (order.state == 2)" type="primary" class="send_good"
+            @click="handleSendGoods"
           >
             去发货
           </el-button>
@@ -157,14 +150,6 @@
               <span>物流公司: {{ order.logisticsName }}</span>
               <span>运单号: {{ order.logisticsNum }}</span>
             </p>
-            <!-- <p
-              v-for="(item, index) in tracesList"
-              :key="index"
-              class="logistics_item"
-              >
-              <span>{{ item.acceptTime }}</span>
-              <span>{{ acceptStation }}</span>
-              </p> -->
           </div>
         </div>
       </div>
@@ -214,6 +199,7 @@
 <script>
 import { orderGetById, orderGetSelect, orderDilevery } from '@/api/order'
 export default {
+  name: 'PendDetails',
   props: {
     detailRow: {
       type: Object,
@@ -224,7 +210,7 @@ export default {
     return {
       order: {},
       form: {
-        orderId: this.orderId,
+        orderId: '',
         express: '',
         deliverFormid: ''
       },
@@ -250,9 +236,9 @@ export default {
           this.form.orderId = nVal.orderId
           this.getProductList()
         }
-      }
-    },
-    deep: true
+      },
+      deep: true
+    }
   },
   created() {
     this.form.orderId = this.detailRow.orderId
@@ -263,9 +249,6 @@ export default {
       const res = await orderGetById({ orderId: this.detailRow.orderId })
       this.order = res.data
     },
-    close() {
-      this.$emit('cancel')
-    },
     confirm() {
       this.$refs.sendGoodsForm.validate((valid) => {
         if (valid) {
@@ -277,7 +260,7 @@ export default {
                 type: 'success'
               })
               this.isVisible = false
-              this.close()
+              this.$emit('cancel')
             }
           })
         }
@@ -292,7 +275,7 @@ export default {
         this.companyList = res.data
       }
     },
-    send() {
+    handleSendGoods() {
       this.getCompanyList()
       this.isVisible = true
     }
@@ -311,13 +294,11 @@ ul {
 
 .order_details {
 	h3 {
-		// margin-left: 20px;
 		margin: 20px 0 20px 20px;
 		font-weight: 700;
 	}
 
 	.close {
-		// float: right;
 		position: absolute;
 		right: 20px;
 
@@ -385,10 +366,6 @@ ul {
 						}
 					}
 				}
-
-				.remarks {
-					margin-left: 30px !important;
-				}
 			}
 
 			.goods_info {
@@ -473,13 +450,6 @@ ul {
 							width: 45%;
 						}
 					}
-
-					.logistics_item {
-						span {
-							display: inline-block;
-							width: 30%;
-						}
-					}
 				}
 			}
 		}

+ 80 - 0
src/views/signInManagement/transactionSignIn/components/DetailModal.vue

@@ -0,0 +1,80 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    v-bind="modalOptions"
+  >
+    <el-form
+      ref="formData"
+      :model="formData"
+      size="mini"
+      label-position="left"
+      label-suffix=":"
+      label-width="200px"
+    >
+      <!-- 消费金签到配置信息 -->
+      <el-form-item label="ID" prop="signConfigId">
+        {{ formData.signConfigId || '--' }}
+      </el-form-item>
+      <el-form-item label="每日签到金额" prop="signPrice">
+        {{ formData.signPrice || '--' }}
+      </el-form-item>
+      <el-form-item label="连续签到天数设置" prop="signDay">
+        {{ formData.signDay || '--' }}
+      </el-form-item>
+      <el-form-item label="创建时间" prop="createTime">
+        {{ formData.createTime || '--' }}
+      </el-form-item>
+    </el-form>
+  </el-dialog>
+</template>
+
+<script>
+import { getByIdBeeSignConfig } from '@/api/signInManagement/transactionSignIn'
+
+export default {
+  name: 'DetailModal',
+  data() {
+    return {
+      modalOptions: {
+        closeOnClickModal: false,
+        width: '800px',
+        title: '查看消费金签到配置详情'
+      },
+      visible: false,
+      formData: {
+        signConfigId: '',
+        signPrice: '',
+        signDay: '',
+        createTime: ''
+      }
+    }
+  },
+  methods: {
+    handleClose() {
+      this.visible = false
+    },
+    handleOpen(params = {}) {
+      this.formData = Object.assign(this.$options.data().formData, params)
+      if (params.signConfigId) {
+        this.getInfo(params.signConfigId)
+      }
+      this.visible = true
+    },
+    async getInfo(id) {
+      const loading = this.$loading({ text: '加载中' })
+      try {
+        const res = await getByIdBeeSignConfig({ id })
+        this.formData = Object.assign(this.$options.data().formData, res.data, {
+          signConfigId: res.data.signConfigId || '',
+          signPrice: res.data.signPrice || '',
+          signDay: res.data.signDay || '',
+          createTime: res.data.createTime || ''
+        })
+      } finally {
+        loading.close()
+      }
+    }
+  }
+}
+</script>
+

+ 133 - 0
src/views/signInManagement/transactionSignIn/components/EditModal.vue

@@ -0,0 +1,133 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    v-bind="modalOptions"
+  >
+    <el-form
+      ref="formData"
+      :model="formData"
+      :rules="formRules"
+      size="mini"
+      label-suffix=":"
+      label-width="150px"
+    >
+      <el-form-item label="每日签到金额" prop="signPrice">
+        <el-input v-model="formData.signPrice" placeholder="请输入每日签到金额" style="width: 200px;">
+          <template #append>
+            <div>元</div>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="连续签到天数" prop="signDay">
+        <el-input v-model="formData.signDay" placeholder="请输入连续签到天数" style="width: 200px;">
+          <template #append>
+            <div>天</div>
+          </template>
+        </el-input>
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button size="mini" @click="handleClose">取 消</el-button>
+        <el-button type="primary" size="mini" @click="handleSubmit">确 定</el-button>
+      </span>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import { saveBeeSignConfig, updateBeeSignConfig, getByIdBeeSignConfig } from '@/api/signInManagement/transactionSignIn'
+
+export default {
+  name: 'EditModal',
+  components: {
+  },
+  data() {
+    return {
+      modalOptions: {
+        closeOnClickModal: false,
+        width: '820px',
+        title: ''
+      },
+      visible: false,
+      formData: {
+        signConfigId: '',
+        signPrice: '',
+        signDay: '',
+        createTime: ''
+      },
+      formRules: {
+        signPrice: [
+          { required: true, message: '请输入每日签到金额' },
+          { pattern: /^0\.\d{0,2}$|^[1-9]\d*\.\d{0,2}$|^[1-9]\d*$/, message: '数值有误' }
+        ],
+        signDay: [
+          { required: true, message: '请输入连续签到天数' },
+          { pattern: /^(0|[1-9][0-9]*)$/, message: '请输入正整数' }
+        ]
+      }
+    }
+  },
+  methods: {
+    handleClose() {
+      this.visible = false
+    },
+    initList() {
+    },
+    handleOpen(params = {}) {
+      this.modalOptions.title = params.signConfigId ? '编辑消费金签到配置' : '添加消费金签到配置'
+      this.formData = Object.assign(this.$options.data().formData, params)
+      this.visible = true
+      this.initList()
+      if (params.signConfigId) {
+        this.getInfo(params.signConfigId)
+      } else {
+        this.$refs.formData && this.$refs.formData.resetFields()
+      }
+    },
+    async getInfo(id) {
+      const loading = this.$loading({ text: '加载中' })
+      try {
+        const res = await getByIdBeeSignConfig({ id })
+        this.formData = Object.assign(this.$options.data().formData, res.data, {
+          signConfigId: res.data.signConfigId || '',
+          signPrice: res.data.signPrice || '',
+          signDay: res.data.signDay || '',
+          createTime: res.data.createTime || ''
+        })
+        this.$nextTick(() => {
+          this.$refs.formData && this.$refs.formData.validate()
+        })
+      } finally {
+        loading.close()
+      }
+    },
+    handleSubmit() {
+      this.$refs.formData.validate(async (valid) => {
+        if (valid) {
+          const loading = this.$loading({ text: '加载中' })
+          try {
+            const { ...otps } = this.formData
+            const params = {
+              ...otps
+            }
+            this.formData.signConfigId ? await updateBeeSignConfig(params) : await saveBeeSignConfig(params)
+            loading.close()
+            this.$message({ message: `${this.formData.signConfigId ? '编辑' : '添加'}成功!`, type: 'success' })
+            this.$emit('success')
+            this.visible = false
+          } catch (e) {
+            loading.close()
+          } finally {
+            loading.close()
+          }
+        } else {
+          this.$message({ message: '请输入相关信息', type: 'warning' })
+          return false
+        }
+      })
+    }
+  }
+}
+</script>
+

+ 149 - 0
src/views/signInManagement/transactionSignIn/index.vue

@@ -0,0 +1,149 @@
+<template>
+  <div class="app-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-button
+        size="mini" class="filter-item" type="primary" icon="el-icon-search"
+        style="margin-left:10px;"
+        @click="handleSearch"
+      >
+        查找
+      </el-button>
+      <br />
+      <el-button
+        size="mini" type="primary" icon="el-icon-plus"
+        @click="$refs.EditModal && $refs.EditModal.handleOpen({ signConfigId: '' })"
+      >
+        添加
+      </el-button>
+    </div>
+
+    <!-- 查询结果 -->
+    <div v-tableHeight>
+      <el-table
+        v-loading="listLoading" height="100%" element-loading-text="正在查询中。。。" :data="list"
+        v-bind="{ stripe: true, size: 'small', border: true, fit: true, highlightCurrentRow: true }"
+      >
+        <el-table-column align="center" width="100" label="ID" prop="signConfigId" fixed="left" />
+        <el-table-column align="center" width="150" label="每日签到金额" prop="signPrice" fixed="left" show-overflow-tooltip />
+        <el-table-column align="center" width="150" label="连续签到天数设置" prop="signDay" show-overflow-tooltip />
+        <el-table-column align="center" width="150" label="创建时间" prop="createTime" />
+        <el-table-column align="center" label="操作" width="300" fixed="right" class-name="small-padding fixed-width">
+          <template slot-scope="{ row }">
+            <el-button size="mini" @click="handleDetail(row)">
+              查看
+            </el-button>
+            <el-button size="mini" @click="handleEdit(row)">
+              编辑
+            </el-button>
+            <el-button type="danger" size="mini" @click="handleDelete(row)">
+              删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
+    <div>
+      <el-pagination
+        :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="total"
+        @size-change="(val) => ((listQuery.pageSize = val) && getList())"
+        @current-change="(val) => ((listQuery.page = val) && getList())"
+      />
+    </div>
+
+    <!-- 新增编辑 -->
+    <EditModal ref="EditModal" @success="getList" />
+    <!-- 查看详情 -->
+    <DetailModal ref="DetailModal" />
+  </div>
+</template>
+
+<script>
+import EditModal from './components/EditModal'
+import DetailModal from './components/DetailModal'
+import { getAllBeeSignConfig, deleteByIdBeeSignConfig } from '@/api/signInManagement/transactionSignIn'
+
+export default {
+  name: 'TransactionSignIn',
+  components: {
+    EditModal,
+    DetailModal
+  },
+  data() {
+    return {
+      list: [],
+      total: 0,
+      listLoading: true,
+      listQuery: {
+        page: 1,
+        pageSize: 20
+      }
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    async getList() {
+      this.listLoading = true
+      try {
+        const res = await getAllBeeSignConfig(this.listQuery)
+        this.list = res.data.items
+        this.total = res.data.total
+      } finally {
+        this.listLoading = false
+      }
+    },
+    handleSearch() {
+      this.listQuery.page = 1
+      this.getList()
+    },
+    handleDetail(row) {
+      this.$refs.DetailModal && this.$refs.DetailModal.handleOpen(row)
+    },
+    handleEdit(row) {
+      this.$refs.EditModal && this.$refs.EditModal.handleOpen(row)
+    },
+    handleDelete(row) {
+      this.$confirm('确定删除此项?')
+        .then(async () => {
+          await deleteByIdBeeSignConfig({ id: row.signConfigId })
+          this.$message({ message: '删除成功!', type: 'success' })
+          this.handleSearch()
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.app-container {
+	padding: 20px;
+	display: flex;
+	flex-direction: column;
+
+	.filter-container {
+		.filter-item {
+			display: inline-block;
+			vertical-align: middle;
+			margin-bottom: 10px;
+		}
+	}
+
+	.small-padding {
+		.cell {
+			padding-left: 5px;
+			padding-right: 5px;
+		}
+	}
+
+	.fixed-width {
+		.el-button--mini {
+			padding: 7px 10px;
+		}
+	}
+}
+</style>

+ 80 - 0
src/views/signInManagement/voucherSignIn/components/DetailModal.vue

@@ -0,0 +1,80 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    v-bind="modalOptions"
+  >
+    <el-form
+      ref="formData"
+      :model="formData"
+      size="mini"
+      label-position="left"
+      label-suffix=":"
+      label-width="200px"
+    >
+      <!-- 消费金签到配置信息 -->
+      <el-form-item label="ID" prop="signConfigId">
+        {{ formData.signConfigId || '--' }}
+      </el-form-item>
+      <el-form-item label="每日签到金额" prop="signPrice">
+        {{ formData.signPrice || '--' }}
+      </el-form-item>
+      <el-form-item label="连续签到天数设置" prop="signDay">
+        {{ formData.signDay || '--' }}
+      </el-form-item>
+      <el-form-item label="创建时间" prop="createTime">
+        {{ formData.createTime || '--' }}
+      </el-form-item>
+    </el-form>
+  </el-dialog>
+</template>
+
+<script>
+import { getByIdVoucherSignConfig } from '@/api/signInManagement/voucherSignIn'
+
+export default {
+  name: 'DetailModal',
+  data() {
+    return {
+      modalOptions: {
+        closeOnClickModal: false,
+        width: '800px',
+        title: '查看消费金签到配置详情'
+      },
+      visible: false,
+      formData: {
+        signConfigId: '',
+        signPrice: '',
+        signDay: '',
+        createTime: ''
+      }
+    }
+  },
+  methods: {
+    handleClose() {
+      this.visible = false
+    },
+    handleOpen(params = {}) {
+      this.formData = Object.assign(this.$options.data().formData, params)
+      if (params.signConfigId) {
+        this.getInfo(params.signConfigId)
+      }
+      this.visible = true
+    },
+    async getInfo(id) {
+      const loading = this.$loading({ text: '加载中' })
+      try {
+        const res = await getByIdVoucherSignConfig({ id })
+        this.formData = Object.assign(this.$options.data().formData, res.data, {
+          signConfigId: res.data.signConfigId || '',
+          signPrice: res.data.signPrice || '',
+          signDay: res.data.signDay || '',
+          createTime: res.data.createTime || ''
+        })
+      } finally {
+        loading.close()
+      }
+    }
+  }
+}
+</script>
+

+ 133 - 0
src/views/signInManagement/voucherSignIn/components/EditModal.vue

@@ -0,0 +1,133 @@
+<template>
+  <el-dialog
+    :visible.sync="visible"
+    v-bind="modalOptions"
+  >
+    <el-form
+      ref="formData"
+      :model="formData"
+      :rules="formRules"
+      size="mini"
+      label-suffix=":"
+      label-width="150px"
+    >
+      <el-form-item label="每日签到金额" prop="signPrice">
+        <el-input v-model="formData.signPrice" placeholder="请输入每日签到金额" style="width: 200px;">
+          <template #append>
+            <div>元</div>
+          </template>
+        </el-input>
+      </el-form-item>
+      <el-form-item label="连续签到天数" prop="signDay">
+        <el-input v-model="formData.signDay" placeholder="请输入连续签到天数" style="width: 200px;">
+          <template #append>
+            <div>天</div>
+          </template>
+        </el-input>
+      </el-form-item>
+    </el-form>
+    <template #footer>
+      <span class="dialog-footer">
+        <el-button size="mini" @click="handleClose">取 消</el-button>
+        <el-button type="primary" size="mini" @click="handleSubmit">确 定</el-button>
+      </span>
+    </template>
+  </el-dialog>
+</template>
+
+<script>
+import { saveVoucherSignConfig, updateVoucherSignConfig, getByIdVoucherSignConfig } from '@/api/signInManagement/voucherSignIn'
+
+export default {
+  name: 'EditModal',
+  components: {
+  },
+  data() {
+    return {
+      modalOptions: {
+        closeOnClickModal: false,
+        width: '820px',
+        title: ''
+      },
+      visible: false,
+      formData: {
+        signConfigId: '',
+        signPrice: '',
+        signDay: '',
+        createTime: ''
+      },
+      formRules: {
+        signPrice: [
+          { required: true, message: '请输入每日签到金额' },
+          { pattern: /^0\.\d{0,2}$|^[1-9]\d*\.\d{0,2}$|^[1-9]\d*$/, message: '数值有误' }
+        ],
+        signDay: [
+          { required: true, message: '请输入连续签到天数' },
+          { pattern: /^(0|[1-9][0-9]*)$/, message: '请输入正整数' }
+        ]
+      }
+    }
+  },
+  methods: {
+    handleClose() {
+      this.visible = false
+    },
+    initList() {
+    },
+    handleOpen(params = {}) {
+      this.modalOptions.title = params.signConfigId ? '编辑消费金签到配置' : '添加消费金签到配置'
+      this.formData = Object.assign(this.$options.data().formData, params)
+      this.visible = true
+      this.initList()
+      if (params.signConfigId) {
+        this.getInfo(params.signConfigId)
+      } else {
+        this.$refs.formData && this.$refs.formData.resetFields()
+      }
+    },
+    async getInfo(id) {
+      const loading = this.$loading({ text: '加载中' })
+      try {
+        const res = await getByIdVoucherSignConfig({ id })
+        this.formData = Object.assign(this.$options.data().formData, res.data, {
+          signConfigId: res.data.signConfigId || '',
+          signPrice: res.data.signPrice || '',
+          signDay: res.data.signDay || '',
+          createTime: res.data.createTime || ''
+        })
+        this.$nextTick(() => {
+          this.$refs.formData && this.$refs.formData.validate()
+        })
+      } finally {
+        loading.close()
+      }
+    },
+    handleSubmit() {
+      this.$refs.formData.validate(async (valid) => {
+        if (valid) {
+          const loading = this.$loading({ text: '加载中' })
+          try {
+            const { ...otps } = this.formData
+            const params = {
+              ...otps
+            }
+            this.formData.signConfigId ? await updateVoucherSignConfig(params) : await saveVoucherSignConfig(params)
+            loading.close()
+            this.$message({ message: `${this.formData.signConfigId ? '编辑' : '添加'}成功!`, type: 'success' })
+            this.$emit('success')
+            this.visible = false
+          } catch (e) {
+            loading.close()
+          } finally {
+            loading.close()
+          }
+        } else {
+          this.$message({ message: '请输入相关信息', type: 'warning' })
+          return false
+        }
+      })
+    }
+  }
+}
+</script>
+

+ 149 - 0
src/views/signInManagement/voucherSignIn/index.vue

@@ -0,0 +1,149 @@
+<template>
+  <div class="app-container">
+    <!-- 查询和其他操作 -->
+    <div class="filter-container">
+      <el-button
+        size="mini" class="filter-item" type="primary" icon="el-icon-search"
+        style="margin-left:10px;"
+        @click="handleSearch"
+      >
+        查找
+      </el-button>
+      <br />
+      <el-button
+        size="mini" type="primary" icon="el-icon-plus"
+        @click="$refs.EditModal && $refs.EditModal.handleOpen({ signConfigId: '' })"
+      >
+        添加
+      </el-button>
+    </div>
+
+    <!-- 查询结果 -->
+    <div v-tableHeight>
+      <el-table
+        v-loading="listLoading" height="100%" element-loading-text="正在查询中。。。" :data="list"
+        v-bind="{ stripe: true, size: 'small', border: true, fit: true, highlightCurrentRow: true }"
+      >
+        <el-table-column align="center" width="100" label="ID" prop="signConfigId" fixed="left" />
+        <el-table-column align="center" width="150" label="每日签到金额" prop="signPrice" fixed="left" show-overflow-tooltip />
+        <el-table-column align="center" width="150" label="连续签到天数设置" prop="signDay" show-overflow-tooltip />
+        <el-table-column align="center" width="150" label="创建时间" prop="createTime" />
+        <el-table-column align="center" label="操作" width="300" fixed="right" class-name="small-padding fixed-width">
+          <template slot-scope="{ row }">
+            <el-button size="mini" @click="handleDetail(row)">
+              查看
+            </el-button>
+            <el-button size="mini" @click="handleEdit(row)">
+              编辑
+            </el-button>
+            <el-button type="danger" size="mini" @click="handleDelete(row)">
+              删除
+            </el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
+    <div>
+      <el-pagination
+        :current-page="listQuery.page" :page-sizes="[10, 20, 50, 100]" :page-size="listQuery.pageSize"
+        layout="total, sizes, prev, pager, next, jumper" :total="total"
+        @size-change="(val) => ((listQuery.pageSize = val) && getList())"
+        @current-change="(val) => ((listQuery.page = val) && getList())"
+      />
+    </div>
+
+    <!-- 新增编辑 -->
+    <EditModal ref="EditModal" @success="getList" />
+    <!-- 查看详情 -->
+    <DetailModal ref="DetailModal" />
+  </div>
+</template>
+
+<script>
+import EditModal from './components/EditModal'
+import DetailModal from './components/DetailModal'
+import { getAllVoucherSignConfig, deleteByIdVoucherSignConfig } from '@/api/signInManagement/voucherSignIn'
+
+export default {
+  name: 'VoucherSignIn',
+  components: {
+    EditModal,
+    DetailModal
+  },
+  data() {
+    return {
+      list: [],
+      total: 0,
+      listLoading: true,
+      listQuery: {
+        page: 1,
+        pageSize: 20
+      }
+    }
+  },
+  created() {
+    this.getList()
+  },
+  methods: {
+    async getList() {
+      this.listLoading = true
+      try {
+        const res = await getAllVoucherSignConfig(this.listQuery)
+        this.list = res.data.items
+        this.total = res.data.total
+      } finally {
+        this.listLoading = false
+      }
+    },
+    handleSearch() {
+      this.listQuery.page = 1
+      this.getList()
+    },
+    handleDetail(row) {
+      this.$refs.DetailModal && this.$refs.DetailModal.handleOpen(row)
+    },
+    handleEdit(row) {
+      this.$refs.EditModal && this.$refs.EditModal.handleOpen(row)
+    },
+    handleDelete(row) {
+      this.$confirm('确定删除此项?')
+        .then(async () => {
+          await deleteByIdVoucherSignConfig({ id: row.signConfigId })
+          this.$message({ message: '删除成功!', type: 'success' })
+          this.handleSearch()
+        })
+        .catch(() => {})
+    }
+  }
+}
+</script>
+
+<style lang="less" scoped>
+.app-container {
+	padding: 20px;
+	display: flex;
+	flex-direction: column;
+
+	.filter-container {
+		.filter-item {
+			display: inline-block;
+			vertical-align: middle;
+			margin-bottom: 10px;
+		}
+	}
+
+	.small-padding {
+		.cell {
+			padding-left: 5px;
+			padding-right: 5px;
+		}
+	}
+
+	.fixed-width {
+		.el-button--mini {
+			padding: 7px 10px;
+		}
+	}
+}
+</style>