Browse Source

开单,欠款列表

master
tianyi@bogon 3 years ago
parent
commit
5d15c7929c
  1. 166
      pages/index/downarrears.vue
  2. 161
      pages/index/uparrears.vue
  3. 337
      pages/index/upstream.vue

166
pages/index/downarrears.vue

@ -1,74 +1,104 @@
<template>
<view>
<u-alert description="点击可跳转至出库单" type="primary"></u-alert>
<u-cell-group :title="nickname" :customStyle="{'background-color':'#ffffff'}">
<u-cell clickable
v-for="(item,indx) in list" :key="indx">
<view slot="title" class="u-slot-title">
<view class="u-cell-text">销售总金额:{{ item.totalAmount }}</view>
<view class="u-cell-text"> 应收总金额:{{ item.realAmount }}</view>
<view class="u-cell-text-time">{{item.createTime}}</view>
</view>
<view slot="value" class="right">
<view class="u-cell-text">已收金额:{{ item.alreadyEarn }}</view>
<view class="u-cell-text"> 未收金额:{{ item.noEarn }}</view>
<view style="opacity: 0">123</view>
</view>
</u-cell>
</u-cell-group>
<u-empty mode="list" v-if="list.length === 0">
</u-empty>
</view>
<view>
<u-alert description="点击可跳转至出库单" type="primary"></u-alert>
<!-- <u-cell-group :title="nickname" :customStyle="{'background-color':'#ffffff'}">
<u-cell clickable v-for="(item,indx) in list" :key="indx">
<view slot="title" class="u-slot-title">
<view class="u-cell-text">销售总金额:{{ item.totalAmount }}</view>
<view class="u-cell-text"> 应收总金额:{{ item.realAmount }}</view>
<view class="u-cell-text-time">{{item.createTime}}</view>
</view>
<view slot="value" class="right">
<view class="u-cell-text">已收金额:{{ item.alreadyEarn }}</view>
<view class="u-cell-text"> 未收金额:{{ item.noEarn }}</view>
<view style="opacity: 0">123</view>
</view>
</u-cell>
</u-cell-group>
<u-empty mode="list" v-if="list.length === 0">
</u-empty> -->
<view class="ulList" v-if="list.length > 0">
<ul>
<li v-for="item in list" @tap="gotoDetail(item.id)">
<uni-card :title="item.companyName" :sub-title="item.createTime" :extra="'共'+item.totalAmount + '件'"
thumbnail="/static/images/dingdan/dd1.png">
<view class="uni-body"><text class="cardText">销售员:</text> {{item.createByName}}</view>
<view class="uni-body"> <text class="cardText"> 销售总额:</text> <text class="priceText">
{{item.shouldPay}} </text> <text decode class="cardText">
{{'&nbsp;&nbsp;&nbsp;&nbsp; 欠款: '}} </text> <text class="priceText">{{item.noEarn}}
</text></view>
<view class="uni-body"> <text class="cardText">
订单状态:</text>{{item.payStatus == 0 ?'待抢单' :item.payStatus == 1 ?'待取货' :item.payStatus == 3 ?'待送达' :item.payStatus == 4 ?'已完成' :item.payStatus == 5 ?'下游客户待退货' :item.payStatus == 00 ?'退货待抢单' :item.payStatus == 01 ?'退货待取货' :item.payStatus == 03 ?'退货待送达' :item.payStatus == 04 ?'待确认退货' :item.payStatus == 6 ?'待配货' :'挂单'}}
</view>
</uni-card>
</li>
</ul>
<u-loadmore :status="status" />
</view>
<u-empty v-else mode="order" margin-top="200"></u-empty>
</view>
</template>
<script>
import color from "../../uni_modules/uview-ui/libs/config/color";
import color from "../../uni_modules/uview-ui/libs/config/color";
export default {
name: "downarrears",
computed: {
color() {
return color
}
},
data() {
return {
userId: '',
nickname: '',
list: []
}
},
onLoad(options) {
this.userId = options.userId
this.nickname = options.nickname
this.getList()
},
methods: {
getList() {
this.tui.request("/app/sale/list", "post", {
// userId: this.userId
userId: '1704126992443641856'
}, false, false).then((res) => {
if(res.code == 200){
this.list = res.result
}else{
this.tui.toast(res.message)
}
})
}
}
}
export default {
name: "downarrears",
computed: {
color() {
return color
}
},
data() {
return {
userId: '',
nickname: '',
list: []
}
},
onLoad(options) {
this.userId = options.userId
this.nickname = options.nickname
this.getList()
},
methods: {
getList() {
this.tui.request("/app/sale/list", "post", {
// userId: this.userId
userId: '1704126992443641856'
}, false, false).then((res) => {
if (res.code == 200) {
this.list = res.result
} else {
this.tui.toast(res.message)
}
})
}
}
}
</script>
<style scoped lang="scss">
.u-cell-text {
color: #333333;
}
.u-cell-text-time {
font-size: 22rpx;
color: grey;
}
.right {
flex: 1;
}
</style>
.ulList {
ul {
li {
font-size: 12px;
.floatRight {
float: right;
padding: 14rpx;
color: $u-primary;
font-size: 26upx;
}
.cardText {
font-size: 12px;
}
.priceText {
color: $u-primary;
font-size: 14px;
}
}
}
}
</style>

161
pages/index/uparrears.vue

@ -1,75 +1,100 @@
<template>
<view>
<u-alert description="点击可跳转至入库单" type="primary"></u-alert>
<u-cell-group :title="consigneeName" :customStyle="{'background-color':'#ffffff'}">
<u-cell clickable
v-for="(item,indx) in list" :key="indx" :label="item.createTime" >
<view slot="title" class="u-slot-title">
<view class="u-cell-text">销售金额:{{ item.totalAmount }}</view>
<view class="u-cell-text"> 应付金额:{{ item.shouldPay }}</view>
</view>
<view slot="value" class="right">
<view class="u-cell-text">已付:{{ item.alreadyPay }}</view>
<view class="u-cell-text"> 未付:{{ item.noPay }}</view>
</view>
<view slot="right-icon">
<u-button type="primary" size="mini" text="回款"></u-button>
</view>
</u-cell>
</u-cell-group>
</view>
<view>
<u-alert description="点击可跳转至入库单" type="primary"></u-alert>
<view class="ulList" v-if="list.length > 0">
<ul>
<li v-for="item in list" @tap="gotoDetail(item.id)">
<uni-card :title="item.id" :sub-title="item.createTime" :extra="'共'+item.totalAmount + '件'"
thumbnail="/static/images/dingdan/dd1.png">
<view class="uni-body"><text class="cardText">销售员:</text> {{item.createBy}}</view>
<view class="uni-body"> <text class="cardText"> 总成本:</text> <text class="priceText">
{{item.shouldPay}} </text> <text decode class="cardText">
{{'&nbsp;&nbsp;&nbsp;&nbsp; 欠款: '}} </text> <text class="priceText">{{item.noPay}}
</text></view>
<view class="uni-body"> <text class="cardText">
订单状态:</text>{{item.inStorageStatus == 0 ?'未入库' :'已入库'}}
</view>
</uni-card>
</li>
</ul>
<u-loadmore :status="status" />
</view>
<u-empty v-else mode="order" margin-top="200"></u-empty>
</view>
</template>
<script>
import color from "../../uni_modules/uview-ui/libs/config/color";
import color from "../../uni_modules/uview-ui/libs/config/color";
export default {
name: "uparrears",
computed: {
color() {
return color
}
},
data() {
return {
supplierId: '',
consigneeName:'',
list: []
}
},
onLoad(options) {
this.supplierId = options.supplierId
this.consigneeName = options.consigneeName
this.getList()
},
methods: {
getList() {
this.tui.request("/app/purchase/debtPurchase", "get", {
supplierId: this.supplierId
}, false, true).then((res) => {
if(res.code == 200){
this.list = res.result
console.log(res)
}else{
this.tui.toast(res.message)
export default {
name: "uparrears",
computed: {
color() {
return color
}
},
data() {
return {
supplierId: '',
consigneeName: '',
list: [],
// status: 'loadmore',
// page: 1,
// totalPages: 0,
}
},
// onReachBottom() {
// if (this.page >= this.totalPages) return;
// this.status = 'loading';
// this.page = ++this.page;
// this.getList();
// },
onLoad(options) {
this.supplierId = options.supplierId
this.consigneeName = options.consigneeName
this.getList()
},
methods: {
getList() {
this.tui.request("/app/purchase/debtPurchase", "get", {
supplierId: this.supplierId
}, false, true).then((res) => {
if (res.code == 200) {
this.list = res.result
console.log(res)
} else {
this.tui.toast(res.message)
}
})
}
}
}
})
},
goDetail(){
}
}
}
</script>
<style scoped lang="scss">
.u-cell-text {
color: #333333;
}
.u-cell-text-time {
font-size: 22rpx;
color: grey;
}
.right {
flex: 1;
}
.huikuananniu {
color: #4a67d6;
}
</style>
.ulList {
ul {
li {
font-size: 12px;
.floatRight {
float: right;
padding: 14rpx;
color: $u-primary;
font-size: 26upx;
}
.cardText {
font-size: 12px;
}
.priceText {
color: $u-primary;
font-size: 14px;
}
}
}
}
</style>

337
pages/index/upstream.vue

@ -1,173 +1,184 @@
<template>
<view>
<view class="formBox">
<u-alert description="点击可查看对应每笔入库单" type="primary"></u-alert>
<view class="swipe-action">
<view class="swipe-action__content" @tap="onItemClick(item)" v-for="(item,index) in list" :key="index">
<view class="swipe-action__content__left">
<view class="swipe-action__content__text">{{ item.consigneeName }}</view>
</view>
<view class="swipe-action__content__right">
<view class="swipe-action__content__right__text">欠款总金额:</view>
<view class="swipe-action__content__right__money">{{ item.noPay }}</view>
</view>
</view>
</view>
</view>
</view>
<view>
<view class="formBox">
<u-alert description="点击可查看对应每笔入库单" type="primary"></u-alert>
<view class="swipe-action">
<view class="swipe-action__content" @tap="onItemClick(item)" v-for="(item,index) in list" :key="index">
<view class="swipe-action__content__left">
<view class="swipe-action__content__text">{{ item.supplierName }}</view>
</view>
<view class="swipe-action__content__right">
<view class="swipe-action__content__right__text">欠款总金额:</view>
<view class="swipe-action__content__right__money">{{ item.noPay }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import {
mapState
} from 'vuex';
export default {
name: 'upstream',
computed: mapState([ 'userId','shopIndex' ]),
data() {
return {
choose: '1',
options1: [{
text: '编辑金额',
style: {
backgroundColor: '#3c9cff'
}
}],
popupShow: false,
shopName: '',
list:[]
}
},
onLoad() {
this.getList()
},
methods: {
getList() {
this.tui.request("/app/purchase/debt", "get", {
shopId:this.shopIndex
}, false, true).then((res) => {
if(res.code == 200){
this.list = res.result
console.log(res)
}else{
this.tui.toast(res.message)
import {
mapState
} from 'vuex';
export default {
name: 'upstream',
computed: mapState(['userId', 'shopIndex']),
data() {
return {
choose: '1',
options1: [{
text: '编辑金额',
style: {
backgroundColor: '#3c9cff'
}
})
},
onItemClick(target) {
uni.navigateTo({
url: `/pages/index/uparrears?supplierId=${target.supplierId}&consigneeName=${target.consigneeName}`
})
}
}
}
}],
popupShow: false,
shopName: '',
list: []
}
},
onLoad() {
this.getList()
},
methods: {
getList() {
this.tui.request("/app/purchase/debt", "get", {
shopId: this.shopIndex
}, false, true).then((res) => {
if (res.code == 200) {
this.list = res.result
console.log(res)
} else {
this.tui.toast(res.message)
}
})
},
onItemClick(target) {
uni.navigateTo({
url: `/pages/index/uparrears?supplierId=${target.supplierId}&consigneeName=${target.supplierName}`
})
}
}
}
</script>
<style lang="scss" scoped>
.formBox {
.uni-data-select {
width: 100%;
}
.tui-order-title {
position: relative;
font-size: 28upx;
line-height: 28upx;
padding-left: 16upx;
box-sizing: border-box;
}
.tui-order-title::before {
content: '';
position: absolute;
left: 0;
top: 0;
border-left: 8upx solid $u-primary;
height: 120%;
border-radius: 4upx;
}
}
.tui-tabbar {
width: 100%;
height: 98rpx;
background: #fff;
position: fixed;
left: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 26rpx;
box-shadow: 0 0 1px rgba(0, 0, 0, .3);
padding-bottom: env(safe-area-inset-bottom);
z-index: 996;
}
.u-page {
padding: 0;
}
.u-demo-block__title {
padding: 10px 0 2px 15px;
}
.swipe-action {
&__content {
background-color: #fff;
margin-bottom: 25rpx;
padding:25rpx;
display: flex;
align-items: center;
justify-content: space-between;
&__left {
display: flex;
flex-direction: column;
align-items: center;
}
&__right {
display: flex;
align-items: center;
flex-basis: 300rpx;
justify-content: space-between;
&__text {
color: firebrick;
}
&__money {
flex-basis: 100rpx;
color: red;
text-align: right;
}
}
&__text {
padding: 12rpx 0;
width: 100%;
}
&__time {
font-size: 22rpx;
color: #3a3a3a;
}
&__icon {
flex-basis: 20rpx;
}
}
}
.edit-info {
height: 450 rpx;
padding: 25rpx;
.title {
text-align: center;
font-size: 32rpx;
}
.info-name {
display: flex;
align-items: center;
margin: 35rpx 0;
}
}
.formBox {
.uni-data-select {
width: 100%;
}
.tui-order-title {
position: relative;
font-size: 28upx;
line-height: 28upx;
padding-left: 16upx;
box-sizing: border-box;
}
.tui-order-title::before {
content: '';
position: absolute;
left: 0;
top: 0;
border-left: 8upx solid $u-primary;
height: 120%;
border-radius: 4upx;
}
}
.tui-tabbar {
width: 100%;
height: 98rpx;
background: #fff;
position: fixed;
left: 0;
bottom: 0;
display: flex;
align-items: center;
justify-content: flex-end;
font-size: 26rpx;
box-shadow: 0 0 1px rgba(0, 0, 0, .3);
padding-bottom: env(safe-area-inset-bottom);
z-index: 996;
}
.u-page {
padding: 0;
}
.u-demo-block__title {
padding: 10px 0 2px 15px;
}
.swipe-action {
&__content {
background-color: #fff;
margin-bottom: 25rpx;
padding: 25rpx;
display: flex;
align-items: center;
justify-content: space-between;
&__left {
display: flex;
flex-direction: column;
align-items: center;
}
&__right {
display: flex;
align-items: center;
flex-basis: 300rpx;
justify-content: space-between;
&__text {
color: firebrick;
}
&__money {
flex-basis: 100rpx;
color: red;
text-align: right;
}
}
&__text {
padding: 12rpx 0;
width: 100%;
}
&__time {
font-size: 22rpx;
color: #3a3a3a;
}
&__icon {
flex-basis: 20rpx;
}
}
}
.edit-info {
height: 450 rpx;
padding: 25rpx;
.title {
text-align: center;
font-size: 32rpx;
}
.info-name {
display: flex;
align-items: center;
margin: 35rpx 0;
}
}
</style>
<style>
.u-radio {
margin: 15 upx 0;
}
</style>
.u-radio {
margin: 15 upx 0;
}
</style>
Loading…
Cancel
Save