Commit ee4ccb6d by wangzhihui

bug修复

1 parent f655babb
......@@ -106,7 +106,12 @@ Component({
})
this.setData({
[text]: textArr.join(','),
[key]: idArr.join(',')
[key]: idArr.join(','),
'staffObj.yqMerchantId':'',
'staffObj.yqMerchantName':'',
'staffObj.merchantId':'',
'staffObj.merchantName':'',
yqMerchartList:[]
})
},
......
......@@ -32,4 +32,4 @@
<text class="hint">投入使用。登录密码默认为Aa+手机号</text>
<business-type show="{{isBusiness}}" scene-label="{{staffObj.staffSceneLabel}}" bindconfirm="selectChoose"></business-type>
<shop-merchant show="{{shopMerchantBox}}" scene-label="{{staffObj.staffSceneLabel}}" bindconfirm="selectChoose" merchantId="{{staffObj.merchantId}}"></shop-merchant>
<yq-merchant show="{{yqMerchartBox}}" merchantId="{{staffObj.yqMerchartBox}}" yqMerchartList="{{yqMerchartList}}"></yq-merchant>
\ No newline at end of file
<yq-merchant show="{{yqMerchartBox}}" merchantId="{{staffObj.yqMerchantId}}" yqMerchartList="{{yqMerchartList}}"></yq-merchant>
\ No newline at end of file
......@@ -8,8 +8,18 @@ Component({
show: {
type: Boolean,
observer: function (n) {
if (n) this.getData()
if (n) {
this.setData({
pageNum:1,
nothing:false,
storeIndex:0,
scrollTop: 0
},()=>{
this.getData()
})
}
}
},
sceneLabel: String,
merchantId: String
......@@ -19,6 +29,7 @@ Component({
* 组件的初始数据
*/
data: {
scrollTop: 0,
nothing:false,
isFlag: false,
total: 0,
......@@ -67,7 +78,6 @@ Component({
},
// 触底刷新
mineReachBottom() {
console.log(111)
let {
pageNum,
total,
......@@ -140,15 +150,6 @@ Component({
storeIndex: 0
})
},
},
lifetimes: {
attached: function () {
this.setData({
nothing:false
})
}
},
}
})
\ No newline at end of file
<popup title="选择员工归属门店" show="{{ show }}" bindconfirm="confirm" height="85%" bindcancel="hidePopup" class="store-wrap">
<block wx:if="{{isFlag}}">
<scroll-view class="store-select-box" style="height: calc(100% - var(--fontSize10));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-y bindscrolltolower="mineReachBottom">
<scroll-view class="store-select-box" scroll-top="{{scrollTop}}" style="height: calc(100% - var(--fontSize10));" enhanced="{{true}}" show-scrollbar="{{false}}" scroll-y bindscrolltolower="mineReachBottom">
<view class="merchant-box" wx:if="{{shopMerchantList.length>0}}">
<block wx:for="{{shopMerchantList}}" wx:key="index">
<view class="item {{storeIndex===index?'active':''}}" bindtap="choose" data-index="{{index}}">
......
// packageEquity/pages/employeeInspection/components/ItemSelectStore/itemSelectStore.js
import { array } from '~/utils/lib/md5';
import api from '../../api'
Component({
/**
* 组件的属性列表
*/
properties: {
show:Boolean,
yqMerchartList:{
type:Array,
observer:function(n){
this.initData()
show:{
type: Boolean,
observer: function (n) {
if (n) {
this.setData({
storeIndex:0,
scrollTop: 0
},()=>{
this.initData()
})
}
}
},
yqMerchartList:Array,
merchantId: String
},
......@@ -19,14 +28,8 @@ Component({
* 组件的初始数据
*/
data: {
storeIndex: 0,
// yqMerchartList: [{
// shopMerchantId: 44367642,
// shopMerchantName: '玉林市弘森汽车销售服务有限公司'
// }, {
// shopMerchantId: 66666,
// shopMerchantName: '深圳市华峰汽车有限公司'
// }]
scrollTop: 0,
storeIndex: 0
},
/**
* 组件的方法列表
......
<!--tabWorkOrder/pages/residentManage/components/yqMerchant/index.wxml-->
<popup title="选择关联账号" show="{{ show }}" bindconfirm="confirm" height="85%" bindcancel="hidePopup" class="store-wrap">
<scroll-view class="store-select-box" enhanced="{{true}}" show-scrollbar="{{false}}">
<scroll-view class="store-select-box" enhanced="{{true}}" scroll-top="{{scrollTop}}" show-scrollbar="{{false}}">
<view class="merchant-box" wx:if="{{yqMerchartList.length>0}}">
<block wx:for="{{yqMerchartList}}" wx:key="index">
<view class="item {{storeIndex===index?'active':''}}" bindtap="choose" data-index="{{index}}">
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!