123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165 |
- <template>
- <view>
- <view style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);margin-bottom: 20rpx">
- <u-tabs :list="list" :is-scroll="false" :current="current" @change="changetwo"></u-tabs>
- </view>
- <view v-for="(item,index) in dataList" :key="index"
- style="box-shadow: 0px 0px 8px 0px rgba(165, 189, 251, 0.4);width: 96%;border-top-right-radius: 10rpx;margin: 10rpx auto;padding-top: 10rpx;">
- <span
- style="width: 10rpx;height: 40rpx;background-color: #2979ff;display: block;float: left;margin-top: 10rpx;"></span>
- <h4 style="width: 140rpx;border-radius: 200rpx;text-align: center;color: #2979ff;border: 2rpx solid #1785FF;float: right;margin-right: 10rpx;margin-top: 10rpx;">{{item.fInspectorName}}</h4>
- <view style="width: 90%;margin: 0 auto;margin: 0 auto;">
- <view
- style="display: flex;justify-content: space-between;height: 60rpx;line-height: 60rpx;border-bottom: 1rpx solid #eff4ff;">
- <h4>{{item.fWarehouseName}}</h4>
- </view>
- <view>
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">计划日期</view>
- <view style="float: right;">{{item.fInspectionDatetime}}</view>
- </view>
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">最新巡查日期</view>
- <view style="float: right;">{{item.fUpdateTime}}</view>
- </view>
- <view style="width: 100%;height: 60rpx;line-height: 60rpx;">
- <view style="float: left;">备注</view>
- <view style="float: right;">{{item.remark}}</view>
- </view>
- </view>
- <view style="width: 100%;margin: 0 auto;height: 80rpx;margin: 0 auto;line-height: 80rpx;border-top: 1rpx solid #eff4ff;"
- @click="expenseDetails(item)">
- <view style="float: left;">
- <h3>立即巡检</h3>
- </view>
- <view style="float: right;">
- <u-icon name="arrow-right"></u-icon>
- </view>
- </view>
- </view>
- </view>
- <u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" />
- <u-calendar :closeable="false" v-model="show" mode="date" @change="change" :mask-close-able="false"></u-calendar>
- <u-action-sheet :list="warehouseList" @click="click" @close="close" :mask-close-able="false" v-model="warehouse"></u-action-sheet>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- show: false,
- status: 'loadmore',
- warehouseList:[],
- warehouse:false,
- loadText: {
- loadmore: '轻轻上拉',
- loading: '努力加载中',
- nomore: '实在没有了'
- },
- iconType: 'flower',
- dataList: [],
- list: [{
- name: '全部'
- }, {
- name: '仓库'
- }, {
- name: '计划日期'
- }, {
- name: '今日计划'
- }],
- form: {
- pageNum: 1,
- pageSize: 10,
- fInspectionDatetime: new Date().toLocaleDateString().replace(/\//g,"-")
- },
- current: 3,
- total: 0,
- }
- },
- created() {
- this.query()
- this.$u.get('/warehouse/check/selectTWarehouseListInCheck').then(res=>{
- console.log(res)
- for(let item in res.rows){
- this.warehouseList.push({
- text:res.rows[item].fName,
- fId:res.rows[item].fId
- })
- }
- console.log(this.warehouseList)
- })
- },
- onReachBottom() {
- this.status = 'loading'
- if (this.dataList.length < this.total) {
- this.form.pageNum++
- this.query()
- } else {
- this.status = 'nomore'
- }
- },
- methods: {
- close(){
- this.current = null
- },
- click(index){
- console.log(index)
- this.form.fWarehouseFid = this.warehouseList[index].fId
- this.dataList = []
- this.current = null
- this.query()
- },
- query() {
- // this.current = null
- this.$u.get('/warehouse/checkitems/listByUser', this.form).then(res => {
- this.dataList = this.dataList.concat(res.rows)
- this.total = res.total
- if (res.total === 0) this.status = 'nomore'
- })
- },
- change(e) {
- // console.log(e)
- this.current = null
- this.form.fInspectionDatetime = e.result
- this.dataList = []
- this.query()
- },
- changetwo(index) {
- console.log(index)
- if (index === 1) this.warehouse = true
- if (index === 2) this.show = true
- if (index === 3){
- this.form.fInspectionDatetime = new Date().toLocaleDateString().replace(/\//g,"-")
- this.dataList = []
- this.query()
- }
- if (index === 0) {
- this.form = {
- pageNum: 1,
- pageSize: 10
- }
- this.query()
- }
- this.current = index;
- },
- expenseDetails(item) {
- this.$u.route('/pages/home/patrolInspection/patrolDetails', {
- form: JSON.stringify(item)
- });
- },
- }
- }
- </script>
- <style lang="scss" scoped>
- .wrap {
- padding: 24rpx;
- }
- .item {
- padding: 24rpx 0;
- color: $u-content-color;
- font-size: 28rpx;
- }
- </style>
|