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

配额订单行项目更新联调

parent 19d58748
This diff is collapsed.
......@@ -10,8 +10,8 @@
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerYearChange" mode="date"
:value="condition.year" fields='year'>
<text class="uni-input">{{condition.year}}</text>
:value="condition.GJAHR" fields='year'>
<text class="uni-input">{{condition.GJAHR}}</text>
</picker>
</view>
</view>
......@@ -24,8 +24,8 @@
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerMonthChange" mode="date"
:value="condition.month" fields="month">
<text class="uni-input">{{condition.month}}</text>
:value="condition.MONAT" fields="month">
<text class="uni-input">{{condition.MONAT}}</text>
</picker>
</view>
</view>
......@@ -103,8 +103,8 @@
index: 0,
condition: {
year: '',
month: '',
planType: ''
MONAT: '',
PLAN_TYPE: ''
},
lists: [{
id: 1,
......@@ -121,7 +121,11 @@
price: 200
}
],
selectedSalePlan: {}
selectedSalePlan: {},
toPageParams: {
page: '',
product: {}
}
}
},
computed: {
......@@ -138,7 +142,7 @@
uni.$emit('selectedSalePlan', {
selectedSalePlan: this.selectedSalePlan
})
uni.navigateBack({})
uni.navigateBack()
return
}
this.isOpened = this.isOpened === 'none' ? 'left' : 'none';
......@@ -160,13 +164,27 @@
// })
// #endif
},
onLoad(option) {
console.log('select-saleplan', option)
const {
from,
product
} = option
this.toPageParams.product = JSON.parse(product)
this.toPageParams.page = from
},
created() {
this.condition.year = timeFormat(new Date(), 'yyyy')
this.condition.month = timeFormat(new Date(), 'mm')
this.condition.GJAHR = timeFormat(new Date(), 'yyyy')
this.condition.MONAT = timeFormat(new Date(), 'mm')
this.getSalesPlan();
},
methods: {
async getSalesPlan() {
const {
GJAHR,
MONAT,
PLAN_TYPE
} = this.condition
const params = {
'page': 1,
'pagesize': '10',
......@@ -215,7 +233,7 @@
"ZZFLD000006": "20220322",
"ZZFLD00002Q": "",
"ZZFLD00002Q_Z1": "",
"ORDERED_PROD": "040001005280115668",
"ORDERED_PROD": this.toPageParams.product.PRODUCT_ID,
"DESCRIPTION": "五粮液.1618(131) 52%618mL×6",
"ZZFLD00002S": "52%618ML×6",
"UNIT": "KAR",
......@@ -251,6 +269,11 @@
"input": {
},
"INPUT_APP": {
GJAHR,
MONAT,
PLAN_TYPE
},
}
const res = await apiSalesPlanSelect(params)
this.lists = res.DATA.map((item) => {
......@@ -264,11 +287,11 @@
},
bindPickerYearChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.condition.year = e.detail.value
this.condition.GJAHR = e.detail.value
},
bindPickerMonthChange(e) {
console.log('picker发送选择改变,携带值为', e.detail.value)
this.condition.month = e.detail.value
this.condition.MONAT = e.detail.value
},
handleClick(e, content, index) {
console.log('click当前索引:', e, content, index);
......
......@@ -39,7 +39,7 @@ const install = (Vue, vm) => {
// 如果把originalData设置为了true,这里得到将会是服务器返回的所有的原始数据
// 判断可能变成了res.statueCode,或者res.data.code之类的,请打印查看结果
console.log('response-----', res)
if (res.MSGTYPE == 'S') {
if (res.MSGTYPE === 'S') {
// 如果把originalData设置为了true,这里return回什么,this.$u.post的then回调中就会得到什么
return res;
} else return false;
......
import {
LOGIN
} from './base.api.js'
import apiHelper from './api.helper.js'
/**
* 登录服务
* @param name 账户名
* @param password 账户密码
* @param captcha 验证码
* 销售订单行项目选择或修改后进行页面数据更新
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export async function login(params) {
const {
status,
data
} = await apiHelper.get(LOGIN, params, false)
return data
export async function apiUpdateQuotaData(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/so_u_data_quota', params)
return res
}
export default {
login
apiUpdateQuotaData
}
This diff is collapsed.
This diff is collapsed.
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