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
Show 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
...
@@ -3,24 +3,25 @@
...
@@ -3,24 +3,25 @@
<view class="status_bar" :style="navHeight"></view>
<view class="status_bar" :style="navHeight"></view>
<view class="listview">
<view class="listview">
<list class="cell-list" :show-scrollbar='false'>
<list class="cell-list" :show-scrollbar='false'>
<cell @click="
check" v-for="item in 10" :key='item
'>
<cell @click="
handleChecked(item)" v-for="item in lists" :key='item.NUMBER
'>
<view class="cell-list-block">
<view class="cell-list-block">
<text class="icon-address">
张</text>
<text class="icon-address">
{{item.NAME_ORG1.slice(0,1)}}</text>
<view class="cell-list-block__content">
<view class="cell-list-block__content">
<view class="list-block-item">
<view class="list-block-item">
<text class="list-block-item__title1">
张先生 13760362013</text>
<text class="list-block-item__title1">
{{item.NAME_ORG1}} {{item.TEL_NUMBER}}</text>
</view>
</view>
<view class="list-block-item">
<view class="list-block-item">
<text class="list-block-item__label">单位编号</text>
<text class="list-block-item__label">单位编号</text>
<text class="list-block-item__value">
38000680</text>
<text class="list-block-item__value">
{{item.PARTNER}}</text>
</view>
</view>
<view class="list-block-item">
<view class="list-block-item">
<text class="list-block-item__label">单位
编号</text>
<text class="list-block-item__label">单位
名称</text>
<text class="list-block-item__value">
常委会退休处</text>
<text class="list-block-item__value">
{{item.NAME_ORG1}}</text>
</view>
</view>
<view class="list-block-item">
<view class="list-block-item">
<image class="icon-arrow" src="@/static/image/uc_setting@3x.png" mode="aspectFit"></image>
<image class="icon-arrow" src="@/static/image/uc_setting@3x.png" mode="aspectFit">
<text class="list-block-item__desc">天津天津市静海县华佗大道529号</text>
</image>
<text class="list-block-item__desc">{{item.STREET}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
...
@@ -36,11 +37,24 @@
...
@@ -36,11 +37,24 @@
mapState
mapState
} from 'vuex'
} from 'vuex'
import {
apiAddressSelect
} from '@/servers/common.js'
export default {
export default {
data() {
data() {
return {
return {
condition: {
'PARTNER': '',
'NAME_ORG1': '',
'C_O_NAME': '',
},
lists: [],
selectedAddress: {},
toPageParams: {
page: ''
}
}
}
},
},
computed: {
computed: {
...
@@ -51,11 +65,52 @@
...
@@ -51,11 +65,52 @@
},
},
...mapState(['sysinfo'])
...mapState(['sysinfo'])
},
},
onLoad(option) {
console.log('select-saleplan', option)
if (option && option.from) {
const {
from
} = option
this.toPageParams.page = from
}
},
created() {
this.getAddress()
},
methods: {
methods: {
check(item) {
async getAddress() {
uni.navigateBack({
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()
}
}
}
}
}
}
...
@@ -89,7 +144,7 @@
...
@@ -89,7 +144,7 @@
.listview {
.listview {
flex: 1;
flex: 1;
flex-direction: column;
flex-direction: column;
padding:
16rpx;
padding:
16rpx;
}
}
.cell-list {
.cell-list {
...
@@ -117,25 +172,25 @@
...
@@ -117,25 +172,25 @@
flex-direction: column;
flex-direction: column;
}
}
.list-block-item
{
.list-block-item
{
display: flex;
display: flex;
align-items: center;
align-items: center;
margin-bottom: 16rpx;
margin-bottom: 16rpx;
}
}
.list-block-item__title1
{
.list-block-item__title1
{
color: #333;
color: #333;
font-weight: 500;
font-weight: 500;
font-size: 32rpx;
font-size: 32rpx;
}
}
.list-block-item__label
{
.list-block-item__label
{
color: #999999;
color: #999999;
font-size: 24rpx;
font-size: 24rpx;
margin-right: 16rpx;
margin-right: 16rpx;
}
}
.list-block-item__value
{
.list-block-item__value
{
color: #333333;
color: #333333;
font-size: 12px;
font-size: 12px;
}
}
...
@@ -151,7 +206,7 @@
...
@@ -151,7 +206,7 @@
margin-right: 28rpx;
margin-right: 28rpx;
}
}
.list-block-item__desc
{
.list-block-item__desc
{
font-size: 24rpx;
font-size: 24rpx;
color: #333;
color: #333;
}
}
...
...
pages/group-buy/group-baseinfo.nvue
View file @
1bfc2e7f
...
@@ -42,7 +42,7 @@
...
@@ -42,7 +42,7 @@
<view class="middle-date-des uni-list picker-year">
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<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>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
...
@@ -54,15 +54,15 @@
...
@@ -54,15 +54,15 @@
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">联系人</text>
<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>
<view class="text-block text-block-last">
<view class="text-block text-block-last">
<text class="middle-date">电话</text>
<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>
<view class="text-block text-block-last"
@click="selectAddress"
>
<view class="text-block text-block-last">
<text class="middle-date">收货地址</text>
<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>
</view>
</view>
...
@@ -139,6 +139,12 @@
...
@@ -139,6 +139,12 @@
...data.selectedGroupClient
...data.selectedGroupClient
}
}
})
})
uni.$once('selectedAddress', function(data) {
console.log('监听到事件来自 selectedAddress ,携带参数 msg 为:', data);
_this.selectedAddress = {
...data.selectedAddress
}
})
},
},
methods: {
methods: {
bindPickerYearChange(e) {
bindPickerYearChange(e) {
...
@@ -157,7 +163,7 @@
...
@@ -157,7 +163,7 @@
},
},
selectAddress() {
selectAddress() {
uni.navigateTo({
uni.navigateTo({
url: `/pages/address-manage/address-manage`
url: `/pages/address-manage/address-manage
?from=groupBaseInfo
`
});
});
},
},
nextStep() {
nextStep() {
...
...
pages/group-buy/order-upload.nvue
View file @
1bfc2e7f
...
@@ -6,7 +6,8 @@
...
@@ -6,7 +6,8 @@
<text class="upload-text">附件上传</text>
<text class="upload-text">附件上传</text>
</view>
</view>
<view class="upload-block">
<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>
<text>+</text>
</uni-file-picker>
</uni-file-picker>
</view>
</view>
...
@@ -43,15 +44,26 @@
...
@@ -43,15 +44,26 @@
</template>
</template>
<script>
<script>
import {
apiUpdateGroupOrder
} from '@/servers/groupOrder.js'
import {
mapMutations,
mapState
} from 'vuex'
export default {
export default {
data() {
data() {
return {
return {
orderNo: '',
orderNo: '',
orderInfo: {},
fileList: [],
fileList: [],
}
}
},
},
computed:{
computed: {
imageStyles(){
...mapState(['groupOrder']),
imageStyles() {
return {
return {
width: 64,
width: 64,
height: 64,
height: 64,
...
@@ -62,6 +74,113 @@
...
@@ -62,6 +74,113 @@
},
},
},
},
methods: {
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) {
change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show);
console.log('当前模式:' + e.type + ',状态:' + e.show);
},
},
...
@@ -75,7 +194,7 @@
...
@@ -75,7 +194,7 @@
},
},
// 上传成功
// 上传成功
success(e) {
success(e) {
console.log('上传成功',e)
console.log('上传成功',
e)
},
},
// 上传失败
// 上传失败
fail(e) {
fail(e) {
...
@@ -93,8 +212,7 @@
...
@@ -93,8 +212,7 @@
this.$refs.popup.close()
this.$refs.popup.close()
},
},
submit() {
submit() {
this.$refs.popup.open('center')
this.updateGroupOrder()
this.$refs.files.upload()
},
},
preStep() {
preStep() {
this.$emit('click', 'quotaOrder')
this.$emit('click', 'quotaOrder')
...
@@ -181,12 +299,12 @@
...
@@ -181,12 +299,12 @@
margin-top: 90rpx;
margin-top: 90rpx;
}
}
.uni-file-picker{
.uni-file-picker
{
width: 100%;
width: 100%;
height: 100%;
height: 100%;
}
}
/deep/ .uni-file-picker__container{
/deep/ .uni-file-picker__container
{
width: 100%;
width: 100%;
height: 100%;
height: 100%;
}
}
...
...
pages/group-buy/quota-order.nvue
View file @
1bfc2e7f
...
@@ -6,54 +6,74 @@
...
@@ -6,54 +6,74 @@
<text class="upload-text">合计金额</text>
<text class="upload-text">合计金额</text>
</view>
</view>
<view>
<view>
<text class="summary-num">789*6*4</text>
<text class="summary-num">{{intotalComputed}}</text>
</view>
</view>
<view class="middle upload summary">
<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="bindPickerTypesChange" range-key='VALUE' mode="selector"
:value="typesIndex" :range="selectedSalePlanTypes">
<view class="uni-input">{{selectedSalePlanTypes[typesIndex].VALUE}}</view>
</picker>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view>
</view>
</view>
<scroll-view class="scroll-area view" :scroll-top="scrollTop" scroll-y="true">
<scroll-view class="scroll-area view" :scroll-top="scrollTop" scroll-y="true">
<view class="view">
<view class="planout-block">
<view class="planout-block">
<text class="planout-block-title">订购产品</text>
<text class="planout-block-title">订购产品</text>
<image class="planout-block-icon" src="@/static/image/shop_more@3x.png" mode="aspectFit"></image>
<image class="planout-block-icon" src="@/static/image/shop_more@3x.png" @click="addPlanout()"
mode="aspectFit"></image>
</view>
</view>
<uni-swipe-action class="planout-block-lists">
<uni-swipe-action class="planout-block-lists">
<uni-swipe-action-item v-for="item in 2" :key='item
'>
<uni-swipe-action-item v-for="(item,index) in planinnerLists" :key='index
'>
<view class="middle view planout-block-item">
<view class="middle view planout-block-item">
<view class="text-block title-first">
<view class="text-block title-first">
<text class="middle-date title-first__text">1
</text>
<text class="middle-date title-first__text">{{index+1}}
</text>
</view>
</view>
<view class="text-block
">
<view class="text-block" @click="selectProduct(index,'inner')
">
<text class="middle-date">产品</text>
<text class="middle-date">产品</text>
<view class="middle-date-des uni-list picker-year">
<view class="middle-date-des uni-list picker-year">
<view class="uni-list-cell">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<view class="uni-list-cell-db">
<text class="middle-date-des">请选择
</text>
<text class="middle-date-des">{{item.SHORT_TEXT}}
</text>
</view>
</view>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit">
</image>
</view>
</view>
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">数量(件)</text>
<text class="middle-date">数量(件)</text>
<input class="middle-date-des" type="text" value="" placeholder="请填写" />
<input class="middle-date-des" type="number" :value="item.quantity"
@input="calcInnerTotal($event,item,index)" placeholder="请填写" />
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">单价</text>
<text class="middle-date">单价</text>
<text class="middle-date-des">789
</text>
<text class="middle-date-des">{{item.NET_PRICE}}
</text>
</view>
</view>
<view class="text-block text-block-last">
<view class="text-block text-block-last">
<text class="middle-date">小计</text>
<text class="middle-date">小计</text>
<text class="middle-date-des">789*6*4
</text>
<text class="middle-date-des">{{item.total}}
</text>
</view>
</view>
</view>
</view>
<template v-slot:right>
<template v-slot:right>
<view class="swipe-right-block" @click="handleDel"><text
<view class="swipe-right-block" @click="handleDel(index,'inner')">
class="swipe-right-block__text">删除</text>
<text
class="swipe-right-block__text">删除</text>
</view>
</view>
</template>
</template>
</uni-swipe-action-item>
</uni-swipe-action-item>
</uni-swipe-action>
</uni-swipe-action>
</view>
<view class="bottom-area"></view>
<view class="bottom-area"></view>
<view class="bottom">
<view class="bottom">
...
@@ -69,22 +89,240 @@
...
@@ -69,22 +89,240 @@
</template>
</template>
<script>
<script>
import {
apiUpdateGroupData
} from '@/servers/groupOrder.js'
import {
mapMutations,
mapState
} from 'vuex'
export default {
export default {
data() {
data() {
return {
return {
scrollTop: 0
scrollTop: 0,
mode: 'inner',
typesIndex: 0,
selectedSalePlanTypes: [{
KEY: '22',
VALUE: 'dasd'
}],
planinnerLists: [{
checked: false,
"PRODUCT_ID": "",
"ORDERED_PROD": "",
"DESCRIPTION": "",
"SHORT_TEXT": "",
'NET_PRICE': '',
'NET_VALUE': '',
'quantity': 0,
'total': 0,
'product_info': {},
'salesplan_info': {}
}]
}
},
computed: {
...mapState(['groupOrder']),
intotalComputed() {
let money = 0
this.planinnerLists.forEach((item) => {
money += item.total
})
return money
}
}
},
},
mounted() {
console.log('监听到事件来自 onShow');
let _this = this
uni.$on('selectedProduct', function(data) {
console.log('监听到事件来自 selectedProduct ,携带参数 msg 为:', data);
const fromIndex = data.index * 1
const selectedProduct = data.selectedProduct
_this.mode = data.mode
_this.updateQuotaData(fromIndex, data.mode, selectedProduct);
})
},
onUnload() {
uni.$off('selectedSalePlan')
uni.$off('selectedProduct')
},
methods: {
methods: {
handleDel() {
async updateQuotaData(productIndex, mode, product) {
console.log(1)
console.log('updateQuotaData---entry', productIndex, mode, product)
let productId = ''
let item_inner = []
if (mode === 'inner') {
productId = product.PRODUCT_ID
item_inner = [{
"GUID": "00000000000000000000000000000000",
"HEADER": "00000000000000000000000000000000",
"NUMBER_INT": "0000000010",
"ITM_TYPE": "",
"ZZFLD000029": "",
"ZZFLD000005": '',
"ZZFLD000005_Z1": "",
"ZZFLD000006": "",
"ZZFLD00002Q": "",
"ZZFLD00002Q_Z1": "",
"ORDERED_PROD": productId,
"DESCRIPTION": product.SHORT_TEXT,
"ZZFLD00002S": product.NORMS,
"UNIT": "",
"ZZFLD00002T": "盒",
"QUANTITY": "",
"ZZFLD00002U": "",
"ZZFLD00002W": "",
"ZZFLD000009": "1.00",
"INVENTORY": "",
"ZZFLD00002E": "",
"NET_PRICE": "",
"ZZFLD00002X": "",
"NET_VALUE": "",
"ZZFLD00002Z": "",
"ZZFLD00002A": "",
"ZZFLD00002F": "100%",
"ZZFLD00002G": "",
"ZZFLD00002I": "",
"ZZFLD000007": "",
"ZZFLD000032": "",
"ZZFLD00002O": "",
"ZZFLD000035": "",
"ZZFLD00002B": "",
"ZZFLD000008": "",
"ZZFLD00002P": "",
"CURRENCY": "",
"MODE": "",
"WAREHOUSE": "",
"PRDTYPE": "",
"YEAR": "",
"ZZFLD00002Q_D": ""
}]
}
const params = {
"info": {
"GUID": "00000000000000000000000000000000",
"OBJECT_ID": "",
"PROCESS_TYPE": "ZS02",
"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": "",
"CHANNEL": "",
"DIVISION": "",
"CUST_PRIC_PROC": "",
"TAX_GROUP_BP_01": "",
"ZZFLD00003C": "",
"ZZFLD00009O": 0.00,
"ZZFLD00009Q": 0.00,
"ZHKYE": 0.00
},
"item": item_inner,
}
const res = await apiUpdateGroupData(params)
console.log('updateQuotaData', res)
const {
ITEM
} = res.DATA
if (mode === 'inner') {
this.planinnerLists = this.planinnerLists.map((item, i) => {
if (i === productIndex) {
item = {
...item,
...product,
...ITEM[0]
}
item.product_info = ITEM[0]
}
return item
})
console.log('planinnerLists', this.planinnerLists)
}
},
calcInnerTotal(e, item, i) {
console.log('sss', item, e)
let value = e.target.value
e.target.value = value * 1
this.planinnerLists.forEach((product, index) => {
if (i === index) {
product.quantity = value * 1
product.total = value * item.NET_VALUE * 1 || 0
}
})
// value = `${value}`.replace(/[^0-9]/g, '') // 正则判断只能输入数字
},
handleDel(index, mode = 'inner') {
if (mode === 'inner') {
this.planinnerLists.splice(index, 1)
}
},
selectProduct(index, mode = 'inner') {
this.mode = mode
uni.navigateTo({
url: `/pages/select-product/select-product?from=groupOrder&mode=${mode}&index=${index}`
});
},
addPlanout() {
let product = {
checked: false,
"PRODUCT_ID": "",
"ORDERED_PROD": "",
"DESCRIPTION": "",
"SHORT_TEXT": "",
'NET_PRICE': '',
'NET_VALUE': '',
'quantity': 0,
'total': 0,
'product_info': {},
'salesplan_info': {}
}
this.planinnerLists.unshift(product)
},
bindPickerTypesChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.typesIndex = e.detail.value
},
},
nextStep() {
nextStep() {
let quotaOrder = {
'ITEM_INNER': this.planinnerLists,
'item_outer': [],
'item_d': [],
'attachment': []
}
this.$uStore({
name: 'groupOrder',
value: quotaOrder
});
this.$emit('click', 'orderUpload')
this.$emit('click', 'orderUpload')
},
},
preStep() {
preStep() {
this.$emit('click', 'groupBaseinfo')
this.$emit('click', 'groupBaseinfo')
},
},
...mapMutations(["$uStore"]),
}
}
}
}
</script>
</script>
...
...
pages/select-product/select-product.vue
View file @
1bfc2e7f
...
@@ -73,6 +73,7 @@
...
@@ -73,6 +73,7 @@
const
modeMap
=
{
const
modeMap
=
{
'quotaOrder'
:
'QUOTA'
,
'quotaOrder'
:
'QUOTA'
,
'noQuotaOrder'
:
'NO_QUOTA'
,
'noQuotaOrder'
:
'NO_QUOTA'
,
'groupOrder'
:
'GGTG'
,
}
}
export
default
{
export
default
{
...
@@ -161,12 +162,13 @@
...
@@ -161,12 +162,13 @@
},
},
async
getProduct
()
{
async
getProduct
()
{
const
params
=
{
const
params
=
{
'page'
:
1
,
"PAGE"
:
"1"
,
'pagesize'
:
'10'
,
"PAGESIZE"
:
"10"
,
"MODE"
:
modeMap
[
this
.
toPageParams
.
page
],
"MODE"
:
modeMap
[
this
.
toPageParams
.
page
],
"INFO"
:
{
"INFO"
:
{
"PROCESS_TYPE"
:
"ZS01"
,
"PROCESS_TYPE"
:
"ZS02"
,
"CUSTOMER"
:
"0050000215"
"CUSTOMER"
:
"0050000215"
,
"ZZFLD00002J"
:
"V013"
},
},
"input"
:
{
"input"
:
{
"SHORT_TEXT"
:
this
.
condition
.
product
"SHORT_TEXT"
:
this
.
condition
.
product
...
...
servers/common.js
View file @
1bfc2e7f
...
@@ -54,9 +54,20 @@ export async function apiBusinessSelect(params) {
...
@@ -54,9 +54,20 @@ export async function apiBusinessSelect(params) {
return
res
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
{
export
default
{
apiProductSelect
,
apiProductSelect
,
apiSalesPlanSelect
,
apiSalesPlanSelect
,
apiGroupClientSelect
,
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({
...
@@ -53,6 +53,10 @@ const store = new Vuex.Store({
'item_outer'
:
[],
'item_outer'
:
[],
'item_d'
:
[],
'item_d'
:
[],
'attachment'
:
[]
'attachment'
:
[]
},
groupOrder
:
{
'ITEM'
:
[],
'attachment'
:
[]
}
}
},
},
mutations
:
{
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