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
e396f332
Commit
e396f332
authored
May 23, 2022
by
chuan.liu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
整理配额、非配额、团购下单逻辑
parent
421dd34e
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
587 additions
and
642 deletions
+587
-642
address-manage.nvue
pages/address-manage/address-manage.nvue
+23
-13
group-baseinfo.nvue
pages/group-buy/group-baseinfo.nvue
+89
-17
order-upload.nvue
pages/group-buy/order-upload.nvue
+47
-94
quota-order.nvue
pages/group-buy/quota-order.nvue
+119
-119
order-upload.nvue
pages/no-quota/order-upload.nvue
+42
-93
quota-order.nvue
pages/no-quota/quota-order.nvue
+142
-113
order-upload.nvue
pages/quota/order-upload.nvue
+46
-120
quota-order.nvue
pages/quota/quota-order.nvue
+17
-45
select-business.vue
pages/select-business/select-business.vue
+8
-13
select-group-client.vue
pages/select-group-client/select-group-client.vue
+23
-9
groupOrder.js
servers/groupOrder.js
+11
-0
noQuotaOrder.js
servers/noQuotaOrder.js
+11
-0
index.js
store/index.js
+9
-6
No files found.
pages/address-manage/address-manage.nvue
View file @
e396f332
...
@@ -41,6 +41,13 @@
...
@@ -41,6 +41,13 @@
apiAddressSelect
apiAddressSelect
} from '@/servers/common.js'
} from '@/servers/common.js'
const modeMap = {
'quotaOrder': 'QUOTA',
'noQuotaOrder': 'NO_QUOTA',
'groupOrder': 'GGTG',
'groupBaseInfo': 'GGTG',
}
export default {
export default {
data() {
data() {
...
@@ -50,10 +57,15 @@
...
@@ -50,10 +57,15 @@
'NAME_ORG1': '',
'NAME_ORG1': '',
'C_O_NAME': '',
'C_O_NAME': '',
},
},
page: {
"PAGE": "1",
"PAGESIZE": "10",
},
lists: [],
lists: [],
selectedAddress: {},
selectedAddress: {},
toPageParams: {
toPageParams: {
page: ''
page: '',
head: ""
}
}
}
}
},
},
...
@@ -69,9 +81,11 @@
...
@@ -69,9 +81,11 @@
console.log('select-saleplan', option)
console.log('select-saleplan', option)
if (option && option.from) {
if (option && option.from) {
const {
const {
from
from,
head
} = option
} = option
this.toPageParams.page = from
this.toPageParams.page = from
this.toPageParams.head = JSON.parse(head)
}
}
},
},
created() {
created() {
...
@@ -85,17 +99,13 @@
...
@@ -85,17 +99,13 @@
C_O_NAME
C_O_NAME
} = this.condition
} = this.condition
const params = {
const params = {
"MODE": "GGTG",
...this.page,
"PAGE": "1",
"MODE": modeMap[this.toPageParams.page],
"PAGESIZE": "10",
"INFO": this.toPageParams.head,
"INFO": {
"CUSTOMER": "0050000215",
"GRPUTID": "CVG00000N5C"
},
"INPUT": {
"INPUT": {
"PARTNER": ""
,
PARTNER
,
"NAME_ORG1": ""
,
NAME_ORG1
,
"C_O_NAME": ""
C_O_NAME
}
}
}
}
const res = await apiAddressSelect(params)
const res = await apiAddressSelect(params)
...
@@ -103,7 +113,7 @@
...
@@ -103,7 +113,7 @@
item.checked = false
item.checked = false
return item
return item
})
})
console.log('
ddd2
', res)
console.log('
getAddress
', res)
},
},
handleChecked(item) {
handleChecked(item) {
this.selectedAddress = item
this.selectedAddress = item
...
...
pages/group-buy/group-baseinfo.nvue
View file @
e396f332
...
@@ -80,20 +80,20 @@
...
@@ -80,20 +80,20 @@
</template>
</template>
<script>
<script>
import {
apiInitGroupData,
} from '@/servers/groupOrder.js'
import {
mapMutations,
mapState
} from 'vuex'
export default {
export default {
data() {
data() {
return {
return {
selectedBusiness: {},
selectedBusiness: {},
selectedGroupClient: {
selectedGroupClient: {},
ADDRESS: "中南海",
CITYDESC: "北京市",
DISTRICTDESC: "东城区",
ID: "CVG00000FGI",
OBJNAME: "哈工",
PROVICEDESC: "北京市",
SALESAREADESC: "北京营销战区",
SUBSALESAREADESC: "北京基地"
},
selectedAddress: {},
selectedAddress: {},
condition: {
condition: {
'GRPUTID': '', // 团购单位编码
'GRPUTID': '', // 团购单位编码
...
@@ -114,9 +114,23 @@
...
@@ -114,9 +114,23 @@
key: 1,
key: 1,
value: '是',
value: '是',
}
}
]
],
selectedSalesCenterArr: [{
KEY: -1,
VALUE: ''
}],
planinnerLists: [{
checked: false,
'quantity': 0,
'total': 0,
'product_info': {},
}],
HEADINFO: {},
}
}
},
},
computed: {
...mapState(['groupOrder', 'userInfo']),
},
onBackPress(event) {
onBackPress(event) {
console.log('event', event)
console.log('event', event)
uni.switchTab({
uni.switchTab({
...
@@ -124,29 +138,72 @@
...
@@ -124,29 +138,72 @@
})
})
return false
return false
},
},
created() {
this.initGroupData()
},
mounted() {
mounted() {
console.log('监听到事件来自 update');
console.log('监听到事件来自 update');
let _this = this
let _this = this
uni.$on
ce
('selectedBusiness', function(data) {
uni.$on('selectedBusiness', function(data) {
console.log('监听到事件来自 selectedBusiness ,携带参数 msg 为:', data);
console.log('监听到事件来自 selectedBusiness ,携带参数 msg 为:', data);
_this.selectedBusiness = {
_this.selectedBusiness = {
...data.selectedBusiness
...data.selectedBusiness
}
}
_this.condition.BUSOPPID = data.selectedBusiness.ID
})
})
uni.$on
ce
('selectedGroupClient', function(data) {
uni.$on('selectedGroupClient', function(data) {
console.log('监听到事件来自 selectedGroupClient ,携带参数 msg 为:', data);
console.log('监听到事件来自 selectedGroupClient ,携带参数 msg 为:', data);
const selectedGroupClient = data.selectedGroupClient
_this.selectedGroupClient = {
_this.selectedGroupClient = {
...data.selectedGroupClient
...selectedGroupClient,
INFOTP: data.condition.INFOTP
}
}
_this.HEADINFO.INFOTP = data.condition.INFOTP
_this.HEADINFO.GRPUTID = selectedGroupClient.ID
_this.condition.GRPUTID = selectedGroupClient.ID
})
})
uni.$on
ce
('selectedAddress', function(data) {
uni.$on('selectedAddress', function(data) {
console.log('监听到事件来自 selectedAddress ,携带参数 msg 为:', data);
console.log('监听到事件来自 selectedAddress ,携带参数 msg 为:', data);
const selectedAddress = data.selectedAddress
const {
PARTNER,
IC_O_NAME,
TEL_NUMBER,
STREET
} = selectedAddress
_this.selectedAddress = {
_this.selectedAddress = {
...
data.
selectedAddress
...selectedAddress
}
}
_this.condition.ZZFLD00008T = PARTNER
_this.condition.ZZFLD00002L = IC_O_NAME
_this.condition.ZZFLD00002M = TEL_NUMBER
_this.condition.ZZFLD00002N = STREET
})
})
},
},
onUnload() {
uni.$off('selectedBusiness')
uni.$off('selectedGroupClient')
uni.$off('selectedAddress')
},
methods: {
methods: {
// 初始化订单数据
async initGroupData() {
const params = {
'PARTNER': this.userInfo.customerCode
}
const res = await apiInitGroupData(params)
const {
HEAD,
YXDY,
ITEM
} = res
this.selectedSalesCenterArr = YXDY
this.planinnerLists[0] = {
...this.planinnerLists[0],
...ITEM[0]
}
this.HEADINFO = HEAD
},
bindPickerYearChange(e) {
bindPickerYearChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
console.log('picker发送选择改变,携带值为', e.detail.value)
this.condition.ZZFLD000099 = e.detail.value
this.condition.ZZFLD000099 = e.detail.value
...
@@ -163,10 +220,24 @@
...
@@ -163,10 +220,24 @@
},
},
selectAddress() {
selectAddress() {
uni.navigateTo({
uni.navigateTo({
url: `/pages/address-manage/address-manage?from=groupBaseInfo`
url: `/pages/address-manage/address-manage?from=groupBaseInfo
&head=${JSON.stringify(this.HEADINFO)}
`
});
});
},
},
nextStep() {
nextStep() {
let groupOrder = {
'ITEM': this.planinnerLists,
'ATTACHMENT': [],
'baseinfo': {
'YXDY': this.selectedSalesCenterArr,
...this.condition
},
'INFO': this.HEADINFO,
}
this.$uStore({
name: 'groupOrder',
value: groupOrder
});
console.log('groupBaseInfo', groupOrder)
this.$emit('click', 'quotaOrder')
this.$emit('click', 'quotaOrder')
},
},
preStep() {
preStep() {
...
@@ -174,6 +245,7 @@
...
@@ -174,6 +245,7 @@
url: `/pages/go-order/go-order`
url: `/pages/go-order/go-order`
})
})
},
},
...mapMutations(["$uStore"]),
}
}
}
}
</script>
</script>
...
...
pages/group-buy/order-upload.nvue
View file @
e396f332
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</view>
</view>
<view class="popup-content-content">
<view class="popup-content-content">
<text class="popup-content-content__title">支付成功</text>
<text class="popup-content-content__title">支付成功</text>
<text class="popup-content-content__title2">订单号:{{ order
No
}}</text>
<text class="popup-content-content__title2">订单号:{{ order
Info.OBJECT_ID
}}</text>
</view>
</view>
<view class="popup-content-foot">
<view class="popup-content-foot">
<text class="popup-content-foot__btn" @click="fnBackHome()">回到首页</text>
<text class="popup-content-foot__btn" @click="fnBackHome()">回到首页</text>
...
@@ -48,16 +48,23 @@
...
@@ -48,16 +48,23 @@
apiUpdateGroupOrder
apiUpdateGroupOrder
} from '@/servers/groupOrder.js'
} from '@/servers/groupOrder.js'
import {
mapMutations,
mapState
} from 'vuex'
export default {
export default {
data() {
data() {
return {
return {
orderNo: '',
orderNo: '',
orderInfo: {},
orderInfo: {
OBJECT_ID: ''
},
fileList: [],
fileList: [],
}
}
},
},
computed: {
computed: {
...mapState(['
noQuota
Order']),
...mapState(['
group
Order']),
imageStyles() {
imageStyles() {
return {
return {
width: 64,
width: 64,
...
@@ -70,110 +77,55 @@
...
@@ -70,110 +77,55 @@
},
},
methods: {
methods: {
async updateGroupOrder() {
async updateGroupOrder() {
const {
INFO,
ITEM,
ATTACHMENT
} = this.groupOrder
const params = {
const params = {
"MODE": "SAVE",
"MODE": "SAVE",
"info": {
INFO,
"GUID": "00000000000000000000000000000000",
ITEM,
"OBJECT_ID": "",
ATTACHMENT,
"PROCESS_TYPE": "ZS01",
// "USER_BP": "0081000010",
"CUSTOMER": "0050000215",
// "ROLE": "WLYALL"
"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 res = await apiUpdateGroupOrder(params)
const {
const {
ATTACHMENT,
ATTACHMENT
: ATTACHMENT2
,
HISTORY,
HISTORY,
INFO,
INFO
: INFO2
,
ITEM
ITEM
: ITEM2
} = res.DATA
} = res.DATA
const params2 = {
const params2 = {
"MODE": "SUBMIT",
"MODE": "SUBMIT",
"info": INFO,
"info": INFO
2
,
'ITEM': ITEM,
'ITEM': ITEM
2
,
"attachment": ATTACHMENT,
"attachment": ATTACHMENT
2
,
"USER_BP": "0081000010",
//
"USER_BP": "0081000010",
"ROLE": "WLYALL"
//
"ROLE": "WLYALL"
}
}
const res2 = await apiUpdateGroupOrder(params2)
const res2 = await apiUpdateGroupOrder(params2)
console.log('ddd2', res2)
console.log('apiUpdateGroupOrder', res2)
this.orderInfo = res2
const {
INFO: INFO3,
ITEM: ITEM3,
ATTACHMENT: ATTACHMENT3,
} = res2
this.orderInfo = INFO3
let groupOrder = {
...this.groupOrder,
INFO: INFO3,
ITEM: ITEM_INNER3,
ATTACHMENT: ATTACHMENT3,
}
this.$uStore({
name: 'groupOrder',
value: groupOrder
});
this.$refs.popup.open('center')
this.$refs.popup.open('center')
},
},
change(e) {
change(e) {
...
@@ -212,6 +164,7 @@
...
@@ -212,6 +164,7 @@
preStep() {
preStep() {
this.$emit('click', 'quotaOrder')
this.$emit('click', 'quotaOrder')
},
},
...mapMutations(["$uStore"]),
}
}
}
}
</script>
</script>
...
...
pages/group-buy/quota-order.nvue
View file @
e396f332
...
@@ -10,14 +10,16 @@
...
@@ -10,14 +10,16 @@
</view>
</view>
</view>
</view>
<view class="middle
upload summary
">
<view class="middle
summary upload salescenter
">
<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">
<picker class="picker-block" @change="bindPickerTypesChange" range-key='VALUE' mode="selector"
<picker class="picker-block" @change="bindPickerSalesCenterChange" mode="selector"
:value="typesIndex" :range="selectedSalePlanTypes">
:value="salesCenterIndex" range-key='VALUE' :range="selectedSalesCenterArr">
<view class="uni-input">{{selectedSalePlanTypes[typesIndex].VALUE}}</view>
<view class="uni-input">
{{selectedSalesCenterArr[salesCenterIndex] && selectedSalesCenterArr[salesCenterIndex].VALUE || '请选择'}}
</view>
</picker>
</picker>
</view>
</view>
</view>
</view>
...
@@ -43,7 +45,7 @@
...
@@ -43,7 +45,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">{{item.
SHORT_TEXT
}}</text>
<text class="middle-date-des">{{item.
DESCRIPTION
}}</text>
</view>
</view>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit">
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit">
...
@@ -53,7 +55,8 @@
...
@@ -53,7 +55,8 @@
<view class="text-block">
<view class="text-block">
<text class="middle-date">数量(件)</text>
<text class="middle-date">数量(件)</text>
<input class="middle-date-des" type="number" :value="item.quantity"
<input class="middle-date-des" type="number" :value="item.quantity"
@input="calcInnerTotal($event,item,index)" placeholder="请填写" />
@input="calcInnerTotal($event,item,index)"
@blur="updateQuotaData(index,'inner',item)" placeholder="请填写" />
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">单价</text>
<text class="middle-date">单价</text>
...
@@ -61,7 +64,7 @@
...
@@ -61,7 +64,7 @@
</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">{{item.
total
}}</text>
<text class="middle-date-des">{{item.
NET_VALUE
}}</text>
</view>
</view>
</view>
</view>
<template v-slot:right>
<template v-slot:right>
...
@@ -103,24 +106,16 @@
...
@@ -103,24 +106,16 @@
return {
return {
scrollTop: 0,
scrollTop: 0,
mode: 'inner',
mode: 'inner',
typesIndex: 0,
selectedSalesCenter: {},
selectedSalePlanTypes: [{
salesCenterIndex: -1,
KEY: '22',
VALUE: 'dasd'
}],
planinnerLists: [{
planinnerLists: [{
checked: false,
checked: false,
"PRODUCT_ID": "",
"ORDERED_PROD": "",
"DESCRIPTION": "",
"SHORT_TEXT": "",
'NET_PRICE': '',
'NET_VALUE': '',
'quantity': 0,
'quantity': 0,
'total': 0,
'total': 0,
'product_info': {},
'product_info': {}
'salesplan_info': {}
}],
}]
HEADINFO: {},
productInitInfo: {}
}
}
},
},
computed: {
computed: {
...
@@ -128,9 +123,12 @@
...
@@ -128,9 +123,12 @@
intotalComputed() {
intotalComputed() {
let money = 0
let money = 0
this.planinnerLists.forEach((item) => {
this.planinnerLists.forEach((item) => {
money += item.
total
money += item.
NET_VALUE
})
})
return money
return money
},
selectedSalesCenterArr() {
return this.groupOrder.baseinfo.YXDY
}
}
},
},
mounted() {
mounted() {
...
@@ -143,109 +141,76 @@
...
@@ -143,109 +141,76 @@
const selectedProduct = data.selectedProduct
const selectedProduct = data.selectedProduct
_this.mode = data.mode
_this.mode = data.mode
_this.updateQuotaData(fromIndex, data.mode, selectedProduct);
let product = {}
_this.planinnerLists = _this.planinnerLists.map((item, i) => {
if (i === fromIndex) {
item.product_info = {
...selectedProduct
}
product = {
...item
}
}
return item
})
_this.updateQuotaData(fromIndex, data.mode, product);
})
})
},
},
onUnload() {
onUnload() {
uni.$off('selectedSalePlan')
uni.$off('selectedProduct')
uni.$off('selectedProduct')
},
},
created() {
const {
INFO,
ITEM
} = this.groupOrder
this.HEADINFO = INFO
this.planinnerLists[0] = {
...this.planinnerLists[0],
...ITEM[0]
}
this.productInitInfo = ITEM[0]
},
methods: {
methods: {
async updateQuotaData(productIndex, mode, product) {
async updateQuotaData(productIndex, mode, product) {
console.log('updateQuotaData---entry', productIndex, mode, product)
console.log('updateQuotaData---entry', productIndex, mode, product)
let productId = ''
let item_inner = []
let item_inner = []
let productAfterInit = this.updateProductByInit(productIndex, mode, product)
console.log('productAfterInit', productAfterInit)
if (mode === 'inner') {
if (mode === 'inner') {
productId = product.PRODUCT_ID
item_inner = [productAfterInit]
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 = {
const params = {
"info": {
"info": this.HEADINFO,
"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,
"item": item_inner,
}
}
const res = await apiUpdateGroupData(params)
const res = await apiUpdateGroupData(params)
console.log('updateQuotaData', res)
console.log('updateQuotaData', res)
const {
const {
ITEM
ITEM,
INFO
} = res.DATA
} = res.DATA
// let groupOrder = {
// ...this.groupOrder,
// 'INFO': INFO,
// }
// this.$uStore({
// name: 'groupOrder',
// value: groupOrder
// });
this.HEADINFO = {
...this.HEADINFO,
...INFO
}
if (mode === 'inner') {
if (mode === 'inner') {
this.planinnerLists = this.planinnerLists.map((item, i) => {
this.planinnerLists = this.planinnerLists.map((item, i) => {
if (i === productIndex) {
if (i === productIndex) {
...
@@ -254,15 +219,34 @@
...
@@ -254,15 +219,34 @@
...product,
...product,
...ITEM[0]
...ITEM[0]
}
}
item.product_info = ITEM[0]
}
}
return item
return item
})
})
console.log('planinnerLists', this.planinnerLists)
console.log('planinnerLists', this.planinnerLists
, this.groupOrder
)
}
}
},
},
// 更新选中的产品
updateProductByInit(productIndex, mode, product) {
const {
PRODUCT_ID,
SHORT_TEXT
} = product.product_info
let obj = {}
if (mode === 'inner') {
this.planinnerLists = this.planinnerLists.map((item, i) => {
if (i === productIndex) {
item.ORDERED_PROD = PRODUCT_ID
item.DESCRIPTION = SHORT_TEXT
item.ZZFLD000009 = item.quantity
obj = item
}
return item
})
}
return obj
},
calcInnerTotal(e, item, i) {
calcInnerTotal(e, item, i) {
console.log('sss', item, e)
console.log('sss', item, e)
let value = e.target.value
let value = e.target.value
...
@@ -282,9 +266,17 @@
...
@@ -282,9 +266,17 @@
},
},
selectProduct(index, mode = 'inner') {
selectProduct(index, mode = 'inner') {
this.mode = mode
this.mode = mode
uni.navigateTo({
if (this.salesCenterIndex !== -1) {
url: `/pages/select-product/select-product?from=groupOrder&mode=${mode}&index=${index}`
uni.navigateTo({
});
url: `/pages/select-product/select-product?from=groupOrder&mode=${mode}&index=${index*1}&head=${JSON.stringify(this.HEADINFO)}`
});
} else {
uni.showToast({
title: '请先选择营销中心',
duration: 2000,
icon: 'none'
});
}
},
},
addPlanout() {
addPlanout() {
let product = {
let product = {
...
@@ -298,25 +290,29 @@
...
@@ -298,25 +290,29 @@
'quantity': 0,
'quantity': 0,
'total': 0,
'total': 0,
'product_info': {},
'product_info': {},
'salesplan_info': {}
}
}
this.planinnerLists.unshift(product)
this.planinnerLists.unshift(product)
},
},
bindPickerTypesChange(e) {
// 选择营销中心
bindPickerSalesCenterChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
console.log('picker发送选择改变,携带值为', e.detail.value)
this.typesIndex = e.detail.value
this.salesCenterIndex = e.detail.value
this.selectedSalesCenter = this.selectedSalesCenterArr[this.salesCenterIndex]
this.HEADINFO.ZZFLD000001 = this.selectedSalesCenter.KEY
},
},
nextStep() {
nextStep() {
let
quota
Order = {
let
group
Order = {
'ITEM_INNER': this.planinnerLists
,
"baseinfo": this.groupOrder.baseinfo
,
'
item_outer': []
,
'
ITEM': this.planinnerLists
,
'
item_d
': [],
'
ATTACHMENT
': [],
'
attachment': []
'
INFO': this.HEADINFO,
}
}
this.$uStore({
this.$uStore({
name: 'groupOrder',
name: 'groupOrder',
value:
quota
Order
value:
group
Order
});
});
console.log('groupBaseInfo', groupOrder)
this.$emit('click', 'orderUpload')
this.$emit('click', 'orderUpload')
},
},
preStep() {
preStep() {
...
@@ -440,6 +436,10 @@
...
@@ -440,6 +436,10 @@
justify-content: space-between;
justify-content: space-between;
}
}
.salescenter {
height: 100rpx;
}
.icon_plan {
.icon_plan {
width: 36rpx;
width: 36rpx;
height: 36rpx;
height: 36rpx;
...
...
pages/no-quota/order-upload.nvue
View file @
e396f332
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</view>
</view>
<view class="popup-content-content">
<view class="popup-content-content">
<text class="popup-content-content__title">提交成功</text>
<text class="popup-content-content__title">提交成功</text>
<text class="popup-content-content__title2">订单号:{{ order
No
}}</text>
<text class="popup-content-content__title2">订单号:{{ order
Info.OBJECT_ID
}}</text>
</view>
</view>
<view class="popup-content-foot">
<view class="popup-content-foot">
<text class="popup-content-foot__btn" @click="fnBackHome()">回到首页</text>
<text class="popup-content-foot__btn" @click="fnBackHome()">回到首页</text>
...
@@ -57,7 +57,9 @@
...
@@ -57,7 +57,9 @@
data() {
data() {
return {
return {
orderNo: '',
orderNo: '',
orderInfo: {},
orderInfo: {
OBJECT_ID: ''
},
fileList: [],
fileList: [],
}
}
},
},
...
@@ -75,110 +77,54 @@
...
@@ -75,110 +77,54 @@
},
},
methods: {
methods: {
async updateQuotaOrder() {
async updateQuotaOrder() {
const {
INFO,
ITEM,
ATTACHMENT
} = this.noQuotaOrder
const params = {
const params = {
"MODE": "SAVE",
"MODE": "SAVE",
"info": {
INFO,
"GUID": "00000000000000000000000000000000",
ITEM,
"OBJECT_ID": "",
// "item_d": [],
"PROCESS_TYPE": "ZS01",
// "USE": [],
"CUSTOMER": "0050000215",
ATTACHMENT
"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": ""
}],
"item_d": [],
"USE": [],
"attachment": []
}
}
const res = await apiUpdateNoQuotaOrder(params)
const res = await apiUpdateNoQuotaOrder(params)
const {
const {
ATTACHMENT,
ATTACHMENT
: ATTACHMENT2
,
HISTORY,
HISTORY,
INFO,
INFO
: INFO2
,
ITEM
ITEM
: ITEM2
} = res.DATA
} = res.DATA
const params2 = {
const params2 = {
"USER_BP": "81000010",
//
"USER_BP": "81000010",
"MODE": "SUBMIT",
"MODE": "SUBMIT",
"info": INFO,
"info": INFO
2
,
'ITEM': ITEM,
'ITEM': ITEM
2
,
"item_d": [],
//
"item_d": [],
"attachment": ATTACHMENT
"attachment": ATTACHMENT
2
}
}
const res2 = await apiUpdateNoQuotaOrder(params2)
const res2 = await apiUpdateNoQuotaOrder(params2)
console.log('ddd2', res2)
console.log('updateQuotaOrder', res2)
this.orderInfo = res2
const {
INFO: INFO3,
ITEM: ITEM3,
ATTACHMENT: ATTACHMENT3,
} = res2
this.orderInfo = INFO3
let noQuotaOrder = {
INFO: INFO3,
ITEM: ITEM3,
ATTACHMENT: ATTACHMENT3,
}
this.$uStore({
name: 'noQuotaOrder',
value: noQuotaOrder
});
this.$refs.popup.open('center')
this.$refs.popup.open('center')
},
},
change(e) {
change(e) {
...
@@ -209,6 +155,9 @@
...
@@ -209,6 +155,9 @@
}, 300)
}, 300)
},
},
fnCheckOrderByNo() {
fnCheckOrderByNo() {
// uni.navigateTo({
// url:'/pages/home/home'
// })
this.$refs.popup.close()
this.$refs.popup.close()
},
},
submit() {
submit() {
...
...
pages/no-quota/quota-order.nvue
View file @
e396f332
...
@@ -10,6 +10,23 @@
...
@@ -10,6 +10,23 @@
</view>
</view>
</view>
</view>
<view class="middle summary 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='VALUE' :range="selectedSalesCenterArr">
<view class="uni-input">
{{selectedSalesCenterArr[salesCenterIndex] && selectedSalesCenterArr[salesCenterIndex].VALUE || '请选择'}}
</view>
</picker>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</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="view">
<view class="planout-block">
<view class="planout-block">
...
@@ -28,7 +45,7 @@
...
@@ -28,7 +45,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">{{item.
SHORT_TEXT
}}</text>
<text class="middle-date-des">{{item.
DESCRIPTION
}}</text>
</view>
</view>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit">
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit">
...
@@ -38,7 +55,8 @@
...
@@ -38,7 +55,8 @@
<view class="text-block">
<view class="text-block">
<text class="middle-date">数量(件)</text>
<text class="middle-date">数量(件)</text>
<input class="middle-date-des" type="number" :value="item.quantity"
<input class="middle-date-des" type="number" :value="item.quantity"
@input="calcInnerTotal($event,item,index)" placeholder="请填写" />
@input="calcInnerTotal($event,item,index)"
@blur="updateNoQuotaData(index,'inner',item)" placeholder="请填写" />
</view>
</view>
<view class="text-block">
<view class="text-block">
<text class="middle-date">单价</text>
<text class="middle-date">单价</text>
...
@@ -46,7 +64,7 @@
...
@@ -46,7 +64,7 @@
</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">{{item.
total
}}</text>
<text class="middle-date-des">{{item.
NET_VALUE
}}</text>
</view>
</view>
</view>
</view>
<template v-slot:right>
<template v-slot:right>
...
@@ -75,6 +93,7 @@
...
@@ -75,6 +93,7 @@
<script>
<script>
import {
import {
apiInitNoQuotaData,
apiUpdateNoQuotaData
apiUpdateNoQuotaData
} from '@/servers/noQuotaOrder.js'
} from '@/servers/noQuotaOrder.js'
...
@@ -88,31 +107,35 @@
...
@@ -88,31 +107,35 @@
return {
return {
scrollTop: 0,
scrollTop: 0,
mode: 'inner',
mode: 'inner',
typesIndex: 0,
selectedSalesCenterArr: [{
KEY: -1,
VALUE: ''
}],
selectedSalesCenter: {},
salesCenterIndex: -1,
planinnerLists: [{
planinnerLists: [{
checked: false,
checked: false,
"PRODUCT_ID": "",
"ORDERED_PROD": "",
"DESCRIPTION": "",
"SHORT_TEXT": "",
'NET_PRICE': '',
'NET_VALUE': '',
'quantity': 0,
'quantity': 0,
'total': 0,
'total': 0,
'product_info': {}
'product_info': {},
}]
}],
HEADINFO: {},
productInitInfo: {}
}
}
},
},
computed: {
computed: {
...mapState(['
quotaOrder
']),
...mapState(['
noQuotaOrder', 'userInfo
']),
intotalComputed() {
intotalComputed() {
let money = 0
let money = 0
this.planinnerLists.forEach((item) => {
this.planinnerLists.forEach((item) => {
money += item.
total
money += item.
NET_VALUE
})
})
return money
return money
}
}
},
},
created() {
this.initNoQuotaData()
},
mounted() {
mounted() {
console.log('监听到事件来自 onShow');
console.log('监听到事件来自 onShow');
let _this = this
let _this = this
...
@@ -123,109 +146,79 @@
...
@@ -123,109 +146,79 @@
const selectedProduct = data.selectedProduct
const selectedProduct = data.selectedProduct
_this.mode = data.mode
_this.mode = data.mode
_this.updateQuotaData(fromIndex, data.mode, selectedProduct);
let product = {}
_this.planinnerLists = _this.planinnerLists.map((item, i) => {
if (i === fromIndex) {
item.product_info = {
...selectedProduct
}
product = {
...item
}
}
return item
})
_this.updateNoQuotaData(fromIndex, data.mode, product);
})
})
},
},
onUnload() {
onUnload() {
uni.$off('selectedSalePlan')
uni.$off('selectedProduct')
uni.$off('selectedProduct')
},
},
methods: {
methods: {
async updateQuotaData(productIndex, mode, product) {
// 初始化订单数据
console.log('updateQuotaData---entry', productIndex, mode, product)
async initNoQuotaData() {
let productId = ''
const params = {
'PARTNER': this.userInfo.customerCode
}
const res = await apiInitNoQuotaData(params)
const {
HEAD,
YXDY,
ITEM
} = res
this.selectedSalesCenterArr = YXDY
this.planinnerLists[0] = {
...this.planinnerLists[0],
...ITEM[0]
}
this.HEADINFO = HEAD
this.productInitInfo = ITEM[0]
},
async updateNoQuotaData(productIndex, mode, product) {
console.log('updateNoQuotaData---entry', productIndex, mode, product)
let item_inner = []
let item_inner = []
let productAfterInit = this.updateProductByInit(productIndex, mode, product)
console.log('productAfterInit', productAfterInit)
// 产品编号和件数 都有才请求
if (!(productAfterInit?.product_info?.PRODUCT_ID &&
productAfterInit?.ZZFLD000009)) {
return
}
if (mode === 'inner') {
if (mode === 'inner') {
productId = product.PRODUCT_ID
item_inner = [productAfterInit]
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 = {
const params = {
"info": {
"info": this.HEADINFO,
"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,
"item": item_inner,
}
}
const res = await apiUpdateNoQuotaData(params)
const res = await apiUpdateNoQuotaData(params)
console.log('updateQuotaData', res)
console.log('update
No
QuotaData', res)
const {
const {
ITEM
ITEM,
INFO,
} = res.DATA
} = res.DATA
this.HEADINFO = {
...this.HEADINFO,
...INFO
}
if (mode === 'inner') {
if (mode === 'inner') {
this.planinnerLists = this.planinnerLists.map((item, i) => {
this.planinnerLists = this.planinnerLists.map((item, i) => {
if (i === productIndex) {
if (i === productIndex) {
...
@@ -234,7 +227,7 @@
...
@@ -234,7 +227,7 @@
...product,
...product,
...ITEM[0]
...ITEM[0]
}
}
item.product_info = ITEM[0]
//
item.product_info = ITEM[0]
}
}
return item
return item
})
})
...
@@ -243,6 +236,26 @@
...
@@ -243,6 +236,26 @@
}
}
},
},
// 更新选中的产品
updateProductByInit(productIndex, mode, product) {
const {
PRODUCT_ID,
SHORT_TEXT
} = product.product_info
let obj = {}
if (mode === 'inner') {
this.planinnerLists = this.planinnerLists.map((item, i) => {
if (i === productIndex) {
item.ORDERED_PROD = PRODUCT_ID
item.DESCRIPTION = SHORT_TEXT
item.ZZFLD000009 = item.quantity
obj = item
}
return item
})
}
return obj
},
calcInnerTotal(e, item, i) {
calcInnerTotal(e, item, i) {
console.log('sss', item, e)
console.log('sss', item, e)
let value = e.target.value
let value = e.target.value
...
@@ -262,9 +275,18 @@
...
@@ -262,9 +275,18 @@
},
},
selectProduct(index, mode = 'inner') {
selectProduct(index, mode = 'inner') {
this.mode = mode
this.mode = mode
uni.navigateTo({
if (this.salesCenterIndex !== -1) {
url: `/pages/select-product/select-product?from=noQuotaOrder&mode=${mode}&index=${index}`
uni.navigateTo({
});
url: `/pages/select-product/select-product?from=noQuotaOrder&mode=${mode}&index=${index*1}&head=${JSON.stringify(this.HEADINFO)}`
});
} else {
uni.showToast({
title: '请先选择营销中心',
duration: 2000,
icon: 'none'
});
}
},
},
addPlanout() {
addPlanout() {
let product = {
let product = {
...
@@ -277,26 +299,29 @@
...
@@ -277,26 +299,29 @@
'NET_VALUE': '',
'NET_VALUE': '',
'quantity': 0,
'quantity': 0,
'total': 0,
'total': 0,
'product_info': {},
'product_info': {}
'salesplan_info': {}
}
}
this.planinnerLists.unshift(product)
this.planinnerLists.unshift(product)
},
},
bindPickerTypesChange(e) {
// 选择营销中心
bindPickerSalesCenterChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
console.log('picker发送选择改变,携带值为', e.detail.value)
this.typesIndex = e.detail.value
this.salesCenterIndex = e.detail.value
this.selectedSalesCenter = this.selectedSalesCenterArr[this.salesCenterIndex]
this.HEADINFO.ZZFLD000001 = this.selectedSalesCenter.KEY
},
},
nextStep() {
nextStep() {
let quotaOrder = {
let noQuotaOrder = {
'ITEM_INNER': this.planinnerLists,
'ITEM': this.planinnerLists,
'item_outer': [],
'item_d': [],
'item_d': [],
'attachment': []
'ATTACHMENT': [],
'INFO': this.HEADINFO,
}
}
this.$uStore({
this.$uStore({
name: 'noQuotaOrder',
name: 'noQuotaOrder',
value:
q
uotaOrder
value:
noQ
uotaOrder
});
});
console.log('noQuotaOrder', noQuotaOrder)
this.$emit('click', 'orderUpload')
this.$emit('click', 'orderUpload')
},
},
preStep() {
preStep() {
...
@@ -422,6 +447,10 @@
...
@@ -422,6 +447,10 @@
justify-content: space-between;
justify-content: space-between;
}
}
.salescenter {
height: 100rpx;
}
.icon_plan {
.icon_plan {
width: 36rpx;
width: 36rpx;
height: 36rpx;
height: 36rpx;
...
...
pages/quota/order-upload.nvue
View file @
e396f332
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
</view>
</view>
<view class="popup-content-content">
<view class="popup-content-content">
<text class="popup-content-content__title">提交成功</text>
<text class="popup-content-content__title">提交成功</text>
<text class="popup-content-content__title2">订单号:{{ order
No
}}</text>
<text class="popup-content-content__title2">订单号:{{ order
Info.OBJECT_ID
}}</text>
</view>
</view>
<view class="popup-content-foot">
<view class="popup-content-foot">
<text class="popup-content-foot__btn" @click="fnBackHome()">回到首页</text>
<text class="popup-content-foot__btn" @click="fnBackHome()">回到首页</text>
...
@@ -57,7 +57,9 @@
...
@@ -57,7 +57,9 @@
data() {
data() {
return {
return {
orderNo: '',
orderNo: '',
orderInfo: {},
orderInfo: {
OBJECT_ID: ''
},
fileList: [],
fileList: [],
}
}
},
},
...
@@ -75,138 +77,62 @@
...
@@ -75,138 +77,62 @@
},
},
methods: {
methods: {
async updateQuotaOrder() {
async updateQuotaOrder() {
const {
INFO,
ITEM_INNER,
ITEM_OUTER,
ATTACHMENT
} = this.quotaOrder
const params = {
const params = {
"USER_BP": "81000010",
//
"USER_BP": "81000010",
"MODE": "SAVE",
"MODE": "SAVE",
"info": {
INFO,
"GUID": "00000000000000000000000000000000",
ITEM_INNER,
"OBJECT_ID": "",
ITEM_OUTER,
"PROCESS_TYPE": "ZS01",
// "item_d": [],
"CUSTOMER": "0050000215",
// "USE": [],
"CUST_NAME": "崇州顺辰商贸有限公司",
ATTACHMENT
"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_INNER': [{
"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": ""
}],
"item_outer": [],
"item_d": [],
"USE": [{
"CLIENT": "",
"RECORD_ID": "00000000000000000000000000000000",
"PARENT_ID": "00000000000000000000000000000000",
"OBJECT_ID": "00000000000000000000000000000000",
"ZZFLD00000C": "3800000826",
"ZZFLD00000D": "V001",
"ZZFLD00000E": "0102",
"ZZFLD00000F": "2022",
"ZZFLD00000G": "04",
"ZZFLD00000H": 10.00,
"ZZFLD00000I": "",
"ZZFLD00000J": 10.00,
"ZZFLD00000K": "",
"ZZFLD00000L": 1.00,
"ZZFLD00000M": "",
"ZZFLD00000N": 0.00,
"ZZFLD00000O": "",
"ZZFLD00000P": 9.00,
"ZZFLD00000Q": "",
"ZZFLD00000R": 1.00,
"ZZFLD00000S": ""
}],
"attachment": []
}
}
const res = await apiUpdateQuotaOrder(params)
const res = await apiUpdateQuotaOrder(params)
const {
const {
ATTACHMENT,
ATTACHMENT
: ATTACHMENT2
,
HISTORY,
HISTORY,
INFO,
INFO
: INFO2
,
ITEM_INNER,
ITEM_INNER
: ITEM_INNER2
,
ITEM_OUTER,
ITEM_OUTER
: ITEM_OUTER2
,
USE
USE
} = res.DATA
} = res.DATA
const params2 = {
const params2 = {
"USER_BP": "81000010",
//
"USER_BP": "81000010",
"MODE": "SUBMIT",
"MODE": "SUBMIT",
"info": INFO
,
INFO: INFO2
,
'ITEM_INNER': ITEM_INNER,
'ITEM_INNER': ITEM_INNER
2
,
"
item_outer": ITEM_OUTER
,
"
ITEM_OUTER": ITEM_OUTER2
,
"item_d": [],
//
"item_d": [],
"USE": USE,
//
"USE": USE,
"
attachment": ATTACHMENT
"
ATTACHMENT": ATTACHMENT2
}
}
const res2 = await apiUpdateQuotaOrder(params2)
const res2 = await apiUpdateQuotaOrder(params2)
console.log('ddd2', res2)
console.log('updateQuotaOrder', res2)
this.orderInfo = res2
const {
INFO: INFO3,
ITEM_INNER: ITEM_INNER3,
ITEM_OUTER: ITEM_OUTER3,
ATTACHMENT: ATTACHMENT3,
} = res2
this.orderInfo = INFO3
let quotaOrder = {
INFO: INFO3,
ITEM_INNER: ITEM_INNER3,
ITEM_OUTER: ITEM_OUTER3,
ATTACHMENT: ATTACHMENT3,
}
this.$uStore({
name: 'quotaOrder',
value: quotaOrder
});
this.$refs.popup.open('center')
this.$refs.popup.open('center')
},
},
change(e) {
change(e) {
...
...
pages/quota/quota-order.nvue
View file @
e396f332
...
@@ -77,7 +77,7 @@
...
@@ -77,7 +77,7 @@
</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">{{item.
total
}}</text>
<text class="middle-date-des">{{item.
NET_VALUE
}}</text>
</view>
</view>
</view>
</view>
<template v-slot:right>
<template v-slot:right>
...
@@ -109,7 +109,7 @@
...
@@ -109,7 +109,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">{{item.
SHORT_TEXT
}}</text>
<text class="middle-date-des">{{item.
DESCRIPTION
}}</text>
</view>
</view>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit">
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit">
...
@@ -139,41 +139,6 @@
...
@@ -139,41 +139,6 @@
</uni-swipe-action-item>
</uni-swipe-action-item>
</uni-swipe-action>
</uni-swipe-action>
<!-- <view class="text-block" @click="selectProduct(-1)">
<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">
<text class="middle-date-des">{{selectedProductInner.DESCRIPTION}}</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view>
<view class="text-block" @click="selectPlanOrder">
<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">
<text class="middle-date-des">{{selectedSalePlan.PLAN_NUMBER}}</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view>
<view class="text-block">
<text class="middle-date">数量(件)</text>
<input class="middle-date-des" type="number" :value="selectedProductInner.quantity"
@input="calcInnerTotal($event,selectedProductInner)" placeholder="请填写" />
</view>
<view class="text-block">
<text class="middle-date">单价</text>
<text class="middle-date-des">{{selectedProductInner.NET_PRICE}}</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date">小计</text>
<text class="middle-date-des">{{selectedProductInner.total}}</text>
</view> -->
</view>
</view>
<view class="bottom-area"></view>
<view class="bottom-area"></view>
...
@@ -229,10 +194,10 @@
...
@@ -229,10 +194,10 @@
intotalComputed() {
intotalComputed() {
let money = 0
let money = 0
this.planinnerLists.forEach((item) => {
this.planinnerLists.forEach((item) => {
money += item.
total
money += item.
NET_VALUE
})
})
this.planoutLists.forEach((item) => {
this.planoutLists.forEach((item) => {
money += item.
total
money += item.
NET_VALUE
})
})
return money
return money
}
}
...
@@ -314,14 +279,13 @@
...
@@ -314,14 +279,13 @@
async updateQuotaData(productIndex, mode, product) {
async updateQuotaData(productIndex, mode, product) {
console.log('updateQuotaData---entry', productIndex, mode, product)
console.log('updateQuotaData---entry', productIndex, mode, product)
let productId = ''
let item_type = ''
let item_type = ''
let item_inner = []
let item_inner = []
let item_outer = []
let item_outer = []
let productAfterInit = this.updateProductByInit(productIndex, mode, product)
let productAfterInit = this.updateProductByInit(productIndex, mode, product)
console.log('
2222
', productAfterInit)
console.log('
productAfterInit
', productAfterInit)
// 销售计划编号、产品编号和件数 都有才请求
// 销售计划编号、产品编号和件数 都有才请求
if (!(productAfterInit?.product_info?.PRODUCT_ID && productAfterInit?.salesplan_info?.PLAN_NUMBER &&
if (!(productAfterInit?.product_info?.PRODUCT_ID && productAfterInit?.salesplan_info?.PLAN_NUMBER &&
...
@@ -349,8 +313,14 @@
...
@@ -349,8 +313,14 @@
console.log('updateQuotaData', res)
console.log('updateQuotaData', res)
const {
const {
ITEM_INNER,
ITEM_INNER,
ITEM_OUTER
ITEM_OUTER,
INFO
} = res.DATA
} = res.DATA
this.HEADINFO = {
...this.HEADINFO,
...INFO
}
if (mode === 'inner') {
if (mode === 'inner') {
this.planinnerLists = this.planinnerLists.map((item, i) => {
this.planinnerLists = this.planinnerLists.map((item, i) => {
if (i === productIndex) {
if (i === productIndex) {
...
@@ -359,7 +329,7 @@
...
@@ -359,7 +329,7 @@
...product,
...product,
...ITEM_INNER[0]
...ITEM_INNER[0]
}
}
item.product_info = ITEM_INNER[0]
//
item.product_info = ITEM_INNER[0]
}
}
return item
return item
})
})
...
@@ -524,14 +494,16 @@
...
@@ -524,14 +494,16 @@
nextStep() {
nextStep() {
let quotaOrder = {
let quotaOrder = {
'ITEM_INNER': this.planinnerLists,
'ITEM_INNER': this.planinnerLists,
'
item_outer
': this.planoutLists,
'
ITEM_OUTER
': this.planoutLists,
'item_d': [],
'item_d': [],
'attachment': []
'ATTACHMENT': [],
'INFO': this.HEADINFO,
}
}
this.$uStore({
this.$uStore({
name: 'quotaOrder',
name: 'quotaOrder',
value: quotaOrder
value: quotaOrder
});
});
console.log('quotaOrder', quotaOrder)
this.$emit('click', 'orderUpload')
this.$emit('click', 'orderUpload')
},
},
preStep() {
preStep() {
...
...
pages/select-business/select-business.vue
View file @
e396f332
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<view
class=
"status_bar"
:style=
"navHeight"
></view>
<view
class=
"status_bar"
:style=
"navHeight"
></view>
<view
class=
"header-bg"
></view>
<view
class=
"header-bg"
></view>
<view
class=
"main"
>
<view
class=
"main"
>
<view
class=
"middle view
planout-block-item
"
>
<view
class=
"middle 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-model=
"condition.BUNAME"
placeholder=
"请填写"
/>
<input
class=
"middle-date-des"
type=
"text"
v-model=
"condition.BUNAME"
placeholder=
"请填写"
/>
...
@@ -83,18 +83,13 @@
...
@@ -83,18 +83,13 @@
OWNERCODE
:
''
,
OWNERCODE
:
''
,
CUNAME
:
''
CUNAME
:
''
},
},
page
:
{
"PAGE"
:
"1"
,
"PAGESIZE"
:
"10"
,
},
lists
:
[],
lists
:
[],
selectedBusiness
:
{},
selectedBusiness
:
{},
selectedGroupClient
:
{
selectedGroupClient
:
{},
ADDRESS
:
"中南海"
,
CITYDESC
:
"北京市"
,
DISTRICTDESC
:
"东城区"
,
ID
:
"CVG00000FGI"
,
OBJNAME
:
"哈工"
,
PROVICEDESC
:
"北京市"
,
SALESAREADESC
:
"北京营销战区"
,
SUBSALESAREADESC
:
"北京基地"
},
toPageParams
:
{
toPageParams
:
{
page
:
''
page
:
''
}
}
...
@@ -167,8 +162,7 @@
...
@@ -167,8 +162,7 @@
CUNAME
CUNAME
}
=
this
.
condition
}
=
this
.
condition
const
params
=
{
const
params
=
{
'page'
:
1
,
...
this
.
page
,
'pagesize'
:
'10'
,
"input"
:
{
"input"
:
{
BUNAME
:
''
,
BUNAME
:
''
,
OWNERCODE
:
''
,
OWNERCODE
:
''
,
...
@@ -239,6 +233,7 @@
...
@@ -239,6 +233,7 @@
overflow-y
:
scroll
;
overflow-y
:
scroll
;
background
:
#f0f4f5
;
background
:
#f0f4f5
;
overflow-x
:
hidden
;
overflow-x
:
hidden
;
height
:
100%
;
}
}
.main
{
.main
{
...
...
pages/select-group-client/select-group-client.vue
View file @
e396f332
...
@@ -3,7 +3,7 @@
...
@@ -3,7 +3,7 @@
<view
class=
"status_bar"
:style=
"navHeight"
></view>
<view
class=
"status_bar"
:style=
"navHeight"
></view>
<view
class=
"header-bg"
></view>
<view
class=
"header-bg"
></view>
<view
class=
"main"
>
<view
class=
"main"
>
<view
class=
"middle view
planout-block-item
"
>
<view
class=
"middle view"
>
<view
class=
"text-block"
>
<view
class=
"text-block"
>
<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"
>
...
@@ -80,15 +80,28 @@
...
@@ -80,15 +80,28 @@
'INFOTP'
:
''
,
'INFOTP'
:
''
,
'COMPANY_NAME'
:
''
'COMPANY_NAME'
:
''
},
},
page
:
{
"PAGE"
:
"1"
,
"PAGESIZE"
:
"10"
,
},
lists
:
[],
lists
:
[],
selectedGroupClient
:
{},
selectedGroupClient
:
{},
selectedSalePlanTypes
:
[{
selectedSalePlanTypes
:
[{
KEY
:
'2'
,
KEY
:
''
,
VALUE
:
'ddd'
VALUE
:
'无'
}],
},
{
KEY
:
'个人'
,
VALUE
:
'个人'
},
{
KEY
:
'单位'
,
VALUE
:
'单位'
}
],
typesIndex
:
0
,
typesIndex
:
0
,
toPageParams
:
{
toPageParams
:
{
page
:
''
page
:
''
,
head
:
{}
}
}
}
}
},
},
...
@@ -105,7 +118,8 @@
...
@@ -105,7 +118,8 @@
// console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedGroupClient);
// console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedGroupClient);
if
(
this
.
isOpened
===
'left'
&&
this
.
selectedGroupClient
&&
this
.
selectedGroupClient
.
ID
)
{
if
(
this
.
isOpened
===
'left'
&&
this
.
selectedGroupClient
&&
this
.
selectedGroupClient
.
ID
)
{
uni
.
$emit
(
'selectedGroupClient'
,
{
uni
.
$emit
(
'selectedGroupClient'
,
{
selectedGroupClient
:
this
.
selectedGroupClient
selectedGroupClient
:
this
.
selectedGroupClient
,
condition
:
this
.
condition
})
})
uni
.
navigateBack
({})
uni
.
navigateBack
({})
return
return
...
@@ -148,8 +162,7 @@
...
@@ -148,8 +162,7 @@
COMPANY_NAME
COMPANY_NAME
}
=
this
.
condition
}
=
this
.
condition
const
params
=
{
const
params
=
{
'page'
:
1
,
...
this
.
page
,
'pagesize'
:
'10'
,
"input"
:
{
"input"
:
{
INFOTP
,
INFOTP
,
COMPANY_NAME
COMPANY_NAME
...
@@ -168,7 +181,8 @@
...
@@ -168,7 +181,8 @@
// console.log('getSalesPlanTypes', res)
// console.log('getSalesPlanTypes', res)
// },
// },
search
()
{
search
()
{
this
.
page
.
PAGE
=
1
this
.
getGroupClient
()
},
},
bindPickerTypesChange
(
e
)
{
bindPickerTypesChange
(
e
)
{
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
)
console
.
log
(
'picker发送选择改变,携带值为'
,
e
.
detail
.
value
)
...
...
servers/groupOrder.js
View file @
e396f332
import
apiHelper
from
'./api.helper.js'
import
apiHelper
from
'./api.helper.js'
/**
* 公关团购销售订单初始化数据
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiInitGroupData
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/so_ggtg_init'
,
params
)
return
res
}
/**
/**
* 销售订单行项目选择或修改后进行页面数据更新
* 销售订单行项目选择或修改后进行页面数据更新
* @param
* @param
...
@@ -21,6 +31,7 @@ export async function apiUpdateGroupOrder(params) {
...
@@ -21,6 +31,7 @@ export async function apiUpdateGroupOrder(params) {
}
}
export
default
{
export
default
{
apiInitGroupData
,
apiUpdateGroupData
,
apiUpdateGroupData
,
apiUpdateGroupOrder
apiUpdateGroupOrder
}
}
servers/noQuotaOrder.js
View file @
e396f332
import
apiHelper
from
'./api.helper.js'
import
apiHelper
from
'./api.helper.js'
/**
* 非配额酒销售订单初始化数据
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export
async
function
apiInitNoQuotaData
(
params
)
{
const
res
=
await
apiHelper
.
post
(
'/sap/bc/ztpm/to_new_crm/transdata/so_noquota_init'
,
params
)
return
res
}
/**
/**
* 销售订单行项目选择或修改后进行页面数据更新
* 销售订单行项目选择或修改后进行页面数据更新
* @param
* @param
...
@@ -21,6 +31,7 @@ export async function apiUpdateNoQuotaOrder(params) {
...
@@ -21,6 +31,7 @@ export async function apiUpdateNoQuotaOrder(params) {
}
}
export
default
{
export
default
{
apiInitNoQuotaData
,
apiUpdateNoQuotaData
,
apiUpdateNoQuotaData
,
apiUpdateNoQuotaOrder
apiUpdateNoQuotaOrder
}
}
store/index.js
View file @
e396f332
...
@@ -45,19 +45,22 @@ const store = new Vuex.Store({
...
@@ -45,19 +45,22 @@ const store = new Vuex.Store({
},
},
quotaOrder
:
{
quotaOrder
:
{
'ITEM_INNER'
:
[],
'ITEM_INNER'
:
[],
'
item_outer
'
:
[],
'
ITEM_OUTER
'
:
[],
'item_d'
:
[],
'item_d'
:
[],
'attachment'
:
[]
'ATTACHMENT'
:
[],
'INFO'
:
{}
},
},
noQuotaOrder
:
{
noQuotaOrder
:
{
'ITEM_INNER'
:
[],
'ITEM'
:
[],
'item_outer'
:
[],
'item_d'
:
[],
'item_d'
:
[],
'attachment'
:
[]
'ATTACHMENT'
:
[],
'INFO'
:
{}
},
},
groupOrder
:
{
groupOrder
:
{
'ITEM'
:
[],
'ITEM'
:
[],
'attachment'
:
[]
'ATTACHMENT'
:
[],
'INFO'
:
{},
'baseinfo'
:
{}
}
}
},
},
mutations
:
{
mutations
:
{
...
...
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