| | |
| | | <input v-model="hform.HBillNo" placeholder="请输入单据号" /> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="buttons"> |
| | | <button class="btn-a" size="mini" type="default" @tap="clear">重置</button> |
| | | <!-- <button class="btn-b" size="mini" type="default">新增</button> --> |
| | | <button class="btn-c" size="mini" type="default" @tap="search">查询</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;"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.主题"> |
| | |
| | | <view class="detail" v-if="item.是否完成"> |
| | | <text>是否完成:</text>{{item.是否完成}} |
| | | </view> |
| | | |
| | | |
| | | <view class="detail" v-if="item.接收部门"> |
| | | <text>接收部门:</text>{{item.接收部门}} |
| | | </view> |
| | |
| | | </view> |
| | | <view class="detail" v-if="item.抄送人"> |
| | | <text>抄送人:</text>{{item.抄送人}} |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | <view class="detail" v-if="item.紧急程度"> |
| | | <text>紧急程度:</text>{{item.紧急程度}} |
| | | </view> |
| | |
| | | <view class="detail" v-if="item.表头备注"> |
| | | <text>表头备注:</text>{{item.表头备注}} |
| | | </view> |
| | | |
| | | |
| | | <view class="detail" v-if="item.制单日期"> |
| | | <text>制单日期:</text>{{item.制单日期.substr(0,10)}} |
| | | </view> |
| | |
| | | <text>作废人:</text>{{item.作废人}} |
| | | </view> |
| | | </view> |
| | | <!-- #endif --> |
| | | <!-- #ifdef MP-WEIXIN --> |
| | | <uni-card style="margin: 10px;"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item['主题']"> |
| | | <text>主题:</text>{{item['主题']}} |
| | | </view> |
| | | <view class="detail" v-if="item['异常类型']"> |
| | | <text>异常类型:</text>{{item['异常类型']}}({{item['异常类型代码']}}) |
| | | </view> |
| | | <view class="detail" v-if="item['发送部门']"> |
| | | <text>发送部门:</text>{{item['发送部门']}} |
| | | </view> |
| | | <view class="detail" v-if="item['发送人']"> |
| | | <text>发送人:</text>{{item['发送人']}} |
| | | </view> |
| | | <view class="detail" v-if="item['是否完成']"> |
| | | <text>是否完成:</text>{{item['是否完成']}} |
| | | </view> |
| | | <view class="detail" v-if="item['接收部门']"> |
| | | <text>接收部门:</text>{{item['接收部门']}} |
| | | </view> |
| | | <view class="detail" v-if="item['接收人']"> |
| | | <text>接收人:</text>{{item['接收人']}} |
| | | </view> |
| | | <view class="detail" v-if="item['抄送人']"> |
| | | <text>抄送人:</text>{{item['抄送人']}} |
| | | </view> |
| | | <view class="detail" v-if="item['紧急程度']"> |
| | | <text>紧急程度:</text>{{item['紧急程度']}} |
| | | </view> |
| | | <view class="detail" v-if="item['单据类型']"> |
| | | <text>单据类型:</text>{{item['单据类型']}} |
| | | </view> |
| | | <view class="detail" v-if="item['单据号码']"> |
| | | <text>单据号码:</text>{{item['单据号码']}} |
| | | </view> |
| | | <view class="detail" v-if="item['产品名称']"> |
| | | <text>产品名称:</text>{{item['产品名称']}} |
| | | </view> |
| | | <view class="detail" v-if="item['规格型号']"> |
| | | <text>规格型号:</text>{{item['规格型号']}} |
| | | </view> |
| | | <view class="detail" v-if="item['设备名称']"> |
| | | <text>设备名称:</text>{{item['设备名称']}} |
| | | </view> |
| | | <view class="detail" v-if="item['模治具名称']"> |
| | | <text>模治具名称:</text>{{item['模治具名称']}} |
| | | </view> |
| | | <view class="detail" v-if="item['处理人']"> |
| | | <text>处理人:</text>{{item['处理人']}}({{item['处理人代码']}}) |
| | | </view> |
| | | <view class="detail" v-if="item['处理内容']"> |
| | | <text>处理内容:</text>{{item['处理内容']}} |
| | | </view> |
| | | <view class="detail" v-if="item['处理结果']"> |
| | | <text>处理结果:</text>{{item['处理结果']}} |
| | | </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> |
| | | <view class="detail" v-if="item['异常反馈单主内码']"> |
| | | <text>异常反馈单主内码:</text>{{item['异常反馈单主内码']}} |
| | | </view> |
| | | <view class="detail" v-if="item['异常反馈单子内码']"> |
| | | <text>异常反馈单子内码:</text>{{item['异常反馈单子内码']}} |
| | | </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> |
| | | <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> |
| | | <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> |
| | | <view class="more"> |
| | | <view class="part" style="border-right: 1px solid #eee;" @tap="reads(item.内容)"> |
| | | <uni-icons type="bars" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>内容 |
| | | </view> |
| | | <!-- #endif --> |
| | | |
| | | <view class="more"> |
| | | <view class="part" style="border-right: 1px solid #eee;" @tap="reads(item.内容)"> |
| | | <uni-icons type="bars" style="color: #888;margin-right: 10rpx;" size="14"></uni-icons>内容 |
| | | </view> |
| | | <view class="part" style="border-right: 1px solid #eee;color: #d98d00;" @tap="toCheck(item)"> |
| | | <uni-icons type="bars" style="color: #d98d00;margin-right: 10rpx;" size="14"></uni-icons>审核 |
| | | </view> |
| | | <view class="part" style="color: #da0000;" @tap="toDel(item)"> |
| | | <uni-icons type="pulldown" style="color: #da0000;margin-right: 10rpx;" |
| | | size="14"></uni-icons>删除 |
| | | </view> |
| | | <view class="part" style="border-right: 1px solid #eee;color: #d98d00;" @tap="toCheck(item)"> |
| | | <uni-icons type="bars" style="color: #d98d00;margin-right: 10rpx;" size="14"></uni-icons>审核 |
| | | </view> |
| | | </uni-card> |
| | | <view class="part" style="color: #da0000;" @tap="toDel(item)"> |
| | | <uni-icons type="pulldown" style="color: #da0000;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 && loading">加载中</view> |
| | | <view class="over" v-if="listData.length != 0 && !loading">已到底</view> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import { getUserInfo } from "@/utils/auth.js"; |
| | | import getDateTime from '@/utils/getdateTime.js'; |
| | | export default { |
| | | data() { |
| | | return { |
| | | userInfo: getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API', |
| | | hform: { |
| | | HBillNo: '', |
| | | HEndDate: getDateTime.dateTimeStr('y-m-d'), |
| | | HBeginDate: this.getEndDate(), |
| | | data() { |
| | | return { |
| | | userInfo:getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API', |
| | | hform:{ |
| | | HBillNo:'', |
| | | HEndDate:getDateTime.dateTimeStr('y-m-d'), |
| | | HBeginDate:this.getEndDate(), |
| | | }, |
| | | sWhere: '', |
| | | listData: [], |
| | | listDataNew: [], |
| | | page: 1, |
| | | loading: true, |
| | | } |
| | | }, |
| | | sWhere:'', |
| | | listData:[], |
| | | listDataNew:[], |
| | | page:1, |
| | | loading:true, |
| | | } |
| | | }, |
| | | onLoad() { |
| | | uni.showLoading({ |
| | | title: '加载中' |
| | | title:'加载中' |
| | | }) |
| | | this.search() |
| | | // console.log(this.userInfo,uni.getStorageSync('HUserName')) |
| | | }, |
| | | onPullDownRefresh: function() { |
| | | this.clear() |
| | | setTimeout(() => { |
| | | setTimeout(()=>{ |
| | | uni.stopPullDownRefresh(); |
| | | }, 1000); |
| | | }, |
| | | onReachBottom() { |
| | | if (this.loading == true) { |
| | | onReachBottom(){ |
| | | if(this.loading == true){ |
| | | this.page++ |
| | | this.getList() |
| | | } |
| | | }, |
| | | methods: { |
| | | getList() { |
| | | console.log(this.sWhere, uni.getStorageSync('HUserName'), this.page) |
| | | methods: { |
| | | getList(){ |
| | | console.log(this.sWhere,uni.getStorageSync('HUserName'),this.page) |
| | | uni.request({ |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackHandleBillListPage', |
| | | data: { |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/Get_OA_ErrMsgBackHandleBillListPage', |
| | | data:{ |
| | | sWhere: this.sWhere, |
| | | user: uni.getStorageSync('HUserName'), |
| | | page: this.page, |
| | | size: 20, |
| | | page:this.page, |
| | | size:20, |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res.data); |
| | | success: (res) => { |
| | | console.log(1,res.data); |
| | | uni.hideLoading() |
| | | if (res.data.code == 1) { |
| | | if(res.data.code == 1){ |
| | | this.listDataNew = res.data.data |
| | | if (this.listDataNew.length < 20) { |
| | | if(this.listDataNew.length<20){ |
| | | this.loading = false |
| | | } |
| | | this.listData = this.listData.concat(this.listDataNew) |
| | | } else { |
| | | }else{ |
| | | 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' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | //选择单据日期 |
| | | HBeginDateChange(e) { |
| | | HBeginDateChange(e){ |
| | | console.log(e.detail.value) |
| | | this.hform.HBeginDate = e.detail.value |
| | | }, |
| | | //选择单据日期 |
| | | HEndDateChange(e) { |
| | | HEndDateChange(e){ |
| | | console.log(e.detail.value) |
| | | this.hform.HEndDate = e.detail.value |
| | | }, |
| | | search() { |
| | | this.sWhere = '' |
| | | this.listData = [] |
| | | this.listDataNew = [] |
| | | this.page = 1 |
| | | this.loading = true |
| | | search(){ |
| | | this.sWhere='' |
| | | this.listData=[] |
| | | this.listDataNew=[] |
| | | this.page=1 |
| | | this.loading=true |
| | | if (this.hform.HBeginDate) { |
| | | this.sWhere += " and CONVERT(varchar(100),日期, 23) >= '" + this.hform.HBeginDate + "'"; |
| | | } |
| | |
| | | } |
| | | this.getList() |
| | | }, |
| | | getEndDate() { |
| | | getEndDate(){ |
| | | let currentDate = new Date(); |
| | | currentDate.setMonth(currentDate.getMonth() - 1); |
| | | let year = currentDate.getFullYear(); |
| | |
| | | let day = String(currentDate.getDate()).padStart(2, '0'); |
| | | return `${year}-${month}-${day}`; |
| | | }, |
| | | clear() { |
| | | clear(){ |
| | | this.sWhere = '' |
| | | this.hform = { |
| | | HBillNo: '', |
| | | HEndDate: getDateTime.dateTimeStr('y-m-d'), |
| | | HBeginDate: this.getEndDate(), |
| | | HBillNo:'', |
| | | HEndDate:getDateTime.dateTimeStr('y-m-d'), |
| | | HBeginDate:this.getEndDate(), |
| | | } |
| | | this.search() |
| | | }, |
| | | reads(e) { |
| | | reads(e){ |
| | | uni.showModal({ |
| | | content: e, |
| | | showCancel: false |
| | | }); |
| | | }, |
| | | toCheck(item) { |
| | | toCheck(item){ |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '是否确认审核?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | title: '提示', |
| | | content: '是否确认审核?', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.request({ |
| | | url: this.serverUrl + |
| | | '/Sc_MESTransFerWorkBill/AuditOA_ErrMsgBackHandleBill', |
| | | data: { |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/AuditOA_ErrMsgBackHandleBill', |
| | | data:{ |
| | | HInterID: item.hmainid, |
| | | CurUserName: uni.getStorageSync('HUserName'), |
| | | IsAudit: 0 |
| | | IsAudit:0 |
| | | }, |
| | | success: (res) => { |
| | | console.log(1, res); |
| | | if (res.data.count == 1) { |
| | | success: (res) => { |
| | | console.log(1,res); |
| | | if(res.data.count == 1){ |
| | | this.clear() |
| | | } |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | } |
| | | } |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | } |
| | | } |
| | | }); |
| | | }, |
| | | toDel(item) { |
| | | toDel(item){ |
| | | uni.showModal({ |
| | | title: '提示', |
| | | content: '确认要删除吗,删除后不能恢复', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | title: '提示', |
| | | content: '确认要删除吗,删除后不能恢复', |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | console.log('用户点击确定'); |
| | | uni.request({ |
| | | url: this.serverUrl + |
| | | '/Sc_MESTransFerWorkBill/DeleteOA_ErrMsgBackHandleBill', |
| | | data: { |
| | | url: this.serverUrl + '/Sc_MESTransFerWorkBill/DeleteOA_ErrMsgBackHandleBill', |
| | | data:{ |
| | | HInterID: item.hmainid, |
| | | 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.clear() |
| | | } |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | } |
| | | } |
| | | } else if (res.cancel) { |
| | | console.log('用户点击取消'); |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .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; |
| | | line-height: 66rpx; |
| | | font-size: 28rpx; |
| | | } |
| | | |
| | | .btn-a { |
| | | .btn-a{ |
| | | background-color: #acacac; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-b { |
| | | .btn-b{ |
| | | background-color: #41a863; |
| | | color: #fff; |
| | | } |
| | | |
| | | .btn-c { |
| | | .btn-c{ |
| | | background-color: #3a78ff; |
| | | 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; |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | | |
| | | </style> |