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
1bfc2e7f
Commit
1bfc2e7f
authored
May 20, 2022
by
chuan.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
团购下单 mock数据联调
parent
c4d8d4ee
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
602 additions
and
139 deletions
+602
-139
address-manage.nvue
pages/address-manage/address-manage.nvue
+130
-75
group-baseinfo.nvue
pages/group-buy/group-baseinfo.nvue
+12
-6
order-upload.nvue
pages/group-buy/order-upload.nvue
+129
-11
quota-order.nvue
pages/group-buy/quota-order.nvue
+280
-42
select-product.vue
pages/select-product/select-product.vue
+6
-4
common.js
servers/common.js
+12
-1
groupOrder.js
servers/groupOrder.js
+26
-0
index.js
store/index.js
+4
-0
data.js
utils/data.js
+3
-0
No files found.
pages/address-manage/address-manage.nvue
View file @
1bfc2e7f
<template>
<view class="order view">
<view class="status_bar" :style="navHeight"></view>
<view class="listview">
<view class="listview">
<list class="cell-list" :show-scrollbar='false'>
<cell @click="check" v-for="item in 10" :key='item'>
<view class="cell-list-block">
<text class="icon-address">张</text>
<view class="cell-list-block__content">
<view class="list-block-item">
<text class="list-block-item__title1">张先生 13760362013</text>
</view>
<view class="list-block-item">
<text class="list-block-item__label">单位编号</text>
<text class="list-block-item__value">38000680</text>
</view>
<view class="list-block-item">
<text class="list-block-item__label">单位编号</text>
<text class="list-block-item__value">常委会退休处</text>
</view>
<view class="list-block-item">
<image class="icon-arrow" src="@/static/image/uc_setting@3x.png" mode="aspectFit"></image>
<text class="list-block-item__desc">天津天津市静海县华佗大道529号</text>
</view>
</view>
<cell @click="handleChecked(item)" v-for="item in lists" :key='item.NUMBER'>
<view class="cell-list-block">
<text class="icon-address">{{item.NAME_ORG1.slice(0,1)}}</text>
<view class="cell-list-block__content">
<view class="list-block-item">
<text class="list-block-item__title1">{{item.NAME_ORG1}} {{item.TEL_NUMBER}}</text>
</view>
<view class="list-block-item">
<text class="list-block-item__label">单位编号</text>
<text class="list-block-item__value">{{item.PARTNER}}</text>
</view>
<view class="list-block-item">
<text class="list-block-item__label">单位名称</text>
<text class="list-block-item__value">{{item.NAME_ORG1}}</text>
</view>
<view class="list-block-item">
<image class="icon-arrow" src="@/static/image/uc_setting@3x.png" mode="aspectFit">
</image>
<text class="list-block-item__desc">{{item.STREET}}</text>
</view>
</view>
</view>
</cell>
</list>
</cell>
</list>
</view>
</view>
</template>
...
...
@@ -36,11 +37,24 @@
mapState
} from 'vuex'
import {
apiAddressSelect
} from '@/servers/common.js'
export default {
data() {
return {
condition: {
'PARTNER': '',
'NAME_ORG1': '',
'C_O_NAME': '',
},
lists: [],
selectedAddress: {},
toPageParams: {
page: ''
}
}
},
computed: {
...
...
@@ -51,11 +65,52 @@
},
...mapState(['sysinfo'])
},
onLoad(option) {
console.log('select-saleplan', option)
if (option && option.from) {
const {
from
} = option
this.toPageParams.page = from
}
},
created() {
this.getAddress()
},
methods: {
check(item) {
uni.navigateBack({
async getAddress() {
const {
PARTNER,
NAME_ORG1,
C_O_NAME
} = this.condition
const params = {
"MODE": "GGTG",
"PAGE": "1",
"PAGESIZE": "10",
"INFO": {
"CUSTOMER": "0050000215",
"GRPUTID": "CVG00000N5C"
},
"INPUT": {
"PARTNER": "",
"NAME_ORG1": "",
"C_O_NAME": ""
}
}
const res = await apiAddressSelect(params)
this.lists = res.DATA.map((item) => {
item.checked = false
return item
})
console.log('ddd2', res)
},
handleChecked(item) {
this.selectedAddress = item
uni.$emit('selectedAddress', {
selectedAddress: item
})
uni.navigateBack()
}
}
}
...
...
@@ -75,7 +130,7 @@
}
.status_bar {
height: var(--status-bar-height);
height: var(--status-bar-height);
background: #fff;
}
...
...
@@ -83,30 +138,30 @@
.order {
flex: 1;
background: #f0f4f5;
background: #f0f4f5;
}
.listview {
flex: 1;
flex-direction: column;
padding:
16rpx;
flex-direction: column;
padding:
16rpx;
}
.cell-list {
flex: 1;
flex-direction: column;
background: #f0f4f5;
}
.cell-list {
flex: 1;
flex-direction: column;
background: #f0f4f5;
}
.icon-address {
width: 88rpx;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: #fff4f4;
font-size: 28rpx;
color: #ff1d32;
font-weight: 500;
height: 88rpx;
line-height: 88rpx;
text-align: center;
background: #fff4f4;
font-size: 28rpx;
color: #ff1d32;
font-weight: 500;
border-radius: 50%;
margin-right: 32rpx;
}
...
...
@@ -115,29 +170,29 @@
display: flex;
flex: 1;
flex-direction: column;
}
.list-block-item
{
display: flex;
align-items: center;
margin-bottom: 16rpx;
}
.list-block-item__title1
{
color: #333;
font-weight: 500;
font-size: 32rpx;
}
.list-block-item__label
{
color: #999999;
font-size: 24rpx;
margin-right: 16rpx;
}
.list-block-item__value
{
color: #333333;
font-size: 12px;
}
.list-block-item
{
display: flex;
align-items: center;
margin-bottom: 16rpx;
}
.list-block-item__title1
{
color: #333;
font-weight: 500;
font-size: 32rpx;
}
.list-block-item__label
{
color: #999999;
font-size: 24rpx;
margin-right: 16rpx;
}
.list-block-item__value
{
color: #333333;
font-size: 12px;
}
.cell-list-block__desc {
...
...
@@ -147,17 +202,17 @@
.icon-arrow {
width: 18rpx;
height: 22rpx;
height: 22rpx;
margin-right: 28rpx;
}
.list-block-item__desc{
font-size: 24rpx;
color: #333;
}
.cell-list-block {
display: flex;
.list-block-item__desc {
font-size: 24rpx;
color: #333;
}
.cell-list-block {
display: flex;
flex: 1;
margin-bottom: 16rpx;
background: #fff;
...
...
pages/group-buy/group-baseinfo.nvue
View file @
1bfc2e7f
...
...
@@ -42,7 +42,7 @@
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="middle-date-des">{{selectedAddress.
name
}}</text>
<text class="middle-date-des">{{selectedAddress.
NAME_ORG1
}}</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
...
...
@@ -54,15 +54,15 @@
</view>
<view class="text-block">
<text class="middle-date">联系人</text>
<input class="middle-date-des" type="text" v
alue="
" placeholder="请填写" />
<input class="middle-date-des" type="text" v
-model="selectedAddress.C_O_NAME
" placeholder="请填写" />
</view>
<view class="text-block text-block-last">
<text class="middle-date">电话</text>
<input class="middle-date-des" type="text" v
alue="
" placeholder="请填写" />
<input class="middle-date-des" type="text" v
-model="selectedAddress.TEL_NUMBER
" placeholder="请填写" />
</view>
<view class="text-block text-block-last"
@click="selectAddress"
>
<view class="text-block text-block-last">
<text class="middle-date">收货地址</text>
<input class="middle-date-des" type="text" v
alue="
" placeholder="请填写" />
<input class="middle-date-des" type="text" v
-model="selectedAddress.STREET
" placeholder="请填写" />
</view>
</view>
...
...
@@ -139,6 +139,12 @@
...data.selectedGroupClient
}
})
uni.$once('selectedAddress', function(data) {
console.log('监听到事件来自 selectedAddress ,携带参数 msg 为:', data);
_this.selectedAddress = {
...data.selectedAddress
}
})
},
methods: {
bindPickerYearChange(e) {
...
...
@@ -157,7 +163,7 @@
},
selectAddress() {
uni.navigateTo({
url: `/pages/address-manage/address-manage`
url: `/pages/address-manage/address-manage
?from=groupBaseInfo
`
});
},
nextStep() {
...
...
pages/group-buy/order-upload.nvue
View file @
1bfc2e7f
...
...
@@ -6,7 +6,8 @@
<text class="upload-text">附件上传</text>
</view>
<view class="upload-block">
<uni-file-picker ref='files' :auto-upload='false' v-model="fileList" file-mediatype="image" :imageStyles="imageStyles" @select="select" @progress="progress" @success="success" @fail='fail'>
<uni-file-picker ref='files' :auto-upload='false' v-model="fileList" file-mediatype="image"
:imageStyles="imageStyles" @select="select" @progress="progress" @success="success" @fail='fail'>
<text>+</text>
</uni-file-picker>
</view>
...
...
@@ -43,15 +44,26 @@
</template>
<script>
import {
apiUpdateGroupOrder
} from '@/servers/groupOrder.js'
import {
mapMutations,
mapState
} from 'vuex'
export default {
data() {
return {
orderNo: '',
orderInfo: {},
fileList: [],
}
},
computed:{
imageStyles(){
computed: {
...mapState(['groupOrder']),
imageStyles() {
return {
width: 64,
height: 64,
...
...
@@ -62,6 +74,113 @@
},
},
methods: {
async updateGroupOrder() {
const params = {
"MODE": "SAVE",
"info": {
"GUID": "00000000000000000000000000000000",
"OBJECT_ID": "",
"PROCESS_TYPE": "ZS01",
"CUSTOMER": "0050000215",
"CUST_NAME": "崇州顺辰商贸有限公司",
"CUSTOMER_TYPE": "V003",
"ZZFLD000000": "",
"ZZFLD000028": "",
"ZZFLD00002D": "81000010",
"ZZFLD00002D_DSCR": "董平",
"POSTING_DATE": "20220321",
"STATUS": "E0001",
"ZZFLD000001": "0005000006",
"ZZFLD00003E": "",
"ZZFLD000002": "230",
"ZZFLD000003": "000000510100",
"ZZFLD000004": "",
"ZZFLD000004_DSCR": "",
"ZZFLD00002J": "",
"ZZFLD00002K": "",
"ZZFLD00002L": "",
"ZZFLD00002M": "",
"ZZFLD00002N": "",
"SALES_ORG": "0 50000025",
"CHANNEL": "",
"DIVISION": "",
"CUST_PRIC_PROC": "1",
"TAX_GROUP_BP_01": "FULL",
"ZZFLD00003C": "",
"ZZFLD00009O": "0.00",
"ZZFLD00009Q": "0.00",
"ZHKYE": "0.00"
},
'ITEM': [{
"GUID": "00000000000000000000000000000000",
"HEADER": "00000000000000000000000000000000",
"NUMBER_INT": "0000000010",
"ITM_TYPE": "",
"ZZFLD000029": "V001",
"ZZFLD000005": "3800000826",
"ZZFLD000005_Z1": "",
"ZZFLD000006": "20220322",
"ZZFLD00002Q": "V001",
"ZZFLD00002Q_Z1": "",
"ORDERED_PROD": "040001005280115668",
"DESCRIPTION": "五粮液.1618(131) 52%618mL×6",
"ZZFLD00002S": "52%618ML×6",
"UNIT": "KAR",
"ZZFLD00002T": "盒",
"QUANTITY": 6.000,
"ZZFLD00002U": 6.00,
"ZZFLD00002W": 6.00,
"ZZFLD000009": 1.00,
"INVENTORY": 0.00,
"ZZFLD00002E": " 13.00%",
"NET_PRICE": 769.00,
"ZZFLD00002X": 769.00,
"NET_VALUE": 4614.00,
"ZZFLD00002Z": 4614.00,
"ZZFLD00002A": "",
"ZZFLD00002F": " 100.00%",
"ZZFLD00002G": 769.00,
"ZZFLD00002I": 0.00,
"ZZFLD000007": 0.00,
"ZZFLD000032": 0.00,
"ZZFLD00002O": 0.00,
"ZZFLD000035": 0.00,
"ZZFLD00002B": "",
"ZZFLD000008": "",
"ZZFLD00002P": "0000000000",
"CURRENCY": "",
"MODE": "",
"WAREHOUSE": "",
"PRDTYPE": "",
"YEAR": "0000",
"ZZFLD00002Q_D": ""
}],
"attachment": [],
"USER_BP": "0081000010",
"ROLE": "WLYALL"
}
const res = await apiUpdateGroupOrder(params)
const {
ATTACHMENT,
HISTORY,
INFO,
ITEM
} = res.DATA
const params2 = {
"MODE": "SUBMIT",
"info": INFO,
'ITEM': ITEM,
"attachment": ATTACHMENT,
"USER_BP": "0081000010",
"ROLE": "WLYALL"
}
const res2 = await apiUpdateGroupOrder(params2)
console.log('ddd2', res2)
this.orderInfo = res2
this.$refs.popup.open('center')
},
change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show);
},
...
...
@@ -75,7 +194,7 @@
},
// 上传成功
success(e) {
console.log('上传成功',e)
console.log('上传成功',
e)
},
// 上传失败
fail(e) {
...
...
@@ -93,8 +212,7 @@
this.$refs.popup.close()
},
submit() {
this.$refs.popup.open('center')
this.$refs.files.upload()
this.updateGroupOrder()
},
preStep() {
this.$emit('click', 'quotaOrder')
...
...
@@ -180,13 +298,13 @@
border-radius: 4px;
margin-top: 90rpx;
}
.uni-file-picker{
.uni-file-picker
{
width: 100%;
height: 100%;
}
/deep/ .uni-file-picker__container{
/deep/ .uni-file-picker__container
{
width: 100%;
height: 100%;
}
...
...
@@ -295,4 +413,4 @@
background: #ff1d32;
border: 1px solid #ff1d32;
}
</style>
</style>
pages/group-buy/quota-order.nvue
View file @
1bfc2e7f
This diff is collapsed.
Click to expand it.
pages/select-product/select-product.vue
View file @
1bfc2e7f
...
...
@@ -73,6 +73,7 @@
const
modeMap
=
{
'quotaOrder'
:
'QUOTA'
,
'noQuotaOrder'
:
'NO_QUOTA'
,
'groupOrder'
:
'GGTG'
,
}
export
default
{
...
...
@@ -161,12 +162,13 @@
},
async
getProduct
()
{
const
params
=
{
'page'
:
1
,
'pagesize'
:
'10'
,
"PAGE"
:
"1"
,
"PAGESIZE"
:
"10"
,
"MODE"
:
modeMap
[
this
.
toPageParams
.
page
],
"INFO"
:
{
"PROCESS_TYPE"
:
"ZS01"
,
"CUSTOMER"
:
"0050000215"
"PROCESS_TYPE"
:
"ZS02"
,
"CUSTOMER"
:
"0050000215"
,
"ZZFLD00002J"
:
"V013"
},
"input"
:
{
"SHORT_TEXT"
:
this
.
condition
.
product
...
...
servers/common.js
View file @
1bfc2e7f
...
...
@@ -54,9 +54,20 @@ export async function apiBusinessSelect(params) {
return
res
}
/**
* 输入订单客户编号和团购单位后可进行收货方信息查询
* @param captcha 验证码
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiAddressSelect
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/partner_ovs'
,
params
)
return
res
}
export
default
{
apiProductSelect
,
apiSalesPlanSelect
,
apiGroupClientSelect
,
apiBusinessSelect
apiBusinessSelect
,
apiAddressSelect
}
servers/groupOrder.js
0 → 100644
View file @
1bfc2e7f
import
apiHelper
from
'./api.helper.js'
/**
* 销售订单行项目选择或修改后进行页面数据更新
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiUpdateGroupData
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/so_u_data_ggtg'
,
params
)
return
res
}
/**
* 针对非配额产品经销商保存、提交、取消、审核配额订单。
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiUpdateGroupOrder
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/so_ggtg'
,
params
)
return
res
}
export
default
{
apiUpdateGroupData
,
apiUpdateGroupOrder
}
store/index.js
View file @
1bfc2e7f
...
...
@@ -53,6 +53,10 @@ const store = new Vuex.Store({
'item_outer'
:
[],
'item_d'
:
[],
'attachment'
:
[]
},
groupOrder
:
{
'ITEM'
:
[],
'attachment'
:
[]
}
},
mutations
:
{
...
...
utils/data.js
View file @
1bfc2e7f
export
const
yearData
=
()
=>
{
}
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