Commit da2d0d9a by LJM

移动端--【分货登记】型号支持模糊查询及【打印入仓号】排列优化

parent 8a59a19f
......@@ -2,14 +2,6 @@
padding: 15rpx 22rpx;
.radio-search-box {
height: 57rpx;
.total-text {
font-size: 16rpx;
color: #919399;
text {
padding: 0 5rpx;
color: #1969f9;
}
}
}
.search-all-box {
height: 60rpx;
......@@ -33,6 +25,16 @@
margin-left: 13rpx;
}
}
.total-text {
margin-top: 15rpx;
justify-content: flex-end;
font-size: 16rpx;
color: #919399;
text {
padding: 0 5rpx;
color: #1969f9;
}
}
.print-btn {
font-size: 23rpx;
color: #1969f9;
......@@ -460,4 +462,32 @@
}
}
}
.print {
margin-top: 54rpx;
.print-text {
margin-bottom: 54rpx;
.t1 {
font-size: 20rpx;
color: #919399;
}
.t2 {
font-size: 20rpx;
color: #1969f9;
padding: 0 2rpx;
}
.copy {
font-size: 20rpx;
color: #1969f9;
}
}
.print-content {
flex-wrap: wrap;
.box {
width: 33.3%;
height: 50rpx;
font-size: 20rpx;
color: #292b33;
}
}
}
}
......@@ -18,7 +18,6 @@
</label>
</radio-group>
</view>
<view class="total-text" v-if="list.length > 0"><text>{{total}}</text>条数据</view>
</view>
<view class="search-all row verCenter bothSide">
<view class="search-all-box row verCenter" style="width: 80%;">
......@@ -42,6 +41,10 @@
</view>
<view class="print-btn" @click="print()">打印入仓号</view>
</view>
<view class="total-text row" v-if="list.length > 0">
<view class="row"><text>{{total}}</text>条数据</view>
<view class="row" style="margin-left: 15rpx;"><text>{{erp_order_sn_num}}</text>个入仓号</view>
</view>
<!-- 列表数据 -->
<view class="list row bothSide" v-if="list.length > 0">
<view class="box column" v-for="(item, index) in list" :key="index" :class="{ curr: filter_list[index] }" @click="filterChange(index)">
......@@ -177,6 +180,36 @@
</view>
</view>
</uni-drawer>
<!-- 打印入仓号 -->
<uni-drawer ref="showRightPrint" mode="right">
<view class="uni-drawer-layer">
<view class="title row rowCenter verCenter">
<text class="iconfont icon-juxing2" @click="closeDrawer()"></text>
<text class="text">打印入仓号</text>
</view>
<view class="print">
<view class="print-text row bothSide verCenter">
<view class="row verCenter">
<text class="t1">您选中</text>
<text class="t2">{{filter_id.length}}</text>
<text class="t1">条数据,共计</text>
<text class="t2">{{erp_order_sn_arr.length}}</text>
<text class="t1">个入仓号</text>
</view>
<view class="copy" @click="copy()">复制入仓号</view>
</view>
<scroll-view scroll-y="true" style="max-height: 440rpx;">
<view class="print-content row">
<view class="box row verCenter rowCenter" v-for="(item,index) in erp_order_sn_arr" :key="index">{{item}}</view>
</view>
</scroll-view>
</view>
<view class="btn row rowCenter verCenter">
<view class="row btn2 row rowCenter verCenter" style="width:50%" @click="closeDrawer()">取消</view>
<view class="row btn1 row rowCenter verCenter" style="width:50%" @click="print(true)">打印</view>
</view>
</view>
</uni-drawer>
</view>
</template>
......@@ -203,6 +236,8 @@
page: 1,
limit: 100,
index: 0,
erp_order_sn_num: 0, //统计入仓号数量
erp_order_sn_arr: [],
array: ['全量搜索', 'FedEx'],
list: [],
filter_list: [], //筛选已选中的列表
......@@ -389,7 +424,7 @@
}
}, 500),
/**
* 货品查询特殊处理
* 货品查询特殊处理 自动查询时间改为1S响应
* @param {Object} type
* @param {Object} event
*/
......@@ -420,6 +455,12 @@
this.hasMoreData = true;
this.list = this.list.concat(res.data);
this.filter_list = createArray(this.list.length, false);
this.erp_order_sn_num = new Set(res.data
.map(item => item.warehouse_receipt_sn)
.filter(Boolean)
).size;
} else {
this.hasMoreData = false;
}
......@@ -609,19 +650,25 @@
/**
* 打印入仓号
*/
print() {
print(flag) {
// 去除重复值
var ids = Array.from(new Set(this.filter_id));
if (!flag) {
if (this.filter_id.length == 0) {
uni.showToast({
title: '请勾选入仓号',
icon: 'error'
});
return false;
} else if (this.filter_id.length > 1) {
this.erp_order_sn_arr = ids;
this.$refs.showRightPrint.open();
return false;
}
}
// 去除重复值
var ids = Array.from(new Set(this.filter_id));
//仓库是写死的,就香港仓库才会操作
this.request(API.printInhouse, 'POST', { inhouse_str: ids.join(','), user_email: this.user_email, warehouse_id: 10 }, true).then(res => {
if (res.code === 0) {
uni.showToast({
......@@ -635,7 +682,6 @@
});
}
});
},
/**
* 重置
......@@ -657,6 +703,19 @@
},
closeDrawer() {
this.$refs.showRight.close();
this.$refs.showRightPrint.close();
},
copy() {
const content = this.erp_order_sn_arr.join(', ');
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制成功',
icon: 'success'
});
}
});
}
}
};
......
// const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
// const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
// const API_BASE = 'http://wms.liexindev.net'; //WMS系统
// const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
const API_BASE_USER = 'http://user.liexindev.net'; //用户系统
const API_BASE_PUR = 'http://pur.liexindev.net'; //采购系统
const API_BASE = 'http://wms.liexindev.net'; //WMS系统
const API_BASE_OSS = 'http://image.liexindev.net'; //oss系统
const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
const API_BASE = 'https://wms.ichunt.net'; //WMS系统
const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
// const API_BASE_USER = 'https://user.ichunt.net'; //用户系统
// const API_BASE_PUR = 'https://purchase.ichunt.net'; //采购系统
// const API_BASE = 'https://wms.ichunt.net'; //WMS系统
// const API_BASE_OSS = 'https://image.ichunt.net'; //oss系统
const API = {
......
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