123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191 |
- <template>
- <!-- 调拨记录 -->
- <view>
- <u-navbar title="调拨记录" autoBack placeholder></u-navbar>
- <view style="padding-bottom: 30rpx;" v-if="list.length > 0">
- <view class="transfer_card_item" v-for="(item,index) in list" :key="index">
- <view class="title_status" :style="{color:getColor(item.status)}">{{ getstatus(item.status) }}</view>
- <view class="item_title_record1">
- <span>调拨人:</span>
- {{item.allotUser.nickName}}
- </view>
- <view class="item_title_record">
- <span>接收人:</span>
- {{item.acceptUser.nickName}}
- </view>
- <view class="item_title_record">
- <span>调拨时间:</span>
- {{item.createdAt}}
- </view>
- <view class="item_title_record">
- <span>钢瓶编号:</span>
- <span class="examine_title" @click="clickToView(item)">点击查看</span>
- </view>
- </view>
- </view>
- <view style="margin-top: 40%;" v-else>
- <u-empty mode="list" text="暂无调拨记录"></u-empty>
- </view>
- <u-popup :show="innerCodeShow" round="10" @close="close">
- <view>
- <view class="headlinetitle">钢瓶编号</view>
- <view class="card_inner_item" v-for="(item,index) in innerCodeData" :key="index">
- <view class="title_index_item">{{index + 1}}</view>
- <view>{{item}}</view>
- </view>
- </view>
- </u-popup>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- list: [],
- Pagination: {
- PageIndex: 1,
- PageSize: 20,
- Total: 0,
- },
- loadingMore: true,
- innerCodeShow: false,
- innerCodeData: []
- }
- },
- onReachBottom() {
- if (!this.loadingMore) {
- this.getList()
- }
- },
- mounted() {
- this.getList()
- },
- methods: {
- getList() {
- this.loadingMore = true
- this.$api.get('/api/gas-cylinder-allot', {
- page: this.Pagination.PageIndex,
- pageSize: this.Pagination.PageSize,
- }).then(res => {
- if (res.code == 200) {
- const data = res.data.list
- if (this.loadingMore == true && data) {
- this.list = this.list.concat(data);
- }
- if (data.length < this.Pagination.PageSize) {
- this.loadingMore = true
- } else {
- this.loadingMore = false
- this.Pagination.PageIndex++
- }
- }
- })
- },
- // 点击查看
- clickToView(value) {
- this.innerCodeShow = true
- this.innerCodeData = value.innerCodeList
- },
- getstatus(value) {
- if (value == 1) {
- return '调拨中'
- } else if (value == 2) {
- return '调拨完成'
- } else if (value == 3) {
- return '取消调拨'
- } else if (value == 4) {
- return '超时取消'
- }
- },
- getColor(value) {
- if (value == 1) {
- return '#3c9cff'
- } else if (value == 2) {
- return '#5ac725'
- } else if (value == 3) {
- return '#909399'
- } else if (value == 4) {
- return '#909399'
- }
- },
- close() {
- this.innerCodeShow = false
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- page {
- background-color: #f4f4f5;
- }
- .transfer_card_item {
- position: relative;
- background-color: #fff;
- margin: 30rpx;
- padding: 30rpx;
- border-radius: 10rpx;
- }
- .title_status {
- position: absolute;
- right: 20rpx;
- top: 20rpx;
- display: flex;
- justify-content: flex-end;
- font-size: 28rpx;
- }
- .item_title_record1 {
- font-size: 30rpx;
- span {
- font-size: 28rpx;
- color: #909399;
- }
- .examine_title {
- cursor: pointer;
- color: #2979ff;
- }
- }
- .item_title_record {
- font-size: 30rpx;
- margin-top: 10rpx;
- span {
- font-size: 28rpx;
- color: #909399;
- }
- .examine_title {
- cursor: pointer;
- color: #2979ff;
- }
- }
- .title_index_item {
- color: #909399;
- margin-right: 20rpx;
- }
- .headlinetitle {
- display: flex;
- align-items: center;
- justify-content: center;
- padding: 20rpx;
- font-size: 34rpx;
- font-weight: 600;
- border-bottom: 1rpx solid #d7d7d7;
- }
- .card_inner_item {
- display: flex;
- align-items: center;
- padding: 30rpx;
- border-bottom: 1rpx solid #d7d7d7;
- }
- </style>
|