Commit 52ce8e47 by liangjianmin

js

parent 88183746
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<view class="search-input row bothSide verCenter"> <view class="search-input row bothSide verCenter">
<text class="iconfont icon-a-riqi11"></text> <text class="iconfont icon-a-riqi11"></text>
<text class="iconfont icon-jinggao2" v-if="input_status" @click="clearInput()"></text> <text class="iconfont icon-jinggao2" v-if="input_status" @click="clearInput()"></text>
<input type="text" @input="inputChange()" placeholder="请手动输入入仓号" class="uni-input" v-model="param.orderNo" placeholder-style="color:#6e767a" /> <input type="text" @input="inputChange()" placeholder="请手动输入入仓号" class="uni-input" v-model="erp_order_sn" placeholder-style="color:#6e767a" />
<view class="more row verCenter" :class="{ curr: shade_flag }" @click="filterChange()"> <view class="more row verCenter" :class="{ curr: shade_flag }" @click="filterChange()">
<text class="t1">{{ shade_flag ? '更少条件' : '更多条件' }}</text> <text class="t1">{{ shade_flag ? '更少条件' : '更多条件' }}</text>
<text class="iconfont icon-sanjiaoxing1 arrow"></text> <text class="iconfont icon-sanjiaoxing1 arrow"></text>
...@@ -23,51 +23,51 @@ ...@@ -23,51 +23,51 @@
<view class="tab row verCenter"> <view class="tab row verCenter">
<view class="box row" @click="changeTab(index)" :class="{ curr: index == currentIndex }" :key="index" v-for="(item, index) in textArr"> <view class="box row" @click="changeTab(index)" :class="{ curr: index == currentIndex }" :key="index" v-for="(item, index) in textArr">
<text class="t1">{{ item }}</text> <text class="t1">{{ item }}</text>
<text class="t2">(5)</text> <text class="t2">({{ total }})</text>
</view> </view>
</view> </view>
<view class="list"> <view class="list" v-if="warehouseOperation.length > 0">
<navigator class="box row verCenter" url="/pages/goods/warehouseOperationConfirm" hover-class="none"> <navigator class="box row verCenter" url="/pages/goods/warehouseOperationConfirm" hover-class="none" v-for="(item, index) in warehouseOperation" :key="index">
<text class="status-text">已到货</text> <template v-if="item.arrival_status == 1">
<view class="title column rowCenter verCenter"> <text class="status-text-no">{{ item.arrival_status_cn }}</text>
<text>拆箱</text> </template>
<text>作业</text> <template v-else>
</view> <text class="status-text">{{ item.arrival_status_cn }}</text>
<view class="text column"> </template>
<text class="p1">客户:BAS ELECTRONICS Gmb</text> <template v-if="item.is_unpacking == 0">
<view class="lh"> <view class="title column rowCenter verCenter">
<text class="p2">时间:</text> <text>整箱</text>
<text class="p3 mr98">2020/07/20 15:12</text> <text>作业</text>
<text class="p2">件数:</text>
<text class="p3">2个</text>
</view> </view>
<view class="lh"> </template>
<text class="p2">备注:</text> <template v-else>
<text class="p3">需要拆箱把里面的标签都撕掉</text> <view class="title column rowCenter verCenter">
<text>拆箱</text>
<text>作业</text>
</view> </view>
</view> </template>
</navigator>
<navigator class="box row verCenter" url="/pages/goods/warehouseOperationConfirm" hover-class="none">
<text class="status-text-no">未到货</text>
<view class="title column rowCenter verCenter">
<text>整箱</text>
<text>作业</text>
</view>
<view class="text column"> <view class="text column">
<text class="p1">客户:BAS ELECTRONICS Gmb</text> <text class="p1">客户:{{ item.company_name }}</text>
<view class="mb16"> <view class="lh">
<text class="p2">时间:</text> <text class="p2">时间:</text>
<text class="p3 mr98">2020/07/20 15:12</text> <text class="p3 mr98">{{ item.create_time_cn }}</text>
<text class="p2">件数:</text> <text class="p2">件数:</text>
<text class="p3">2个</text> <text class="p3">{{ item.operation_num_sum }}</text>
</view> </view>
<view> <view class="lh">
<text class="p2">备注:</text> <text class="p2">备注:</text>
<text class="p3">需要拆箱把里面的标签都撕掉</text> <text class="p3">{{ index + 1 }}</text>
</view> </view>
</view> </view>
</navigator> </navigator>
</view> </view>
<template v-else>
<view class="no-data column verCenter rowCenter">
<text class="iconfont icon-jinggao2"></text>
<text class="text">查找不到相关信息</text>
<text class="p">1、请输入正确的入仓号</text>
</view>
</template>
<!-- 遮罩 --> <!-- 遮罩 -->
<view class="shade" v-if="shade_flag" @click="shade_flag = false"></view> <view class="shade" v-if="shade_flag" @click="shade_flag = false"></view>
</view> </view>
...@@ -79,21 +79,45 @@ import { API } from '@/util/api.js'; ...@@ -79,21 +79,45 @@ import { API } from '@/util/api.js';
export default { export default {
data() { data() {
return { return {
flage: false,
shade_flag: false, shade_flag: false,
input_status: false, input_status: false,
date: '', date: '',
datetimerange: ['', ''], datetimerange: ['', ''],
currentIndex: 0, currentIndex: 0,
textArr: ['待作业'] textArr: ['待作业'],
warehouseOperation: [],
erp_order_sn: '',
total: 0,
page: 1,
limit: 10,
is_loading: false
}; };
}, },
onReachBottom() {
if (this.is_loading) return;
this.page++;
this.getData();
},
onShow() { onShow() {
this.getData(); this.getData();
}, },
methods: { methods: {
getData() { getData() {
this.request(API.userInfo, 'POST', {}, false).then(res => {}); this.request(API.warehouseOperationList, 'POST', { page: this.page, limit: this.limit, erp_order_sn: this.erp_order_sn, begin_time: this.datetimerange[0], end_time: this.datetimerange[1] }, false).then(res => {
if (res.err_code === 0) {
if (res.data.data.length > 0) {
this.warehouseOperation = this.warehouseOperation.concat(res.data.data);
this.total = res.data.total;
} else {
this.is_loading = true;
}
} else {
uni.showToast({
title: res.err_msg,
icon: 'error'
});
}
});
}, },
changeTab(index) { changeTab(index) {
this.currentIndex = index; this.currentIndex = index;
...@@ -101,7 +125,11 @@ export default { ...@@ -101,7 +125,11 @@ export default {
clearInput() { clearInput() {
this.input_status = false; this.input_status = false;
}, },
inputChange() {}, inputChange() {
this.page = 1;
this.warehouseOperation = [];
this.getData();
},
filterChange() { filterChange() {
this.shade_flag = !this.shade_flag; this.shade_flag = !this.shade_flag;
}, },
...@@ -114,6 +142,8 @@ export default { ...@@ -114,6 +142,8 @@ export default {
this.getData(); this.getData();
}, },
canel() { canel() {
this.page = 1;
this.datetimerange = ['', ''];
this.shade_flag = !this.shade_flag; this.shade_flag = !this.shade_flag;
this.getData(); this.getData();
} }
......
...@@ -134,3 +134,25 @@ image { ...@@ -134,3 +134,25 @@ image {
z-index: 9; z-index: 9;
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
} }
.no-data {
margin-top: 80rpx;
.iconfont {
font-size: 188rpx;
color: #f39d18;
margin-bottom: 16rpx;
}
.text {
font-size: 28rpx;
color: #1e2021;
font-weight: bold;
}
.link {
color: #197adb;
font-weight: bold;
}
.p {
margin-top: 17rpx;
font-size: 22rpx;
color: #6e767a;
}
}
\ No newline at end of file
const API_BASE = 'https://api.ichunt.com'; //const API_BASE = 'https://api.ichunt.com';
//const API_BASE = 'http://api.liexin.com' const API_BASE = 'http://api.liexin.com'
const API = { const API = {
/** /**
* 上传数据 * 上传数据
...@@ -32,7 +32,11 @@ const API = { ...@@ -32,7 +32,11 @@ const API = {
/** /**
* 获取入仓号打印类型 * 获取入仓号打印类型
* */ * */
getErpOrderSnPrintLabelType: API_BASE + '/supplywechatwms/getErpOrderSnPrintLabelType' getErpOrderSnPrintLabelType: API_BASE + '/supplywechatwms/getErpOrderSnPrintLabelType',
/**
* 仓内作业列表
* */
warehouseOperationList: API_BASE + '/supplywechatwms/warehouseOperationList'
} }
......
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