Commit ee4ccb6d by wangzhihui

bug修复

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