123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158 |
- <template>
- <view>
- <view v-for='item in dataInfo'>
- <view>
- 买方{{item.compName}}
- </view>
- <view>
- 卖方{{item.customerName}}
- </view>
- <view>{{item.paymentNo}}</view>
- <view>
- <view>{{item.goodsName}}{{item.netWeight}}</view>
- <view>单价{{item.tidalGrainPrice}}</view>
- </view>
- <view>
- <view>应付{{item.amountIngPayable}}</view>
- <view>单价{{item.amountEdPayable}}</view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- mapState
- } from 'vuex';
- export default {
- name: "business",
- data() {
- return {
- pageSize:10,
- currentPage:1,
- isLoadMore:false,
- searchKeyWord:'',
- searchType:'',
- dataInfo:[]
- }
- },
- onShow() {
- },
- onLoad(options) {
- this.loadData();
- },
- computed: {
- ...mapState(['hasLogin', 'userInfo']),
- },
- // onPageScroll(e) {
- // this.scrollTop = e.scrollTop;
- // },
- //下拉刷新
- onPullDownRefresh() {
- this.currentPage = 1
- this.isLoadMore = false
- this.loadStatus = 'loading'
- this.loadData()
- setTimeout(function() {
- uni.stopPullDownRefresh();
- }, 1000);
- },
- onReachBottom() { //上拉触底函数
- if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
- this.isLoadMore = true
- this.currentPage += 1
- this.getIndexBuyData()
- }
- },
- methods: {
- top() { //回到顶部
- uni.pageScrollTo({
- scrollTop: 0, duration: 300
- });
- },
- naviageToPage(page) {
- page = page + this.TabCur
- uni.navigateTo({
- url: page,
- fail() {
- uni.switchTab({
- url: page
- })
- }
- })
- },
- locationChange(e) {
- console.log(e)
- this.location = this.locationType[e[0]]
- this.receivePrivate = this.locationType[e[0]]
- this.currentPage = 1
- this.loadData()
- },
- tabSelect(e) {
- this.TabCur = e.currentTarget.dataset.id;
- this.category = this.TabCur
- this.currentPage = 1
- this.loadData()
- },
- //加载商品 ,带下拉刷新和上滑加载
- async loadData(type = 'add', loading) {
- if(!this.hasLogin){
- ni.showModal({
- title: '登录提示',
- content: '您尚未登录,是否立即登录?',
- showCancel: true,
- confirmText: '登录',
- success: (e) => {
- if (e.confirm) {
- uni.navigateTo({
- url: '/pages/public/login'
- })
- }
- },
- fail: () => {},
- complete: () => {}
- })
- }else{
- const that = this
- uni.showLoading({
- title: '正在加载'
- })
- var param1 = ''
- this.$api.doRequest('get', '/paymentManagement/selectPaymentManagement', {
- pageSize: this.pageSize,
- currentPage: this.currentPage,
- searchKeyWord: this.searchKeyWord,
- searchType: this.searchType,
- managementType:1,
- customerPhone:this.userInfo.phone,
- pcFlag:1
- // warehouseName:'',
- }).then(res => {
- uni.hideLoading()
- this.dataInfo = res.data.data.records
- })
- .catch(res => {
- uni.hideLoading()
- if (res.errmsg) {
- uni.showToast({
- title: res.errmsg,
- icon: 'none',
- duration: 2000
- })
- } else {
- uni.showToast({
- title: "系统异常,请联系管理员",
- icon: 'none',
- duration: 2000
- })
- }
- });
- }
-
- },
- }
- }
- </script>
- <style>
- </style>
|