123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422 |
- <template>
- <!-- #ifdef H5 -->
- <view>
- <zj-page-layout
- :hasFooter="true"
- :isScroll="true"
- :refresherTriggered="refresherTriggered"
- @refresherrefresh="refresherrefresh"
- >
- <template slot="header">
- <view class="tab-container">
- <u-tabs
- :scrollable="false"
- :list="tabList"
- :current="tabCurrent"
- @click="changeTab"
- lineColor="#3D8FFD"
- itemStyle="padding-left: 0; padding-right: 0; height: 88rpx;"
- :activeStyle="{ color: '#3D8FFD' }"
- :inactiveStyle="{ color: '#666666' }"
- >
- </u-tabs>
- </view>
- </template>
- <view class="list-container">
- <view
- class="goods-item"
- v-for="(item, index) in dataList.filter(
- item => !!~[['INSTALL_HOME', 'INSTALL_OTHER'], ['REPAIR'], ['OTHER']][tabCurrent].indexOf(item.categoryType)
- )"
- :key="index"
- >
- <view class="aItemView">
- <view class="aItemView_title">网点名称</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.importWebsitName }}</view>
- </view>
- </view>
- <!-- 安装 -->
- <view v-if="tabCurrent == 0" class="aItemView">
- <view class="aItemView_title">安装品类</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.category }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0" class="aItemView">
- <view class="aItemView_title">内机条码</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.insideCode }}</view>
- <view class="aItemView_v2 gudingk copytext" @click="copy(item.insideCode)">复制</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">内机名称</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.insideName }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">基础安装费</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.baseAmount }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">辅材达标</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.materialAmount }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">回收旧机达标</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.recoveryAmount }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">其它</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.otherAmount }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">评价数据达标</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.appraiseAmount }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">合计金额</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.totalAmount }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">工单编号</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.orderNo }}</view>
- <view class="aItemView_v2 gudingk copytext" @click="copy(item.orderNo)">复制</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">销售单号</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.salesOrderNo }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">安装日期</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workDate ? item.workDate.split(' ')[0] : '' }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">销售类型</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.salesType }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">用户姓名</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.userName }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">用户电话</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.userMobile }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">用户地址</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.userAddress }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">工程师1名称</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workerName1 }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">工程师1电话</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workerMobile1 }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">工程师1比例</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workerSettleRate1 }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0" class="aItemView">
- <view class="aItemView_title">工程师1金额</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workerSettleAmount1 }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">工程师2名称</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workerName2 }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">工程师2电话</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workerMobile2 }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">工程师2比例</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workerSettleRate2 }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 0 && item.isShow" class="aItemView">
- <view class="aItemView_title">工程师2金额</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workerSettleAmount2 }}</view>
- </view>
- </view>
- <!-- 维修 -->
- <view v-if="tabCurrent == 1" class="aItemView">
- <view class="aItemView_title">维修品类</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.category }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 1" class="aItemView">
- <view class="aItemView_title">自编号</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.repairCustomCode }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 1" class="aItemView">
- <view class="aItemView_title">条码</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.insideCode }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
- <view class="aItemView_title">维修费用</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.baseAmount }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
- <view class="aItemView_title">修复日期</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workDate ? item.workDate.split(' ')[0] : '' }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
- <view class="aItemView_title">用户姓名</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.userName }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
- <view class="aItemView_title">用户电话</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.userMobile }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
- <view class="aItemView_title">用户地址</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.userAddress }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
- <view class="aItemView_title">维修内容</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.repairContent }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
- <view class="aItemView_title">工程师名称</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workerName1 }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 1 && item.isShow" class="aItemView">
- <view class="aItemView_title">工程师电话</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workerMobile1 }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 1" class="aItemView">
- <view class="aItemView_title">结算金额</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workerSettleAmount1 }}</view>
- </view>
- </view>
- <!-- 其他 -->
- <view v-if="tabCurrent == 2" class="aItemView">
- <view class="aItemView_title">费用名称</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.typeName }}</view>
- </view>
- </view>
- <view v-if="tabCurrent == 2" class="aItemView">
- <view class="aItemView_title">结算金额</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.workerSettleAmount1 }}</view>
- </view>
- </view>
- <view class="aItemView">
- <view class="aItemView_title">备注</view>
- <view class="aItemView_info">
- <view class="aItemView_v1 gudingkbig">{{ item.remark }}</view>
- </view>
- </view>
- <view v-if="tabCurrent != 2" class="shouqizhankai" @click="item.isShow = !item.isShow"
- >{{ item.isShow ? '收起' : '展开' }}
- </view>
- </view>
- </view>
- </zj-page-layout>
- </view>
- <!-- #endif -->
- <!-- #ifndef H5 -->
- <web-view
- :src="webViewHref(`/packageMine/pages/coupon/list`, pam, crossPagePam)"
- @message="crossPage.$listener"
- ></web-view>
- <!-- #endif -->
- </template>
- <script>
- // #ifdef H5
- import { copy } from "@/common/utils/common.js"
- export default {
- data() {
- return {
- settleMonthWagesId: "",
- tabList: [
- { name: '安装费用', value: 0 },
- { name: '维修费用', value: 1 },
- { name: '其他费用', value: 2 },
- ],
- tabCurrent: 0, // 当前选择值
- refresherTriggered: false, // 下拉刷新状态
- dataList: []
- }
- },
- async onLoad({ settleMonthWagesId }) {
- this.settleMonthWagesId = settleMonthWagesId
- this.getList();
- },
- methods: {
- copy,
- getList() {
- this.$api.post('/user/my/settle/item', {
- settleMonthWagesId: this.settleMonthWagesId
- }).then(res => {
- this.dataList = res.data.map(item => ({ isShow: false, ...item, }))
- }).catch(() => {
- }).finally(res => {
- this.refresherTriggered = false;
- })
- },
- // 滚动到底部
- scrolltolower(e) {
- },
- // 触发下拉刷新
- async refresherrefresh(e) {
- this.refresherTriggered = true;
- this.getList();
- },
- changeTab(e) {
- this.tabCurrent = e.value;
- },
- }
- }
- // #endif
- // #ifndef H5
- export default {
- data() {
- return {
- pam: {},
- }
- },
- onLoad(pam) {
- this.pam = pam;
- },
- }
- // #endif
- </script>
- <style lang="scss">
- .tab-container {
- background: #ffffff;
- }
- .list-container {
- padding: 20rpx 20rpx 40rpx;
- .goods-item {
- @include zj-card;
- padding: 20rpx;
- margin-top: 20rpx;
- display: block !important;
- }
- }
- .aItemView {
- width: 100%;
- display: flex;
- .aItemView_title {
- width: 250rpx;
- color: #aaa;
- }
- .aItemView_info {
- flex: 1;
- display: flex;
- justify-content: space-between;
- .aItemView_v1 {
- }
- .gudingk {
- width: 130rpx;
- }
- .gudingkbig {
- flex: 1;
- }
- .aItemView_v2 {
- }
- .aItemView_v3 {
- }
- }
- &:not(:last-child) {
- margin-bottom: 16rpx;
- }
- .copytext {
- color: blue;
- text-align: center;
- }
- }
- .shouqizhankai {
- width: 100%;
- box-sizing: border-box;
- padding: 16rpx 0 0;
- text-align: center;
- }
- </style>
|