Commit e8bb8e9d by zhangxw

修改bug

1 parent 58ee1774
...@@ -87,6 +87,9 @@ Component({ ...@@ -87,6 +87,9 @@ Component({
}, },
getBrandList() { getBrandList() {
let data = wx.$storage.get('car_brand_list') let data = wx.$storage.get('car_brand_list')
this.setData({
searchKeyword: ''
})
if (data) { if (data) {
this.dealSelectedList(Util.deepClone(data)).then(brandlist => { this.dealSelectedList(Util.deepClone(data)).then(brandlist => {
this.formatData(brandlist) this.formatData(brandlist)
......
...@@ -54,6 +54,7 @@ Component({ ...@@ -54,6 +54,7 @@ Component({
*/ */
methods: { methods: {
noScroll() { }, noScroll() { },
noop() {},
hidePopup() { hidePopup() {
this.setData({ this.setData({
show: false show: false
......
<view class="popup custom-class" hidden="{{!showPopup}}" catchtouchmove="noScroll"> <view class="popup custom-class" hidden="{{!showPopup}}" catchtouchmove="noScroll">
<view class="popup-bg" bindtap="hidePopup"></view> <view class="popup-bg" catchtap="hidePopup"></view>
<view class="popup-content {{close?'close':''}}" style="height:{{height}}"> <view class="popup-content {{close?'close':''}}" style="height:{{height}}">
<block wx:if="{{title}}"> <block wx:if="{{title}}">
<view class="popup-title text-center">{{title}}</view> <view class="popup-title text-center">{{title}}</view>
</block> </block>
<view class="popup-slot {{(isTab || customIsTab) && (!hideTab || !customHideTab) ? '': title?'isFullSucreen':'isFullSucreen-notitle'}}" style="{{customPopupSlotStyle}}"> <view class="popup-slot {{(isTab || customIsTab) && (!hideTab || !customHideTab) ? '': title?'isFullSucreen':'isFullSucreen-notitle'}}" style="{{customPopupSlotStyle}}" catchtap="noop">
<slot></slot> <slot></slot>
</view> </view>
<view class="popup-footer {{(isTab || customIsTab) && (!hideTab || !customHideTab) ?'':'isFullSucreen'}}" wx:if="{{only}}"> <view class="popup-footer {{(isTab || customIsTab) && (!hideTab || !customHideTab) ?'':'isFullSucreen'}}" wx:if="{{only}}">
......
...@@ -128,8 +128,9 @@ ...@@ -128,8 +128,9 @@
text-align: right;; text-align: right;;
} }
.col.month { .col.month {
flex: 0 0 56rpx; flex: 0 0 72rpx;
text-align: left; text-align: left;
padding-left: 16rpx;
} }
.col.rate { .col.rate {
flex: 0 0 100rpx; text-align: left; flex: 0 0 100rpx; text-align: left;
......
...@@ -295,6 +295,7 @@ Page({ ...@@ -295,6 +295,7 @@ Page({
let tempFilesList = tempFiles.split('.') let tempFilesList = tempFiles.split('.')
let imgType = tempFilesList[tempFilesList.length - 1] let imgType = tempFilesList[tempFilesList.length - 1]
let type = imgType == 'unknown' ? 'jpg' : imgType let type = imgType == 'unknown' ? 'jpg' : imgType
if (res?.tempFiles?.[0]?.size > 10 * 1024 * 1024) return wx.$api.showToast('图片不能大于10M')
wx.getFileSystemManager().readFile({ wx.getFileSystemManager().readFile({
filePath: tempFiles, //选择图片返回的相对路径 filePath: tempFiles, //选择图片返回的相对路径
encoding: 'base64', //编码格式 encoding: 'base64', //编码格式
...@@ -422,6 +423,9 @@ Page({ ...@@ -422,6 +423,9 @@ Page({
let { code, message } = res let { code, message } = res
const okText = '我知道了' const okText = '我知道了'
if (this.resultDialog) { if (this.resultDialog) {
this.setData({
textareaDisabled: true
})
if (code == 0) { if (code == 0) {
this.resultDialog.open({ this.resultDialog.open({
type: 'success', type: 'success',
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view class="label">{{item.label}} <text class="star">*</text></view> <view class="label">{{item.label}} <text class="star">*</text></view>
<view class="value" bindtap="showPopup" data-target="{{item}}"> <view class="value" bindtap="showPopup" data-target="{{item}}">
<block wx:if="{{item.type == 'textarea'}}"> <block wx:if="{{item.type == 'textarea'}}">
<textarea value="{{infoData[item.key]}}" class="textarea {{item.disabled ? 'disabled': ''}}" placeholder="请输入" placeholder-class="placeholder-class" auto-height="true" maxlength="{{item.maxLength}}" disabled="{{item.disabled}}" cursor-spacing="16" bindinput="onInput" data-key="{{item.key}}"/> <textarea value="{{infoData[item.key]}}" class="textarea {{item.disabled ? 'disabled': ''}}" placeholder="请输入" placeholder-class="placeholder-class" auto-height="true" maxlength="{{item.maxLength}}" disabled="{{item.disabled || showSelectPopup || textareaDisabled}}" cursor-spacing="16" bindinput="onInput" data-key="{{item.key}}"/>
</block> </block>
<block wx:else> <block wx:else>
<block wx:if="{{infoData[item.key]}}"> <block wx:if="{{infoData[item.key]}}">
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
<view class="label">{{item.label}} <text class="star">*</text></view> <view class="label">{{item.label}} <text class="star">*</text></view>
<view class="value" bindtap="showArea" data-type="{{item.type}}"> <view class="value" bindtap="showArea" data-type="{{item.type}}">
<block wx:if="{{item.type == 'textarea'}}"> <block wx:if="{{item.type == 'textarea'}}">
<textarea value="{{infoData[item.key]}}" class="textarea" placeholder="请输入" placeholder-class="placeholder-class" auto-height="true" maxlength="{{item.maxLength}}" cursor-spacing="16" bindinput="onInput" data-key="{{item.key}}"/> <textarea value="{{infoData[item.key]}}" class="textarea" placeholder="请输入" placeholder-class="placeholder-class" auto-height="true" maxlength="{{item.maxLength}}" disabled="{{showSelectPopup || textareaDisabled}}" cursor-spacing="16" bindinput="onInput" data-key="{{item.key}}"/>
</block> </block>
<block wx:else> <block wx:else>
<block wx:if="{{infoData[item.key]}}"> <block wx:if="{{infoData[item.key]}}">
...@@ -62,7 +62,7 @@ ...@@ -62,7 +62,7 @@
<view class="label">备注信息</view> <view class="label">备注信息</view>
</view> </view>
<view class="textarea-wrap"> <view class="textarea-wrap">
<textarea class="textarea" maxlength="200" auto-height placeholder="请输入" placeholder-class="input-ph" value="{{infoData.remark}}" bindinput="onRemarkInput" /> <textarea class="textarea" maxlength="200" disabled="{{showSelectPopup || textareaDisabled}}" auto-height placeholder="请输入" placeholder-class="input-ph" value="{{infoData.remark}}" bindinput="onRemarkInput" />
<view class="counter">{{remarkLength}}/200</view> <view class="counter">{{remarkLength}}/200</view>
</view> </view>
</view> </view>
...@@ -101,7 +101,7 @@ ...@@ -101,7 +101,7 @@
<popup show="{{carBrandPopupShow}}" title="选择品牌" bind:hidePopup="hideBrandPopup" customPopupSlotStyle="{{'height: calc(100% - 282rpx)'}}" bindconfirm="brandConfirm" height="90%"> <popup show="{{carBrandPopupShow}}" title="选择品牌" bind:hidePopup="hideBrandPopup" customPopupSlotStyle="{{'height: calc(100% - 282rpx)'}}" bindconfirm="brandConfirm" height="90%">
<car-brand id="car-brand" popupShow="{{carBrandPopupShow}}" multiple selectedList="{{selectedMainBrand}}"></car-brand> <car-brand id="car-brand" popupShow="{{carBrandPopupShow}}" multiple selectedList="{{selectedMainBrand}}"></car-brand>
</popup> </popup>
<select-popup show="{{showSelectPopup}}" options="{{selectOptions}}" multiple="{{selectMultiple}}" values="{{selectValues}}" value="{{selectValue}}" bindconfirm="handlePopupConfirm" title="{{selectTitle}}"></select-popup> <select-popup show="{{showSelectPopup}}" options="{{selectOptions}}" multiple="{{selectMultiple}}" values="{{selectValues}}" value="{{selectValue}}" bindconfirm="handlePopupConfirm" bindcancel="hideSelectPopup" title="{{selectTitle}}"></select-popup>
<select-area show="{{showSelectArea}}" areaList="{{areaList}}" bindconfirm="areaConfirm" bindcancel="areaCancel" value="{{infoData.districtId || ''}}"></select-area> <select-area show="{{showSelectArea}}" areaList="{{areaList}}" bindconfirm="areaConfirm" bindcancel="areaCancel" value="{{infoData.districtId || ''}}"></select-area>
<!-- 结果弹窗组件:统一反馈弹窗 --> <!-- 结果弹窗组件:统一反馈弹窗 -->
<result-dialog id="resultDialog" bind:ok="onDialogOk" bind:close="onDialogClose" /> <result-dialog id="resultDialog" bind:ok="onDialogOk" bind:close="onDialogClose" />
\ No newline at end of file \ No newline at end of file
...@@ -149,6 +149,7 @@ Page({ ...@@ -149,6 +149,7 @@ Page({
let tempFilesList = tempFiles.split('.') let tempFilesList = tempFiles.split('.')
let imgType = tempFilesList[tempFilesList.length - 1] let imgType = tempFilesList[tempFilesList.length - 1]
let type = imgType == 'unknown' ? 'jpg' : imgType let type = imgType == 'unknown' ? 'jpg' : imgType
if (res?.tempFiles?.[0]?.size > 10 * 1024 * 1024) return wx.$api.showToast('图片不能大于10M')
wx.getFileSystemManager().readFile({ wx.getFileSystemManager().readFile({
filePath: tempFiles, //选择图片返回的相对路径 filePath: tempFiles, //选择图片返回的相对路径
encoding: 'base64', //编码格式 encoding: 'base64', //编码格式
...@@ -231,6 +232,9 @@ Page({ ...@@ -231,6 +232,9 @@ Page({
const okText = '我知道了' const okText = '我知道了'
let { code, message } = res let { code, message } = res
if (this.resultDialog) { if (this.resultDialog) {
this.setData({
textareaDisabled: true
})
if (code == 0) { if (code == 0) {
this.resultDialog.open({ this.resultDialog.open({
type: 'success', type: 'success',
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
<view class="label">拜访内容 <text class="star">*</text></view> <view class="label">拜访内容 <text class="star">*</text></view>
</view> </view>
<view class="textarea-wrap"> <view class="textarea-wrap">
<textarea class="textarea" placeholder="请输入" placeholder-class="input-ph" value="{{infoData.content}}" bindinput="onContentInput" /> <textarea class="textarea" placeholder="请输入" disabled="{{timeVisible || textareaDisabled}}" placeholder-class="input-ph" value="{{infoData.content}}" bindinput="onContentInput" />
<view class="counter">{{contentLength}}/100</view> <view class="counter">{{contentLength}}/100</view>
</view> </view>
<view class="row no-border"> <view class="row no-border">
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
</view> </view>
</scroll-view> </scroll-view>
<!-- 底部固定操作条:新增拜访 --> <!-- 底部固定操作条:新增拜访 -->
<view class="bottom-bar" wx:if="{{tabIndex != 1 && userInfo.loginRole != 1 && infoDetail.potentialCustomersStatus == 1}}"> <view class="bottom-bar" wx:if="{{tabIndex != 1 && userInfo.loginRole != 1 && infoDetail.potentialCustomersStatus == 1 && pageQuery.isSelf == 1}}">
<view class="inner safe-area-bottom"> <view class="inner safe-area-bottom">
<view class="btn" bind:tap="onCreateVisit">新增拜访</view> <view class="btn" bind:tap="onCreateVisit">新增拜访</view>
</view> </view>
......
...@@ -186,6 +186,9 @@ Page({ ...@@ -186,6 +186,9 @@ Page({
const okText = '我知道了' const okText = '我知道了'
let { code, message } = res let { code, message } = res
if (this.resultDialog) { if (this.resultDialog) {
this.setData({
textareaDisabled: true
})
if (code == 0) { if (code == 0) {
this.resultDialog.open({ this.resultDialog.open({
type: 'success', type: 'success',
......
...@@ -34,14 +34,14 @@ ...@@ -34,14 +34,14 @@
<view class="label">分润规则<text class="star">*</text></view> <view class="label">分润规则<text class="star">*</text></view>
</view> </view>
<view class="textarea-wrap"> <view class="textarea-wrap">
<textarea class="textarea" maxlength="50" placeholder="请输入" placeholder-class="input-ph" value="{{infoData.profitRule}}" bindinput="onProfitInput" /> <textarea class="textarea" maxlength="50" disabled="{{timeVisible || textareaDisabled}}" placeholder="请输入" placeholder-class="input-ph" value="{{infoData.profitRule}}" bindinput="onProfitInput" />
<view class="counter">{{profitLength}}/50</view> <view class="counter">{{profitLength}}/50</view>
</view> </view>
<view class="row no-border"> <view class="row no-border">
<view class="label">上架产品信息 <text class="star">*</text></view> <view class="label">上架产品信息 <text class="star">*</text></view>
</view> </view>
<view class="textarea-wrap"> <view class="textarea-wrap">
<textarea class="textarea" maxlength="50" placeholder="请输入" placeholder-class="input-ph" value="{{infoData.productShelfInfo}}" bindinput="onProductInput" /> <textarea class="textarea" maxlength="50" disabled="{{timeVisible || textareaDisabled}}" placeholder="请输入" placeholder-class="input-ph" value="{{infoData.productShelfInfo}}" bindinput="onProductInput" />
<view class="counter">{{productLength}}/50</view> <view class="counter">{{productLength}}/50</view>
</view> </view>
</block> </block>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!