Commit 83f0a649 by LJM

移位记录

parent efc02ce3
Showing with 223 additions and 0 deletions
<template>
<view class="stockRecheck-record">
<view class="search-box row bothSide verCenter">
<view class="sn row rowCenter verCenter">
<picker @change="bindPickerChange" :value="index" :range="array">
<view class="row verCenter">
<view class="uni-input">{{ array[index] }}</view>
<view class="uni-arrow"></view>
</view>
</picker>
</view>
<view class="search-bar row bothSide verCenter">
<view class="row verCenter">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请输入查询" placeholder-style="color:#919399" focus v-model="searchParams.search_val" @input="handleInput" />
</view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
</view>
<view class="list" v-if="list.length > 0">
<view class="box row" v-for="(item, index) in list" :key="index">
<view class="input-box row verCenter">
<text class="label">入库批次号:</text>
<text class="tt">{{ item.stock_in_batch_sn }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">快速移位ID:</text>
<text class="tt">{{ item.id }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">货品编码:</text>
<text class="text">{{ item.goods_sn }}</text>
</view>
<view class="input-box row verCenter" v-if="item.sku_id > 0">
<text class="label">自营货品ID:</text>
<text class="text">{{ item.sku_id }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">货品名称:</text>
<text class="text">{{ item.goods_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">标准品牌:</text>
<text class="text">{{ item.brand_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">D / C:</text>
<text class="text">{{ item.date_code }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">产 地:</text>
<text class="text">{{ item.coo }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">货品品质:</text>
<text class="text">{{ item.quality_val }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">入仓号:</text>
<text class="text">{{ item.inhouse }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">其他批次属性:</text>
<text class="text">{{ item.other_batch_attr }}</text>
</view>
<view class="input-box row verCenter" v-if="item.customer_material_number">
<text class="label">客户物料编码:</text>
<text class="text">{{ item.customer_material_number }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">销售员:</text>
<text class="text">{{ item.sale_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">采购员:</text>
<text class="text">{{ item.pur_user_name }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">包装:</text>
<text class="text">{{ item.packing }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">单位:</text>
<text class="text">{{ item.goods_unit }}</text>
</view>
<view class="input-box row verCenter" style="flex: 0 0 100%;">
<text class="label">移位数量:</text>
<text class="tt">{{ item.transfer_qty }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">源库位:</text>
<text class="tt">{{ item.from_position_id_val }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">源容器:</text>
<text class="tt">{{ item.from_container_id_val }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">目的库位:</text>
<text class="tt">{{ item.to_position_id_val }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">目的容器:</text>
<text class="text">{{ item.to_container_id_val }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">操作人:</text>
<text class="text">{{ item.exec_uname }}</text>
</view>
<view class="input-box row verCenter">
<text class="label">操作时间:</text>
<text class="text">{{ item.exec_time }}</text>
</view>
</view>
</view>
<!-- 无数据展示 -->
<view class="no-date column rowCenter verCenter" v-else>
<text class="iconfont icon-a-juxing21"></text>
<text class="text">查不到当前数据</text>
</view>
</view>
</template>
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
export default {
data() {
return {
index: 0,
array: ['全量搜索'],
input_flag: false,
page: 1,
limit: 50,
list: [],
hasMoreData: true, //是否分页加载
searchParams: {
search_val: ''
}
};
},
onNavigationBarButtonTap(e) {
if (e.index == 0) {
uni.reLaunch({
url: '/pages/index/index'
});
}
},
onReachBottom() {
if (!this.hasMoreData) {
return;
}
this.page++;
this.getData();
},
onShow() {
this.getData();
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
/**
* 清空数据
*/
clearInput() {
this.resetChange();
this.searchParams.search_val = '';
this.input_flag = false;
this.getData();
},
/**
* 全量搜索
* @param {Object} event
*/
handleInput: debounce(function(event) {
this.resetChange();
var val = event.target.value;
if (val) {
this.input_flag = true;
this.searchParams.search_val = val;
} else {
this.input_flag = false;
this.searchParams.search_val = '';
}
this.getData();
}, 500),
/**
* 获取列表数据
*/
getData() {
this.request(API.quickTransferLog, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
if (res.data.list.length > 0) {
this.hasMoreData = true;
this.list = this.list.concat(res.data.list);
} else {
this.hasMoreData = false;
}
} else {
uni.showToast({
title: res.msg,
icon: 'none'
});
}
});
},
/**
* 重置
*/
resetChange() {
this.list = [];
this.page = 1;
}
}
};
</script>
<style scoped lang="scss">
@import '@/assets/css/stockRecheck/record.scss';
</style>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment