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
8962c2c3
Commit
8962c2c3
authored
May 24, 2022
by
chuan.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
生产计划联调
parent
7507986e
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
1203 additions
and
505 deletions
+1203
-505
pages.json
pages.json
+21
-0
order-list.nvue
pages/produce-material/order-list.nvue
+17
-7
produce-material.nvue
pages/produce-material/produce-material.nvue
+63
-71
produce-plan.nvue
pages/produce-material/produce-plan.nvue
+62
-15
order-list.nvue
pages/produce-order/order-list.nvue
+168
-173
produce-order.nvue
pages/produce-order/produce-order.nvue
+184
-203
produce-plan.nvue
pages/produce-order/produce-plan.nvue
+226
-19
purchase-plan.nvue
pages/purchase-plan/purchase-plan.nvue
+15
-12
select-product-pro.vue
pages/select-product-pro/select-product-pro.vue
+394
-0
select-product.vue
pages/select-product/select-product.vue
+1
-1
common.js
servers/common.js
+0
-4
produceOrder.js
servers/produceOrder.js
+52
-0
No files found.
pages.json
View file @
8962c2c3
...
...
@@ -172,6 +172,27 @@
"bounce"
:
"none"
}
}
},
{
"path"
:
"pages/select-product-pro/select-product-pro"
,
"style"
:
{
"app-plus"
:
{
"titleNView"
:
{
"titleAlign"
:
"left"
,
"titleColor"
:
"#333"
,
"titleSize"
:
"17px"
,
"backgroundColor"
:
"transparent"
,
"titleText"
:
"产品查询"
,
"autoBackButton"
:
true
,
"buttons"
:
[{
"type"
:
"none"
,
"text"
:
"选择"
,
"fontSize"
:
"14px"
,
"color"
:
"#555"
}]
},
"bounce"
:
"none"
}
}
},
{
"path"
:
"pages/select-business/select-business"
,
"style"
:
{
...
...
pages/produce-material/order-list.nvue
View file @
8962c2c3
...
...
@@ -4,28 +4,29 @@
<view class="cell-list">
<view class="middle view planout-block-item">
<view class="item-block item-block-code">
<text class="item-block-label">单号:
TP10000021
</text>
<text class="item-block-label">单号:
{{itemHead.PRODPL_ID}}
</text>
<button class="item-block-btn" type="default"><text
class="item-block-btn__text">
待审批
</text></button>
class="item-block-btn__text">
{{itemHead.STATUS}}
</text></button>
</view>
<view class="item-block item-block-name">
<text class="item-block-label item-block__label">高端总经销材料计划</text>
</view>
<view class="item-block">
<text class="item-block-label-des">
2021-08-06 05:14
</text>
<text class="item-block-label-des">
{{itemHead.DATUM}}
</text>
</view>
<view class="item-block item-block-date">
<text class="detal-item-label">下单日期</text>
</view>
<view class="block-detal">
<view class="block-detal" :class="{'block-detal-last':index === itemLists.length-1}"
v-for="(item,index) in itemLists" :key="index">
<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">
220
</text>
<text class="detal-item-value">
{{item.PLANQTY_BOX}}
</text>
</view>
<view class="block-detal-item block-detal-item-last">
<text class="detal-item-label">吨数</text>
...
...
@@ -57,7 +58,10 @@
newsItem: {
type: Object,
default: function(e) {
return {}
return {
HEAD: {},
ITEM: []
}
}
}
},
...
...
@@ -72,6 +76,12 @@
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
itemHead() {
return this.newsItem.HEAD || {}
},
itemLists() {
return this.newsItem.ITEM || []
},
...mapState(['sysinfo'])
},
methods: {
...
...
pages/produce-material/produce-material.nvue
View file @
8962c2c3
...
...
@@ -56,6 +56,10 @@
mapState
} from 'vuex'
import {
apiGetProduceOrder
} from '@/servers/produceOrder.js'
export default {
components: {
uniList,
...
...
@@ -99,7 +103,20 @@
},
ishowDetail: false,
filterActiveIndex: 0,
refreshIcon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB5QTFRFcHBw3Nzct7e39vb2ycnJioqK7e3tpqam29vb////D8oK7wAAAAp0Uk5T////////////ALLMLM8AAABxSURBVHja7JVBDoAgDASrjqj//7CJBi90iyYeOHTPMwmFZrHjYyyFYYUy1bwUZqtJIYVxhf1a6u0R7iUvWsCcrEtwJHp8MwMdvh2amHduiZD3rpWId9+BgPd7Cc2LIkPyqvlQvKxKBJ//Qwq/CacAAwDUv0a0YuKhzgAAAABJRU5ErkJggg=="
refreshIcon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB5QTFRFcHBw3Nzct7e39vb2ycnJioqK7e3tpqam29vb////D8oK7wAAAAp0Uk5T////////////ALLMLM8AAABxSURBVHja7JVBDoAgDASrjqj//7CJBi90iyYeOHTPMwmFZrHjYyyFYYUy1bwUZqtJIYVxhf1a6u0R7iUvWsCcrEtwJHp8MwMdvh2amHduiZD3rpWId9+BgPd7Cc2LIkPyqvlQvKxKBJ//Qwq/CacAAwDUv0a0YuKhzgAAAABJRU5ErkJggg==",
condition: {
PARTNER: '0050000215',
DATUM: {
"SIGN": "I",
"OPTION": "BT",
LOW: '',
HIGH: ''
}
},
page: {
"PAGE": "1",
"PAGESIZE": "10",
}
}
},
computed: {
...
...
@@ -128,22 +145,9 @@
},
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'
};
this._isWidescreen = false;
// #ifdef H5
var mediaQueryOb = uni.createMediaQueryObserver(this)
mediaQueryOb.observe({
minWidth: 768
}, matches => {
this._isWidescreen = matches;
})
// #endif
this.loadData()
},
methods: {
loadData(refresh) {
...
...
@@ -153,50 +157,38 @@
this.isLoading = true;
this.isNoData = false;
this.requestParams.time = new Date().getTime() + '';
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);
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
};
});
const params = {
...this.condition,
...this.page
}
apiGetProduceOrder(params).then((res) => {
console.log('loadData', res)
const {
DATA,
PAGE,
TOTAL
} = res
const data_list = DATA;
this.page.PAGE = PAGE
this.isNoData = (data_list.length <= 0);
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.dataList.length > 0 && this._isWidescreen && this.dataList.length <= 10) {
this.goDetail(this.dataList[0]);
}
},
fail: (err) => {
}).catch(() => {
if (this.dataList.length == 0) {
this.isNoData = true;
}
},
complete: (e) => {
}).finally(() => {
this.isLoading = false;
if (refresh) {
this.refreshing = false;
...
...
@@ -209,15 +201,14 @@
this.pulling = false;
}, 1000);
}
}
});
})
},
loadMore(e) {
this.page.PAGE++
this.loadData();
},
clear() {
this.dataList.length = 0;
this.requestParams.minId = 0;
},
goDetail(detail) {
...
...
@@ -229,6 +220,7 @@
this.pulling = true;
this.refreshing = true;
this.refreshText = "正在刷新...";
this.page.PAGE = 1
this.loadData(true);
},
onrefresh(e) {
...
...
pages/produce-material/produce-plan.nvue
View file @
8962c2c3
...
...
@@ -14,6 +14,23 @@
</view>
</view>
<view class="middle upload salescenter">
<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">
<picker class="picker-block" @change="bindPickerSalesCenterChange" mode="selector"
:value="salesCenterIndex" range-key='TEXT' :range="selectedSalesCenterArr">
<view class="uni-input">
{{selectedSalesCenterArr[salesCenterIndex] && selectedSalesCenterArr[salesCenterIndex].TEXT || '请选择'}}
</view>
</picker>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view>
<!-- <uni-list :border="false">
<uni-list-item :border="false">
<template v-slot:header>
...
...
@@ -100,12 +117,35 @@
mapState
} from 'vuex'
import {
apiProducePlanInit,
apiUpdateProducePlanData,
apiUpdateProduceOrder
} from '@/servers/produceOrder.js'
export default {
data() {
return {
isChecked: false,
orderNo: '',
scrollTop: 0
scrollTop: 0,
selectedSalesCenterArr: [{
KEY: -1,
VALUE: ''
}],
selectedSalesCenter: {},
salesCenterIndex: -1,
planinnerLists: [{
checked: false,
'quantity': 0,
'total': 0,
'product_info': {},
}],
HEADINFO: {},
productInitInfo: {},
orderInfo: {
OBJECT_ID: ''
},
}
},
computed: {
...
...
@@ -132,8 +172,15 @@
url: `/pages/produce-material/produce-material`
})
},
handleDel() {
console.log(1)
// 选择营销中心
bindPickerSalesCenterChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.salesCenterIndex = e.detail.value
this.selectedSalesCenter = this.selectedSalesCenterArr[this.salesCenterIndex]
this.HEADINFO.SALS_CENTER = this.selectedSalesCenter.VALUE
},
handleDel(index, ) {
this.planinnerLists.splice(index, 1)
},
preStep() {
uni.switchTab({
...
...
@@ -262,11 +309,11 @@
font-weight: 600;
}
.upload-text-2
{
.upload-text-2
{
font-size: 24rpx;
}
.summary-num-2
{
.summary-num-2
{
color: #333;
font-size: 24rpx;
}
...
...
pages/produce-order/order-list.nvue
View file @
8962c2c3
...
...
@@ -4,51 +4,38 @@
<view class="cell-list">
<view class="middle view planout-block-item">
<view class="item-block item-block-code">
<text class="item-block-label">单号:TP10000021</text>
<button class="item-block-btn" type="default"><text class="item-block-btn__text">待审批</text></button>
<text class="item-block-label">单号:{{itemHead.PRODPL_ID}}</text>
<button class="item-block-btn" type="default"><text
class="item-block-btn__text">{{itemHead.STATUS}}</text></button>
</view>
<view class="item-block item-block-name">
<text class="item-block-label item-block__label">配额生产计划</text>
</view>
<view class="item-block">
<text class="item-block-label-des">
2021-08-06 05:14</text>
<text class="item-block-label-des">
{{itemHead.DATUM}}</text>
</view>
<view class="item-block item-block-date">
<text class="detal-item-label">下单日期</text>
</view>
<view class="block-detal">
<view class="block-detal" :class="{'block-detal-last':index === itemLists.length-1}"
v-for="(item,index) in itemLists" :key="index">
<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">
220</text>
<text class="detal-item-value">
{{item.PLANQTY_BOX}}</text>
</view>
<view class="block-detal-item block-detal-item-last">
<text class="detal-item-label">期望交货期</text>
<text class="detal-item-value">7</text>
</view>
</view>
<view class="block-detal block-detal-last">
<view class="block-detal-item">
<text class="detal-item-label">产品</text>
<text class="detal-item-value">1618五粮液 500ml*6</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">件数</text>
<text class="detal-item-value">220</text>
</view>
<view class="block-detal-item block-detal-item-last">
<text class="detal-item-label">期望交货期</text>
<text class="detal-item-value">7</text>
<!-- <text class="detal-item-value">7</text> -->
</view>
</view>
<view class="item-block">
<text class="item-block-label-des">
尽快发货</text>
<text class="item-block-label-des">
sap返回无</text>
</view>
<view class="item-block item-block-date">
<text class="detal-item-label">备注</text>
...
...
@@ -71,7 +58,10 @@
newsItem: {
type: Object,
default: function(e) {
return {}
return {
HEAD: {},
ITEM: []
}
}
}
},
...
...
@@ -86,6 +76,12 @@
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
itemHead() {
return this.newsItem.HEAD || {}
},
itemLists() {
return this.newsItem.ITEM || []
},
...mapState(['sysinfo'])
},
methods: {
...
...
@@ -114,7 +110,7 @@
flex-direction: column;
}
.date
{
.date
{
font-size: 28rpx;
color: #999999;
font-size: 28rpx;
...
...
@@ -199,16 +195,15 @@
justify-content: space-between;
}
.item-block-btn{
width: 120rpx;
.item-block-btn {
height: 48rpx;
line-height: 4
8rpx;
line-height: 4
4rpx;
background: #f61d30;
border-radius: 80rpx 200rpx 200rpx 80rpx;
text-align: center;
}
.item-block-btn__text
{
.item-block-btn__text
{
font-size: 12px;
color: #fff;
}
...
...
@@ -218,7 +213,7 @@
margin-bottom: 32rpx;
}
.item-block-date
{
.item-block-date
{
margin-top: 12rpx;
margin-bottom: 48rpx;
}
...
...
@@ -239,7 +234,7 @@
margin-bottom: 16rpx;
}
.block-detal-last
{
.block-detal-last
{
margin-bottom: 32rpx;
}
...
...
@@ -249,7 +244,7 @@
justify-content: space-between;
}
.block-detal-item-last
{
.block-detal-item-last
{
margin-bottom: 0;
}
...
...
@@ -258,7 +253,7 @@
font-size: 24rpx;
}
.detal-item-value
{
.detal-item-value
{
color: #333;
font-size: 28rpx;
}
...
...
pages/produce-order/produce-order.nvue
View file @
8962c2c3
...
...
@@ -3,19 +3,24 @@
<view class="status_bar" :style="navHeight"></view>
<view class="conditon-block" :style="conditionTop" :class="{'conditon-block-auto':ishowDetail}">
<view class="filter-title">
<button type="default" class="filter-btn filter-btn-active"><text class="filter-btn__text filter-btn-active__text">一周内</text></button>
<button type="default" @click="handleFilter(item)" :class="{'filter-btn-active':item === filterActiveIndex}"
class="filter-btn" v-for="item in 3" :key='item'><text class="filter-btn__text" :class="{'filter-btn-active__text':item === filterActiveIndex}">{{item}}月内</text></button>
<button type="default" class="filter-btn filter-btn-active"><text
class="filter-btn__text filter-btn-active__text">一周内</text></button>
<button type="default" @click="handleFilter(item)"
:class="{'filter-btn-active':item === filterActiveIndex}" class="filter-btn" v-for="item in 3"
:key='item'><text class="filter-btn__text"
:class="{'filter-btn-active__text':item === filterActiveIndex}">{{item}}月内</text></button>
<image @click="handleShowDetail" class="icon-arrow" :class="{'icon-arrow-rotate':ishowDetail}"
src="@/static/image/arrow_up@3x.png" mode="aspectFit"></image>
</view>
<view class="filter-content">
<button type="default" @click="handleFilter(item+3)" class="filter-btn"
:class="{'filter-btn-active':item+3 === filterActiveIndex}" v-for="item in 9" :key='item'>
<text class="filter-btn__text" :class="{'filter-btn-active__text':item+3 === filterActiveIndex}">{{item+3}}月内</text></button>
<text class="filter-btn__text"
:class="{'filter-btn-active__text':item+3 === filterActiveIndex}">{{item+3}}月内</text></button>
</view>
</view>
<uni-list :style="listTop" ref="list" class="listview" :enableBackToTop="true" :scroll-y="true" @scrolltolower="loadMore()">
<uni-list :style="listTop" 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">
...
...
@@ -51,6 +56,10 @@
mapState
} from 'vuex'
import {
apiGetProduceOrder
} from '@/servers/produceOrder.js'
export default {
components: {
uniList,
...
...
@@ -68,15 +77,7 @@
},
data() {
return {
dataList: [{
id: "tab01",
name: '最新',
newsid: 0
}, {
id: "tab02",
name: '大公司',
newsid: 23
}],
dataList: [],
navigateFlag: false,
pulling: false,
refreshing: false,
...
...
@@ -92,9 +93,22 @@
contentrefresh: '',
contentnomore: ''
},
ishowDetail:false,
filterActiveIndex:0,
refreshIcon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB5QTFRFcHBw3Nzct7e39vb2ycnJioqK7e3tpqam29vb////D8oK7wAAAAp0Uk5T////////////ALLMLM8AAABxSURBVHja7JVBDoAgDASrjqj//7CJBi90iyYeOHTPMwmFZrHjYyyFYYUy1bwUZqtJIYVxhf1a6u0R7iUvWsCcrEtwJHp8MwMdvh2amHduiZD3rpWId9+BgPd7Cc2LIkPyqvlQvKxKBJ//Qwq/CacAAwDUv0a0YuKhzgAAAABJRU5ErkJggg=="
ishowDetail: false,
filterActiveIndex: 0,
refreshIcon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB5QTFRFcHBw3Nzct7e39vb2ycnJioqK7e3tpqam29vb////D8oK7wAAAAp0Uk5T////////////ALLMLM8AAABxSURBVHja7JVBDoAgDASrjqj//7CJBi90iyYeOHTPMwmFZrHjYyyFYYUy1bwUZqtJIYVxhf1a6u0R7iUvWsCcrEtwJHp8MwMdvh2amHduiZD3rpWId9+BgPd7Cc2LIkPyqvlQvKxKBJ//Qwq/CacAAwDUv0a0YuKhzgAAAABJRU5ErkJggg==",
condition: {
PARTNER: '0050000215',
DATUM: {
"SIGN": "I",
"OPTION": "BT",
LOW: '',
HIGH: ''
}
},
page: {
"PAGE": "1",
"PAGESIZE": "10",
}
}
},
computed: {
...
...
@@ -103,42 +117,29 @@
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
conditionTop()
{
conditionTop()
{
return {
'top': `${this.sysinfo.safeArea.top + 44 + 4}px`
}
},
listTop()
{
listTop()
{
return {
'top': `${this.sysinfo.safeArea.top + 120}px`
}
},
...mapState(['sysinfo'])
},
onNavigationBarButtonTap(e)
{
console.log('onNavigationBarButtonTap:',
e);
onNavigationBarButtonTap(e)
{
console.log('onNavigationBarButtonTap:',
e);
uni.navigateTo({
url: `/pages/produce-order/produce-plan`
});
},
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'
};
this._isWidescreen = false;
// #ifdef H5
var mediaQueryOb = uni.createMediaQueryObserver(this)
mediaQueryOb.observe({
minWidth: 768
}, matches => {
this._isWidescreen = matches;
})
// #endif
this.loadData()
},
methods: {
loadData(refresh) {
...
...
@@ -148,50 +149,37 @@
this.isLoading = true;
this.isNoData = false;
this.requestParams.time = new Date().getTime() + '';
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);
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
};
});
const params = {
...this.condition,
...this.page
}
apiGetProduceOrder(params).then((res) => {
console.log('loadData', res)
const {
DATA,
PAGE,
TOTAL
} = res
const data_list = DATA;
this.page.PAGE = PAGE
this.isNoData = (data_list.length <= 0);
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.dataList.length > 0 && this._isWidescreen && this.dataList.length <= 10) {
this.goDetail(this.dataList[0]);
}
},
fail: (err) => {
}).catch(() => {
if (this.dataList.length == 0) {
this.isNoData = true;
}
},
complete: (e) => {
}).finally(() => {
this.isLoading = false;
if (refresh) {
this.refreshing = false;
...
...
@@ -204,16 +192,15 @@
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) {
...
...
@@ -225,6 +212,7 @@
this.pulling = true;
this.refreshing = true;
this.refreshText = "正在刷新...";
this.page.PAGE = 1
this.loadData(true);
},
onrefresh(e) {
...
...
@@ -253,17 +241,10 @@
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() {
this.ishowDetail = !this.ishowDetail
},
handleFilter(item)
{
handleFilter(item)
{
this.filterActiveIndex = item
}
}
...
...
@@ -321,25 +302,25 @@
/* #endif */
}
.conditon-block
{
.conditon-block
{
position: fixed;
left: 0;
top: 88rpx;
right: 0;
bottom: 0;
z-index:
10;
z-index:
10;
height: 124rpx;
overflow:
hidden;
overflow:
hidden;
background-color: #fff;
display: flex;
flex-direction: column;
padding: 40rpx 32rpx 0 16rpx;
}
.conditon-block-auto
{
.conditon-block-auto
{
height: 460rpx;
overflow:
auto;
max-height:
230px;
overflow:
auto;
max-height:
230px;
}
.icon-arrow {
...
...
@@ -356,17 +337,17 @@
transform: rotate(180deg);
}
.filter-title
{
.filter-title
{
display: flex;
}
.filter-btn
{
.filter-btn
{
flex: 1;
min-width:
148rpx;
max-width:
148rpx;
min-width:
148rpx;
max-width:
148rpx;
height: 68rpx;
line-height:
unset;
line-height:
unset;
background: #f8f8f8;
border-radius: 16rpx;
margin-right: 20rpx;
...
...
@@ -375,24 +356,24 @@
border: 2rpx solid #f8f8f8;
}
.filter-btn__text
{
.filter-btn__text
{
height: 68rpx;
line-height: 68rpx;
color: #8e8e8e;
font-size: 24rpx;
}
.filter-btn-active
{
.filter-btn-active
{
background: #f61d30;
border: 2rpx solid #f61d30;
box-shadow: 0px 4rpx 12rpx 0px rgba(255,
29,50,0.56);
box-shadow: 0px 4rpx 12rpx 0px rgba(255,
29, 50, 0.56);
}
.filter-btn-active__text
{
.filter-btn-active__text
{
color: #fff;
}
.filter-content
{
.filter-content
{
display: flex;
flex-wrap: wrap;
}
...
...
pages/produce-order/produce-plan.nvue
View file @
8962c2c3
This diff is collapsed.
Click to expand it.
pages/purchase-plan/purchase-plan.nvue
View file @
8962c2c3
...
...
@@ -10,8 +10,8 @@
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerYearChange" mode="date"
:value="condition.RT_GJAHR.LOW" fields='year'>
<text class="uni-input">{{condition.RT_GJAHR.LOW}}</text>
:value="condition.RT_GJAHR
[0]
.LOW" fields='year'>
<text class="uni-input">{{condition.RT_GJAHR
[0]
.LOW}}</text>
</picker>
</view>
</view>
...
...
@@ -43,7 +43,7 @@
<text class="item-block-label">单号:{{item.plan_number}}</text>
</view>
<view class="item-block item-block-name">
<text class="item-block-label item-block__label">{{item.plan_type}}</text>
<text class="item-block-label item-block__label">{{item.plan_type
_text
}}</text>
</view>
<view class="item-block">
<text class="item-block-label-des">{{item.gjahr}}-{{item.monat}}</text>
...
...
@@ -51,7 +51,7 @@
<view class="block-detal">
<view class="block-detal-item">
<text class="detal-item-label">存货分类</text>
<text class="detal-item-value">{{item.wlybrand}}</text>
<text class="detal-item-value">{{item.wlybrand
_text
}}</text>
</view>
<view class="block-detal-item">
<text class="detal-item-label">总计划(件)</text>
...
...
@@ -101,18 +101,18 @@
condition: {
MV_BP: '0081000010',
ROLE: 'WLYALL',
RT_GJAHR: {
RT_GJAHR:
[
{
SIGN: 'I',
OPTION: 'EQ',
LOW: '',
HIGH: ''
},
RT_PLAN_TYPE: {
}
]
,
RT_PLAN_TYPE:
[
{
SIGN: 'I',
OPTION: 'EQ',
LOW: '',
HIGH: ''
}
}
]
},
page: {
"PAGE": "1",
...
...
@@ -133,9 +133,8 @@
},
},
created() {
this.condition.RT_GJAHR.LOW = timeFormat(new Date(), 'yyyy')
this.condition.RT_GJAHR
[0]
.LOW = timeFormat(new Date(), 'yyyy')
this.getSalesPlanTypes();
this.getSalesPlan()
},
methods: {
async getSalesPlan() {
...
...
@@ -160,16 +159,19 @@
async getSalesPlanTypes() {
const res = await apiSalesPlanTypesSelect()
this.selectedSalePlanTypes = res.DATA
this.selectedSalePlan = this.selectedSalePlanTypes[this.typesIndex]
this.condition.RT_PLAN_TYPE[0].LOW = this.selectedSalePlanTypes[this.typesIndex].KEY
this.getSalesPlan()
},
bindPickerTypesChange(e) {
console.log('bindPickerTypesChange', e.detail.value)
this.typesIndex = e.detail.value
this.condition.RT_PLAN_TYPE.LOW = this.selectedSalePlanTypes[this.typesIndex].KEY
this.condition.RT_PLAN_TYPE
[0]
.LOW = this.selectedSalePlanTypes[this.typesIndex].KEY
this.getSalesPlan()
},
bindPickerYearChange(e) {
console.log('bindPickerYearChange', e.detail.value)
this.condition.RT_GJAHR.LOW = e.detail.value
this.condition.RT_GJAHR
[0]
.LOW = e.detail.value
this.getSalesPlan()
},
handleClick(e, content, index) {
...
...
@@ -256,6 +258,7 @@
position: relative;
border-radius: 4px;
align-items: center;
line-height: normal;
}
.uni-list-cell {
...
...
pages/select-product-pro/select-product-pro.vue
0 → 100644
View file @
8962c2c3
<
template
>
<view
class=
"lists"
>
<view
class=
"status_bar"
:style=
"navHeight"
></view>
<view
class=
"header-bg"
></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.product"
placeholder=
"模糊查询,请手动加*"
/>
</view>
<view
class=
"text-block text-block-last"
>
<text
class=
"middle-date"
>
产品编码
</text>
<input
class=
"middle-date-des"
type=
"text"
v-model=
"condition.code"
placeholder=
"请输入"
/>
</view>
</view>
<view
class=
"planout-block"
>
<button
class=
"btn"
type=
"default"
@
tap=
"search"
>
<text
class=
"btn-text"
>
查询
</text>
</button>
</view>
<uni-swipe-action
class=
"planout-block-lists"
>
<uni-swipe-action-item
v-for=
"(item,index) in lists"
:key=
'item.PRODUCT_ID'
:auto-close=
"false"
:disabled=
'true'
:show=
"isOpened"
@
click=
"handleClick"
>
<template
v-slot:left
>
<view
class=
"swipe-right-block"
@
click=
"handleChecked($event,item, index)"
><text
class=
"swipe-right-block__text"
:class=
"
{'swipe-right-block__active':item.checked}">
</text>
</view>
</
template
>
<view
class=
"middle view planout-block-item"
>
<view
class=
"text-block"
>
<text
class=
"middle-date middle-date-select"
>
产品编码
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.PRODUCT_ID}}
</text>
</view>
<view
class=
"text-block"
>
<text
class=
"middle-date middle-date-select"
>
描述
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.SHORT_TEXT}}
</text>
</view>
<view
class=
"text-block"
>
<text
class=
"middle-date middle-date-select"
>
产品类型
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.CHFL_D}}
</text>
</view>
<view
class=
"text-block text-block-last"
>
<text
class=
"middle-date middle-date-select"
>
价格
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.NORMS}}
</text>
</view>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</view>
</template>
<
script
>
import
{
mapState
}
from
'vuex'
import
{
apiProductSelect
}
from
'@/servers/produceOrder.js'
const
modeMap
=
{
'produceOrder'
:
'QUOTA'
,
}
export
default
{
data
()
{
return
{
isOpened
:
'none'
,
condition
:
{
product
:
''
,
code
:
''
,
},
page
:
{
"PAGE"
:
"1"
,
"PAGESIZE"
:
"10"
,
},
lists
:
[{
checked
:
false
,
"PRODUCT_ID"
:
"040001005280116160"
,
"SHORT_TEXT"
:
"新品五粮液091 52%500mL×6"
,
"NORMS"
:
"52%500ML×6"
,
"MSEHT"
:
"盒"
,
"ISPEJ"
:
"X"
,
"NRATE"
:
1.000
,
"WRATE"
:
1.000
,
"PECYCLE"
:
"Z001"
},
],
selectedProduct
:
{},
toPageParams
:
{
page
:
''
,
mode
:
''
,
index
:
0
,
head
:
{}
}
}
},
computed
:
{
...
mapState
([
'sysinfo'
,
'userInfo'
]),
navHeight
()
{
return
{
'height'
:
`
${
this
.
sysinfo
.
safeArea
.
top
+
44
}
px`
}
}
},
onNavigationBarButtonTap
(
e
)
{
// console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedProduct);
if
(
this
.
isOpened
===
'left'
&&
this
.
selectedProduct
&&
this
.
selectedProduct
.
PRODUCT_ID
)
{
uni
.
$emit
(
'selectedProduct'
,
{
selectedProduct
:
this
.
selectedProduct
,
mode
:
this
.
toPageParams
.
mode
,
index
:
this
.
toPageParams
.
index
})
uni
.
navigateBack
({})
return
}
this
.
isOpened
=
this
.
isOpened
===
'none'
?
'left'
:
'none'
;
// #ifdef APP-PLUS
let
pages
=
getCurrentPages
()
let
page
=
pages
[
pages
.
length
-
1
]
let
webView
=
page
.
$getAppWebview
();
console
.
log
(
'webView'
,
webView
)
webView
.
setTitleNViewButtonStyle
(
0
,
{
text
:
this
.
isOpened
===
'none'
?
'选择'
:
'完成'
,
});
// let titleObj = webView.getStyle().titleNView;
// if(!titleObj.buttons){
// returnl
// }
// titleObj.buttons[0].text = 'dd';
// webView.setStyle({
// titleNView:titleObj
// })
// #endif
},
onLoad
(
option
)
{
console
.
log
(
'select-product'
,
option
)
const
{
from
,
mode
,
index
,
head
}
=
option
this
.
toPageParams
.
index
=
index
this
.
toPageParams
.
mode
=
mode
this
.
toPageParams
.
page
=
from
this
.
toPageParams
.
head
=
JSON
.
parse
(
head
)
},
created
()
{
this
.
getProduct
();
},
methods
:
{
search
()
{
this
.
page
.
PAGE
=
1
this
.
getProduct
()
},
async
getProduct
()
{
let
SHORT
=
[]
let
PRODUCT_ID
=
[]
if
(
this
.
condition
.
code
)
{
SHORT
=
[{
SIGN
:
'I'
,
OPTION
:
'EQ'
,
LOW
:
this
.
condition
.
code
,
HIGH
:
''
,
}]
}
if
(
this
.
condition
.
product
)
{
PRODUCT_ID
=
[{
SIGN
:
'I'
,
OPTION
:
'CP'
,
LOW
:
this
.
condition
.
product
,
HIGH
:
''
,
}]
}
const
params
=
{
...
this
.
page
,
'PARTNER'
:
this
.
userInfo
.
customerCode
,
SHORT
,
PRODUCT_ID
,
}
const
res
=
await
apiProductSelect
(
params
)
this
.
lists
=
res
&&
res
.
DATA
.
map
((
item
)
=>
{
item
.
checked
=
false
return
item
})
},
bindPickerChange
(
e
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
)
this
.
index
=
e
.
detail
.
value
},
handleClick
(
e
,
content
,
index
)
{
console
.
log
(
'click当前索引:'
,
e
,
content
,
index
);
},
handleChecked
(
e
,
item
,
index
)
{
console
.
log
(
'当前索引:'
,
e
,
index
);
this
.
lists
.
forEach
((
cur
)
=>
{
if
(
cur
.
PRODUCT_ID
===
item
.
PRODUCT_ID
)
{
cur
.
checked
=
!
cur
.
checked
}
else
{
cur
.
checked
=
false
}
})
if
(
item
.
checked
===
true
)
{
// this.selectedProduct.push(item)
this
.
selectedProduct
=
item
}
else
{
// const selectIndex = this.selectedProduct.findIndex((saleplan)=>{
// return saleplan.id === item.id
// })
// this.selectedProduct.splice(selectIndex,1)
this
.
selectedProduct
=
{}
}
},
nextStep
()
{
this
.
$emit
(
'click'
,
'orderUpload'
)
},
preStep
()
{
uni
.
switchTab
({
url
:
`/pages/go-order/go-order`
})
},
}
}
</
script
>
<
style
lang=
"scss"
scoped
>
.view
{
flex-direction
:
column
;
}
.header-bg
{
height
:
284rpx
;
margin-top
:
-88rpx
;
background
:
linear-gradient
(
232deg
,
#f4e2e2
25%
,
#faf3f3
98%
);
}
.lists
{
position
:
relative
;
flex-direction
:
column
;
overflow-y
:
scroll
;
background
:
#f0f4f5
;
overflow-x
:
hidden
;
height
:
100%
;
}
.main
{
flex-direction
:
column
;
margin-top
:
-164rpx
;
padding
:
0
16rpx
;
}
.middle
{
background-color
:
#fff
;
border-radius
:
16rpx
;
padding
:
32rpx
64rpx
32rpx
48rpx
;
}
.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-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
;
}
.planout-block-lists
{
display
:
flex
;
flex-direction
:
column
;
overflow
:
hidden
;
}
.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
;
width
:
750rpx
;
}
.btn
{
flex
:
1
;
height
:
92rpx
;
background
:
$wly-primary-color
;
border-radius
:
46rpx
;
}
.btn-text
{
color
:
#fff
;
font-size
:
34rpx
;
}
</
style
>
pages/select-product/select-product.vue
View file @
8962c2c3
...
...
@@ -40,7 +40,7 @@
</view>
<view
class=
"text-block"
>
<text
class=
"middle-date middle-date-select"
>
产品类型
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.
PRODUCT_I
D}}
</text>
<text
class=
"middle-date-des middle-date-des-select"
>
{{item.
CHFL_
D}}
</text>
</view>
<view
class=
"text-block text-block-last"
>
<text
class=
"middle-date middle-date-select"
>
价格
</text>
...
...
servers/common.js
View file @
8962c2c3
...
...
@@ -2,8 +2,6 @@ import apiHelper from './api.helper.js'
/**
* 产品查询
* @param name 账户名
* @param password 账户密码
* @param captcha 验证码
* @returns {Promise<AxiosResponse<T>>}
*/
...
...
@@ -14,9 +12,7 @@ export async function apiProductSelect(params) {
/**
* 销售计划查询
* @param name 账户名
* @param password 账户密码
* @param captcha 验证码
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiSalesPlanSelect
(
params
)
{
...
...
servers/produceOrder.js
0 → 100644
View file @
8962c2c3
import
apiHelper
from
'./api.helper.js'
/**
* 根据搜索条件查询生产计划信息。
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiGetProduceOrder
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/get_p_plan_app'
,
params
)
return
res
}
/**
* 生产计划创建初始化数据。
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiProducePlanInit
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/p_plan_init'
,
params
)
return
res
}
/**
* 生产计划项目更新数据
* @param name 账户名
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiUpdateProducePlanData
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/prodplan05'
,
params
)
return
res
}
/**
* 生产计划单提交。
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiUpdateProduceOrder
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/prodplan003'
,
params
)
return
res
}
/**
* 查询客户可售产品。
* @param captcha 验证码
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiProductSelect
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/bp_pro_search'
,
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