| | |
| | | <view class="button" @click="cancel" size="mini">取消</view> |
| | | <view class="button entery" @click="entery" color="#1171E0" size="mini">确定</view> |
| | | </view> |
| | | <u-search v-model="companyName" @search="companyList" @clear="clearContent" @confirm="companyList" @custom="companyList()"></u-search> |
| | | <view class="set-flex"> |
| | | <u-search v-model="companyName" @search="companyList" @clear="clearContent" @confirm="companyList" @custom="companyList()"></u-search> |
| | | <text @click="addContent">新增</text> |
| | | </view> |
| | | <view> |
| | | <picker-view immediate-change :value="value" @change="bindChange" class="picker-view"> |
| | | <picker-view-column> |
| | |
| | | this.index = e.detail.value[0] |
| | | }, |
| | | companyList() { |
| | | companyList({companyName: this.companyName, companyStatus: 0, checkStatus: 2}).then(val => { |
| | | return companyList({companyName: this.companyName, companyStatus: 0, checkStatus: 2}).then(val => { |
| | | if(val.data.code == 200){ |
| | | if(!val.data.rows.length || !val.data.rows){ |
| | | uni.showToast({ |
| | | title: '没有符合的数据,请检查输入的执法对象', |
| | | icon: 'none', |
| | | duration: 3000 |
| | | }) |
| | | // uni.showToast({ |
| | | // title: '没有符合的数据,请检查输入的执法对象', |
| | | // icon: 'none', |
| | | // duration: 3000 |
| | | // }) |
| | | this.columns = val.data.rows || [] |
| | | } else { |
| | | this.columns = val.data.rows |
| | | } |
| | |
| | | const info = this.columns[this.index] |
| | | this.$emit('confirm', info) |
| | | this.show = false |
| | | }, |
| | | async addContent() { |
| | | await this.companyList() |
| | | // console.log(this.columns.length) |
| | | if(this.columns.length) { |
| | | |
| | | } else { |
| | | this.$emit('setCompany', this.companyName) |
| | | this.show = false |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | height: 500rpx; |
| | | margin-top: 20rpx; |
| | | } |
| | | .set-flex{ |
| | | display: flex; |
| | | justify-content: flex-start; |
| | | align-items: center; |
| | | text{ |
| | | display: inline-block; |
| | | background-color: $main-color; |
| | | color: white; |
| | | border-radius: 5px; |
| | | padding: 5px 15px; |
| | | margin-left: 20rpx; |
| | | font-size: 24rpx; |
| | | } |
| | | } |
| | | </style> |