| | |
| | | </picker> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="buttons"> |
| | | <button class="op5" size="mini" type="default" @tap="clear">重置</button> |
| | | <button class="op3" size="mini" type="default" @tap="search">查询</button> |
| | | <button class="op4" size="mini" type="default" @tap="close">关闭</button> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view style="width: 100%;height: 16rpx;background-color: #e5e5e5;"></view> |
| | | |
| | | |
| | | <view class="list" v-for="(item,index) in listData" :key="index"> |
| | | <!-- #ifndef MP-WEIXIN --> |
| | | <uni-card :title="item.设备名称" :extra="item.单据号" style="margin: 10px;" |
| | | @tap="showDetail = showDetail==index?-1:index"> |
| | | <uni-card :title="item.设备名称" :extra="item.单据号" style="margin: 10px;" @tap="showDetail = showDetail==index?-1:index"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item['设备代码']"> |
| | | <text>设备代码:</text>{{item['设备代码']}} |
| | | <view class="detail" v-if="item.设备代码"> |
| | | <text>设备代码:</text>{{item.设备代码}} |
| | | </view> |
| | | <view class="detail" v-if="item['内部单据号']"> |
| | | <text>内部单据号:</text>{{item['内部单据号']}} |
| | | <view class="detail" v-if="item.内部单据号"> |
| | | <text>内部单据号:</text>{{item.内部单据号}} |
| | | </view> |
| | | <view class="detail" v-if="item['开始日期']"> |
| | | <text>开始日期:</text>{{item['开始日期'].substr(0,10)}} |
| | | <view class="detail" v-if="item.开始日期"> |
| | | <text>开始日期:</text>{{item.开始日期.substr(0,10)}} |
| | | </view> |
| | | <view class="detail" v-if="item['结束日期']"> |
| | | <text>结束日期:</text>{{item['结束日期'].substr(0,10)}} |
| | | <view class="detail" v-if="item.结束日期"> |
| | | <text>结束日期:</text>{{item.结束日期.substr(0,10)}} |
| | | </view> |
| | | <view class="detail" v-if="item['保养周期']"> |
| | | <text>保养周期(单位):</text>{{item['保养周期']}}({{item['周期单位']}}) |
| | | <view class="detail" v-if="item.保养周期"> |
| | | <text>保养周期(单位):</text>{{item.保养周期}}({{item.周期单位}}) |
| | | </view> |
| | | <view class="detail" v-if="item['备注']"> |
| | | <text>备注:</text>{{item['备注']}} |
| | | <view class="detail" v-if="item.备注"> |
| | | <text>备注:</text>{{item.备注}} |
| | | </view> |
| | | </view> |
| | | <view class="card-detail" v-if="showDetail == index"> |
| | | <view class="detail" v-if="item['制单人']"> |
| | | <text>制单人:</text>{{item['制单人']}} |
| | | <view class="detail" v-if="item.制单人"> |
| | | <text>制单人:</text>{{item.制单人}} |
| | | </view> |
| | | <view class="detail" v-if="item['制单日期']"> |
| | | <text>制单日期:</text>{{item['制单日期'].substr(0,10)}} |
| | | <view class="detail" v-if="item.制单日期"> |
| | | <text>制单日期:</text>{{item.制单日期.substr(0,10)}} |
| | | </view> |
| | | <view class="detail" v-if="item['审核人']"> |
| | | <text>审核人:</text>{{item['审核人']}} |
| | | <view class="detail" v-if="item.审核人"> |
| | | <text>审核人:</text>{{item.审核人}} |
| | | </view> |
| | | <view class="detail" v-if="item['审核日期']"> |
| | | <text>审核日期:</text>{{item['审核日期'].substr(0,10)}} |
| | | <view class="detail" v-if="item.审核日期"> |
| | | <text>审核日期:</text>{{item.审核日期.substr(0,10)}} |
| | | </view> |
| | | <view class="detail" v-if="item['修改人']"> |
| | | <text>修改人:</text>{{item['修改人']}} |
| | | <view class="detail" v-if="item.修改人"> |
| | | <text>修改人:</text>{{item.修改人}} |
| | | </view> |
| | | <view class="detail" v-if="item['修改日期']"> |
| | | <text>修改日期:</text>{{item['修改日期'].substr(0,10)}} |
| | | <view class="detail" v-if="item.修改日期"> |
| | | <text>修改日期:</text>{{item.修改日期.substr(0,10)}} |
| | | </view> |
| | | <view class="detail" v-if="item['关闭人']"> |
| | | <text>关闭人:</text>{{item['关闭人']}} |
| | | <view class="detail" v-if="item.关闭人"> |
| | | <text>关闭人:</text>{{item.关闭人}} |
| | | </view> |
| | | <view class="detail" v-if="item['关闭日期']"> |
| | | <text>关闭日期:</text>{{item['关闭日期'].substr(0,10)}} |
| | | <view class="detail" v-if="item.关闭日期"> |
| | | <text>关闭日期:</text>{{item.关闭日期.substr(0,10)}} |
| | | </view> |
| | | <!-- <view class="detail" v-if="item['作废人']"> |
| | | <text>作废人:</text>{{item['作废人']}} |
| | | </view> |
| | | <view class="detail" v-if="item['作废日期']"> |
| | | <text>作废日期:</text>{{item['作废日期'].substr(0,10)}} |
| | | </view> --> |
| | | <view class="detail" v-if="item['源单单号']"> |
| | | <text>源单单号:</text>{{item['源单单号']}} |
| | | <!-- <view class="detail" v-if="item.作废人"> |
| | | <text>作废人:</text>{{item.作废人}} |
| | | </view> |
| | | <view class="detail" v-if="item['源单类型']"> |
| | | <text>源单类型:</text>{{item['源单类型']}} |
| | | <view class="detail" v-if="item.作废日期"> |
| | | <text>作废日期:</text>{{item.作废日期.substr(0,10)}} |
| | | </view> --> |
| | | <view class="detail" v-if="item.源单单号"> |
| | | <text>源单单号:</text>{{item.源单单号}} |
| | | </view> |
| | | <view class="detail" v-if="item['hbilltype']"> |
| | | <text>hbilltype:</text>{{item['hbilltype']}} |
| | | <view class="detail" v-if="item.源单类型"> |
| | | <text>源单类型:</text>{{item.源单类型}} |
| | | </view> |
| | | <view class="detail" v-if="item['摘要']"> |
| | | <text>摘要:</text>{{item['摘要']}} |
| | | <view class="detail" v-if="item.hbilltype"> |
| | | <text>hbilltype:</text>{{item.hbilltype}} |
| | | </view> |
| | | <view class="detail" v-if="item.摘要"> |
| | | <text>摘要:</text>{{item.摘要}} |
| | | </view> |
| | | </view> |
| | | <!-- #endif --> |
| | | |
| | | |
| | | |
| | | <view class="more" v-if="showDetail == index"> |
| | | <view class="part" style="border-right: 1px solid #eee;"> |
| | | <uni-icons type="top" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>收起 |
| | | </view> |
| | | <view class="part" @tap.stop="choose(item)"> |
| | | <uni-icons type="checkmarkempty" style="color: #888;margin-right: 10rpx;" |
| | | size="14"></uni-icons>选取该数据 |
| | | <uni-icons type="checkmarkempty" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>选取该数据 |
| | | </view> |
| | | </view> |
| | | <view class="more" v-if="showDetail != index"> |
| | |
| | | <uni-icons type="bottom" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>更多信息 |
| | | </view> |
| | | <view class="part" @tap.stop="choose(item)"> |
| | | <uni-icons type="checkmarkempty" style="color: #888;margin-right: 10rpx;" |
| | | size="14"></uni-icons>选取该数据 |
| | | <uni-icons type="checkmarkempty" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>选取该数据 |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | |
| | | |
| | | <view class="over" v-if="listData.length == 0">暂无数据</view> |
| | | <view class="over" v-if="listData.length != 0">已到底</view> |
| | | </view> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import { getUserInfo } from "@/utils/auth.js"; |
| | | export default { |
| | | data() { |
| | | return { |
| | | userInfo: getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | hform: { |
| | | HBillNo: '', |
| | | HCreateBy: '', |
| | | BenginHCreateDate: '', |
| | | EndHCreateDate: '', |
| | | data() { |
| | | return { |
| | | userInfo:getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API', |
| | | hform:{ |
| | | HBillNo:'', |
| | | HCreateBy:'', |
| | | BenginHCreateDate:'', |
| | | EndHCreateDate:'', |
| | | }, |
| | | sWhere: '', |
| | | listData: [], |
| | | showDetail: -1, |
| | | } |
| | | }, |
| | | sWhere:'', |
| | | listData:[], |
| | | showDetail:-1, |
| | | } |
| | | }, |
| | | created() { |
| | | this.getList() |
| | | console.log(this.userInfo, uni.getStorageSync('HUserName')) |
| | | console.log(this.userInfo,uni.getStorageSync('HUserName')) |
| | | }, |
| | | methods: { |
| | | getList() { |
| | | methods: { |
| | | getList(){ |
| | | // console.log(this.sWhere) |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | title:'加载中...' |
| | | }) |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sb_EquipMaintainPlanBill/GetEquipMaintainPlanBillList', |
| | | data: { |
| | | url: this.serverUrl + '/Sb_EquipMaintainPlanBill/GetEquipMaintainPlanBillList', |
| | | data:{ |
| | | sWhere: this.sWhere, |
| | | user: uni.getStorageSync('HUserName') |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res); |
| | | if (res.data.count == 1) { |
| | | success: (res) => { |
| | | console.log(1,res); |
| | | if(res.data.count == 1){ |
| | | this.listData = res.data.data |
| | | uni.hideLoading() |
| | | } else { |
| | | }else{ |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | } |
| | | }, |
| | |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | //选择单据日期 |
| | | BenginHCreateDateChange(e) { |
| | | BenginHCreateDateChange(e){ |
| | | console.log(e.detail.value) |
| | | this.hform.BenginHCreateDate = e.detail.value |
| | | }, |
| | | //选择单据日期 |
| | | EndHCreateDateChange(e) { |
| | | EndHCreateDateChange(e){ |
| | | console.log(e.detail.value) |
| | | this.hform.EndHCreateDate = e.detail.value |
| | | }, |
| | | search() { |
| | | search(){ |
| | | this.sWhere = '' |
| | | |
| | | |
| | | console.log(this.hform) |
| | | if (this.hform.HBillNo) { |
| | | this.sWhere += " and 单据号 like '%" + this.hform.HBillNo + "%'"; |
| | | this.sWhere += " and 单据号 like '%" + this.hform.HBillNo + "%'"; |
| | | } |
| | | if (this.hform.HCreateBy) { |
| | | this.sWhere += " and 制单人 like '%" + this.hform.HCreateBy + "%'"; |
| | | this.sWhere += " and 制单人 like '%" + this.hform.HCreateBy + "%'"; |
| | | } |
| | | if (this.hform.BenginHCreateDate) { |
| | | this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.BenginHCreateDate + "'"; |
| | | this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.BenginHCreateDate + "'"; |
| | | } |
| | | if (this.hform.EndHCreateDate) { |
| | | this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.EndHCreateDate + "'"; |
| | | this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.EndHCreateDate + "'"; |
| | | } |
| | | |
| | | |
| | | this.getList() |
| | | }, |
| | | clear() { |
| | | clear(){ |
| | | this.sWhere = '' |
| | | this.showDetail = -1, |
| | | this.hform = { |
| | | HBillNo: '', |
| | | HCreateBy: '', |
| | | BenginHCreateDate: '', |
| | | EndHCreateDate: '', |
| | | } |
| | | this.hform = { |
| | | HBillNo:'', |
| | | HCreateBy:'', |
| | | BenginHCreateDate:'', |
| | | EndHCreateDate:'', |
| | | } |
| | | this.getList() |
| | | }, |
| | | choose(item) { |
| | | choose(item){ |
| | | console.log(item) |
| | | var data = { |
| | | HPlanName: item.单据号, |
| | | HPlanNo: item.hmainid, |
| | | HPlanName:item.单据号, |
| | | HPlanNo:item.hmainid, |
| | | } |
| | | this.$emit('planData', data) |
| | | }, |
| | | close() { |
| | | this.$emit('close', true) |
| | | close(){ |
| | | this.$emit('close',true) |
| | | }, |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .content { |
| | | .content{ |
| | | width: 100%; |
| | | height: 100%; |
| | | background-color: #fff; |
| | |
| | | left: 0; |
| | | z-index: 99; |
| | | } |
| | | |
| | | .form { |
| | | .form{ |
| | | width: 640rpx; |
| | | margin: 20rpx auto; |
| | | } |
| | | |
| | | .form-item { |
| | | .form-item{ |
| | | display: flex; |
| | | align-items: center; |
| | | font-size: 28rpx; |
| | | padding: 6rpx 0; |
| | | |
| | | .title { |
| | | .title{ |
| | | width: 180rpx; |
| | | |
| | | text { |
| | | text{ |
| | | color: red; |
| | | font-weight: bold; |
| | | } |
| | | } |
| | | |
| | | .right { |
| | | .right{ |
| | | width: 450rpx; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #acacac; |
| | | } |
| | | |
| | | .righton { |
| | | .righton{ |
| | | width: 450rpx; |
| | | border-radius: 22rpx; |
| | | border: 1px solid #e4e4e4; |
| | | background-color: #e4e4e4; |
| | | } |
| | | |
| | | input { |
| | | input{ |
| | | width: 100%; |
| | | padding: 8rpx 20rpx; |
| | | font-size: 30rpx; |
| | | } |
| | | } |
| | | |
| | | .buttons { |
| | | .buttons{ |
| | | width: 100%; |
| | | display: flex; |
| | | justify-content: center; |
| | | margin-top: 20rpx; |
| | | |
| | | button { |
| | | button{ |
| | | border-radius: 50rpx; |
| | | width: 180rpx; |
| | | height: 66rpx; |
| | |
| | | color: #fff; |
| | | } |
| | | } |
| | | |
| | | .list { |
| | | |
| | | .list{ |
| | | width: 100%; |
| | | |
| | | .card-detail { |
| | | .card-detail{ |
| | | width: 100%; |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | justify-content: space-between; |
| | | line-height: 120%; |
| | | |
| | | .detail { |
| | | .detail{ |
| | | // width: 50%; |
| | | font-size: 26rpx; |
| | | margin-bottom: 12rpx; |
| | | color: #555; |
| | | margin-right: 20rpx; |
| | | |
| | | text { |
| | | text{ |
| | | color: #999; |
| | | font-size: 26rpx; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .more { |
| | | .more{ |
| | | color: #888; |
| | | font-size: 24rpx; |
| | | display: flex; |
| | | border-top: 1px solid #eee; |
| | | padding-top: 20rpx; |
| | | |
| | | .part { |
| | | .part{ |
| | | width: 50%; |
| | | text-align: center; |
| | | } |
| | | } |
| | | |
| | | .op { |
| | | .op{ |
| | | display: flex; |
| | | justify-content: space-around; |
| | | margin-top: 20rpx; |
| | | |
| | | button { |
| | | button{ |
| | | padding: 0; |
| | | width: 130rpx; |
| | | font-size: 25rpx; |
| | |
| | | } |
| | | } |
| | | |
| | | .op1 { |
| | | .op1{ |
| | | border: 1px solid #41a863; |
| | | background-color: #41a863; |
| | | } |
| | | |
| | | .op2 { |
| | | .op2{ |
| | | border: 1px solid #d98d00; |
| | | background-color: #d98d00; |
| | | } |
| | | |
| | | .op3 { |
| | | .op3{ |
| | | border: 1px solid #3a78ff; |
| | | background-color: #3a78ff; |
| | | } |
| | | |
| | | .op4 { |
| | | .op4{ |
| | | border: 1px solid #da0000; |
| | | background-color: #da0000; |
| | | } |
| | | |
| | | .op5 { |
| | | .op5{ |
| | | border: 1px solid #888; |
| | | background-color: #888; |
| | | } |
| | | </style> |
| | | </style> |