Commit 77948db1 authored by xiangzj's avatar xiangzj

优化

parent 99082f3f
This diff is collapsed.
...@@ -6,6 +6,26 @@ ...@@ -6,6 +6,26 @@
</view> </view>
<view class="main"> <view class="main">
<view class="middle view"> <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"> <view class="text-block">
<text class="middle-date">匿名提报</text> <text class="middle-date">匿名提报</text>
<view class="middle-date-des uni-list picker-year"> <view class="middle-date-des uni-list picker-year">
...@@ -382,10 +402,19 @@ ...@@ -382,10 +402,19 @@
import timeFormat from '@/uview-ui/libs/function/timeFormat.js' import timeFormat from '@/uview-ui/libs/function/timeFormat.js'
import inputAutocomplete from '@/components/input-autocomplete/input-autocomplete.vue';
export default { export default {
components: {
inputAutocomplete
},
data() { data() {
return { return {
isNoShow: true,
autocompleteStringList: ['四川省成都市温江区樱花街东红大厦8-8-888', '四川省成都市锦江区樱花街东红大厦8-8-999', '四川省成都市金牛区樱花街东红大厦8-8-666', '四川省成都市龙泉区樱花街东红大厦8-8-777'],
testObj: {
sname: '',
dname: ''
},
condition: { condition: {
submitMethod: '', submitMethod: '',
submitMethodName: '', submitMethodName: '',
...@@ -505,6 +534,15 @@ ...@@ -505,6 +534,15 @@
uni.$off('selectSalesAreaAccountInfo') uni.$off('selectSalesAreaAccountInfo')
}, },
methods: { methods: {
onInputTap(){
this.isNoShow = true
},
onPageScroll(e) {
this.isNoShow = false
},
selectItemS(data) {
console.log('收到数据了:', data);
},
async getDictionary(key) { async getDictionary(key) {
const params = { const params = {
dictionaryKey: key dictionaryKey: key
...@@ -560,9 +598,17 @@ ...@@ -560,9 +598,17 @@
} }
}, },
selectClueTerminal() { selectClueTerminal() {
if(this.condition.provinceName&& this.condition.cityName){
uni.navigateTo({ uni.navigateTo({
url: `/pages/select-clue-terminal/select-clue-terminal?keywords=${this.condition.provinceName||this.condition.terminalName}` url: `/pages/select-clue-terminal/select-clue-terminal?keywords=${this.condition.provinceName}`
});
}else{
uni.showToast({
title: '请先选择省份和城市',
duration: 2000,
icon: 'none'
}); });
}
}, },
selectSalesAreaAccountInfo() { selectSalesAreaAccountInfo() {
uni.navigateTo({ uni.navigateTo({
...@@ -936,4 +982,18 @@ ...@@ -936,4 +982,18 @@
.btn-text-l { .btn-text-l {
color: $wly-primary-color; color: $wly-primary-color;
} }
/deep/ .str-auto-complete-container{
// min-width: 50%;
max-width: 50%;
position: fixed;
}
/deep/ .str-auto-complete-item{
line-height: 1;
}
/deep/ .iac-input-wrap{
min-height: 96rpx;
}
/deep/ .uni-input-input{
font-size: 28rpx;
}
</style> </style>
...@@ -335,7 +335,7 @@ ...@@ -335,7 +335,7 @@
this.paintDesignIndex = e.detail.value this.paintDesignIndex = e.detail.value
switch (e.detail.value) { switch (e.detail.value) {
case 1: case 1:
this.condition.ZZFLD000098 = this.condition.GRPUTID this.condition.ZZFLD000098 = ''
break; break;
case 2: case 2:
this.condition.ZZFLD000098 = this.selectedGroupClient.OBJNAME this.condition.ZZFLD000098 = this.selectedGroupClient.OBJNAME
......
...@@ -77,6 +77,8 @@ ...@@ -77,6 +77,8 @@
}, },
methods: { methods: {
async updateGroupOrder() { async updateGroupOrder() {
let res1 = null
try{
const { const {
INFO, INFO,
ITEM, ITEM,
...@@ -90,14 +92,20 @@ ...@@ -90,14 +92,20 @@
"USER_BP": this.userInfo.code, "USER_BP": this.userInfo.code,
"ROLE": "WLY001" "ROLE": "WLY001"
} }
const res = await apiUpdateGroupOrder(params) res1 = await apiUpdateGroupOrder(params)
if(res1.MSGTYPE !== 'S'){
return
}
}catch(e){
//TODO handle the exception
}
try{
const { const {
ATTACHMENT: ATTACHMENT2, ATTACHMENT: ATTACHMENT2,
HISTORY, HISTORY,
INFO: INFO2, INFO: INFO2,
ITEM: ITEM2 ITEM: ITEM2
} = res.DATA } = res1.DATA
const params2 = { const params2 = {
"MODE": "SUBMIT", "MODE": "SUBMIT",
...@@ -109,7 +117,9 @@ ...@@ -109,7 +117,9 @@
} }
const res2 = await apiUpdateGroupOrder(params2) const res2 = await apiUpdateGroupOrder(params2)
console.log('apiUpdateGroupOrder', res2) console.log('apiUpdateGroupOrder', res2)
if(res2.MSGTYPE !== 'S'){
return
}
const { const {
INFO: INFO3, INFO: INFO3,
ITEM: ITEM3, ITEM: ITEM3,
...@@ -127,6 +137,9 @@ ...@@ -127,6 +137,9 @@
value: groupOrder value: groupOrder
}); });
this.$refs.popup.open('center') this.$refs.popup.open('center')
}catch(e){
//TODO handle the exception
}
}, },
change(e) { change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show); console.log('当前模式:' + e.type + ',状态:' + e.show);
......
...@@ -83,7 +83,9 @@ ...@@ -83,7 +83,9 @@
import { import {
apiLogin apiLogin
} from '@/servers/user.js' } from '@/servers/user.js'
import {
apiFindUnreadMsg
} from '@/servers/message.js'
export default { export default {
data() { data() {
...@@ -186,6 +188,23 @@ ...@@ -186,6 +188,23 @@
this.passwordVisible = !this.passwordVisible; this.passwordVisible = !this.passwordVisible;
this.$refs.password.blur() 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() { async goLogin() {
if (this.loginType === 'phone') { if (this.loginType === 'phone') {
...@@ -238,6 +257,7 @@ ...@@ -238,6 +257,7 @@
uni.switchTab({ uni.switchTab({
url: '/pages/home/home' url: '/pages/home/home'
}); });
this.getMessageList(this.account)
} }
} }
......
...@@ -74,6 +74,10 @@ ...@@ -74,6 +74,10 @@
if (type === 0) { if (type === 0) {
this.unreadList = res.data.Rows this.unreadList = res.data.Rows
this.unreadCount = res.data.Total this.unreadCount = res.data.Total
uni.setTabBarBadge({
index:3,
text: res.data.Total.toString()
})
} else { } else {
this.readList = res.data.Rows this.readList = res.data.Rows
} }
......
...@@ -82,6 +82,8 @@ ...@@ -82,6 +82,8 @@
}, },
methods: { methods: {
async updateQuotaOrder() { async updateQuotaOrder() {
let res1 = null
try{
const { const {
INFO, INFO,
ITEM, ITEM,
...@@ -98,14 +100,20 @@ ...@@ -98,14 +100,20 @@
// "USE": [], // "USE": [],
ATTACHMENT ATTACHMENT
} }
const res = await apiUpdateNoQuotaOrder(params) res1 = await apiUpdateNoQuotaOrder(params)
if(res1.MSGTYPE !== 'S'){
return
}
}catch(e){
//TODO handle the exception
}
try{
const { const {
ATTACHMENT: ATTACHMENT2, ATTACHMENT: ATTACHMENT2,
HISTORY, HISTORY,
INFO: INFO2, INFO: INFO2,
ITEM: ITEM2 ITEM: ITEM2
} = res.DATA } = res1.DATA
const params2 = { const params2 = {
// "USER_BP": "81000010", // "USER_BP": "81000010",
...@@ -117,6 +125,9 @@ ...@@ -117,6 +125,9 @@
} }
const res2 = await apiUpdateNoQuotaOrder(params2) const res2 = await apiUpdateNoQuotaOrder(params2)
console.log('updateQuotaOrder', res2) console.log('updateQuotaOrder', res2)
if(res2.MSGTYPE !== 'S'){
return
}
const { const {
INFO: INFO3, INFO: INFO3,
ITEM: ITEM3, ITEM: ITEM3,
...@@ -133,6 +144,9 @@ ...@@ -133,6 +144,9 @@
value: noQuotaOrder value: noQuotaOrder
}); });
this.$refs.popup.open('center') this.$refs.popup.open('center')
}catch(e){
//TODO handle the exception
}
}, },
change(e) { change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show); console.log('当前模式:' + e.type + ',状态:' + e.show);
......
...@@ -194,7 +194,9 @@ ...@@ -194,7 +194,9 @@
ITEM ITEM
} = res } = res
this.selectedSalesCenterArr = YXDY this.selectedSalesCenterArr = YXDY
if(YXDY.length === 1){
this.salesCenterIndex = 0
}
if (this.isKeepData) { if (this.isKeepData) {
const { const {
INFO, INFO,
......
...@@ -40,7 +40,7 @@ ...@@ -40,7 +40,7 @@
</view> </view>
<view class="text-block-box text-block-box-last"> <view class="text-block-box text-block-box-last">
<view class="text-block text-block-last"> <view class="text-block text-block-last">
<view class="middle-date">{{INFO.ZZFLD000099}} <view class="middle-date">{{INFO.ZZFLD000099==='X'?'是':'否'}}
<button class="diy-entry" type="default" @click="goDiyPage"> <button class="diy-entry" type="default" @click="goDiyPage">
<image class="diy-icon" src="../../static/image/address@3x.png" mode=""> <image class="diy-icon" src="../../static/image/address@3x.png" mode="">
</image> </image>
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
class="item-block-btn__text">{{itemHead.status}}</text></button> class="item-block-btn__text">{{itemHead.status}}</text></button>
</view> </view>
<view class="item-block item-block-name"> <view class="item-block item-block-name">
<text class="item-block-label item-block__label">{{itemHead.prodpl_type}}</text> <text class="item-block-label item-block__label">{{itemHead.prodpltype}}</text>
</view> </view>
<view class="item-block"> <view class="item-block">
<text class="item-block-label-des">{{itemHead.datum}}</text> <text class="item-block-label-des">{{itemHead.datum}}</text>
......
...@@ -46,7 +46,6 @@ ...@@ -46,7 +46,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="middle view"> <view class="middle view">
<view class="text-block" v-if="orderItem.isShunt - 1 === 0" @click="handleShuntAdress"> <view class="text-block" v-if="orderItem.isShunt - 1 === 0" @click="handleShuntAdress">
<text class="middle-date">分流收货单位</text> <text class="middle-date">分流收货单位</text>
...@@ -501,7 +500,7 @@ ...@@ -501,7 +500,7 @@
.uni-list-cell { .uni-list-cell {
flex: 1; flex: 1;
height: 100%; // height: 100%;
} }
.uni-list-cell-db { .uni-list-cell-db {
......
...@@ -77,6 +77,8 @@ ...@@ -77,6 +77,8 @@
}, },
methods: { methods: {
async updateQuotaOrder() { async updateQuotaOrder() {
let res1 = null
try{
const { const {
INFO, INFO,
ITEM_INNER, ITEM_INNER,
...@@ -93,8 +95,14 @@ ...@@ -93,8 +95,14 @@
// "USE": [], // "USE": [],
ATTACHMENT ATTACHMENT
} }
const res = await apiUpdateQuotaOrder(params) res1 = await apiUpdateQuotaOrder(params)
if(res1.MSGTYPE !== 'S'){
return
}
}catch(e){
//TODO handle the exception
}
try{
const { const {
ATTACHMENT: ATTACHMENT2, ATTACHMENT: ATTACHMENT2,
HISTORY, HISTORY,
...@@ -102,8 +110,7 @@ ...@@ -102,8 +110,7 @@
ITEM_INNER: ITEM_INNER2, ITEM_INNER: ITEM_INNER2,
ITEM_OUTER: ITEM_OUTER2, ITEM_OUTER: ITEM_OUTER2,
USE USE
} = res.DATA } = res1.DATA
const params2 = { const params2 = {
// "USER_BP": "81000010", // "USER_BP": "81000010",
"MODE": "SUBMIT", "MODE": "SUBMIT",
...@@ -115,6 +122,9 @@ ...@@ -115,6 +122,9 @@
"ATTACHMENT": ATTACHMENT2 "ATTACHMENT": ATTACHMENT2
} }
const res2 = await apiUpdateQuotaOrder(params2) const res2 = await apiUpdateQuotaOrder(params2)
if(res2.MSGTYPE !== 'S'){
return
}
console.log('updateQuotaOrder', res2) console.log('updateQuotaOrder', res2)
const { const {
INFO: INFO3, INFO: INFO3,
...@@ -134,6 +144,9 @@ ...@@ -134,6 +144,9 @@
value: quotaOrder value: quotaOrder
}); });
this.$refs.popup.open('center') this.$refs.popup.open('center')
}catch(e){
//TODO handle the exception
}
}, },
change(e) { change(e) {
console.log('当前模式:' + e.type + ',状态:' + e.show); console.log('当前模式:' + e.type + ',状态:' + e.show);
...@@ -251,8 +264,8 @@ ...@@ -251,8 +264,8 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
align-self: center; align-self: center;
width: 344rpx; width: 388rpx;
height: 344rpx; height: 388rpx;
background: #f5f6f7; background: #f5f6f7;
border: 1px dashed #dedede; border: 1px dashed #dedede;
border-radius: 4px; border-radius: 4px;
...@@ -267,6 +280,7 @@ ...@@ -267,6 +280,7 @@
/deep/ .uni-file-picker__container { /deep/ .uni-file-picker__container {
width: 100%; width: 100%;
height: 100%; height: 100%;
margin: 0;
} }
.bottom-area { .bottom-area {
......
...@@ -298,7 +298,9 @@ ...@@ -298,7 +298,9 @@
ITEM_INNER ITEM_INNER
} = res } = res
this.selectedSalesCenterArr = YXDY this.selectedSalesCenterArr = YXDY
if(YXDY.length === 1){
this.salesCenterIndex = 0
}
if (this.isKeepData) { if (this.isKeepData) {
const { const {
INFO, INFO,
......
...@@ -135,7 +135,7 @@ ...@@ -135,7 +135,7 @@
this.reset() this.reset()
this.getSalesPlan(true, this.searchName); this.getSalesPlan(true, this.searchName);
}, },
async getSalesPlan(isRefresh, customerCode = this.orderItem.shuntingCustomer) { async getSalesPlan(isRefresh, customerCode = this.orderItem.customerCode) {
if (this.loadParams.isDone) { if (this.loadParams.isDone) {
return return
} }
......
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