Commit 2814cc5b by LJM

bug

parent 9c782664
......@@ -44,8 +44,6 @@
margin-top: 10rpx;
height: 60rpx;
border-radius: 10rpx;
.left {
height: 100%;
background-color: #ffffff;
.text {
padding-left: 30rpx;
......@@ -58,7 +56,9 @@
font-weight: bold;
}
.search-width {
width: 360rpx;
width: calc(100% - 164rpx);
padding-right: 22rpx;
height: 100%;
.icon-juxing1 {
font-size: 30rpx;
color: #919399;
......@@ -66,19 +66,21 @@
margin-right: 13rpx;
}
.uni-input {
width: 80%;
height: 60rpx;
font-size: 18rpx;
color: #484b59;
}
.uni-arrow {
width: 14rpx;
height: 9rpx;
background: url('https://img.ichunt.com/images/ichunt/202304/10/e4c72319ad41ce1425f71cc6ec35f111.png') no-repeat center;
background-size: contain;
margin-left: 12rpx;
}
}
.icon-box {
width: 75rpx;
height: 60rpx;
background: #ffffff;
border-radius: 10rpx;
.iconfont {
font-size: 30rpx;
color: #56585e;
.wrap {
width: 100%;
height: 100%;
}
}
}
......
......@@ -43,11 +43,11 @@
<view class="check-box-icon" @click="filterChange(index)"></view>
<view class="text-item row verCenter">
<text class="label">入库单号:</text>
<text class="t1">--</text>
<text class="t1">{{ item.stock_in_sn }}</text>
</view>
<view class="text-item row verCenter">
<text class="label">物流单号:</text>
<text class="t1">--</text>
<text class="t1">{{ item.tracking_no }}</text>
</view>
<view class="bor row"></view>
<view class="text-item row verCenter">
......@@ -74,7 +74,7 @@
<text class="label">待理货数量:</text>
<text class="ttt">{{ item.wait_tally_qty }}</text>
</view>
<navigator class="btn-box row" url="/pages/tallyReceive/operate" hover-class="none"><view class="btn row rowCenter verCenter">理货</view></navigator>
<navigator class="btn-box row" :url="'/pages/tallyReceive/operate?stock_in_item_id=' + item.stock_in_item_id" hover-class="none"><view class="btn row rowCenter verCenter">理货</view></navigator>
</view>
</view>
<view class="no-date column rowCenter verCenter" v-else>
......
......@@ -12,22 +12,30 @@
<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" />
<template v-if="index == 0">
<input class="uni-input" placeholder="请输入物流单号" placeholder-style="color:#919399" focus v-model="searchParams.tracking_no" @input="handleInput(1, $event)" />
</template>
<template v-else-if="index == 1">
<input class="uni-input" placeholder="请输入入库单号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_sn" @input="handleInput(2, $event)" />
</template>
<template v-else-if="index == 2">
<input class="uni-input" placeholder="请输入入仓号" placeholder-style="color:#919399" focus v-model="searchParams.stock_in_with_stock_in_items_inhouse" @input="handleInput(3, $event)" />
</template>
</view>
<text class="iconfont icon-a-juxing11"></text>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view>
</view>
<!-- 容器选择 -->
<view class="search-type row verCenter bothSide">
<view class="left row verCenter">
<view class="text">容 器</view>
<view class="search-width row verCenter">
<view class="search-width row verCenter" v-if="tallyContainer.length > 0">
<text class="iconfont icon-juxing1"></text>
<input class="uni-input" placeholder="请输入容器" placeholder-style="color:#919399" />
</view>
<picker @change="bindPickerContainChange" :value="indexContainer" :range="tallyContainer" range-key="name" style="width: 100%;height: 100%;">
<view class="row verCenter bothSide wrap">
<view class="uni-input row verCenter">{{ tallyContainer[indexContainer].name || '请选择' }}</view>
<view class="uni-arrow"></view>
</view>
<view class="row verCenter">
<view class="icon-box row rowCenter verCenter" style="margin-right: 15rpx;"><text class="iconfont icon-juxing3"></text></view>
<view class="icon-box row rowCenter verCenter"><text class="iconfont icon-a-juxing12"></text></view>
</picker>
</view>
</view>
<view class="section">
......@@ -173,18 +181,131 @@
<script>
import { API } from '@/util/api.js';
import debounce from 'lodash/debounce';
import w_md5 from '@/util/md5.js';
export default {
data() {
return {
stock_in_item_id: '',
noexebshowFalg: true, //控制是否会触发生命周期
print_flag: true, //是否打印
input_flag: false,
page: 1,
limit: 1,
index: 0,
array: ['物流单号', '入库单号', '入仓号']
indexContainer: -1,
array: ['物流单号', '入库单号', '入仓号'],
tallyContainer: [], //容器列表
detail: {}, //详情的数据
image_list: [], //图片列表
maxNum: 10, //最大上传图片数量
searchParams: {
stock_in_sn: '', //入库单号
tracking_no: '', //物流单号
stock_in_with_stock_in_items_inhouse: '', //入仓单号
container_id: '' //容器
},
formParams: {
container_id: '',
tally_remark: '',
image_ids: '',
is_print: 1
}
};
},
onLoad(options) {
this.stock_in_item_id = options.stock_in_item_id || '';
},
onShow() {
this.getData();
this.getTallyContainer();
},
watch: {
image_list(arr) {
if (arr.length > 0) {
this.formParams.image_ids = JSON.stringify(arr);
}
}
},
methods: {
bindPickerChange: function(e) {
console.log('picker发送选择改变,携带值为', e.detail.value);
this.index = e.detail.value;
},
bindPickerContainChange(e) {
this.indexContainer = e.detail.value;
this.formParams.container_id = this.tallyContainer[e.detail.value].id;
this.searchParams.container_id = this.tallyContainer[e.detail.value].id;
this.getData();
},
/**
* 清空数据
*/
clearInput() {
this.input_flag = false;
if (this.index == 0) {
this.searchParams.tracking_no = '';
} else if (this.index == 1) {
this.searchParams.stock_in_sn = '';
} else if (this.index == 2) {
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
}
this.getData();
},
/**
* 单号搜索
* @param {Object} event
*/
handleInput: debounce(function(type, event) {
var val = event.target.value;
this.searchParams.tracking_no = '';
this.searchParams.stock_in_sn = '';
this.searchParams.stock_in_with_stock_in_items_inhouse = '';
if (val) {
if (type == 1) {
this.searchParams.tracking_no = val;
} else if (type == 2) {
this.searchParams.stock_in_sn = val;
} else if (type == 3) {
this.searchParams.stock_in_with_stock_in_items_inhouse = val;
}
this.input_flag = true;
} else {
this.input_flag = false;
}
this.getData();
}, 500),
/**
* 获取详情数据
*/
getData() {
this.request(API.waitTallyReceiveList, 'POST', { page: this.page, limit: this.limit, stock_in_item_id: this.stock_in_item_id, ...this.searchParams }, false).then(res => {
if (res.code === 0) {
this.detail = res.data.list[0];
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
},
/**
* 获取容器列表数据
*/
getTallyContainer() {
this.request(API.getTallyContainer, 'GET', {}, false).then(res => {
if (res.code === 0) {
this.tallyContainer = res.data.list;
} else {
uni.showToast({
title: res.msg,
icon: 'error'
});
}
});
},
showDrawer() {
this.$refs.showRight.open();
},
......
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