Ver Fonte

Merge branch 'dev' of http://159.75.201.17:3000/zwq/tuanfeng-pc-admin into dev

GuYun-D há 5 meses atrás
pai
commit
a93434a6d2

+ 6 - 1
src/views/business/businessList/index.vue

@@ -12,6 +12,10 @@
         style="width: 200px;margin-left: 10px;" placeholder="请输入店铺编码"
       />
       <el-input
+        v-model="listQuery.keyword" clearable size="mini" class="filter-item"
+        style="width: 200px;margin-left: 10px;" placeholder="请输入手机号"
+      />
+      <el-input
         v-model="listQuery.chargePersonName" clearable size="mini" class="filter-item"
         style="width: 200px;margin-left: 10px;" placeholder="请输入负责人"
       />
@@ -139,7 +143,8 @@ export default {
         shopCode: '', // 店铺编码
         chargePersonName: '', // 店铺负责人
         contractState: '', // 合同状态 1-有效 0-无效
-        shopType: 2
+        shopType: 2,
+        keyword:'' // 手机号搜索
       }
     }
   },

+ 463 - 0
src/views/order/franchisee/components/pendDetails.vue

@@ -0,0 +1,463 @@
+<template>
+  <div class="order_details">
+    <div class="cotent">
+      <div class="left_part">
+        <div class="order_info">
+          <h2>订单信息</h2>
+          <ul>
+            <li>
+              <p>
+                <span>商家名称:</span>
+                <span>{{ order.shopName }}</span>
+              </p>
+              <p>
+                <span>订单ID:</span>
+                <span>{{ order.orderId }}</span>
+              </p>
+              <p>
+                <span>支付单号:</span>
+                <span>{{ order.transactionId }}</span>
+              </p>
+              <p>
+                <span>订单编号:</span>
+                <span>{{ order.orderFormid }}</span>
+              </p>
+            </li>
+            <li>
+              <p>
+                <span>订单状态:</span>
+                <span v-if="order.state == 1">待付款</span>
+                <span v-else-if="order.state == 2">待发货</span>
+                <span v-else-if="order.state == 3">待收货</span>
+                <span v-else-if="order.state == 4">已完成</span>
+                <span v-else-if="order.state == 5">交易关闭(已取消)</span>
+                <span v-else-if="order.state == 6">待成团</span>
+                <span v-else-if="order.state == 7">待售后</span>
+                <span v-else-if="order.state == 8">待核销(未付款)</span>
+                <span v-else-if="order.state == 9">待核销(已付款)</span>
+                <span v-else-if="order.state == 10">已核销</span>
+                <span v-else>--</span>
+              </p>
+              <p>
+                <span>售后状态:</span>
+                <span>{{ order.afterStateName }}</span>
+              </p>
+            </li>
+            <li>
+              <p>
+                <span>支付方式:</span>
+                <span v-if="order.paymentMode === 1">微信</span>
+                <span v-else-if="order.paymentMode === 2">支付宝</span>
+                <span v-else-if="order.paymentMode === 3">花呗分期</span>
+                <span v-else-if="order.paymentMode === 4">通联支付</span>
+                <span v-else-if="order.paymentMode === 5">平台余额支付</span>
+                <span v-else-if="order.paymentMode === 6">商家余额支付</span>
+                <span v-else-if="order.paymentMode === 7">佣金支付</span>
+                <span v-else-if="order.paymentMode === 8">消费金支付</span>
+                <span v-else-if="order.paymentMode === 9">惠市宝支付</span>
+                <span v-else>--</span>
+              </p>
+              <p>
+                <span>物流方案:</span>
+                <span>{{ order.logisticsName }}</span>
+              </p>
+            </li>
+            <li>
+              <p>
+                <span>商家赠送代金券:</span>
+                <span>{{ order.shopVoucher }}</span>
+              </p>
+            </li>
+            <li>
+              <p>
+                <span>平台赠送代金券:</span>
+                <span>{{ order.platformVoucher }}</span>
+              </p>
+            </li>
+            <li>
+              <p>
+                <span>总赠送代金券:</span>
+                <span>{{ order.presenterVoucher }}</span>
+              </p>
+            </li>
+            <li>
+              <p>
+                <span>创建时间:</span>
+                <span>{{ order.createTime }}</span>
+              </p>
+              <p>
+                <span>支付时间:</span>
+                <span>{{ order.paymentTime }}</span>
+              </p>
+            </li>
+            <li>
+              <p>备注:{{ order.remark }}</p>
+            </li>
+          </ul>
+        </div>
+        <div class="goods_info">
+          <h2>商品信息</h2>
+          <div v-for="(item, index) in order.products" :key="index" class="goods_list">
+            <div class="good_price">
+              <ul>
+                <li>
+                  <p>商品总价: ¥{{ order.orderPrice }}</p>
+                  <p>支付金额: ¥{{ order.price }}</p>
+                </li>
+                <li>
+                  <p>物流费用: ¥{{ order.logisticsPrice }}</p>
+                </li>
+              </ul>
+            </div>
+            <div class="good_details">
+              <ul>
+                <li>
+                  <img :src="item.image">
+                  <div class="details">
+                    <p>{{ item.productName }}</p>
+                    <p class="skuDetails">
+                      <span
+                        v-for="(detailsItem, detailsindex) in item.skuDetails" :key="detailsindex"
+                        class="detail_span"
+                      >
+                        {{ detailsItem.skuName }}: {{ detailsItem.skuValue }}
+                      </span>
+                    </p>
+                    <p>SKU: {{ item.skuId }}</p>
+                  </div>
+                </li>
+                <li class="cen">
+                  ¥{{ `${item.productPrice} * ${item.number}` }}
+                </li>
+                <li>
+                  {{ order.orderPrice }}
+                </li>
+              </ul>
+            </div>
+          </div>
+        </div>
+        <!-- 未发货时物流信息显示去发货按钮 -->
+        <div v-show="order.logisticsName && order.logisticsNum" class="logistics_info">
+          <h2>物流信息</h2>
+          <el-button
+            v-if="!order.logisticsNum && (order.state == 2)" type="primary" class="send_good"
+            @click="handleSendGoods"
+          >
+            去发货
+          </el-button>
+          <div v-else class="logistics_content">
+            <p class="logistics_title">
+              <span>物流公司: {{ order.logisticsName }}</span>
+              <span>运单号: {{ order.logisticsNum }}</span>
+            </p>
+          </div>
+        </div>
+      </div>
+      <div class="right_part">
+        <div class="pay_order_info">
+          <h2>下单人信息</h2>
+          <p>下单账户: {{ order.customerName }}</p>
+          <p>订单总数: {{ order.total }}个</p>
+          <p>下单备注: {{ order.remark }}</p>
+        </div>
+        <div class="take_goods_info">
+          <h2>收货信息</h2>
+          <p>姓名: {{ order.receiveName }}</p>
+          <p>手机号: {{ order.receivePhone }}</p>
+          <p>地址: {{ order.receiveAdress }}</p>
+        </div>
+      </div>
+    </div>
+    <!-- 发货 -->
+    <el-dialog
+      :visible.sync="isVisible" title="发货" :close-on-click-modal="false" :modal-append-to-body="false"
+      :modal="false"
+    >
+      <el-form ref="sendGoodsForm" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="快递公司" prop="express">
+          <el-select v-model="form.express" filterable>
+            <el-option v-for="(item, index) in companyList" :key="index" :label="item.dictName" :value="item.dictId" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="快递单号" prop="deliverFormid">
+          <el-input v-model="form.deliverFormid" maxlength="20" oninput="value = value.replace(/[^\a-\z\A-\Z0-9]/g,'')" />
+        </el-form-item>
+        <!-- <el-form-item label="快递公司编号" prop="shipperCode" v-if="false">
+          <el-input v-model="form.shipperCode" />
+          </el-form-item> -->
+      </el-form>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button type="primary" @click="confirm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </span>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { orderGetById, orderGetSelect, orderDilevery } from '@/api/order'
+export default {
+  name: 'PendDetails',
+  props: {
+    detailRow: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  data() {
+    return {
+      order: {},
+      form: {
+        orderId: '',
+        express: '',
+        deliverFormid: ''
+      },
+      isVisible: false,
+      rules: {
+        logisticsName: [
+          { required: false, message: '请输入快递公司名称', trigger: 'blur' }
+        ],
+        deliverFormid: [
+          { required: true, message: '请输入快递单号', trigger: 'blur' }
+        ],
+        express: [
+          { required: true, message: '请选择快递公司', trigger: 'blur' }
+        ]
+      },
+      companyList: []
+    }
+  },
+  watch: {
+    detailRow: {
+      handler(nVal, oVal) {
+        if (nVal) {
+          this.form.orderId = nVal.orderId
+          this.getProductList()
+        }
+      },
+      deep: true
+    }
+  },
+  created() {
+    this.form.orderId = this.detailRow.orderId
+    this.getProductList()
+  },
+  methods: {
+    async getProductList() {
+      const res = await orderGetById({ orderId: this.detailRow.orderId })
+      this.order = res.data
+    },
+    confirm() {
+      this.$refs.sendGoodsForm.validate((valid) => {
+        if (valid) {
+          this.form.orderId = this.detailRow.orderId
+          orderDilevery(this.form).then((res) => {
+            if (res.code === '') {
+              this.$message({
+                message: '发货成功',
+                type: 'success'
+              })
+              this.isVisible = false
+              this.$emit('cancel')
+            }
+          })
+        }
+      })
+    },
+    cancel() {
+      this.isVisible = false
+    },
+    async getCompanyList() {
+      const res = await orderGetSelect()
+      if (res.code === '') {
+        this.companyList = res.data
+      }
+    },
+    handleSendGoods() {
+      this.getCompanyList()
+      this.isVisible = true
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+@import url("../../../../styles/elDialog.scss");
+
+ul {
+	list-style: none;
+	margin: 0;
+	padding: 0;
+}
+
+.order_details {
+	h3 {
+		margin: 20px 0 20px 20px;
+		font-weight: 700;
+	}
+
+	.close {
+		position: absolute;
+		right: 20px;
+
+		&:hover {
+			cursor: pointer;
+		}
+	}
+
+	.cotent {
+		margin: 20px;
+		overflow: hidden;
+		font-size: 14px;
+
+		.goods_info,
+		.order_info,
+		.logistics_info,
+		.pay_order_info,
+		.take_goods_info {
+			background: #fff;
+			margin-bottom: 10px;
+			padding: 10px 20px;
+		}
+
+		.pay_order_info,
+		.take_goods_info {
+			p {
+				line-height: 30px;
+			}
+		}
+
+		h2 {
+			margin: 0;
+			font-weight: 400;
+			height: 40px;
+			line-height: 40px;
+			font-size: 18px;
+			text-align: -10px;
+		}
+
+		.left_part {
+			float: left;
+			width: calc(70% - 10px);
+			margin-right: 10px;
+
+			.order_info {
+				box-sizing: border-box;
+
+				ul {
+					padding: 10px 30px;
+
+					li {
+						overflow: hidden;
+
+						p {
+							width: 50%;
+							float: left;
+							font-size: 14px;
+							line-height: 30px;
+
+							span {
+								&:nth-child(2) {
+									margin-left: 10px;
+								}
+							}
+						}
+					}
+				}
+			}
+
+			.goods_info {
+				.goods_list {
+					padding: 15px;
+
+					.good_price {
+						ul {
+							li {
+								&:nth-child(1) {
+									p {
+										width: 50%;
+										float: left;
+									}
+								}
+
+								p {
+									line-height: 30px;
+								}
+							}
+						}
+
+						border-bottom: 1px gray solid;
+					}
+
+					.good_details {
+						ul {
+							display: flex;
+							margin-top: 20px;
+
+							li {
+								flex: 3;
+								display: flex;
+								justify-content: space-around;
+								align-items: center;
+
+								.details {
+									margin: 0 30px;
+									width: 180px;
+									line-height: 20px;
+
+									.skuDetails {
+										margin-top: 8px;
+										margin-bottom: 8px;
+										margin-right: 10px;
+										line-height: 1;
+										color: #9e9e9e;
+
+										.detail_span {
+											margin-right: 8px;
+										}
+									}
+								}
+
+								img {
+									width: 50px;
+									height: 50px;
+								}
+							}
+						}
+					}
+				}
+			}
+
+			.logistics_info {
+				.send_good {
+					display: block;
+					margin: 20px auto !important;
+
+					&:hover {
+						cursor: pointer;
+					}
+				}
+
+				.logistics_content {
+					padding: 0 10%;
+
+					.logistics_title {
+						span {
+							margin: 20px 0;
+							display: inline-block;
+							width: 45%;
+						}
+					}
+				}
+			}
+		}
+
+		.right_part {
+			float: left;
+			width: 30%;
+		}
+	}
+}
+</style>

+ 326 - 12
src/views/order/franchisee/index.vue

@@ -1,14 +1,328 @@
 <template>
-    <div class="franchisee">
-        加盟商兑换专区订单
+    <div class="payreturnPage">
+      <!-- 搜索 -->
+      <div class="formSearch" >
+        <el-input
+          v-model="query.search"
+          clearable
+          size="mini"
+          class="filter-item"
+          style="display: inline-table; width: 400px; margin-left: 10px"
+          placeholder="请输入内容"
+        >
+          <template #prepend>
+            <el-select
+              v-model="query.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-option label="订单编号" value="7" />
+              <el-option label="支付单号" value="8" />
+            </el-select>
+          </template>
+        </el-input>
+        <el-input
+          v-model="query.shopName"
+          maxlength="20"
+          clearable
+          size="mini"
+          class="filter-item"
+          style="width: 200px; margin-left: 10px"
+          placeholder="请输入商户名称"
+        />
+        <el-date-picker
+          v-model="query.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>
+      </div>
+      <!-- 表格 -->
+      <div class="tableBox">
+        <el-table
+          v-loading="listLoading"
+          ref="multipleTable"
+          :data="tableData"
+          border
+          :header-cell-style="{ background: '#EEF3FF', color: '#333333' }"
+          tooltip-effect="dark"
+          style="width: 100%"
+        >
+          <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
+            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="180"
+            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>
+        <el-dialog
+          title="订单详情"
+          :visible.sync="detailVisible"
+          width="74%"
+          center
+          :close-on-click-modal="false"
+        >
+          <OrderDetail :detail-row="form" @cancel="detailVisible = false" />
+        </el-dialog>
+        <div class="fenye">
+          <el-pagination
+            :current-page="query.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>
     </div>
-</template>
-
-<script>
-import { halfOrder, halfOrderRe } from "@/api/order"
-export default {
-}
-</script>
-
-<style lang="scss" scoped>
-</style>
+  </template>
+  
+  <script>
+  import OrderDetail from "./components/pendDetails";
+  //   import { getExplosiveProductCategory } from '@/api/explosiveProduct/category'
+  import { orderGetAll } from "@/api/order";
+  
+  export default {
+    components: {
+      OrderDetail,
+    },
+    data() {
+      return {
+        listLoading: false,
+        query: {
+          page: 1,
+          pageSize: 10,
+          templateType: 1,
+          procureType: 1,
+          supplerRole: 2,
+          dates: [], // 下单时间数组
+          shopName: "",
+          search: "",
+        },
+        total: 1,
+        tableData: [],
+        form: {},
+        //    详情弹框
+        detailVisible: false,
+      };
+    },
+    created() {
+      this.getAll();
+    },
+    methods: {
+      //  订单详情
+      handleDetail(row) {
+        this.detailVisible = true;
+        this.form = row;
+        this.$refs.DetailModal && this.$refs.DetailModal.handleOpen(row);
+      },
+      async getAll() {
+        this.listLoading = true;
+        try {
+          const res = await orderGetAll(this.query);
+          this.tableData = res.data.list;
+          this.total = res.data.total;
+        } finally {
+          this.listLoading = false;
+        }
+      },
+      handleSizeChange(val) {
+        this.query.pageSize = val;
+        this.getAll();
+      },
+      handleCurrentChange(val) {
+        this.query.page = val;
+        this.getAll();
+      },
+      handleSearch() {
+        this.total = 1;
+        this.query.page = 1;
+        this.getAll();
+      },
+      clear() {
+        this.query = {
+          page: 1,
+          pageSize: 10,
+        };
+      },
+    },
+  };
+  </script>
+  
+  <style lang="scss" scoped>
+  .payreturnPage {
+    padding: 30px;
+    .formSearch{
+      margin-bottom: 20px;
+    }
+    .tableBox {
+      .fenye {
+        margin: 20px;
+      }
+    }
+  }
+  </style>
+  

+ 463 - 0
src/views/order/merchant/components/pendDetails.vue

@@ -0,0 +1,463 @@
+<template>
+  <div class="order_details">
+    <div class="cotent">
+      <div class="left_part">
+        <div class="order_info">
+          <h2>订单信息</h2>
+          <ul>
+            <li>
+              <p>
+                <span>商家名称:</span>
+                <span>{{ order.shopName }}</span>
+              </p>
+              <p>
+                <span>订单ID:</span>
+                <span>{{ order.orderId }}</span>
+              </p>
+              <p>
+                <span>支付单号:</span>
+                <span>{{ order.transactionId }}</span>
+              </p>
+              <p>
+                <span>订单编号:</span>
+                <span>{{ order.orderFormid }}</span>
+              </p>
+            </li>
+            <li>
+              <p>
+                <span>订单状态:</span>
+                <span v-if="order.state == 1">待付款</span>
+                <span v-else-if="order.state == 2">待发货</span>
+                <span v-else-if="order.state == 3">待收货</span>
+                <span v-else-if="order.state == 4">已完成</span>
+                <span v-else-if="order.state == 5">交易关闭(已取消)</span>
+                <span v-else-if="order.state == 6">待成团</span>
+                <span v-else-if="order.state == 7">待售后</span>
+                <span v-else-if="order.state == 8">待核销(未付款)</span>
+                <span v-else-if="order.state == 9">待核销(已付款)</span>
+                <span v-else-if="order.state == 10">已核销</span>
+                <span v-else>--</span>
+              </p>
+              <p>
+                <span>售后状态:</span>
+                <span>{{ order.afterStateName }}</span>
+              </p>
+            </li>
+            <li>
+              <p>
+                <span>支付方式:</span>
+                <span v-if="order.paymentMode === 1">微信</span>
+                <span v-else-if="order.paymentMode === 2">支付宝</span>
+                <span v-else-if="order.paymentMode === 3">花呗分期</span>
+                <span v-else-if="order.paymentMode === 4">通联支付</span>
+                <span v-else-if="order.paymentMode === 5">平台余额支付</span>
+                <span v-else-if="order.paymentMode === 6">商家余额支付</span>
+                <span v-else-if="order.paymentMode === 7">佣金支付</span>
+                <span v-else-if="order.paymentMode === 8">消费金支付</span>
+                <span v-else-if="order.paymentMode === 9">惠市宝支付</span>
+                <span v-else>--</span>
+              </p>
+              <p>
+                <span>物流方案:</span>
+                <span>{{ order.logisticsName }}</span>
+              </p>
+            </li>
+            <li>
+              <p>
+                <span>商家赠送代金券:</span>
+                <span>{{ order.shopVoucher }}</span>
+              </p>
+            </li>
+            <li>
+              <p>
+                <span>平台赠送代金券:</span>
+                <span>{{ order.platformVoucher }}</span>
+              </p>
+            </li>
+            <li>
+              <p>
+                <span>总赠送代金券:</span>
+                <span>{{ order.presenterVoucher }}</span>
+              </p>
+            </li>
+            <li>
+              <p>
+                <span>创建时间:</span>
+                <span>{{ order.createTime }}</span>
+              </p>
+              <p>
+                <span>支付时间:</span>
+                <span>{{ order.paymentTime }}</span>
+              </p>
+            </li>
+            <li>
+              <p>备注:{{ order.remark }}</p>
+            </li>
+          </ul>
+        </div>
+        <div class="goods_info">
+          <h2>商品信息</h2>
+          <div v-for="(item, index) in order.products" :key="index" class="goods_list">
+            <div class="good_price">
+              <ul>
+                <li>
+                  <p>商品总价: ¥{{ order.orderPrice }}</p>
+                  <p>支付金额: ¥{{ order.price }}</p>
+                </li>
+                <li>
+                  <p>物流费用: ¥{{ order.logisticsPrice }}</p>
+                </li>
+              </ul>
+            </div>
+            <div class="good_details">
+              <ul>
+                <li>
+                  <img :src="item.image">
+                  <div class="details">
+                    <p>{{ item.productName }}</p>
+                    <p class="skuDetails">
+                      <span
+                        v-for="(detailsItem, detailsindex) in item.skuDetails" :key="detailsindex"
+                        class="detail_span"
+                      >
+                        {{ detailsItem.skuName }}: {{ detailsItem.skuValue }}
+                      </span>
+                    </p>
+                    <p>SKU: {{ item.skuId }}</p>
+                  </div>
+                </li>
+                <li class="cen">
+                  ¥{{ `${item.productPrice} * ${item.number}` }}
+                </li>
+                <li>
+                  {{ order.orderPrice }}
+                </li>
+              </ul>
+            </div>
+          </div>
+        </div>
+        <!-- 未发货时物流信息显示去发货按钮 -->
+        <div v-show="order.logisticsName && order.logisticsNum" class="logistics_info">
+          <h2>物流信息</h2>
+          <el-button
+            v-if="!order.logisticsNum && (order.state == 2)" type="primary" class="send_good"
+            @click="handleSendGoods"
+          >
+            去发货
+          </el-button>
+          <div v-else class="logistics_content">
+            <p class="logistics_title">
+              <span>物流公司: {{ order.logisticsName }}</span>
+              <span>运单号: {{ order.logisticsNum }}</span>
+            </p>
+          </div>
+        </div>
+      </div>
+      <div class="right_part">
+        <div class="pay_order_info">
+          <h2>下单人信息</h2>
+          <p>下单账户: {{ order.customerName }}</p>
+          <p>订单总数: {{ order.total }}个</p>
+          <p>下单备注: {{ order.remark }}</p>
+        </div>
+        <div class="take_goods_info">
+          <h2>收货信息</h2>
+          <p>姓名: {{ order.receiveName }}</p>
+          <p>手机号: {{ order.receivePhone }}</p>
+          <p>地址: {{ order.receiveAdress }}</p>
+        </div>
+      </div>
+    </div>
+    <!-- 发货 -->
+    <el-dialog
+      :visible.sync="isVisible" title="发货" :close-on-click-modal="false" :modal-append-to-body="false"
+      :modal="false"
+    >
+      <el-form ref="sendGoodsForm" :model="form" :rules="rules" label-width="80px">
+        <el-form-item label="快递公司" prop="express">
+          <el-select v-model="form.express" filterable>
+            <el-option v-for="(item, index) in companyList" :key="index" :label="item.dictName" :value="item.dictId" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="快递单号" prop="deliverFormid">
+          <el-input v-model="form.deliverFormid" maxlength="20" oninput="value = value.replace(/[^\a-\z\A-\Z0-9]/g,'')" />
+        </el-form-item>
+        <!-- <el-form-item label="快递公司编号" prop="shipperCode" v-if="false">
+          <el-input v-model="form.shipperCode" />
+          </el-form-item> -->
+      </el-form>
+      <template #footer>
+        <span class="dialog-footer">
+          <el-button type="primary" @click="confirm">确 定</el-button>
+          <el-button @click="cancel">取 消</el-button>
+        </span>
+      </template>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { orderGetById, orderGetSelect, orderDilevery } from '@/api/order'
+export default {
+  name: 'PendDetails',
+  props: {
+    detailRow: {
+      type: Object,
+      default: () => ({})
+    }
+  },
+  data() {
+    return {
+      order: {},
+      form: {
+        orderId: '',
+        express: '',
+        deliverFormid: ''
+      },
+      isVisible: false,
+      rules: {
+        logisticsName: [
+          { required: false, message: '请输入快递公司名称', trigger: 'blur' }
+        ],
+        deliverFormid: [
+          { required: true, message: '请输入快递单号', trigger: 'blur' }
+        ],
+        express: [
+          { required: true, message: '请选择快递公司', trigger: 'blur' }
+        ]
+      },
+      companyList: []
+    }
+  },
+  watch: {
+    detailRow: {
+      handler(nVal, oVal) {
+        if (nVal) {
+          this.form.orderId = nVal.orderId
+          this.getProductList()
+        }
+      },
+      deep: true
+    }
+  },
+  created() {
+    this.form.orderId = this.detailRow.orderId
+    this.getProductList()
+  },
+  methods: {
+    async getProductList() {
+      const res = await orderGetById({ orderId: this.detailRow.orderId })
+      this.order = res.data
+    },
+    confirm() {
+      this.$refs.sendGoodsForm.validate((valid) => {
+        if (valid) {
+          this.form.orderId = this.detailRow.orderId
+          orderDilevery(this.form).then((res) => {
+            if (res.code === '') {
+              this.$message({
+                message: '发货成功',
+                type: 'success'
+              })
+              this.isVisible = false
+              this.$emit('cancel')
+            }
+          })
+        }
+      })
+    },
+    cancel() {
+      this.isVisible = false
+    },
+    async getCompanyList() {
+      const res = await orderGetSelect()
+      if (res.code === '') {
+        this.companyList = res.data
+      }
+    },
+    handleSendGoods() {
+      this.getCompanyList()
+      this.isVisible = true
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+@import url("../../../../styles/elDialog.scss");
+
+ul {
+	list-style: none;
+	margin: 0;
+	padding: 0;
+}
+
+.order_details {
+	h3 {
+		margin: 20px 0 20px 20px;
+		font-weight: 700;
+	}
+
+	.close {
+		position: absolute;
+		right: 20px;
+
+		&:hover {
+			cursor: pointer;
+		}
+	}
+
+	.cotent {
+		margin: 20px;
+		overflow: hidden;
+		font-size: 14px;
+
+		.goods_info,
+		.order_info,
+		.logistics_info,
+		.pay_order_info,
+		.take_goods_info {
+			background: #fff;
+			margin-bottom: 10px;
+			padding: 10px 20px;
+		}
+
+		.pay_order_info,
+		.take_goods_info {
+			p {
+				line-height: 30px;
+			}
+		}
+
+		h2 {
+			margin: 0;
+			font-weight: 400;
+			height: 40px;
+			line-height: 40px;
+			font-size: 18px;
+			text-align: -10px;
+		}
+
+		.left_part {
+			float: left;
+			width: calc(70% - 10px);
+			margin-right: 10px;
+
+			.order_info {
+				box-sizing: border-box;
+
+				ul {
+					padding: 10px 30px;
+
+					li {
+						overflow: hidden;
+
+						p {
+							width: 50%;
+							float: left;
+							font-size: 14px;
+							line-height: 30px;
+
+							span {
+								&:nth-child(2) {
+									margin-left: 10px;
+								}
+							}
+						}
+					}
+				}
+			}
+
+			.goods_info {
+				.goods_list {
+					padding: 15px;
+
+					.good_price {
+						ul {
+							li {
+								&:nth-child(1) {
+									p {
+										width: 50%;
+										float: left;
+									}
+								}
+
+								p {
+									line-height: 30px;
+								}
+							}
+						}
+
+						border-bottom: 1px gray solid;
+					}
+
+					.good_details {
+						ul {
+							display: flex;
+							margin-top: 20px;
+
+							li {
+								flex: 3;
+								display: flex;
+								justify-content: space-around;
+								align-items: center;
+
+								.details {
+									margin: 0 30px;
+									width: 180px;
+									line-height: 20px;
+
+									.skuDetails {
+										margin-top: 8px;
+										margin-bottom: 8px;
+										margin-right: 10px;
+										line-height: 1;
+										color: #9e9e9e;
+
+										.detail_span {
+											margin-right: 8px;
+										}
+									}
+								}
+
+								img {
+									width: 50px;
+									height: 50px;
+								}
+							}
+						}
+					}
+				}
+			}
+
+			.logistics_info {
+				.send_good {
+					display: block;
+					margin: 20px auto !important;
+
+					&:hover {
+						cursor: pointer;
+					}
+				}
+
+				.logistics_content {
+					padding: 0 10%;
+
+					.logistics_title {
+						span {
+							margin: 20px 0;
+							display: inline-block;
+							width: 45%;
+						}
+					}
+				}
+			}
+		}
+
+		.right_part {
+			float: left;
+			width: 30%;
+		}
+	}
+}
+</style>

+ 335 - 5
src/views/order/merchant/index.vue

@@ -1,14 +1,344 @@
 <template>
-    <div class="merchant">
-        商家兑换专区订单
+  <div class="payreturnPage">
+    <!-- 搜索 -->
+    <div class="formSearch" >
+      <el-input
+        v-model="query.search"
+        clearable
+        size="mini"
+        class="filter-item"
+        style="display: inline-table; width: 400px; margin-left: 10px"
+        placeholder="请输入内容"
+      >
+        <template #prepend>
+          <el-select
+            v-model="query.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-option label="订单编号" value="7" />
+            <el-option label="支付单号" value="8" />
+          </el-select>
+        </template>
+      </el-input>
+      <el-input
+        v-model="query.shopName"
+        maxlength="20"
+        clearable
+        size="mini"
+        class="filter-item"
+        style="width: 200px; margin-left: 10px"
+        placeholder="请输入商户名称"
+      />
+      <el-date-picker
+        v-model="query.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>
     </div>
+    <!-- 表格 -->
+    <div class="tableBox">
+      <el-table
+        v-loading="listLoading"
+        ref="multipleTable"
+        :data="tableData"
+        border
+        :header-cell-style="{ background: '#EEF3FF', color: '#333333' }"
+        tooltip-effect="dark"
+        style="width: 100%"
+      >
+        <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
+          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="180"
+          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>
+      <el-dialog
+        title="订单详情"
+        :visible.sync="detailVisible"
+        width="74%"
+        center
+        :close-on-click-modal="false"
+      >
+        <OrderDetail :detail-row="form" @cancel="detailVisible = false" />
+      </el-dialog>
+      <div class="fenye">
+        <el-pagination
+          :current-page="query.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>
+  </div>
 </template>
 
 <script>
-import { halfOrder, halfOrderRe } from "@/api/order"
+import OrderDetail from "./components/pendDetails";
+//   import { getExplosiveProductCategory } from '@/api/explosiveProduct/category'
+import { orderGetAll } from "@/api/order";
+
 export default {
-}
+  components: {
+    OrderDetail,
+  },
+  data() {
+    return {
+      listLoading: false,
+      query: {
+        page: 1,
+        pageSize: 10,
+        templateType: 1,
+        procureType: 1,
+        supplerRole: 1,
+        dates: [], // 下单时间数组
+        shopName: "",
+        search: "",
+      },
+      total: 1,
+      tableData: [],
+      form: {},
+      //    详情弹框
+      detailVisible: false,
+    };
+  },
+  created() {
+    this.getAll();
+  },
+  methods: {
+    //  订单详情
+    handleDetail(row) {
+      this.detailVisible = true;
+      this.form = row;
+      this.$refs.DetailModal && this.$refs.DetailModal.handleOpen(row);
+    },
+    async getAll() {
+      this.listLoading = true;
+      try {
+        const res = await orderGetAll(this.query);
+        this.tableData = res.data.list;
+        this.total = res.data.total;
+      } finally {
+        this.listLoading = false;
+      }
+    },
+    handleSizeChange(val) {
+      this.query.pageSize = val;
+      this.getAll();
+    },
+    handleCurrentChange(val) {
+      this.query.page = val;
+      this.getAll();
+    },
+    handleSearch() {
+      this.total = 1;
+      this.query.page = 1;
+      this.getAll();
+    },
+    clear() {
+      this.query = {
+        page: 1,
+        pageSize: 10,
+      };
+    },
+
+    // 删除
+    //   handleDelete(row) {
+    //     this.$confirm(`是否删除【${row.categoryName}】这项分类?`, '提示', {
+    //       confirmButtonText: '确定',
+    //       cancelButtonText: '取消',
+    //       type: 'warning'
+    //     })
+    //       .then(async () => {
+    //         const res = await deleteExplosiveProductCategory({ categoryId: row.id })
+    //         if (res.code == '200') {
+    //           this.$message.success('删除成功')
+    //           this.search()
+    //         }
+    //       })
+    //       .catch(() => {})
+    //   }
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-</style>
+.payreturnPage {
+  padding: 30px;
+  .formSearch{
+    margin-bottom: 20px;
+  }
+  .tableBox {
+    .fenye {
+      margin: 20px;
+    }
+  }
+}
+</style>

+ 2 - 1
vue.config.js

@@ -42,7 +42,8 @@ module.exports = {
     // before: require('./mock/mock-server.js'),
     proxy: {
       '/api': {
-        target: 'https://nsadminapitest.tuanfengkeji.cn', // 测试
+        target: 'https://nsadminapi.tuanfengkeji.cn', // 正式
+        // target: 'https://nsadminapitest.tuanfengkeji.cn', // 测试
         // target: 'http://192.168.0.91:9103', // 平台端
         changeOrigin: true,
         pathRewrite: {