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

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

parent 1bfc2e7f
......@@ -102,6 +102,10 @@
"/sap": {
"target": "http://10.0.134.45:8000",
"changeOrigin": true
},
"/crm-app": {
"target": "http://10.0.135.139:8080",
"changeOrigin": true
}
}
}
......
......@@ -48,11 +48,6 @@
apiUpdateGroupOrder
} from '@/servers/groupOrder.js'
import {
mapMutations,
mapState
} from 'vuex'
export default {
data() {
return {
......@@ -62,7 +57,7 @@
}
},
computed: {
...mapState(['groupOrder']),
...mapState(['noQuotaOrder']),
imageStyles() {
return {
width: 64,
......
......@@ -49,6 +49,10 @@
mapState
} from 'vuex'
import {
apiLogin
} from '@/servers/user.js'
export default {
data() {
......@@ -90,12 +94,15 @@
onLoad(option) {
console.log('login-option', option)
this.loginType = this.option?.loginType || 'password'
if(this.loginType === 'password'){
const {account,password} = this.userInfo
if (this.loginType === 'password') {
const {
account,
password
} = this.userInfo
this.account = account
this.password = password
// this.goLogin()
}else{
} else {
this.code = this.option.code
}
},
......@@ -113,10 +120,28 @@
} else {
const ispass = await this.validate();
if (!ispass) return;
const parmas = {
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() {
if (this.loginType === 'phone') {
......@@ -150,7 +175,8 @@
resolve(flag);
})
}
},
...mapMutations(["$uStore"]),
}
}
</script>
......
This diff is collapsed.
......@@ -6,19 +6,12 @@
<view class="middle view">
<view class="text-block ">
<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>
<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 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>
<view class="planout-block">
......@@ -83,7 +76,12 @@
array: ['2021', '2020', '2019', '2018'],
index: 0,
condition: {
product: ''
product: '',
code: '',
},
page: {
"PAGE": "1",
"PAGESIZE": "10",
},
lists: [{
checked: false,
......@@ -100,7 +98,8 @@
toPageParams: {
page: '',
mode: '',
index: 0
index: 0,
head: {}
}
}
},
......@@ -147,35 +146,34 @@
const {
from,
mode,
index
index,
head
} = option
this.toPageParams.index = index
this.toPageParams.mode = mode
this.toPageParams.page = from
this.toPageParams.head = JSON.parse(head)
},
created() {
this.getProduct();
},
methods: {
search() {
this.page.PAGE = 1
this.getProduct()
},
async getProduct() {
const params = {
"PAGE": "1",
"PAGESIZE": "10",
...this.page,
"MODE": modeMap[this.toPageParams.page],
"INFO": {
"PROCESS_TYPE": "ZS02",
"CUSTOMER": "0050000215",
"ZZFLD00002J": "V013"
},
"INFO": this.toPageParams.head,
"input": {
"SHORT_TEXT": this.condition.product
"SHORT_TEXT": this.condition.product,
"PRODUCT_ID": this.condition.code,
},
}
const res = await apiProductSelect(params)
console.log('ddd2', res)
this.lists = res && res.DATA.map((item) => {
item.checked = false
return item
......
......@@ -39,7 +39,9 @@
<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>
<view class="uni-input">
{{selectedSalePlanTypes[typesIndex] && selectedSalePlanTypes[typesIndex].VALUE || '请选择'}}
</view>
</picker>
</view>
</view>
......@@ -107,6 +109,10 @@
MONAT: '',
PLAN_TYPE: ''
},
page: {
"PAGE": "1",
"PAGESIZE": "10",
},
lists: [{
checked: false,
"REPORT_TYPE": "正式提报",
......@@ -123,11 +129,12 @@
}, ],
selectedSalePlan: {},
selectedSalePlanTypes: [],
typesIndex: 0,
typesIndex: -1,
toPageParams: {
page: '',
index: 0,
product: {}
product: {},
head: {}
}
}
},
......@@ -173,10 +180,12 @@
if (option && option.from) {
const {
from,
product
product,
head
} = option
this.toPageParams.product = JSON.parse(product)
this.toPageParams.page = from
this.toPageParams.head = JSON.parse(head)
}
},
created() {
......@@ -192,89 +201,10 @@
PLAN_TYPE
} = this.condition
const params = {
'page': 1,
'pagesize': '10',
"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": "",
"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": {
},
...this.page,
"INFO": this.toPageParams.head,
"ITEM": this.toPageParams.product,
"INPUT": {},
"INPUT_APP": {
GJAHR,
MONAT,
......@@ -286,12 +216,10 @@
item.checked = false
return item
})
console.log('ddd2', res)
},
async getSalesPlanTypes() {
const res = await apiSalesPlanTypesSelect()
this.selectedSalePlanTypes = res.DATA
console.log('getSalesPlanTypes', res)
},
search() {
this.getSalesPlan();
......
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
......@@ -21,6 +31,7 @@ export async function apiUpdateQuotaOrder(params) {
}
export default {
apiInitQuotaData,
apiUpdateQuotaData,
apiUpdateQuotaOrder
}
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 apiLogin(params) {
const res = await apiHelper.post('/crm-app/login', params)
return res
}
export default { login }
export default {
apiLogin
}
......@@ -39,8 +39,9 @@ const store = new Vuex.Store({
vuex_version: '1.0.1',
vuex_demo: '绛紫',
userInfo: {
account: '',
password: ''
username: '',
password: '',
customerCode: '' || '0050000215'
},
quotaOrder: {
'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