Commit dc1529a0 authored by xiangzj's avatar xiangzj

优化

parent 8c2f3e00
......@@ -914,7 +914,7 @@
},
created() {
if (this.srcDataList) {
this.srcDataList.sort();
// this.srcDataList.sort();
this.showList = this.srcDataList;
}
if (this.loadData) {
......@@ -1407,7 +1407,7 @@
return Promise.resolve(this.srcDataList);
},
onInput(event) {
console.log(event,'onInput')
// console.log(event,'onInput')
let value = event.target.value;
this.$emit('input', value);
this.doInput(value);
......@@ -1427,7 +1427,7 @@
}
},
onInputMaskTap() {
console.log('onInputMaskTap');
// console.log('onInputMaskTap');
this.$emit('onInputTap')
this.inputMaskZindex = 0;
this.doInput(this.curInputValue);
......@@ -1663,7 +1663,7 @@
},
watch: {
stringList(val) {
console.log(val,'9090')
// console.log(val,'9090')
this.srcDataList = val;
}
}
......
......@@ -6,26 +6,7 @@
</view>
<view class="main">
<view class="middle view">
<view class="text-block">
<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">
<input-autocomplete
class="unit-item__input"
:value="testObj.sname"
v-model="testObj.sname"
placeholder="请输入"
highlightColor="#FF0000"
:stringList="autocompleteStringList"
:isNoShow='isNoShow'
v-on:onInputTap='onInputTap'
v-on:selectItem="selectItemS">
</input-autocomplete>
</view>
</view>
</view>
</view>
<view class="text-block">
<text class="middle-date">匿名提报</text>
<view class="middle-date-des uni-list picker-year">
......@@ -408,12 +389,6 @@
},
data() {
return {
isNoShow: true,
autocompleteStringList: ['四川省成都市温江区樱花街东红大厦8-8-888', '四川省成都市锦江区樱花街东红大厦8-8-999', '四川省成都市金牛区樱花街东红大厦8-8-666', '四川省成都市龙泉区樱花街东红大厦8-8-777'],
testObj: {
sname: '',
dname: ''
},
condition: {
submitMethod: '',
submitMethodName: '',
......@@ -535,15 +510,6 @@
uni.$off('selectSalesAreaAccountInfo')
},
methods: {
onInputTap(){
this.isNoShow = true
},
onPageScroll(e) {
this.isNoShow = false
},
selectItemS(data) {
console.log('收到数据了:', data);
},
async getDictionary(key) {
const params = {
dictionaryKey: key
......
......@@ -3,7 +3,7 @@
<view class="middle upload summary">
<view class="summary-block">
<image class="icon_plan" src="@/static/image/icon_plan@3x.png" mode=""></image>
<text class="upload-text">合计金额</text>
<text class="upload-text">合计金额(元)</text>
</view>
<view>
<text class="summary-num">{{intotalComputed}}</text>
......@@ -161,7 +161,7 @@
this.planinnerLists.forEach((item) => {
money += item.NET_VALUE * 1
})
return money
return money.toFixed(2)
},
selectedSalesCenterArr() {
return this.groupOrder.baseinfo.YXDY
......
......@@ -179,6 +179,9 @@
queryUnique,
queryProducts
} from '@/servers/breakwords.js'
import {
apiFindUnreadMsg
} from '@/servers/message.js'
import timeFormat from '@/uview-ui/libs/function/timeFormat.js'
export default {
data() {
......@@ -290,8 +293,26 @@
this.queryProducts()
this.queryUnique()
this.pointsAndCashSummary()
this.getMessageList()
},
methods: {
async getMessageList() {
let params = {
customer: this.userInfo.code,
msgType: 'app',
page: 1,
pagesize: 1,
msgStatus: 0
}
let res = await apiFindUnreadMsg(params)
if (res.status === 1 && res.data.Rows.length > 0) {
uni.setTabBarBadge({
index:3,
text: res.data.Total.toString()
})
}
},
async pointsAndCashSummary() {
try{
const res = await pointsAndCashSummary({organizationId: this.userInfo.code})
......
......@@ -82,9 +82,7 @@
import {
apiLogin
} from '@/servers/user.js'
import {
apiFindUnreadMsg
} from '@/servers/message.js'
export default {
data() {
......@@ -187,23 +185,7 @@
this.passwordVisible = !this.passwordVisible;
this.$refs.password.blur()
},
async getMessageList(code) {
let params = {
customer: code,
msgType: 'app',
page: 1,
pagesize: 1,
msgStatus: 0
}
let res = await apiFindUnreadMsg(params)
if (res.status === 1 && res.data.Rows.length > 0) {
uni.setTabBarBadge({
index:3,
text: res.data.Total.toString()
})
}
},
// 登录
async goLogin() {
if (this.loginType === 'phone') {
......@@ -256,7 +238,6 @@
uni.switchTab({
url: '/pages/home/home'
});
this.getMessageList(this.account)
}
}
......
......@@ -9,7 +9,7 @@
<view class="uni-tab-item" v-for="(tab,index) in tabList" :key="tab.id" :ref="'tabitem'+index">
<text :id="tab.id" :data-id="index" :data-current="index" class="uni-tab-item-title"
:class="{'uni-tab-item-title-active':tabIndex==index}"
@click="ontabtap">{{tab.name}}</text>
@click="ontabtap($event,tab.newsid)">{{tab.name}}</text>
</view>
</view>
<view class="scroll-view-indicator">
......@@ -61,7 +61,7 @@
<swiper ref="swiper1" class="tab-box" :current="tabIndex" :duration="300" @change="onswiperchange"
@transition="onswiperscroll" @animationfinish="animationfinish" @onAnimationEnd="animationfinish">
<swiper-item class="swiper-item" v-for="(page, index) in tabList" :key="index">
<orderPage :ref="'page' + index" class="page-item" :nid="page.newsid" :condition='condition'></orderPage>
<orderPage :ref="'page' + index" class="page-item" :nid="page.newsid" :conditions='condition'></orderPage>
</swiper-item>
</swiper>
</view>
......@@ -174,9 +174,9 @@
this.selectorQuery();
},
methods: {
ontabtap(e) {
ontabtap(e,type) {
let index = e.target.dataset.current || e.currentTarget.dataset.current;
this.condition.status = index
this.condition.status = type
//let offsetIndex = this._touchTabIndex = Math.abs(index - this._lastTabIndex) > 1;
// #ifdef APP-PLUS || H5 || MP-WEIXIN || MP-QQ
......
......@@ -2,12 +2,12 @@
<view class="order view">
<view class="top">
<text class="title-no">要货单号:{{newsItem.wantCode}}</text>
<view class="title-info">
<view class="title-info" v-if="newsItem.billStatusTextView">
<button class="title-info__status" type="default"><text class="item-block-btn__text">{{newsItem.billStatusTextView}}</text></button>
</view>
</view>
<view class="middle view">
<view class="middle-title">
<view class="middle-title" v-if="newsItem.logisticno">
<text class="middle-title__text">发货单号:{{newsItem.logisticno}}</text>
<image @click="checkLogistics(newsItem.logisticno)" class="icon-car" src="@/static/image/order_car@3x.png" mode="aspectFit">
</image>
......
......@@ -12,7 +12,7 @@
</div>
</uni-refresh>
<uni-cell v-for="(item, index) in dataList" :key="item.id">
<order-item :newsItem="item" @click="goDetail(item)"></order-item>
<order-item :newsItem="item" @click.native="goDetail(item)"></order-item>
</uni-cell>
<uni-cell v-if="isLoading || dataList.length > 4">
<view class="loading-more">
......@@ -46,7 +46,7 @@
type: [Number, String],
default: ''
},
condition: {
conditions: {
type: Object,
default: () => {}
}
......@@ -69,7 +69,24 @@
contentrefresh: '',
contentnomore: ''
},
refreshIcon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB5QTFRFcHBw3Nzct7e39vb2ycnJioqK7e3tpqam29vb////D8oK7wAAAAp0Uk5T////////////ALLMLM8AAABxSURBVHja7JVBDoAgDASrjqj//7CJBi90iyYeOHTPMwmFZrHjYyyFYYUy1bwUZqtJIYVxhf1a6u0R7iUvWsCcrEtwJHp8MwMdvh2amHduiZD3rpWId9+BgPd7Cc2LIkPyqvlQvKxKBJ//Qwq/CacAAwDUv0a0YuKhzgAAAABJRU5ErkJggg=="
refreshIcon: "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAMAAABg3Am1AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAB5QTFRFcHBw3Nzct7e39vb2ycnJioqK7e3tpqam29vb////D8oK7wAAAAp0Uk5T////////////ALLMLM8AAABxSURBVHja7JVBDoAgDASrjqj//7CJBi90iyYeOHTPMwmFZrHjYyyFYYUy1bwUZqtJIYVxhf1a6u0R7iUvWsCcrEtwJHp8MwMdvh2amHduiZD3rpWId9+BgPd7Cc2LIkPyqvlQvKxKBJ//Qwq/CacAAwDUv0a0YuKhzgAAAABJRU5ErkJggg==",
page: {
"page": "1",
"PAGESIZE": "10",
},
loadParams: {
total: 0,
totalPage: 1,
isDone: false,
isRefresh: false
},
condition: {
endDate: "",
page: 1,
pagesize: 20,
startDate: "",
status: "0",
}
}
},
created() {
......@@ -102,7 +119,13 @@
this.requestParams.time = new Date().getTime() + '';
var startTime = new Date();
const res = await findAppGoodsSingle(this.condition)
const params = {
...this.condition,
endDate: this.conditions.endDate,
startDate: this.conditions.startDate,
status: this.conditions.status,
}
const res = await findAppGoodsSingle(params)
if(res.status - 1 === 0){
this.isLoading = false;
if (refresh) {
......@@ -120,6 +143,8 @@
this.isNoData = true;
}
this.isNoData = (res.data.Rows.length <= 0);
this.loadParams.totalPage = Math.ceil(res.data.Total * 1 / this.condition.pagesize * 1)
if (refresh) {
this.dataList = res.data.Rows;
this.requestParams.minId = 0;
......@@ -132,9 +157,9 @@
}
},
loadMore(e) {
if (this.page.page < this.loadParams.totalPage) {
this.page.page++
this.loadData();
if (this.condition.page < this.loadParams.totalPage) {
this.condition.page++
this.loadData(false);
} else {
this.loadingText = '--已到底--'
}
......@@ -150,6 +175,7 @@
if (this.isLoading) {
return;
}
this.condition.page = 1
this.pulling = true;
this.refreshing = true;
this.refreshText = "正在刷新...";
......
......@@ -3,7 +3,7 @@
<view class="middle upload summary">
<view class="summary-block">
<image class="icon_plan" src="@/static/image/icon_plan@3x.png" mode=""></image>
<text class="upload-text">合计金额</text>
<text class="upload-text">合计金额(元)</text>
</view>
<view>
<text class="summary-num">{{intotalComputed}}</text>
......@@ -149,7 +149,7 @@
this.planinnerLists.forEach((item) => {
money += item.NET_VALUE * 1
})
return money
return money.toFixed(2)
}
},
created() {
......
......@@ -61,7 +61,7 @@
</view>
<view class="text-block">
<text class="middle-date">产品</text>
<text class="middle-date-des">{{ele.productDesc}}</text>
<text class="middle-date-pro">{{ele.productDesc}}</text>
</view>
<view class="text-block">
<text class="middle-date">未发货件数</text>
......@@ -406,4 +406,11 @@
.cell-list {
flex-direction: column;
}
.middle-date-pro{
flex: 3;
font-size: 28rpx;
height: 96rpx;
color: $text-base-color;
vertical-align: middle;
}
</style>
......@@ -32,8 +32,8 @@
</view>
<view class="text-block text-block-last" v-if="orderItem.isShunt - 1 === 0">
<text class="middle-date">分流渠道</text>
<view class="middle-date-des uni-list picker-year">
<text class="middle-date" v-if="orderItem.isShunt - 1 === 0">分流渠道</text>
<view class="middle-date-des uni-list picker-year" v-if="orderItem.isShunt - 1 === 0">
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<picker class="picker-block" @change="bindPickerChange($event,'shuntType')" :value="orderItem.shuntTypeName"
......@@ -52,7 +52,7 @@
<view class="middle-date-des uni-list picker-year" >
<view class="uni-list-cell">
<view class="uni-list-cell-db">
<text class="uni-input">{{orderItem.receiveUnitName}}</text>
<text class="uni-input">{{orderItem.shuntReceiveUnitName}}</text>
</view>
</view>
<image class="icon-arrow" src="@/static/image/arrow_r@3x.png" mode=""></image>
......@@ -153,18 +153,6 @@
export default {
data() {
return {
// orderItem: {
// shuntTypeCode: '',
// shuntTypeName: ' ',
// isShunt: '',
// shuntName: ' ',
// receiveUnitName: ' ',
// contactNumber: '',
// contacPerson: '',
// receiveAddress: '',
// shuntDealerName: '',
// receiveUnitName: ''
// },
receiveUnitArr: [],
shuntArr: [],
shuntTypeArr: [],
......@@ -189,9 +177,11 @@
'orderItem.isShunt' :function (newName,oldName){
console.log(newName,'newName')
if(newName - 0 === 0){
this.orderItem.shuntTypeName = ''
this.orderItem.shuntReceiveUnitName = ''
this.orderItem.shuntReceiveUnitCode = ''
this.orderItem.shuntChannelsType = ''
this.orderItem.receiveUnitName = ''
this.orderItem.shuntDealer = ''
this.orderItem.shuntDealerName = ''
}
}
},
......@@ -234,8 +224,8 @@
})
uni.$on('selectShuntAdressAccountInfo', function(data) {
console.log('监听到事件来自 selectShuntAdressAccountInfo ,携带参数 msg 为:', data);
_this.orderItem.receiveUnitName = data.selectShuntAdressAccountInfo.partner_name
_this.orderItem.receiveUnitCode = data.selectShuntAdressAccountInfo.partner
_this.orderItem.shuntReceiveUnitName = data.selectShuntAdressAccountInfo.partner_name
_this.orderItem.shuntReceiveUnitCode = data.selectShuntAdressAccountInfo.partner
_this.orderItem.receiveCityCode = data.selectShuntAdressAccountInfo.city_code
_this.orderItem.receiveCityName = data.selectShuntAdressAccountInfo.city_name
......@@ -318,6 +308,8 @@
switch (dictcode){
case 'B0099':
this.shuntArr = res.data.Rows
this.orderItem.isShunt = this.shuntArr[1].value
this.orderItem.shuntName = this.shuntArr[1].name
break;
case 'A0054':
this.shuntTypeArr = res.data.Rows
......@@ -506,7 +498,6 @@
.uni-list-cell {
flex: 1;
// height: 100%;
}
.uni-list-cell-db {
......
......@@ -18,7 +18,7 @@
</view>
<view class="item-block item-block-code">
<text class="item-block-label">发票类型</text>
<text class="item-block-value">{{item.invType}}</text>
<text class="item-block-value">{{item.invTypeTextView}}</text>
</view>
<view class="item-block item-block-code">
<text class="item-block-label">产品</text>
......
......@@ -3,7 +3,7 @@
<view class="middle upload summary">
<view class="summary-block">
<image class="icon_plan" src="@/static/image/icon_plan@3x.png" mode=""></image>
<text class="upload-text">合计金额</text>
<text class="upload-text">合计金额(元)</text>
</view>
<view>
<text class="summary-num">{{intotalComputed}}</text>
......@@ -234,7 +234,7 @@
this.planoutLists.length > 0 && this.planoutLists.forEach((item) => {
money += item.NET_VALUE * 1
})
return money
return money.toFixed(2)
}
},
// watch: {
......
......@@ -31,15 +31,15 @@
<text class="middle-date-des middle-date-des-select">{{item.PRODUCT_ID}}</text>
</view>
<view class="text-block">
<text class="middle-date middle-date-select">描述</text>
<text class="middle-date middle-date-select">产品描述</text>
<text class="middle-date-des middle-date-des-select">{{item.SHORT_TEXT}}</text>
</view>
<view class="text-block">
<text class="middle-date middle-date-select">产品类型</text>
<text class="middle-date middle-date-select">存货分类</text>
<text class="middle-date-des middle-date-des-select">{{item.CHFL_D}}</text>
</view>
<view class="text-block text-block-last">
<text class="middle-date middle-date-select">价格</text>
<text class="middle-date middle-date-select">规格型号</text>
<text class="middle-date-des middle-date-des-select">{{item.NORMS}}</text>
</view>
</view>
......
......@@ -135,7 +135,7 @@
this.reset()
this.getSalesPlan(true, this.searchName);
},
async getSalesPlan(isRefresh, customerCode = this.orderItem.customerCode) {
async getSalesPlan(isRefresh, customerCode = this.orderItem.shuntDealer) {
if (this.loadParams.isDone) {
return
}
......
......@@ -28,7 +28,7 @@
<text class="middle-date-des">产品描述</text>
</view>
<view class="text-block">
<text class="middle-date middle-billno">{{item.inv_guid}}</text>
<text class="middle-date middle-billno">{{item.invo_id}}</text>
<text class="middle-date-des">发票号</text>
</view>
<view class="text-block">
......
......@@ -162,6 +162,7 @@
},
logOut() {
apiLogOut().then((res) => {
uni.setStorageSync('lifeData', {});
uni.navigateTo({
url: "/pages/login/login"
})
......
import apiHelper from './api.helper.js'
/**
*
* @returns {Promise<AxiosResponse<T>>}
*/
export async function addressCheck(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/bp_addr_check', params)
return res
}
export async function regionOvs(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/region_ovs', params)
return res
}
export async function cityOvs(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/city_ovs', params)
return res
}
export async function streetOvs(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/street_ovs', params)
return res
}
export async function addressImport(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/bp_addr_import', params)
return res
}
......@@ -188,6 +188,7 @@ class Request {
config.baseUrl = 'http://221.10.127.60:5000/scm'
// config.baseUrl = ''
} else {
// http://10.0.134.182:8000
config.baseUrl = 'http://221.10.127.60:5000/wlySap'
}
} catch (e) {
......@@ -222,7 +223,7 @@ class Request {
if(res.MESSAGE || res.msg || res.message || res.ErrMsg){
uni.showToast({
title: res.MESSAGE || res.msg || res.message || res.ErrMsg,
duration: 2000,
duration: 4000,
icon: 'none'
});
}
......
......@@ -78,7 +78,7 @@ const install = (Vue, vm) => {
}
uni.showToast({
title: res.MESSAGE || res.msg || res.message || res.ErrMsg,
duration: 2000,
duration: 4000,
icon: 'none'
});
return false
......@@ -88,4 +88,4 @@ const install = (Vue, vm) => {
export default {
install
}
}
......@@ -62,4 +62,7 @@ export async function advance(params) {
const res = await apiHelper.post('/crm-app/workflow/advance', params, {'Content-Type': 'application/x-www-form-urlencoded'})
return res
}
export async function getCtrbase(params) {
const res = await apiHelper.post('/sap/bc/ztpm/to_new_crm/transdata/get_ctrbase', params)
return res
}
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