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
312c8c87
Commit
312c8c87
authored
Jun 08, 2022
by
chuan.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增订单 制票快捷时间选项
parent
b544d145
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
178 additions
and
34 deletions
+178
-34
my-order.nvue
pages/my-order/my-order.nvue
+36
-4
order-page.nvue
pages/my-order/order-page.nvue
+33
-8
produce-material.nvue
pages/produce-material/produce-material.nvue
+29
-10
produce-order.nvue
pages/produce-order/produce-order.nvue
+9
-2
order-page.nvue
pages/ticket-order/order-page.nvue
+43
-5
ticket-order.nvue
pages/ticket-order/ticket-order.nvue
+28
-5
No files found.
pages/my-order/my-order.nvue
View file @
312c8c87
...
@@ -21,8 +21,9 @@
...
@@ -21,8 +21,9 @@
<view class="conditon-block" :style="conditionTop" :class="{'conditon-block-auto':ishowDetail}">
<view class="conditon-block" :style="conditionTop" :class="{'conditon-block-auto':ishowDetail}">
<view class="filter-title">
<view class="filter-title">
<button type="default" class="filter-btn filter-btn-active"><text
<button type="default" class="filter-btn" :class="{'filter-btn-active':0 === filterActiveIndex}"
class="filter-btn__text filter-btn-active__text">一周内</text></button>
@tap="handleFilter('week')"><text class="filter-btn__text"
:class="{'filter-btn-active__text':0 === filterActiveIndex}">一周内</text></button>
<button type="default" @tap="handleFilter(item)" class="filter-btn"
<button type="default" @tap="handleFilter(item)" class="filter-btn"
:class="{'filter-btn-active':item === filterActiveIndex}" v-for="item in 3" :key='item'>
:class="{'filter-btn-active':item === filterActiveIndex}" v-for="item in 3" :key='item'>
<text class="filter-btn__text"
<text class="filter-btn__text"
...
@@ -43,7 +44,8 @@
...
@@ -43,7 +44,8 @@
<swiper ref="swiper1" class="tab-box" :current="tabIndex" :duration="300" @change="onswiperchange"
<swiper ref="swiper1" class="tab-box" :current="tabIndex" :duration="300" @change="onswiperchange"
@transition="onswiperscroll" @animationfinish="animationfinish" @onAnimationEnd="animationfinish">
@transition="onswiperscroll" @animationfinish="animationfinish" @onAnimationEnd="animationfinish">
<swiper-item class="swiper-item" v-for="(page, index) in tabList" :key="index">
<swiper-item class="swiper-item" v-for="(page, index) in tabList" :key="index">
<orderPage :ref="'page' + index" class="page-item" :nid="page.newsid"></orderPage>
<orderPage :ref="'page' + index" class="page-item" :date-range="dateRange" :nid="page.newsid">
</orderPage>
</swiper-item>
</swiper-item>
</swiper>
</swiper>
</view>
</view>
...
@@ -55,6 +57,10 @@
...
@@ -55,6 +57,10 @@
mapState
mapState
} from 'vuex'
} from 'vuex'
import {
timeRangeFormat
} from '@/utils/date.js'
// #ifdef APP-PLUS
// #ifdef APP-PLUS
const dom = weex.requireModule('dom');
const dom = weex.requireModule('dom');
// #endif
// #endif
...
@@ -107,6 +113,10 @@
...
@@ -107,6 +113,10 @@
_touchTabIndex: 0,
_touchTabIndex: 0,
ishowDetail: false,
ishowDetail: false,
filterActiveIndex: 0,
filterActiveIndex: 0,
dateRange: {
start: '',
end: ''
}
}
}
},
},
computed: {
computed: {
...
@@ -135,6 +145,9 @@
...
@@ -135,6 +145,9 @@
this.tabListSize = {};
this.tabListSize = {};
this._touchTabIndex = 0;
this._touchTabIndex = 0;
this.dateRange.start = timeRangeFormat('week')
this.dateRange.end = timeRangeFormat('now')
this.pageList = [];
this.pageList = [];
for (let i = 0; i < this.tabList.length; i++) {
for (let i = 0; i < this.tabList.length; i++) {
let item = this.$refs['page' + i]
let item = this.$refs['page' + i]
...
@@ -160,6 +173,12 @@
...
@@ -160,6 +173,12 @@
this._touchTabIndex = index;
this._touchTabIndex = index;
// #endif
// #endif
// this.dateRange = {
// start: '',
// end: ''
// }
// this.filterActiveIndex = -1
this.switchTab(index);
this.switchTab(index);
},
},
onswiperchange(e) {
onswiperchange(e) {
...
@@ -302,7 +321,8 @@
...
@@ -302,7 +321,8 @@
});
});
},
},
loadTabData(index) {
loadTabData(index) {
this.pageList[index].loadData();
this.pageList[index].refreshData()
// this.pageList[index].loadData(true, this.dateRange);
},
},
clearTabData(index) {
clearTabData(index) {
this.pageList[index].clear();
this.pageList[index].clear();
...
@@ -312,6 +332,18 @@
...
@@ -312,6 +332,18 @@
},
},
handleFilter(item) {
handleFilter(item) {
this.filterActiveIndex = item
this.filterActiveIndex = item
},
handleFilter(item) {
if (item === 'week') {
this.filterActiveIndex = 0
this.dateRange.start = timeRangeFormat('week')
} else {
this.filterActiveIndex = item
this.dateRange.start = timeRangeFormat(item)
}
this.dateRange.end = timeRangeFormat('now')
this.pageList[this.tabIndex].refreshData()
// this.pageList[this.tabIndex].loadData(true, this.dateRange);
}
}
}
}
}
}
...
...
pages/my-order/order-page.nvue
View file @
312c8c87
...
@@ -53,6 +53,15 @@
...
@@ -53,6 +53,15 @@
nid: {
nid: {
type: String,
type: String,
default: ''
default: ''
},
dateRange: {
type: Object,
default: () => {
return {
start: '',
end: ''
}
}
}
}
},
},
data() {
data() {
...
@@ -109,10 +118,10 @@
...
@@ -109,10 +118,10 @@
this.pullTimer = null;
this.pullTimer = null;
this.condition.USER_BP = this.userInfo.code
this.condition.USER_BP = this.userInfo.code
this._isWidescreen = false;
this._isWidescreen = false;
this.loadData(
)
// this.loadData(true
)
},
},
methods: {
methods: {
loadData(refresh) {
loadData(refresh
, dateRange
) {
if (this.isLoading) {
if (this.isLoading) {
return;
return;
}
}
...
@@ -123,11 +132,19 @@
...
@@ -123,11 +132,19 @@
this.condition.PROCESS_TYPE[0].LOW = this.nid
this.condition.PROCESS_TYPE[0].LOW = this.nid
let POSTING_DATE = []
let POSTING_DATE = []
let PROCESS_TYPE = []
let PROCESS_TYPE = []
if (this.condition.POSTING_DATE[0].LOW === '') {
let dateParams = dateRange || this.dateRange
POSTING_DATE = []
if (dateParams && dateParams.start) {
} else {
this.condition.POSTING_DATE[0].LOW = dateParams.start
this.condition.POSTING_DATE[0].HIGH = dateParams.end
POSTING_DATE = this.condition.POSTING_DATE
POSTING_DATE = this.condition.POSTING_DATE
} else {
POSTING_DATE = []
}
}
// if (this.condition.POSTING_DATE[0].LOW === '') {
// POSTING_DATE = []
// } else {
// POSTING_DATE = this.condition.POSTING_DATE
// }
if (this.condition.PROCESS_TYPE[0].LOW === '') {
if (this.condition.PROCESS_TYPE[0].LOW === '') {
PROCESS_TYPE = [{
PROCESS_TYPE = [{
...
@@ -223,9 +240,9 @@
...
@@ -223,9 +240,9 @@
console.log('loadMore')
console.log('loadMore')
if (this.page.PAGE < this.loadParams.totalPage) {
if (this.page.PAGE < this.loadParams.totalPage) {
this.page.PAGE++
this.page.PAGE++
this.loadData();
this.loadData(
false
);
} else {
} else {
this.loadingText = '--
到底了
--'
this.loadingText = '--
到底了
--'
}
}
},
},
clear() {
clear() {
...
@@ -256,7 +273,15 @@
...
@@ -256,7 +273,15 @@
this.pulling = true;
this.pulling = true;
this.refreshing = true;
this.refreshing = true;
this.page.PAGE = 1
this.page.PAGE = 1
this.refreshText = "正在刷新...";
this.refreshText = "正在刷新..."
this.loadingText = '加载中...'
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.loadData(true);
this.loadData(true);
},
},
onrefresh(e) {
onrefresh(e) {
...
...
pages/produce-material/produce-material.nvue
View file @
312c8c87
...
@@ -3,8 +3,9 @@
...
@@ -3,8 +3,9 @@
<view class="status_bar" :style="navHeight"></view>
<view class="status_bar" :style="navHeight"></view>
<view class="conditon-block" :style="conditionTop" :class="{'conditon-block-auto':ishowDetail}">
<view class="conditon-block" :style="conditionTop" :class="{'conditon-block-auto':ishowDetail}">
<view class="filter-title">
<view class="filter-title">
<button type="default" class="filter-btn filter-btn-active"><text
<button type="default" class="filter-btn" :class="{'filter-btn-active':0 === filterActiveIndex}"
class="filter-btn__text filter-btn-active__text">一周内</text></button>
@tap="handleFilter('week')"><text class="filter-btn__text"
:class="{'filter-btn-active__text':0 === filterActiveIndex}">一周内</text></button>
<button type="default" @tap="handleFilter(item)" class="filter-btn"
<button type="default" @tap="handleFilter(item)" class="filter-btn"
:class="{'filter-btn-active':item === filterActiveIndex}" v-for="item in 3" :key='item'><text
:class="{'filter-btn-active':item === filterActiveIndex}" v-for="item in 3" :key='item'><text
class="filter-btn__text"
class="filter-btn__text"
...
@@ -60,6 +61,10 @@
...
@@ -60,6 +61,10 @@
apiGetProduceMaterialOrder
apiGetProduceMaterialOrder
} from '@/servers/produceMaterial.js'
} from '@/servers/produceMaterial.js'
import {
timeRangeFormat
} from '@/utils/date.js'
export default {
export default {
components: {
components: {
uniList,
uniList,
...
@@ -145,7 +150,8 @@
...
@@ -145,7 +150,8 @@
this.pullTimer = null;
this.pullTimer = null;
this.condition.PARTNER = this.userInfo.code
this.condition.PARTNER = this.userInfo.code
this._isWidescreen = false;
this._isWidescreen = false;
this.loadData()
this.handleFilter('week')
this.loadData(true)
},
},
methods: {
methods: {
loadData(refresh) {
loadData(refresh) {
...
@@ -160,6 +166,7 @@
...
@@ -160,6 +166,7 @@
...this.condition,
...this.condition,
...this.page
...this.page
}
}
apiGetProduceMaterialOrder(params).then((res) => {
apiGetProduceMaterialOrder(params).then((res) => {
console.log('loadData', res)
console.log('loadData', res)
const {
const {
...
@@ -224,6 +231,13 @@
...
@@ -224,6 +231,13 @@
this.pulling = true;
this.pulling = true;
this.refreshing = true;
this.refreshing = true;
this.refreshText = "正在刷新...";
this.refreshText = "正在刷新...";
this.loadingText = '加载中...'
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.page.PAGE = 1
this.loadData(true);
this.loadData(true);
},
},
...
@@ -253,18 +267,23 @@
...
@@ -253,18 +267,23 @@
this.refreshText = "下拉可以刷新";
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();
},
handleShowDetail() {
handleShowDetail() {
this.ishowDetail = !this.ishowDetail
this.ishowDetail = !this.ishowDetail
},
},
handleFilter(item) {
handleFilter(item) {
this.filterActiveIndex = item
this.filterActiveIndex = item
},
handleFilter(item) {
if (item === 'week') {
this.filterActiveIndex = 0
this.condition.DATUM.LOW = timeRangeFormat('week')
} else {
this.filterActiveIndex = item
this.condition.DATUM.LOW = timeRangeFormat(item)
}
this.condition.DATUM.HIGH = timeRangeFormat('now')
this.loadData(true)
}
}
}
}
}
}
...
...
pages/produce-order/produce-order.nvue
View file @
312c8c87
...
@@ -150,7 +150,7 @@
...
@@ -150,7 +150,7 @@
this.condition.PARTNER = this.userInfo.code
this.condition.PARTNER = this.userInfo.code
this._isWidescreen = false;
this._isWidescreen = false;
this.handleFilter('week')
this.handleFilter('week')
this.loadData()
this.loadData(
true
)
// console.log('2222', timeRangeFormat('now'))
// console.log('2222', timeRangeFormat('now'))
},
},
methods: {
methods: {
...
@@ -231,6 +231,13 @@
...
@@ -231,6 +231,13 @@
this.pulling = true;
this.pulling = true;
this.refreshing = true;
this.refreshing = true;
this.refreshText = "正在刷新...";
this.refreshText = "正在刷新...";
this.loadingText = '加载中...'
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.page.PAGE = 1
this.loadData(true);
this.loadData(true);
},
},
...
@@ -273,7 +280,7 @@
...
@@ -273,7 +280,7 @@
}
}
this.condition.DATUM.HIGH = timeRangeFormat('now')
this.condition.DATUM.HIGH = timeRangeFormat('now')
this.loadData()
this.loadData(
true
)
}
}
}
}
}
}
...
...
pages/ticket-order/order-page.nvue
View file @
312c8c87
...
@@ -53,6 +53,15 @@
...
@@ -53,6 +53,15 @@
nid: {
nid: {
type: String,
type: String,
default: ''
default: ''
},
dateRange: {
type: Object,
default: () => {
return {
start: '',
end: ''
}
}
}
}
},
},
data() {
data() {
...
@@ -110,14 +119,28 @@
...
@@ -110,14 +119,28 @@
}
}
}
}
},
},
// watch: {
// 'dateRange': {
// handler(val, old) {
// console.log('2222', val, old)
// if (val !== old) {
// this.condition.MAK_DATE[0].LOW = val.start
// this.condition.MAK_DATE[0].HIGH = val.end
// this.loadData()
// }
// },
// immediate: true,
// deep: true
// }
// },
created() {
created() {
this.pullTimer = null;
this.pullTimer = null;
this.condition.PARTNER = this.userInfo.code
this.condition.PARTNER = this.userInfo.code
this._isWidescreen = false;
this._isWidescreen = false;
this.loadData(
)
// this.loadData(true
)
},
},
methods: {
methods: {
loadData(refresh) {
loadData(refresh
, dateRange
) {
if (this.isLoading) {
if (this.isLoading) {
return;
return;
}
}
...
@@ -127,11 +150,19 @@
...
@@ -127,11 +150,19 @@
let MAK_DATE = []
let MAK_DATE = []
let INV_STATUS = []
let INV_STATUS = []
if (this.condition.MAK_DATE[0].LOW === '') {
let dateParams = dateRange || this.dateRange
MAK_DATE = []
if (dateParams && dateParams.start) {
} else {
this.condition.MAK_DATE[0].LOW = dateParams.start
this.condition.MAK_DATE[0].HIGH = dateParams.end
MAK_DATE = this.condition.MAK_DATE
MAK_DATE = this.condition.MAK_DATE
} else {
MAK_DATE = []
}
}
// if (this.condition.MAK_DATE[0].LOW === '') {
// MAK_DATE = []
// } else {
// MAK_DATE = this.condition.MAK_DATE
// }
if (this.nid === '') {
if (this.nid === '') {
INV_STATUS = []
INV_STATUS = []
...
@@ -210,6 +241,13 @@
...
@@ -210,6 +241,13 @@
this.pulling = true;
this.pulling = true;
this.refreshing = true;
this.refreshing = true;
this.refreshText = "正在刷新...";
this.refreshText = "正在刷新...";
this.loadingText = '加载中...'
this.loadParams = {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
}
this.page.PAGE = 1
this.page.PAGE = 1
this.loadData(true);
this.loadData(true);
},
},
...
...
pages/ticket-order/ticket-order.nvue
View file @
312c8c87
...
@@ -21,8 +21,9 @@
...
@@ -21,8 +21,9 @@
<view class="conditon-block" :style="conditionTop" :class="{'conditon-block-auto':ishowDetail}">
<view class="conditon-block" :style="conditionTop" :class="{'conditon-block-auto':ishowDetail}">
<view class="filter-title">
<view class="filter-title">
<button type="default" class="filter-btn filter-btn-active"><text
<button type="default" class="filter-btn" :class="{'filter-btn-active':0 === filterActiveIndex}"
class="filter-btn__text filter-btn-active__text">一周内</text></button>
@tap="handleFilter('week')"><text class="filter-btn__text"
:class="{'filter-btn-active__text':0 === filterActiveIndex}">一周内</text></button>
<button type="default" @tap="handleFilter(item)" class="filter-btn"
<button type="default" @tap="handleFilter(item)" class="filter-btn"
:class="{'filter-btn-active':item === filterActiveIndex}" v-for="item in 3" :key='item'>
:class="{'filter-btn-active':item === filterActiveIndex}" v-for="item in 3" :key='item'>
<text class="filter-btn__text"
<text class="filter-btn__text"
...
@@ -43,7 +44,8 @@
...
@@ -43,7 +44,8 @@
<swiper ref="swiper1" class="tab-box" :current="tabIndex" :duration="300" @change="onswiperchange"
<swiper ref="swiper1" class="tab-box" :current="tabIndex" :duration="300" @change="onswiperchange"
@transition="onswiperscroll" @animationfinish="animationfinish" @onAnimationEnd="animationfinish">
@transition="onswiperscroll" @animationfinish="animationfinish" @onAnimationEnd="animationfinish">
<swiper-item class="swiper-item" v-for="(page, index) in tabList" :key="index">
<swiper-item class="swiper-item" v-for="(page, index) in tabList" :key="index">
<orderPage :ref="'page' + index" class="page-item" :nid="page.newsid"></orderPage>
<orderPage :ref="'page' + index" class="page-item" :date-range="dateRange" :nid="page.newsid">
</orderPage>
</swiper-item>
</swiper-item>
</swiper>
</swiper>
</view>
</view>
...
@@ -55,6 +57,10 @@
...
@@ -55,6 +57,10 @@
mapState
mapState
} from 'vuex'
} from 'vuex'
import {
timeRangeFormat
} from '@/utils/date.js'
// #ifdef APP-PLUS
// #ifdef APP-PLUS
const dom = weex.requireModule('dom');
const dom = weex.requireModule('dom');
// #endif
// #endif
...
@@ -101,6 +107,10 @@
...
@@ -101,6 +107,10 @@
_touchTabIndex: 0,
_touchTabIndex: 0,
ishowDetail: false,
ishowDetail: false,
filterActiveIndex: 0,
filterActiveIndex: 0,
dateRange: {
start: '',
end: ''
}
}
}
},
},
computed: {
computed: {
...
@@ -129,6 +139,9 @@
...
@@ -129,6 +139,9 @@
this.tabListSize = {};
this.tabListSize = {};
this._touchTabIndex = 0;
this._touchTabIndex = 0;
this.dateRange.start = timeRangeFormat('week')
this.dateRange.end = timeRangeFormat('now')
this.pageList = [];
this.pageList = [];
for (let i = 0; i < this.tabList.length; i++) {
for (let i = 0; i < this.tabList.length; i++) {
let item = this.$refs['page' + i]
let item = this.$refs['page' + i]
...
@@ -296,7 +309,8 @@
...
@@ -296,7 +309,8 @@
});
});
},
},
loadTabData(index) {
loadTabData(index) {
this.pageList[index].loadData();
this.pageList[index].refreshData()
// this.pageList[index].loadData(true, this.dateRange);
},
},
clearTabData(index) {
clearTabData(index) {
this.pageList[index].clear();
this.pageList[index].clear();
...
@@ -305,7 +319,16 @@
...
@@ -305,7 +319,16 @@
this.ishowDetail = !this.ishowDetail
this.ishowDetail = !this.ishowDetail
},
},
handleFilter(item) {
handleFilter(item) {
this.filterActiveIndex = item
if (item === 'week') {
this.filterActiveIndex = 0
this.dateRange.start = timeRangeFormat('week')
} else {
this.filterActiveIndex = item
this.dateRange.start = timeRangeFormat(item)
}
this.dateRange.end = timeRangeFormat('now')
this.pageList[this.tabIndex].refreshData()
// this.pageList[this.tabIndex].loadData(true, this.dateRange);
}
}
}
}
}
}
...
...
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