Эх сурвалжийг харах

新增商品组合退款统计

大大的豆芽 2 долоо хоног өмнө
parent
commit
9ba4c9d0b8

+ 7 - 0
admin-ui/src/views/order/cloth/searchCloth.vue

@@ -25,6 +25,12 @@
             <el-form-item>
                 <el-date-picker v-model="takeClothTimeRange" style="width: 240px" value-format="yyyy-MM-dd" type="daterange" range-separator="-" start-placeholder="取衣日期" end-placeholder="结束日期"></el-date-picker>
             </el-form-item>
+            <el-form-item prop="repeatWash">
+                <el-select v-model="queryParams.repeatWash" placeholder="是否重洗" clearable>
+                    <el-option key="0" label="是" value="1" />
+                  <el-option key="1" label="否" value="0" />
+                </el-select>
+            </el-form-item>
 
             <el-form-item prop="appUserPhoneNumber">
                 <el-input v-model="queryParams.appUserPhoneNumber" placeholder="请输入客户电话" clearable @keyup.enter.native="handleQuery" />
@@ -290,6 +296,7 @@ export default {
             // 查询参数
             queryParams: {
                 clothItemName: null,
+                repeatWash: null,
                 washCode: null,
                 clothHangerId: null
             },

+ 859 - 830
admin-ui/src/views/order/retailOrder/index.vue

@@ -1,349 +1,378 @@
 <template>
-    <div class="app-container">
-        <el-form :model="queryParams" ref="queryForm" @submit.native.prevent :inline="true" v-show="showSearch" label-width="100px">
-          <el-form-item label-width="120px" prop="orgId" label="订单归属" v-if="userInfoVO.userType == '00'">
-            <el-select v-model="queryParams.orgId" filterable placeholder="请选择" clearable style="width: 240px">
-              <template>
-                <el-option v-for="store in storeList" :key="store.id" :label="store.name" :value="store.id"> </el-option>
-              </template>
-            </el-select>
-          </el-form-item>
-          <el-form-item prop="orderNo" label="订单编号">
-                <el-input v-model="queryParams.orderNo" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery" />
-            </el-form-item>
-            <el-form-item prop="orderStatus" label="状态">
-                <el-select v-model="queryParams.orderStatus" placeholder="请选择支付状态" clearable>
-                    <el-option v-for="dict in dict.type.order_goods_status" :key="dict.code" :label="dict.label" :value="dict.value" />
-                </el-select>
-            </el-form-item>
-            <el-form-item prop="realName" label="客户姓名">
-                <el-input v-model="queryParams.realName" placeholder="请输入客户姓名" clearable @keyup.enter.native="handleQuery" />
-            </el-form-item>
-            <el-form-item prop="phoneNumber" label="手机号">
-                <el-input v-model="queryParams.phoneNumber" placeholder="请输入手机号" clearable @keyup.enter.native="handleQuery" />
-            </el-form-item>
-            <br />
-            <el-form-item label="下单日期">
-                <el-date-picker clearable v-model="queryCreateTime" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="下单时间" end-placeholder="结束日期" @change="getCreateTime"></el-date-picker>
-            </el-form-item>
-            <el-form-item>
-                <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
-                <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
-            </el-form-item>
-        </el-form>
-
-
-        <el-row :gutter="10" class="mb8">
-            <!--            <el-col :span="1.5">-->
-            <!--                <el-button type="warning" plain icon="el-icon-download" @click="handleExport" v-hasPermi="['order:goods:export']" v-if="userInfoVO.userType == '00'">导出 </el-button>-->
-            <!--            </el-col>-->
-            <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-        </el-row>
-
-        <Page uri="/mapi/order/goods/list" :request-params="queryParams" ref="pagination">
-            <el-table-column label="订单编号" align="center" prop="orderNo" width="200" />
-          <el-table-column label="客户姓名" align="center" width="130">
-            <template slot-scope="scope">
-              <div class="customer-name">
-                <i class="el-icon-user"></i>
-                {{ scope.row.realName || '--' }}
-              </div>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" @submit.native.prevent :inline="true" v-show="showSearch" label-width="100px">
+      <el-form-item label-width="120px" prop="orgId" label="订单归属" v-if="userInfoVO.userType == '00'">
+        <el-select v-model="queryParams.orgId" filterable placeholder="请选择" clearable style="width: 240px">
+          <template>
+            <el-option v-for="store in storeList" :key="store.id" :label="store.name" :value="store.id"> </el-option>
+          </template>
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="orderNo" label="订单编号">
+        <el-input v-model="queryParams.orderNo" placeholder="请输入订单编号" clearable @keyup.enter.native="handleQuery" />
+      </el-form-item>
+      <el-form-item prop="orderStatus" label="状态">
+        <el-select v-model="queryParams.orderStatus" placeholder="请选择支付状态" clearable>
+          <el-option v-for="dict in dict.type.order_goods_status" :key="dict.code" :label="dict.label" :value="dict.value" />
+        </el-select>
+      </el-form-item>
+      <el-form-item prop="realName" label="客户姓名">
+        <el-input v-model="queryParams.realName" placeholder="请输入客户姓名" clearable @keyup.enter.native="handleQuery" />
+      </el-form-item>
+      <el-form-item prop="phoneNumber" label="手机号">
+        <el-input v-model="queryParams.phoneNumber" placeholder="请输入手机号" clearable @keyup.enter.native="handleQuery" />
+      </el-form-item>
+      <br />
+      <el-form-item label="下单日期">
+        <el-date-picker clearable v-model="queryCreateTime" type="daterange" value-format="yyyy-MM-dd" range-separator="至" start-placeholder="下单时间"
+          end-placeholder="结束日期" @change="getCreateTime"></el-date-picker>
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <!--            <el-col :span="1.5">-->
+      <!--                <el-button type="warning" plain icon="el-icon-download" @click="handleExport" v-hasPermi="['order:goods:export']" v-if="userInfoVO.userType == '00'">导出 </el-button>-->
+      <!--            </el-col>-->
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <Page uri="/mapi/order/goods/list" :request-params="queryParams" ref="pagination">
+      <el-table-column label="订单编号" align="center" prop="orderNo" width="200" />
+      <el-table-column label="客户姓名" align="center" width="130">
+        <template slot-scope="scope">
+          <div class="customer-name">
+            <i class="el-icon-user"></i>
+            {{ scope.row.realName || '--' }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="手机号" align="center" width="130">
+        <template slot-scope="scope">
+          <div class="customer-phone">
+            <i class="el-icon-mobile-phone"></i>
+            {{ scope.row.phoneNumber || '--' }}
+          </div>
+        </template>
+      </el-table-column>
+      <el-table-column label="订单总价" align="center" prop="totalPrice" width="120" />
+      <el-table-column label="抵扣金额" align="center" prop="deductAmount" width="120">
+        <template slot-scope="scope">
+          {{ scope.row.deductAmount ? scope.row.deductAmount : '--' }}
+        </template>
+      </el-table-column>
+      <el-table-column label="支付金额" align="center" prop="payAmount" width="120" />
+      <el-table-column label="支付方式" align="center" prop="payType" width="120">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.recharge_pay_type" :value="scope.row.payType" />
+        </template>
+      </el-table-column>
+      <el-table-column label="订单状态" align="center" prop="orderStatus" width="120">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.order_goods_status" :value="scope.row.orderStatus" />
+        </template>
+      </el-table-column>
+      <el-table-column label="退单状态" align="center" prop="orderStatus" width="120">
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.goods_order_refund_status" :value="scope.row.refundStatus" />
+        </template>
+      </el-table-column>
+      <el-table-column label="下单时间" align="center" prop="createTime" width="180" />
+      <el-table-column label="支付时间" align="center" prop="payTime" width="180">
+        <template slot-scope="scope">
+          {{ scope.row.payTime ? scope.row.payTime : '--' }}
+        </template>
+      </el-table-column>
+      <!--      <el-table-column label="发货时间" align="center" prop="sendTime" width="200px"/>-->
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" min-width="200">
+        <template slot-scope="scope">
+          <el-button type="text" icon="el-icon-chat-dot-square" @click="orderDetail(scope.row)">订单详情</el-button>
+          <el-button type="text" icon="el-icon-check" @click="rePay(scope.row)" v-if="scope.row.orderStatus == '0' && userInfoVO.userType == '02'">
+            重新支付 </el-button>
+          <el-button type="text" icon="el-icon-close" @click="cancelOrder(scope.row)" v-if="scope.row.orderStatus == '0'">取消订单 </el-button>
+          <el-button type="text" icon="el-icon-check" @click="outOrderGoods(scope.row)"
+            v-if="scope.row.orderStatus == '2' && userInfoVO.userType == '00' &&  scope.row.refundStatus == '0'">出货 </el-button>
+          <!--                    <el-button type="text" icon="el-icon-truck" @click="deliveryInfo(scope.row)" v-if="scope.row.deliveryNo"> 物流信息 </el-button>-->
+          <el-button type="text" icon="el-icon-chat-dot-square" @click="refundOrder(scope.row)"
+            v-if="userInfoVO.userType == '00' && scope.row.refundStatus == '0' && !scope.row.deliveryNo"> 撤单 </el-button>
+          <el-button type="text" icon="el-icon-printer" v-if="userInfoVO.userType != '00'" @click="btn_lodop(scope.row)">打印 </el-button>
+        </template>
+      </el-table-column>
+    </Page>
+
+    <!--    详情-->
+    <el-dialog :title="detailTitle" :visible.sync="openDetail" size="80%" append-to-body>
+      <el-card class="customer-info-card">
+        <el-descriptions title="客户信息" v-show="detailView" :column="3" border :label-style="{ 'text-align': 'center' }"
+          :contentStyle="{ 'text-align': 'center' }">
+          <el-descriptions-item label="客户姓名">{{ detailView.realName }}</el-descriptions-item>
+          <el-descriptions-item label="客户手机号">{{ detailView.phoneNumber }}</el-descriptions-item>
+          <el-descriptions-item label="订单状态">
+            <dict-tag :options="dict.type.order_goods_status" :value="detailView.orderStatus" />
+          </el-descriptions-item>
+          <el-descriptions-item label="收货联系人">{{ detailView.contactName ? detailView.contactName : '暂无信息' }} </el-descriptions-item>
+          <el-descriptions-item label="收货人手机号">{{ detailView.contactPhone ? detailView.contactPhone : '暂无信息' }} </el-descriptions-item>
+          <el-descriptions-item label="下单时间">{{ detailView.createTime ? detailView.createTime : '暂无信息' }} </el-descriptions-item>
+          <el-descriptions-item label="支付时间">{{ detailView.payTime ? detailView.payTime : '暂无信息' }} </el-descriptions-item>
+          <el-descriptions-item label="发货时间">{{ detailView.sendTime ? detailView.sendTime : '暂无信息' }} </el-descriptions-item>
+          <el-descriptions-item label="确认收货时间">{{ detailView.finishTime ? detailView.finishTime : '暂无信息' }} </el-descriptions-item>
+          <el-descriptions-item label="订单总价">{{ detailView.totalPrice ? detailView.totalPrice : '暂无信息' }} </el-descriptions-item>
+          <el-descriptions-item>
+            <template slot="label"> 支付方式 </template>
+            <template v-if="detailView.payType == '0'">微信 ({{ detailView.payAmount }}元)</template>
+            <template v-if="detailView.payType == '1'">支付宝({{ detailView.payAmount }}元)</template>
+            <template v-if="detailView.payType == '2'">现金({{ detailView.payAmount }}元)</template>
+            <template v-if="detailView.payType == '3'">余额({{ detailView.payAmount }}元)</template>
+            <template v-if="detailView.payType == '8'">组合
+              (
+              <span v-if="detailView.memberPayAmount">会员:{{detailView.memberPayAmount}}</span>
+              <span v-if="detailView.balancePayAmount"> 余额:{{detailView.balancePayAmount}}</span>
+              <span v-if="detailView.wechatPayAmount"> 微信:{{detailView.wechatPayAmount}}</span>
+              <span v-if="detailView.alipayPayAmount"> 支付宝:{{detailView.alipayPayAmount}}</span>
+              <span v-if="detailView.cashPayAmount"> 现金:{{detailView.cashPayAmount}}</span>
+              )
             </template>
-          </el-table-column>
-          <el-table-column label="手机号" align="center" width="130">
+          </el-descriptions-item>
+          <el-descriptions-item label="物流公司">{{ detailView.deliveryCompany ? detailView.deliveryCompany : '暂无信息' }} </el-descriptions-item>
+          <el-descriptions-item label="物流单号">{{ detailView.deliveryNo ? detailView.deliveryNo : '暂无信息' }} </el-descriptions-item>
+
+          <el-descriptions-item label="收货地址" span="3">
+            {{ detailView.province }}{{ detailView.city }}{{ detailView.area }}{{ detailView.address }}{{ detailView.addressDetail }}
+          </el-descriptions-item>
+          <el-descriptions-item label="备注信息" span="3">{{ detailView.deliveryNo ? detailView.deliveryNo : '暂无信息' }} </el-descriptions-item>
+          <el-descriptions-item label="退款备注" span="3" v-if="detailView.refundReason">{{ detailView.refundReason ? detailView.refundReason : '暂无信息' }}
+          </el-descriptions-item>
+        </el-descriptions>
+      </el-card>
+      <div class="product-list-container">
+        <h3 class="product-list-title">商品信息</h3>
+        <el-table v-loading="detailLoading" :data="detailView.orderGoodsSkuList" fit highlight-current-row border stripe>
+          <el-table-column :label="goodsType == 0 ? '商品名称' : '材料名称'" align="center" prop="goodsName" width="250px" />
+          <el-table-column :label="goodsType == 0 ? '商品规格' : '材料规格'" align="center" width="250px">
             <template slot-scope="scope">
-              <div class="customer-phone" >
-                <i class="el-icon-mobile-phone"></i>
-                {{ scope.row.phoneNumber || '--' }}
-              </div>
+              <div style="text-align: center">{{ JSON.parse(scope.row.skuName).join('/') }}</div>
             </template>
           </el-table-column>
-            <el-table-column label="订单总价" align="center" prop="totalPrice" width="120" />
-            <el-table-column label="抵扣金额" align="center" prop="deductAmount" width="120">
-                <template slot-scope="scope">
-                    {{ scope.row.deductAmount ? scope.row.deductAmount : '--' }}
-                </template>
-            </el-table-column>
-            <el-table-column label="支付金额" align="center" prop="payAmount" width="120" />
-            <el-table-column label="支付方式" align="center" prop="payType" width="120">
-                <template slot-scope="scope">
-                    <dict-tag :options="dict.type.recharge_pay_type" :value="scope.row.payType" />
-                </template>
-            </el-table-column>
-            <el-table-column label="订单状态" align="center" prop="orderStatus" width="120">
-                <template slot-scope="scope">
-                    <dict-tag :options="dict.type.order_goods_status" :value="scope.row.orderStatus" />
-                </template>
-            </el-table-column>
-          <el-table-column label="退单状态" align="center" prop="orderStatus" width="120">
+          <el-table-column label="数量" align="center" prop="buyNum" />
+          <el-table-column label="价格(元)" align="center" prop="salePrice" />
+          <el-table-column label="总和(元)" align="center">
             <template slot-scope="scope">
-              <dict-tag :options="dict.type.goods_order_refund_status" :value="scope.row.refundStatus" />
+              <span>{{ scope.row.buyNum * scope.row.salePrice }}</span>
             </template>
           </el-table-column>
-            <el-table-column label="下单时间" align="center" prop="createTime" width="180" />
-            <el-table-column label="支付时间" align="center" prop="payTime" width="180">
-                <template slot-scope="scope">
-                    {{ scope.row.payTime ? scope.row.payTime : '--' }}
-                </template>
-            </el-table-column>
-            <!--      <el-table-column label="发货时间" align="center" prop="sendTime" width="200px"/>-->
-            <el-table-column label="操作" align="center" class-name="small-padding fixed-width" fixed="right" min-width="200">
-                <template slot-scope="scope">
-                    <el-button type="text" icon="el-icon-chat-dot-square" @click="orderDetail(scope.row)">订单详情</el-button>
-                    <el-button type="text" icon="el-icon-check" @click="rePay(scope.row)" v-if="scope.row.orderStatus == '0' && userInfoVO.userType == '02'">重新支付 </el-button>
-                    <el-button type="text" icon="el-icon-close" @click="cancelOrder(scope.row)" v-if="scope.row.orderStatus == '0'">取消订单 </el-button>
-                    <el-button type="text" icon="el-icon-check" @click="outOrderGoods(scope.row)" v-if="scope.row.orderStatus == '2' && userInfoVO.userType == '00' &&  scope.row.refundStatus == '0'">出货 </el-button>
-<!--                    <el-button type="text" icon="el-icon-truck" @click="deliveryInfo(scope.row)" v-if="scope.row.deliveryNo"> 物流信息 </el-button>-->
-                    <el-button type="text" icon="el-icon-chat-dot-square" @click="refundOrder(scope.row)" v-if="userInfoVO.userType == '00' && scope.row.refundStatus == '0' && !scope.row.deliveryNo"> 撤单 </el-button>
-                    <el-button type="text" icon="el-icon-printer" v-if="userInfoVO.userType != '00'" @click="btn_lodop(scope.row)">打印 </el-button>
-                </template>
-            </el-table-column>
-        </Page>
-
-        <!--    详情-->
-        <el-dialog :title="detailTitle" :visible.sync="openDetail" size="80%" append-to-body>
-            <el-card class="customer-info-card">
-                <el-descriptions title="客户信息" v-show="detailView" :column="3" border :label-style="{ 'text-align': 'center' }" :contentStyle="{ 'text-align': 'center' }">
-                    <el-descriptions-item label="客户姓名">{{ detailView.realName }}</el-descriptions-item>
-                    <el-descriptions-item label="客户手机号">{{ detailView.phoneNumber }}</el-descriptions-item>
-                    <el-descriptions-item label="订单状态">
-                        <dict-tag :options="dict.type.order_goods_status" :value="detailView.orderStatus" />
+        </el-table>
+      </div>
+      <el-row :gutter="10" class="order-total">
+        <el-col :span="21">
+          <el-form label-width="130px" style="text-align: right" :inline="true" size="small">
+            <el-form-item label="总金额(元):">
+              {{ costTotalPrice }}
+            </el-form-item>
+          </el-form>
+        </el-col>
+      </el-row>
+    </el-dialog>
+
+    <!--    重新支付页面 -->
+    <el-dialog title="订单支付" :visible.sync="openRePayPage" size="60%" append-to-body>
+      <el-descriptions title="核对信息" v-if="appUserInfo" :column="3" border :contentStyle="{ 'text-align': 'center' }"
+        style="margin-left: 15px; margin-right: 15px">
+        <el-descriptions-item label="总件数(件)" :labelStyle="{ width: '16%' }" :label-style="{ 'text-align': 'center' }">{{ calculateTotalCount }}
+        </el-descriptions-item>
+        <el-descriptions-item label="抵扣金额(元)" :labelStyle="{ width: '16%' }" :label-style="{ 'text-align': 'center' }">
+          {{ payFrom.deductAmount ? '¥' + payFrom.deductAmount : '¥' + '0' }}
+        </el-descriptions-item>
+        <el-descriptions-item label="卡余额(元)" :labelStyle="{ width: '16%' }" :label-style="{ 'text-align': 'center' }">
+          ¥{{ appUserInfo ? appUserInfo.rechargeBalance + appUserInfo.giveBalance : '0.00' }} </el-descriptions-item>
+
+        <el-descriptions-item label="原价(元)">{{ costTotalPrice }}</el-descriptions-item>
+        <el-descriptions-item label="折后金额(元)">{{ calculatePayMoney }}</el-descriptions-item>
+        <!--        <el-descriptions-item label="现有积分">{{appUserInfo.pointBalance}}</el-descriptions-item>-->
+      </el-descriptions>
+      <template>
+        <el-form ref="payFrom" :model="payFrom" label-width="80px" style="margin-top: 20px">
+          <el-row :gutter="10">
+            <el-card style="margin-left: 15px; margin-right: 15px">
+              <el-col :span="24">
+                <el-descriptions title="优惠信息"></el-descriptions>
+              </el-col>
+              <el-col :span="24">
+                <el-form-item label="抵扣现金券(元)" label-width="130px" prop="deductAmount">
+                  <el-input-number :min="1" :max="9999999" :controls="false" style="width: 200px" v-model.number="payFrom.deductAmount">
+                  </el-input-number>
+                </el-form-item>
+              </el-col>
+            </el-card>
+          </el-row>
+          <el-row :gutter="10">
+            <el-card style="margin-top: 15px; margin-left: 15px; margin-right: 15px">
+              <el-col :span="24">
+                <el-form-item label="支付方式" prop="payType">
+                  <el-radio-group v-model="payFrom.payType" style="width: 400px" @input="changePayType">
+                    <el-radio-button label="3">余额</el-radio-button>
+                    <el-radio-button label="2">现金</el-radio-button>
+                    <el-radio-button label="0">微信</el-radio-button>
+                    <el-radio-button label="1">支付宝</el-radio-button>
+                  </el-radio-group>
+                </el-form-item>
+              </el-col>
+              <div v-if="payFrom.payType">
+                <el-col :span="8">
+                  <el-descriptions :column="2" style="width: 400px" v-if="payFrom.payType == '3' && appUserInfo">
+                    <el-descriptions-item label="客户姓名">{{ appUserInfo ? appUserInfo.realName : '- -' }} </el-descriptions-item>
+                    <el-descriptions-item label="余额(元)"> ¥{{ appUserInfo ? appUserInfo.rechargeBalance + appUserInfo.giveBalance : '0.00' }}
                     </el-descriptions-item>
-                    <el-descriptions-item label="收货联系人">{{ detailView.contactName ? detailView.contactName : '暂无信息' }} </el-descriptions-item>
-                    <el-descriptions-item label="收货人手机号">{{ detailView.contactPhone ? detailView.contactPhone : '暂无信息' }} </el-descriptions-item>
-                    <el-descriptions-item label="下单时间">{{ detailView.createTime ? detailView.createTime : '暂无信息' }} </el-descriptions-item>
-                    <el-descriptions-item label="支付时间">{{ detailView.payTime ? detailView.payTime : '暂无信息' }} </el-descriptions-item>
-                    <el-descriptions-item label="发货时间">{{ detailView.sendTime ? detailView.sendTime : '暂无信息' }} </el-descriptions-item>
-                    <el-descriptions-item label="确认收货时间">{{ detailView.finishTime ? detailView.finishTime : '暂无信息' }} </el-descriptions-item>
-                    <el-descriptions-item label="订单总价">{{ detailView.totalPrice ? detailView.totalPrice : '暂无信息' }} </el-descriptions-item>
-                    <el-descriptions-item label="物流公司">{{ detailView.deliveryCompany ? detailView.deliveryCompany : '暂无信息' }} </el-descriptions-item>
-                    <el-descriptions-item label="物流单号">{{ detailView.deliveryNo ? detailView.deliveryNo : '暂无信息' }} </el-descriptions-item>
-                    <el-descriptions-item label="收货地址" span="3">{{ detailView.province }}{{ detailView.city }}{{ detailView.area }}{{ detailView.address }}{{ detailView.addressDetail }} </el-descriptions-item>
-                    <el-descriptions-item label="备注信息" span="3">{{ detailView.deliveryNo ? detailView.deliveryNo : '暂无信息' }} </el-descriptions-item>
-                  <el-descriptions-item label="退款备注" span="3" v-if="detailView.refundReason">{{ detailView.refundReason ? detailView.refundReason : '暂无信息' }} </el-descriptions-item>
-                </el-descriptions>
+                  </el-descriptions>
+                </el-col>
+                <el-col :span="12" v-if="payFrom.payType == '2'">
+                  <el-form-item label="实收现金(元)" label-width="120px" prop="thisPayMoney">
+                    <el-input-number :min="1" :max="9999999" :controls="false" v-model="payFrom.thisPayMoney"></el-input-number>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="12" v-if="payFrom.payType == '2'">
+                  <el-form-item label="找零:" label-width="120px">
+                    <span>{{ payFrom.thisPayMoney && payFrom.thisPayMoney - payMoney >= 0 ? payFrom.thisPayMoney - payMoney : '0' }}</span>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8" v-if="payFrom.payType == '0'">
+                  <el-form-item label="微信付款条形码" label-width="120px" prop="wxBarcode">
+                    <el-input style="width: 200px" v-model="payFrom.wxBarcode"></el-input>
+                  </el-form-item>
+                </el-col>
+                <el-col :span="8" v-if="payFrom.payType == '1'">
+                  <el-form-item label="支付宝付款条形码" label-width="130px" prop="aliPayBarcode">
+                    <el-input style="width: 200px" v-model="payFrom.aliPayBarcode"></el-input>
+                  </el-form-item>
+                </el-col>
+              </div>
             </el-card>
-            <div class="product-list-container">
-                <h3 class="product-list-title">商品信息</h3>
-                <el-table v-loading="detailLoading" :data="detailView.orderGoodsSkuList" fit highlight-current-row border stripe>
-                    <el-table-column :label="goodsType == 0 ? '商品名称' : '材料名称'" align="center" prop="goodsName" width="250px" />
-                    <el-table-column :label="goodsType == 0 ? '商品规格' : '材料规格'" align="center" width="250px">
-                        <template slot-scope="scope">
-                            <div style="text-align: center">{{ JSON.parse(scope.row.skuName).join('/') }}</div>
-                        </template>
-                    </el-table-column>
-                    <el-table-column label="数量" align="center" prop="buyNum" />
-                    <el-table-column label="价格(元)" align="center" prop="salePrice" />
-                    <el-table-column label="总和(元)" align="center">
-                        <template slot-scope="scope">
-                            <span>{{ scope.row.buyNum * scope.row.salePrice }}</span>
-                        </template>
-                    </el-table-column>
-                </el-table>
+          </el-row>
+          <el-row :gutter="10">
+            <div>
+              <el-button type="primary" @click="submitSettlement" style="margin-left: 3%; margin-top: 20px">结算 </el-button>
             </div>
-            <el-row :gutter="10" class="order-total">
-                <el-col :span="21">
-                    <el-form label-width="130px" style="text-align: right" :inline="true" size="small">
-                        <el-form-item label="总金额(元):">
-                            {{ costTotalPrice }}
-                        </el-form-item>
-                    </el-form>
-                </el-col>
-            </el-row>
-        </el-dialog>
-
-        <!--    重新支付页面 -->
-        <el-dialog title="订单支付" :visible.sync="openRePayPage" size="60%" append-to-body>
-            <el-descriptions title="核对信息" v-if="appUserInfo" :column="3" border :contentStyle="{ 'text-align': 'center' }" style="margin-left: 15px; margin-right: 15px">
-                <el-descriptions-item label="总件数(件)" :labelStyle="{ width: '16%' }" :label-style="{ 'text-align': 'center' }">{{ calculateTotalCount }} </el-descriptions-item>
-                <el-descriptions-item label="抵扣金额(元)" :labelStyle="{ width: '16%' }" :label-style="{ 'text-align': 'center' }">
-                    {{ payFrom.deductAmount ? '¥' + payFrom.deductAmount : '¥' + '0' }}
-                </el-descriptions-item>
-                <el-descriptions-item label="卡余额(元)" :labelStyle="{ width: '16%' }" :label-style="{ 'text-align': 'center' }"> ¥{{ appUserInfo ? appUserInfo.rechargeBalance + appUserInfo.giveBalance : '0.00' }} </el-descriptions-item>
-
-                <el-descriptions-item label="原价(元)">{{ costTotalPrice }}</el-descriptions-item>
-                <el-descriptions-item label="折后金额(元)">{{ calculatePayMoney }}</el-descriptions-item>
-                <!--        <el-descriptions-item label="现有积分">{{appUserInfo.pointBalance}}</el-descriptions-item>-->
-            </el-descriptions>
-            <template>
-                <el-form ref="payFrom" :model="payFrom" label-width="80px" style="margin-top: 20px">
-                    <el-row :gutter="10">
-                        <el-card style="margin-left: 15px; margin-right: 15px">
-                            <el-col :span="24">
-                                <el-descriptions title="优惠信息"></el-descriptions>
-                            </el-col>
-                            <el-col :span="24">
-                                <el-form-item label="抵扣现金券(元)" label-width="130px" prop="deductAmount">
-                                    <el-input-number :min="1" :max="9999999" :controls="false" style="width: 200px" v-model.number="payFrom.deductAmount"></el-input-number>
-                                </el-form-item>
-                            </el-col>
-                        </el-card>
-                    </el-row>
-                    <el-row :gutter="10">
-                        <el-card style="margin-top: 15px; margin-left: 15px; margin-right: 15px">
-                            <el-col :span="24">
-                                <el-form-item label="支付方式" prop="payType">
-                                    <el-radio-group v-model="payFrom.payType" style="width: 400px" @input="changePayType">
-                                        <el-radio-button label="3">余额</el-radio-button>
-                                        <el-radio-button label="2">现金</el-radio-button>
-                                        <el-radio-button label="0">微信</el-radio-button>
-                                        <el-radio-button label="1">支付宝</el-radio-button>
-                                    </el-radio-group>
-                                </el-form-item>
-                            </el-col>
-                            <div v-if="payFrom.payType">
-                                <el-col :span="8">
-                                    <el-descriptions :column="2" style="width: 400px" v-if="payFrom.payType == '3' && appUserInfo">
-                                        <el-descriptions-item label="客户姓名">{{ appUserInfo ? appUserInfo.realName : '- -' }} </el-descriptions-item>
-                                        <el-descriptions-item label="余额(元)"> ¥{{ appUserInfo ? appUserInfo.rechargeBalance + appUserInfo.giveBalance : '0.00' }} </el-descriptions-item>
-                                    </el-descriptions>
-                                </el-col>
-                                <el-col :span="12" v-if="payFrom.payType == '2'">
-                                    <el-form-item label="实收现金(元)" label-width="120px" prop="thisPayMoney">
-                                        <el-input-number :min="1" :max="9999999" :controls="false" v-model="payFrom.thisPayMoney"></el-input-number>
-                                    </el-form-item>
-                                </el-col>
-                                <el-col :span="12" v-if="payFrom.payType == '2'">
-                                    <el-form-item label="找零:" label-width="120px">
-                                        <span>{{ payFrom.thisPayMoney && payFrom.thisPayMoney - payMoney >= 0 ? payFrom.thisPayMoney - payMoney : '0' }}</span>
-                                    </el-form-item>
-                                </el-col>
-                                <el-col :span="8" v-if="payFrom.payType == '0'">
-                                    <el-form-item label="微信付款条形码" label-width="120px" prop="wxBarcode">
-                                        <el-input style="width: 200px" v-model="payFrom.wxBarcode"></el-input>
-                                    </el-form-item>
-                                </el-col>
-                                <el-col :span="8" v-if="payFrom.payType == '1'">
-                                    <el-form-item label="支付宝付款条形码" label-width="130px" prop="aliPayBarcode">
-                                        <el-input style="width: 200px" v-model="payFrom.aliPayBarcode"></el-input>
-                                    </el-form-item>
-                                </el-col>
-                            </div>
-                        </el-card>
-                    </el-row>
-                    <el-row :gutter="10">
-                        <div>
-                            <el-button type="primary" @click="submitSettlement" style="margin-left: 3%; margin-top: 20px">结算 </el-button>
-                        </div>
-                    </el-row>
-                </el-form>
-            </template>
-        </el-dialog>
+          </el-row>
+        </el-form>
+      </template>
+    </el-dialog>
+
+    <!--    撤单页面-->
+    <el-dialog :visible.sync="openRefundPage" width="400px" append-to-body>
+      <el-form ref="refundVO" :model="refundVO">
+        <el-form-item label="撤单原因" label-width="80px" prop="refundReason">
+          <el-input v-model="refundVO.refundReason" type="textarea" placeholder="请输入撤单原因" maxlength="500" :rows="5" show-word-limit></el-input>
+        </el-form-item>
+      </el-form>
+      <el-row :gutter="10">
+        <div>
+          <el-button type="primary" @click="submitRefund" style="margin-left: 3%; margin-top: 20px">提交</el-button>
+        </div>
+      </el-row>
+    </el-dialog>
+
+    <!-- 订单出货对话框 -->
+    <el-dialog title="订单出货信息" :visible.sync="openDeliveryPage" size="40%" append-to-body :before-close="deliveryClose">
+      <el-row :gutter="15">
+        <el-form ref="deliveryVo" :model="deliveryVo" :rules="deliveryRules" label-width="120px">
+          <el-col :span="24">
+            <el-form-item label="快递公司" prop="deliveryCompany">
+              <el-radio-group v-model="deliveryVo.deliveryCompany" @input="changeDeliveryId">
+                <el-radio-button v-for="dict in deliveryData" :label="dict.name" :key="dict.name"></el-radio-button>
+              </el-radio-group>
+            </el-form-item>
 
-        <!--    撤单页面-->
-        <el-dialog :visible.sync="openRefundPage" width="400px" append-to-body>
-            <el-form ref="refundVO" :model="refundVO">
-                <el-form-item label="撤单原因" label-width="80px" prop="refundReason">
-                    <el-input v-model="refundVO.refundReason" type="textarea" placeholder="请输入撤单原因" maxlength="500" :rows="5" show-word-limit></el-input>
-                </el-form-item>
-            </el-form>
-            <el-row :gutter="10">
-                <div>
-                    <el-button type="primary" @click="submitRefund" style="margin-left: 3%; margin-top: 20px">提交</el-button>
-                </div>
-            </el-row>
-        </el-dialog>
-
-        <!-- 订单出货对话框 -->
-        <el-dialog title="订单出货信息" :visible.sync="openDeliveryPage" size="40%" append-to-body :before-close="deliveryClose">
-            <el-row :gutter="15">
-                <el-form ref="deliveryVo" :model="deliveryVo" :rules="deliveryRules" label-width="120px">
-                    <el-col :span="24">
-                        <el-form-item label="快递公司" prop="deliveryCompany">
-                            <el-radio-group v-model="deliveryVo.deliveryCompany" @input="changeDeliveryId">
-                                <el-radio-button v-for="dict in deliveryData" :label="dict.name" :key="dict.name"></el-radio-button>
-                            </el-radio-group>
-                        </el-form-item>
-
-<!--                        <el-form-item label="预期揽件时间" prop="expectTime">-->
-<!--                            <el-date-picker-->
-<!--                                type="datetime"-->
-<!--                                placeholder="选择预期揽件时间"-->
-<!--                                v-model="deliveryVo.expectTime"-->
-<!--                                style="width: 100%"-->
-<!--                                value-format="yyyy-MM-dd HH:mm"-->
-<!--                                format="yyyy-MM-dd HH:mm"-->
-<!--                                :picker-options="{-->
-<!--                                    disabledDate: (time) => {-->
-<!--                                        return time.getTime() < Date.now() - 3600 * 1000 * 24-->
-<!--                                    },-->
-<!--                                    selectableRange: startTimeRange-->
-<!--                                }"-->
-<!--                                :default-time="deliTime"-->
-<!--                                class="date_picker"-->
-<!--                                :editable="false"-->
-<!--                            ></el-date-picker>-->
-<!--                        </el-form-item>-->
-
-                        <!-- <el-form-item label="包裹数量" prop="count">
+            <!--                        <el-form-item label="预期揽件时间" prop="expectTime">-->
+            <!--                            <el-date-picker-->
+            <!--                                type="datetime"-->
+            <!--                                placeholder="选择预期揽件时间"-->
+            <!--                                v-model="deliveryVo.expectTime"-->
+            <!--                                style="width: 100%"-->
+            <!--                                value-format="yyyy-MM-dd HH:mm"-->
+            <!--                                format="yyyy-MM-dd HH:mm"-->
+            <!--                                :picker-options="{-->
+            <!--                                    disabledDate: (time) => {-->
+            <!--                                        return time.getTime() < Date.now() - 3600 * 1000 * 24-->
+            <!--                                    },-->
+            <!--                                    selectableRange: startTimeRange-->
+            <!--                                }"-->
+            <!--                                :default-time="deliTime"-->
+            <!--                                class="date_picker"-->
+            <!--                                :editable="false"-->
+            <!--                            ></el-date-picker>-->
+            <!--                        </el-form-item>-->
+
+            <!-- <el-form-item label="包裹数量" prop="count">
   <el-input v-model="deliveryVo.count" type="number" placeholder="请输入包裹数量" clearable></el-input>
 </el-form-item> -->
 
-<!--                        <el-form-item label="货物高度" prop="spaceHeight">-->
-<!--                            <el-input v-model="deliveryVo.spaceHeight" placeholder="请输入货物高度" clearable>-->
-<!--                                <template slot="append">厘米(cm)</template>-->
-<!--                            </el-input>-->
-<!--                        </el-form-item>-->
-
-<!--                        <el-form-item label="货物长度" prop="spaceLength">-->
-<!--                            <el-input v-model="deliveryVo.spaceLength" placeholder="请输入货物长度" clearable>-->
-<!--                                <template slot="append">厘米(cm)</template>-->
-<!--                            </el-input>-->
-<!--                        </el-form-item>-->
-
-<!--                        <el-form-item label="货物宽度" prop="spaceWidth">-->
-<!--                            <el-input v-model="deliveryVo.spaceWidth" placeholder="请输入货物宽度" clearable>-->
-<!--                                <template slot="append">厘米(cm)</template>-->
-<!--                            </el-input>-->
-<!--                        </el-form-item>-->
-
-<!--                        <el-form-item label="货物总重量" prop="weight">-->
-<!--                            <el-input v-model="deliveryVo.weight" placeholder="请输入货物总重量" clearable>-->
-<!--                                <template slot="append">千克 (kg)</template>-->
-<!--                            </el-input>-->
-<!--                        </el-form-item>-->
-                      <el-form-item label="快递单号" prop="deliveryNo">
-                        <el-input v-model="deliveryVo.deliveryNo" type="input" placeholder="请输入快递单号" maxlength="100" clearable></el-input>
-                      </el-form-item>
-<!--                        <el-form-item label="备注信息" prop="customRemark">-->
-<!--                            <el-input v-model="deliveryVo.customRemark" rows="5" type="textarea" placeholder="请输入备注信息,比如易碎物品……" maxlength="500" show-word-limit clearable></el-input>-->
-<!--                        </el-form-item>-->
-                    </el-col>
-                </el-form>
-            </el-row>
-
-            <div slot="footer" class="dialog-footer">
-                <el-button type="primary" @click="submitDelivery('deliveryVo')" style="margin-left: 5%">提交</el-button>
-                <el-button @click="cancelDelivery">取 消</el-button>
-            </div>
-        </el-dialog>
-
-        <!-- 快递信息对话框 -->
-        <el-dialog title="快递信息" :visible.sync="openDeliveryinfo" size="40%" append-to-body :before-close="deliveryinfoClose">
-            <div class="deliveryView">
-                <div class="info">
-                    <span>快递公司:</span>
-                    <span>{{ deliveryView.name }}</span>
-                </div>
-                <div class="info">
-                    <span>收货地址:</span>
-                    <span>{{ deliveryView.address }}</span>
-                </div>
-            </div>
-
-            <el-timeline v-if="deliveryView.pathItemList.length">
-                <el-timeline-item v-for="(item, index) in deliveryView.pathItemList" :key="index" :timestamp="item.actionTime">
-                    {{ item.actionMsg }}
-                </el-timeline-item>
-            </el-timeline>
-
-            <el-empty description="暂无快递信息" v-else></el-empty>
-
-            <div slot="footer" class="dialog-footer">
-                <el-button type="primary" style="margin-left: 5%" @click="openDeliveryinfo = false">关闭</el-button>
-            </div>
-        </el-dialog>
-    </div>
+            <!--                        <el-form-item label="货物高度" prop="spaceHeight">-->
+            <!--                            <el-input v-model="deliveryVo.spaceHeight" placeholder="请输入货物高度" clearable>-->
+            <!--                                <template slot="append">厘米(cm)</template>-->
+            <!--                            </el-input>-->
+            <!--                        </el-form-item>-->
+
+            <!--                        <el-form-item label="货物长度" prop="spaceLength">-->
+            <!--                            <el-input v-model="deliveryVo.spaceLength" placeholder="请输入货物长度" clearable>-->
+            <!--                                <template slot="append">厘米(cm)</template>-->
+            <!--                            </el-input>-->
+            <!--                        </el-form-item>-->
+
+            <!--                        <el-form-item label="货物宽度" prop="spaceWidth">-->
+            <!--                            <el-input v-model="deliveryVo.spaceWidth" placeholder="请输入货物宽度" clearable>-->
+            <!--                                <template slot="append">厘米(cm)</template>-->
+            <!--                            </el-input>-->
+            <!--                        </el-form-item>-->
+
+            <!--                        <el-form-item label="货物总重量" prop="weight">-->
+            <!--                            <el-input v-model="deliveryVo.weight" placeholder="请输入货物总重量" clearable>-->
+            <!--                                <template slot="append">千克 (kg)</template>-->
+            <!--                            </el-input>-->
+            <!--                        </el-form-item>-->
+            <el-form-item label="快递单号" prop="deliveryNo">
+              <el-input v-model="deliveryVo.deliveryNo" type="input" placeholder="请输入快递单号" maxlength="100" clearable></el-input>
+            </el-form-item>
+            <!--                        <el-form-item label="备注信息" prop="customRemark">-->
+            <!--                            <el-input v-model="deliveryVo.customRemark" rows="5" type="textarea" placeholder="请输入备注信息,比如易碎物品……" maxlength="500" show-word-limit clearable></el-input>-->
+            <!--                        </el-form-item>-->
+          </el-col>
+        </el-form>
+      </el-row>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitDelivery('deliveryVo')" style="margin-left: 5%">提交</el-button>
+        <el-button @click="cancelDelivery">取 消</el-button>
+      </div>
+    </el-dialog>
+
+    <!-- 快递信息对话框 -->
+    <el-dialog title="快递信息" :visible.sync="openDeliveryinfo" size="40%" append-to-body :before-close="deliveryinfoClose">
+      <div class="deliveryView">
+        <div class="info">
+          <span>快递公司:</span>
+          <span>{{ deliveryView.name }}</span>
+        </div>
+        <div class="info">
+          <span>收货地址:</span>
+          <span>{{ deliveryView.address }}</span>
+        </div>
+      </div>
+
+      <el-timeline v-if="deliveryView.pathItemList.length">
+        <el-timeline-item v-for="(item, index) in deliveryView.pathItemList" :key="index" :timestamp="item.actionTime">
+          {{ item.actionMsg }}
+        </el-timeline-item>
+      </el-timeline>
+
+      <el-empty description="暂无快递信息" v-else></el-empty>
+
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" style="margin-left: 5%" @click="openDeliveryinfo = false">关闭</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
@@ -354,520 +383,520 @@ import { printGoods } from '@/api/order/clothItem'
 import { allOrg } from '@/api/system/store'
 
 export default {
-    name: 'goodsRetailOrder',
-    dicts: ['order_goods_status', 'goods_order_refund_status','delivery_company', 'recharge_pay_type', 'goods_type'],
-    data() {
-        var validateNumberInput = (rule, value, callback) => {
-            if (!value || isNaN(value)) {
-                callback(new Error('只能输入数字,不能为空'))
-            } else {
-                callback()
-            }
+  name: 'goodsRetailOrder',
+  dicts: ['order_goods_status', 'goods_order_refund_status', 'delivery_company', 'recharge_pay_type', 'goods_type'],
+  data() {
+    var validateNumberInput = (rule, value, callback) => {
+      if (!value || isNaN(value)) {
+        callback(new Error('只能输入数字,不能为空'))
+      } else {
+        callback()
+      }
+    }
+    return {
+      userInfoVO: null,
+      //
+      orderLoading: true,
+      // 遮罩层
+      loading: false,
+      detailLoading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 弹出层标题
+      title: '',
+      detailTitle: '',
+      // 是否显示弹出层
+      open: false,
+      openDetail: false,
+      openRePayPage: false,
+      openDeliveryPage: false,
+      openRefundPage: false,
+      // 查询参数
+      queryParams: {
+        orgId: null,
+        realName: null,
+        phoneNumber: null,
+        orderNo: null,
+        orderStatus: null
+      },
+      storeList: [],
+      // 表单参数
+      payFrom: {},
+      // 表单校验
+      rules: {},
+      goodsType: null,
+      // 商品订单表格数据
+      GoodsList: [],
+      // 可选商品集合
+      goodsList: null,
+      // 已选商品集合
+      addGoodsList: [],
+      // 自定义一个计算数量的临时对象集合
+      purchaseCountVOList: [],
+      // 总金额
+      totalPrice: 0,
+      // 总件数
+      totalCount: 0,
+      // 详情数据
+      detailView: {},
+      // detailList:[],
+
+      // 详情总金额
+      costTotalPrice: null,
+      appUserInfo: null,
+      goodsOrderInfo: null,
+      payMoney: null,
+      deliveryVo: {
+        // bizId: '',
+        // count: 1,
+        customRemark: '',
+        deliveryCompany: '',
+        deliveryId: '',
+        deliveryNo: ''
+        // expectTime: '',
+        // orderId: null,
+        // serviceName: '',
+        // serviceType: null,
+        // spaceHeight: null,
+        // spaceLength: null,
+        // spaceWidth: null,
+        // weight: null
+      },
+      deliveryRules: {
+        deliveryName: [{ required: true, message: '请选择物流公司', trigger: 'change' }],
+        // serviceType: [{ required: true, message: '请选择服务类型', trigger: 'change' }],
+        // expectTime: [{ required: true, message: '选择预期揽件时间', trigger: 'blur' }],
+        // spaceHeight: [
+        //     { required: true, message: '请输入货物高度', trigger: 'blur' },
+        //     { validator: validateNumberInput, trigger: 'blur' }
+        // ],
+        // spaceLength: [
+        //     { required: true, message: '请输入货物长度', trigger: 'blur' },
+        //     { validator: validateNumberInput, trigger: 'blur' }
+        // ],
+        // spaceWidth: [
+        //     { required: true, message: '请输入货物宽度', trigger: 'blur' },
+        //     { validator: validateNumberInput, trigger: 'blur' }
+        // ],
+        // weight: [
+        //     { required: true, message: '请输入货物总重量', trigger: 'blur' },
+        //     { validator: validateNumberInput, trigger: 'blur' }
+        // ],
+        // customRemark: [{ required: true, message: '请输入备注信息,比如易碎物品……', trigger: 'blur' }]
+      },
+      refundVO: {
+        orderId: null,
+        refundReason: null
+      },
+      deliveryData: [], //快递公司数据
+      startTimeRange: null,
+      deliTime: null,
+
+      openDeliveryinfo: false,
+      deliveryView: {
+        name: '',
+        pathItemList: []
+      },
+
+      LODOP: null,
+      number: 1,
+      pointerList: [],
+      queryCreateTime: null,
+      queryPayTime: null
+    }
+  },
+  created() {
+    this.handleUser()
+    this.goodsType = this.getUrlParam('goodsType')
+    this.getList()
+    this.getdeliveryAll()
+    allOrg().then((res) => {
+      this.orgList = res.data
+      this.orgList.forEach((org) => {
+        if (org.sourceType == '02') {
+          this.storeList.push(org)
         }
-        return {
-            userInfoVO: null,
-            //
-            orderLoading: true,
-            // 遮罩层
-            loading: false,
-            detailLoading: true,
-            // 选中数组
-            ids: [],
-            // 非单个禁用
-            single: true,
-            // 非多个禁用
-            multiple: true,
-            // 显示搜索条件
-            showSearch: true,
-            // 总条数
-            total: 0,
-            // 弹出层标题
-            title: '',
-            detailTitle: '',
-            // 是否显示弹出层
-            open: false,
-            openDetail: false,
-            openRePayPage: false,
-            openDeliveryPage: false,
-            openRefundPage: false,
-            // 查询参数
-            queryParams: {
-                orgId: null,
-                realName: null,
-                phoneNumber: null,
-                orderNo: null,
-                orderStatus: null
-            },
-           storeList: [],
-            // 表单参数
-            payFrom: {},
-            // 表单校验
-            rules: {},
-            goodsType: null,
-            // 商品订单表格数据
-            GoodsList: [],
-            // 可选商品集合
-            goodsList: null,
-            // 已选商品集合
-            addGoodsList: [],
-            // 自定义一个计算数量的临时对象集合
-            purchaseCountVOList: [],
-            // 总金额
-            totalPrice: 0,
-            // 总件数
-            totalCount: 0,
-            // 详情数据
-            detailView: {},
-            // detailList:[],
-
-            // 详情总金额
-            costTotalPrice: null,
-            appUserInfo: null,
-            goodsOrderInfo: null,
-            payMoney: null,
-            deliveryVo: {
-                // bizId: '',
-                // count: 1,
-                customRemark: '',
-                deliveryCompany: '',
-                deliveryId: '',
-                deliveryNo: ''
-                // expectTime: '',
-                // orderId: null,
-                // serviceName: '',
-                // serviceType: null,
-                // spaceHeight: null,
-                // spaceLength: null,
-                // spaceWidth: null,
-                // weight: null
-            },
-            deliveryRules: {
-                deliveryName: [{ required: true, message: '请选择物流公司', trigger: 'change' }],
-                // serviceType: [{ required: true, message: '请选择服务类型', trigger: 'change' }],
-                // expectTime: [{ required: true, message: '选择预期揽件时间', trigger: 'blur' }],
-                // spaceHeight: [
-                //     { required: true, message: '请输入货物高度', trigger: 'blur' },
-                //     { validator: validateNumberInput, trigger: 'blur' }
-                // ],
-                // spaceLength: [
-                //     { required: true, message: '请输入货物长度', trigger: 'blur' },
-                //     { validator: validateNumberInput, trigger: 'blur' }
-                // ],
-                // spaceWidth: [
-                //     { required: true, message: '请输入货物宽度', trigger: 'blur' },
-                //     { validator: validateNumberInput, trigger: 'blur' }
-                // ],
-                // weight: [
-                //     { required: true, message: '请输入货物总重量', trigger: 'blur' },
-                //     { validator: validateNumberInput, trigger: 'blur' }
-                // ],
-                // customRemark: [{ required: true, message: '请输入备注信息,比如易碎物品……', trigger: 'blur' }]
-            },
-            refundVO: {
-                orderId: null,
-                refundReason: null
-            },
-            deliveryData: [], //快递公司数据
-            startTimeRange: null,
-            deliTime: null,
-
-            openDeliveryinfo: false,
-            deliveryView: {
-                name: '',
-                pathItemList: []
-            },
-
-            LODOP: null,
-            number: 1,
-            pointerList: [],
-            queryCreateTime: null,
-            queryPayTime: null
+      })
+    })
+  },
+  mounted() {
+    this.number = 1
+    const printerTime = setInterval(() => {
+      this.LODOP = getLodop()
+      this.number++
+      if (this.number == 25) {
+        clearInterval(printerTime)
+      }
+      if (this.LODOP) {
+        clearInterval(printerTime)
+      }
+    }, 200)
+
+    this.pointerList = JSON.parse(this.$cache.local.get('printerSeting'))
+  },
+  watch: {
+    'deliveryVo.expectTime': {
+      deep: true,
+      handler(newValue, oldValue) {
+        if (newValue) {
+          let nowDate = this.sendTimeDate(new Date().getTime() + 3600000) // 一小时之后的时间(我是因业务要求,这里可以随意调整时间)
+          let dt = nowDate.split(' ')
+          let st = ''
+          if (newValue.split(' ')[0] == dt[0]) {
+            // 是今天,选择 的时间开始为此刻的时分秒
+            st = dt[1]
+          } else {
+            // 明天及以后从0时开始
+            st = '00:00:00'
+          }
+          this.startTimeRange = st + ' - 23:59:59'
+          //例如:如果今天此刻时间为10:41:40 则选择时间范围为: 11:41:40 - 23:59:59
+          //否则为:00:00:00- 23:59:59
         }
+      }
+    }
+  },
+  computed: {
+    calculateTotalCount() {
+      this.totalCount = 0
+      // this.detailList.forEach(vo =>{
+      this.detailView.forEach((vo) => {
+        this.totalCount = this.totalCount + vo.buyNum
+      })
+      return this.totalCount
     },
-    created() {
-        this.handleUser()
-        this.goodsType = this.getUrlParam('goodsType')
-        this.getList()
-        this.getdeliveryAll()
-        allOrg().then((res) => {
-          this.orgList = res.data
-          this.orgList.forEach((org) => {
-            if (org.sourceType == '02') {
-              this.storeList.push(org)
-            }
+    calculatePayMoney() {
+      this.payMoney = this.payFrom.deductAmount ? this.costTotalPrice - this.payFrom.deductAmount : this.costTotalPrice
+      return this.payMoney
+    }
+  },
+  methods: {
+    handleUser() {
+      this.userInfoVO = this.getUserInfo()
+    },
+    getCreateTime() {
+      if (this.queryCreateTime != null) {
+        this.queryParams.createTimeFrom = this.queryCreateTime[0]
+        this.queryParams.createTimeTo = this.queryCreateTime[1]
+      }
+    },
+    getPayTime() {
+      if (this.queryPayTime != null) {
+        this.queryParams.beginPayTime = this.queryPayTime[0]
+        this.queryParams.endPayTime = this.queryPayTime[1]
+      }
+    },
+    getList() {
+      this.queryParams.goodsType = this.goodsType
+      this.$nextTick(() => {
+        this.$refs.pagination.handleSearch(true)
+      })
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1
+      this.getList()
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.queryCreateTime = null
+      this.queryParams.createTimeFrom = null
+      this.queryParams.createTimeTo = null
+
+      this.queryPayTime = null
+      this.queryParams.beginPayTime = null
+      this.queryParams.endPayTime = null
+      this.resetForm('queryForm')
+      this.handleQuery()
+    },
+    rePay(row) {
+      this.payFrom = {}
+      this.payFrom.id = row.id
+      this.openRePayPage = true
+      getUser(row.appUserId).then((res1) => {
+        if (res1.data.phoneNumber == null || res1.data.phoneNumber == '') {
+          return
+        }
+        findUserByPhoneNumber({ phoneNumber: res1.data.phoneNumber }).then((res) => {
+          this.appUserInfo = res.data
+        })
+      })
+      getGoods(row.id).then((response) => {
+        this.detailView = response.data
+        this.costTotalPrice = this.detailView.totalPrice
+        // this.detailList = response.data;
+        // this.costTotalPrice = this.detailList[0].totalPrice;
+      })
+      if (row.deductAmount != null && row.deductAmount != '') {
+        this.payFrom.deductAmount = row.deductAmount
+      }
+      if (row.payType != null && row.payType != '') {
+        this.payFrom.payType = row.payType
+      }
+      if (row.payType != null && row.payType != '') {
+        this.payFrom.payType = row.payType
+      }
+    },
+    submitSettlement() {
+      this.$confirm('是否确认结算?').then(() => {
+        if (this.totalCount == 0) {
+          this.$message.error('请选择商品')
+          return
+        }
+        if (this.payFrom.payType == null || this.payFrom.payType == '') {
+          this.$message.error('请选择支付方式')
+          return
+        }
+        if (this.payFrom.deductAmount != null || this.payFrom.deductAmount != '') {
+          if (this.payFrom.deductAmount > this.payMoney) {
+            this.$message.error('抵扣金额不能大于支付金额')
+            return
+          }
+        }
+        if (this.payFrom.payType == '1') {
+          if (this.appUserInfo.rechargeBalance + this.appUserInfo.giveBalance < this.payMoney) {
+            this.$message.error('用户余额不足')
+            return
+          }
+        }
+        if (this.payFrom.payType == '2') {
+          if (this.payFrom.thisPayMoney < this.payMoney) {
+            this.$message.error('现金金额不够支付')
+            return
+          }
+        }
+        this.submitGoodsOrderDTO = {}
+        // 设置订单基础信息
+        this.submitGoodsOrderDTO.id = this.payFrom.id
+        this.submitGoodsOrderDTO.goodsType = this.goodsType
+        this.submitGoodsOrderDTO.deductAmount = this.payFrom.deductAmount
+        this.submitGoodsOrderDTO.payAmount = this.payMoney
+        this.submitGoodsOrderDTO.payType = this.payFrom.payType
+
+        rePayOrder(this.submitGoodsOrderDTO).then((response) => {
+          this.$modal.msgSuccess('结算完成')
+          this.addGoodsList = []
+          this.purchaseCountVOList = []
+          this.submitGoodsOrderDTO = {}
+          this.openRePayPage = false
+          this.getList()
+        })
+      })
+    },
+    // 切换支付方式
+    changePayType() {
+      delete this.payFrom.thisPayMoney
+      this.$forceUpdate()
+    },
+    // 取消订单
+    cancelOrder(row) {
+      this.$confirm('是否确认取消该订单?')
+        .then(() => {
+          const vo = {
+            orderId: row.id,
+            remark: '不想要了'
+          }
+          cancelOrder(vo).then((response2) => {
+            this.$modal.msgSuccess('订单取消成功')
+            this.getList()
           })
         })
+        .catch(() => { })
     },
-    mounted() {
-        this.number = 1
-        const printerTime = setInterval(() => {
-            this.LODOP = getLodop()
-            this.number++
-            if (this.number == 25) {
-                clearInterval(printerTime)
-            }
-            if (this.LODOP) {
-                clearInterval(printerTime)
-            }
-        }, 200)
-
-        this.pointerList = JSON.parse(this.$cache.local.get('printerSeting'))
+    // 订单详情
+    orderDetail(row) {
+      this.openDetail = true
+      this.detailTitle = '订单商品详情'
+      this.detailLoading = true
+      // this.detailList = [];
+      this.detailView = {}
+      const id = row.id
+      getGoods(id).then((response) => {
+        this.detailView = response.data
+        this.costTotalPrice = this.detailView.totalPrice
+
+        // this.detailList = response.data;
+        // this.costTotalPrice = this.detailList[0].totalPrice;
+        this.detailLoading = false
+      })
     },
-    watch: {
-        'deliveryVo.expectTime': {
-            deep: true,
-            handler(newValue, oldValue) {
-                if (newValue) {
-                    let nowDate = this.sendTimeDate(new Date().getTime() + 3600000) // 一小时之后的时间(我是因业务要求,这里可以随意调整时间)
-                    let dt = nowDate.split(' ')
-                    let st = ''
-                    if (newValue.split(' ')[0] == dt[0]) {
-                        // 是今天,选择 的时间开始为此刻的时分秒
-                        st = dt[1]
-                    } else {
-                        // 明天及以后从0时开始
-                        st = '00:00:00'
-                    }
-                    this.startTimeRange = st + ' - 23:59:59'
-                    //例如:如果今天此刻时间为10:41:40 则选择时间范围为: 11:41:40 - 23:59:59
-                    //否则为:00:00:00- 23:59:59
-                }
-            }
-        }
+    // 出货
+    outOrderGoods(row) {
+      this.deliveryreset()
+      this.openDeliveryPage = true
+      this.deliveryVo.deliveryCompany = this.deliveryData[0].name
+      this.deliveryVo.deliveryId = this.deliveryData[0].code
+      this.deliveryVo.orderId = row.id
     },
-    computed: {
-        calculateTotalCount() {
-            this.totalCount = 0
-            // this.detailList.forEach(vo =>{
-            this.detailView.forEach((vo) => {
-                this.totalCount = this.totalCount + vo.buyNum
-            })
-            return this.totalCount
-        },
-        calculatePayMoney() {
-            this.payMoney = this.payFrom.deductAmount ? this.costTotalPrice - this.payFrom.deductAmount : this.costTotalPrice
-            return this.payMoney
+    //获取快递公司
+    getdeliveryAll() {
+      getdeliveryAll().then((res) => {
+        this.deliveryData = res.data
+      })
+    },
+    //切换快递获取其他数据
+    changeDeliveryId(value) {
+      this.deliveryData.forEach((item, index) => {
+        if (value == item.deliveryName) {
+          this.deliveryVo.deliveryId = item.code
         }
+      })
     },
-    methods: {
-        handleUser() {
-            this.userInfoVO = this.getUserInfo()
-        },
-        getCreateTime() {
-            if (this.queryCreateTime != null) {
-                this.queryParams.createTimeFrom = this.queryCreateTime[0]
-                this.queryParams.createTimeTo = this.queryCreateTime[1]
-            }
-        },
-        getPayTime() {
-            if (this.queryPayTime != null) {
-                this.queryParams.beginPayTime = this.queryPayTime[0]
-                this.queryParams.endPayTime = this.queryPayTime[1]
+    // 撤单
+    refundOrder(row) {
+      this.refundVO = {}
+      this.openRefundPage = true
+      this.refundVO.orderId = row.id
+    },
+    submitDelivery(formName) {
+      this.$confirm('是否确认出货配送?')
+        .then(() => {
+          this.$refs[formName].validate((valid) => {
+            if (valid) {
+              outOrderGoods(this.deliveryVo).then((response2) => {
+                this.$message.success('操作成功')
+                this.getList()
+                this.openDeliveryPage = false
+                this.deliveryreset()
+              })
             }
-        },
-        getList() {
-            this.queryParams.goodsType = this.goodsType
-            this.$nextTick(() => {
-                this.$refs.pagination.handleSearch(true)
-            })
-        },
-        /** 搜索按钮操作 */
-        handleQuery() {
-            this.queryParams.pageNum = 1
+          })
+        })
+        .catch(() => { })
+    },
+    sendTimeDate(date) {
+      if (!!date) {
+        var nowDate = new Date(date).getFullYear() + '-' + (new Date(date).getMonth() + 1 < 10 ? '0' + (new Date(date).getMonth() + 1) : new Date(date).getMonth() + 1) + '-' + (new Date(date).getDate(date) < 10 ? '0' + new Date(date).getDate(date) : new Date(date).getDate(date))
+        var nowTime =
+          (new Date(date).getHours() < 10 ? '0' + new Date(date).getHours() : new Date(date).getHours()) +
+          ':' +
+          (new Date(date).getMinutes() < 10 ? '0' + new Date(date).getMinutes() : new Date(date).getMinutes()) +
+          ':' +
+          (new Date(date).getSeconds() < 10 ? '0' + new Date(date).getSeconds() : new Date(date).getSeconds())
+        return nowDate + ' ' + nowTime
+      } else {
+        return ''
+      }
+    },
+    cancelDelivery() {
+      this.openDeliveryPage = false
+      this.deliveryreset()
+    },
+    // 表单重置
+    deliveryreset() {
+      this.deliveryVo = {
+        bizId: '',
+        // count: 1,
+        customRemark: '',
+        deliveryCompany: '',
+        deliveryId: '',
+        expectTime: '',
+        orderId: 0,
+        serviceName: '',
+        serviceType: null,
+        spaceHeight: null,
+        spaceLength: null,
+        spaceWidth: null,
+        weight: null
+      }
+    },
+    submitRefund() {
+      this.$confirm('是否确认撤回该订单?')
+        .then(() => {
+          refundOrderGoods(this.refundVO).then((response2) => {
+            this.$message.success('操作成功')
             this.getList()
-        },
-        /** 重置按钮操作 */
-        resetQuery() {
-            this.queryCreateTime = null
-            this.queryParams.createTimeFrom = null
-            this.queryParams.createTimeTo = null
-
-            this.queryPayTime = null
-            this.queryParams.beginPayTime = null
-            this.queryParams.endPayTime = null
-            this.resetForm('queryForm')
-            this.handleQuery()
-        },
-        rePay(row) {
-            this.payFrom = {}
-            this.payFrom.id = row.id
-            this.openRePayPage = true
-            getUser(row.appUserId).then((res1) => {
-                if (res1.data.phoneNumber == null || res1.data.phoneNumber == '') {
-                    return
-                }
-                findUserByPhoneNumber({ phoneNumber: res1.data.phoneNumber }).then((res) => {
-                    this.appUserInfo = res.data
-                })
-            })
-            getGoods(row.id).then((response) => {
-                this.detailView = response.data
-                this.costTotalPrice = this.detailView.totalPrice
-                // this.detailList = response.data;
-                // this.costTotalPrice = this.detailList[0].totalPrice;
-            })
-            if (row.deductAmount != null && row.deductAmount != '') {
-                this.payFrom.deductAmount = row.deductAmount
-            }
-            if (row.payType != null && row.payType != '') {
-                this.payFrom.payType = row.payType
-            }
-            if (row.payType != null && row.payType != '') {
-                this.payFrom.payType = row.payType
-            }
-        },
-        submitSettlement() {
-            this.$confirm('是否确认结算?').then(() => {
-                if (this.totalCount == 0) {
-                    this.$message.error('请选择商品')
-                    return
-                }
-                if (this.payFrom.payType == null || this.payFrom.payType == '') {
-                    this.$message.error('请选择支付方式')
-                    return
-                }
-                if (this.payFrom.deductAmount != null || this.payFrom.deductAmount != '') {
-                    if (this.payFrom.deductAmount > this.payMoney) {
-                        this.$message.error('抵扣金额不能大于支付金额')
-                        return
-                    }
-                }
-                if (this.payFrom.payType == '1') {
-                    if (this.appUserInfo.rechargeBalance + this.appUserInfo.giveBalance < this.payMoney) {
-                        this.$message.error('用户余额不足')
-                        return
-                    }
-                }
-                if (this.payFrom.payType == '2') {
-                    if (this.payFrom.thisPayMoney < this.payMoney) {
-                        this.$message.error('现金金额不够支付')
-                        return
-                    }
-                }
-                this.submitGoodsOrderDTO = {}
-                // 设置订单基础信息
-                this.submitGoodsOrderDTO.id = this.payFrom.id
-                this.submitGoodsOrderDTO.goodsType = this.goodsType
-                this.submitGoodsOrderDTO.deductAmount = this.payFrom.deductAmount
-                this.submitGoodsOrderDTO.payAmount = this.payMoney
-                this.submitGoodsOrderDTO.payType = this.payFrom.payType
-
-                rePayOrder(this.submitGoodsOrderDTO).then((response) => {
-                    this.$modal.msgSuccess('结算完成')
-                    this.addGoodsList = []
-                    this.purchaseCountVOList = []
-                    this.submitGoodsOrderDTO = {}
-                    this.openRePayPage = false
-                    this.getList()
-                })
-            })
-        },
-        // 切换支付方式
-        changePayType() {
-            delete this.payFrom.thisPayMoney
-            this.$forceUpdate()
-        },
-        // 取消订单
-        cancelOrder(row) {
-            this.$confirm('是否确认取消该订单?')
-                .then(() => {
-                    const vo = {
-                        orderId: row.id,
-                        remark: '不想要了'
-                    }
-                    cancelOrder(vo).then((response2) => {
-                        this.$modal.msgSuccess('订单取消成功')
-                        this.getList()
-                    })
-                })
-                .catch(() => {})
-        },
-        // 订单详情
-        orderDetail(row) {
-            this.openDetail = true
-            this.detailTitle = '订单商品详情'
-            this.detailLoading = true
-            // this.detailList = [];
-            this.detailView = {}
-            const id = row.id
-            getGoods(id).then((response) => {
-                this.detailView = response.data
-                this.costTotalPrice = this.detailView.totalPrice
-
-                // this.detailList = response.data;
-                // this.costTotalPrice = this.detailList[0].totalPrice;
-                this.detailLoading = false
-            })
-        },
-        // 出货
-        outOrderGoods(row) {
-            this.deliveryreset()
-            this.openDeliveryPage = true
-            this.deliveryVo.deliveryCompany = this.deliveryData[0].name
-          this.deliveryVo.deliveryId = this.deliveryData[0].code
-          this.deliveryVo.orderId = row.id
-        },
-        //获取快递公司
-        getdeliveryAll() {
-            getdeliveryAll().then((res) => {
-                this.deliveryData = res.data
-            })
-        },
-        //切换快递获取其他数据
-        changeDeliveryId(value) {
-            this.deliveryData.forEach((item, index) => {
-                if (value == item.deliveryName) {
-                    this.deliveryVo.deliveryId = item.code
-                }
-            })
-        },
-        // 撤单
-        refundOrder(row) {
-            this.refundVO = {}
-            this.openRefundPage = true
-            this.refundVO.orderId = row.id
-        },
-        submitDelivery(formName) {
-            this.$confirm('是否确认出货配送?')
-                .then(() => {
-                    this.$refs[formName].validate((valid) => {
-                        if (valid) {
-                            outOrderGoods(this.deliveryVo).then((response2) => {
-                                this.$message.success('操作成功')
-                                this.getList()
-                                this.openDeliveryPage = false
-                                this.deliveryreset()
-                            })
-                        }
-                    })
-                })
-                .catch(() => {})
-        },
-        sendTimeDate(date) {
-            if (!!date) {
-                var nowDate = new Date(date).getFullYear() + '-' + (new Date(date).getMonth() + 1 < 10 ? '0' + (new Date(date).getMonth() + 1) : new Date(date).getMonth() + 1) + '-' + (new Date(date).getDate(date) < 10 ? '0' + new Date(date).getDate(date) : new Date(date).getDate(date))
-                var nowTime =
-                    (new Date(date).getHours() < 10 ? '0' + new Date(date).getHours() : new Date(date).getHours()) +
-                    ':' +
-                    (new Date(date).getMinutes() < 10 ? '0' + new Date(date).getMinutes() : new Date(date).getMinutes()) +
-                    ':' +
-                    (new Date(date).getSeconds() < 10 ? '0' + new Date(date).getSeconds() : new Date(date).getSeconds())
-                return nowDate + ' ' + nowTime
-            } else {
-                return ''
-            }
-        },
-        cancelDelivery() {
-            this.openDeliveryPage = false
-            this.deliveryreset()
-        },
-        // 表单重置
-        deliveryreset() {
-            this.deliveryVo = {
-                bizId: '',
-                // count: 1,
-                customRemark: '',
-                deliveryCompany: '',
-                deliveryId: '',
-                expectTime: '',
-                orderId: 0,
-                serviceName: '',
-                serviceType: null,
-                spaceHeight: null,
-                spaceLength: null,
-                spaceWidth: null,
-                weight: null
-            }
-        },
-        submitRefund() {
-            this.$confirm('是否确认撤回该订单?')
-                .then(() => {
-                    refundOrderGoods(this.refundVO).then((response2) => {
-                        this.$message.success('操作成功')
-                        this.getList()
-                        this.openRefundPage = false
-                        this.refundVO.orderId = null
-                        this.refundVO.refundReason = null
-                    })
-                })
-                .catch(() => {})
-        },
-        checkClose(done) {
-            this.$confirm('是否关闭支付页面,放弃支付?')
-                .then(function () {
-                    done()
-                })
-                .then(() => {})
-                .catch(() => {})
-        },
-        deliveryClose(done) {
-            this.$confirm('是否关闭出货信息窗口,确认关闭?')
-                .then(function () {
-                    done()
-                })
-                .then(() => {})
-                .catch(() => {})
-        },
-        deliveryinfoClose(done) {
-            this.$confirm('是否关闭快递信息窗口,确认关闭?')
-                .then(function () {
-                    done()
-                })
-                .then(() => {})
-                .catch(() => {})
-        },
-        deliveryInfo(row) {
-            getDeliveryPath({
-                orderId: row.id
-            }).then((res) => {
-                this.deliveryView.name = row.deliveryCompany
-                this.deliveryView.pathItemList = res.data.pathItemList
-                this.deliveryView.address = row.province + row.city + row.area + row.address + row.addressDetail
-
-                console.log(this.deliveryView)
-
-                this.openDeliveryinfo = true
-            })
-        },
-        btn_lodop(row) {
-            if (!this.LODOP) {
-                this.$modal.msgError('请安装打印机软件')
-                return
-            }
+            this.openRefundPage = false
+            this.refundVO.orderId = null
+            this.refundVO.refundReason = null
+          })
+        })
+        .catch(() => { })
+    },
+    checkClose(done) {
+      this.$confirm('是否关闭支付页面,放弃支付?')
+        .then(function () {
+          done()
+        })
+        .then(() => { })
+        .catch(() => { })
+    },
+    deliveryClose(done) {
+      this.$confirm('是否关闭出货信息窗口,确认关闭?')
+        .then(function () {
+          done()
+        })
+        .then(() => { })
+        .catch(() => { })
+    },
+    deliveryinfoClose(done) {
+      this.$confirm('是否关闭快递信息窗口,确认关闭?')
+        .then(function () {
+          done()
+        })
+        .then(() => { })
+        .catch(() => { })
+    },
+    deliveryInfo(row) {
+      getDeliveryPath({
+        orderId: row.id
+      }).then((res) => {
+        this.deliveryView.name = row.deliveryCompany
+        this.deliveryView.pathItemList = res.data.pathItemList
+        this.deliveryView.address = row.province + row.city + row.area + row.address + row.addressDetail
+
+        console.log(this.deliveryView)
+
+        this.openDeliveryinfo = true
+      })
+    },
+    btn_lodop(row) {
+      if (!this.LODOP) {
+        this.$modal.msgError('请安装打印机软件')
+        return
+      }
 
-            let p_name = ''
-
-            this.pointerList.forEach((pointer) => {
-                if (pointer.printType == 0) {
-                    p_name = pointer.printName
-                }
-            })
-
-            printGoods(row.id).then((res) => {
-                if (this.userInfoVO.userType == '02') {
-                    const obj = {
-                        name: this.userInfoVO.storeName,
-                        contactPhone: this.userInfoVO.phonenumber,
-                        user: this.userInfoVO.nickName
-                    }
-                    res.data.sysOrg = obj
-                }
-                res.data.newTime = this.formatDates(new Date(), 1)
-                this.goodsPrinter(this.LODOP, res.data, p_name)
-            })
-        },
-        /** 导出按钮操作 */
-        handleExport() {
-            this.download(
-                'mapi/order/goods/export',
-                {
-                    ...this.queryParams,
-                    ...{ goodsType: this.goodsType }
-                },
-                `goods_order_${new Date().getTime()}.xlsx`
-            )
+      let p_name = ''
+
+      this.pointerList.forEach((pointer) => {
+        if (pointer.printType == 0) {
+          p_name = pointer.printName
         }
+      })
+
+      printGoods(row.id).then((res) => {
+        if (this.userInfoVO.userType == '02') {
+          const obj = {
+            name: this.userInfoVO.storeName,
+            contactPhone: this.userInfoVO.phonenumber,
+            user: this.userInfoVO.nickName
+          }
+          res.data.sysOrg = obj
+        }
+        res.data.newTime = this.formatDates(new Date(), 1)
+        this.goodsPrinter(this.LODOP, res.data, p_name)
+      })
+    },
+    /** 导出按钮操作 */
+    handleExport() {
+      this.download(
+        'mapi/order/goods/export',
+        {
+          ...this.queryParams,
+          ...{ goodsType: this.goodsType }
+        },
+        `goods_order_${new Date().getTime()}.xlsx`
+      )
     }
+  }
 }
 </script>
 <style>

+ 346 - 0
admin-ui/src/views/order/statistics/bywash.vue

@@ -0,0 +1,346 @@
+<template>
+    <div class="app-container">
+      <!-- 搜索表单 -->
+      <el-form :model="queryParams" ref="queryForm" @submit.native.prevent :inline="true" v-show="showSearch" label-width="80px">
+        <el-form-item label="日期范围" prop="dateRange">
+          <el-date-picker
+            v-model="dateRange"
+            type="daterange"
+            range-separator="至"
+            start-placeholder="开始日期"
+            end-placeholder="结束日期"
+            value-format="yyyy-MM-dd"
+            :picker-options="pickerOptions"
+            @change="handleDateRangeChange">
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="门店" prop="storeId">
+          <el-select v-model="queryParams.storeId" placeholder="请选择门店" clearable>
+            <el-option
+              v-for="store in storeOptions"
+              :key="store.id"
+              :label="store.name"
+              :value="store.id">
+            </el-option>
+          </el-select>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
+          <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+  
+      <!-- 操作按钮 -->
+      <el-row :gutter="10" class="mb8">
+        <el-col :span="1.5">
+          <el-button
+            type="warning"
+            plain
+            icon="el-icon-download"
+            size="mini"
+            @click="handleExport"
+            >导出</el-button>
+        </el-col>
+        <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      </el-row>
+  
+      <!-- 统计卡片 -->
+      <el-row :gutter="20" class="mb8">
+        <el-col :span="6">
+          <el-card shadow="hover">
+            <div slot="header"><span>收衣订单数</span></div>
+            <div class="card-body">
+              <count-to :startVal="0" :endVal="totalStatistics.receiveOrderCount || 0" :duration="2000"></count-to>
+            </div>
+          </el-card>
+        </el-col>
+        <el-col :span="6">
+          <el-card shadow="hover">
+            <div slot="header"><span>收衣总件数</span></div>
+            <div class="card-body">
+              <count-to :startVal="0" :endVal="totalStatistics.receiveTotalQuantity || 0" :duration="2000"></count-to>
+            </div>
+          </el-card>
+        </el-col>
+        <el-col :span="6">
+          <el-card shadow="hover">
+            <div slot="header"><span>收衣订单总金额</span></div>
+            <div class="card-body">
+              <count-to :startVal="0" :endVal="totalStatistics.receiveTotalAmount || 0" :duration="2000" :decimals="2" prefix="¥"></count-to>
+            </div>
+          </el-card>
+        </el-col>
+        <el-col :span="6">
+          <el-card shadow="hover">
+            <div slot="header"><span>收衣未支付订单数</span></div>
+            <div class="card-body">
+              <count-to :startVal="0" :endVal="totalStatistics.receiveUnpaidOrderCount || 0" :duration="2000"></count-to>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20" class="mb8">
+        <el-col :span="6">
+          <el-card shadow="hover">
+            <div slot="header"><span>收衣未支付订单金额</span></div>
+            <div class="card-body">
+              <count-to :startVal="0" :endVal="totalStatistics.receiveUnpaidAmount || 0" :duration="2000" :decimals="2" prefix="¥"></count-to>
+            </div>
+          </el-card>
+        </el-col>
+        <el-col :span="6">
+          <el-card shadow="hover">
+            <div slot="header"><span>取衣订单数</span></div>
+            <div class="card-body">
+              <count-to :startVal="0" :endVal="totalStatistics.pickupOrderCount || 0" :duration="2000"></count-to>
+            </div>
+          </el-card>
+        </el-col>
+        <el-col :span="6">
+          <el-card shadow="hover">
+            <div slot="header"><span>取衣总件数</span></div>
+            <div class="card-body">
+              <count-to :startVal="0" :endVal="totalStatistics.pickupTotalQuantity || 0" :duration="2000"></count-to>
+            </div>
+          </el-card>
+        </el-col>
+        <el-col :span="6">
+          <el-card shadow="hover">
+            <div slot="header"><span>取衣订单总金额</span></div>
+            <div class="card-body">
+              <count-to :startVal="0" :endVal="totalStatistics.pickupTotalAmount || 0" :duration="2000" :decimals="2" prefix="¥"></count-to>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <el-row :gutter="20" class="mb8">
+        <el-col :span="6">
+          <el-card shadow="hover">
+            <div slot="header"><span>取衣已支付订单数</span></div>
+            <div class="card-body">
+              <count-to :startVal="0" :endVal="totalStatistics.pickupPaidOrderCount || 0" :duration="2000"></count-to>
+            </div>
+          </el-card>
+        </el-col>
+        <el-col :span="6">
+          <el-card shadow="hover">
+            <div slot="header"><span>取衣已支付订单金额</span></div>
+            <div class="card-body">
+              <count-to :startVal="0" :endVal="totalStatistics.pickupPaidAmount || 0" :duration="2000" :decimals="2" prefix="¥"></count-to>
+            </div>
+          </el-card>
+        </el-col>
+      </el-row>
+      <!-- 数据表格 -->
+      <el-table v-loading="loading" :data="statisticsList" border>
+        <el-table-column label="门店名称" align="center" prop="storeName" />
+        <el-table-column label="收衣" align="center">
+          <el-table-column label="订单数" prop="receiveOrderCount" align="center" />
+          <el-table-column label="总件数" prop="receiveTotalQuantity" align="center" />
+          <el-table-column label="订单总金额" prop="receiveTotalAmount" align="center" />
+          <el-table-column label="未支付订单数" prop="receiveUnpaidOrderCount" align="center" />
+          <el-table-column label="未支付订单金额" prop="receiveUnpaidAmount" align="center" />
+        </el-table-column>
+        <el-table-column label="取衣" align="center">
+          <el-table-column label="订单数" prop="pickupOrderCount" align="center" />
+          <el-table-column label="总件数" prop="pickupTotalQuantity" align="center" />
+          <el-table-column label="订单总金额" prop="pickupTotalAmount" align="center" />
+          <el-table-column label="已支付订单数" prop="pickupPaidOrderCount" align="center" />
+          <el-table-column label="已支付订单金额" prop="pickupPaidAmount" align="center" />
+        </el-table-column>
+        <el-table-column label="入厂衣服数" align="center" prop="dailyInFactoryCount" />
+        <el-table-column label="检查衣服数" align="center" prop="dailyCheckedCount" />
+        <el-table-column label="出厂衣服数" align="center" prop="dailyOutFactoryCount" />
+      </el-table>
+  
+      <pagination
+        v-show="total>0"
+        :total="total"
+        :page.sync="queryParams.pageNum"
+        :limit.sync="queryParams.pageSize"
+        @pagination="getList"
+      />
+    </div>
+  </template>
+  
+  <script>
+  import { listStatisticsByStore, getTotalStatistics, listFactoryStatisticsByStore } from '@/api/settlement/statistics'
+  import { listStore } from "@/api/system/store";
+  import CountTo from 'vue-count-to'
+  
+  export default {
+    name: "FactoryStatisticsByStore",
+    components: {
+      CountTo
+    },
+    data() {
+      return {
+        // 遮罩层
+        loading: true,
+        // 显示搜索条件
+        showSearch: true,
+        // 总条数
+        total: 0,
+        // 统计列表
+        statisticsList: [],
+        // 总统计数据
+        totalStatistics: {},
+        // 门店选项
+        storeOptions: [],
+        // 日期范围
+        dateRange: [],
+        // 查询参数
+        queryParams: {
+          pageNum: 1,
+          pageSize: 10,
+          startDate: null,
+          endDate: null,
+          storeId: null
+        },
+        // 日期选择器配置
+        pickerOptions: {
+          shortcuts: [{
+            text: '最近一周',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近半个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 15);
+              picker.$emit('pick', [start, end]);
+            }
+          }, {
+            text: '最近一个月',
+            onClick(picker) {
+              const end = new Date();
+              const start = new Date();
+              start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+              picker.$emit('pick', [start, end]);
+            }
+          }]
+        }
+      };
+    },
+    created() {
+      // 设置默认日期范围为最近半个月
+      const end = new Date();
+      const start = new Date();
+      start.setTime(start.getTime() - 3600 * 1000 * 24 * 15);
+      this.dateRange = [this.formatDate(start), this.formatDate(end)];
+      this.queryParams.startDate = this.dateRange[0];
+      this.queryParams.endDate = this.dateRange[1];
+  
+      this.getList();
+      this.getStoreOptions();
+    },
+    methods: {
+      /**
+       * 格式化日期为 yyyy-MM-dd
+       * @param {Date} date 日期对象
+       * @returns {string} 格式化后的日期字符串
+       */
+      formatDate(date) {
+        const year = date.getFullYear();
+        const month = String(date.getMonth() + 1).padStart(2, '0');
+        const day = String(date.getDate()).padStart(2, '0');
+        return `${year}-${month}-${day}`;
+      },
+      /**
+       * 日期范围变化处理
+       * @param {Array} val 日期范围数组
+       * @returns {void}
+       */
+      handleDateRangeChange(val) {
+        if (val) {
+          this.queryParams.startDate = val[0];
+          this.queryParams.endDate = val[1];
+        } else {
+          this.queryParams.startDate = null;
+          this.queryParams.endDate = null;
+        }
+      },
+      /**
+       * 查询统计列表
+       * @returns {void}
+       */
+      getList() {
+        this.loading = true;
+        listFactoryStatisticsByStore(this.queryParams).then(response => {
+          this.statisticsList = response.rows;
+          this.total = response.total;
+          this.loading = false;
+        });
+        // 获取总统计数据
+        getTotalStatistics(this.queryParams).then(response => {
+          this.totalStatistics = response.data
+        });
+      },
+      /**
+       * 获取门店选项
+       * @returns {void}
+       */
+      getStoreOptions() {
+        listStore().then(response => {
+          this.storeOptions = response.rows;
+        });
+      },
+      /**
+       * 搜索按钮操作
+       * @returns {void}
+       */
+      handleQuery() {
+        this.queryParams.pageNum = 1;
+        this.getList();
+      },
+      /**
+       * 重置按钮操作
+       * @returns {void}
+       */
+      resetQuery() {
+        this.resetForm('queryForm');
+        // 重置日期范围为最近半个月
+        const end = new Date();
+        const start = new Date();
+        start.setTime(start.getTime() - 3600 * 1000 * 24 * 15);
+        this.dateRange = [this.formatDate(start), this.formatDate(end)];
+        this.queryParams.startDate = this.dateRange[0];
+        this.queryParams.endDate = this.dateRange[1];
+        this.handleQuery();
+      },
+      /**
+       * 导出按钮操作
+       * @returns {void}
+       */
+      handleExport() {
+        this.$confirm('是否确认导出所有工厂门店统计数据项?', '警告', {
+          confirmButtonText: '确定',
+          cancelButtonText: '取消',
+          type: 'warning'
+        }).then(() => {
+          this.download('/mapi/settlement/factory/statistics/export/bystore', {
+            ...this.queryParams
+          }, `工厂门店报表统计_${new Date().getTime()}.xlsx`);
+        });
+      }
+    }
+  };
+  </script>
+  
+  <style scoped>
+  .mb8 {
+    margin-bottom: 8px;
+  }
+  .card-body {
+    font-size: 24px;
+    font-weight: bold;
+    text-align: center;
+    color: #409EFF;
+  }
+  </style>
+  

+ 282 - 319
admin-ui/src/views/recharge/batchRecord/index.vue

@@ -1,190 +1,146 @@
 <template>
-    <div class="app-container">
-        <el-card class="box-card" shadow="never">
-            <el-form :model="queryParams" ref="queryForm" @submit.native.prevent :inline="true" v-show="showSearch" label-width="100px">
-                <el-form-item label="批次号" prop="batchNo">
-                    <el-input
-                        v-model="queryParams.batchNo"
-                        placeholder="请输入批次号"
-                        clearable
-                        prefix-icon="el-icon-document"
-                        style="width: 240px"
-                        @keyup.enter.native="handleQuery"
-                    />
-                </el-form-item>
-                <el-form-item label="批次名称" prop="batchName">
-                    <el-input
-                        v-model="queryParams.batchName"
-                        placeholder="请输入批次名称"
-                        clearable
-                        prefix-icon="el-icon-search"
-                        style="width: 240px"
-                        @keyup.enter.native="handleQuery"
-                    />
-                </el-form-item>
-              <el-form-item label="企业名称" prop="batchName">
-                <el-input
-                  v-model="queryParams.companyName"
-                  placeholder="请输入企业名称"
-                  clearable
-                  prefix-icon="el-icon-search"
-                  style="width: 240px"
-                  @keyup.enter.native="handleQuery"
-                />
-              </el-form-item>
-                <el-form-item label="过期时间" prop="lastExpireTime">
-                    <el-date-picker
-                        v-model="queryParams.lastExpireTime"
-                        type="daterange"
-                        range-separator="-"
-                        start-placeholder="开始日期"
-                        end-placeholder="结束日期"
-                        value-format="yyyy-MM-dd"
-                        style="width: 240px"
-                    />
-                </el-form-item>
-                <el-form-item>
-                    <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
-                    <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
-                </el-form-item>
-            </el-form>
-        </el-card>
+  <div class="app-container">
+    <el-card class="box-card" shadow="never">
+      <el-form :model="queryParams" ref="queryForm" @submit.native.prevent :inline="true" v-show="showSearch" label-width="100px">
+        <el-form-item label="批次号" prop="batchNo">
+          <el-input v-model="queryParams.batchNo" placeholder="请输入批次号" clearable prefix-icon="el-icon-document" style="width: 240px"
+            @keyup.enter.native="handleQuery" />
+        </el-form-item>
+        <el-form-item label="批次名称" prop="batchName">
+          <el-input v-model="queryParams.batchName" placeholder="请输入批次名称" clearable prefix-icon="el-icon-search" style="width: 240px"
+            @keyup.enter.native="handleQuery" />
+        </el-form-item>
 
-        <el-card class="box-card table-card" shadow="never">
-            <div slot="header" class="clearfix">
-                <el-row :gutter="10" class="mb8">
-                    <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-                </el-row>
-            </div>
+        <el-form-item label="所属企业" prop="companyName">
+          <el-select v-model="queryParams.companyName" placeholder="请选择企业" clearable>
+            <el-option v-for="company in companyData" :key="company.id" :label="company.name" :value="company.name" />
+          </el-select>
+        </el-form-item>
+        <el-form-item label="过期时间" prop="lastExpireTime">
+          <el-date-picker v-model="queryParams.lastExpireTime" type="daterange" range-separator="-" start-placeholder="开始日期" end-placeholder="结束日期"
+            value-format="yyyy-MM-dd" style="width: 240px" />
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" icon="el-icon-search" @click="handleQuery">搜索</el-button>
+          <el-button icon="el-icon-refresh" @click="resetQuery">重置</el-button>
+        </el-form-item>
+      </el-form>
+    </el-card>
 
-            <Page uri="/mapi/recharge/card/batchRecord/findPage" :request-params="queryParams" ref="pagination">
-                <el-table-column label="编号" align="center" prop="id" min-width="100" />
-                <el-table-column label="批次号" align="center" prop="batchNo" min-width="160" :show-overflow-tooltip="true" />
-                <el-table-column label="批次名称" align="center" prop="batchName" min-width="160" :show-overflow-tooltip="true" />
-                <el-table-column label="所属企业" align="center" prop="companyName" min-width="130" :show-overflow-tooltip="true" />
-                <el-table-column label="单卡实收金额" align="center" prop="actualAmount" min-width="130" :show-overflow-tooltip="true" />
-                <el-table-column label="备注" align="center" prop="remark" min-width="200" :show-overflow-tooltip="true" />
-                <el-table-column label="激活过期时间" align="center" prop="lastExpireTime" width="160">
-                    <template slot-scope="scope">
-                        <span>{{ parseTime(scope.row.lastExpireTime, '{y}-{m}-{d}') }}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column label="创建人" align="center" prop="createBy" width="120" />
-                <el-table-column label="创建时间" align="center" prop="createTime" width="160">
-                    <template slot-scope="scope">
-                        <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
-                    </template>
-                </el-table-column>
-                <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
-                    <template slot-scope="scope">
-<!--                        <el-button-->
-<!--                            type="text"-->
-<!--                            icon="el-icon-edit"-->
-<!--                            @click="handleUpdateExpireTime(scope.row)"-->
-<!--                            v-hasPermi="['recharge:batchRecord:edit']"-->
-<!--                        >修改过期时间</el-button>-->
-                        <el-button
-                            type="text"
-                            icon="el-icon-tickets"
-                            @click="handleCardDetail(scope.row)"
-                            v-hasPermi="['recharge:batchRecord:edit']"
-                        >充值卡明细</el-button>
-                        <el-divider direction="vertical" />
-                        <el-button
-                            type="text"
-                            icon="el-icon-document"
-                            @click="handleUseRecord(scope.row)"
-                            v-hasPermi="['recharge:batchRecord:edit']"
-                        >使用记录</el-button>
-                    </template>
-                </el-table-column>
-            </Page>
-        </el-card>
+    <el-card class="box-card table-card" shadow="never">
+      <div slot="header" class="clearfix">
+        <el-row :gutter="10" class="mb8">
+          <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+        </el-row>
+      </div>
+
+      <Page uri="/mapi/recharge/card/batchRecord/findPage" :request-params="queryParams" ref="pagination">
+        <el-table-column label="编号" align="center" prop="id" min-width="100" />
+        <el-table-column label="批次号" align="center" prop="batchNo" min-width="160" :show-overflow-tooltip="true" />
+        <el-table-column label="批次名称" align="center" prop="batchName" min-width="160" :show-overflow-tooltip="true" />
+        <el-table-column label="所属企业" align="center" prop="companyName" min-width="130" :show-overflow-tooltip="true" />
+        <el-table-column label="单卡实收金额" align="center" prop="actualAmount" min-width="130" :show-overflow-tooltip="true" />
+        <el-table-column label="备注" align="center" prop="remark" min-width="200" :show-overflow-tooltip="true" />
+        <el-table-column label="激活过期时间" align="center" prop="lastExpireTime" width="160">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.lastExpireTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="创建人" align="center" prop="createBy" width="120" />
+        <el-table-column label="创建时间" align="center" prop="createTime" width="160">
+          <template slot-scope="scope">
+            <span>{{ parseTime(scope.row.createTime, '{y}-{m}-{d}') }}</span>
+          </template>
+        </el-table-column>
+        <el-table-column label="操作" align="center" width="300" class-name="small-padding fixed-width">
+          <template slot-scope="scope">
+            <!--                        <el-button-->
+            <!--                            type="text"-->
+            <!--                            icon="el-icon-edit"-->
+            <!--                            @click="handleUpdateExpireTime(scope.row)"-->
+            <!--                            v-hasPermi="['recharge:batchRecord:edit']"-->
+            <!--                        >修改过期时间</el-button>-->
+            <el-button type="text" icon="el-icon-tickets" @click="handleCardDetail(scope.row)" v-hasPermi="['recharge:batchRecord:edit']">充值卡明细
+            </el-button>
+            <el-divider direction="vertical" />
+            <el-button type="text" icon="el-icon-document" @click="handleUseRecord(scope.row)" v-hasPermi="['recharge:batchRecord:edit']">使用记录
+            </el-button>
+          </template>
+        </el-table-column>
+      </Page>
+    </el-card>
 
-        <!-- 修改过期时间对话框 -->
-        <el-dialog
-            :title="title"
-            :visible.sync="open"
-            width="700px"
-            append-to-body
-            destroy-on-close
-            :close-on-click-modal="false"
-        >
-            <el-form ref="form" :model="form" :rules="rules" label-width="120px">
-                <el-card class="box-card" shadow="never">
-                    <div slot="header">
-                        <span>基本信息</span>
-                    </div>
-                    <el-descriptions :column="1" border>
-                        <el-descriptions-item>
-                            <template slot="label">批次号</template>
-                            {{ form.batchNo }}
-                        </el-descriptions-item>
-                        <el-descriptions-item>
-                            <template slot="label">批次名称</template>
-                            {{ form.batchName }}
-                        </el-descriptions-item>
-                    </el-descriptions>
+    <!-- 修改过期时间对话框 -->
+    <el-dialog :title="title" :visible.sync="open" width="700px" append-to-body destroy-on-close :close-on-click-modal="false">
+      <el-form ref="form" :model="form" :rules="rules" label-width="120px">
+        <el-card class="box-card" shadow="never">
+          <div slot="header">
+            <span>基本信息</span>
+          </div>
+          <el-descriptions :column="1" border>
+            <el-descriptions-item>
+              <template slot="label">批次号</template>
+              {{ form.batchNo }}
+            </el-descriptions-item>
+            <el-descriptions-item>
+              <template slot="label">批次名称</template>
+              {{ form.batchName }}
+            </el-descriptions-item>
+          </el-descriptions>
 
-                    <el-divider content-position="left">过期时间设置</el-divider>
+          <el-divider content-position="left">过期时间设置</el-divider>
 
-                    <el-form-item label="激活过期时间" prop="lastExpireTime">
-                        <el-date-picker
-                            v-model="form.lastExpireTime"
-                            type="date"
-                            placeholder="选择日期"
-                            value-format="yyyy-MM-dd"
-                            style="width: 100%"
-                        />
-                    </el-form-item>
-                </el-card>
+          <el-form-item label="激活过期时间" prop="lastExpireTime">
+            <el-date-picker v-model="form.lastExpireTime" type="date" placeholder="选择日期" value-format="yyyy-MM-dd" style="width: 100%" />
+          </el-form-item>
+        </el-card>
 
-                <el-card class="box-card permission-card" shadow="never">
-                    <div slot="header">
-                        <span>权限设置</span>
-                    </div>
-                    <el-row :gutter="20">
-                        <el-col :span="12">
-                            <el-form-item label="洗衣权限">
-                                <el-radio-group v-model="form.isSupportCloth">
-                                    <el-radio-button label="Y">有</el-radio-button>
-                                    <el-radio-button label="N">无</el-radio-button>
-                                </el-radio-group>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="12">
-                            <el-form-item label="商品权限">
-                                <el-radio-group v-model="form.isSupportGoods">
-                                    <el-radio-button label="Y">有</el-radio-button>
-                                    <el-radio-button label="N">无</el-radio-button>
-                                </el-radio-group>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="12">
-                            <el-form-item label="生活服务权限">
-                                <el-radio-group v-model="form.isSupportLife">
-                                    <el-radio-button label="Y">有</el-radio-button>
-                                    <el-radio-button label="N">无</el-radio-button>
-                                </el-radio-group>
-                            </el-form-item>
-                        </el-col>
-                        <el-col :span="12">
-                            <el-form-item label="汽车美容权限">
-                                <el-radio-group v-model="form.isSupportCar">
-                                    <el-radio-button label="Y">有</el-radio-button>
-                                    <el-radio-button label="N">无</el-radio-button>
-                                </el-radio-group>
-                            </el-form-item>
-                        </el-col>
-                    </el-row>
-                </el-card>
-            </el-form>
-            <div slot="footer" class="dialog-footer">
-                <el-button type="primary" @click="submitForm">确 定</el-button>
-                <el-button @click="cancel">取 消</el-button>
-            </div>
-        </el-dialog>
-    </div>
+        <el-card class="box-card permission-card" shadow="never">
+          <div slot="header">
+            <span>权限设置</span>
+          </div>
+          <el-row :gutter="20">
+            <el-col :span="12">
+              <el-form-item label="洗衣权限">
+                <el-radio-group v-model="form.isSupportCloth">
+                  <el-radio-button label="Y">有</el-radio-button>
+                  <el-radio-button label="N">无</el-radio-button>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="商品权限">
+                <el-radio-group v-model="form.isSupportGoods">
+                  <el-radio-button label="Y">有</el-radio-button>
+                  <el-radio-button label="N">无</el-radio-button>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="生活服务权限">
+                <el-radio-group v-model="form.isSupportLife">
+                  <el-radio-button label="Y">有</el-radio-button>
+                  <el-radio-button label="N">无</el-radio-button>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :span="12">
+              <el-form-item label="汽车美容权限">
+                <el-radio-group v-model="form.isSupportCar">
+                  <el-radio-button label="Y">有</el-radio-button>
+                  <el-radio-button label="N">无</el-radio-button>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-card>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitForm">确 定</el-button>
+        <el-button @click="cancel">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
 </template>
 
 <script>
@@ -192,151 +148,158 @@ import { findBatchRecordPage, getOneByBatchNo, updateExpireTimeByBatchNo, update
 import { getGoods } from '@/api/core/goods'
 
 export default {
-    name: 'BatchRecord',
-    data() {
-        return {
-            // 遮罩层
-            loading: true,
-            // 选中数组
-            ids: [],
-            // 非单个禁用
-            single: true,
-            // 非多个禁用
-            multiple: true,
-            // 显示搜索条件
-            showSearch: true,
-            // 总条数
-            total: 0,
-            // 充值批次记录表格数据
-            batchRecordList: [],
-            // 弹出层标题
-            title: '',
-            // 是否显示弹出层
-            open: false,
-            // 查询参数
-            queryParams: {
-                batchNo: null,
-                batchName: null,
-                lastExpireTime: null,
-                lastUseLevel: null
-            },
-            // 表单参数
-            form: {},
-            // 表单校验
-            rules: {
-                lastExpireTime: [{ required: true, message: '到期时间不能为空', trigger: 'blur' }]
-            }
-        }
+  name: 'BatchRecord',
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 选中数组
+      ids: [],
+      // 非单个禁用
+      single: true,
+      // 非多个禁用
+      multiple: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 充值批次记录表格数据
+      companyData: [],
+      batchRecordList: [],
+      // 弹出层标题
+      title: '',
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        batchNo: null,
+        batchName: null,
+        lastExpireTime: null,
+        lastUseLevel: null
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+        lastExpireTime: [{ required: true, message: '到期时间不能为空', trigger: 'blur' }]
+      }
+    }
+  },
+  created() {
+    this.getList()
+    this.getCompanyData()
+  },
+  methods: {
+    getCompanyData() {
+      this.getGroupData("company_info").then((res) => {
+        this.companyData = res.data
+      })
+    },
+    /** 查询充值批次记录列表 */
+    getList() {
+      this.$nextTick(() => {
+        this.$refs.pagination.handleSearch(true)
+      })
+    },
+    // 取消按钮
+    cancel() {
+      this.open = false
+      this.reset()
+    },
+    // 表单重置
+    reset() {
+      this.form = {
+        id: null,
+        batchNo: null,
+        batchName: null,
+        lastExpireTime: null,
+        lastUseLevel: null,
+        createById: null,
+        createBy: null,
+        createTime: null,
+        updateById: null,
+        updateBy: null,
+        updateTime: null,
+        remark: null
+      }
+      this.resetForm('form')
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.getList()
     },
-    created() {
-        this.getList()
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm('queryForm')
+      this.handleQuery()
     },
-    methods: {
-        /** 查询充值批次记录列表 */
-        getList() {
-            this.$nextTick(() => {
-                this.$refs.pagination.handleSearch(true)
-            })
-        },
-        // 取消按钮
-        cancel() {
+    // 多选框选中数据
+    handleSelectionChange(selection) {
+      this.ids = selection.map((item) => item.id)
+      this.single = selection.length !== 1
+      this.multiple = !selection.length
+    },
+    /** 过期时间按钮操作 */
+    handleUpdateExpireTime(row) {
+      getOneByBatchNo(row.batchNo).then((response) => {
+        this.form = response.data
+        this.open = true
+        this.title = '修改批次号信息'
+      })
+    },
+    /** 使用情况按钮操作 */
+    handleUseRecord(row) {
+      this.$tab.openPage(row.batchName + '批次的使用情况', '/recharge/useRecord/' + row.batchNo)
+    },
+    /** 卡明细按钮操作 */
+    handleCardDetail(row) {
+      this.$tab.openPage(row.batchName + '批次的充值卡明细', '/recharge/cardDetail/' + row.batchNo)
+    },
+    handleUpdateUseLevel(row) {
+      var form = { batchNo: row.batchNo, useLevel: row.lastUseLevel }
+      let text = row.lastUseLevel == '1' ? '启用' : '停用'
+      this.$confirm('确认要' + text + ' ' + row.batchName + ' 优先扣款吗?')
+        .then(function () {
+          return updateUseLevelByBatchNo(form)
+        })
+        .then(() => {
+          this.$modal.msgSuccess(text + '成功')
+        })
+        .catch(function () {
+          row.status = row.status == '0' ? '1' : '0'
+        })
+    },
+    /** 提交按钮 */
+    submitForm() {
+      this.$refs['form'].validate((valid) => {
+        if (valid) {
+          var params = {
+            batchNo: this.form.batchNo,
+            expireTime: this.form.lastExpireTime,
+            useLevel: this.form.lastUseLevel,
+            starLevel: this.form.starLevel,
+            isSupportCloth: this.form.isSupportCloth,
+            isSupportGoods: this.form.isSupportGoods,
+            isSupportLife: this.form.isSupportLife,
+            isSupportCar: this.form.isSupportLife
+          }
+          updateExpireTimeByBatchNo(params).then((response) => {
+            this.$modal.msgSuccess('修改成功')
             this.open = false
-            this.reset()
-        },
-        // 表单重置
-        reset() {
-            this.form = {
-                id: null,
-                batchNo: null,
-                batchName: null,
-                lastExpireTime: null,
-                lastUseLevel: null,
-                createById: null,
-                createBy: null,
-                createTime: null,
-                updateById: null,
-                updateBy: null,
-                updateTime: null,
-                remark: null
-            }
-            this.resetForm('form')
-        },
-        /** 搜索按钮操作 */
-        handleQuery() {
             this.getList()
-        },
-        /** 重置按钮操作 */
-        resetQuery() {
-            this.resetForm('queryForm')
-            this.handleQuery()
-        },
-        // 多选框选中数据
-        handleSelectionChange(selection) {
-            this.ids = selection.map((item) => item.id)
-            this.single = selection.length !== 1
-            this.multiple = !selection.length
-        },
-        /** 过期时间按钮操作 */
-        handleUpdateExpireTime(row) {
-            getOneByBatchNo(row.batchNo).then((response) => {
-                this.form = response.data
-                this.open = true
-                this.title = '修改批次号信息'
-            })
-        },
-        /** 使用情况按钮操作 */
-        handleUseRecord(row) {
-            this.$tab.openPage(row.batchName + '批次的使用情况', '/recharge/useRecord/' + row.batchNo)
-        },
-        /** 卡明细按钮操作 */
-        handleCardDetail(row) {
-            this.$tab.openPage(row.batchName + '批次的充值卡明细', '/recharge/cardDetail/' + row.batchNo)
-        },
-        handleUpdateUseLevel(row) {
-            var form = { batchNo: row.batchNo, useLevel: row.lastUseLevel }
-            let text = row.lastUseLevel == '1' ? '启用' : '停用'
-            this.$confirm('确认要' + text + ' ' + row.batchName + ' 优先扣款吗?')
-                .then(function () {
-                    return updateUseLevelByBatchNo(form)
-                })
-                .then(() => {
-                    this.$modal.msgSuccess(text + '成功')
-                })
-                .catch(function () {
-                    row.status = row.status == '0' ? '1' : '0'
-                })
-        },
-        /** 提交按钮 */
-        submitForm() {
-            this.$refs['form'].validate((valid) => {
-                if (valid) {
-                    var params = {
-                        batchNo: this.form.batchNo,
-                        expireTime: this.form.lastExpireTime,
-                        useLevel: this.form.lastUseLevel,
-                        starLevel: this.form.starLevel,
-                        isSupportCloth: this.form.isSupportCloth,
-                        isSupportGoods: this.form.isSupportGoods,
-                        isSupportLife: this.form.isSupportLife,
-                        isSupportCar: this.form.isSupportLife
-                    }
-                    updateExpireTimeByBatchNo(params).then((response) => {
-                        this.$modal.msgSuccess('修改成功')
-                        this.open = false
-                        this.getList()
-                    })
-                }
-            })
-        },
-        checkClose(done) {
-            this.$confirm('是否关闭表单,关闭后数据将丢失?')
-                .then(function () {
-                    done()
-                })
-                .then(() => {})
-                .catch(() => {})
+          })
         }
+      })
+    },
+    checkClose(done) {
+      this.$confirm('是否关闭表单,关闭后数据将丢失?')
+        .then(function () {
+          done()
+        })
+        .then(() => { })
+        .catch(() => { })
     }
+  }
 }
 </script>
 

+ 11 - 9
admin-ui/src/views/recharge/card/index.vue

@@ -10,15 +10,10 @@
           <el-input v-model="queryParams.batchNo" placeholder="请输入批次号" clearable prefix-icon="el-icon-tickets" style="width: 240px"
             @keyup.enter.native="handleQuery" />
         </el-form-item>
-        <el-form-item label="企业名称" prop="batchName">
-          <el-input
-            v-model="queryParams.companyName"
-            placeholder="请输入企业名称"
-            clearable
-            prefix-icon="el-icon-search"
-            style="width: 240px"
-            @keyup.enter.native="handleQuery"
-          />
+        <el-form-item label="所属企业" prop="companyName">
+          <el-select v-model="queryParams.companyName" placeholder="请选择企业" clearable>
+            <el-option v-for="company in companyData" :key="company.id" :label="company.name" :value="company.name" />
+          </el-select>
         </el-form-item>
         <el-form-item label="订单号" prop="orderNo">
           <el-input v-model="queryParams.orderNo" placeholder="请输入充值订单号" clearable prefix-icon="el-icon-document" style="width: 240px"
@@ -249,6 +244,7 @@ export default {
       daterangeCreateTime: [],
       // 赠送积分时间范围
       daterangeGiveActiveTime: [],
+      companyData: [],
       // 查询参数
       queryParams: {
         cardNo: null,
@@ -340,6 +336,7 @@ export default {
   },
   created() {
     this.getList()
+    this.getCompanyData()
   },
   methods: {
     handleTitle(detail) {
@@ -423,6 +420,11 @@ export default {
     /** 搜索按钮操作 */
     handleQuery() {
       this.getList()
+    },
+        getCompanyData() {
+      this.getGroupData("company_info").then((res) => {
+        this.companyData = res.data
+      })
     },
     /** 重置按钮操作 */
     resetQuery() {

+ 1 - 1
yiqi-admin/src/main/java/com/yiqi/admin/controller/order/OrderGoodsController.java

@@ -95,7 +95,7 @@ public class OrderGoodsController extends BaseController {
     }
 
     /**
-     * 获取零售商品订单详细信息
+     * 获取零售商品订单详细信息1
      */
     @GetMapping(value = "/{id}")
     @ApiOperation(value = "获取零售商品订单详细信息")

+ 69 - 0
yiqi-common/src/main/java/com/yiqi/core/domain/SettlementStoreClothStatistics.java

@@ -69,6 +69,75 @@ public class SettlementStoreClothStatistics implements Serializable {
     @Excel(name = "当日入厂衣服金额")
     @ApiModelProperty("当日入厂衣服金额")
     private BigDecimal dailyInFactoryAmount;
+    /**
+     * 收衣订单数
+     */
+    @Excel(name = "收衣订单数")
+    @ApiModelProperty("收衣订单数")
+    private Integer receiveOrderCount;
+
+    /**
+     * 收衣总件数
+     */
+    @Excel(name = "收衣总件数")
+    @ApiModelProperty("收衣总件数")
+    private Integer receiveTotalQuantity;
+
+    /**
+     * 收衣订单总金额
+     */
+    @Excel(name = "收衣订单总金额")
+    @ApiModelProperty("收衣订单总金额")
+    private BigDecimal receiveTotalAmount;
+
+    /**
+     * 收衣未支付订单数
+     */
+    @Excel(name = "收衣未支付订单数")
+    @ApiModelProperty("收衣未支付订单数")
+    private Integer receiveUnpaidOrderCount;
+
+    /**
+     * 收衣未支付订单金额
+     */
+    @Excel(name = "收衣未支付订单金额")
+    @ApiModelProperty("收衣未支付订单金额")
+    private BigDecimal receiveUnpaidAmount;
+
+    /**
+     * 取衣订单数
+     */
+    @Excel(name = "取衣订单数")
+    @ApiModelProperty("取衣订单数")
+    private Integer pickupOrderCount;
+
+    /**
+     * 取衣总件数
+     */
+    @Excel(name = "取衣总件数")
+    @ApiModelProperty("取衣总件数")
+    private Integer pickupTotalQuantity;
+
+    /**
+     * 取衣订单总金额
+     */
+    @Excel(name = "取衣订单总金额")
+    @ApiModelProperty("取衣订单总金额")
+    private BigDecimal pickupTotalAmount;
+
+    /**
+     * 取衣已支付订单数
+     */
+    @Excel(name = "取衣已支付订单数")
+    @ApiModelProperty("取衣已支付订单数")
+    private Integer pickupPaidOrderCount;
+
+    /**
+     * 取衣已支付订单金额
+     */
+    @Excel(name = "取衣已支付订单金额")
+    @ApiModelProperty("取衣已支付订单金额")
+    private BigDecimal pickupPaidAmount;
 
     /**
      * 当日入厂衣服数量

+ 7 - 0
yiqi-common/src/main/java/com/yiqi/order/domain/dto/OrderClothItemQueryDTO.java

@@ -22,6 +22,13 @@ public class OrderClothItemQueryDTO implements Serializable {
      * **/
     private String orderStatus;
 
+
+    /**
+     * 是否重洗
+     *
+     * **/
+    private String repeatWash;
+
     /**
      * 超时状态 (1 超时  2 超时3天 3:超时5天)
      */

+ 70 - 0
yiqi-common/src/main/java/com/yiqi/order/domain/dto/SettlementFactoryStatisticsDto.java

@@ -90,4 +90,74 @@ public class SettlementFactoryStatisticsDto implements Serializable {
     @Excel(name = "当日实际结算金额")
     @ApiModelProperty("当日实际结算金额")
     private BigDecimal dailyActualSettlementAmount;
+
+    /**
+     * 收衣订单数
+     */
+    @Excel(name = "收衣订单数")
+    @ApiModelProperty("收衣订单数")
+    private Integer receiveOrderCount;
+
+    /**
+     * 收衣总件数
+     */
+    @Excel(name = "收衣总件数")
+    @ApiModelProperty("收衣总件数")
+    private Integer receiveTotalQuantity;
+
+    /**
+     * 收衣订单总金额
+     */
+    @Excel(name = "收衣订单总金额")
+    @ApiModelProperty("收衣订单总金额")
+    private BigDecimal receiveTotalAmount;
+
+    /**
+     * 收衣未支付订单数
+     */
+    @Excel(name = "收衣未支付订单数")
+    @ApiModelProperty("收衣未支付订单数")
+    private Integer receiveUnpaidOrderCount;
+
+    /**
+     * 收衣未支付订单金额
+     */
+    @Excel(name = "收衣未支付订单金额")
+    @ApiModelProperty("收衣未支付订单金额")
+    private BigDecimal receiveUnpaidAmount;
+
+    /**
+     * 取衣订单数
+     */
+    @Excel(name = "取衣订单数")
+    @ApiModelProperty("取衣订单数")
+    private Integer pickupOrderCount;
+
+    /**
+     * 取衣总件数
+     */
+    @Excel(name = "取衣总件数")
+    @ApiModelProperty("取衣总件数")
+    private Integer pickupTotalQuantity;
+
+    /**
+     * 取衣订单总金额
+     */
+    @Excel(name = "取衣订单总金额")
+    @ApiModelProperty("取衣订单总金额")
+    private BigDecimal pickupTotalAmount;
+
+    /**
+     * 取衣已支付订单数
+     */
+    @Excel(name = "取衣已支付订单数")
+    @ApiModelProperty("取衣已支付订单数")
+    private Integer pickupPaidOrderCount;
+
+    /**
+     * 取衣已支付订单金额
+     */
+    @Excel(name = "取衣已支付订单金额")
+    @ApiModelProperty("取衣已支付订单金额")
+    private BigDecimal pickupPaidAmount;
 } 

+ 106 - 3
yiqi-core/src/main/java/com/yiqi/core/service/impl/SettlementFactoryStatisticsServiceImpl.java

@@ -4,14 +4,18 @@ import cn.hutool.core.bean.BeanUtil;
 import cn.hutool.core.collection.CollUtil;
 import cn.hutool.core.date.DateUtil;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.yiqi.common.enums.ClothOrderStatusType;
+import com.yiqi.common.enums.SourceType;
 import com.yiqi.common.enums.StatusType;
 import com.yiqi.common.utils.DateUtils;
 import com.yiqi.core.domain.SettlementStoreClothStatistics;
 import com.yiqi.core.service.ISettlementStoreClothStatisticsService;
+import com.yiqi.order.domain.OrderCloth;
 import com.yiqi.order.domain.dto.SettlementFactoryStatisticsDto;
 import com.yiqi.core.service.ISettlementFactoryStatisticsService;
 import com.yiqi.order.domain.OrderClothItem;
 import com.yiqi.order.service.IOrderClothItemService;
+import com.yiqi.order.service.IOrderClothService;
 import com.yiqi.settlement.service.ISettlementFactoryRateService;
 import com.yiqi.system.domain.SysStore;
 import com.yiqi.system.service.IManageFactoryService;
@@ -35,6 +39,9 @@ import java.util.stream.Collectors;
 @Service
 public class SettlementFactoryStatisticsServiceImpl implements ISettlementFactoryStatisticsService {
 
+    @Autowired
+    private IOrderClothService orderClothService;
+
     @Autowired
     private IOrderClothItemService orderClothItemService;
 
@@ -64,7 +71,7 @@ public class SettlementFactoryStatisticsServiceImpl implements ISettlementFactor
         for (SysStore store : storeList) {
             SettlementFactoryStatisticsDto settlementFactoryStatisticsDto =
                     generateTotalFactoryStatistics(store.getFactoryId(), store.getId(), DateUtils.getStartTime(date), DateUtils.getEndTime(date));
-            SettlementStoreClothStatistics statistics = new SettlementStoreClothStatistics();
+            SettlementStoreClothStatistics statistics = generateTotalClothStatistics(store.getFactoryId(), store.getId(), date);
             BeanUtil.copyProperties(settlementFactoryStatisticsDto, statistics);
             statistics.setId(null);
             statistics.setFactoryId(store.getFactoryId());
@@ -122,7 +129,7 @@ public class SettlementFactoryStatisticsServiceImpl implements ISettlementFactor
             statistics.setStoreName(store.getName());
             statisticsList.add(statistics);
         }
-        statisticsList.sort(Comparator.comparing(SettlementFactoryStatisticsDto::getDailyInFactoryAmount, Comparator.reverseOrder()));
+        statisticsList.sort(Comparator.comparing(SettlementFactoryStatisticsDto::getReceiveOrderCount, Comparator.reverseOrder()));
         return statisticsList;
     }
 
@@ -130,7 +137,7 @@ public class SettlementFactoryStatisticsServiceImpl implements ISettlementFactor
     public SettlementFactoryStatisticsDto generateTotalFactoryStatistics(Long factoryId, Long storeId, Date start, Date end) {
         // 1. 查询指定日期范围内的所有订单衣服记录
         QueryWrapper<OrderClothItem> queryWrapper = new QueryWrapper<>();
-        queryWrapper.eq( "factory_id", factoryId)
+        queryWrapper.eq("factory_id", factoryId)
                 .eq(storeId != null, "org_id", storeId)
                 .ge("flow_status", 1)
                 .ge("in_factory_time", DateUtils.addDays(start, -2))
@@ -194,4 +201,100 @@ public class SettlementFactoryStatisticsServiceImpl implements ISettlementFactor
 
         return statistics;
     }
+
+    /**
+     * 生成取收衣统计
+     *
+     * @param factoryId 工厂ID
+     * @param storeId 门店ID
+     * @param date 统计日期
+     * @return SettlementStoreClothStatistics 统计结果
+     */
+    public SettlementStoreClothStatistics generateTotalClothStatistics(Long factoryId, Long storeId, Date date) {
+        // 统计结果对象
+        SettlementStoreClothStatistics statistics = new SettlementStoreClothStatistics();
+
+        // 1. 收衣相关(set_price_time为当日)
+        Date startOfDay = DateUtils.getStartTime(date);
+        Date endOfDay = DateUtils.getEndTime(date);
+
+        QueryWrapper<OrderCloth> receiveOrderWrapper = new QueryWrapper<>();
+        receiveOrderWrapper.eq("factory_id", factoryId)
+                .eq("org_id", storeId)
+                .eq("del_flag", "0")
+                .ge("set_price_time", startOfDay)
+                .le("set_price_time", endOfDay)
+                .ge("create_time", DateUtils.addDays(startOfDay, -5));
+
+        List<OrderCloth> receiveOrders = orderClothService.list(receiveOrderWrapper);
+
+        // 收衣订单数
+        statistics.setReceiveOrderCount(receiveOrders.size());
+        // 收衣总件数
+        int receiveTotalQuantity = receiveOrders.stream()
+                .mapToInt(o -> o.getOrderClothCount() == null ? 0 : o.getOrderClothCount())
+                .sum();
+        statistics.setReceiveTotalQuantity(receiveTotalQuantity);
+        // 收衣订单总金额
+        BigDecimal receiveTotalAmount = receiveOrders.stream()
+                .map(o -> o.getOrderAmount() == null ? BigDecimal.ZERO : o.getOrderAmount())
+                .reduce(BigDecimal.ZERO, BigDecimal::add);
+        statistics.setReceiveTotalAmount(receiveTotalAmount);
+        // 收衣未支付订单数
+        List<OrderCloth> receiveUnpaidOrders = receiveOrders.stream()
+                .filter(o -> o.getPayTime() == null)
+                .collect(Collectors.toList());
+        statistics.setReceiveUnpaidOrderCount(receiveUnpaidOrders.size());
+        // 收衣未支付订单金额
+        BigDecimal receiveUnpaidAmount = receiveUnpaidOrders.stream()
+                .map(o -> o.getOrderAmount() == null ? BigDecimal.ZERO : o.getOrderAmount())
+                .reduce(BigDecimal.ZERO, BigDecimal::add);
+        statistics.setReceiveUnpaidAmount(receiveUnpaidAmount);
+
+        // 2. 取衣相关(OrderClothItem.take_cloth_time为当日)
+        QueryWrapper<OrderClothItem> pickupItemWrapper = new QueryWrapper<>();
+        pickupItemWrapper.eq("factory_id", factoryId)
+                .eq("org_id", storeId)
+                .eq("del_flag", "0")
+                .ge("take_cloth_time", startOfDay)
+                .le("take_cloth_time", endOfDay)
+                .ge("create_time", DateUtils.addDays(startOfDay, -10));
+
+        List<OrderClothItem> pickupItems = orderClothItemService.list(pickupItemWrapper);
+
+        // 取衣总件数
+        statistics.setPickupTotalQuantity(pickupItems.size());
+        // 取衣订单ID集合
+        Set<Long> pickupOrderIds = pickupItems.stream()
+                .map(OrderClothItem::getOrderId)
+                .filter(Objects::nonNull)
+                .collect(Collectors.toSet());
+        // 取衣订单数
+        statistics.setPickupOrderCount(pickupOrderIds.size());
+
+        // 查询这些订单
+        List<OrderCloth> pickupOrders = new ArrayList<>();
+        if (!pickupOrderIds.isEmpty()) {
+            pickupOrders = orderClothService.list(new QueryWrapper<OrderCloth>().in("id", pickupOrderIds));
+        }
+        // 取衣订单总金额
+        BigDecimal pickupTotalAmount = pickupOrders.stream()
+                .map(o -> o.getOrderAmount() == null ? BigDecimal.ZERO : o.getOrderAmount())
+                .reduce(BigDecimal.ZERO, BigDecimal::add);
+        statistics.setPickupTotalAmount(pickupTotalAmount);
+
+        // 取衣已支付订单(pay_time_type=1 且 pay_time为当日)
+        List<OrderCloth> pickupPaidOrders = pickupOrders.stream()
+                .filter(o -> "1".equals(o.getPayTimeType())
+                        && o.getPayTime() != null
+                        && !o.getPayTime().before(startOfDay)
+                        && !o.getPayTime().after(endOfDay))
+                .collect(Collectors.toList());
+        statistics.setPickupPaidOrderCount(pickupPaidOrders.size());
+        BigDecimal pickupPaidAmount = pickupPaidOrders.stream()
+                .map(o -> o.getOrderAmount() == null ? BigDecimal.ZERO : o.getOrderAmount())
+                .reduce(BigDecimal.ZERO, BigDecimal::add);
+        statistics.setPickupPaidAmount(pickupPaidAmount);
+        return statistics;
+    }
 }

+ 33 - 5
yiqi-core/src/main/resources/mapper/core/SettlementStoreClothStatisticsMapper.xml

@@ -14,9 +14,23 @@
         COALESCE(SUM(daily_out_factory_count), 0) AS dailyOutFactoryCount,
         COALESCE(SUM(daily_refund_count), 0) AS dailyRefundCount,
         COALESCE(SUM(daily_refund_amount), 0) AS dailyRefundAmount,
-        COALESCE(SUM(daily_actual_settlement_amount), 0) AS dailyActualSettlementAmount
+        COALESCE(SUM(daily_actual_settlement_amount), 0) AS dailyActualSettlementAmount,
+        COALESCE(SUM(receive_order_count), 0) AS receiveOrderCount,
+        COALESCE(SUM(receive_total_quantity), 0) AS receiveTotalQuantity,
+        COALESCE(SUM(receive_total_amount), 0) AS receiveTotalAmount,
+        COALESCE(SUM(receive_unpaid_order_count), 0) AS receiveUnpaidOrderCount,
+        COALESCE(SUM(receive_unpaid_amount), 0) AS receiveUnpaidAmount,
+
+        COALESCE(SUM(pickup_order_count), 0) AS pickupOrderCount,
+        COALESCE(SUM(pickup_total_quantity), 0) AS pickupTotalQuantity,
+        COALESCE(SUM(pickup_total_amount), 0) AS pickupTotalAmount,
+        COALESCE(SUM(pickup_paid_order_count), 0) AS pickupPaidOrderCount,
+        COALESCE(SUM(pickup_paid_amount), 0) AS pickupPaidAmount
         from settlement_store_cloth_statistics
-        where factory_id = #{factoryId}
+        where 1=1
+        <if test="factoryId != null and factoryId != ''">
+            and factory_id = #{factoryId}
+        </if>
          <if test="storeId != null and storeId != ''">
              and store_id = #{storeId}
          </if>
@@ -62,9 +76,23 @@
         COALESCE(SUM(daily_out_factory_count), 0) AS dailyOutFactoryCount,
         COALESCE(SUM(daily_refund_count), 0) AS dailyRefundCount,
         COALESCE(SUM(daily_refund_amount), 0) AS dailyRefundAmount,
-        COALESCE(SUM(daily_actual_settlement_amount), 0) AS dailyActualSettlementAmount
+        COALESCE(SUM(daily_actual_settlement_amount), 0) AS dailyActualSettlementAmount,
+        COALESCE(SUM(receive_order_count), 0) AS receiveOrderCount,
+        COALESCE(SUM(receive_total_quantity), 0) AS receiveTotalQuantity,
+        COALESCE(SUM(receive_total_amount), 0) AS receiveTotalAmount,
+        COALESCE(SUM(receive_unpaid_order_count), 0) AS receiveUnpaidOrderCount,
+        COALESCE(SUM(receive_unpaid_amount), 0) AS receiveUnpaidAmount,
+
+        COALESCE(SUM(pickup_order_count), 0) AS pickupOrderCount,
+        COALESCE(SUM(pickup_total_quantity), 0) AS pickupTotalQuantity,
+        COALESCE(SUM(pickup_total_amount), 0) AS pickupTotalAmount,
+        COALESCE(SUM(pickup_paid_order_count), 0) AS pickupPaidOrderCount,
+        COALESCE(SUM(pickup_paid_amount), 0) AS pickupPaidAmount
         from settlement_store_cloth_statistics
-        where factory_id = #{factoryId}
+        where 1 = 1
+        <if test="factoryId != null and factoryId != ''">
+            and factory_id = #{factoryId}
+        </if>
         <if test="storeId != null and storeId != ''">
             and store_id = #{storeId}
         </if>
@@ -74,7 +102,7 @@
         <if test="end != null and end != ''">
             and day &lt;= #{end}
         </if>
-        group by store_id order by dailyInFactoryAmount desc
+        group by store_id order by receiveOrderCount desc
     </select>
 
     <select id="totalByConditionByDate" resultType="com.yiqi.order.domain.dto.SettlementFactoryStatisticsDto">

+ 5 - 2
yiqi-core/src/main/resources/mapper/order/OrderClothItemMapper.xml

@@ -633,8 +633,11 @@
         <if test="beginTakeClothTime !=null">
             and cl.take_cloth_time  between #{beginTakeClothTime} and #{endTakeClothTime}
         </if>
-        <if test="flowStatus != null">
-            and item.flow_status = #{flowStatus}
+        <if test="repeatWash != null and repeatWash == 1 ">
+            and item.repeat_count > 0
+        </if>
+        <if test="repeatWash != null and repeatWash == 0 ">
+            and item.repeat_count = 0
         </if>
         <if test="orderStatus != null">
             and cl.order_status = #{orderStatus}