Commit 421dd34e authored by chuan.liu's avatar chuan.liu

配额订单 新增初始化接口联调

parent 1bfc2e7f
...@@ -102,6 +102,10 @@ ...@@ -102,6 +102,10 @@
"/sap": { "/sap": {
"target": "http://10.0.134.45:8000", "target": "http://10.0.134.45:8000",
"changeOrigin": true "changeOrigin": true
},
"/crm-app": {
"target": "http://10.0.135.139:8080",
"changeOrigin": true
} }
} }
} }
......
...@@ -48,11 +48,6 @@ ...@@ -48,11 +48,6 @@
apiUpdateGroupOrder apiUpdateGroupOrder
} from '@/servers/groupOrder.js' } from '@/servers/groupOrder.js'
import {
mapMutations,
mapState
} from 'vuex'
export default { export default {
data() { data() {
return { return {
...@@ -62,7 +57,7 @@ ...@@ -62,7 +57,7 @@
} }
}, },
computed: { computed: {
...mapState(['groupOrder']), ...mapState(['noQuotaOrder']),
imageStyles() { imageStyles() {
return { return {
width: 64, width: 64,
......
...@@ -49,13 +49,17 @@ ...@@ -49,13 +49,17 @@
mapState mapState
} from 'vuex' } from 'vuex'
import {
apiLogin
} from '@/servers/user.js'
export default { export default {
data() { data() {
return { return {
account: '', account: '',
password: '', password: '',
phone: '', phone: '',
code: '', code: '',
loginType: 'password', loginType: 'password',
passwordVisible: false, passwordVisible: false,
...@@ -89,14 +93,17 @@ ...@@ -89,14 +93,17 @@
}, },
onLoad(option) { onLoad(option) {
console.log('login-option', option) console.log('login-option', option)
this.loginType = this.option?.loginType || 'password' this.loginType = this.option?.loginType || 'password'
if(this.loginType === 'password'){ if (this.loginType === 'password') {
const {account,password} = this.userInfo const {
this.account = account account,
this.password = password password
// this.goLogin() } = this.userInfo
}else{ this.account = account
this.code = this.option.code this.password = password
// this.goLogin()
} else {
this.code = this.option.code
} }
}, },
methods: { methods: {
...@@ -113,9 +120,27 @@ ...@@ -113,9 +120,27 @@
} else { } else {
const ispass = await this.validate(); const ispass = await this.validate();
if (!ispass) return; if (!ispass) return;
uni.switchTab({ const parmas = {
url: '/pages/home/home' username: '0050000215',
}); password: 'DO1tjHPW0Z',
loginType: 'App'
}
// const res = await apiLogin(parmas)
const res = {
status: 1
}
if (res) {
this.$uStore({
name: 'userInfo',
value: {
customerCode: '0050000215'
}
});
uni.switchTab({
url: '/pages/home/home'
});
}
} }
}, },
fnChangeLogin() { fnChangeLogin() {
...@@ -150,7 +175,8 @@ ...@@ -150,7 +175,8 @@
resolve(flag); resolve(flag);
}) })
} },
...mapMutations(["$uStore"]),
} }
} }
</script> </script>
......
This diff is collapsed.
...@@ -6,19 +6,12 @@ ...@@ -6,19 +6,12 @@
<view class="middle view"> <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.product" placeholder="请填写" /> <input class="middle-date-des" type="text" v-model="condition.product" placeholder="模糊查询,请手动加*" />
</view>
<view class="text-block text-block-last">
<text class="middle-date">产品编码</text>
<input class="middle-date-des" type="text" v-model="condition.code" placeholder="请输入" />
</view> </view>
<!-- <view class="text-block text-block-last">
<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">请选择</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode="aspectFit"></image>
</view>
</view> -->
</view> </view>
<view class="planout-block"> <view class="planout-block">
...@@ -83,7 +76,12 @@ ...@@ -83,7 +76,12 @@
array: ['2021', '2020', '2019', '2018'], array: ['2021', '2020', '2019', '2018'],
index: 0, index: 0,
condition: { condition: {
product: '' product: '',
code: '',
},
page: {
"PAGE": "1",
"PAGESIZE": "10",
}, },
lists: [{ lists: [{
checked: false, checked: false,
...@@ -100,7 +98,8 @@ ...@@ -100,7 +98,8 @@
toPageParams: { toPageParams: {
page: '', page: '',
mode: '', mode: '',
index: 0 index: 0,
head: {}
} }
} }
}, },
...@@ -147,35 +146,34 @@ ...@@ -147,35 +146,34 @@
const { const {
from, from,
mode, mode,
index index,
head
} = option } = option
this.toPageParams.index = index this.toPageParams.index = index
this.toPageParams.mode = mode this.toPageParams.mode = mode
this.toPageParams.page = from this.toPageParams.page = from
this.toPageParams.head = JSON.parse(head)
}, },
created() { created() {
this.getProduct(); this.getProduct();
}, },
methods: { methods: {
search() { search() {
this.page.PAGE = 1
this.getProduct()
}, },
async getProduct() { async getProduct() {
const params = { const params = {
"PAGE": "1", ...this.page,
"PAGESIZE": "10",
"MODE": modeMap[this.toPageParams.page], "MODE": modeMap[this.toPageParams.page],
"INFO": { "INFO": this.toPageParams.head,
"PROCESS_TYPE": "ZS02",
"CUSTOMER": "0050000215",
"ZZFLD00002J": "V013"
},
"input": { "input": {
"SHORT_TEXT": this.condition.product "SHORT_TEXT": this.condition.product,
"PRODUCT_ID": this.condition.code,
}, },
} }
const res = await apiProductSelect(params) const res = await apiProductSelect(params)
console.log('ddd2', res)
this.lists = res && res.DATA.map((item) => { this.lists = res && res.DATA.map((item) => {
item.checked = false item.checked = false
return item return item
......
...@@ -39,7 +39,9 @@ ...@@ -39,7 +39,9 @@
<view class="uni-list-cell-db"> <view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerTypesChange" range-key='VALUE' <picker class="picker-block" @change="bindPickerTypesChange" range-key='VALUE'
mode="selector" :value="typesIndex" :range="selectedSalePlanTypes"> mode="selector" :value="typesIndex" :range="selectedSalePlanTypes">
<view class="uni-input">{{selectedSalePlanTypes[typesIndex].VALUE}}</view> <view class="uni-input">
{{selectedSalePlanTypes[typesIndex] && selectedSalePlanTypes[typesIndex].VALUE || '请选择'}}
</view>
</picker> </picker>
</view> </view>
</view> </view>
...@@ -107,6 +109,10 @@ ...@@ -107,6 +109,10 @@
MONAT: '', MONAT: '',
PLAN_TYPE: '' PLAN_TYPE: ''
}, },
page: {
"PAGE": "1",
"PAGESIZE": "10",
},
lists: [{ lists: [{
checked: false, checked: false,
"REPORT_TYPE": "正式提报", "REPORT_TYPE": "正式提报",
...@@ -123,11 +129,12 @@ ...@@ -123,11 +129,12 @@
}, ], }, ],
selectedSalePlan: {}, selectedSalePlan: {},
selectedSalePlanTypes: [], selectedSalePlanTypes: [],
typesIndex: 0, typesIndex: -1,
toPageParams: { toPageParams: {
page: '', page: '',
index: 0, index: 0,
product: {} product: {},
head: {}
} }
} }
}, },
...@@ -173,10 +180,12 @@ ...@@ -173,10 +180,12 @@
if (option && option.from) { if (option && option.from) {
const { const {
from, from,
product product,
head
} = option } = option
this.toPageParams.product = JSON.parse(product) this.toPageParams.product = JSON.parse(product)
this.toPageParams.page = from this.toPageParams.page = from
this.toPageParams.head = JSON.parse(head)
} }
}, },
created() { created() {
...@@ -192,89 +201,10 @@ ...@@ -192,89 +201,10 @@
PLAN_TYPE PLAN_TYPE
} = this.condition } = this.condition
const params = { const params = {
'page': 1, ...this.page,
'pagesize': '10', "INFO": this.toPageParams.head,
"info": { "ITEM": this.toPageParams.product,
"GUID": "00000000000000000000000000000000", "INPUT": {},
"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": "",
"HEADER": "",
"NUMBER_INT": "0000000010",
"ITM_TYPE": "",
"ZZFLD000029": "V001",
"ZZFLD000005": "",
"ZZFLD000005_Z1": "",
"ZZFLD000006": "20220322",
"ZZFLD00002Q": "",
"ZZFLD00002Q_Z1": "",
"ORDERED_PROD": this.toPageParams.product.PRODUCT_ID,
"DESCRIPTION": "五粮液.1618(131) 52%618mL×6",
"ZZFLD00002S": "52%618ML×6",
"UNIT": "KAR",
"ZZFLD00002T": "盒",
"QUANTITY": "",
"ZZFLD00002U": "",
"ZZFLD00002W": "",
"ZZFLD000009": "",
"INVENTORY": "",
"ZZFLD00002E": "13.00%",
"NET_PRICE": "",
"ZZFLD00002X": "",
"NET_VALUE": "",
"ZZFLD00002Z": "100%",
"ZZFLD00002A": "",
"ZZFLD00002F": "",
"ZZFLD00002G": "",
"ZZFLD00002I": "",
"ZZFLD000007": "",
"ZZFLD000032": "",
"ZZFLD00002O": "",
"ZZFLD000035": "",
"ZZFLD00002B": "",
"ZZFLD000008": "",
"ZZFLD00002P": "",
"CURRENCY": "",
"MODE": "",
"WAREHOUSE": "",
"PRDTYPE": "",
"YEAR": "",
"ZZFLD00002Q_D": ""
},
"input": {
},
"INPUT_APP": { "INPUT_APP": {
GJAHR, GJAHR,
MONAT, MONAT,
...@@ -286,12 +216,10 @@ ...@@ -286,12 +216,10 @@
item.checked = false item.checked = false
return item return item
}) })
console.log('ddd2', res)
}, },
async getSalesPlanTypes() { async getSalesPlanTypes() {
const res = await apiSalesPlanTypesSelect() const res = await apiSalesPlanTypesSelect()
this.selectedSalePlanTypes = res.DATA this.selectedSalePlanTypes = res.DATA
console.log('getSalesPlanTypes', res)
}, },
search() { search() {
this.getSalesPlan(); this.getSalesPlan();
......
import apiHelper from './api.helper.js' import apiHelper from './api.helper.js'
/**
* 配额酒销售订单初始化数据
* @param
* @returns {Promise<AxiosResponse<T>>}
*/
export async function apiInitQuotaData(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/so_quota_init', params)
return res
}
/** /**
* 销售订单行项目选择或修改后进行页面数据更新 * 销售订单行项目选择或修改后进行页面数据更新
* @param * @param
...@@ -21,6 +31,7 @@ export async function apiUpdateQuotaOrder(params) { ...@@ -21,6 +31,7 @@ export async function apiUpdateQuotaOrder(params) {
} }
export default { export default {
apiInitQuotaData,
apiUpdateQuotaData, apiUpdateQuotaData,
apiUpdateQuotaOrder apiUpdateQuotaOrder
} }
import { LOGIN } from './base.api.js' import apiHelper from './api.helper.js'
import apiHelper from './api.helper.js'
/**
/** * 登录服务
* 登录服务 * @param
* @param name 账户名 * @returns {Promise<AxiosResponse<T>>}
* @param password 账户密码 */
* @param captcha 验证码 export async function apiLogin(params) {
* @returns {Promise<AxiosResponse<T>>} const res = await apiHelper.post('/crm-app/login', params)
*/ return res
export async function login(params) { }
const { status, data } = await apiHelper.get(LOGIN, params, false)
return data export default {
apiLogin
} }
export default { login }
...@@ -39,8 +39,9 @@ const store = new Vuex.Store({ ...@@ -39,8 +39,9 @@ const store = new Vuex.Store({
vuex_version: '1.0.1', vuex_version: '1.0.1',
vuex_demo: '绛紫', vuex_demo: '绛紫',
userInfo: { userInfo: {
account: '', username: '',
password: '' password: '',
customerCode: '' || '0050000215'
}, },
quotaOrder: { quotaOrder: {
'ITEM_INNER': [], 'ITEM_INNER': [],
......
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