17 changed files with 705 additions and 188 deletions
Unified View
Diff Options
-
7apis/creditManagementApi.js
-
33apis/orderApi.js
-
2components/qn-datetime-picker/qn-datetime-picker.vue
-
39enums/index.js
-
14pages.json
-
2pages/client-credit-detail/index.vue
-
2pages/client-list/index.vue
-
257pages/contract-manage/index.vue
-
42pages/credit-management/index.vue
-
208pages/credit-order-list/index.vue
-
18pages/mine/index.vue
-
6pages/order-detail/index.vue
-
7utils/hook.js
-
2utils/http/http.js
-
4utils/http/index.js
-
246utils/index.js
-
4utils/is.js
@ -0,0 +1,257 @@ |
|||||
|
<template> |
||||
|
<view class="content"> |
||||
|
<uni-nav-bar left-icon="back" @clickLeft="back" typeBar fixed title="合同管理"></uni-nav-bar> |
||||
|
<view class="condition-area flex-row-center-start"> |
||||
|
<qn-data-picker |
||||
|
v-model="condition.customerEnterpriseId" |
||||
|
style="flex-shrink: 0; max-width: 300rpx" |
||||
|
text="right" |
||||
|
:border="false" |
||||
|
placeholder="请选择客户" |
||||
|
popup-title="请选择客户" |
||||
|
:map="{ text: 'name', value: 'id' }" |
||||
|
:clear-icon="false" |
||||
|
:localdata="customerList" |
||||
|
></qn-data-picker> |
||||
|
<qn-data-picker |
||||
|
style="flex-shrink: 0" |
||||
|
v-model="condition.type" |
||||
|
text="right" |
||||
|
:border="false" |
||||
|
placeholder="请选择" |
||||
|
popup-title="请选择合同类型" |
||||
|
:map="{ text: 'name', value: 'id' }" |
||||
|
:clear-icon="false" |
||||
|
:localdata="typeList" |
||||
|
></qn-data-picker> |
||||
|
<qn-datetime-picker style="flex-shrink: 1" type="date" v-model="condition.signDate" :border="false"></qn-datetime-picker> |
||||
|
</view> |
||||
|
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback"> |
||||
|
<view class="contract-item" v-for="item in list" :key="item.id"> |
||||
|
<view class="header flex-col-start-start"> |
||||
|
<view :class="'icon ' + typeMap[item.type].class"> |
||||
|
<text style="font-size: 28rpx; color: #ffffff">{{ typeMap[item.type].label }}</text> |
||||
|
</view> |
||||
|
<text class="title">{{ item.customerEnterpriseName }}</text> |
||||
|
<view class="row flex-row-center-start" style="margin-top: 0rpx"> |
||||
|
<text class="label">合同编号:</text> |
||||
|
<text class="value">{{ item.contractNo }}</text> |
||||
|
</view> |
||||
|
<view class="row flex-row-center-start"> |
||||
|
<text class="label">签署时间:</text> |
||||
|
<text class="value">{{ item.signDate || '-' }}</text> |
||||
|
</view> |
||||
|
<view class="row flex-row-center-start"> |
||||
|
<text class="label">合同金额:</text> |
||||
|
<text class="value">{{ item.totalOfferPrice || '-' }}</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="footer flex-row-center-space"> |
||||
|
<text style="font-size: 30rpx; color: #888888">操作人: {{ item.userName }}</text> |
||||
|
<text style="font-size: 28rpx; color: #007aff" @click="viewContract(item.imgUrl)">查看</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
</scroll-list> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { go2, back } from '@/utils/hook.js' |
||||
|
import { transformFileToImg } from '@/apis/commonApi.js' |
||||
|
import { dateTimeFormat } from '@/utils/index.js' |
||||
|
import { getContractList, getCooperationList } from '@/apis/orderApi.js' |
||||
|
import { financeStatusMap, contractTypeMap, contractTypeEnum } from '@/enums/index.js' |
||||
|
const typeList = [ |
||||
|
{ |
||||
|
id: '', |
||||
|
name: '全部' |
||||
|
}, |
||||
|
{ |
||||
|
id: contractTypeEnum.ORDER_CONTRACT, |
||||
|
name: contractTypeMap[contractTypeEnum.ORDER_CONTRACT] |
||||
|
}, |
||||
|
{ |
||||
|
id: contractTypeEnum.GUARANTEE_CONTRACT, |
||||
|
name: contractTypeMap[contractTypeEnum.GUARANTEE_CONTRACT] |
||||
|
} |
||||
|
] |
||||
|
|
||||
|
const typeMap = { |
||||
|
[contractTypeEnum.ORDER_CONTRACT]: { |
||||
|
class: 'icon__ORDER_CONTRACT', |
||||
|
label: contractTypeMap[contractTypeEnum.ORDER_CONTRACT] |
||||
|
}, |
||||
|
[contractTypeEnum.GUARANTEE_CONTRACT]: { |
||||
|
class: 'icon__GUARANTEE_CONTRACT', |
||||
|
label: contractTypeMap[contractTypeEnum.GUARANTEE_CONTRACT] |
||||
|
} |
||||
|
} |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
customerList: [ |
||||
|
{ |
||||
|
id: '', |
||||
|
name: '全部客户' |
||||
|
} |
||||
|
], |
||||
|
typeList: Object.freeze(typeList), |
||||
|
financeStatusMap: Object.freeze(financeStatusMap), |
||||
|
typeMap: Object.freeze(typeMap), |
||||
|
condition: { |
||||
|
customerEnterpriseId: '', |
||||
|
type: '', |
||||
|
signDate: null |
||||
|
}, |
||||
|
pagination: { |
||||
|
pageNum: 0, // 初始会执行一次下拉加载 |
||||
|
pageSize: 10 |
||||
|
}, |
||||
|
list: [], |
||||
|
option: { |
||||
|
size: 10, |
||||
|
auto: true, |
||||
|
emptyText: '暂无数据~', |
||||
|
background: '#F7F8FA' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
go2, |
||||
|
back, |
||||
|
dateTimeFormat, |
||||
|
getList() { |
||||
|
return new Promise((resolve, reject) => { |
||||
|
getContractList({ ...this.condition, ...this.pagination }) |
||||
|
.then((res) => { |
||||
|
if (res) { |
||||
|
if (this.pagination.pageNum == 1) { |
||||
|
this.list = res.records |
||||
|
} else { |
||||
|
this.list = this.list.concat(res.records) |
||||
|
} |
||||
|
resolve({ list: this.list, total: res.total }) |
||||
|
} else { |
||||
|
reject() |
||||
|
} |
||||
|
}) |
||||
|
.catch((err) => { |
||||
|
reject(err) |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
downCallback() { |
||||
|
this.pagination.pageNum = 1 |
||||
|
this.getList() |
||||
|
.then(({ list, total }) => { |
||||
|
this.$refs.list.refreshSuccess({ list, total }) |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.$refs.list.refreshFail() |
||||
|
}) |
||||
|
}, |
||||
|
upCallback(page) { |
||||
|
this.pagination.pageNum++ |
||||
|
this.getList() |
||||
|
.then(({ list, total }) => { |
||||
|
this.$refs.list.loadSuccess({ list, total }) |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.$refs.list.loadFail() |
||||
|
}) |
||||
|
}, |
||||
|
// 查看合同 |
||||
|
viewContract(url) { |
||||
|
if (url) { |
||||
|
transformFileToImg({ fileUrl: url }).then((res) => { |
||||
|
uni.previewImage({ urls: [res.imgUrl], current: res.imgUrl }) |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
condition: { |
||||
|
handler() { |
||||
|
this.downCallback() |
||||
|
}, |
||||
|
deep: true |
||||
|
} |
||||
|
}, |
||||
|
created() { |
||||
|
// 获取合作企业 |
||||
|
getCooperationList({ pageNum: 1, pageSize: 1000 }).then((res) => { |
||||
|
if (res) { |
||||
|
this.customerList = this.customerList.concat(res.records) |
||||
|
} |
||||
|
}) |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.content { |
||||
|
width: 750rpx; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
justify-content: flex-start; |
||||
|
align-items: stretch; |
||||
|
.condition-area { |
||||
|
width: 750rpx; |
||||
|
height: 80rpx; |
||||
|
padding: 0 32rpx 0 12rpx; |
||||
|
margin-bottom: 20rpx; |
||||
|
background-color: #fff; |
||||
|
} |
||||
|
} |
||||
|
.contract-item { |
||||
|
width: 750rpx; |
||||
|
background-color: #fff; |
||||
|
margin-bottom: 20rpx; |
||||
|
position: relative; |
||||
|
.header { |
||||
|
width: 750rpx; |
||||
|
padding: 24rpx 32rpx; |
||||
|
.icon { |
||||
|
top: 0; |
||||
|
right: 0; |
||||
|
position: absolute; |
||||
|
width: 160rpx; |
||||
|
height: 50rpx; |
||||
|
border-radius: 0 0 0 20rpx; |
||||
|
display: flex; |
||||
|
flex-direction: row; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
} |
||||
|
.icon__ORDER_CONTRACT { |
||||
|
background-color: #e28686; |
||||
|
} |
||||
|
.icon__GUARANTEE_CONTRACT { |
||||
|
background-color: #86e2df; |
||||
|
} |
||||
|
.title { |
||||
|
font-size: 32rpx; |
||||
|
color: #003a8c; |
||||
|
font-weight: 600; |
||||
|
margin-bottom: 28rpx; |
||||
|
} |
||||
|
.row { |
||||
|
margin-top: 24rpx; |
||||
|
.label { |
||||
|
font-size: 28rpx; |
||||
|
color: #888888; |
||||
|
margin-right: 24rpx; |
||||
|
} |
||||
|
.value { |
||||
|
font-size: 28rpx; |
||||
|
color: #333333; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.footer { |
||||
|
width: 750rpx; |
||||
|
padding: 24rpx 32rpx; |
||||
|
border-top: 1px solid #dddddd; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
@ -1,52 +1,24 @@ |
|||||
<template> |
<template> |
||||
<view> |
|
||||
|
<view class="content"> |
||||
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="征信管理"></uni-nav-bar> |
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="征信管理"></uni-nav-bar> |
||||
<view @click="getPaperCategory">category</view> |
|
||||
<view @click="add">add</view> |
|
||||
</view> |
</view> |
||||
</template> |
</template> |
||||
|
|
||||
<script> |
<script> |
||||
import { go2, back } from '@/utils/hook.js' |
import { go2, back } from '@/utils/hook.js' |
||||
import { addPaper, getPaperCategory } from '@/apis/creditManagementApi.js' |
|
||||
export default { |
export default { |
||||
data() { |
data() { |
||||
return {} |
return {} |
||||
}, |
}, |
||||
methods: { |
methods: { |
||||
go2, |
go2, |
||||
back, |
|
||||
getPaperCategory, |
|
||||
add() { |
|
||||
let form = { |
|
||||
brandName: '博汇', |
|
||||
categoryId: 1, |
|
||||
description: '156企业测试纸品', |
|
||||
imgList: ['https://qncloudtest.oss-cn-shenzhen.aliyuncs.com/common/13390214088425427.jpg'], |
|
||||
isMainProduct: true, |
|
||||
manufacturerName: '156纸厂', |
|
||||
name: '156白卡', |
|
||||
otherNote: '没有说明', |
|
||||
sellingProposition: '没有卖点', |
|
||||
shippingNote: '没有送货说明', |
|
||||
skuList: [ |
|
||||
{ |
|
||||
isPromoting: false, |
|
||||
listPrice: 10000, |
|
||||
minimum: 1, |
|
||||
stock: 100, |
|
||||
stockUnit: 2, |
|
||||
weight: 200 |
|
||||
} |
|
||||
], |
|
||||
supplierId: '678289470268772352' |
|
||||
} |
|
||||
addPaper(form).then((res) => { |
|
||||
console.log(res) |
|
||||
}) |
|
||||
} |
|
||||
|
back |
||||
} |
} |
||||
} |
} |
||||
</script> |
</script> |
||||
|
|
||||
<style lang="scss" scoped></style> |
|
||||
|
<style lang="scss" scoped> |
||||
|
.content { |
||||
|
width: 750rpx; |
||||
|
} |
||||
|
</style> |
||||
@ -0,0 +1,208 @@ |
|||||
|
<template> |
||||
|
<view class="content"> |
||||
|
<uni-nav-bar left-icon="back" @clickLeft="back" statusBar fixed title="账期订单融资"></uni-nav-bar> |
||||
|
<view class="condition-area flex-row-center-start"> |
||||
|
<qn-data-picker |
||||
|
v-model="condition.enterpriseId" |
||||
|
text="right" |
||||
|
:border="false" |
||||
|
placeholder="请选择客户" |
||||
|
popup-title="请选择客户" |
||||
|
:map="{ text: 'name', value: 'id' }" |
||||
|
:clear-icon="false" |
||||
|
:localdata="customerList" |
||||
|
></qn-data-picker> |
||||
|
<qn-data-picker |
||||
|
v-model="condition.status" |
||||
|
text="right" |
||||
|
:border="false" |
||||
|
placeholder="请选择" |
||||
|
popup-title="请选择融资状态" |
||||
|
:map="{ text: 'name', value: 'id' }" |
||||
|
:clear-icon="false" |
||||
|
:localdata="statusList" |
||||
|
></qn-data-picker> |
||||
|
</view> |
||||
|
<scroll-list ref="list" :option="option" @load="upCallback" @refresh="downCallback"> |
||||
|
<view v-for="item in list" :key="item.id" class="order-area"> |
||||
|
<view class="header flex-row-center-space"> |
||||
|
<text style="font-size: 30rpx; font-weight: 600; word-break: break-all">{{ item.customerEnterpriseName }}</text> |
||||
|
<text style="font-size: 30rpx; font-weight: 500; color: #ff5368">{{ financeStatusMap[item.status] }}</text> |
||||
|
</view> |
||||
|
<view class="content"> |
||||
|
<view |
||||
|
class="order-item flex-row-center-start" |
||||
|
v-for="(order, index) in item.orderItmes" |
||||
|
:key="order.productId" |
||||
|
:style="{ borderTop: index == 0 ? '' : '1px solid #dddddd' }" |
||||
|
> |
||||
|
<image class="img" :src="order.productImg"></image> |
||||
|
<view class="flex-col-start-start"> |
||||
|
<text style="font-size: 30rpx; color: #333333; font-weight: 600; margin-bottom: 26rpx">{{ order.productName }}</text> |
||||
|
<text style="font-size: 26rpx; color: #888888; font-weight: 400; word-break: break-all"> |
||||
|
{{ order.categoryName }}/{{ order.brandName }}/{{ order.gramWeight }}g/{{ order.width }}*{{ order.length }}/{{ order.pieceQuantity }}张 |
||||
|
</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
</view> |
||||
|
<view class="footer flex-row-center-space"> |
||||
|
<text style="font-size: 26rpx; color: #888888">{{ dateTimeFormat(item.createTime, 'yyyy/mm/dd') }}</text> |
||||
|
<text style="font-size: 30rpx; color: #ff5368">¥ {{ item.totalOfferPrice }}</text> |
||||
|
</view> |
||||
|
</view> |
||||
|
<!-- <packingStationItem style="margin-bottom: 20rpx" v-for="item in list" :key="item.enterpriseId" :info="item"></packingStationItem> --> |
||||
|
<!-- <packingStationItem></packingStationItem> --> |
||||
|
</scroll-list> |
||||
|
</view> |
||||
|
</template> |
||||
|
|
||||
|
<script> |
||||
|
import { go2, back } from '@/utils/hook.js' |
||||
|
import { dateTimeFormat } from '@/utils/index.js' |
||||
|
import { getFinanceList, getCooperationList } from '@/apis/orderApi.js' |
||||
|
import { financeStatusMap } from '@/enums/index.js' |
||||
|
const statusList = [ |
||||
|
{ |
||||
|
id: 0, |
||||
|
name: '全部' |
||||
|
}, |
||||
|
{ |
||||
|
id: 1, |
||||
|
name: '未融资' |
||||
|
}, |
||||
|
{ |
||||
|
id: 2, |
||||
|
name: '已融资' |
||||
|
} |
||||
|
] |
||||
|
export default { |
||||
|
data() { |
||||
|
return { |
||||
|
customerList: [ |
||||
|
{ |
||||
|
id: '', |
||||
|
name: '全部客户' |
||||
|
}, |
||||
|
{ |
||||
|
id: '807704', |
||||
|
name: '揭阳市广工印刷有限公司' |
||||
|
} |
||||
|
], |
||||
|
statusList: Object.freeze(statusList), |
||||
|
financeStatusMap: Object.freeze(financeStatusMap), |
||||
|
condition: { |
||||
|
enterpriseId: '', |
||||
|
status: 0 |
||||
|
}, |
||||
|
pagination: { |
||||
|
pageNum: 0, // 初始会执行一次下拉加载 |
||||
|
pageSize: 10 |
||||
|
}, |
||||
|
list: [], |
||||
|
option: { |
||||
|
size: 10, |
||||
|
auto: true, |
||||
|
emptyText: '暂无数据~', |
||||
|
background: '#F7F8FA' |
||||
|
} |
||||
|
} |
||||
|
}, |
||||
|
methods: { |
||||
|
go2, |
||||
|
back, |
||||
|
dateTimeFormat, |
||||
|
getList() { |
||||
|
return new Promise((resolve, reject) => { |
||||
|
getFinanceList({ ...this.condition, ...this.pagination }) |
||||
|
.then((res) => { |
||||
|
if (res) { |
||||
|
if (this.pagination.pageNum == 1) { |
||||
|
this.list = res.records |
||||
|
} else { |
||||
|
this.list = this.list.concat(res.records) |
||||
|
} |
||||
|
resolve({ list: this.list, total: res.total }) |
||||
|
} else { |
||||
|
reject() |
||||
|
} |
||||
|
}) |
||||
|
.catch((err) => { |
||||
|
reject(err) |
||||
|
}) |
||||
|
}) |
||||
|
}, |
||||
|
downCallback() { |
||||
|
this.pagination.pageNum = 1 |
||||
|
this.getList() |
||||
|
.then(({ list, total }) => { |
||||
|
this.$refs.list.refreshSuccess({ list, total }) |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.$refs.list.refreshFail() |
||||
|
}) |
||||
|
}, |
||||
|
upCallback(page) { |
||||
|
this.pagination.pageNum++ |
||||
|
this.getList() |
||||
|
.then(({ list, total }) => { |
||||
|
this.$refs.list.loadSuccess({ list, total }) |
||||
|
}) |
||||
|
.catch(() => { |
||||
|
this.$refs.list.loadFail() |
||||
|
}) |
||||
|
} |
||||
|
}, |
||||
|
watch: { |
||||
|
condition: { |
||||
|
handler(val) { |
||||
|
this.downCallback() |
||||
|
}, |
||||
|
deep: true |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
</script> |
||||
|
|
||||
|
<style lang="scss" scoped> |
||||
|
.content { |
||||
|
width: 750rpx; |
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
justify-content: flex-start; |
||||
|
align-items: stretch; |
||||
|
.condition-area { |
||||
|
width: 750rpx; |
||||
|
height: 80rpx; |
||||
|
padding: 0 32rpx; |
||||
|
margin-bottom: 20rpx; |
||||
|
background-color: #fff; |
||||
|
} |
||||
|
} |
||||
|
.order-area { |
||||
|
width: 750rpx; |
||||
|
background-color: #fff; |
||||
|
margin-bottom: 20rpx; |
||||
|
.header { |
||||
|
padding: 24rpx 32rpx; |
||||
|
border-bottom: 1px solid #dddddd; |
||||
|
} |
||||
|
.content { |
||||
|
padding: 0 32rpx; |
||||
|
width: 750rpx; |
||||
|
border-bottom: 1px solid #dddddd; |
||||
|
.order-item { |
||||
|
width: 686rpx; |
||||
|
padding: 24rpx 0; |
||||
|
.img { |
||||
|
width: 100rpx; |
||||
|
height: 100rpx; |
||||
|
margin-right: 20rpx; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.footer { |
||||
|
width: 750rpx; |
||||
|
padding: 24rpx 32rpx; |
||||
|
} |
||||
|
} |
||||
|
</style> |
||||
Write
Preview
Loading…
Cancel
Save