|
|
@@ -0,0 +1,200 @@
|
|
|
+<template>
|
|
|
+<view class="app-content">
|
|
|
+ <view class="allot-ex-page">
|
|
|
+ <view class="tabs">
|
|
|
+ <Tabs :tabs="tabs" :currentTab="tabIndex" @change="changeTabEvent" @add="addEvent" ></Tabs>
|
|
|
+ </view>
|
|
|
+ <scroll-view scroll-y class="allot-list">
|
|
|
+ <block v-if="!$util.isEmpty(list.data)">
|
|
|
+ <view class="allot-item" v-for="(item, index) in list.data" :key="index" @click="gotoDetails(item)" >
|
|
|
+ <view class="info">
|
|
|
+ <view class="info-order"><text style="font-weight:normal;font-size:28upx;">来自:</text>
|
|
|
+ {{ item.outShopName }}
|
|
|
+ </view>
|
|
|
+ <view class="info-name">单号:{{ item.orderSn }}</view>
|
|
|
+ <view class="info-name">价格:¥{{ item.price?parseFloat(item.price):0 }}</view>
|
|
|
+ <view class="info-name">数量:
|
|
|
+ <text v-if="Number(item.bigNum)>0" style="color:#3385ff;font-weight:bold;">{{ item.bigNum}}扎</text>
|
|
|
+ <text v-if="Number(item.smallNum)>0" style="color:#3385ff;font-weight:bold;">{{ item.smallNum}}支</text>
|
|
|
+ </view>
|
|
|
+ <view class="info-name">时间:{{ item.updateTime.substr(5,11) }}</view>
|
|
|
+ <view class="info-name">编号:{{ item.id }}</view>
|
|
|
+ </view>
|
|
|
+ <view class="primary" >
|
|
|
+ <view :class="['status-name']">{{ item.statusName }}</view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <AppWrapperEmpty title="暂无数据" :is-empty="$util.isEmpty(list.data)" />
|
|
|
+ </block>
|
|
|
+ </scroll-view>
|
|
|
+ </view>
|
|
|
+</view>
|
|
|
+</template>
|
|
|
+<script>
|
|
|
+import Tabs from "@/components/plugin/tabs";
|
|
|
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
+import { list } from "@/mixins";
|
|
|
+import { getStockInListApi } from "@/api/storehouse/stock";
|
|
|
+import { PUT_STATUS } from "@/utils/declare";
|
|
|
+export default {
|
|
|
+ name: "allotPut",
|
|
|
+ components: { Tabs, AppWrapperEmpty },
|
|
|
+ mixins: [list],
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ PUT_STATUS,
|
|
|
+ tabIndex: 0,
|
|
|
+ tabs: [
|
|
|
+ {
|
|
|
+ name: "全部",
|
|
|
+ key: ""
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "配送中",
|
|
|
+ key: PUT_STATUS.CONFIRM
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "已入库",
|
|
|
+ key: PUT_STATUS.DONE
|
|
|
+ },
|
|
|
+ {
|
|
|
+ name: "已取消",
|
|
|
+ key: PUT_STATUS.CANCEL
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ };
|
|
|
+ },
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.resetList();
|
|
|
+ this.getMyScanList().then(res => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onLoad() {
|
|
|
+ },
|
|
|
+ onReachBottom() {
|
|
|
+ if (!this.list.finished) {
|
|
|
+ this.getMyScanList().then((res) => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ });
|
|
|
+ } else {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ async init() {
|
|
|
+ this.getMyScanList();
|
|
|
+ },
|
|
|
+ getMyScanList() {
|
|
|
+ return getStockInListApi({status:this.tabs[this.tabIndex].key,page: this.list.page})
|
|
|
+ .then(res => {
|
|
|
+ this.completes(res);
|
|
|
+ })
|
|
|
+ .catch(err => {});
|
|
|
+ },
|
|
|
+ changeTabEvent(info) {
|
|
|
+ const { index } = info;
|
|
|
+ if (this.tabIndex == index) {
|
|
|
+ return false;
|
|
|
+ } else {
|
|
|
+ this.tabIndex = index;
|
|
|
+ this.resetList();
|
|
|
+ this.getMyScanList();
|
|
|
+ }
|
|
|
+ },
|
|
|
+ getItemStatusName(status) {
|
|
|
+ let name = "";
|
|
|
+ switch (status) {
|
|
|
+ case PUT_STATUS.CONFIRM:
|
|
|
+ name = "配送中";
|
|
|
+ break;
|
|
|
+ case PUT_STATUS.DONE:
|
|
|
+ name = "已入库";
|
|
|
+ break;
|
|
|
+ case PUT_STATUS.CANCEL:
|
|
|
+ name = "已取消";
|
|
|
+ break;
|
|
|
+
|
|
|
+ default:
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return name;
|
|
|
+ },
|
|
|
+ addEvent() {
|
|
|
+ uni.navigateTo({url:'/pagesStorehouse/allot/addExDetails'})
|
|
|
+ },
|
|
|
+ gotoDetails(item) {
|
|
|
+ uni.navigateTo({url: `/pagesStorehouse/allot/putDetails?orderSn=${item.orderSn}`})
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.allot-ex-page {
|
|
|
+ height: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ background-color: #f9fbfc;
|
|
|
+ .allot-list {
|
|
|
+ margin-top: 20upx;
|
|
|
+ flex: 1;
|
|
|
+ padding-bottom: 30upx;
|
|
|
+ .allot-item {
|
|
|
+ margin-bottom: 1upx;
|
|
|
+ padding: 30upx;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+
|
|
|
+ box-shadow: 0upx 1upx 0upx 0upx #eeeeee;
|
|
|
+ background-color: #fff;
|
|
|
+ .info {
|
|
|
+ flex: 1;
|
|
|
+ margin-right: 20upx;
|
|
|
+ .info-order {
|
|
|
+ font-size: 32upx;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #333333;
|
|
|
+ }
|
|
|
+ .info-name {
|
|
|
+ margin: 20upx 0 20upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #666666;
|
|
|
+ }
|
|
|
+ .info-time {
|
|
|
+ margin-right: 30upx;
|
|
|
+ font-size: 28upx;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #666666;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .status {
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ align-items: center;
|
|
|
+ flex-shrink: 0;
|
|
|
+ width: 100upx;
|
|
|
+ color: #cccccc;
|
|
|
+ .status-name {
|
|
|
+ margin-top: 10upx;
|
|
|
+ font-size: 24upx;
|
|
|
+ }
|
|
|
+ .iconfont {
|
|
|
+ font-size: 46upx;
|
|
|
+ }
|
|
|
+ &.primary {
|
|
|
+ color: #3385ff;
|
|
|
+ }
|
|
|
+ &.gray {
|
|
|
+ color: #cccccc;
|
|
|
+ }
|
|
|
+ &.warn {
|
|
|
+ color: #ffaf1d;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|