123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331 |
- <template>
- <view class="query-wrap">
- <view class="title-cont">
- <view class="search-view">
- <uni-easyinput prefixIcon="search" :value="value" placeholder="请输入单号" @iconClick="iconClick"
- @input="input" @blur="blur" @confirm="confirm">
- </uni-easyinput>
- <view class="filter-text" @click.stop="filterTime">
- 筛选
- </view>
- </view>
- <v-tabs v-model="index" :tabs="tabList" @change="changeTab" :scroll="false"></v-tabs>
- </view>
- <z-paging ref="paging" @query="queryList" v-model="dataList" :use-page-scroll="true">
- <view class="inner-item" v-for="(item,index) in dataList" :key="index" @click="itemDetails(item)">
- <view class="item-stats">
- {{item.stas=='B'?'已拣货':"待拣货"}}
- </view>
- <view class="inventory-item">
- <view class="shuo-item-name">
- <view class="shuo-label">
- 出库订单号:
- </view>
- <view class="shuo-unit">
- {{item.stooutId}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 出库品种数:
- </view>
- <view class="shuo-label-green">
- {{item.stoCnt}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- 出库总数量:
- </view>
- <view class="shuo-label-green">
- {{item.devCnt}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 出库总金额:
- </view>
- <view class="shuo-cont">
- {{item.devAmt}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- 已拣货数量:
- </view>
- <view class="shuo-cont">
- {{item.pickCnt}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 出库类型:
- </view>
- <view class="shuo-cont">
- {{item.stoType}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- 目标位置:
- </view>
- <view class="shuo-cont">
- {{item.deptName}}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 出库人:
- </view>
- <view class="shuo-cont">
- {{item.crteUsrName}}
- </view>
- </view>
- <view class="shuo-item">
- <view class="shuo-label">
- 出库时间:
- </view>
- <view class="shuo-cont">
- {{ forMatTime(item.crteTime) }}
- </view>
- </view>
- </view>
- <view class="inventory-item">
- <view class="shuo-item">
- <view class="shuo-label">
- 来源订单:
- </view>
- <view class="shuo-label-green">
- {{item.soucId}}
- </view>
- </view>
- </view>
- </view>
- </z-paging>
- <uni-popup ref="popup" :mask-click="false">
- <view class="time-view">
- <uni-datetime-picker type="daterange" v-model="datetimesingle" />
- <view class="btn-view">
- <button type="primary" plain="true" style="height:70rpx;line-height: 70rpx;"
- @click.stop="reset()">重置</button>
- <button type="primary" plain="true" style="height:70rpx;line-height: 70rpx;"
- @click.stop="btnConfirm()">确定</button>
- </view>
- </view>
- </uni-popup>
- </view>
- </template>
- <script>
- import {
- mapState,
- mapMutations,
- mapActions
- } from 'vuex';
- import moment from "moment";
- import {
- debounce
- } from 'lodash';
- import ZPMixin from '@/uni_modules/z-paging/components/z-paging/js/z-paging-mixin.js';
- export default {
- mixins: [ZPMixin],
- data() {
- return {
- index: 0,
- value: "",
- dataList: [],
- inputVal: "",
- codeVal: "",
- confirmVal: "",
- changeVal: "",
- classes: [],
- listData: [],
- tabList: ['待拣货', '已拣货'],
- valueList: 0,
- beforeClose: true,
- datetimesingle: [],
- }
- },
- computed: {
- ...mapState(['houseSelectData'])
- },
- onShow() {
- if (this.$refs.paging) {
- this.$refs.paging.reload();
- }
- this.$forceUpdate();
- uni.$once('update', function(data) {
- // uni.redirectTo({
- // url: '/pages/grounding/grounding' //写你的路径
- // });
- })
- },
- mounted() {
- },
- methods: {
- ...mapActions(['getoutbondData']),
- async queryList(pageNo, pageSize) {
- await this.getoutbondData({
- pam: {
- current: pageNo,
- size: pageSize,
- stooutId: this.value,
- type: this.index == "0" ? "pick" : "sto",
- ordDate: this.datetimesingle,
- pdaType: "pda",
- soucStroomId: this.houseSelectData.houseId
- },
- that: this
- });
- },
- //日期格式化
- forMatTime(time) {
- return moment(time).format("YYYY-MM-DD");
- },
- //日期确定按钮
- btnConfirm() {
- this.$refs.popup.close();
- this.$refs.paging.reload();
- },
- //筛选时间
- filterTime() {
- this.$refs.popup.open('bottom')
- },
- //跳转验收详情
- itemDetails(item) {
- uni.setStorage({
- key: 'picking-details',
- data: item
- });
- uni.navigateTo({
- url: '/pages/picking-details/index',
- success: function(res) {
- console.log(res, "res")
- }
- });
- },
- input:debounce(function(e) {
- this.value = e;
- this.getoutbondData({
- pam: {
- stooutId: this.value,
- type: this.index == "0" ? "pick" : "sto"
- },
- that: this
- });
- },500),
- iconClick(e) {
- console.log(e, '点击搜索拿到的数据');
- },
- // 日期重置
- reset() {
- this.datetimesingle = [];
- this.$refs.popup.close();
- this.$refs.paging.reload();
- },
- blur(e) {
- this.$nextTick(() => {
- // this.value = e.target.value;
- })
- },
- confirm(e) {
- this.$nextTick(() => {
- // this.value = e;
- // this.confirmVal = e;
- })
- },
- changeTab(index) {
- this.index = index;
- this.$refs.paging.reload();
- },
- oncloseList() {
- this.$refs.inputDialog.close()
- },
- changeList(e) {
- // console.log(e)
- },
- onchange(e) {
- // console.log(e, 44)
- },
- onnodeclick(node) {
- console.log(node, "node");
- },
- onpopupclosed(e) {
- // console.log(e, 33)
- }
- },
- watch: {
- groundData(newData, flodData) {
- this.$refs.paging.complete(newData);
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .query-wrap {
- width: 100%;
- padding: 20rpx;
- box-sizing: border-box;
- background-color: #F1F1F1;
- overflow-y: scroll;
- overflow-x: hidden;
- .time-view {
- height: 350rpx;
- background-color: #fff;
- padding: 50rpx 50rpx 0 50rpx;
- box-sizing: border-box;
- .btn-view {
- width: 100%;
- height: 100rpx;
- margin-top: 100rpx;
- display: flex;
- justify-content: space-around;
- }
- }
- .title-cont {
- padding-top: 10rpx;
- width: 100%;
- background-color: #fff;
- .search-view {
- width: 100%;
- height: 100rpx;
- display: flex;
- align-items: center;
- padding: 0rpx 20rpx 0rpx 20rpx;
- box-sizing: border-box;
- .filter-text {
- width: 72rpx;
- height: 50rpx;
- line-height: 50rpx;
- color: rgba(1, 169, 146, 1);
- font-size: 36rpx;
- font-family: PingFangSC-bold;
- padding-left: 20rpx;
- }
- }
- }
- }
- uni-page-body {
- width: 100%;
- height: 100%;
- }
- </style>
|