| | |
| | | <view class="form-item"> |
| | | <view class="title">{{$t("Gy.EquipNumber_Search")}}:</view> |
| | | <view class="right"> |
| | | <input type="text" :value="condition.HNumber" /> |
| | | <input type="text" v-model="condition.HNumber" /> |
| | | </view> |
| | | </view> |
| | | <view class="form-item"> |
| | | <view class="title">{{$t("Gy.EquipName_Search")}}:</view> |
| | | <view class="right"> |
| | | <input type="text" :value="condition.HName" /> |
| | | <input type="text" v-model="condition.HName" /> |
| | | </view> |
| | | </view> |
| | | <view class="search-buttons"> |
| | |
| | | <button class="btn-a" size="mini" type="default" @tap="clear">重置</button> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <!-- 显示列表 --> |
| | | <view class="list" v-for="(item,index) in displayData" :key="index"> |
| | | <uni-card :title="item.设备名称" style="margin: 10px;" |
| | | > |
| | | <uni-card :title="item.设备名称" style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <template v-for="(HBillField, index) in CommonUtils.emptyValueFilter(item,fieldData).slice(0,10)"> |
| | | <view class="detail" v-if="HBillField.ColmType == 'DateTime'"> |
| | |
| | | <text>{{ HBillField.ColmCols }}:</text>{{ item[HBillField.ColmCols] }} |
| | | </view> |
| | | </template> |
| | | |
| | | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="more" v-if="showDetail == index && operations != 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 class="over" v-if="!readCompelete">正在获取数据...</view> |
| | | <view class="over" v-if="readCompelete">没有更多数据...</view> |
| | | </template> |
| | | |
| | | |
| | | <ba-tree-picker ref="treePicker" :multiple='false' @select-change="selectChange" title="选择部门" |
| | | :localdata="reportTreeList" valueKey="id" textKey="title" childrenKey="children" /> |
| | | </view> |
| | |
| | | CommonUtils, |
| | | showDetail: -1, |
| | | operations: -1, |
| | | |
| | | |
| | | reportTreeList: [], |
| | | selectedList: [], |
| | | displayData: [], |
| | | fieldData: [], |
| | | |
| | | |
| | | readCompelete: false, |
| | | page: 1, |
| | | size: 20, |
| | | |
| | | |
| | | HDateMiddle: dayjs(new Date()).format("YYYY-MM-DD"), |
| | | |
| | | |
| | | |
| | | |
| | | condition: { |
| | | HDeptID: 0, |
| | | HDeptName: "", |
| | |
| | | methods: { |
| | | search() { |
| | | this.page = 1 |
| | | this.displayData = [] |
| | | this.getReport() |
| | | }, |
| | | clear() { |
| | | |
| | | this.page = 1 |
| | | this.displayData = [] |
| | | this.condition.HDeptID = 0 |
| | | this.condition.HDeptName = "" |
| | | this.condition.HBeginDate = dayjs(new Date()).format("YYYY-MM-DD") |
| | | this.condition.HEndDate = dayjs(new Date()).format("YYYY-MM-DD") |
| | | this.condition.HNumber = "" |
| | | this.condition.HName = "" |
| | | }, |
| | | showPicker() { |
| | | this.$refs.treePicker._show(); |
| | |
| | | try { |
| | | let sWhere = "" |
| | | sWhere += this.combineSWhereStr(sWhere) |
| | | |
| | | |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: "/SB_EquipRunningStatus/Report", |
| | | url: "/SB_EquipRunningStatus/ReportPage", |
| | | data: { |
| | | sWhere, |
| | | user: getUserInfo()["Czymc"], |
| | |
| | | size: this.size |
| | | } |
| | | }) |
| | | |
| | | let {data, count, Message, list} = res.data |
| | | |
| | | if(count == 1) { |
| | | if(data.length == 0) { |
| | | |
| | | let { |
| | | data, |
| | | count, |
| | | Message, |
| | | list |
| | | } = res.data |
| | | |
| | | if (count == 1) { |
| | | if (data.length == 0) { |
| | | // 数据已经读完 |
| | | this.page-- |
| | | this.readCompelete = true |
| | | return |
| | | } |
| | | |
| | | |
| | | this.displayData.push(...data) |
| | | this.fieldData = CommonUtils.fieldListFilterRole({ |
| | | FieldList: list, |
| | | ExcludeKeys: ["设备名称"] |
| | | }).data || [] |
| | | }else { |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `获取报表信息失败: ${Message}` |
| | |
| | | |
| | | if (this.condition.HBeginDate && this.condition.HEndDate) { |
| | | sWhere += |
| | | ` and CONVERT(varchar(100),所属日期, 23) >= '${this.condition.HBeginDate}' and CONVERT(varchar(100),所属日期, 23) <= '${this.condition.HEndDate}'` |
| | | ` and CONVERT(varchar(100),所属日期, 23) >= '${this.condition.HBeginDate}' and CONVERT(varchar(100),所属日期, 23) <= '${this.condition.HEndDate}' ` |
| | | } |
| | | |
| | | if (this.condition.HNumber) { |
| | | sWhere += ` and 设备编码 like '%${this.condition.HNumber}'%` |
| | | sWhere += ` and 设备编码 like '%${this.condition.HNumber}%' ` |
| | | } |
| | | |
| | | if (this.condition.HName) { |
| | | sWhere += ` and 设备名称 like '%${this.condition.HName}'%` |
| | | sWhere += ` and 设备名称 like '%${this.condition.HName}%' ` |
| | | } |
| | | |
| | | return sWhere |
| | | } |
| | | }, |
| | | onLoad() { |
| | | this.GetReportTreeList() |
| | | this.GetReportTreeList(); |
| | | this.getReport(); |
| | | }, |
| | | onReachBottom(){ |
| | | onReachBottom() { |
| | | this.page++ |
| | | this.getReport() |
| | | } |