|
@@ -11,180 +11,165 @@
|
|
|
<text class="header-sit-text">关联订单</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="tui-header-tabs day clearfix" :style="{ top: CustomBar + 6 + 'px' }">
|
|
|
- <view v-if="!isShowHeader">
|
|
|
- <view class="tui-header-top">
|
|
|
- <view class="title"> 收款信息 </view>
|
|
|
- <view class="tui-header-button">
|
|
|
- <!-- <view class="button btn-confirm" @click.stop="btnConfirm"> 设为非订单款项 </view> -->
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="tui-header-item">
|
|
|
- <view class="list-title-t">
|
|
|
- <view class="list-title-tip">
|
|
|
- <text class="badges">{{ receiptInfo.receiptType | formatSourceType }}</text>
|
|
|
+ <tui-skeleton
|
|
|
+ v-if="skeletonShow"
|
|
|
+ backgroundColor="#fafafa"
|
|
|
+ borderRadius="10rpx"
|
|
|
+ :isLoading="true"
|
|
|
+ :loadingType="7"
|
|
|
+ ></tui-skeleton>
|
|
|
+ <view class="container-content" v-else>
|
|
|
+ <view class="tui-header-tabs day clearfix" :style="{ top: CustomBar + 6 + 'px' }">
|
|
|
+ <view v-if="!isShowHeader">
|
|
|
+ <view class="tui-header-top">
|
|
|
+ <view class="title"> 收款信息 </view>
|
|
|
+ <view class="tui-header-button">
|
|
|
+ <!-- <view class="button btn-confirm" @click.stop="btnConfirm"> 设为非订单款项 </view> -->
|
|
|
</view>
|
|
|
- <view class="list-title-num" :style="{ color: formatColor(receiptInfo.receiptStatus) }">{{
|
|
|
- receiptInfo.receiptStatus | formatStateType
|
|
|
- }}</view>
|
|
|
</view>
|
|
|
- <view class="list-title-b">
|
|
|
- <view class="list-title-b-item ">
|
|
|
- 收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }} </text>
|
|
|
+ <view class="tui-header-item">
|
|
|
+ <view class="list-title-t">
|
|
|
+ <view class="list-title-tip">
|
|
|
+ <text class="badges">{{ receiptInfo.receiptType | formatSourceType }}</text>
|
|
|
+ </view>
|
|
|
+ <view class="list-title-num" :style="{ color: formatColor(receiptInfo.receiptStatus) }">{{
|
|
|
+ receiptInfo.receiptStatus | formatStateType
|
|
|
+ }}</view>
|
|
|
</view>
|
|
|
- <view class="list-title-b-item ">
|
|
|
- 收款类型:<text class="text">{{ receiptInfo.payTypeText }}</text>
|
|
|
+ <view class="list-title-b">
|
|
|
+ <view class="list-title-b-item ">
|
|
|
+ 收款金额:<text class="text">¥{{ receiptInfo.receiptAmount | NumFormat }} </text>
|
|
|
+ </view>
|
|
|
+ <view class="list-title-b-item ">
|
|
|
+ 收款类型:<text class="text">{{ receiptInfo.payTypeText }}</text>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="list-title-b">
|
|
|
- 收款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
|
|
|
- </view>
|
|
|
- <template v-if="receiptInfo.smsContent">
|
|
|
- <view class="list-title-b">收款短信:</view>
|
|
|
- <view class="list-title-b sms">
|
|
|
- <text class="text">{{ receiptInfo.smsContent }}</text>
|
|
|
+ <view class="list-title-b">
|
|
|
+ 收款时间:<text class="text">{{ receiptInfo.receiptDate }}</text>
|
|
|
</view>
|
|
|
- </template>
|
|
|
- <view class="list-icon" v-if="receiptInfo.tipMsg">{{ receiptInfo.tipMsg }}</view>
|
|
|
+ <template v-if="receiptInfo.smsContent">
|
|
|
+ <view class="list-title-b">收款短信:</view>
|
|
|
+ <view class="list-title-b sms">
|
|
|
+ <text class="text">{{ receiptInfo.smsContent }}</text>
|
|
|
+ </view>
|
|
|
+ </template>
|
|
|
+ <view class="list-icon" v-if="receiptInfo.tipMsg">
|
|
|
+ <image
|
|
|
+ class="list-icon-image"
|
|
|
+ src="https://static.caimei365.com/app/crm/image/icon-noconfirm@2x.png"
|
|
|
+ mode=""
|
|
|
+ v-if="receiptInfo.receiptStatus == 1"
|
|
|
+ ></image>
|
|
|
+ <image
|
|
|
+ class="list-icon-image"
|
|
|
+ src="https://static.caimei365.com/app/crm/image/icon-noaudit@2x.png"
|
|
|
+ mode=""
|
|
|
+ v-if="receiptInfo.receiptStatus == 2"
|
|
|
+ ></image>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="tui-header-tabmain">
|
|
|
- <input
|
|
|
- v-if="currents == 3"
|
|
|
- class="input"
|
|
|
- type="text"
|
|
|
- v-model="listQuery.keyword"
|
|
|
- confirm-type="search"
|
|
|
- @confirm="subMitSearch()"
|
|
|
- placeholder="搜索关键词(供应商名称)"
|
|
|
- />
|
|
|
- <input
|
|
|
- v-else
|
|
|
- class="input"
|
|
|
- type="text"
|
|
|
- v-model="listQuery.keyword"
|
|
|
- confirm-type="search"
|
|
|
- @confirm="subMitSearch()"
|
|
|
- placeholder="搜索关键词(客户名称/订单号)"
|
|
|
- />
|
|
|
- <text class="iconfont icon-sousuo"></text>
|
|
|
- </view>
|
|
|
- <view class="tui-header-tabmain">
|
|
|
- <view
|
|
|
- class="main-item one"
|
|
|
- v-for="(item, index) in listTabs"
|
|
|
- :key="index"
|
|
|
- :class="{ active: currents == index }"
|
|
|
- @click="tabClick(1, index)"
|
|
|
- >
|
|
|
- <view class="text">{{ item.name }}</view>
|
|
|
+ <view class="tui-header-tabmain">
|
|
|
+ <input
|
|
|
+ v-if="currents == 3"
|
|
|
+ class="input"
|
|
|
+ type="text"
|
|
|
+ v-model="refundListQuery.shopName"
|
|
|
+ confirm-type="search"
|
|
|
+ @confirm="subMitSearch(2)"
|
|
|
+ placeholder="搜索关键词(供应商名称)"
|
|
|
+ />
|
|
|
+ <input
|
|
|
+ v-else
|
|
|
+ class="input"
|
|
|
+ type="text"
|
|
|
+ v-model="listQuery.keyword"
|
|
|
+ confirm-type="search"
|
|
|
+ @confirm="subMitSearch(1)"
|
|
|
+ placeholder="搜索关键词(客户名称/订单号)"
|
|
|
+ />
|
|
|
+ <text class="iconfont icon-sousuo"></text>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="tui-header-tabmain day">
|
|
|
- <view
|
|
|
- class="main-item tab"
|
|
|
- v-for="(item, index) in listReturnType"
|
|
|
- :key="index"
|
|
|
- :class="{ tabActive: tabCurrents == index }"
|
|
|
- @click="tabClick(2, index)"
|
|
|
- >
|
|
|
- <view class="text">{{ item.name }}</view>
|
|
|
+ <view class="tui-header-tabmain">
|
|
|
+ <view
|
|
|
+ class="main-item one"
|
|
|
+ v-for="(item, index) in listTabs"
|
|
|
+ :key="index"
|
|
|
+ :class="{ active: currents == index }"
|
|
|
+ @click="tabClick(1, index)"
|
|
|
+ >
|
|
|
+ <view class="text">{{ item.name }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="tui-header-tabmain day">
|
|
|
+ <view
|
|
|
+ class="main-item tab"
|
|
|
+ v-for="(item, index) in listReturnType"
|
|
|
+ :key="index"
|
|
|
+ :class="{ tabActive: tabCurrents == index }"
|
|
|
+ @click="tabClick(2, index)"
|
|
|
+ >
|
|
|
+ <view class="text">{{ item.name }}</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view
|
|
|
- class="user-section"
|
|
|
- :style="{
|
|
|
- top: isIphoneX ? CustomBar + 330 + 'px' : CustomBar + 315 + 'px',
|
|
|
- left: 0 + 'px',
|
|
|
- paddingBottom: isIphoneX ? '178rpx' : '144rpx'
|
|
|
- }"
|
|
|
- >
|
|
|
- <view class="header-content">
|
|
|
- <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
|
|
|
- <!-- 空白页 -->
|
|
|
- <empty v-if="isEmpty" :typeIndex="currents" :navbarHeight="navbarHeight"></empty>
|
|
|
- <!-- 列表 -->
|
|
|
- <view v-else class="tui-order-content">
|
|
|
- <view class="tui-order-item" v-for="(order, payIndex) in payList" :key="payIndex">
|
|
|
- <view class="list-title" @click.stop="orderDetail(order.id)">
|
|
|
- <view class="list-title-t">
|
|
|
- <view class="list-title-tip">
|
|
|
- <text class="badges">{{ order.orderType | formatOrderType }}</text>
|
|
|
+ <view
|
|
|
+ class="user-section"
|
|
|
+ :style="{
|
|
|
+ top: isIphoneX ? CustomBar + 330 + 'px' : CustomBar + 315 + 'px',
|
|
|
+ left: 0 + 'px',
|
|
|
+ paddingBottom: isIphoneX ? '178rpx' : '144rpx'
|
|
|
+ }"
|
|
|
+ >
|
|
|
+ <view class="header-content">
|
|
|
+ <view :class="{ 'tui-order-list': scrollTop >= 0 }" class="clearfix">
|
|
|
+ <!-- 空白页 -->
|
|
|
+ <empty v-if="isEmpty" :typeIndex="currents" :navbarHeight="navbarHeight"></empty>
|
|
|
+ <!-- 列表 -->
|
|
|
+ <view v-else class="tui-order-content">
|
|
|
+ <view class="tui-order-item" v-for="(order, orderIndex) in orderList" :key="orderIndex">
|
|
|
+ <template v-if="currents != 3">
|
|
|
+ <receipt-details :orderInfo="order"></receipt-details>
|
|
|
+ <view
|
|
|
+ class="list-checked"
|
|
|
+ @click="checkedOrder(order)"
|
|
|
+ v-if="order.surplusAmount > 0"
|
|
|
+ >
|
|
|
+ <text
|
|
|
+ class="iconfont"
|
|
|
+ :class="order.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
|
|
|
+ ></text>
|
|
|
</view>
|
|
|
- <view class="list-title-num">{{ order.confirmType | StateExpFormat }}</view>
|
|
|
- </view>
|
|
|
- <view class="list-title-b">
|
|
|
- 客户名称:<text class="text">{{ order.userName }}</text>
|
|
|
- </view>
|
|
|
- <view class="list-title-b">
|
|
|
- 订单编号:<text class="text">{{ order.orderNo }} ( {{ order.orderId }} )</text>
|
|
|
- </view>
|
|
|
- <view class="list-title-b">
|
|
|
- 下单日期:<text class="text">{{ order.orderTime }}</text>
|
|
|
- </view>
|
|
|
- <view class="list-title-b">
|
|
|
- <view class="list-title-b-item ">
|
|
|
- 订单金额:<text class="text">¥{{ order.payTotalFee | NumFormat }}</text>
|
|
|
+ <view class="list-detail" @click="orderDetail(order.id)">
|
|
|
+ <text class="iconfont icon-xiayibu"></text>
|
|
|
</view>
|
|
|
- <view class="list-title-b-item ">
|
|
|
- 余额抵扣:<text class="text">¥{{ order.balancePayFee | NumFormat }}</text>
|
|
|
+ </template>
|
|
|
+ <template v-if="currents == 3">
|
|
|
+ <receipt-refund :orderInfo="order"></receipt-refund>
|
|
|
+ <view class="list-checked" @click="checkedRefundOrder(order, orderIndex)">
|
|
|
+ <text
|
|
|
+ class="iconfont"
|
|
|
+ :class="
|
|
|
+ checkedRefundIndex == orderIndex ? 'icon-yixuanze' : 'icon-weixuanze'
|
|
|
+ "
|
|
|
+ ></text>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="list-title-b">
|
|
|
- 经理折扣:
|
|
|
- <text class="text" v-if="order.discountFee - order.returnedPurchaseFee > 0">
|
|
|
- ¥{{ order.discountFee - order.returnedPurchaseFee }}
|
|
|
- <text>
|
|
|
- (原¥{{ order.discountFee }} 折扣取消¥{{
|
|
|
- order.discountFee - order.returnedPurchaseFee > 0
|
|
|
- ? order.returnedPurchaseFee
|
|
|
- : order.discountFee
|
|
|
- }})
|
|
|
- </text>
|
|
|
- </text>
|
|
|
- <text v-else>¥0.00(原¥0.00折扣取消¥0.00)</text>
|
|
|
- </view>
|
|
|
- <view class="list-title-b">
|
|
|
- 退货退款: <text class="text">¥{{ order.receiptAmount }}</text>
|
|
|
- </view>
|
|
|
- <view class="list-title-b">
|
|
|
- <view class="list-title-b-item ">
|
|
|
- 应收金额:<text class="text">¥{{ order.payableAmount | NumFormat }}</text>
|
|
|
+ <view class="list-detail" @click="orderDetail(order.id)">
|
|
|
+ <text class="iconfont icon-xiayibu"></text>
|
|
|
</view>
|
|
|
- <view class="list-title-b-item ">
|
|
|
- 已收金额:<text class="text">¥{{ order.paidAmount | NumFormat }}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="list-title-b">
|
|
|
- <view class="list-title-b-item ">
|
|
|
- 剩余应收:<text class="text">¥{{ order.surplusAmount | NumFormat }}</text>
|
|
|
- </view>
|
|
|
- <view class="list-title-b-item ">
|
|
|
- 待审金额:<text class="text">¥{{ order.receiptAmount | NumFormat }}</text>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- </view>
|
|
|
- <view class="list-checked" @click="checkedOrder(order)">
|
|
|
- <text
|
|
|
- class="iconfont"
|
|
|
- :class="order.isChecked ? 'icon-yixuanze' : 'icon-weixuanze'"
|
|
|
- ></text>
|
|
|
- </view>
|
|
|
- <view class="list-detail" @click="orderDetail(order.id)">
|
|
|
- <text class="iconfont icon-xiayibu"></text>
|
|
|
+ </template>
|
|
|
</view>
|
|
|
+ <!--加载loadding-->
|
|
|
+ <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
|
|
|
+ <tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text="nomoreText"></tui-nomore>
|
|
|
+ <!--加载loadding-->
|
|
|
</view>
|
|
|
- <!--加载loadding-->
|
|
|
- <tui-loadmore :visible="loadding" :index="3" type="black"></tui-loadmore>
|
|
|
- <tui-nomore :visible="!pullUpOn" bgcolor="#F7F7F7" :text="nomoreText"></tui-nomore>
|
|
|
- <!--加载loadding-->
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
- </view>
|
|
|
- <view class="distinguish-button" :style="{ paddingBottom: isIphoneX ? '68rpx' : '24rpx' }">
|
|
|
- <view class="button" @click="confirmDistinguish">确认</view>
|
|
|
+ <view class="distinguish-button" :style="{ paddingBottom: isIphoneX ? '68rpx' : '24rpx' }">
|
|
|
+ <view class="button" @click="confirmDistinguish">确认</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
<!-- 弹窗 -->
|
|
|
<tui-modal
|
|
@@ -197,26 +182,47 @@
|
|
|
shape="circle"
|
|
|
:maskClosable="false"
|
|
|
></tui-modal>
|
|
|
+ <!-- 关联提示弹窗 -->
|
|
|
+ <receipt-modal
|
|
|
+ v-if="modal1"
|
|
|
+ :show="modal1"
|
|
|
+ :amount="receiptInfo.receiptAmount"
|
|
|
+ :totalOrder="totalOrder"
|
|
|
+ :modelTpye="1"
|
|
|
+ @cancel="hideMobel1"
|
|
|
+ @click="handleClick1">
|
|
|
+ </receipt-modal>
|
|
|
</view>
|
|
|
</template>
|
|
|
<script>
|
|
|
-import headerBack from '@/components/cm-module/headerNavbar/header-back' //自定义导航
|
|
|
-import modalLayer from '@/components/modal-layer'
|
|
|
+import receiptModal from '@/components/cm-module/receipt/receipt-modal'
|
|
|
+import receiptDetails from '@/components/cm-module/receipt/receipt-details'
|
|
|
+import receiptRefund from '@/components/cm-module/receipt/receipt-refund'
|
|
|
import empty from '@/components/empty'
|
|
|
import wxLogin from '@/services/wxLogin.js'
|
|
|
import { mapState, mapMutations } from 'vuex'
|
|
|
const defaultListQuery = {
|
|
|
id: 0, //收款Id
|
|
|
keyword: '', // 搜索关键词(客户名称/订单号)
|
|
|
- orderReceiptStatus: '1', //订单收款状态:1待收款(协销待确认款项的订单),2部分收款(已确认款项的订单),3已收款(已确认款项的订单)
|
|
|
- organizeId: 0, // 组织ID
|
|
|
+ orderReceiptStatus: '1,2', //订单收款状态:1待收款(协销待确认款项的订单),2部分收款(已确认款项的订单),3已收款(已确认款项的订单)
|
|
|
+ organizeId: 0, // 商品订单 0 定金订单 0 小程序订单 3 退款子订单 4
|
|
|
pageNum: 1, // 页码
|
|
|
pageSize: 10, // 条数
|
|
|
type: 0 // 0商品订单(默认),1订金订单
|
|
|
}
|
|
|
+const defaultRefundListQuery = {
|
|
|
+ id: 0, //收款Id
|
|
|
+ confirmedType: 0, // 0待确认,2已确认
|
|
|
+ shopName: '', //供应商名称
|
|
|
+ pageNum: 1, // 页码
|
|
|
+ pageSize: 10 // 条数
|
|
|
+}
|
|
|
export default {
|
|
|
components: {
|
|
|
- empty
|
|
|
+ empty,
|
|
|
+ receiptModal,
|
|
|
+ receiptDetails,
|
|
|
+ receiptRefund
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
@@ -252,9 +258,10 @@ export default {
|
|
|
}
|
|
|
],
|
|
|
listQuery: Object.assign({}, defaultListQuery),
|
|
|
+ refundListQuery: Object.assign({}, defaultRefundListQuery),
|
|
|
currents: 0,
|
|
|
tabCurrents: 0,
|
|
|
- payList: [],
|
|
|
+ orderList: [],
|
|
|
scrollTop: 0,
|
|
|
isEmpty: false,
|
|
|
loadding: false,
|
|
@@ -265,6 +272,7 @@ export default {
|
|
|
nomoreText: '上拉显示更多',
|
|
|
contentModalText: '', //操作文字提示语句
|
|
|
modal: false,
|
|
|
+ modal1: false,
|
|
|
hanldOrder: '', //储存监听订单信息
|
|
|
OperationType: '', //操作类型
|
|
|
isCmcustomClass: 'left',
|
|
@@ -272,38 +280,20 @@ export default {
|
|
|
height: 64, //header高度
|
|
|
top: 0, //标题图标距离顶部距离
|
|
|
scrollH: 0, //滚动总高度
|
|
|
- opcity: 1
|
|
|
+ opcity: 1,
|
|
|
+ checkedOrderList: [],
|
|
|
+ checkedRefundIndex: 0,
|
|
|
+ skeletonShow: true,
|
|
|
+ totalOrder: {
|
|
|
+ orderNums:1,
|
|
|
+ payTotalFee: 0, // 订单金额
|
|
|
+ balancePayFee: 0, // 余额抵扣
|
|
|
+ payableAmount: 0, // 应收金额
|
|
|
+ paidAmount: 0 // 已收金额
|
|
|
+ } // 统计都选相同的订单数据
|
|
|
}
|
|
|
},
|
|
|
filters: {
|
|
|
- StateExpFormat(state) {
|
|
|
- //订单状态文字和颜色
|
|
|
- var HtmlStateText = '',
|
|
|
- stateTextObject = {
|
|
|
- 0: '待确认',
|
|
|
- 4: '交易完成',
|
|
|
- 5: '订单完成',
|
|
|
- 6: '已关闭',
|
|
|
- 7: '交易全退',
|
|
|
- 77: '交易全退',
|
|
|
- 11: '待付款待发货',
|
|
|
- 12: '待付款部分发货',
|
|
|
- 13: '待付款已发货',
|
|
|
- 21: '部分付款待发货',
|
|
|
- 22: '部分付款部分发货',
|
|
|
- 23: '部分付款已发货',
|
|
|
- 31: '已付款待发货',
|
|
|
- 32: '已付款部分发货',
|
|
|
- 33: '已付款已发货',
|
|
|
- 111: '待付款待发货'
|
|
|
- }
|
|
|
- Object.keys(stateTextObject).forEach(function(key) {
|
|
|
- if (key == state) {
|
|
|
- HtmlStateText = stateTextObject[key]
|
|
|
- }
|
|
|
- })
|
|
|
- return HtmlStateText
|
|
|
- },
|
|
|
formatSourceType(value) {
|
|
|
// 款项类型:1订单款,2非订单款,3返佣款 4订单款或者非订单款(因财务阶段无法区分订单非订单), 5供应商退款
|
|
|
switch (value) {
|
|
@@ -344,23 +334,10 @@ export default {
|
|
|
break
|
|
|
}
|
|
|
},
|
|
|
- formatOrderType(value) {
|
|
|
- switch (value) {
|
|
|
- case 1:
|
|
|
- return '自主订单'
|
|
|
- break
|
|
|
- case 0:
|
|
|
- return '协销订单'
|
|
|
- break
|
|
|
- case 2:
|
|
|
- return '客服订单'
|
|
|
- break
|
|
|
- }
|
|
|
- },
|
|
|
NumFormat(value) {
|
|
|
//处理金额
|
|
|
if (value) {
|
|
|
- Number(value).toFixed(2)
|
|
|
+ return Number(value).toFixed(2)
|
|
|
} else {
|
|
|
return '0.00'
|
|
|
}
|
|
@@ -377,7 +354,7 @@ export default {
|
|
|
this.scrollH = res.windowWidth * 0.6
|
|
|
}
|
|
|
})
|
|
|
- this.listQuery.id = option.id
|
|
|
+ this.listQuery.id = this.refundListQuery.id = option.id
|
|
|
this.getOrderReceiptDetail(this.listQuery.id)
|
|
|
},
|
|
|
computed: {
|
|
@@ -400,10 +377,10 @@ export default {
|
|
|
this.OrderService.orderReceiptOrders(this.listQuery)
|
|
|
.then(response => {
|
|
|
let data = response.data
|
|
|
+ this.hasNextPage = response.data.hasNextPage
|
|
|
if (data.list && data.list.length > 0) {
|
|
|
this.isEmpty = false
|
|
|
- this.hasNextPage = response.data.hasNextPage
|
|
|
- this.payList = data.list.map((el, index) => {
|
|
|
+ this.orderList = data.list.map((el, index) => {
|
|
|
el.isChecked = false
|
|
|
return el
|
|
|
})
|
|
@@ -415,7 +392,7 @@ export default {
|
|
|
this.pullUpOn = false
|
|
|
this.nomoreText = '上拉显示更多'
|
|
|
} else {
|
|
|
- if (this.payList.length < 3) {
|
|
|
+ if (this.orderList.length < 3) {
|
|
|
this.pullUpOn = true
|
|
|
} else {
|
|
|
this.pullUpOn = false
|
|
@@ -432,19 +409,84 @@ export default {
|
|
|
this.$util.msg(err.msg, 2000)
|
|
|
})
|
|
|
},
|
|
|
- getOnReachBottomData() {
|
|
|
- //上拉加载
|
|
|
+ orderReceiptRefundOrders() {
|
|
|
+ // 收款详情-退款子订单列表
|
|
|
+ this.OrderService.orderReceiptRefundOrders(this.refundListQuery)
|
|
|
+ .then(response => {
|
|
|
+ let data = response.data
|
|
|
+ this.hasNextPage = response.data.hasNextPage
|
|
|
+ if (data.list && data.list.length > 0) {
|
|
|
+ this.isEmpty = false
|
|
|
+ this.orderList = data.list.map((el, index) => {
|
|
|
+ el.isChecked = false
|
|
|
+ return el
|
|
|
+ })
|
|
|
+ this.pullFlag = false
|
|
|
+ setTimeout(() => {
|
|
|
+ this.pullFlag = true
|
|
|
+ }, 500)
|
|
|
+ if (this.hasNextPage) {
|
|
|
+ this.pullUpOn = false
|
|
|
+ this.nomoreText = '上拉显示更多'
|
|
|
+ } else {
|
|
|
+ if (this.orderList.length < 3) {
|
|
|
+ this.pullUpOn = true
|
|
|
+ } else {
|
|
|
+ this.pullUpOn = false
|
|
|
+ this.loadding = false
|
|
|
+ this.nomoreText = '已至底部'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ this.isEmpty = true
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(err => {
|
|
|
+ this.$util.msg(err.msg, 2000)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ orderReceiptRefundOrdersBottom() {
|
|
|
+ this.refundListQuery.pageNum += 1
|
|
|
+ this.OrderService.orderReceiptRefundOrders(this.refundListQuery)
|
|
|
+ .then(response => {
|
|
|
+ let data = response.data
|
|
|
+ if (data.list && data.list.length > 0) {
|
|
|
+ this.hasNextPage = data.hasNextPage
|
|
|
+ let list = data.list.map((el, index) => {
|
|
|
+ el.isChecked = false
|
|
|
+ return el
|
|
|
+ })
|
|
|
+ this.orderList = this.orderList.concat(list)
|
|
|
+ this.pullFlag = false // 防上拉暴滑
|
|
|
+ setTimeout(() => {
|
|
|
+ this.pullFlag = true
|
|
|
+ }, 500)
|
|
|
+ if (this.hasNextPage) {
|
|
|
+ this.pullUpOn = false
|
|
|
+ this.nomoreText = '上拉显示更多'
|
|
|
+ } else {
|
|
|
+ this.pullUpOn = false
|
|
|
+ this.loadding = false
|
|
|
+ this.nomoreText = '已至底部'
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ .catch(error => {
|
|
|
+ this.$util.msg(error.msg, 2000)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ orderReceiptOrdersBottom() {
|
|
|
this.listQuery.pageNum += 1
|
|
|
this.OrderService.orderReceiptOrders(this.listQuery)
|
|
|
.then(response => {
|
|
|
let data = response.data
|
|
|
if (data.list && data.list.length > 0) {
|
|
|
this.hasNextPage = data.hasNextPage
|
|
|
- this.payList = this.payList.concat(data.list)
|
|
|
- this.payList = this.payList.map((el, index) => {
|
|
|
+ let list = data.list.map((el, index) => {
|
|
|
el.isChecked = false
|
|
|
return el
|
|
|
})
|
|
|
+ this.orderList = this.orderList.concat(list)
|
|
|
this.pullFlag = false // 防上拉暴滑
|
|
|
setTimeout(() => {
|
|
|
this.pullFlag = true
|
|
@@ -463,82 +505,31 @@ export default {
|
|
|
this.$util.msg(error.msg, 2000)
|
|
|
})
|
|
|
},
|
|
|
- change(e) {
|
|
|
- //切换tab传递当前tab[index]执行初始化方法
|
|
|
- this.currentTabs = e.index
|
|
|
- switch (e.index) {
|
|
|
- case 0:
|
|
|
- this.currentTab = -1
|
|
|
- break
|
|
|
- case 1:
|
|
|
- this.currentTab = 0
|
|
|
- break
|
|
|
- case 2:
|
|
|
- this.currentTab = 1
|
|
|
- break
|
|
|
- case 3:
|
|
|
- this.currentTab = 2
|
|
|
- break
|
|
|
- case 4:
|
|
|
- this.currentTab = 3
|
|
|
+ subMitSearch(type) {
|
|
|
+ // 确认搜索
|
|
|
+ switch (type) {
|
|
|
+ case 1: // 订单
|
|
|
+ this.listQuery.pageNum = 1
|
|
|
+ this.getOrderReceiptOrders()
|
|
|
break
|
|
|
- case 5:
|
|
|
- this.currentTab = 4
|
|
|
+ case 2: // 订单
|
|
|
+ this.refundListQuery.pageNum = 1
|
|
|
+ this.orderReceiptRefundOrders()
|
|
|
break
|
|
|
}
|
|
|
- this.pageNum = 1
|
|
|
- this.orderData = []
|
|
|
- this.pullUpOn = true //切换时隐藏
|
|
|
- this.loadding = false //切换时隐藏
|
|
|
- this.getOrderDatainit(this.currentTab)
|
|
|
+ },
|
|
|
+ getOnReachBottomData() {
|
|
|
+ //上拉加载
|
|
|
+ if (this.currents == 3) {
|
|
|
+ this.orderReceiptRefundOrdersBottom()
|
|
|
+ } else {
|
|
|
+ this.orderReceiptOrdersBottom()
|
|
|
+ }
|
|
|
},
|
|
|
orderDetail(id) {
|
|
|
//订单详情跳转
|
|
|
this.$api.navigateTo(`/pages/relation/order/detail?orderId=${id}`)
|
|
|
},
|
|
|
- handButtonConfirm(data) {
|
|
|
- //获取点击
|
|
|
- console.log('data', data)
|
|
|
- // this.handShowAlert(data)
|
|
|
- },
|
|
|
- handShowAlert(data) {
|
|
|
- console.log('data', data)
|
|
|
- //执行
|
|
|
- switch (data.type) {
|
|
|
- case 'pay':
|
|
|
- this.$api.navigateTo(`/pages/user/order/order-details?path=pay&state=0&orderID=${this.btnoRderID}`)
|
|
|
- break
|
|
|
- case 'delete':
|
|
|
- this.modal = true
|
|
|
- this.contentModalText = '确认删除该订单吗?'
|
|
|
- break
|
|
|
- case 'cancel':
|
|
|
- this.modal = true
|
|
|
- this.contentModalText = '确认关闭该订单吗?'
|
|
|
- break
|
|
|
- case 'refund':
|
|
|
- uni.setStorageSync('refundData', data.order)
|
|
|
- this.$api.navigateTo('/pages/user/order/order-refund')
|
|
|
- break
|
|
|
- case 'returned':
|
|
|
- uni.setStorageSync('refundData', data.order)
|
|
|
- this.$api.navigateTo('/pages/user/order/order-refund')
|
|
|
- break
|
|
|
- case 'query':
|
|
|
- this.$api.navigateTo('/pages/user/order/order-logistics?orderID=' + data.orderId)
|
|
|
- break
|
|
|
- case 'confirm':
|
|
|
- this.modal = true
|
|
|
- this.contentModalText = '是否确认收货?'
|
|
|
- // this.handOrderConfirm(data.orderId);
|
|
|
- break
|
|
|
- case 'cancelRefund':
|
|
|
- this.modal = true
|
|
|
- this.contentModalText = '确定取消退货/退款?'
|
|
|
- // this.handCancelRefundConfirm(data.orderId);
|
|
|
- break
|
|
|
- }
|
|
|
- },
|
|
|
handleClick(e) {
|
|
|
//用户操作订单
|
|
|
let index = e.index
|
|
@@ -569,52 +560,60 @@ export default {
|
|
|
}
|
|
|
this.modal = false
|
|
|
},
|
|
|
+ confirmDistinguish() {
|
|
|
+ // 点击确认
|
|
|
+ const list = []
|
|
|
+ let payTotalFee = 0 //订单金额
|
|
|
+ let balancePayFee = 0 //余额抵扣
|
|
|
+ let payableAmount = 0 //应收金额
|
|
|
+ let paidAmount = 0 //已收金额
|
|
|
+ this.checkedOrderList.forEach(el => {
|
|
|
+ if (list.indexOf(el.userId) == -1) {
|
|
|
+ list.push(el.userId)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if (this.checkedOrderList.length == 0) {
|
|
|
+ this.$util.msg('请选择需要关联的订单!', 2000)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if (list.length > 1) {
|
|
|
+ this.$util.msg('请选择相同机构的订单!', 2000)
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.checkedOrderList.forEach(el => {
|
|
|
+ payTotalFee += el.payTotalFee
|
|
|
+ balancePayFee += el.balancePayFee
|
|
|
+ payableAmount += el.payableAmount
|
|
|
+ paidAmount += el.paidAmount
|
|
|
+ })
|
|
|
+ this.totalOrder.payTotalFee = Number(payTotalFee.toFixed(2))
|
|
|
+ this.totalOrder.balancePayFee = Number(balancePayFee.toFixed(2))
|
|
|
+ this.totalOrder.payableAmount = Number(payableAmount.toFixed(2))
|
|
|
+ this.totalOrder.paidAmount = Number(paidAmount.toFixed(2))
|
|
|
+ this.totalOrder.orderNums = this.checkedOrderList.length
|
|
|
+ console.log('totalOrder', this.totalOrder)
|
|
|
+ this.modal1 = true
|
|
|
+ },
|
|
|
checkedOrder(order) {
|
|
|
// 勾选关联订单
|
|
|
order.isChecked = !order.isChecked
|
|
|
+ if (order.isChecked) {
|
|
|
+ this.checkedOrderList.push(order)
|
|
|
+ } else {
|
|
|
+ this.checkedOrderList.splice(this.checkedOrderList.indexOf(order), 1)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ checkedRefundOrder(order, index) {
|
|
|
+ // 勾选退款子订单
|
|
|
+ this.checkedOrderList = []
|
|
|
+ this.checkedRefundIndex = index
|
|
|
+ this.checkedOrderList.push(order)
|
|
|
},
|
|
|
hideMobel() {
|
|
|
this.modal = false
|
|
|
},
|
|
|
- hanldOrderList(list) {
|
|
|
- let state = ''
|
|
|
- for (let i = 0; i < list.length; i++) {
|
|
|
- if (list[i].status == 4) {
|
|
|
- state = list[i].returnApplyStatus
|
|
|
- switch (state) {
|
|
|
- case 0:
|
|
|
- list[i].status = 40
|
|
|
- break
|
|
|
- case 1:
|
|
|
- list[i].status = 41
|
|
|
- break
|
|
|
- case 2:
|
|
|
- list[i].status = 42
|
|
|
- break
|
|
|
- case 3:
|
|
|
- list[i].status = 43
|
|
|
- break
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- //订单状态文字和颜色
|
|
|
- orderStateExp(state) {
|
|
|
- let stateText = '',
|
|
|
- stateTextObject = {
|
|
|
- 0: '待付款',
|
|
|
- 1: '待发货',
|
|
|
- 2: '已发货',
|
|
|
- 3: '已完成',
|
|
|
- 4: '已关闭',
|
|
|
- 5: '无效订单'
|
|
|
- }
|
|
|
- Object.keys(stateTextObject).forEach(key => {
|
|
|
- if (key == state) {
|
|
|
- stateText = stateTextObject[key]
|
|
|
- }
|
|
|
- })
|
|
|
- return stateText
|
|
|
+ hideMobel1() {
|
|
|
+ this.modal1 = false
|
|
|
},
|
|
|
formatColor(state) {
|
|
|
//设置邀请码状态亚瑟
|
|
@@ -633,41 +632,57 @@ export default {
|
|
|
})
|
|
|
return stateColor
|
|
|
},
|
|
|
- orderPriceToFixed(n) {
|
|
|
- let price = ''
|
|
|
- price = Number(n).toFixed(2)
|
|
|
- return price
|
|
|
- },
|
|
|
tabClick(type, index) {
|
|
|
+ this.pullUpOn = true //切换时隐藏
|
|
|
+ this.loadding = false //切换时隐藏
|
|
|
+ this.listQuery.type = 0 //切换是设置订单类型
|
|
|
switch (type) {
|
|
|
- case 1:
|
|
|
+ case 1: // 切换订单类型
|
|
|
this.currents = index
|
|
|
- this.getOrderDatainit(this.currents)
|
|
|
this.tabCurrents = 0
|
|
|
+ switch (this.currents) {
|
|
|
+ case 0: // 商品订单
|
|
|
+ this.listQuery.pageNum = 1
|
|
|
+ this.listQuery.organizeId = 0
|
|
|
+ this.getOrderReceiptOrders()
|
|
|
+ break
|
|
|
+ case 1:
|
|
|
+ this.listQuery.type = 1
|
|
|
+ this.listQuery.pageNum = 1
|
|
|
+ this.listQuery.organizeId = 0
|
|
|
+ this.getOrderReceiptOrders()
|
|
|
+ break
|
|
|
+ case 2:
|
|
|
+ this.listQuery.pageNum = 1
|
|
|
+ this.listQuery.organizeId = 3
|
|
|
+ this.getOrderReceiptOrders()
|
|
|
+ break
|
|
|
+ case 3:
|
|
|
+ this.refundListQuery.pageNum = 1
|
|
|
+ this.orderReceiptRefundOrders()
|
|
|
+ break
|
|
|
+ }
|
|
|
break
|
|
|
- case 2:
|
|
|
+ case 2: // 切换收款状态
|
|
|
this.tabCurrents = index
|
|
|
- this.getOrderDatainit(this.currents)
|
|
|
- }
|
|
|
- },
|
|
|
- bindDateChange: function(e) {
|
|
|
- //选择筛选时间
|
|
|
- console.log(e)
|
|
|
- this.listQuery.date = e.detail.value
|
|
|
- console.log(this.listQuery.date)
|
|
|
- },
|
|
|
- bindPickerChange: function(type, e) {
|
|
|
- //选择筛选条件
|
|
|
- if (type == 1) {
|
|
|
- this.listQuery.classification = this.Array[e.target.value].name
|
|
|
- console.log(this.listQuery.classification)
|
|
|
- } else {
|
|
|
- this.listQuery.source = this.Array1[e.target.value].name
|
|
|
- console.log(this.listQuery.source)
|
|
|
+ if (this.currents == 3) {
|
|
|
+ if (this.tabCurrents == 0) {
|
|
|
+ this.refundListQuery.confirmedType = 0
|
|
|
+ } else {
|
|
|
+ this.refundListQuery.confirmedType = 2
|
|
|
+ }
|
|
|
+ this.refundListQuery.pageNum = 1
|
|
|
+ this.orderReceiptRefundOrders()
|
|
|
+ } else {
|
|
|
+ if (this.tabCurrents == 0) {
|
|
|
+ this.listQuery.orderReceiptStatus = '1,2'
|
|
|
+ } else {
|
|
|
+ this.listQuery.orderReceiptStatus = '3'
|
|
|
+ }
|
|
|
+ this.listQuery.pageNum = 1
|
|
|
+ this.getOrderReceiptOrders()
|
|
|
+ }
|
|
|
}
|
|
|
- },
|
|
|
- toNoSms(url) {
|
|
|
- this.$api.navigateTo(url)
|
|
|
}
|
|
|
},
|
|
|
onPageScroll(e) {
|
|
@@ -845,7 +860,6 @@ page {
|
|
|
margin-left: 30rpx;
|
|
|
line-height: 40rpx;
|
|
|
}
|
|
|
-
|
|
|
.list-title-tip {
|
|
|
float: left;
|
|
|
|
|
@@ -888,21 +902,18 @@ page {
|
|
|
}
|
|
|
.list-icon {
|
|
|
width: 120rpx;
|
|
|
- height: 60rpx;
|
|
|
- border: 1px solid #e1e1e1;
|
|
|
+ height: 120rpx;
|
|
|
border-radius: 10rpx;
|
|
|
- text-align: center;
|
|
|
- font-size: 20rpx;
|
|
|
- line-height: 60rpx;
|
|
|
position: absolute;
|
|
|
- right: 90rpx;
|
|
|
- top: -40rpx;
|
|
|
+ right: 0;
|
|
|
+ top: -70rpx;
|
|
|
color: #dd524d;
|
|
|
z-index: 99;
|
|
|
- transform: rotate(45deg);
|
|
|
- -webkit-transform: rotate(45deg);
|
|
|
- -moz-transform: rotate(45deg);
|
|
|
- font-family: '正楷';
|
|
|
+ .list-icon-image{
|
|
|
+ width: 120rpx;
|
|
|
+ height: 120rpx;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.tui-header-tabmain {
|
|
@@ -957,13 +968,13 @@ page {
|
|
|
|
|
|
&.active {
|
|
|
.text {
|
|
|
- color: #576efa;
|
|
|
+ color: $btn-confirm;
|
|
|
font-size: $font-size-28;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
&.tabActive {
|
|
|
- background: #576efa;
|
|
|
+ background: $btn-confirm;
|
|
|
.text {
|
|
|
color: #ffffff;
|
|
|
}
|
|
@@ -1170,11 +1181,27 @@ page {
|
|
|
padding: 0 15rpx;
|
|
|
height: 40rpx;
|
|
|
line-height: 40rpx;
|
|
|
- border-radius: 4rpx;
|
|
|
- background: radial-gradient(circle, rgba(255, 180, 39, 1) 0%, rgba(245, 142, 77, 1) 100%);
|
|
|
+ border-radius: 20rpx;
|
|
|
+ background: rgba(248, 204, 148, 0.5);
|
|
|
font-size: $font-size-24;
|
|
|
text-align: center;
|
|
|
- color: #ffffff;
|
|
|
+ color: #666666;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .list-title-tag {
|
|
|
+ float: left;
|
|
|
+ margin-left: 20rpx;
|
|
|
+ .badges {
|
|
|
+ display: block;
|
|
|
+ float: left;
|
|
|
+ padding: 0 15rpx;
|
|
|
+ height: 40rpx;
|
|
|
+ line-height: 40rpx;
|
|
|
+ border-radius: 20rpx;
|
|
|
+ background: linear-gradient(270deg, #fee9ba 0%, #f0cb72 100%);
|
|
|
+ font-size: $font-size-24;
|
|
|
+ text-align: center;
|
|
|
+ color: #666666;
|
|
|
}
|
|
|
}
|
|
|
.list-title-num {
|