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
e6829ce4
Commit
e6829ce4
authored
May 26, 2022
by
chuan.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
制票订单处理 销售订单处理
parent
0a5a68b7
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
938 additions
and
764 deletions
+938
-764
my-order.nvue
pages/my-order/my-order.nvue
+4
-4
order-item.nvue
pages/my-order/order-item.nvue
+14
-15
order-page.nvue
pages/my-order/order-page.nvue
+319
-275
order-detail-noquota.nvue
pages/order-detail-noquota/order-detail-noquota.nvue
+99
-68
order-detail-quota.nvue
pages/order-detail-quota/order-detail-quota.nvue
+111
-77
produce-plan.nvue
pages/produce-material/produce-plan.nvue
+15
-12
produce-plan.nvue
pages/produce-order/produce-plan.nvue
+5
-6
order-item.nvue
pages/ticket-order/order-item.nvue
+34
-23
order-page.nvue
pages/ticket-order/order-page.nvue
+292
-273
ticket-order.nvue
pages/ticket-order/ticket-order.nvue
+9
-9
produceMaterial.js
servers/produceMaterial.js
+2
-2
salesOrder.js
servers/salesOrder.js
+22
-0
ticketOrder.js
servers/ticketOrder.js
+12
-0
No files found.
pages/my-order/my-order.nvue
View file @
e6829ce4
...
...
@@ -77,20 +77,20 @@
tabList: [{
id: "tab01",
name: '全部',
newsid:
0
newsid:
''
}, {
id: "tab02",
name: '配额',
newsid:
23
newsid:
'ZS01'
}, {
id: "tab03",
name: '非配额',
newsid:
223
newsid:
'ZS02'
},
{
id: "tab04",
name: '公关团购',
newsid:
224
newsid:
'ZS02'
}
],
tabIndex: 0,
...
...
pages/my-order/order-item.nvue
View file @
e6829ce4
<template>
<view class="order view">
<view class="top">
<text class="title-no">订单编号:
TP10000021
</text>
<text class="title-no">订单编号:
{{newsItem.object_id}}
</text>
<view class="title-info">
<button class="title-info__status title-info__status-done" type="default"><text
class="item-block-btn__text">
待审批
</text></button>
class="item-block-btn__text">
{{newsItem.status_text}}
</text></button>
</view>
</view>
<view class="middle view">
<view class="middle-title">
<text class="middle-title__text">
非配额订单
</text>
<text class="middle-title__text">
{{newsItem.process_type_text}}
</text>
</view>
<view class="text-block-box">
<view class="text-block text-block-last">
<text class="middle-date">
2021-08-06 05:14
</text>
<text class="middle-date">
{{newsItem.posting_date}}
</text>
<text class="middle-date-des">下单日期</text>
</view>
<view class="text-block text-block-last">
<view class="middle-date-right">
<text class="middle-date">
¥5000
</text>
<text class="middle-date">
{{newsItem.all_price}}
</text>
</view>
<text class="middle-date-des middle-date-right">金额</text>
</view>
...
...
@@ -83,7 +83,6 @@
}
.title-info__status {
width: 120rpx;
height: 48rpx;
line-height: 48rpx;
background: #f61d30;
...
...
@@ -102,13 +101,13 @@
background: #f8f8f8;
color: #888888;
border: 1px solid #f8f8f8;
}
.item-block-btn__text {
height: 48rpx;
line-height: 48rpx;
font-size: 12px;
color: #888888;
}
.item-block-btn__text {
height: 48rpx;
line-height: 48rpx;
font-size: 12px;
color: #888888;
}
.middle {
...
...
@@ -153,7 +152,7 @@
.middle-date-des {
font-size: 24rpx;
color: #999;
color: #999;
}
.text-block-box {
...
...
@@ -164,7 +163,7 @@
.middle-date-right {
display: flex;
align-items: center;
justify-content: flex-end;
justify-content: flex-end;
text-align: right;
}
</style>
pages/my-order/order-page.nvue
View file @
e6829ce4
<template>
<view class="page-news">
<uni-list ref="list" class="listview" :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" @click.native="goDetail(item)"></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>
<view class="page-news">
<uni-list ref="list" class="listview" :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" @click.native="goDetail(item)"></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 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 orderItem from './order-item.nvue';
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 orderItem from './order-item.nvue';
import {
mapState
} from 'vuex'
export default {
components: {
uniList,
uniCell,
uniRefresh,
uniLoadMore,
noData,
orderItem
},
props: {
nid: {
type: [Number, String],
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=="
}
},
created() {
this.pullTimer = null;
this.requestParams = {
columnId: this.nid,
minId: 0,
pageSize: 10,
column: 'id,post_id,title,author_name,cover,published_at,comments_count'
};
import {
apiGetSalesOrder
} from '@/servers/salesOrder.js'
this._isWidescreen = false;
// #ifdef H5
var mediaQueryOb = uni.createMediaQueryObserver(this)
mediaQueryOb.observe({
minWidth: 768
}, matches => {
this._isWidescreen = matches;
})
// #endif
},
methods: {
loadData(refresh) {
if (this.isLoading) {
return;
}
export default {
components: {
uniList,
uniCell,
uniRefresh,
uniLoadMore,
noData,
orderItem
},
props: {
nid: {
type: String,
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==",
condition: {
USER_BP: '50000215',
ROLE: 'WLY001',
PROCESS_TYPE: [{
"SIGN": "I",
"OPTION": "EQ",
LOW: '',
HIGH: ''
}],
POSTING_DATE: [{
"SIGN": "I",
"OPTION": "BT",
LOW: '',
HIGH: ''
}]
},
page: {
"PAGE": "1",
"PAGESIZE": "10",
}
}
},
computed: {
...mapState(['sysinfo'])
},
created() {
this.pullTimer = null;
this.isLoading = true;
this.isNoData = false;
this.requestParams.time = new Date().getTime() + '';
this._isWidescreen = false;
this.loadData()
},
methods: {
loadData(refresh) {
if (this.isLoading) {
return;
}
var startTime = new Date();
uni.request({
// url: this.$host + 'api/news',
url: 'https://unidemo.dcloud.net.cn/api/news',
data: this.requestParams,
success: (result) => {
var endTime = new Date();
const data = result.data;
this.isNoData = (data.length <= 0);
this.isLoading = true;
this.isNoData = false;
const data_list = data.map((news) => {
return {
id: this.newGuid() + news.id,
newsid: news.id,
article_type: 1,
datetime: (new Date(news.published_at.replace(/\-/g, '/')).getTime()),
title: news.title,
image_url: news.cover,
source: news.author_name,
comment_count: news.comments_count,
post_id: news.post_id
};
});
this.condition.PROCESS_TYPE[0].LOW = this.nid
let POSTING_DATE = []
let PROCESS_TYPE = []
if (this.condition.POSTING_DATE[0].LOW === '') {
POSTING_DATE = []
} else {
POSTING_DATE = this.condition.POSTING_DATE
}
if (refresh) {
this.dataList = data_list;
this.requestParams.minId = 0;
} else {
this.dataList = this.dataList.concat(data_list);
this.requestParams.minId = data[data.length - 1].id;
}
if (this.condition.PROCESS_TYPE[0].LOW === '') {
PROCESS_TYPE = [{
"SIGN": "I",
"OPTION": "EQ",
LOW: 'ZS01',
},
{
"SIGN": "I",
"OPTION": "EQ",
LOW: 'ZS02',
}
]
} else {
PROCESS_TYPE = this.condition.PROCESS_TYPE
}
if (this.dataList.length > 0 && this._isWidescreen && this.dataList.length <= 10) {
this.goDetail(this.dataList[0]);
}
},
fail: (err) => {
if (this.dataList.length == 0) {
this.isNoData = true;
}
},
complete: (e) => {
this.isLoading = false;
if (refresh) {
this.refreshing = false;
this.refreshFlag = false;
this.refreshText = "已刷新";
if (this.pullTimer) {
clearTimeout(this.pullTimer);
}
this.pullTimer = setTimeout(() => {
this.pulling = false;
}, 1000);
}
}
});
},
loadMore(e) {
this.loadData();
},
clear() {
this.dataList.length = 0;
this.requestParams.minId = 0;
},
goDetail(detail) {
uni.navigateTo({
url:"/pages/order-detail-group/order-detail-group"
})
},
refreshData() {
if (this.isLoading) {
return;
}
this.pulling = true;
this.refreshing = true;
this.refreshText = "正在刷新...";
this.loadData(true);
},
onrefresh(e) {
this.refreshData();
// #ifdef APP-NVUE
this.$refs.list.resetLoadmore();
// #endif
},
onpullingdown(e) {
if (this.refreshing) {
return;
}
console.log('load---------', this.nid, PROCESS_TYPE)
// var angle = (e.pullingDistance) / e.viewHeight * 180;
// if (angle > 180) {
// angle = 180;
// }
// tab.angle = angle;
const params = {
...this.condition,
PROCESS_TYPE,
POSTING_DATE,
...this.page
}
apiGetSalesOrder(params).then((res) => {
console.log('loadData', res)
const {
data,
page,
total
} = res
const data_list = data;
this.page.PAGE = page
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();
}
}
}
this.isNoData = (data_list.length <= 0);
if (refresh) {
this.dataList = data_list;
} else {
this.dataList = this.dataList.concat(data_list);
}
if (this.dataList.length > 0 && this._isWidescreen && this.dataList.length <= 10) {
// this.goDetail(this.dataList[0]);
}
}).catch(() => {
if (this.dataList.length == 0) {
this.isNoData = true;
}
}).finally(() => {
this.isLoading = false;
if (refresh) {
this.refreshing = false;
this.refreshFlag = false;
this.refreshText = "已刷新";
if (this.pullTimer) {
clearTimeout(this.pullTimer);
}
this.pullTimer = setTimeout(() => {
this.pulling = false;
}, 1000);
}
})
},
loadMore(e) {
console.log('loadMore')
this.page.PAGE++
this.loadData();
},
clear() {
this.dataList.length = 0;
this.requestParams.minId = 0;
},
goDetail(detail) {
let path = ''
if (detail.process_type === 'ZS01') {
path = 'order-detail-quota/order-detail-quota'
} else if (detail.process_type === 'ZS02') {
if (detail.zzfld00002j === 'V013') {
path = 'order-detail-group/order-detail-group'
} else {
path = 'order-detail-noquota/order-detail-noquota'
}
} else {
return
}
uni.navigateTo({
url: `/pages/${path}?order=${JSON.stringify(detail)}`
})
},
refreshData() {
if (this.isLoading) {
return;
}
this.pulling = true;
this.refreshing = true;
this.page.PAGE = 1
this.refreshText = "正在刷新...";
this.loadData(true);
},
onrefresh(e) {
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 = "下拉可以刷新";
}
}
}
}
</script>
<style lang="scss" scoped>
.no-data {
flex: 1;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 10;
}
.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;
}
.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 */
}
.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 {
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-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: .5s;
transition-property: transform;
transform: rotate(0deg);
transform-origin: 15px 15px;
}
.refresh-icon {
width: 32px;
height: 32px;
transition-duration: .5s;
transition-property: transform;
transform: rotate(0deg);
transform-origin: 15px 15px;
}
.refresh-icon-active {
transform: rotate(180deg);
}
.refresh-icon-active {
transform: rotate(180deg);
}
.loading-icon {
width: 28px;
height: 28px;
margin-right: 5px;
color: gray;
}
.loading-icon {
width: 28px;
height: 28px;
margin-right: 5px;
color: gray;
}
.loading-text {
margin-left: 2px;
font-size: 16px;
color: #999999;
}
.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 {
align-items: center;
justify-content: center;
padding-top: 14px;
padding-bottom: 14px;
text-align: center;
}
.loading-more-text {
font-size: 28upx;
color: #999;
}
</style>
.loading-more-text {
font-size: 28upx;
color: #999;
}
</style>
pages/order-detail-noquota/order-detail-noquota.nvue
View file @
e6829ce4
...
...
@@ -5,63 +5,64 @@
<view class="main">
<view class="order-main view">
<view class="top">
<text class="title-no">订单编号:
TP10000021
</text>
<text class="title-no">订单编号:
{{INFO.OBJECT_ID}}
</text>
<view class="title-info">
<button class="title-info__status title-info__status-done" type="default">待审批</button>
<button class="title-info__status title-info__status-done"
type="default">{{INFO.STATUS_TEXT}}</button>
</view>
</view>
<view class="order-main-middle view">
<view class="middle-title">
<text class="middle-title__text">
非配额订单
</text>
<text class="middle-title__text">
{{INFO.PROCESS_TYPE_TEXT}}
</text>
</view>
<view class="text-block-box">
<view class="text-block text-block-last">
<text class="middle-date">
2021-08-06 05:14
</text>
<text class="middle-date">
{{INFO.POSTING_DATE}}
</text>
<text class="middle-date-des">下单日期</text>
</view>
<view class="text-block text-block-last">
<view class="middle-date-right">
<text class="middle-date">
¥5000
</text>
<text class="middle-date">
{{INFO.OBJECT_ID}}
</text>
</view>
<text class="middle-date-des middle-date-right">金额</text>
</view>
</view>
</view>
</view>
<view class="order-middle view" :class="{'order-middle-auto':ishowReceiveDetail}">
<view class="middle view">
<view class="middle view"
v-for="(item,index) in ITEM" :key="index"
>
<view class="item-block item-block-name">
<text class="item-block-label">
电商配额酒年度计划(1-5月)
</text>
<text class="item-block-label">
{{item.ZZFLD000005_Z1}}
</text>
</view>
<view class="block-detal">
<view class="block-detal-item">
<text class="detal-item-label">产品</text>
<text class="detal-item-value">
1618五粮液 500ml*6
</text>
<text class="detal-item-value">
{{item.DESCRIPTION}}
</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">数量</text>
<text class="detal-item-value">
25
</text>
<text class="detal-item-label">数量
(件))
</text>
<text class="detal-item-value">
{{item.ZZFLD000009}}
</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">
合
数</text>
<text class="detal-item-value">
25
</text>
<text class="detal-item-label">
盒
数</text>
<text class="detal-item-value">
{{item.ZZFLD00002W}}
</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">单价</text>
<text class="detal-item-value">
¥880
</text>
<text class="detal-item-value">
{{item.NET_PRICE}}
</text>
</view>
<view class="block-detal-item block-detal-item-last">
<text class="detal-item-label"></text>
<view class="detal-item-value">
<text class="item-value-intotal">小计:</text>
<text class="item-value-intotal-num">
¥20,000.00
</text>
<text class="item-value-intotal-num">
{{item.NET_VALUE}}
</text>
</view>
</view>
</view>
</view>
<view class="middle view">
<
!-- <
view class="middle view">
<view class="item-block item-block-name">
<text class="item-block-label">电商配额酒年度计划(1-5月)</text>
</view>
...
...
@@ -90,8 +91,8 @@
</view>
</view>
</view>
</view>
</view>
-->
<view class="float-btn-block">
<view class="float-btn" @click="handleShowReceiveDetail">
<text class="float-btn__text">{{ishowReceiveDetail?'收起':'展示完整信息'}}</text>
...
...
@@ -99,9 +100,9 @@
src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image>
</view>
</view>
</view>
<view class="order-bottom view">
<view class="middle view">
<view class="item-block item-block-name">
...
...
@@ -121,7 +122,7 @@
</view>
</view>
</view>
</view>
</view>
</template>
...
...
@@ -131,10 +132,20 @@
mapState
} from 'vuex'
import {
apiGetSalesOrderDetail
} from '@/servers/salesOrder.js'
export default {
data() {
return {
ishowReceiveDetail:false
ishowReceiveDetail: false,
orderItem: {},
orderDetail: {
ITEM: [],
INFO: {},
ATTACHMENT: []
}
}
},
computed: {
...
...
@@ -144,8 +155,28 @@
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
ITEM() {
return this.orderDetail.ITEM || []
},
INFO() {
return this.orderDetail.INFO || {}
},
ATTACHMENT() {
return this.orderDetail.ATTACHMENT || []
}
},
onLoad(option) {
this.orderItem = JSON.parse(option.order)
this.getOrderDetail()
},
methods: {
async getOrderDetail() {
const params = {
OBJECT_ID: this.orderItem.object_id
}
const res = await apiGetSalesOrderDetail(params)
this.orderDetail = res.DATA
},
handleShowReceiveDetail() {
this.ishowReceiveDetail = !this.ishowReceiveDetail
},
...
...
@@ -178,7 +209,7 @@
margin-top: -164rpx;
padding: 0 16rpx;
}
.order-main {
flex: 1;
background: #ffffff;
...
...
@@ -186,104 +217,104 @@
padding-top: 30rpx;
margin-bottom: 16rpx;
}
.top {
height: 72rpx;
align-items: center;
justify-content: space-between;
padding: 0 48rpx;
}
.title-no {
font-size: 24rpx;
color: #555555;
}
.title-info {
align-items: center;
margin-right: 26rpx;
}
.title-info__status {
width: 120rpx;
height: 48rpx;
line-height: 48rpx;
background: #f61d30;
border-radius: 8rpx 200rpx 200rpx 8rpx;
border:1px solid #f61d30;
border:
1px solid #f61d30;
font-size: 12px;
color: #fff;
text-align: center;
}
.title-info__status:after {
border:0;
border:
0;
}
.title-info__status-done{
.title-info__status-done
{
background: #f8f8f8;
color: #888888;
border:1px solid #f8f8f8;
border:
1px solid #f8f8f8;
}
.order-main-middle {
position: relative;
padding: 26rpx 48rpx 40rpx;
}
.middle-title {
display: flex;
align-items: center;
margin-bottom: 32rpx;
}
.middle-title__text {
font-weight: 500;
font-size: 32rpx;
color: $text-base-color;
font-family: PingFangSC, PingFangSC-Medium;
}
.text-block {
flex: 1;
flex-direction: column;
margin-bottom: 32rpx;
}
.text-block-last {
margin-bottom: 0;
}
.middle-date {
font-size: 28rpx;
color: $text-base-color;
margin-bottom: 16rpx;
}
.middle-date-des {
font-size: 24rpx;
color: #999;
}
.text-block-box {
display: flex;
justify-content: space-between;
}
.middle-date-right {
display: flex;
align-items: center;
justify-content: flex-end;
}
.order-middle{
.order-middle
{
position: relative;
height: 290rpx;
overflow: hidden;
padding-bottom: 60rpx;
margin-bottom: 16rpx;
}
.order-middle-auto {
height: auto;
}
...
...
@@ -309,12 +340,12 @@
padding-top: 24rpx;
padding-bottom: 32rpx;
}
.icon-file{
.icon-file
{
width: 29px;
height: 35px;
}
.block-detal {
display: flex;
flex-direction: column;
...
...
@@ -325,8 +356,8 @@
margin-bottom: 32rpx;
justify-content: space-between;
}
.block-detal-item-last{
.block-detal-item-last
{
margin-bottom: 0;
}
...
...
@@ -334,24 +365,24 @@
color: #999;
font-size: 24rpx;
}
.detal-item-file{
.detal-item-file
{
display: flex;
flex-direction: column;
}
.detal-item-value{
.detal-item-value
{
color: #333;
font-size: 28rpx;
}
.item-value-intotal{
.item-value-intotal
{
color: #333;
font-size: 28rpx;
font-weight: 500;
}
.item-value-intotal-num{
.item-value-intotal-num
{
color: #FF1D32;
font-size: 28rpx;
font-weight: 500;
...
...
@@ -361,12 +392,12 @@
width: 116rpx;
height: 54rpx;
line-height: 50rpx;
border:1px solid $wly-primary-color;
border:
1px solid $wly-primary-color;
background: #fff;
border-radius: 30rpx;
}
.btn:after{
.btn:after
{
border: 0;
}
...
...
@@ -374,7 +405,7 @@
color: $wly-primary-color;
font-size: 24rpx;
}
.float-btn-block {
position: absolute;
left: 0;
...
...
@@ -387,7 +418,7 @@
align-items: center;
justify-content: center;
}
.float-btn {
padding: 0 20px;
height: 60rpx;
...
...
@@ -397,8 +428,8 @@
align-items: center;
justify-content: center;
}
.icon-arrow {
width: 7px;
height: 4px;
...
...
@@ -408,8 +439,8 @@
transition-duration: 0.15s;
transform: rotate(0deg);
}
.icon-arrow-rotate {
transform: rotate(180deg);
}
</style>
</style>
pages/order-detail-quota/order-detail-quota.nvue
View file @
e6829ce4
...
...
@@ -5,109 +5,109 @@
<view class="main">
<view class="order-main view">
<view class="top">
<text class="title-no">订单编号:
TP10000021
</text>
<text class="title-no">订单编号:
{{INFO.OBJECT_ID}}
</text>
<view class="title-info">
<button class="title-info__status" type="default">
待审批
</button>
<button class="title-info__status" type="default">
{{INFO.STATUS_TEXT}}
</button>
</view>
</view>
<view class="order-main-middle view">
<view class="middle-title">
<text class="middle-title__text">
配额订单
</text>
<text class="middle-title__text">
{{INFO.PROCESS_TYPE_TEXT}}
</text>
</view>
<view class="text-block-box">
<view class="text-block text-block-last">
<text class="middle-date">
2021-08-06 05:14
</text>
<text class="middle-date">
{{INFO.POSTING_DATE}}
</text>
<text class="middle-date-des">下单日期</text>
</view>
<view class="text-block text-block-last">
<view class="middle-date-right">
<text class="middle-date">
¥5000
</text>
<text class="middle-date">
{{INFO.OBJECT_ID}}
</text>
</view>
<text class="middle-date-des middle-date-right">金额</text>
</view>
</view>
</view>
</view>
<view class="order-middle view" :class="{'order-middle-auto':ishowReceiveDetail}">
<view class="middle view">
<view class="item-block item-block-name">
<text class="item-block-label">计划内</text>
</view>
<view class="block-detal">
<view class="block-detal"
v-for="(item,index) in ITEM_INNER" :key="index"
>
<view class="block-detal-item">
<text class="detal-item-label">计划编号</text>
<text class="detal-item-value">
3810000023
</text>
<text class="detal-item-value">
{{item.ZZFLD000005}}
</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">计划类型</text>
<text class="detal-item-value">
专卖店配额计划
</text>
<text class="detal-item-value">
{{item.ZZFLD00002Q_Z1}}
</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">产品</text>
<text class="detal-item-value">
1618五粮液 500ml*6
</text>
<text class="detal-item-value">
{{item.DESCRIPTION}}
</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">数量</text>
<text class="detal-item-value">
25
</text>
<text class="detal-item-label">数量
(件))
</text>
<text class="detal-item-value">
{{item.ZZFLD000009}}
</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">
合
数</text>
<text class="detal-item-value">
25
</text>
<text class="detal-item-label">
盒
数</text>
<text class="detal-item-value">
{{item.ZZFLD00002W}}
</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">单价</text>
<text class="detal-item-value">
¥880
</text>
<text class="detal-item-value">
{{item.NET_PRICE}}
</text>
</view>
<view class="block-detal-item block-detal-item-last">
<text class="detal-item-label"></text>
<view class="detal-item-value">
<text class="item-value-intotal">小计:</text>
<text class="item-value-intotal-num">
¥20,000.00
</text>
<text class="item-value-intotal-num">
{{item.NET_VALUE}}
</text>
</view>
</view>
</view>
</view>
<view class="middle view">
<view class="item-block item-block-name">
<text class="item-block-label">计划外</text>
</view>
<view class="block-detal">
<view class="block-detal"
v-for="(item,index) in ITEM_OUTER" :key="index"
>
<view class="block-detal-item">
<text class="detal-item-label">计划编号</text>
<text class="detal-item-value">
3810000023
</text>
<text class="detal-item-value">
{{item.ZZFLD000005}}
</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">计划类型</text>
<text class="detal-item-value">
专卖店配额计划
</text>
<text class="detal-item-value">
{{item.ZZFLD00002Q_Z1}}
</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">产品</text>
<text class="detal-item-value">
1618五粮液 500ml*6
</text>
<text class="detal-item-value">
{{item.DESCRIPTION}}
</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">数量</text>
<text class="detal-item-value">
25
</text>
<text class="detal-item-label">数量
(件))
</text>
<text class="detal-item-value">
{{item.ZZFLD000009}}
</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">
合
数</text>
<text class="detal-item-value">
25
</text>
<text class="detal-item-label">
盒
数</text>
<text class="detal-item-value">
{{item.ZZFLD00002W}}
</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">单价</text>
<text class="detal-item-value">
¥880
</text>
<text class="detal-item-value">
{{item.NET_PRICE}}
</text>
</view>
<view class="block-detal-item block-detal-item-last">
<text class="detal-item-label"></text>
<view class="detal-item-value">
<text class="item-value-intotal">小计:</text>
<text class="item-value-intotal-num">
¥20,000.00
</text>
<text class="item-value-intotal-num">
{{item.NET_VALUE}}
</text>
</view>
</view>
</view>
</view>
<view class="float-btn-block">
<view class="float-btn" @click="handleShowReceiveDetail">
<text class="float-btn__text">{{ishowReceiveDetail?'收起':'展示完整信息'}}</text>
...
...
@@ -115,9 +115,9 @@
src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image>
</view>
</view>
</view>
<view class="order-bottom view">
<view class="middle view">
<view class="item-block item-block-name">
...
...
@@ -137,7 +137,7 @@
</view>
</view>
</view>
</view>
</view>
</template>
...
...
@@ -147,10 +147,21 @@
mapState
} from 'vuex'
import {
apiGetSalesOrderDetail
} from '@/servers/salesOrder.js'
export default {
data() {
return {
ishowReceiveDetail:false
ishowReceiveDetail: false,
orderItem: {},
orderDetail: {
ITEM_INNER: [],
ITEM_OUTER: [],
INFO: {},
ATTACHMENT: []
}
}
},
computed: {
...
...
@@ -160,8 +171,31 @@
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
ITEM_INNER() {
return this.orderDetail.ITEM_INNER || []
},
ITEM_OUTER() {
return this.orderDetail.ITEM_OUTER || []
},
INFO() {
return this.orderDetail.INFO || {}
},
ATTACHMENT() {
return this.orderDetail.ATTACHMENT || []
}
},
onLoad(option) {
this.orderItem = JSON.parse(option.order)
this.getOrderDetail()
},
methods: {
async getOrderDetail() {
const params = {
OBJECT_ID: this.orderItem.object_id
}
const res = await apiGetSalesOrderDetail(params)
this.orderDetail = res.DATA
},
handleShowReceiveDetail() {
this.ishowReceiveDetail = !this.ishowReceiveDetail
},
...
...
@@ -194,7 +228,7 @@
margin-top: -164rpx;
padding: 0 16rpx;
}
.order-main {
flex: 1;
background: #ffffff;
...
...
@@ -202,104 +236,104 @@
padding-top: 30rpx;
margin-bottom: 16rpx;
}
.top {
height: 72rpx;
align-items: center;
justify-content: space-between;
padding: 0 48rpx;
}
.title-no {
font-size: 24rpx;
color: #555555;
}
.title-info {
align-items: center;
margin-right: 26rpx;
}
.title-info__status {
width: 120rpx;
height: 48rpx;
line-height: 48rpx;
background: #f61d30;
border-radius: 8rpx 200rpx 200rpx 8rpx;
border:1px solid #f61d30;
border:
1px solid #f61d30;
font-size: 12px;
color: #fff;
text-align: center;
}
.title-info__status:after {
border:0;
border:
0;
}
.title-info__status-done{
.title-info__status-done
{
background: #f8f8f8;
color: #888888;
border:1px solid #f8f8f8;
border:
1px solid #f8f8f8;
}
.order-main-middle {
position: relative;
padding: 26rpx 48rpx 40rpx;
}
.middle-title {
display: flex;
align-items: center;
margin-bottom: 32rpx;
}
.middle-title__text {
font-weight: 500;
font-size: 32rpx;
color: $text-base-color;
font-family: PingFangSC, PingFangSC-Medium;
}
.text-block {
flex: 1;
flex-direction: column;
margin-bottom: 32rpx;
}
.text-block-last {
margin-bottom: 0;
}
.middle-date {
font-size: 28rpx;
color: $text-base-color;
margin-bottom: 16rpx;
}
.middle-date-des {
font-size: 24rpx;
color: #999;
}
.text-block-box {
display: flex;
justify-content: space-between;
}
.middle-date-right {
display: flex;
align-items: center;
justify-content: flex-end;
}
.order-middle{
.order-middle
{
position: relative;
height: 290rpx;
overflow: hidden;
padding-bottom: 60rpx;
margin-bottom: 16rpx;
}
.order-middle-auto {
height: auto;
}
...
...
@@ -325,12 +359,12 @@
padding-top: 24rpx;
padding-bottom: 32rpx;
}
.icon-file{
.icon-file
{
width: 29px;
height: 35px;
}
.block-detal {
display: flex;
flex-direction: column;
...
...
@@ -341,8 +375,8 @@
margin-bottom: 32rpx;
justify-content: space-between;
}
.block-detal-item-last{
.block-detal-item-last
{
margin-bottom: 0;
}
...
...
@@ -350,24 +384,24 @@
color: #999;
font-size: 24rpx;
}
.detal-item-file{
.detal-item-file
{
display: flex;
flex-direction: column;
}
.detal-item-value{
.detal-item-value
{
color: #333;
font-size: 28rpx;
}
.item-value-intotal{
.item-value-intotal
{
color: #333;
font-size: 28rpx;
font-weight: 500;
}
.item-value-intotal-num{
.item-value-intotal-num
{
color: #FF1D32;
font-size: 28rpx;
font-weight: 500;
...
...
@@ -377,12 +411,12 @@
width: 116rpx;
height: 54rpx;
line-height: 50rpx;
border:1px solid $wly-primary-color;
border:
1px solid $wly-primary-color;
background: #fff;
border-radius: 30rpx;
}
.btn:after{
.btn:after
{
border: 0;
}
...
...
@@ -390,7 +424,7 @@
color: $wly-primary-color;
font-size: 24rpx;
}
.float-btn-block {
position: absolute;
left: 0;
...
...
@@ -403,7 +437,7 @@
align-items: center;
justify-content: center;
}
.float-btn {
padding: 0 20px;
height: 60rpx;
...
...
@@ -413,8 +447,8 @@
align-items: center;
justify-content: center;
}
.icon-arrow {
width: 7px;
height: 4px;
...
...
@@ -424,8 +458,8 @@
transition-duration: 0.15s;
transform: rotate(0deg);
}
.icon-arrow-rotate {
transform: rotate(180deg);
}
</style>
</style>
pages/produce-material/produce-plan.nvue
View file @
e6829ce4
...
...
@@ -100,11 +100,11 @@
</view>
<view class="popup-content-content">
<text class="popup-content-content__title">提交成功</text>
<
text class="popup-content-content__title2">生产备料编号:{{ orderInfo.OBJECT_ID }}</text
>
<text class="popup-content-content__title2">生产备料单号:{{ orderInfo.P
ROD
PL_ID }}</text>
<
!-- <text class="popup-content-content__title2">生产备料编号:{{ orderInfo.OBJECT_ID }}</text> --
>
<text class="popup-content-content__title2">生产备料单号:{{ orderInfo.P
ACK
PL_ID }}</text>
</view>
<view class="popup-content-foot">
<text class="popup-content-foot__btn" @click="
fnBackHome
()">继续添加</text>
<text class="popup-content-foot__btn" @click="
resetData
()">继续添加</text>
<text class="popup-content-foot__btn popup-content-foot__sure"
@click="fnCheckOrderByNo()">查看备料</text>
</view>
...
...
@@ -146,7 +146,7 @@
HEADINFO: {},
productInitInfo: {},
orderInfo: {
OBJECT
_ID: ''
PACKPL
_ID: ''
},
}
},
...
...
@@ -159,7 +159,7 @@
...mapState(['sysinfo', 'userInfo'])
},
onNavigationBarButtonTap(e) {
this.
initProduceMaterialPlanData
()
this.
submit
()
},
created() {
this.initProduceMaterialPlanData()
...
...
@@ -241,7 +241,7 @@
item = {
...item,
...product,
...res.DATA[0]
...res.DATA
.ITEM
[0]
}
}
return item
...
...
@@ -302,9 +302,6 @@
handleDel(index, ) {
this.planinnerLists.splice(index, 1)
},
fnBackHome() {
this.$refs.popup.close()
},
fnCheckOrderByNo() {
this.$refs.popup.close()
uni.navigateTo({
...
...
@@ -324,17 +321,19 @@
async submit() {
const params = {
USER_BP: this.userInfo.customerCode,
HEAD: this.HEADINFO,
ITEM: this.planinnerLists
}
const res = await apiUpdateProduceMaterialOrder(params)
const {
DATA1
: HEAD2,
DATA2
: ITEM2
HEAD
: HEAD2,
ITEM
: ITEM2
} = res
const params2 = {
USER_BP: this.userInfo.customerCode,
HEAD: HEAD2,
ITEM: ITEM2
}
...
...
@@ -344,7 +343,7 @@
const res2 = await apiSubmitProduceMaterialOrder(params2)
this.orderInfo = res.
DATA1
this.orderInfo = res.
HEAD
this.$refs.popup.open('center')
},
...
...
@@ -353,6 +352,10 @@
this.salesCenterIndex = -1
this.selectedSalesCenter = {}
this.initProduceMaterialPlanData()
this.$refs.popup.close()
},
change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show);
}
}
}
...
...
pages/produce-order/produce-plan.nvue
View file @
e6829ce4
...
...
@@ -83,11 +83,11 @@
</view>
<view class="popup-content-content">
<text class="popup-content-content__title">提交成功</text>
<
text class="popup-content-content__title2">生产计划编号:{{ orderInfo.OBJECT_ID }}</text
>
<
!-- <text class="popup-content-content__title2">生产计划编号:{{ orderInfo.OBJECT_ID }}</text> --
>
<text class="popup-content-content__title2">生产计划单号:{{ orderInfo.PRODPL_ID }}</text>
</view>
<view class="popup-content-foot">
<text class="popup-content-foot__btn" @click="
fnBackHome
()">继续添加</text>
<text class="popup-content-foot__btn" @click="
resetData
()">继续添加</text>
<text class="popup-content-foot__btn popup-content-foot__sure"
@click="fnCheckOrderByNo()">查看计划</text>
</view>
...
...
@@ -129,7 +129,7 @@
HEADINFO: {},
productInitInfo: {},
orderInfo: {
OBJECT
_ID: ''
PRODPL
_ID: ''
},
}
},
...
...
@@ -288,9 +288,8 @@
handleDel(index, ) {
this.planinnerLists.splice(index, 1)
},
fnBackHome() {
this.resetData()
this.$refs.popup.close()
change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show);
},
fnCheckOrderByNo() {
this.$refs.popup.close()
...
...
pages/ticket-order/order-item.nvue
View file @
e6829ce4
<template>
<view class="order view">
<view class="top">
<text class="title-no">制票编号:
TP10000021
</text>
<text class="title-no">制票编号:
{{itemHead.INVO_INFOID}}
</text>
<view class="title-info">
<button class="title-info__status" type="default"><text class="item-block-btn__text">待审批</text></button>
<button class="title-info__status" type="default"><text
class="item-block-btn__text">{{itemHead.INV_STATUS_TEXT}}</text></button>
</view>
</view>
<view class="middle view">
<text class="middle-title">
配额酒制票通知单(计划内)
</text>
<text class="middle-title">
{{itemHead.INFTYPE}}
</text>
<view class="text-block">
<text class="middle-date">
2021-08-06 05:14
</text>
<text class="middle-date">
{{itemHead.MAK_DATE}}
</text>
<text class="middle-date-des">下单日期</text>
</view>
<view class="text-block">
<text class="middle-date middle-billno">92353634474578</text>
<text class="middle-date-des">发票号</text>
</view>
</view>
<view class="bottom view">
<view class="bottom-nav">
...
...
@@ -25,52 +22,56 @@
src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image>
</view>
</view>
<view v-if="ishowDetail" class="bottom-content">
<view v-if="ishowDetail" class="bottom-content"
v-for="(item,index) in itemLists" :key="index"
>
<view class="text-block">
<text class="middle-date">
五粮液1618
</text>
<text class="middle-date">
{{item.DESCRIPTION}}
</text>
<text class="middle-date-des">产品描述</text>
</view>
<view class="text-block">
<text class="middle-date">52% 500ml *4</text>
<text class="middle-date middle-billno">{{item.INV_GUID}}</text>
<text class="middle-date-des">发票号</text>
</view>
<view class="text-block">
<text class="middle-date">{{item.ZZFLD00002S}}</text>
<text class="middle-date-des">规格</text>
</view>
<view class="text-block-2">
<view class="text-block text-block-1">
<text class="middle-date">
100
</text>
<text class="middle-date">
{{item.USE_ZZFLD9}}
</text>
<text class="middle-date-des">开票件数</text>
</view>
<view class="text-block">
<text class="middle-date">
瓶
</text>
<text class="middle-date">
{{item.ZZFLD00002T}}
</text>
<text class="middle-date-des">单位</text>
</view>
</view>
<view class="text-block-2">
<view class="text-block text-block-1">
<text class="middle-date">
100
</text>
<text class="middle-date">
{{item.NET_PRICE}}
</text>
<text class="middle-date-des">单价</text>
</view>
<view class="text-block">
<text class="middle-date">
4000
</text>
<text class="middle-date">
{{item.USE_QUANTITY}}
</text>
<text class="middle-date-des">数量</text>
</view>
</view>
<view class="text-block-2">
<view class="text-block text-block-1">
<text class="middle-date">
100
</text>
<text class="middle-date">
{{item.REMAIN_ZZFLD9}}
</text>
<text class="middle-date-des">剩余开票件数</text>
</view>
<view class="text-block">
<text class="middle-date">
17%
</text>
<text class="middle-date">
{{item.ZZFLD00002E}}
</text>
<text class="middle-date-des">税率</text>
</view>
</view>
<view class="text-block-2">
<view class="text-block text-block-1">
<text class="middle-date">
100
</text>
<
!-- <
view class="text-block text-block-1">
<text class="middle-date">
{{item.INV_GUID}}
</text>
<text class="middle-date-des">剩余发货件数</text>
</view>
</view>
-->
<view class="text-block">
<text class="middle-date">
400,000.00
</text>
<text class="middle-date">
{{item.NET_VALUE}}
</text>
<text class="middle-date-des">价税合计</text>
</view>
</view>
...
...
@@ -86,10 +87,21 @@
newsItem: {
type: Object,
default: function(e) {
return {}
return {
HEAD: {},
ITEM: []
}
}
}
},
computed: {
itemHead() {
return this.newsItem.HEAD || {}
},
itemLists() {
return this.newsItem.ITEM || []
},
},
data() {
return {
ishowDetail: true
...
...
@@ -142,7 +154,6 @@
}
.title-info__status {
width: 120rpx;
height: 48rpx;
line-height: 48rpx;
background: #f61d30;
...
...
pages/ticket-order/order-page.nvue
View file @
e6829ce4
<template>
<view class="page-news">
<uni-list ref="list" class="listview" :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" @click="goDetail(item)"></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>
<view class="page-news">
<uni-list ref="list" class="listview" :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" @click="goDetail(item)"></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 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 orderItem from './order-item.nvue';
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 orderItem from './order-item.nvue';
import {
mapState
} from 'vuex'
export default {
components: {
uniList,
uniCell,
uniRefresh,
uniLoadMore,
noData,
orderItem
},
props: {
nid: {
type: [Number, String],
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=="
}
},
created() {
this.pullTimer = null;
this.requestParams = {
columnId: this.nid,
minId: 0,
pageSize: 10,
column: 'id,post_id,title,author_name,cover,published_at,comments_count'
};
import {
apiGetTicketOrder
} from '@/servers/ticketOrder.js'
this._isWidescreen = false;
// #ifdef H5
var mediaQueryOb = uni.createMediaQueryObserver(this)
mediaQueryOb.observe({
minWidth: 768
}, matches => {
this._isWidescreen = matches;
})
// #endif
},
methods: {
loadData(refresh) {
if (this.isLoading) {
return;
}
export default {
components: {
uniList,
uniCell,
uniRefresh,
uniLoadMore,
noData,
orderItem
},
props: {
nid: {
type: String,
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==",
condition: {
PARTNER: '4001139400',
ROLE: 'WLY001',
INV_STATUS: [{
"SIGN": "I",
"OPTION": "EQ",
LOW: '',
HIGH: ''
}],
MAK_DATE: [{
"SIGN": "I",
"OPTION": "BT",
LOW: '',
HIGH: ''
}]
},
page: {
"PAGE": "1",
"PAGESIZE": "10",
}
}
},
computed: {
...mapState(['sysinfo'])
},
created() {
this.pullTimer = null;
this.isLoading = true;
this.isNoData = false;
this.requestParams.time = new Date().getTime() + '';
this._isWidescreen = false;
this.loadData()
},
methods: {
loadData(refresh) {
if (this.isLoading) {
return;
}
var startTime = new Date();
uni.request({
// url: this.$host + 'api/news',
url: 'https://unidemo.dcloud.net.cn/api/news',
data: this.requestParams,
success: (result) => {
var endTime = new Date();
const data = result.data;
this.isNoData = (data.length <= 0);
this.isLoading = true;
this.isNoData = false;
const data_list = data.map((news) => {
return {
id: this.newGuid() + news.id,
newsid: news.id,
article_type: 1,
datetime: (new Date(news.published_at.replace(/\-/g, '/')).getTime()),
title: news.title,
image_url: news.cover,
source: news.author_name,
comment_count: news.comments_count,
post_id: news.post_id
};
});
let MAK_DATE = []
let INV_STATUS = []
if (this.condition.MAK_DATE[0].LOW === '') {
MAK_DATE = []
} else {
MAK_DATE = this.condition.MAK_DATE
}
if (refresh) {
this.dataList = data_list;
this.requestParams.minId = 0;
} else {
this.dataList = this.dataList.concat(data_list);
this.requestParams.minId = data[data.length - 1].id;
}
if (this.nid === '') {
INV_STATUS = []
} else {
this.condition.INV_STATUS[0].LOW = this.nid
INV_STATUS = this.condition.INV_STATUS
}
if (this.dataList.length > 0 && this._isWidescreen && this.dataList.length <= 10) {
this.goDetail(this.dataList[0]);
}
},
fail: (err) => {
if (this.dataList.length == 0) {
this.isNoData = true;
}
},
complete: (e) => {
this.isLoading = false;
if (refresh) {
this.refreshing = false;
this.refreshFlag = false;
this.refreshText = "已刷新";
if (this.pullTimer) {
clearTimeout(this.pullTimer);
}
this.pullTimer = setTimeout(() => {
this.pulling = false;
}, 1000);
}
}
});
},
loadMore(e) {
this.loadData();
},
clear() {
this.dataList.length = 0;
this.requestParams.minId = 0;
},
goDetail(detail) {
},
refreshData() {
if (this.isLoading) {
return;
}
this.pulling = true;
this.refreshing = true;
this.refreshText = "正在刷新...";
this.loadData(true);
},
onrefresh(e) {
this.refreshData();
// #ifdef APP-NVUE
this.$refs.list.resetLoadmore();
// #endif
},
onpullingdown(e) {
if (this.refreshing) {
return;
}
const params = {
...this.condition,
INV_STATUS,
MAK_DATE,
...this.page
}
apiGetTicketOrder(params).then((res) => {
console.log('loadData', res)
const {
DATA,
PAGE,
TOTAL
} = res
const data_list = DATA;
this.page.PAGE = PAGE
// var angle = (e.pullingDistance) / e.viewHeight * 180;
// if (angle > 180) {
// angle = 180;
// }
// tab.angle = angle;
this.isNoData = (data_list.length <= 0);
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();
}
}
}
if (refresh) {
this.dataList = data_list;
} else {
this.dataList = this.dataList.concat(data_list);
}
if (this.dataList.length > 0 && this._isWidescreen && this.dataList.length <= 10) {
this.goDetail(this.dataList[0]);
}
}).catch(() => {
if (this.dataList.length == 0) {
this.isNoData = true;
}
}).finally(() => {
this.isLoading = false;
if (refresh) {
this.refreshing = false;
this.refreshFlag = false;
this.refreshText = "已刷新";
if (this.pullTimer) {
clearTimeout(this.pullTimer);
}
this.pullTimer = setTimeout(() => {
this.pulling = false;
}, 1000);
}
})
},
loadMore(e) {
console.log('loadMore')
this.page.PAGE++
this.loadData();
},
clear() {
this.dataList.length = 0;
},
goDetail(detail) {
},
refreshData() {
if (this.isLoading) {
return;
}
this.pulling = true;
this.refreshing = true;
this.refreshText = "正在刷新...";
this.page.PAGE = 1
this.loadData(true);
},
onrefresh(e) {
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 = "下拉可以刷新";
}
}
}
}
</script>
<style lang="scss" scoped>
.no-data {
flex: 1;
position: absolute;
left: 0;
top: 0;
right: 0;
bottom: 0;
z-index: 10;
}
.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;
}
.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 */
}
.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 {
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-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: .5s;
transition-property: transform;
transform: rotate(0deg);
transform-origin: 15px 15px;
}
.refresh-icon {
width: 32px;
height: 32px;
transition-duration: .5s;
transition-property: transform;
transform: rotate(0deg);
transform-origin: 15px 15px;
}
.refresh-icon-active {
transform: rotate(180deg);
}
.refresh-icon-active {
transform: rotate(180deg);
}
.loading-icon {
width: 28px;
height: 28px;
margin-right: 5px;
color: gray;
}
.loading-icon {
width: 28px;
height: 28px;
margin-right: 5px;
color: gray;
}
.loading-text {
margin-left: 2px;
font-size: 16px;
color: #999999;
}
.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 {
align-items: center;
justify-content: center;
padding-top: 14px;
padding-bottom: 14px;
text-align: center;
}
.loading-more-text {
font-size: 28upx;
color: #999;
}
</style>
.loading-more-text {
font-size: 28upx;
color: #999;
}
</style>
pages/ticket-order/ticket-order.nvue
View file @
e6829ce4
...
...
@@ -37,8 +37,8 @@
class="filter-btn__text"
:class="{'filter-btn-active__text':item+3 === filterActiveIndex}">{{item+3}}月内</text></button>
</view>
</view>
</view>
<view class="empty"></view>
<swiper ref="swiper1" class="tab-box" :current="tabIndex" :duration="300" @change="onswiperchange"
...
...
@@ -77,15 +77,15 @@
tabList: [{
id: "tab01",
name: '全部',
newsid:
0
newsid:
''
}, {
id: "tab02",
name: '待审批',
newsid:
23
newsid:
'E004'
}, {
id: "tab03",
name: '已审批',
newsid:
223
newsid:
'E005'
}],
tabIndex: 0,
cacheTab: [],
...
...
@@ -463,10 +463,10 @@
.filter-content {
display: flex;
flex-wrap: wrap;
}
.empty
{
height: 124rpx;
}
.empty
{
height: 124rpx;
}
.tab-box {
...
...
servers/produceMaterial.js
View file @
e6829ce4
...
...
@@ -37,7 +37,7 @@ export async function apiUpdateProduceMaterialPlanData(params) {
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiUpdateProduceMaterialOrder
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/
prodplan03
'
,
params
)
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/
materialpln
'
,
params
)
return
res
}
...
...
@@ -47,7 +47,7 @@ export async function apiUpdateProduceMaterialOrder(params) {
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiSubmitProduceMaterialOrder
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/
master
data/materialplnsubm'
,
params
)
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/
trans
data/materialplnsubm'
,
params
)
return
res
}
...
...
servers/salesOrder.js
0 → 100644
View file @
e6829ce4
import
apiHelper
from
'./api.helper.js'
/**
* 根据搜索条件查询销售订单信息。
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiGetSalesOrder
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/get_so'
,
params
)
return
res
}
/**
* 根据销售订单ID查询详情。
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiGetSalesOrderDetail
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/get_so_by_id'
,
params
)
return
res
}
servers/ticketOrder.js
0 → 100644
View file @
e6829ce4
import
apiHelper
from
'./api.helper.js'
/**
* 根据搜索条件查询制票通知单信息。
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiGetTicketOrder
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/zhipiao13'
,
params
)
return
res
}
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