Browse Source

本月查询为灰色

xiaowang-data
是小王呀\24601 1 year ago
parent
commit
38b90b300a
  1. 17
      subpages/InspectionReport/pages/InspectionReport/InspectionReport.js
  2. 2
      subpages/InspectionReport/pages/InspectionReport/InspectionReport.wxml
  3. 1
      subpages/InspectionReport/pages/InspectionReport/InspectionReport.wxss
  4. 4
      utils/config.js

17
subpages/InspectionReport/pages/InspectionReport/InspectionReport.js

@ -17,6 +17,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
inspectIf:false,
orderDate:"", orderDate:"",
selectedEnterpriseNames:[], selectedEnterpriseNames:[],
EnterpriseName:[], EnterpriseName:[],
@ -112,7 +113,7 @@ Page({
// showqiye:true // showqiye:true
}) })
console.log( this.data.companyList); console.log( this.data.companyList);
}) })
@ -121,6 +122,7 @@ Page({
// // 调用后台接口或者模拟数据获取搜索结果 // // 调用后台接口或者模拟数据获取搜索结果
// // this.pickerChange2(e); // // this.pickerChange2(e);
// }, 300); // 设置延迟时间,比如300毫秒 // }, 300); // 设置延迟时间,比如300毫秒
}, },
onInputChange(e){ onInputChange(e){
const index = e.currentTarget.dataset.index; const index = e.currentTarget.dataset.index;
@ -452,14 +454,18 @@ Page({
const targetMonth = parseInt(item.orderDate.substring(5, 7), 10); const targetMonth = parseInt(item.orderDate.substring(5, 7), 10);
console.log(currentMonth,targetMonth); console.log(currentMonth,targetMonth);
if (targetMonth === currentMonth) { if (targetMonth === currentMonth) {
console.log("turedv"); this.setData({
item.inspectIf=true inspectIf:true
})
} else { } else {
item.inspectIf=false this.setData({
inspectIf:false
})
} }
}) })
console.log(this.data.companyList); console.log(this.data.companyList);
// let names = [] // let names = []
// res.data.list.forEach(item=>{ // res.data.list.forEach(item=>{
// names.push(item.name) // names.push(item.name)
@ -482,6 +488,7 @@ Page({
}); });
this.showRecordData() this.showRecordData()
console.log(this.data.inspectIf);
}, },
confirmSelection() { confirmSelection() {
// 点击确定按钮后触发,处理选中的复选框项 // 点击确定按钮后触发,处理选中的复选框项

2
subpages/InspectionReport/pages/InspectionReport/InspectionReport.wxml

@ -18,7 +18,7 @@
<view class="conclusion"> <view class="conclusion">
<text class="prosecutors_pre">企业名称</text> <text class="prosecutors_pre">企业名称</text>
<div > <div >
<input class="{{inspectIf ? 'search-input1' : 'search-input'}}" type="text" placeholder="请输入要查找的公司" bindfocus="handleFocus" bindinput="inputChange" value="{{searchKeyword}}" /> <input class="{{inspectIf ? 'search-input' : 'search-input1'}}" type="text" placeholder="请输入要查找的公司" bindfocus="handleFocus" bindinput="inputChange" value="{{searchKeyword}}" />
<view class="Enterpris"> <view class="Enterpris">
<scroll-view scroll-y="{{true}}" wx:if="{{ showscroll }}" class="searchKeyword" > <scroll-view scroll-y="{{true}}" wx:if="{{ showscroll }}" class="searchKeyword" >
<div class="searchList" wx:for="{{companyList}}" bindtap="onChange2" data-item="{{item}}" wx:key="index"> <div class="searchList" wx:for="{{companyList}}" bindtap="onChange2" data-item="{{item}}" wx:key="index">

1
subpages/InspectionReport/pages/InspectionReport/InspectionReport.wxss

@ -580,7 +580,6 @@ margin-bottom: 20rpx;
.EnterperiseName1{ .EnterperiseName1{
width:300rpx; width:300rpx;
display: flex; display: flex;
color:#999999 ;
white-space: nowrap; white-space: nowrap;
overflow-x: hidden; overflow-x: hidden;
text-overflow:ellipsis text-overflow:ellipsis

4
utils/config.js

@ -5,8 +5,8 @@ module.exports = {
}; };
function BASEURL() { function BASEURL() {
// return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境 return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境
return 'http://192.168.1.144/api/' //测试环境 // return 'http://192.168.1.144/api/' //测试环境
// return 'http://219.146.91.110:30801/api/' // return 'http://219.146.91.110:30801/api/'
// return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境 // return 'https://epmet-preview.elinkservice.cn/api/' // 演示环境
// return 'http://192.168.1.144/api/' //测试环境 // return 'http://192.168.1.144/api/' //测试环境

Loading…
Cancel
Save