| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 |
- <template>
- <div class="app-main app-content">
- <div class="list-wrap">
- <block v-if="!$util.isEmpty(list.data)">
- <div class="list" v-for="(item, index) in list.data" :key="index">
- <div v-if="!$util.isEmpty(item.orderInfo)">
- <OrderItem :item="item.orderInfo" @orderEventBtn="orderEventBtn"></OrderItem>
- </div>
- </div>
- </block>
- <block v-else>
- <app-wrapper-empty
- title="暂无数据"
- :is-empty="$util.isEmpty(list.data)"
- />
- </block>
- </div>
- </div>
- </template>
- <script>
- const Month = new Date().getMonth() + 1 < 10 ? "0" + (new Date().getMonth() + 1) : new Date().getMonth() + 1;
- const time = `${new Date().getFullYear()}-${Month}-${new Date().getDate()}`;
- import AppWrapperEmpty from "@/components/app-wrapper-empty";
- import ModalModule from "@/components/plugin/modal";
- import { list } from "@/mixins";
- import { mapGetters } from "vuex";
- import { getOrderInfoList } from "@/api/order-item";
- import orderMixin from "@/mixins/order";
- import OrderItem from "../home/components/OrderItem";
- export default {
- name: "itemOrder",
- components: {
- AppWrapperEmpty,
- ModalModule,
- OrderItem,
- },
- mixins: [list,orderMixin],
- computed: { ...mapGetters(["getLoginInfo", "getDictionariesInfo"]) },
- data() {
- return {
- orderId:'',
- seekVal: "",
- isShow: false, //是否显选择时间段
- customizationTime: [], //时间段
- customizationTimeType: "", //时间段
- menuObj: "", //时间筛选列表
- tabIndex: 0,
- selectItemId: "",
- operateIndex: null,
- operateData: {},
- freeShipModal: false,
- classifyForm: {
- categoryId: "",
- usageId: "",
- },
- searchType:0,
- searchTypeName:'客户',
- };
- },
- onPullDownRefresh() {
- this.resetList();
- this.getOrderList().then((res) => {
- uni.stopPullDownRefresh();
- });
- },
- onReachBottom() {
- if (!this.list.finished) {
- this.getOrderList().then((res) => {
- uni.stopPullDownRefresh();
- });
- } else {
- uni.stopPullDownRefresh();
- }
- },
- mounted() {
- },
- onLoad(option) {
- let dateDefaultOption = [];
- let list = this.getDictionariesInfo.dateDefaultOption;
- if (!this.$util.isEmpty(list)){
- for (let i = 0; i < list.length; i++) {
- dateDefaultOption.push({ name: list[i].name, id: list[i].value });
- }
- }
- this.menuObj = {
- title: "时间",
- titleChild: "时间",
- list: dateDefaultOption,
- };
- let tabIndex = uni.getStorageSync("switchTabQuery") || null;
- if (tabIndex) {
- uni.removeStorageSync("switchTabQuery");
- this.tabIndex = parseInt(tabIndex.tabIndex);
- }
- this.getOrderList();
- },
- onShow() {
- },
- methods: {
- getOrderList(type, timeArr) {
- return getOrderInfoList({
- searchTime: type,
- startTime: timeArr ? timeArr[0] : "",
- endTime: timeArr ? timeArr[1] : "",
- productId:this.option.id,
- page: this.list.page,
- }).then((res) => {
- this.completes(res)
- });
- }
- },
- };
- </script>
- <style lang="scss" scoped>
- .admin-button-com {
- width: 140upx;
- height: 60upx;
- padding: 0;
- line-height: 60upx;
- text-align: center;
- font-size: 26upx;
- &.active {
- border: 1upx solid #ccc;
- }
- }
- page{
- width: 750upx;
- overflow: hidden;
- }
- .app-content {
- width: 100%;
- padding-bottom: 1upx;
- overflow: hidden;
- .select-dn_bx {
- padding-left: 18upx;
- }
- .app-tabs {
- position: fixed;
- width: 100%;
- z-index: 9;
- }
- .input-wrap_box {
- background-color: #fff;
- position: fixed;
- top: 0;
- z-index: 10;
- width: 100%;
- height: 100upx;
- display: flex;
- align-items: center;
- padding: 0 30upx;
- & > view:nth-child(2) {
- flex: 1;
- }
- }
- .list-wrap {
- padding-top: 20upx;
- .list {
- background-color: #fff;
- margin-bottom: 20upx;
- }
- }
- }
- .upload-confirm-wrap {
- max-height: 600upx;
- overflow-y: auto;
- .modal-tit {
- @include disFlex(center, center);
- font-size: 40upx;
- margin-top: 30upx;
- margin-bottom: 50upx;
- .iconfont {
- color: #09bb07;
- margin-right: 20upx;
- font-size: 50upx;
- }
- }
- .sel-wrap {
- color: $fontColor2;
- font-size: 32upx;
- .sel-tit {
- text-align: left;
- }
- .sel-btn {
- @include disFlex(center, flex-start);
- flex-wrap: wrap;
- padding: 10upx 0 40upx;
- .admin-button-com {
- margin-right: 20upx;
- margin-top: 20upx;
- padding-top: 16upx;
- padding-bottom: 16upx;
- border-radius: 4upx;
- }
- }
- }
- }
- </style>
|