Commit f9e98733 authored by chuan.liu's avatar chuan.liu

非配额订单下单 mock数据联调

parent 5385314a
......@@ -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>
......@@ -29,7 +30,7 @@
<image class="popup-content-head__icon" src="@/static/image/icon_plan@3x.png" mode=""></image>
</view>
<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">订单号:{{ orderNo }}</text>
</view>
<view class="popup-content-foot">
......@@ -43,15 +44,26 @@
</template>
<script>
import {
apiUpdateNoQuotaOrder
} from '@/servers/noQuotaOrder.js'
import {
mapMutations,
mapState
} from 'vuex'
export default {
data() {
return {
orderNo: '',
orderInfo: {},
fileList: [],
}
},
computed:{
imageStyles(){
computed: {
...mapState(['noQuotaOrder']),
imageStyles() {
return {
width: 64,
height: 64,
......@@ -62,6 +74,113 @@
},
},
methods: {
async updateQuotaOrder() {
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": ""
}],
"item_d": [],
"USE": [],
"attachment": []
}
const res = await apiUpdateNoQuotaOrder(params)
const {
ATTACHMENT,
HISTORY,
INFO,
ITEM
} = res.DATA
const params2 = {
"USER_BP": "81000010",
"MODE": "SUBMIT",
"info": INFO,
'ITEM': ITEM,
"item_d": [],
"attachment": ATTACHMENT
}
const res2 = await apiUpdateNoQuotaOrder(params2)
console.log('ddd2', res2)
this.orderInfo = res2
this.$refs.popup.open('center')
},
change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show);
},
......@@ -71,11 +190,11 @@
},
// 选择文件
select(e) {
console.log('选择文件:', e)
console.log('选择文件:', e, this.fileList)
},
// 上传成功
success(e) {
console.log('上传成功',e)
console.log('上传成功', e)
},
// 上传失败
fail(e) {
......@@ -93,12 +212,14 @@
this.$refs.popup.close()
},
submit() {
this.$refs.popup.open('center')
this.$refs.files.upload()
this.updateQuotaOrder()
// this.$refs.files.upload()
},
preStep() {
this.$emit('click', 'quotaOrder')
},
...mapMutations(["$uStore"]),
}
}
</script>
......@@ -180,13 +301,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%;
}
......@@ -243,7 +364,7 @@
width: 580rpx;
height: 408rpx;
background: #ffffff;
border-radius: 20rpx;
border-radius: 24rpx;
}
.popup-content-head {
......@@ -280,13 +401,13 @@
.popup-content-foot__btn {
width: 152rpx;
height: 60rpx;
font-size: 22rpx;
line-height: 60rpx;
background: #ffedee;
text-align: center;
color: #ff0f00;
font-weight: 500;
border-radius: 32rpx;
font-size: 22rpx;
}
.popup-content-foot__sure {
......@@ -295,4 +416,4 @@
background: #ff1d32;
border: 1px solid #ff1d32;
}
</style>
</style>
This diff is collapsed.
......@@ -504,7 +504,7 @@
selectPlanOrder(product, index, mode = 'inner') {
if (this.planinnerLists && this.planinnerLists.length > 0) {
uni.navigateTo({
url: `/pages/select-sale-plan/select-sale-plan?from='quotaOrder'&product=${JSON.stringify((product))}&index=${index}`
url: `/pages/select-sale-plan/select-sale-plan?from=quotaOrder&product=${JSON.stringify((product))}&index=${index}`
});
} else {
uni.showToast({
......
......@@ -70,6 +70,11 @@
apiProductSelect
} from '@/servers/common.js'
const modeMap = {
'quotaOrder': 'QUOTA',
'noQuotaOrder': 'NO_QUOTA',
}
export default {
data() {
return {
......@@ -104,7 +109,7 @@
return {
'height': `${this.sysinfo.safeArea.top + 44}px`
}
},
}
},
onNavigationBarButtonTap(e) {
// console.log('onNavigationBarButtonTap:', e, this.isOpened, this.selectedProduct);
......@@ -158,7 +163,7 @@
const params = {
'page': 1,
'pagesize': '10',
"MODE": "QUOTA",
"MODE": modeMap[this.toPageParams.page],
"INFO": {
"PROCESS_TYPE": "ZS01",
"CUSTOMER": "0050000215"
......
import apiHelper from './api.helper.js'
/**
* 销售订单行项目选择或修改后进行页面数据更新
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiUpdateNoQuotaData(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/so_u_data_other', params)
return res
}
/**
* 针对配额产品经销商保存、提交、取消、审核配额订单
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiUpdateNoQuotaOrder(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/so_no_quota', params)
return res
}
export default {
apiUpdateNoQuotaData,
apiUpdateNoQuotaOrder
}
......@@ -47,6 +47,12 @@ const store = new Vuex.Store({
'item_outer': [],
'item_d': [],
'attachment': []
},
noQuotaOrder: {
'ITEM_INNER': [],
'item_outer': [],
'item_d': [],
'attachment': []
}
},
mutations: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment