Commit 283f77ac by LJM

bug

parent 62207c7e
...@@ -60,7 +60,7 @@ ...@@ -60,7 +60,7 @@
margin-bottom: 11rpx; margin-bottom: 11rpx;
flex: 0 0 50%; flex: 0 0 50%;
.label { .label {
width: 82rpx; width: 110rpx;
font-size: 17rpx; font-size: 17rpx;
color: #919399; color: #919399;
white-space: nowrap; white-space: nowrap;
......
...@@ -15,6 +15,12 @@ ...@@ -15,6 +15,12 @@
<template v-if="index == 0"> <template v-if="index == 0">
<input class="uni-input" placeholder="请扫描或输入容器编码" placeholder-style="color:#919399" focus v-model="searchParams.container_sn" @input="handleInput(1, $event)" /> <input class="uni-input" placeholder="请扫描或输入容器编码" placeholder-style="color:#919399" focus v-model="searchParams.container_sn" @input="handleInput(1, $event)" />
</template> </template>
<template v-if="index == 1">
<input class="uni-input" placeholder="请输入创建人" placeholder-style="color:#919399" focus v-model="searchParams.create_name" @input="handleInput(2, $event)" />
</template>
<template v-if="index == 2">
<input class="uni-input" placeholder="请输入更新人" placeholder-style="color:#919399" focus v-model="searchParams.update_name" @input="handleInput(3, $event)" />
</template>
</view> </view>
<text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text> <text class="iconfont icon-a-juxing11" @click="clearInput()" v-if="input_flag"></text>
</view> </view>
...@@ -116,10 +122,10 @@ ...@@ -116,10 +122,10 @@
</view> </view>
<view class="item row verCenter"> <view class="item row verCenter">
<text class="label">长*宽*高:</text> <text class="label">长*宽*高:</text>
<view class="input-box row"> <view class="input-box row avarage">
<input type="text" v-model="foramParams.length" class="uni-input" style="width: 33.3%;" /> <input type="text" v-model="foramParams.length" class="uni-input" style="width: 32%;" />
<input type="text" v-model="foramParams.width" class="uni-input" style="width: 33.3%;" /> <input type="text" v-model="foramParams.width" class="uni-input" style="width: 32%;" />
<input type="text" v-model="foramParams.height" class="uni-input" style="width: 33.3%;" /> <input type="text" v-model="foramParams.height" class="uni-input" style="width: 32%;" />
</view> </view>
</view> </view>
<view class="item row verCenter"> <view class="item row verCenter">
...@@ -172,7 +178,7 @@ export default { ...@@ -172,7 +178,7 @@ export default {
limit: 50, limit: 50,
input_flag: false, input_flag: false,
index: 0, index: 0,
array: ['容器编码'], array: ['容器编码', '创建人', '更新人'],
list: [], list: [],
filter_list: [], //筛选已选中的列表 filter_list: [], //筛选已选中的列表
filter_id: [], ///筛选已选中id filter_id: [], ///筛选已选中id
...@@ -180,7 +186,9 @@ export default { ...@@ -180,7 +186,9 @@ export default {
hasMoreData: true, //是否分页加载 hasMoreData: true, //是否分页加载
searchParams: { searchParams: {
search_date: '', //日期 search_date: '', //日期
container_sn: '' //容器编码 container_sn: '', //容器编码
create_name: '', //创建人
update_name: '' //更新人
}, },
foramParams: { foramParams: {
id: '', id: '',
...@@ -210,6 +218,7 @@ export default { ...@@ -210,6 +218,7 @@ export default {
}, },
onShow() { onShow() {
this.resetChange(); this.resetChange();
this.searchParams.search_date = this.getRecentMonthDateRange(0);
this.getData(); this.getData();
}, },
methods: { methods: {
...@@ -261,8 +270,32 @@ export default { ...@@ -261,8 +270,32 @@ export default {
* 导出 * 导出
*/ */
exportContainerStock() { exportContainerStock() {
this.request(API.exportContainerStock, 'POST', { ids: decodeURIComponent(this.filter_id.join(',')) }, true).then(res => { this.request(API.exportContainerStock, 'POST', this.searchParams, true).then(res => {
if (res.code === 0) { if (res.code === 0) {
uni.downloadFile({
url: res.data.oss_file_url,
success: function(res) {
const filePath = res.tempFilePath;
uni.openDocument({
filePath: filePath,
showMenu: true,
success: function(res) {
console.log('打开文档成功');
},
fail: function() {
uni.showModal({
title: '提示',
content: '暂不支持该文件类型预览',
showCancel: false
});
console.log('打开文档失败');
}
});
},
fail(error) {
console.log(error);
}
});
} else { } else {
uni.showToast({ uni.showToast({
title: res.msg, title: res.msg,
...@@ -312,9 +345,15 @@ export default { ...@@ -312,9 +345,15 @@ export default {
this.resetChange(); this.resetChange();
var val = event.target.value; var val = event.target.value;
this.searchParams.container_sn = ''; this.searchParams.container_sn = '';
this.searchParams.create_name = '';
this.searchParams.update_name = '';
if (val) { if (val) {
if (type == 1) { if (type == 1) {
this.searchParams.container_sn = val; this.searchParams.container_sn = val;
} else if (type == 2) {
this.searchParams.create_name = val;
} else if (type == 3) {
this.searchParams.update_name = val;
} }
this.input_flag = true; this.input_flag = true;
} else { } else {
...@@ -341,7 +380,7 @@ export default { ...@@ -341,7 +380,7 @@ export default {
* 获取列表数据 * 获取列表数据
*/ */
getData() { getData() {
this.request(API.getContainerList, 'GET', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => { this.request(API.getContainerList, 'POST', { page: this.page, limit: this.limit, ...this.searchParams }, false).then(res => {
if (res.code === 0) { if (res.code === 0) {
if (res.data.total > 0) { if (res.data.total > 0) {
this.hasMoreData = true; this.hasMoreData = true;
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</view> </view>
<view class="item row verCenter"> <view class="item row verCenter">
<text class="label">状态:</text> <text class="label">状态:</text>
<text class="text">{{ detail.stock_out_info.stock_out_status_val }}</text> <text class="text">{{ detail.stock_out_info.stock_out_status_val }}</text>
</view> </view>
</view> </view>
<view class="bor"></view> <view class="bor"></view>
...@@ -430,8 +430,10 @@ export default { ...@@ -430,8 +430,10 @@ export default {
this.real_shipping_type_index = real_shipping_type_index[0]; this.real_shipping_type_index = real_shipping_type_index[0];
this.realShippChage(); //更新物流公司 this.realShippChage(); //更新物流公司
this.formParams.real_shipping_id = res.data.stock_out_address.real_shipping_id; //物流公司 this.formParams.real_shipping_id = res.data.stock_out_address.real_shipping_id; //物流公司
let real_shipping_id_index = this.findIndex(this.real_shipping_id_data, this.formParams.real_shipping_id); let real_shipping_id_index = this.findIndex(this.real_shipping_id_data, this.formParams.real_shipping_id);
console.log(real_shipping_id_indexs);
this.real_shipping_id_index = real_shipping_id_index[0]; this.real_shipping_id_index = real_shipping_id_index[0];
this.formParams.real_shipping_mode = res.data.stock_out_address.real_shipping_mode; //物流模式 this.formParams.real_shipping_mode = res.data.stock_out_address.real_shipping_mode; //物流模式
......
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