Browse Source

删除无用引入

master
zq 1 month ago
parent
commit
2315183322
  1. 70
      pages/home/index.vue

70
pages/home/index.vue

@ -1,7 +1,4 @@
<template> <template>
<!-- <view style="height:100vh">
<Mescroll @resultEvent="getList" ref="scroll" rqurl="/api/getlist">
<template v-slot:list> -->
<view class="home-wrap"> <view class="home-wrap">
<view class="amountWrap flex"> <view class="amountWrap flex">
<view class="amountLeft flex"> <view class="amountLeft flex">
@ -14,11 +11,9 @@
</view> </view>
</view> </view>
<view class="patientTab"> <view class="patientTab">
<view :class="'notActive ft32' + (status == '1' ? ' active PfScMedium' : '')" <view :class="'notActive ft32' + (status == '1' ? ' active PfScMedium' : '')" @click="changeWaitType('1')">
@click="changeWaitType('1')">
库存列表</view> 库存列表</view>
<view :class="'notActive ft32' + (status == '2' ? ' active PfScMedium' : '')" <view :class="'notActive ft32' + (status == '2' ? ' active PfScMedium' : '')" @click="changeWaitType('2')">
@click="changeWaitType('2')">
出库列表 出库列表
</view> </view>
</view> </view>
@ -72,9 +67,6 @@
</view> </view>
</PopUpCommon> </PopUpCommon>
</view> </view>
<!-- </template>
</Mescroll>
</view> -->
</template> </template>
<script> <script>
@ -82,14 +74,12 @@ import ListBox from '@/components/listBox.vue';
import PopUpCommon from '@/components/common/popUpCommon.vue'; import PopUpCommon from '@/components/common/popUpCommon.vue';
import CoinsDetail from '../coinsDetail'; import CoinsDetail from '../coinsDetail';
import PageBottomBtn from '@/components/pageBottomBtn.vue' import PageBottomBtn from '@/components/pageBottomBtn.vue'
import Mescroll from '@/components/common/mescroll.vue'
export default { export default {
options: { styleIsolation: "shared" }, options: { styleIsolation: "shared" },
components: { components: {
PopUpCommon, PopUpCommon,
PageBottomBtn, PageBottomBtn,
Mescroll,
ListBox, ListBox,
CoinsDetail CoinsDetail
}, },
@ -131,10 +121,10 @@ export default {
size: "24.0*1.1mm,3.5g", size: "24.0*1.1mm,3.5g",
year: "1889" year: "1889"
}, },
loading:false, loading: false,
noMore:false, noMore: false,
page:1, page: 1,
pagesize:7 pagesize: 7
} }
}, },
@ -158,23 +148,23 @@ export default {
} }
}, },
methods: { methods: {
onScroll(){ onScroll() {
console.log(this.noMore,'000',this.loading,'this.loading=='); console.log(this.noMore, '000', this.loading, 'this.loading==');
if (!this.noMore && !this.loading) { if (!this.noMore && !this.loading) {
this.page++; this.page++;
this.getCoinsList(); this.getCoinsList();
} }
}, },
getList(e){ getList(e) {
console.log(e,'=====eeee'); console.log(e, '=====eeee');
}, },
getCoinsList() { getCoinsList() {
this.loading = true; this.loading = true;
// //
this.$http.req('/api/getlist', { status: this.status, page: this.page, pagesize: this.pagesize}, 'POST').then(data => { this.$http.req('/api/getlist', { status: this.status, page: this.page, pagesize: this.pagesize }, 'POST').then(data => {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
this.loading = false; this.loading = false;
if ( data.list.length === 0 || data.length == 0 ) { if (data.list.length === 0 || data.length == 0) {
this.noMore = true; this.noMore = true;
uni.showToast({ title: '没有更多数据了', icon: 'none' }); uni.showToast({ title: '没有更多数据了', icon: 'none' });
return; return;
@ -187,12 +177,12 @@ export default {
} }
this.storage_count = data.storage_count; this.storage_count = data.storage_count;
this.delivery_count = data.delivery_count; this.delivery_count = data.delivery_count;
}).catch(res=>{ }).catch(res => {
this.loading = false; this.loading = false;
}); });
}, },
lookDetail(item) { lookDetail(item) {
uni.setStorageSync('detail',JSON.stringify(item)) uni.setStorageSync('detail', JSON.stringify(item))
// let url = `/pages/coinsDetail/index` // let url = `/pages/coinsDetail/index`
let url = `/pages/coinsDetail/index?id=${item.rating_code}` let url = `/pages/coinsDetail/index?id=${item.rating_code}`
this.$nav.navToPath(url) this.$nav.navToPath(url)
@ -218,7 +208,7 @@ export default {
}, },
complete(res) { complete(res) {
if (res.errMsg === 'scanCode:ok') { if (res.errMsg === 'scanCode:ok') {
console.log('扫码成功11:', res.result,this); console.log('扫码成功11:', res.result, this);
} else if (res.errMsg === 'scanCode:fail cancel') { } else if (res.errMsg === 'scanCode:fail cancel') {
console.log('用户取消扫码'); console.log('用户取消扫码');
} else { } else {
@ -231,18 +221,18 @@ export default {
}) })
// #endif // #endif
}, },
getScanQrcode(result){ getScanQrcode(result) {
this.$http.req('/api/get_scan_code_detail', { this.$http.req('/api/get_scan_code_detail', {
url:result url: result
}, 'POST').then(data => { }, 'POST').then(data => {
console.log(data,'data===data'); console.log(data, 'data===data');
this.scanCodeDetail = data; this.scanCodeDetail = data;
this.$set(this,'scanCodeDetail',data) this.$set(this, 'scanCodeDetail', data)
setTimeout(()=>{ setTimeout(() => {
console.log(this.scanCodeDetail,'222'); console.log(this.scanCodeDetail, '222');
this.$refs.coinsPopup.openPop(); this.$refs.coinsPopup.openPop();
},500) }, 500)
}).catch(res=>{ }).catch(res => {
}); });
}, },
async onConfirm() { async onConfirm() {
@ -251,14 +241,14 @@ export default {
let operate = '' let operate = ''
// url // url
let status = this.scanCodeDetail.ancient_coin_status; let status = this.scanCodeDetail.ancient_coin_status;
if(status ==0 || status == 2){ if (status == 0 || status == 2) {
operate = '1' operate = '1'
}else{ } else {
operate = '2' operate = '2'
} }
// //
this.$http.req(url, { this.$http.req(url, {
scan_code_detail:JSON.stringify(this.scanCodeDetail), scan_code_detail: JSON.stringify(this.scanCodeDetail),
operate: operate operate: operate
}, 'POST').then(data => { }, 'POST').then(data => {
// - // -
@ -273,7 +263,7 @@ export default {
// //
this.getCoinsList() this.getCoinsList()
this.$refs.coinsPopup.closePop() this.$refs.coinsPopup.closePop()
}).catch(res=>{ }).catch(res => {
this.loading = false; this.loading = false;
}); });
@ -536,13 +526,15 @@ export default {
border-radius: 12rpx; border-radius: 12rpx;
} }
.page-padding{ .page-padding {
padding-bottom: constant(safe-area-inset-bottom); padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom); padding-bottom: env(safe-area-inset-bottom);
width: 100%; width: 100%;
height: 206rpx; height: 206rpx;
} }
.loading-text, .no-more-text {
.loading-text,
.no-more-text {
text-align: center; text-align: center;
padding: 20rpx; padding: 20rpx;
color: #999; color: #999;

Loading…
Cancel
Save