123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313 |
- <template>
- <view class="content">
- <view class="top-content">
- <view class="item last">
- <text>业务类型:</text>
- <uni-data-select v-model="state.businessTypeVal" :localdata="state.businessRange"
- @change="changeBusiness" :clear="false"></uni-data-select>
- </view>
- <view class="item last">
- <text>状态:</text>
- <uni-data-select v-model="state.status" :localdata="state.statusArr"
- @change="changeStatus" :clear="false"></uni-data-select>
- </view>
- <view class="example-body">
- <uni-datetime-picker v-model="state.range" type="daterange" />
- <button size="mini" style="color: #ffffff;
- backgroundColor: rgb(118, 200, 77);
- borderColor: rgb(118, 200, 77);
- font-size: 26rpx;
- flex-shrink: 0;margin-left: 20rpx;" @click="search(1)">搜索</button>
- </view>
- </view>
-
-
- <view class="uni-container">
- <view class="list-item" v-for="(item,index) in state.listData" @click="go(item)">
- <view>
- <view><text>车牌号:</text><text>{{item.vehiclePlate}}</text></view>
- <view><text>车牌颜色:</text><text>{{item.vehiclePlateColorC}}</text></view>
- <view><text>审核状态:</text><text>{{item.statusC}}</text></view>
- <!-- <view><text>订单状态:</text><text>{{item.orderStepValue}}</text></view> -->
- <view><text>业务类型:</text><text>{{item.businessTypeC}}</text></view>
- <view><text>时间:</text><text>{{item.insertTime}}</text></view>
- </view>
- <image class="right" src="../../../static/image/icon-back.png" mode=""></image>
- </view>
- </view>
- <view class="uni-container" style="text-align: center;" v-if="state.noData">暂无数据</view>
- <view class="bottom-line" v-if="state.flags">我是有底线的~~~</view>
- </view>
-
- </template>
-
- <script setup lang="ts">
- import { reactive } from "vue";
- import {
- businessType
- } from "@/subpackage/after-sale/js/businessType.js"
- import { onLoad, onReachBottom,onShow } from "@dcloudio/uni-app";
- import { generalAuditQuery } from "@/utils/network/api.js";
- import {requestNew } from "@/utils/network/request.js";
- import { getItem, StorageKeys } from "@/utils/storage";
- import { vehiclePlateColor, getVehiclePlateColorPai } from "@/datas/vehiclePlateColor";
- const state = reactive({
- startTime: Date.now(), //日期
- businessTypeVal: "",
- businessRange: [],
- listData: [],
- range: ['', ''],
- pageSize: 10, //每页数据量
- pageNo: 1, // 当前页
- total: 0, // 数据总量
- flags: false,
- vehiclePlate: "",//车牌号
- vehiclePlateColor: "",
- status: "",
- statusArr: [], //AUDIT_STATUS
- vehiclePlateColorArr: [],
- noData: false
-
- })
- onShow(()=>{
- search(1)
- })
- onLoad((option) => {
- // 车牌颜色
- let getVehiclePlateColorArr = getItem('key')['VEHICLE_COLOR_TYPE']
- for (var k = 0; k < getVehiclePlateColorArr.length; k++) {
- let obj2 = {};
- obj2['value'] = getVehiclePlateColorArr[k]['code']
- obj2['text'] = getVehiclePlateColorArr[k]['name']
- state.vehiclePlateColorArr.push(obj2)
- }
- // 审核状态
- let getStatusArr = getItem('key')['AUDIT_STATUS_BUSINESS_NEW'];
- for (var k = 0; k < getStatusArr.length; k++) {
- let obj1 = {};
- obj1['value'] = getStatusArr[k]['code']
- obj1['text'] = getStatusArr[k]['name']
- state.statusArr.push(obj1)
- }
- // 业务类型
- let getBusiness = getItem('key')['BUSINESSAPP_TYPE'];
- for (var k = 0; k < getBusiness.length; k++) {
- let obj = {};
- obj['value'] = getBusiness[k]['code']
- obj['text'] = getBusiness[k]['name']
- state.businessRange.push(obj)
- }
- state.vehiclePlate = option.vehiclePlate
- state.vehiclePlateColor = option.vehiclePlateColor
- console.log("state.businessRange",state.businessRange,state.statusArr)
- })
-
- const changeColor = (e) => {
- console.log("changeColor", e)
- state.vehiclePlateColor = e
- }
- const changeStatus = (e) => {
- console.log("changeColor", e)
- state.status = e
- }
- const changeBusiness = (e) => {
- state.businessTypeVal = e
- console.log(e)
- }
- //业务完成日志
- const search = (val) => {
- if (val == 1) {
- state.pageNo = 1
- }
- if (state.pageNo == 1 && state.listData.length > 0) {
- state.listData = []
- }
- var data = {
- vehiclePlate: state.vehiclePlate,
- vehiclePlateColor: state.vehiclePlateColor,
- orderStep: state.status,
- businessType: state.businessTypeVal,
- startTime: state.range[0] ? state.range[0] + ' 00:00:00' : state.range[0],
- endTime: state.range[1] ? state.range[1] + ' 00:00:00' : state.range[1],
- pageNo: state.pageNo,
- pageSize: state.pageSize,
- };
- for (var index in data) {
- console.log(index, data[index], data[index] == "")
- if (data[index].toString() == "") {
- delete data[index]
- }
- }
- const options = {
- type: 2,
- data: data,
- method: "POST",
- showLoading: true,
- };
- requestNew(generalAuditQuery, options).then((res) => {
- const data = res;
- console.log("data====",data)
- var getData = [...data.result, ...state.listData]
- for (var i = 0; i < getData.length; i++) {
- getData[i]['vehiclePlateColorC'] = getVehiclePlateColorPai(getData[i]['vehiclePlateColor'])
- if (getData[i]['status'] == 'AUDIT') {
- getData[i]['statusC'] = "待审核"
- } else if (getData[i]['status'] == 'FAIL') {
- getData[i]['statusC'] = "审核不通过"
- } else if (getData[i]['status'] == 'COMPLETE') {
- getData[i]['statusC'] = "审核通过"
- }else if (getData[i]['status'] == 'NO_AUDIT') {
- getData[i]['statusC'] = "系统审核"
- }
- console.log("state.businessRange",state.businessRange)
- for (var m = 0; m < state.businessRange.length; m++) {
- if (getData[i]['orderType'] == state.businessRange[m]['value']) {
- getData[i]['businessTypeC'] = state.businessRange[m]['text']
- break;
- }
- }
- }
- state.listData = getData
- state.total = data.result.length
- if (state.listData.length > 0) {
- state.noData = false
- } else {
- state.noData = true
- }
- console.log("业务完成日志", state.listData, state.pageNo,)
- });
- }
- const change = (e) => {
- console.log("e", e)
- state.pageNo = e.current
- search(2)
- }
- // 触底加载
- onReachBottom(() => {
- if (state.listData.length < state.pageNo * 10) return state.flags = true
- console.log("触底了")
- state.pageNo++
- search(2)
- })
- const go = (item) => {
- const params = encodeURIComponent(JSON.stringify(item))
- uni.navigateTo({
- url: `/subpackage/after-sale/progress-query/progress-query-business-details?params=${params}`
- })
- }
- </script>
-
- <style scoped>
- .top-content {
- position: fixed;
- left: 0;
- top: 0;
- background-color: white;
- width: 100%;
- padding: 0 20rpx 20rpx 20rpx;
- box-sizing: border-box;
- z-index: 999999;
- }
-
- .content {
- font-size: 32rpx;
- padding: 20rpx 30rpx;
- background-color: #EEF7F7;
- min-height: calc(100vh - 40rpx);
- }
-
- .card {
- display: flex;
- margin: 0 20rpx;
- align-items: center;
- }
-
- .title {
- margin-bottom: 20rpx;
- }
-
- .uni-container {
- margin: 50rpx 0;
- margin-top: 250rpx;
- }
-
- /deep/.uni-table-th,
- /deep/.uni-table-td {
- padding: 0 !important;
- font-size: 12px !important;
- }
-
- /deep/.uni-date__x-input,
- /deep/.uni-select {
- font-size: 13px;
- height: 24px;
- line-height: 24px;
- }
-
- /deep/.last .uni-stat__select {
- width: 320rpx;
- }
-
- /deep/.uni-select__selector-empty,
- /deep/.uni-select__selector-item {
- font-size: 13px !important;
- }
-
- /deep/.uni-date {
- width: 73% !important;
- }
-
- .example-body {
- display: flex;
- align-items: center;
- margin-top: 20rpx;
- }
-
- /deep/.uni-date-x {
- height: 56rpx !important;
- }
-
- .list-item {
- width: 95%;
- border-radius: 10rpx;
- margin: 30rpx auto;
- font-size: 28rpx;
- border: 1rpx solid #ccc;
- padding: 12rpx;
- box-sizing: border-box;
- background-color: white;
- display: flex;
- align-items: center;
- }
-
- .list-item>view {
- margin-bottom: 10rpx;
- width: 90%;
- }
-
- .bottom-line {
- text-align: center;
- margin: 30rpx 0;
- }
-
- .item {
- display: flex;
- font-size: 30rpx;
- margin: 20rpx 0 0 20rpx;
- align-items: center;
- }
-
- input,
- .uni-input {
- border: 1rpx solid #ccc;
- padding: 0 10rpx;
- height: 28rpx;
- line-height: 28rpx;
- }
-
- .right {
- width: 40rpx;
- height: 40rpx;
- transform: rotateY(180deg);
- }
- </style>
|