| | |
| | | <view class="title">状态:</view> |
| | | <view class="right"> |
| | | <picker :range="arrayStatus" :value="hform.HStatus" @change="HStatusChange"> |
| | | <view class="picker-overlay"></view> |
| | | <input name="HStatus" disabled :value="hform.HStatus" placeholder="请选择状态" /> |
| | | </picker> |
| | | </view> |
| | |
| | | <view class="title">开始时间:</view> |
| | | <view class="right"> |
| | | <picker mode="date" :value="hform.HBeginDate" @change="HBeginDateChange"> |
| | | <view class="picker-overlay"></view> |
| | | <input name="HBeginDate" disabled :value="hform.HBeginDate" placeholder="请选择" /> |
| | | </picker> |
| | | </view> |
| | |
| | | <view class="title">结束时间:</view> |
| | | <view class="right"> |
| | | <picker mode="date" :value="hform.HEndDate" @change="HEndDateChange"> |
| | | <view class="picker-overlay"></view> |
| | | <input name="HEndDate" disabled :value="hform.HEndDate" placeholder="请选择" /> |
| | | </picker> |
| | | </view> |
| | |
| | | arrayStatus: ['全部', '未审核', '已审核', '已关闭'], |
| | | hform: { |
| | | HStatus: '全部', |
| | | HBeginDate: '', |
| | | HEndDate: '', |
| | | HBeginDate: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString().split('T')[0], |
| | | HEndDate: new Date().toISOString().split('T')[0], |
| | | HICMOBillNo: '', |
| | | HBillNo: '', |
| | | HProcExchBillNo: '', |
| | |
| | | }, 1000); |
| | | }, |
| | | methods: { |
| | | SearchWhere() { //过滤条件 |
| | | this.sWhere = ''; // 先清空条件 |
| | | if (this.hform.HStatus) { |
| | | if (this.hform.HStatus == '全部') { |
| | | this.sWhere += ""; |
| | | } else if (this.hform.HStatus == '未审核') { |
| | | this.sWhere += " and 审核人=''"; |
| | | } else if (this.hform.HStatus == '已审核') { |
| | | this.sWhere += " and 审核人<>''"; |
| | | } else if (this.hform.HStatus == '已关闭') { |
| | | this.sWhere += " and 关闭人<>''"; |
| | | } |
| | | } |
| | | if (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 + "'"; |
| | | } |
| | | if (this.hform.HBillNo) { |
| | | this.sWhere += " and 单据号 like '%" + this.hform.HBillNo + "%'"; |
| | | } |
| | | if (this.hform.HICMOBillNo) { |
| | | this.sWhere += " and 生产订单号 like '%" + this.hform.HICMOBillNo + "%'"; |
| | | } |
| | | if (this.hform.HProcExchBillNo) { |
| | | this.sWhere += " and 流转卡号 like '%" + this.hform.HProcExchBillNo + "%'"; |
| | | } |
| | | return this.sWhere |
| | | }, |
| | | getPage(page, list) { |
| | | let sindex = (parseInt(page) - 1) * 20 |
| | | let eindex = parseInt(page) * 20 |
| | |
| | | return newList |
| | | }, |
| | | getList() { |
| | | this.sWhere = this.SearchWhere() |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }) |
| | |
| | | this.listData = [] |
| | | this.page = 1 |
| | | this.showList = [] |
| | | |
| | | console.log(this.hform) |
| | | |
| | | if (this.hform.HStatus) { |
| | | if (this.hform.HStatus == '全部') { |
| | | this.sWhere += ""; |
| | | } else if (this.hform.HStatus == '未审核') { |
| | | this.sWhere += " and 审核人=''"; |
| | | } else if (this.hform.HStatus == '已审核') { |
| | | this.sWhere += " and 审核人<>''"; |
| | | } else if (this.hform.HStatus == '已关闭') { |
| | | this.sWhere += " and 关闭人<>''"; |
| | | } |
| | | } |
| | | if (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 + "'"; |
| | | } |
| | | if (this.hform.HBillNo) { |
| | | this.sWhere += " and 单据号 like '%" + this.hform.HBillNo + "%'"; |
| | | } |
| | | if (this.hform.HICMOBillNo) { |
| | | this.sWhere += " and 生产订单号 like '%" + this.hform.HICMOBillNo + "%'"; |
| | | } |
| | | if (this.hform.HProcExchBillNo) { |
| | | this.sWhere += " and 流转卡号 like '%" + this.hform.HProcExchBillNo + "%'"; |
| | | } |
| | | |
| | | |
| | | this.getList() |
| | | }, |
| | | //新增 |
| | |
| | | this.operations = -1, |
| | | this.hform = { |
| | | HStatus: '全部', |
| | | HBeginDate: '', |
| | | HEndDate: '', |
| | | HBeginDate: new Date(Date.now() - 7 * 24 * 60 * 60 * 1000).toISOString().split('T')[0], |
| | | HEndDate: new Date().toISOString().split('T')[0], |
| | | HICMOBillNo: '', |
| | | HBillNo: '', |
| | | HProcExchBillNo: '', |