Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
W
wly-APP
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘川
wly-APP
Commits
29491080
Commit
29491080
authored
Mar 25, 2025
by
xiangzj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
终端要货
parent
79b78cb9
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
2497 additions
and
42 deletions
+2497
-42
pages.json
pages.json
+53
-0
goodBoxNum - 副本.nvue
pages/goodBoxNum/goodBoxNum - 副本.nvue
+155
-0
goodBoxNum.nvue
pages/goodBoxNum/goodBoxNum.nvue
+317
-0
home.vue
pages/home/home.vue
+8
-1
logistics.nvue
pages/logistics/logistics.nvue
+1
-1
meeting-manage.vue
pages/meeting-manage/meeting-manage.vue
+63
-0
order-item.nvue
pages/my-purchase/order-item.nvue
+14
-2
purchase-main.nvue
pages/purchase-main/purchase-main.nvue
+18
-6
purchase-receive.nvue
pages/purchase-receive/purchase-receive.nvue
+10
-15
select-agent.vue
pages/select-agent/select-agent.vue
+403
-0
select-terminal.vue
pages/select-terminal/select-terminal.vue
+50
-3
order-item.nvue
pages/terminal-list/order-item.nvue
+416
-0
order-page.nvue
pages/terminal-list/order-page.nvue
+370
-0
terminal-list.nvue
pages/terminal-list/terminal-list.nvue
+563
-0
usercenter.nvue
pages/usercenter/usercenter.nvue
+30
-11
api.helper.js
servers/api.helper.js
+1
-1
http.interceptor.js
servers/http.interceptor.js
+2
-2
purchaseList.js
servers/purchaseList.js
+5
-0
terminal.js
servers/terminal.js
+18
-0
terminalIn.png
static/image/terminalIn.png
+0
-0
No files found.
pages.json
View file @
29491080
...
...
@@ -777,6 +777,21 @@
}
}
},
{
"path"
:
"pages/goodBoxNum/goodBoxNum"
,
"style"
:
{
"app-plus"
:
{
"titleNView"
:
{
"titleAlign"
:
"left"
,
"titleColor"
:
"#333"
,
"titleSize"
:
"17px"
,
"backgroundColor"
:
"#fff"
,
"titleText"
:
"要货单箱码"
,
"autoBackButton"
:
true
}
}
}
},
{
"path"
:
"pages/my-order/my-order"
,
"style"
:
{
...
...
@@ -1218,6 +1233,28 @@
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/meeting-manage/meeting-manage"
,
"style"
:
{
"app-plus"
:
{
"titleNView"
:
{
"titleAlign"
:
"left"
,
"titleColor"
:
"#333"
,
"titleSize"
:
"17px"
,
"backgroundColor"
:
"#fff"
,
"titleText"
:
""
,
"autoBackButton"
:
true
,
"splitLine"
:
{
"color"
:
"#ccc"
,
"height"
:
"0.5px"
}
}
},
"navigationBarTitleText"
:
""
,
"enablePullDownRefresh"
:
false
}
},
{
"path"
:
"pages/loan-query/loan-query"
,
...
...
@@ -1235,6 +1272,22 @@
//
"enablePullDownRefresh"
:
true
}
},
{
"path"
:
"pages/terminal-list/terminal-list"
,
"style"
:
{
"app-plus"
:
{
"titleNView"
:
{
"titleAlign"
:
"left"
,
"titleColor"
:
"#333"
,
"titleSize"
:
"17px"
,
"backgroundColor"
:
"transparent"
,
"titleText"
:
"直配订单查询"
,
"autoBackButton"
:
true
}
},
"enablePullDownRefresh"
:
true
}
},
{
"path"
:
"pages/loan-query/loan-detail"
,
"style"
:
{
...
...
pages/goodBoxNum/goodBoxNum - 副本.nvue
0 → 100644
View file @
29491080
<template>
<view class="lists">
<view class="status_bar" :style="navHeight"></view>
<view class="header-bg">
</view>
<view class="main">
<view class="list-wrapper" :style="scrollHeight">
<list class="list-block" scrollable loadmoreoffset='1' show-scrollbar='false'>
<cell class="view scroll-area">
<view class="order-main view">
<view class="top">
<text class="title-no">{{boxNum}}</text>
</view>
<!-- <view class="tips title-no ">箱码</view> -->
<view class="box-num">
<view v-for="item in dataList">
<view class="box-code">{{item.boxBarcode}}</view>
</view>
</view>
</view>
</cell>
</list>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from 'vuex'
import { findGoodsSingleJoinBoxBarcode } from '@/servers/purchaseList.js'
export default {
data() {
return {
dataList: [],
boxNum: '',
}
},
computed: {
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 66 }px`,
}
},
navHeight() {
return {
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
...mapState(['sysinfo','userInfo'])
},
onLoad() {
this.winHeight = `height:${this.sysinfo.safeArea.height}px`;
this.navHeight = `height:${this.sysinfo.safeArea.top + 44}px`;
},
onBackPress() {
},
created() {
this.getBoxNum()
},
onLoad(option) {
this.boxNum = option.num
},
methods: {
async getBoxNum(){
const formdata = {
"user_bp": this.userInfo.code,
"role": 'WLY001',
"wantCode": [{
"sign": "I",
"option": "CP",
// "low": "*"+ this.boxNum +"*",
"low": "*FHZG20020840*",
"high": ""
}],
"page": 1,
"pagesize": 100,
"totalCount": 100,
"is_result": 1,
"sort": [{
"field_name": "createdDate",
"field_sort": "X"
}],
"billStatus": [{
"sign": "I",
"option": "EQ",
"low": "E003",
"high": ""
}],
"boxBarcodeNotNull": true
}
const res = await findGoodsSingleJoinBoxBarcode(formdata)
this.dataList = res.data.Rows
}
}
}
</script>
<style lang="scss" scoped>
.view {
flex-direction: column;
}
.header-bg {
height: 284rpx;
margin-top: -88rpx;
}
.header-bg-img {
width: 750rpx;
}
.lists {
flex-direction: column;
}
.main {
position: relative;
flex-direction: column;
margin-top: -164rpx;
padding: 0 32rpx;
}
.list-wrapper {
display: flex;
flex-direction: column;
}
.title-no {
font-size: 32rpx;
font-weight: 600;
color: #000;
margin-bottom: 20rpx;
}
.tips{
margin-top: 40rpx;
margin-bottom: 20rpx;
}
.box-num{
background: #f8f8f8;
min-height: 400rpx;
width: 100%;
border-radius: 10px;
display: flex;
flex-direction: column;
padding: 24rpx;
}
.box-code{
font-size: 28rpx;
color: #000;
line-height: 44rpx;
font-weight: 600;
}
</style>
pages/goodBoxNum/goodBoxNum.nvue
0 → 100644
View file @
29491080
<template>
<view class="lists">
<view class="status_bar" :style="navHeight"></view>
<!-- <view class="header-bg">
<image class="header-bg-img" src="@/static/image/nav_bg@3x.png" mode="scaleToFill"></image>
</view> -->
<view class="main" :style="mainHeight">
<view class="middle view planout-block-item">
<view class="text-block">
<text class="middle-date">要货单号</text>
<input class="middle-date-des" type="text" v-model="boxNum" placeholder="请输入" disabled />
</view>
<view class="text-block text-block-last">
<text class="middle-date">箱码编号</text>
<input class="middle-date-des" type="text" v-model="boxBarcode" placeholder="请输入" />
</view>
</view>
<view class="planout-block">
<button class="btn" type="default" @tap="getBoxNum">
<text class="btn-text">查询</text>
</button>
</view>
<list class="view scroll-area code-box" scrollable loadmoreoffset='1' show-scrollbar='false' v-if="dataList.length">
<cell class="" v-for="item in dataList">
<view class="box-code">{{item.boxBarcode}}</view>
</cell>
</list>
<no-data v-if="dataList.length === 0"></no-data>
</view>
</view>
</template>
<script>
import {
mapState
} from 'vuex'
import noData from '@/components/nodata.nvue';
import { findGoodsSingleJoinBoxBarcode } from '@/servers/purchaseList.js'
export default {
data() {
return {
dataList: [],
boxNum: '',
boxBarcode: ''
}
},
components: {
noData,
},
computed: {
navHeight() {
return {
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
mainHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 44 }px`,
}
},
scrollHeight() {
return {
'height': `${this.sysinfo.safeArea.height - 44}px`
}
},
...mapState(['sysinfo','userInfo'])
},
onLoad() {
},
onBackPress() {
},
created() {
this.getBoxNum()
},
onLoad(option) {
this.boxNum = option.num
},
methods: {
async getBoxNum(){
uni.showLoading({
title: '加载中'
});
const formdata = {
"user_bp": this.userInfo.code,
"role": 'WLY001',
"wantCode": [{
"sign": "I",
"option": "CP",
"low": "*"+ this.boxNum +"*",
// "low": "*FHZG20020840*",
"high": ""
}],
"page": 1,
"pagesize": 10000,
"totalCount": 10000,
"is_result": 1,
"sort": [{
"field_name": "createdDate",
"field_sort": "X"
}],
"billStatus": [{
"sign": "I",
"option": "EQ",
"low": "E003",
"high": ""
}],
"boxBarcode": [{
"sign": "I",
"option": "CP",
"low": "*"+ this.boxBarcode +"*",
"high": ""
}],
"boxBarcodeNotNull": true
}
!this.boxBarcode && delete formdata.boxBarcode
try{
const res = await findGoodsSingleJoinBoxBarcode(formdata)
uni.hideLoading();
this.dataList = res.data.Rows
}catch(e){
uni.hideLoading();
}
}
}
}
</script>
<style lang="scss" scoped>
.view {
flex-direction: column;
}
.header-bg {
height: 284rpx;
opacity: 0.72;
margin-top: -88rpx;
}
.header-bg-img {
width: 750rpx;
}
.lists {
position: relative;
flex-direction: column;
background: #f0f4f5;
flex: 1;
}
.main {
position: relative;
flex-direction: column;
padding: 0 16rpx;
padding-top: 40rpx;
// background-color: #fff;
}
.middle {
background-color: #fff;
border-radius: 16rpx;
padding: 0rpx 64rpx 0rpx 48rpx;
}
.text-block {
overflow: hidden;
height: 96rpx;
margin-bottom: 14rpx;
border-bottom: 1px solid #f4f5f6;
}
.text-block-last {
margin-bottom: 0;
border-bottom: 0;
}
.middle-date {
flex: 2;
font-size: 28rpx;
line-height: 96rpx;
color: #333;
margin-bottom: 8rpx;
}
.middle-date-des {
flex: 3;
font-size: 28rpx;
line-height: 96rpx;
height: 96rpx;
overflow: hidden;
text-overflow: ellipsis;
color: #888;
}
.picker-year {
position: relative;
border-radius: 4px;
align-items: center;
line-height: normal;
}
.uni-list-cell {
flex: 1;
height: 96rpx;
line-height: 96rpx;
}
.uni-list-cell-db {
flex: 1;
}
.picker-block {
flex: 1;
}
.uni-input-text {
height: 96rpx;
line-height: 96rpx;
font-size: 14px;
color: #888;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.btn {
flex: 1;
height: 92rpx;
background: $wly-primary-color;
border-radius: 46rpx;
}
.btn-text {
color: #fff;
font-size: 34rpx;
}
.navs-block {
flex-direction: column;
background-color: #fff;
padding-top: 40rpx;
}
.navs-tab {
display: flex;
flex: 1;
align-items: center;
height: 60rpx;
border-bottom: 1px solid #F4F5F6;
padding-bottom: 8rpx;
}
.navs-tab-item {
display: flex;
justify-content: center;
flex: 1;
align-items: center;
height: 50rpx;
overflow: hidden;
}
.search-type-text {
color: #333;
font-size: 28rpx;
}
.icon-arrow-down {
width: 6px;
height: 4px;
margin-left: 16rpx;
}
.planout-block {
display: flex;
justify-content: space-between;
margin-top: 30rpx;
margin-bottom: 30rpx;
padding: 0 24rpx;
}
.btn {
flex: 1;
height: 92rpx;
background: $wly-primary-color;
border-radius: 46rpx;
}
.btn-text {
color: #fff;
font-size: 34rpx;
}
.title-no {
font-size: 32rpx;
font-weight: 600;
color: #000;
margin-bottom: 20rpx;
}
.tips{
margin-top: 40rpx;
margin-bottom: 20rpx;
}
.code-box{
background: #f8f8f8;
border-radius: 20rpx;
display: flex;
flex-direction: column;
padding: 40rpx 24rpx;
margin-bottom: 40rpx;
}
.box-num{
// min-height: 400rpx;
}
.box-code{
font-size: 28rpx;
color: #000;
line-height: 44rpx;
font-weight: 600;
}
.scroll-area {
overflow-y: scroll;
}
</style>
pages/home/home.vue
View file @
29491080
...
...
@@ -165,7 +165,13 @@
<text
class=
"item-block__label item-more"
@
click=
"entryHandle('out-web-site')"
>
查看更多 >
</text>
</view>
</view>
<view
class=
"uni-margin-wrap"
>
<view
class=
"uni-margin-wrap"
style=
"padding: 20px 10px;"
>
<view
class=
"swiper-title"
>
<text
class=
"item-block__label"
>
宴会管理
</text>
<text
class=
"item-block__label item-more"
@
click=
"entryHandle('meeting-manage')"
>
查看更多 >
</text>
</view>
</view>
<view
class=
"uni-margin-wrap"
style=
"padding: 20px 10px;"
>
<view
class=
"swiper-title"
>
<text
class=
"item-block__label"
>
资讯
</text>
<text
class=
"item-block__label item-more"
@
click=
"entryHandle('information')"
>
查看更多 >
</text>
...
...
@@ -469,6 +475,7 @@
flex-direction
:
column
;
box-sizing
:
border-box
;
background
:
#f0f4f5
;
overflow
:
auto
;
}
.status_bar
{
...
...
pages/logistics/logistics.nvue
View file @
29491080
...
...
@@ -3,7 +3,7 @@
<view class="status_bar" :style="navHeight"></view>
<view class="apply-history-wrapper view">
<view class="middle view">
<
view class="title">发运单号:FH200333222</view
>
<
!-- <view class="title">发运单号:FH200333222</view> --
>
<view class="steps">
<view class="steps__row-container">
<view class="steps__row-line-item">
...
...
pages/meeting-manage/meeting-manage.vue
0 → 100644
View file @
29491080
<
template
>
<view
class=
""
>
<view
class=
"status_bar"
:style=
"navHeight"
></view>
<web-view
ref=
"web-view"
class=
"uni-flex-item"
:src=
"src"
:webview-styles=
"webview_styles"
@
message=
"message"
@
error=
"error"
@
loading=
"loading"
@
loaded=
"loaded"
>
</web-view>
</view>
</
template
>
<
script
>
import
{
mapState
}
from
'vuex'
export
default
{
data
()
{
return
{
src
:
''
,
webview_styles
:
{
}
}
},
onLoad
()
{
// this.src = 'https://uat.wuliangye.com.cn/market-workbench-dealer-audit/?dealerId='+this.userInfo.code //测试环境
this
.
src
=
'https://yingxiao.wuliangye.com.cn/market-workbench-dealer-audit/?dealerId='
+
this
.
userInfo
.
code
//生产环境
},
computed
:
{
...
mapState
([
'userInfo'
]),
navHeight
()
{
return
{
'height'
:
`100px`
}
},
},
methods
:
{
message
(
event
)
{
console
.
log
(
JSON
.
stringify
(
event
.
detail
));
},
error
(
event
)
{
console
.
log
(
JSON
.
stringify
(
event
.
detail
));
},
loading
(
event
)
{
console
.
log
(
JSON
.
stringify
(
event
.
type
));
},
loaded
(
event
)
{
console
.
log
(
JSON
.
stringify
(
event
.
type
));
},
}
}
</
script
>
<
style
>
.uni-input-v
{
padding
:
10
rpx
0
;
}
.uni-btn-ml
{
margin-left
:
10
rpx
;
}
.uni-flex-item
{
height
:
100%
}
.status_bar
{
height
:
var
(
--status-bar-height
);
}
</
style
>
pages/my-purchase/order-item.nvue
View file @
29491080
...
...
@@ -40,6 +40,9 @@
<text class="middle-date">{{newsItem.saveEnddate}}</text>
</view>
</view>
<view class="text-block text-block-last box-num" v-if="newsItem.wantCode.includes('FHZG')" @click="goBoxNum(newsItem)">
<button class="title-info__status" type="default"><text class="item-block-btn__text">箱码</text></button>
</view>
</view>
</view>
<view class="bottom view">
...
...
@@ -232,6 +235,11 @@
// }, 100);
},
methods: {
goBoxNum(item){
uni.navigateTo({
url: `/pages/goodBoxNum/goodBoxNum?num=${item.wantCode}`
})
},
async getFiles(id) {
const params = {
bizId: id,
...
...
@@ -288,8 +296,8 @@
this.receiveInfoHeight = '132'
}
},
checkLogistics() {
const num = 'dfb0ebae8103034ccb863d3702e22eb6'
checkLogistics(
num
) {
//
const num = 'dfb0ebae8103034ccb863d3702e22eb6'
uni.navigateTo({
url: `/pages/logistics/logistics?logisticno=${num}`
})
...
...
@@ -564,4 +572,8 @@
margin-top: 20rpx;
flex-direction: column;
}
.box-num{
align-items: flex-end;
margin-right: 26rpx;
}
</style>
pages/purchase-main/purchase-main.nvue
View file @
29491080
...
...
@@ -108,12 +108,13 @@
</view>
<view class="text-block" @click="goTerminal" v-if="orderItem.demandType=='ZDZG'">
<text class="middle-date">收货终端</text>
<view class="middle-date-
des
uni-list picker-year" >
<
view class="uni-list-cell"
>
<view class="uni-list-cell-db">
<view class="middle-date-
terminal
uni-list picker-year" >
<
!-- <view class="uni-list-cell"> --
>
<
!-- <
view class="uni-list-cell-db">
<text class="uni-input">{{orderItem.terminalName}}</text>
</view>
</view>
</view> -->
<!-- </view> -->
<text class="middle-date-margin-des">{{orderItem.terminalName}}</text>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image>
</view>
...
...
@@ -275,6 +276,12 @@
_this.orderItem.terminalName = data.selectTerminal.storeName
_this.orderItem.terminalId = data.selectTerminal.storeId
_this.orderItem.receiveUnitName = data.selectTerminal.storeName
_this.orderItem.receiveAddress = (data.selectTerminal.provinceName + data.selectTerminal.cityName + data.selectTerminal.districtName + data.selectTerminal.address) || ''
_this.orderItem.contactNumber = data.selectTerminal.consigneePhone
_this.orderItem.contacPerson = data.selectTerminal.consignee
_this.orderItem.province = data.selectTerminal.provinceName
_this.orderItem.city = data.selectTerminal.cityName
_this.orderItem.district = data.selectTerminal.districtName
})
},
onUnload() {
...
...
@@ -630,5 +637,10 @@
line-height: 96rpx;
color: $text-base-color;
}
.middle-date-terminal {
flex: 3;
font-size: 28rpx;
height: 96rpx;
color: $text-base-color;
}
</style>
pages/purchase-receive/purchase-receive.nvue
View file @
29491080
...
...
@@ -99,7 +99,7 @@
<text class="middle-date-add">收货地址</text>
<text class="middle-date-des-add">{{orderItem.receiveAddress}}</text>
</view>
<
text class="edit-add" @click="handleAdd" v-if="isTerminalType">修改</text
>
<
!-- <text class="edit-add" @click="handleAdd" v-if="isTerminalType">修改</text> --
>
<view class="text-block text-block-last">
<text class="middle-date">备注</text>
</view>
...
...
@@ -477,14 +477,14 @@
}
this.orderItem.receiveUnitCode = this.receiveUnitArr[0].PARTNER
this.orderItem.spurtCodeUnitName = this.receiveUnitArr[0].PARTNER_NAME
this.orderItem.contactNumber = this.receiveUnitArr[0].TEL_NUMBER
this.orderItem.contacPerson = this.receiveUnitArr[0].C_O_NAME
this.orderItem.receiveAddress = this.receiveUnitArr[0].STREET
if(this.isTerminalType){
this.orderItem.contactNumber = ''
this.orderItem.contacPerson = ''
this.orderItem.receiveAddress = ''
//
this.orderItem.contactNumber = ''
//
this.orderItem.contacPerson = ''
//
this.orderItem.receiveAddress = ''
}else{
this.orderItem.contactNumber = this.receiveUnitArr[0].TEL_NUMBER
this.orderItem.contacPerson = this.receiveUnitArr[0].C_O_NAME
this.orderItem.receiveAddress = this.receiveUnitArr[0].STREET
this.orderItem.receiveUnitName = this.receiveUnitArr[0].PARTNER_NAME
}
},
...
...
@@ -531,11 +531,6 @@
this.orderItem.contactNumber = this.receiveUnitArr[index].TEL_NUMBER
this.orderItem.receiveAddress = this.receiveUnitArr[index].STREET
this.orderItem.contacPerson = this.receiveUnitArr[index].C_O_NAME
if(this.isTerminalType){
this.orderItem.contactNumber = ''
this.orderItem.contacPerson = ''
this.orderItem.receiveAddress = ''
}
}
},
...
...
@@ -642,9 +637,9 @@
...this.orderItem
}
if(this.isTerminalType){
obj.province = this.terminalAdd.REGION_TEXT || this.orderItem.province
obj.city = this.terminalAdd.CITY_TEXT || this.orderItem.city
obj.district = this.terminalAdd.STREET_TEXT || this.orderItem.district
//
obj.province = this.terminalAdd.REGION_TEXT || this.orderItem.province
//
obj.city = this.terminalAdd.CITY_TEXT || this.orderItem.city
//
obj.district = this.terminalAdd.STREET_TEXT || this.orderItem.district
}else{
obj.demandType = 'none'
}
...
...
pages/select-agent/select-agent.vue
0 → 100644
View file @
29491080
<
template
>
<view
class=
"lists"
>
<view
class=
"status_bar"
:style=
"navHeight"
></view>
<view
class=
"header-bg"
>
<image
class=
"header-bg-img"
src=
"@/static/image/nav_bg@3x.png"
mode=
"scaleToFill"
></image>
</view>
<view
class=
"main"
>
<view
class=
"middle view"
>
<view
class=
"text-block "
>
<text
class=
"middle-date"
>
终端名称
</text>
<input
class=
"middle-date-des"
type=
"text"
v-model=
"condition.storeName"
placeholder=
""
/>
</view>
</view>
<view
class=
"planout-block"
>
<button
class=
"btn"
type=
"default"
@
tap=
"search"
>
<text
class=
"btn-text"
>
查询
</text>
</button>
</view>
<scroll-view
class=
"scroll-area"
:style=
'scrollHeight'
scroll-y=
"true"
lower-threshold=
'150'
@
scrolltolower=
'scrolltolower'
>
<view
class=
"middle view planout-block-item"
v-for=
"(item,index) in lists"
:key=
'index'
@
click=
"handleClick($event,item, index)"
>
<view
class=
"text-block"
>
<text
class=
"middle-date middle-date-select"
>
终端名称
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{
item
.
storeName
}}
</text>
</view>
<view
class=
"text-block"
>
<text
class=
"middle-date middle-date-select"
>
终端ID
</text>
<text
class=
"middle-date-pro middle-date-des-select"
>
{{
item
.
storeId
}}
</text>
</view>
<!--
<view
class=
"middle-title"
>
<text
class=
"middle-title__text flex1"
>
终端名称:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
storeName
}}
</text>
</view>
<view
class=
"middle-title"
>
<view
style=
"width: 130px;"
>
<text
class=
"middle-title__text flex1"
>
联系人:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
consignee
}}
</text>
</view>
<view>
<text
class=
"middle-title__text flex1"
>
联系电话:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
consigneePhone
}}
</text>
</view>
</view>
<view
class=
"middle-title justify-space"
>
<view>
<text
class=
"middle-title__text flex1"
>
省:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
provinceName
}}
</text>
</view>
<view>
<text
class=
"middle-title__text flex1"
>
市:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
cityName
}}
</text>
</view>
<view>
<text
class=
"middle-title__text flex1"
>
区:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
districtName
}}
</text>
</view>
</view>
<view
class=
"middle-title"
>
<text
class=
"middle-title__text flex1"
>
详细地址:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
address
}}
</text>
</view>
-->
</view>
<view
class=
"loading-more"
v-if=
'lists.length>2'
>
<text
class=
"loading-more-text"
>
{{
loadingText
}}
</text>
</view>
</scroll-view>
</view>
</view>
</
template
>
<
script
>
import
{
mapState
}
from
'vuex'
import
{
queryDirectStore
}
from
'@/servers/purchaseList.js'
export
default
{
data
()
{
return
{
isOpened
:
'none'
,
loadingText
:
'加载中...'
,
condition
:
{
storeName
:
''
,
},
lists
:
[],
pageOption
:
{
current
:
1
,
size
:
50
},
totalCount
:
0
,
totalPage
:
0
,
terminalQureyParams
:
{}
}
},
computed
:
{
...
mapState
([
'sysinfo'
]),
navHeight
()
{
return
{
'height'
:
`
${
this
.
sysinfo
.
safeArea
.
top
+
44
}
px`
}
},
scrollHeight
()
{
return
{
'height'
:
`
${
this
.
sysinfo
.
safeArea
.
height
-
44
-
220
}
px`
}
},
pagination
(){
return
{
page
:
this
.
pageOption
.
current
,
pagesize
:
this
.
pageOption
.
size
,
totalCount
:
this
.
totalCount
,
}
}
},
onPullDownRefresh
()
{
this
.
reset
()
this
.
getProduct
(
true
)
setTimeout
(
function
()
{
uni
.
stopPullDownRefresh
();
},
600
);
},
onLoad
(
option
)
{
this
.
terminalQureyParams
=
{
...
JSON
.
parse
(
option
.
params
)
}
},
created
()
{
this
.
reset
()
this
.
getProduct
(
true
);
},
methods
:
{
async
getProduct
(
isRefresh
)
{
const
params
=
{
page
:
this
.
pageOption
,
...
this
.
terminalQureyParams
,
...
this
.
condition
}
uni
.
showLoading
({
title
:
'加载中'
});
setTimeout
(
function
()
{
uni
.
hideLoading
();
},
2000
);
const
res
=
await
queryDirectStore
(
params
)
uni
.
hideLoading
();
const
{
records
,
total
}
=
res
.
data
.
data
this
.
totalCount
=
total
this
.
totalPage
=
Math
.
ceil
(
total
*
1
/
this
.
pageOption
.
size
*
1
)
if
(
isRefresh
)
{
this
.
lists
=
records
}
else
{
this
.
lists
=
this
.
lists
.
concat
(
records
)
}
},
scrolltolower
()
{
console
.
log
(
'onReachBottom'
);
if
(
this
.
pageOption
.
current
<
this
.
totalPage
)
{
this
.
pageOption
.
current
++
this
.
getProduct
()
}
else
{
this
.
loadingText
=
'-- 到底了 --'
}
},
reset
()
{
this
.
condition
=
{
storeName
:
''
,
},
this
.
pageOption
=
{
current
:
1
,
size
:
50
},
this
.
lists
=
[]
this
.
loadingText
=
'加载中'
},
search
()
{
this
.
pageOption
=
{
current
:
1
,
size
:
50
},
this
.
lists
=
[]
this
.
getProduct
(
true
)
},
handleClick
(
e
,
content
,
index
)
{
console
.
log
(
e
,
content
,
index
)
uni
.
$emit
(
'selectTerminal'
,
{
selectTerminal
:
content
})
uni
.
navigateBack
()
}
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.view
{
flex-direction
:
column
;
}
.header-bg
{
height
:
284rpx
;
margin-top
:
-88rpx
;
}
.header-bg-img
{
width
:
750rpx
;
}
.lists
{
position
:
relative
;
flex-direction
:
column
;
overflow-y
:
scroll
;
background
:
#f0f4f5
;
overflow-x
:
hidden
;
height
:
100vh
;
}
.main
{
position
:
relative
;
flex-direction
:
column
;
margin-top
:
-164rpx
;
padding
:
0
16rpx
;
}
.middle
{
background-color
:
#fff
;
border-radius
:
16rpx
;
padding
:
32rpx
;
padding-right
:
60rpx
;
border-radius
:
20rpx
;
}
.text-block
{
display
:
flex
;
overflow
:
hidden
;
height
:
96rpx
;
margin-bottom
:
14rpx
;
// border-bottom: 1px solid #f4f5f6;
}
.text-block-last
{
margin-bottom
:
0
;
border-bottom
:
0
;
}
.middle-date
{
flex
:
2
;
font-size
:
28rpx
;
line-height
:
96rpx
;
color
:
#333
;
margin-bottom
:
8rpx
;
}
.middle-date-des
{
flex
:
3
;
font-size
:
28rpx
;
line-height
:
96rpx
;
height
:
96rpx
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
color
:
#888
;
}
.middle-date-pro
{
flex
:
3
;
font-size
:
28rpx
;
height
:
96rpx
;
color
:
#888
;
word-break
:
break-all
;
padding-right
:
4px
;
}
.middle-date-select
{
color
:
#888
;
}
.middle-date-des-select
{
color
:
#333
;
}
.picker-year
{
position
:
relative
;
border-radius
:
4px
;
align-items
:
center
;
}
.uni-list-cell
{
flex
:
1
;
}
.uni-list-cell-db
{
flex
:
1
;
}
.picker-block
{
flex
:
1
;
}
.icon-arrow
{
position
:
absolute
;
right
:
0
;
top
:
16px
;
width
:
12rpx
;
height
:
20rpx
;
z-index
:
10
;
}
.scroll-area
{
overflow-y
:
scroll
;
}
.planout-block-lists
{
display
:
flex
;
flex-direction
:
column
;
}
.uni-swipe
{
flex
:
1
;
margin-bottom
:
26rpx
;
}
/
deep
/
.uni-swipe_box
{
flex
:
1
;
}
.swipe-right-block
{
display
:
flex
;
width
:
100rpx
;
justify-content
:
center
;
align-items
:
center
;
}
.swipe-right-block__text
{
display
:
inline-block
;
width
:
52rpx
;
height
:
52rpx
;
border-radius
:
50%
;
background-color
:
#fff
;
}
.swipe-right-block__active
{
width
:
52rpx
;
height
:
52rpx
;
border-radius
:
50%
;
background-color
:
$wly-primary-color
;
}
.planout-block
{
display
:
flex
;
justify-content
:
space-between
;
height
:
84rpx
;
margin-top
:
64rpx
;
margin-bottom
:
48rpx
;
padding
:
0
24rpx
;
}
.planout-block-item
{
flex
:
1
;
margin-bottom
:
26rpx
;
}
.btn
{
flex
:
1
;
height
:
92rpx
;
background
:
$wly-primary-color
;
border-radius
:
46rpx
;
}
.btn-text
{
color
:
#fff
;
font-size
:
34rpx
;
}
.loading-more
{
flex
:
1
;
align-items
:
center
;
justify-content
:
center
;
padding-top
:
14px
;
padding-bottom
:
14px
;
text-align
:
center
;
}
.loading-more-text
{
font-size
:
12px
;
color
:
#999
;
}
.middle-title
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
32rpx
;
}
.justify-space
{
justify-content
:
space-between
}
.middle-title__text
{
font-weight
:
500
;
font-size
:
28rpx
;
color
:
$text-base-color
;
font-family
:
PingFangSC
,
PingFangSC-Medium
;
}
</
style
>
pages/select-terminal/select-terminal.vue
View file @
29491080
...
...
@@ -30,6 +30,38 @@
<text
class=
"middle-date middle-date-select"
>
终端ID
</text>
<text
class=
"middle-date-pro middle-date-des-select"
>
{{
item
.
storeId
}}
</text>
</view>
<!--
<view
class=
"middle-title"
>
<text
class=
"middle-title__text flex1"
>
终端名称:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
storeName
}}
</text>
</view>
<view
class=
"middle-title"
>
<view
style=
"width: 130px;"
>
<text
class=
"middle-title__text flex1"
>
联系人:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
consignee
}}
</text>
</view>
<view>
<text
class=
"middle-title__text flex1"
>
联系电话:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
consigneePhone
}}
</text>
</view>
</view>
<view
class=
"middle-title justify-space"
>
<view>
<text
class=
"middle-title__text flex1"
>
省:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
provinceName
}}
</text>
</view>
<view>
<text
class=
"middle-title__text flex1"
>
市:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
cityName
}}
</text>
</view>
<view>
<text
class=
"middle-title__text flex1"
>
区:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
districtName
}}
</text>
</view>
</view>
<view
class=
"middle-title"
>
<text
class=
"middle-title__text flex1"
>
详细地址:
</text>
<text
class=
"middle-title__text flex6"
>
{{
item
.
address
}}
</text>
</view>
-->
</view>
<view
class=
"loading-more"
v-if=
'lists.length>2'
>
<text
class=
"loading-more-text"
>
{{
loadingText
}}
</text>
...
...
@@ -72,7 +104,7 @@
},
scrollHeight
()
{
return
{
'height'
:
`
${
this
.
sysinfo
.
safeArea
.
height
-
237
-
44
-
20
}
px`
'height'
:
`
${
this
.
sysinfo
.
safeArea
.
height
-
44
-
2
20
}
px`
}
},
pagination
(){
...
...
@@ -196,6 +228,8 @@
background-color
:
#fff
;
border-radius
:
16rpx
;
padding
:
32rpx
;
padding-right
:
60rpx
;
border-radius
:
20rpx
;
}
.text-block
{
...
...
@@ -203,7 +237,7 @@
overflow
:
hidden
;
height
:
96rpx
;
margin-bottom
:
14rpx
;
border-bottom
:
1px
solid
#f4f5f6
;
//
border-bottom: 1px solid #f4f5f6;
}
.text-block-last
{
...
...
@@ -324,7 +358,6 @@
.planout-block-item
{
flex
:
1
;
width
:
750rpx
;
margin-bottom
:
26rpx
;
}
...
...
@@ -353,4 +386,18 @@
font-size
:
12px
;
color
:
#999
;
}
.middle-title
{
display
:
flex
;
align-items
:
center
;
margin-bottom
:
32rpx
;
}
.justify-space
{
justify-content
:
space-between
}
.middle-title__text
{
font-weight
:
500
;
font-size
:
28rpx
;
color
:
$text-base-color
;
font-family
:
PingFangSC
,
PingFangSC-Medium
;
}
</
style
>
pages/terminal-list/order-item.nvue
0 → 100644
View file @
29491080
<template>
<view class="order view">
<view class="top">
<text class="dot" v-if="!newsItem.isReview"></text>
<text class="title-no">{{ newsItem.wantCode }}</text>
<view class="title-info" v-if="newsItem.orderStatusTextView">
<button class="title-info__status" type="default">
<text class="item-block-btn__text">{{ newsItem.orderStatusTextView }}</text>
</button>
</view>
</view>
<view class="middle view">
<view class="middle-title">
<text class="middle-title__text flex1">终端:</text>
<text class="middle-title__text flex6">{{ newsItem.terminalName }}</text>
</view>
<view class="middle-title">
<text class="middle-title__text flex1">产品:</text>
<text class="middle-title__text flex6">{{ newsItem.productDesc }}</text>
</view>
<view class="middle-title">
<text class="middle-title__text flex1">签收时间:</text>
<text class="middle-title__text flex6">{{ newsItem.signDate }}</text>
</view>
<view class="check-box">
<radio-group>
</radio-group>
<view class="total-amount">
<text class="middle-title__text">件数:</text>
<text class="middle-title__text red">{{ newsItem.actDeliveryQty }}</text>
</view>
</view>
</view>
</view>
</template>
<script>
// #ifdef APP-NVUE
const dom = weex.requireModule('dom');
// #endif
import store from '@/store/index.js';
export default {
props: {
newsItem: {
type: Object,
default: function (e) {
return {};
}
},
idx: {
type: Number
},
isCheck: {
type: Boolean,
default: false
}
},
data() {
return {
ishowDetail: true,
ishowReceiveDetail: false,
receiveInfoHeight: '132',
receiveInfoDetailSize: {},
allFiles: [],
cb: ''
};
},
computed: {
imageStyles() {
return {
width: 64,
height: 64,
border: {
radius: '50%'
}
};
},
receiveInfoHeightComputed() {
console.log(this.receiveInfoHeight - 0, '[][]');
if (this.receiveInfoHeight - 0 === 0) {
const height = this.allFiles.length > 0 ? 485 : 0;
return { minHeight: height + 'px' };
} else {
return {
height: `${this.receiveInfoHeight}px`
};
}
}
},
mounted() {},
methods: {
handleCheck() {
this.$emit('handleCheck', this.idx);
},
handleDetail(item) {
uni.navigateTo({
url: `/pages/loan-query/loan-detail?code=${item.fee_code}`
});
},
click() {
this.$emit('click');
},
close(e) {
e.stopPropagation();
this.$emit('close');
},
handleShowDetail() {
this.ishowDetail = !this.ishowDetail;
},
checkLogistics() {
const num = 'dfb0ebae8103034ccb863d3702e22eb6';
uni.navigateTo({
url: `/pages/logistics/logistics?logisticno=${num}`
});
}
}
};
</script>
<style lang="scss" scoped>
.view {
flex-direction: column;
}
.order {
flex: 1;
background: #ffffff;
border-radius: 20rpx;
box-shadow: 0px 2px 4px 0px #dbe4ee;
margin-top: 28rpx;
}
.top {
height: 72rpx;
align-items: center;
justify-content: space-between;
padding: 0 32rpx;
}
.title-no {
font-weight: 600;
font-size: 32rpx;
color: #000;
margin-left: 50rpx;
}
.title-info {
align-items: center;
}
.title-info__status {
width: 130rpx;
height: 48rpx;
line-height: 48rpx;
background: #f61d30;
font-size: 12px;
color: #fff;
text-align: center;
padding: 0 10rpx;
border: none;
}
.item-block-btn__text {
font-size: 12px;
color: #fff;
}
.middle {
// position: relative;
padding: 26rpx 32rpx;
}
.middle-title {
display: flex;
align-items: center;
margin-bottom: 32rpx;
}
.middle-title__text {
font-weight: 500;
font-size: 28rpx;
color: $text-base-color;
font-family: PingFangSC, PingFangSC-Medium;
}
.icon-car {
width: 13px;
height: 13px;
margin-left: 16rpx;
}
.text-block {
flex: 1;
flex-direction: column;
margin-bottom: 16rpx;
}
.text-block-last {
margin-bottom: 0;
}
.middle-date {
font-size: 28rpx;
color: $text-base-color;
margin-top: 8rpx;
}
.middle-date-des {
font-size: 24rpx;
color: #999;
}
.text-block-box {
display: flex;
// height: 120rpx;
margin-bottom: 16rpx;
justify-content: space-between;
}
.middle-date-right {
display: flex;
align-items: center;
justify-content: flex-end;
text-align: right;
}
.dot {
width: 5px;
height: 5px;
background: #3bdc88;
border-radius: 50%;
margin-top: -4px;
margin-right: 7px;
}
.bottom {
padding: 0 50rpx 48rpx;
}
.bottom-nav {
height: 40rpx;
justify-content: flex-end;
align-items: center;
}
.bottom-nav-arrow {
align-items: center;
}
.arrow-des {
font-size: 24rpx;
color: #999;
}
.icon-arrow {
width: 7px;
height: 4px;
margin-left: 16rpx;
margin-top: 2px;
transition-property: transform;
transition-duration: 0.15s;
transform: rotate(0deg);
}
.icon-arrow-rotate {
transform: rotate(180deg);
}
.bottom-content {
flex-direction: column;
margin-top: 24rpx;
}
.block-detal {
display: flex;
flex-direction: column;
background: #f8f8f8;
border-radius: 20rpx;
padding: 28rpx 32rpx;
margin-bottom: 16rpx;
}
.block-detal-last {
margin-bottom: 32rpx;
}
.block-detal-item {
display: flex;
margin-bottom: 32rpx;
justify-content: space-between;
}
.block-detal-item-last {
margin-bottom: 0;
}
.detal-item-label {
color: #999;
font-size: 24rpx;
}
.detal-item-value {
// flex: 1;
color: #333;
font-size: 28rpx;
}
.detal-item-value2 {
font-size: 24rpx;
// width: 200%;
// flex: 2;
// text-align: left;
}
.detal-item-value3 {
padding-left: 60rpx;
font-size: 24rpx;
width: 300%;
flex: 2;
text-align: right;
}
.receive-info {
position: relative;
display: flex;
flex-direction: column;
margin-top: 40rpx;
min-height: 240rpx;
// padding-bottom: 96rpx;
}
.receive-info-auto {
// height: auto;
}
.detal-item-title {
color: #333;
font-size: 28rpx;
font-weight: 600;
}
.attach-block {
flex-direction: column;
}
.attach-file {
width: 94px;
height: 94px;
margin: 20rpx 20rpx 0 0;
}
.float-btn-block {
position: absolute;
left: 0;
bottom: -2rpx;
z-index: 10;
width: 620rpx;
height: 120rpx;
background-color: #fff;
display: flex;
align-items: center;
justify-content: center;
}
.float-btn {
padding: 0 20px;
height: 60rpx;
border: 0.5px solid #d8d8d9;
border-radius: 32rpx;
display: flex;
align-items: center;
justify-content: center;
}
.float-btn__text {
font-size: 24rpx;
}
.cell-list {
flex-direction: column;
}
.upload-block {
display: flex;
height: 88rpx;
border-radius: 4px;
margin-top: 20rpx;
flex-direction: column;
}
.total-amount {
justify-content: end;
}
.red {
color: #f61d30;
font-weight: 600;
}
.flex1 {
flex: 2;
}
.flex6 {
flex: 6;
font-size: 24rpx;
}
.dot {
width: 18px;
height: 18px;
line-height: 18px;
background: #ff0f00;
border-radius: 9px;
color: #fff;
font-size: 11px;
text-align: center;
margin: 0;
position: absolute;
}
.check-box {
display: flex;
justify-content: space-between;
}
</style>
\ No newline at end of file
pages/terminal-list/order-page.nvue
0 → 100644
View file @
29491080
<template>
<view class="page-news">
<uni-list ref="list" class="listview" :class="{ 'margin-bot': nid === '0' }" :enableBackToTop="true" :scroll-y="true" @scrolltolower="loadMore()">
<uni-refresh class="refresh" @refresh="onrefresh" @pullingdown="onpullingdown" :display="refreshing ? 'show' : 'hide'">
<div class="refresh-view">
<image class="refresh-icon" :src="refreshIcon" :style="{ width: refreshing || pulling ? 0 : '32px' }" :class="{ 'refresh-icon-active': refreshFlag }"></image>
<uni-load-more v-if="refreshing" class="loading-icon" status="loading" :contentText="loadingMoreText"></uni-load-more>
<text class="loading-text">{{ refreshText }}</text>
</div>
</uni-refresh>
<uni-cell v-for="(item, index) in dataList" :key="item.id">
<order-item :newsItem="item" :isCheck="nid === '0'" :idx="index" @handleCheck="handleCheck"></order-item>
</uni-cell>
<uni-cell v-if="isLoading || dataList.length > 4">
<view class="loading-more">
<text class="loading-more-text">{{ loadingText }}</text>
</view>
</uni-cell>
</uni-list>
<no-data class="no-data" v-if="isNoData" @retry="loadMore"></no-data>
</view>
</template>
<script>
import { mapState } from 'vuex';
import uniList from '@/components/uni-list.vue';
import uniCell from '@/components/uni-cell.vue';
import uniRefresh from '@/components/uni-refresh.vue';
import uniLoadMore from '@/components/uni-load-more.vue';
import noData from '@/components/nodata.nvue';
import { getTermianlList, updateTransportInfoReview } from '@/servers/terminal.js';
import orderItem from './order-item.nvue';
export default {
components: {
uniList,
uniCell,
uniRefresh,
uniLoadMore,
noData,
orderItem
},
props: {
nid: {
type: [Number, String],
default: ''
},
tabIndex: {
type: [Number, String],
default: ''
},
conditions: {
type: Object,
default: () => {}
}
},
data() {
return {
dataList: [],
navigateFlag: false,
pulling: false,
refreshing: false,
refreshFlag: false,
refreshText: '',
isLoading: false,
loadingText: '加载中...',
isNoData: false,
pulling: false,
angle: 0,
loadingMoreText: {
contentdown: '',
contentrefresh: '',
contentnomore: ''
},
refreshIcon:
'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB5QTFRFcHBw3Nzct7e39vb2ycnJioqK7e3tpqam29vb////D8oK7wAAAAp0Uk5T////////////ALLMLM8AAABxSURBVHja7JVBDoAgDASrjqj//7CJBi90iyYeOHTPMwmFZrHjYyyFYYUy1bwUZqtJIYVxhf1a6u0R7iUvWsCcrEtwJHp8MwMdvh2amHduiZD3rpWId9+BgPd7Cc2LIkPyqvlQvKxKBJ//Qwq/CacAAwDUv0a0YuKhzgAAAABJRU5ErkJggg==',
loadParams: {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
},
condition: {
page: 1,
pagesize: 20
},
allCheck: false,
totalAmount: 0
};
},
computed: {
...mapState(['sysinfo', 'userInfo'])
},
created() {
this._isWidescreen = false;
// #ifdef H5
var mediaQueryOb = uni.createMediaQueryObserver(this);
mediaQueryOb.observe(
{
minWidth: 768
},
(matches) => {
this._isWidescreen = matches;
}
);
// #endif
},
methods: {
async updateTransportInfoReview(data){
const logisticnoList = data.map(item => item.logisticno);
const params = {
logisticnoList,
}
logisticnoList.length && await updateTransportInfoReview(params);
},
changeTab() {
// this.totalAmount = 0
// this.allCheck = false
this.dataList.forEach((ele, idx) => {
this.$set(this.dataList, idx, { ...this.dataList[idx], checked: false });
});
},
handleCheck(idx) {
this.dataList.forEach((ele, idx) => {
ele.checked = false;
});
this.$set(this.dataList, idx, { ...this.dataList[idx], checked: !this.dataList[idx].checked });
},
async loadData(refresh) {
if (this.isLoading) {
return;
}
this.isLoading = true;
this.isNoData = false;
const params = {
...this.condition,
"demandType":"ZDZG",
"signDateNotNull":true,
"sort":[{"field_name":"tr.isReview","field_sort":"asc"}],
customerCode: this.userInfo.code
}
const { data: { Rows, Total }} = await getTermianlList(params);
console.log(Rows,Total)
this.isNoData = Rows.length <= 0;
this.loadParams.totalPage = Math.ceil(((Total * 1) / this.condition.pagesize) * 1);
if (refresh) {
this.dataList =Rows;
} else {
this.dataList = this.dataList.concat(Rows);
}
this.updateTransportInfoReview(Rows)
// if (this.dataList.length > 0 && this._isWidescreen && this.dataList.length <= 10) {
// this.goDetail(this.dataList[0]);
// }
},
loadMore(e) {
if (this.condition.page < this.loadParams.totalPage) {
this.condition.page++;
this.loadData(false);
} else {
this.loadingText = '--已到底--';
}
},
clear() {
this.dataList.length = 0;
},
goDetail(detail, type = null) {
if (type) {
uni.navigateTo({
url: `/pages/purchase/purchase-apply?id=${detail.id}&sourceType=myPurchase`
});
}
},
refreshData() {
if (this.isLoading) {
return;
}
this.condition.page = 1;
this.pulling = true;
this.refreshing = true;
this.refreshText = '正在刷新...';
this.loadData(true);
},
onrefresh(e) {
this.conditions.state[0].low = this.nid;
this.refreshData();
// #ifdef APP-NVUE
// this.$refs.list.resetLoadmore();
// #endif
},
onpullingdown(e) {
if (this.refreshing) {
return;
}
// var angle = (e.pullingDistance) / e.viewHeight * 180;
// if (angle > 180) {
// angle = 180;
// }
// tab.angle = angle;
this.pulling = false;
if (Math.abs(e.pullingDistance) > Math.abs(e.viewHeight)) {
this.refreshFlag = true;
this.refreshText = '释放立即刷新';
} else {
this.refreshFlag = false;
this.refreshText = '下拉可以刷新';
}
},
newGuid() {
let s4 = function () {
return ((65536 * (1 + Math.random())) | 0).toString(16).substring(1);
};
return (s4() + s4() + '-' + s4() + '-4' + s4().substr(0, 3) + '-' + s4() + '-' + s4() + s4() + s4()).toUpperCase();
}
}
};
</script>
<style lang="scss" scoped>
.no-data {
flex: 1;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 10;
}
.page-news {
flex: 1;
flex-direction: column;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
.listview {
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
/* #ifndef APP-NVUE */
display: flex;
flex-direction: column;
/* #endif */
/* #ifndef MP-ALIPAY */
flex-direction: column;
/* #endif */
}
.refresh {
justify-content: center;
}
.refresh-view {
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
width: 750rpx;
height: 64px;
flex-direction: row;
flex-wrap: nowrap;
align-items: center;
justify-content: center;
}
.refresh-icon {
width: 32px;
height: 32px;
transition-duration: 0.5s;
transition-property: transform;
transform: rotate(0deg);
transform-origin: 15px 15px;
}
.refresh-icon-active {
transform: rotate(180deg);
}
.loading-icon {
width: 28px;
height: 28px;
margin-right: 5px;
color: gray;
}
.loading-text {
margin-left: 2px;
font-size: 16px;
color: #999999;
}
.loading-more {
align-items: center;
justify-content: center;
padding-top: 14px;
padding-bottom: 14px;
text-align: center;
}
.loading-more-text {
font-size: 12px;
color: #999;
}
.bottom-box {
position: fixed;
display: flex;
bottom: 0;
left: 0;
z-index: 10;
width: 750rpx;
height: 100rpx;
justify-content: space-around;
align-items: center;
background: #fff;
padding: 0 20rpx;
}
.bottom-btn {
width: 328rpx;
height: 92rpx;
border-radius: 50%;
justify-content: space-between;
align-items: center;
}
.subBtn {
background: $wly-primary-color;
border: none;
width: 120rpx;
height: 60rpx;
line-height: 60rpx;
}
.btn-text {
color: #fff;
font-size: 28rpx;
}
.empty-block {
width: 750rpx;
display: flex;
flex-direction: column;
align-items: center;
}
.margin-bot {
margin-bottom: 120rpx;
}
.red {
color: #f61d30;
font-size: 24rpx;
}
.font-sc {
color: #333;
font-size: 24rpx;
}
.flex-column {
display: flex;
flex-direction: column;
}
.check-box {
/deep/ .uni-checkbox-wrapper {
margin-top: 14rpx;
margin-right: 10rpx;
}
}
</style>
\ No newline at end of file
pages/terminal-list/terminal-list.nvue
0 → 100644
View file @
29491080
<template>
<view class="ticket-order-page">
<view class="status_bar" :style="navHeight"></view>
<view class="tabs">
<view class="empty"></view>
<swiper
ref="swiper1"
disable-touch="true"
class="tab-box"
:current="tabIndex"
:duration="300"
@change="onswiperchange"
@transition="onswiperscroll"
@animationfinish="animationfinish"
@onAnimationEnd="animationfinish"
>
<swiper-item class="swiper-item" v-for="(page, index) in tabList" :key="index">
<orderPage :ref="'page' + index" class="page-item"></orderPage>
</swiper-item>
</swiper>
</view>
</view>
</template>
<script>
import { mapState } from 'vuex';
import { timeRangeFormat } from '@/utils/date.js';
// #ifdef APP-PLUS
const dom = weex.requireModule('dom');
// #endif
import orderPage from './order-page.nvue';
// 缓存每页最多
const MAX_CACHE_DATA = 100;
// 缓存页签数量
const MAX_CACHE_PAGE = 3;
const TAB_PRELOAD_OFFSET = 1;
export default {
components: {
orderPage
},
data() {
return {
tabList: [
{
id: 'tab01',
name: '全部',
newsid: 0
},
],
tabIndex: 0,
cacheTab: [],
scrollInto: '',
navigateFlag: false,
indicatorLineLeft: 0,
indicatorLineWidth: 0,
isTap: false,
// 测试使用观察变化
_lastTabIndex: 0,
swiperWidth: 0,
tabbarWidth: 0,
tabListSize: {},
_touchTabIndex: 0,
ishowDetail: false
};
},
computed: {
underlineStyle() {
return {
left: this.indicatorLineLeft + 'px',
width: this.indicatorLineWidth + 'px'
};
},
navHeight() {
return {
height: `${this.sysinfo.safeArea.top + 44}px`
};
},
conditionTop() {
return {
top: `${this.sysinfo.safeArea.top + 44 + 42}px`
};
},
...mapState(['sysinfo'])
},
created() {},
onReady() {
this._lastTabIndex = 0;
this.swiperWidth = 0;
this.tabbarWidth = 0;
this.tabListSize = {};
this._touchTabIndex = 0;
this.pageList = [];
for (let i = 0; i < this.tabList.length; i++) {
let item = this.$refs['page' + i];
if (Array.isArray(item)) {
this.pageList.push(item[0]);
} else {
this.pageList.push(item);
}
}
this.switchTab(this.tabIndex);
this.selectorQuery();
},
methods: {
handleShowDetail() {
this.ishowDetail = !this.ishowDetail;
},
clearData() {
},
search() {
this.pageList && this.pageList[this.tabIndex].refreshData();
},
ontabtap(e, type) {
let index = e.target.dataset.current || e.currentTarget.dataset.current;
//let offsetIndex = this._touchTabIndex = Math.abs(index - this._lastTabIndex) > 1;
// #ifdef APP-PLUS || H5 || MP-WEIXIN || MP-QQ
this.isTap = true;
var currentSize = this.tabListSize[index];
this.updateIndicator(currentSize.left, currentSize.width);
this._touchTabIndex = index;
// #endif
this.switchTab(index);
},
onswiperchange(e) {
// 注意:百度小程序会触发2次
// #ifndef APP-PLUS || H5 || MP-WEIXIN || MP-QQ
let index = e.target.current || e.detail.current;
this.switchTab(index);
// #endif
},
onswiperscroll(e) {
if (this.isTap) {
return;
}
var offsetX = e.detail.dx;
var preloadIndex = this._lastTabIndex;
if (offsetX > TAB_PRELOAD_OFFSET) {
preloadIndex++;
} else if (offsetX < -TAB_PRELOAD_OFFSET) {
preloadIndex--;
}
if (preloadIndex === this._lastTabIndex || preloadIndex < 0 || preloadIndex > this.pageList.length - 1) {
return;
}
if (this.pageList[preloadIndex].dataList.length === 0) {
this.loadTabData(preloadIndex);
}
// #ifdef APP-PLUS || H5 || MP-WEIXIN || MP-QQ
var percentage = Math.abs(this.swiperWidth / offsetX);
var currentSize = this.tabListSize[this._lastTabIndex];
var preloadSize = this.tabListSize[preloadIndex];
var lineL = currentSize.left + (preloadSize.left - currentSize.left) / percentage;
var lineW = currentSize.width + (preloadSize.width - currentSize.width) / percentage;
this.updateIndicator(lineL, lineW);
// #endif
},
animationfinish(e) {
// #ifdef APP-PLUS || H5 || MP-WEIXIN || MP-QQ
// let index = e.detail.current;
// if (this._touchTabIndex === index) {
// this.isTap = false;
// }
// this._lastTabIndex = index;
// this.switchTab(index);
// this.updateIndicator(this.tabListSize[index].left, this.tabListSize[index].width);
// #endif
},
selectorQuery() {
},
updateIndicator(left, width) {
this.indicatorLineLeft = left;
this.indicatorLineWidth = width;
},
switchTab(index) {
if (this.pageList[index].dataList.length === 0) {
this.loadTabData(index);
}
if (this.tabIndex === index) {
return;
}
// 缓存 tabId
if (this.pageList[this.tabIndex].dataList.length > MAX_CACHE_DATA) {
let isExist = this.cacheTab.indexOf(this.tabIndex);
if (isExist < 0) {
this.cacheTab.push(this.tabIndex);
}
}
this.tabIndex = index;
// #ifdef APP-NVUE
// this.scrollTabTo(index);
// #endif
// #ifndef APP-NVUE
this.scrollInto = this.tabList[index].id;
// #endif
// 释放 tabId
if (this.cacheTab.length > MAX_CACHE_PAGE) {
let cacheIndex = this.cacheTab[0];
this.clearTabData(cacheIndex);
this.cacheTab.splice(0, 1);
}
this.clearData();
},
scrollTabTo(index) {
const el = this.$refs['tabitem' + index][0];
let offset = 0;
// TODO fix ios offset
if (index > 0) {
offset = this.tabbarWidth / 2 - this.tabListSize[index].width / 2;
if (this.tabListSize[index].right < this.tabbarWidth / 2) {
offset = this.tabListSize[0].width;
}
}
dom.scrollToElement(el, {
offset: -offset
});
},
loadTabData(index) {
this.pageList[index].loadData();
},
clearTabData(index) {
this.pageList[index].clear();
}
}
};
</script>
<style lang="scss" scoped>
.ticket-order-page {
flex-direction: column;
flex: 1;
}
/* #ifndef APP-PLUS */
page {
width: 100%;
min-height: 100%;
display: flex;
background: $background-color-1;
}
.status_bar {
height: var(--status-bar-height);
}
/* #endif */
.tabs {
flex: 1;
flex-direction: column;
overflow: hidden;
background-color: #ffffff;
}
.tab-bar {
width: 750rpx;
height: 42px;
flex-direction: row;
/* #ifndef APP-PLUS */
white-space: nowrap;
/* #endif */
border-bottom: 0.5px solid #eeeeee;
}
/* #ifndef APP-NVUE */
.tab-bar ::-webkit-scrollbar {
display: none;
width: 0 !important;
height: 0 !important;
-webkit-appearance: none;
background: transparent;
}
/* #endif */
.tab-bar-list {
flex-direction: column;
}
.tab-bar-list-wrapper {
width: 750rpx;
flex-direction: row;
}
.scroll-view-indicator {
position: relative;
height: 2px;
border-radius: 1px;
background-color: transparent;
}
.scroll-view-underline {
position: absolute;
top: 0;
bottom: 0;
width: 0;
background-color: $tabbar-color;
}
.scroll-view-animation {
transition-duration: 0.2s;
transition-property: left;
}
.conditon-block {
position: fixed;
left: 0;
top: 172rpx;
right: 0;
bottom: 0;
z-index: 10;
width: 750rpx;
height: 124rpx;
overflow: hidden;
background-color: #fff;
display: flex;
flex-direction: column;
padding: 40rpx 32rpx 0 16rpx;
}
.conditon-block-auto {
height: 460rpx;
overflow: auto;
max-height: 230px;
}
.icon-arrow {
width: 32rpx;
height: 20rpx;
margin-top: 24rpx;
transition-property: transform;
transition-duration: 0.15s;
transform: rotate(0deg);
}
.icon-arrow-rotate {
transform: rotate(180deg);
}
.filter-btn {
width: 148rpx;
height: 68rpx;
line-height: 64rpx;
background-color: #f8f8f8;
border-radius: 8px;
margin-right: 20rpx;
margin-bottom: 20rpx;
margin-left: 0;
border: 2rpx solid transparent;
overflow: hidden;
padding: 0;
}
.filter-btn__text {
display: inline-block;
width: 148rpx;
height: 68rpx;
border-radius: 8px;
line-height: 68rpx;
color: #8e8e8e;
text-align: center;
font-size: 24rpx;
}
.filter-btn-active {
background: #f61d30;
}
.filter-btn-active__text {
color: #fff;
background: #f61d30;
}
.filter-content {
display: flex;
flex-wrap: wrap;
}
uni-button:after {
border: 0;
}
.empty {
}
.tab-box {
flex: 1;
background: $background-color-1;
padding: 0 16rpx;
}
.uni-tab-item {
/* #ifndef APP-PLUS */
display: inline-block;
/* #endif */
flex-wrap: nowrap;
padding-left: 6px;
padding-right: 6px;
flex: 1;
justify-content: center;
text-align: center;
}
.uni-tab-item-title {
color: $text-base-color;
font-size: 28rpx;
height: 40px;
line-height: 40px;
font-weight: 400;
flex-wrap: nowrap;
/* #ifndef APP-PLUS */
white-space: nowrap;
/* #endif */
}
.uni-tab-item-title-active {
color: $tabbar-color;
font-weight: 500;
}
.swiper-item {
flex: 1;
flex-direction: column;
}
.page-item {
flex: 1;
flex-direction: row;
position: absolute;
left: 16rpx;
top: 0;
right: 16rpx;
bottom: 0;
}
.middle {
display: flex;
flex-direction: column;
background-color: #fff;
border-radius: 16rpx;
padding: 0rpx 64rpx 0rpx 48rpx;
}
.text-block {
overflow: hidden;
height: 66rpx;
margin-bottom: 14rpx;
border-bottom: 1px solid #f4f5f6;
}
.text-block-last {
margin-bottom: 0;
border-bottom: 0;
}
.middle-date {
flex: 2;
font-size: 28rpx;
line-height: 66rpx;
color: #333;
margin-bottom: 8rpx;
}
.middle-date-des {
flex: 5;
font-size: 28rpx;
line-height: 66rpx;
height: 66rpx;
overflow: hidden;
text-overflow: ellipsis;
color: #888;
}
.picker-year {
position: relative;
border-radius: 4px;
align-items: center;
line-height: normal;
}
.uni-list-cell {
flex: 1;
height: 66rpx;
line-height: 66rpx;
}
.uni-list-cell-db {
flex: 1;
}
.picker-block {
flex: 1;
}
.uni-input-text {
height: 66rpx;
line-height: 66rpx;
font-size: 14px;
color: #888;
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
}
.planout-block-lists {
display: flex;
flex-direction: column;
}
.main {
position: relative;
flex-direction: column;
}
.planout-block {
display: flex;
justify-content: space-between;
margin-bottom: 10rpx;
padding: 0 180rpx;
}
.btn {
flex: 1;
line-height: 70rpx;
background: $wly-primary-color;
border-radius: 46rpx;
border: none;
}
.btn-text {
color: #fff;
font-size: 34rpx;
}
.icon-arrow {
width: 50rpx;
height: 20rpx;
margin-top: 24rpx;
transition-property: transform;
transition-duration: 0.15s;
transform: rotate(0deg);
position: absolute;
right: 0;
z-index: 10;
}
.icon-arrow-rotate {
transform: rotate(180deg);
}
.height25 {
height: 50rpx;
}
</style>
\ No newline at end of file
pages/usercenter/usercenter.nvue
View file @
29491080
...
...
@@ -110,6 +110,15 @@
<text class="dot" v-if="dhkNum - 0 >0">{{dhkNum}}</text>
<text class="entry-bill-text">销售折扣</text>
</view>
<view class="entry-block" @click="goPage('terminal-list')">
<view class="entry-bill">
<image class="entry-bill-icon entry-bill-icon_billing"
src="@/static/image/terminalIn.png" mode="">
</image>
</view>
<text class="dot" v-if="zdzpNum - 0 >0">{{zdzpNum}}</text>
<text class="entry-bill-text">直配订单查询</text>
</view>
<!-- <view class="entry-block" @click="goPage('brand-recommend')">
<view class="entry-bill">
<image class="entry-bill-icon entry-bill-icon_billing"
...
...
@@ -151,7 +160,9 @@
import {
apiLogOut
} from '@/servers/user.js'
import {
getTermianlCountAll
} from '@/servers/terminal.js'
export default {
onLoad() {
this.winHeight = `height:${this.sysinfo.safeArea.height}px`
...
...
@@ -171,7 +182,8 @@
type: 0, // 全部9 代办0 已办2
},
agentNum: 0,
dhkNum: 0
dhkNum: 0,
zdzpNum: 0
}
},
computed: {
...
...
@@ -189,14 +201,12 @@
this.getUsercenterNum()
},
methods: {
async getUsercenterNum(){
let params = {
user_bp: this.userInfo.code,
role: "WLY001",
}
let res = await getDhkDbsl(params)
this.dhkNum = res.dbsl
if(res.dbsl - 0 < 1){
async getTermianlCountAll(){
let params = {"demandType":"ZDZG","isReview":0,"signDateNotNull":true}
let res = await getTermianlCountAll(params)
this.zdzpNum = res.data || 0
const allDot = Number(this.zdzpNum + this.dhkNum)
if(allDot - 0 < 1){
uni.removeTabBarBadge({
index:3
})
...
...
@@ -204,9 +214,18 @@
}
uni.setTabBarBadge({
index:3,
text:
res.dbsl
.toString()
text:
allDot
.toString()
})
},
async getUsercenterNum(){
let params = {
user_bp: this.userInfo.code,
role: "WLY001",
}
let res = await getDhkDbsl(params)
this.dhkNum = res.dbsl || 0
this.getTermianlCountAll()
},
async apiGetMissionList(){
const params = {
...this.condition,
...
...
servers/api.helper.js
View file @
29491080
...
...
@@ -40,7 +40,7 @@ class Request {
return
new
Promise
((
resolve
,
reject
)
=>
{
options
.
complete
=
(
response
)
=>
{
console
.
log
(
'api.helper---options.complete'
,
response
)
//
console.log('api.helper---options.complete', response)
// 请求返回后,隐藏loading(如果请求返回快的话,可能会没有loading)
uni
.
hideLoading
();
// 清除定时器,如果请求回来了,就无需loading
...
...
servers/http.interceptor.js
View file @
29491080
...
...
@@ -59,14 +59,14 @@ const install = (Vue, vm) => {
// 方式四,如果token放在了Storage本地存储中,拦截是每次请求都执行的,所以哪怕您重新登录修改了Storage,下一次的请求将会是最新值
// const token = uni.getStorageSync('token');
// config.header.token = token;
console
.
log
(
'http.interceptor.request'
,
config
)
//
console.log('http.interceptor.request', config)
return
config
;
}
// 响应拦截,判断状态码是否通过
http
.
interceptor
.
response
=
(
res
)
=>
{
// 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据
// 判断可能变成了res.statueCode,或者res.data.code之类的,请打印查看结果
console
.
log
(
'http.interceptor---response-----'
,
res
)
//
console.log('http.interceptor---response-----', res)
if
(
res
.
MSGTYPE
===
'S'
||
res
.
msgtype
===
'S'
||
res
.
status
===
1
||
res
.
status
===
0
||
res
.
result
===
'S'
||
res
.
Status
===
'Success'
)
{
...
...
servers/purchaseList.js
View file @
29491080
...
...
@@ -135,3 +135,8 @@ export async function findFirstByTerminalId(params) {
const
res
=
await
apiHelper
.
post
(
'/crm-app/wantgoods/findFirstByTerminalId'
,
params
,
{
'Content-Type'
:
'application/x-www-form-urlencoded'
})
return
res
}
// 查询终端要货箱码
export
async
function
findGoodsSingleJoinBoxBarcode
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/wantGoodsDataQuery/findGoodsSingleJoinBoxBarcode'
,
params
,
)
return
res
}
servers/terminal.js
0 → 100644
View file @
29491080
import
apiHelper
from
'./api.helper.js'
// 查询签收未查看数量
export
async
function
getTermianlCountAll
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/deliveryorderquery/countAll'
,
params
)
return
res
}
// 查询签收终端直配要货单数据
export
async
function
getTermianlList
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/deliveryorderquery/findAll'
,
params
)
return
res
}
// 修改数据为已查看
export
async
function
updateTransportInfoReview
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/crm-app/deliverysettlement/updateTransportInfoReview'
,
params
)
return
res
}
static/image/terminalIn.png
0 → 100644
View file @
29491080
503 Bytes
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment