开票
This commit is contained in:
parent
225cd55b37
commit
26e6d5b611
@ -2,29 +2,38 @@ import api from './api'
|
|||||||
|
|
||||||
|
|
||||||
export function invoicePage(data) {
|
export function invoicePage(data) {
|
||||||
return api.get('/crm/invoice/page', data, { login: false })
|
return api.get('/bpm/oa/invoice/page', data, {
|
||||||
|
login: false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function invoiceCreate(data) {
|
export function invoiceCreate(data) {
|
||||||
return api.post('/crm/invoice/create', data, { login: false })
|
return api.post('/bpm/oa/invoice/create', data, {
|
||||||
|
login: false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export function getInvoice(data) {
|
export function getInvoice(data) {
|
||||||
return api.get('/crm/invoice/get', data, { login: false })
|
return api.get('/bpm/oa/invoice/get', data, {
|
||||||
|
login: false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function invoiceUpdate(data) {
|
export function invoiceUpdate(data) {
|
||||||
return api.put('/crm/invoice/update', data, { login: false })
|
return api.put('/crm/invoice/update', data, {
|
||||||
|
login: false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function check(data) {
|
export function check(data) {
|
||||||
return api.post('/crm/invoice/check', data, { login: false })
|
return api.post('/crm/invoice/check', data, {
|
||||||
|
login: false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
export function invoiceIssue(data) {
|
export function invoiceIssue(data) {
|
||||||
return api.put('/crm/invoice/issue', data, { login: false })
|
return api.put('/crm/invoice/issue', data, {
|
||||||
|
login: false
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -73,9 +73,9 @@
|
|||||||
<!-- <uv-form-item label="审批人:">
|
<!-- <uv-form-item label="审批人:">
|
||||||
<uv-input disabledColor="#ffffff" disabled v-model="form.flowAdminIdName" placeholder="请去审批流程里配置合同审批" />
|
<uv-input disabledColor="#ffffff" disabled v-model="form.flowAdminIdName" placeholder="请去审批流程里配置合同审批" />
|
||||||
</uv-form-item> -->
|
</uv-form-item> -->
|
||||||
<uv-form-item label="备注:">
|
<!-- <uv-form-item label="备注:">
|
||||||
<uv-textarea v-model="form.remark" :disabled="isCheck" placeholder="请输入备注"></uv-textarea>
|
<uv-textarea v-model="form.remark" :disabled="isCheck" placeholder="请输入备注"></uv-textarea>
|
||||||
</uv-form-item>
|
</uv-form-item> -->
|
||||||
</uv-form>
|
</uv-form>
|
||||||
<!-- 产品 -->
|
<!-- 产品 -->
|
||||||
<view class="flex cif-title" @click="type !== 'detail' ? selectProduct() : ''">
|
<view class="flex cif-title" @click="type !== 'detail' ? selectProduct() : ''">
|
||||||
|
@ -71,7 +71,6 @@
|
|||||||
onPageScroll
|
onPageScroll
|
||||||
} from '@dcloudio/uni-app'
|
} from '@dcloudio/uni-app'
|
||||||
import {
|
import {
|
||||||
getContractPage,
|
|
||||||
getOAContractPage,
|
getOAContractPage,
|
||||||
} from '@/api/contract'
|
} from '@/api/contract'
|
||||||
import {
|
import {
|
||||||
|
@ -1,9 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<uv-navbar
|
<uv-navbar :fixed="false" @leftClick="$onClickLeft" bgColor="#09b4f1">
|
||||||
:fixed="false"
|
|
||||||
@leftClick="$onClickLeft"
|
|
||||||
bgColor="#09b4f1"
|
|
||||||
>
|
|
||||||
<template v-slot:left>
|
<template v-slot:left>
|
||||||
<uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon>
|
<uv-icon name="arrow-left" size="19" color="#ffffff"></uv-icon>
|
||||||
</template>
|
</template>
|
||||||
@ -13,12 +9,13 @@
|
|||||||
</uv-navbar>
|
</uv-navbar>
|
||||||
<view class="container">
|
<view class="container">
|
||||||
<view class="pb-2 flex px-5" style="background-color: #09b4f1;">
|
<view class="pb-2 flex px-5" style="background-color: #09b4f1;">
|
||||||
<uv-search placeholder="搜索合同名称" v-model="keyword" bgColor="#ffffff" :customStyle="customStyle" :show-action="false" @change="onSearch"></uv-search>
|
<uv-search placeholder="搜索发票名称" v-model="keyword" bgColor="#ffffff" :customStyle="customStyle"
|
||||||
<!-- <uv-icon name="/static/images/screen.png" :size="26" @click="openSearch"></uv-icon> -->
|
:show-action="false" @change="onSearch"></uv-search>
|
||||||
</view>
|
</view>
|
||||||
<view class="wrap">
|
<view class="wrap">
|
||||||
<uv-tabs :list="list" @click="handleSelect" :scrollable="false"></uv-tabs>
|
<uv-tabs :list="list" @click="handleSelect" :scrollable="false"></uv-tabs>
|
||||||
<scroll-view scroll-y class="sv" :style="{height:scrollHeight+'px'}" :scroll-top="scrollTop" @scroll="scroll" @scrolltolower="reachBottom">
|
<scroll-view scroll-y class="sv" :style="{height:scrollHeight+'px'}" :scroll-top="scrollTop" @scroll="scroll"
|
||||||
|
@scrolltolower="reachBottom">
|
||||||
<view class="page-box">
|
<view class="page-box">
|
||||||
<block v-if="dataList.length > 0">
|
<block v-if="dataList.length > 0">
|
||||||
<view class="client" v-for="(items, index) in dataList" :key="index" @click="onItem(items.id)">
|
<view class="client" v-for="(items, index) in dataList" :key="index" @click="onItem(items.id)">
|
||||||
@ -26,12 +23,11 @@
|
|||||||
<view class="left uv-line-1">
|
<view class="left uv-line-1">
|
||||||
<view class="store uv-line-1">{{items.invoiceName}}</view>
|
<view class="store uv-line-1">{{items.invoiceName}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex">
|
<view class="flex align-center">
|
||||||
<uv-text v-if="items.checkStatus === 1" type="warning" text="审核中"></uv-text>
|
<text
|
||||||
<uv-text v-else-if="items.checkStatus === 2" type="success" text="审核通过"></uv-text>
|
:style="{color:items.result==1?'#4687fc':items.result==2?'#4cd964':items.result==3?'#dd524d':'#999999'}">{{fillterStatus(items.result)}}</text>
|
||||||
<uv-text v-else-if="items.checkStatus === 3" type="info" text="审核未通过"></uv-text>
|
<uv-icon name="arrow-right" :size="16"
|
||||||
<uv-text v-else type="error" text="待审核"></uv-text>
|
:color="items.result==1?'#4687fc':items.result==2?'#4cd964':items.result==3?'#dd524d':'#999999'"></uv-icon>
|
||||||
<uv-icon name="arrow-right" :size="20"></uv-icon>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item align-center">
|
<view class="item align-center">
|
||||||
@ -41,7 +37,7 @@
|
|||||||
<view class="right">{{timeFormats(items.createTime)}}</view>
|
<view class="right">{{timeFormats(items.createTime)}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="bottom">
|
<view class="bottom">
|
||||||
<view class="client_time">¥:{{items.money}}</view>
|
<view class="client_time">¥{{items.amount}}</view>
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<block v-if="items.isCheck">
|
<block v-if="items.isCheck">
|
||||||
<view class="btn ml-1 entity" @click.stop="onCheck(items.id)">审核</view>
|
<view class="btn ml-1 entity" @click.stop="onCheck(items.id)">审核</view>
|
||||||
@ -69,11 +65,21 @@ import {
|
|||||||
ref,
|
ref,
|
||||||
computed
|
computed
|
||||||
} from 'vue'
|
} from 'vue'
|
||||||
import { onLoad,onShow ,onReady,onPageScroll} from '@dcloudio/uni-app'
|
import {
|
||||||
|
onLoad,
|
||||||
|
onShow,
|
||||||
|
onReady,
|
||||||
|
onPageScroll
|
||||||
|
} from '@dcloudio/uni-app'
|
||||||
import {
|
import {
|
||||||
invoicePage
|
invoicePage
|
||||||
} from '@/api/invoice'
|
} from '@/api/invoice'
|
||||||
import { formatDateTime } from '@/utils/util'
|
import {
|
||||||
|
getDictData,
|
||||||
|
} from '@/api/customer.js'
|
||||||
|
import {
|
||||||
|
formatDateTime
|
||||||
|
} from '@/utils/util'
|
||||||
const title = ref('发票')
|
const title = ref('发票')
|
||||||
const keyword = ref('')
|
const keyword = ref('')
|
||||||
const oldScrollTop = ref(0)
|
const oldScrollTop = ref(0)
|
||||||
@ -87,8 +93,7 @@ const list = ref(
|
|||||||
}, {
|
}, {
|
||||||
name: '下属发票',
|
name: '下属发票',
|
||||||
value: 'sub'
|
value: 'sub'
|
||||||
},
|
}, ]
|
||||||
]
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const current = ref(0)
|
const current = ref(0)
|
||||||
@ -101,7 +106,9 @@ const lastPage = ref(false)
|
|||||||
const listStatus = ref('loadmore')
|
const listStatus = ref('loadmore')
|
||||||
const isRefresh = ref(false)
|
const isRefresh = ref(false)
|
||||||
|
|
||||||
defineExpose({isRefresh})
|
defineExpose({
|
||||||
|
isRefresh
|
||||||
|
})
|
||||||
|
|
||||||
onReady(() => {
|
onReady(() => {
|
||||||
uni.getSystemInfo({
|
uni.getSystemInfo({
|
||||||
@ -117,7 +124,7 @@ onReady(()=>{
|
|||||||
})
|
})
|
||||||
|
|
||||||
onLoad((e) => {
|
onLoad((e) => {
|
||||||
|
getStatusList()
|
||||||
})
|
})
|
||||||
|
|
||||||
onShow(() => {
|
onShow(() => {
|
||||||
@ -143,11 +150,16 @@ const onCheck = (id,type) => {
|
|||||||
url: '/pages/components/pages/invoice/add?id=' + id + '&type=check'
|
url: '/pages/components/pages/invoice/add?id=' + id + '&type=check'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const handleSelect = (key) => {
|
||||||
|
relation.value = key.value
|
||||||
|
page.value = 1
|
||||||
|
dataList.value = []
|
||||||
|
getList()
|
||||||
}
|
}
|
||||||
|
|
||||||
const getList = async (isNextPage, pages) => {
|
const getList = async (isNextPage, pages) => {
|
||||||
|
|
||||||
await invoicePage({
|
await invoicePage({
|
||||||
pageNo: page.value,
|
pageNo: page.value,
|
||||||
pageSize: pageSize.value,
|
pageSize: pageSize.value,
|
||||||
@ -167,11 +179,34 @@ const getList = async(isNextPage,pages) => {
|
|||||||
dataList.value = dataList.value.concat(res.list)
|
dataList.value = dataList.value.concat(res.list)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
dataList.value = res.list
|
dataList.value = res.list
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const statusList = ref([])
|
||||||
|
const getStatusList = () => {
|
||||||
|
getDictData({
|
||||||
|
type: 'bpm_process_instance_result'
|
||||||
|
}).then(res => {
|
||||||
|
statusList.value = res
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
//格式化状态
|
||||||
|
const fillterStatus = (status) => {
|
||||||
|
if (statusList.value.length) {
|
||||||
|
let obj = statusList.value.find(item => {
|
||||||
|
return item.value == status
|
||||||
|
})
|
||||||
|
return obj == undefined ? '' : obj.name
|
||||||
|
} else {
|
||||||
|
return status
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const scroll = (e) => {
|
const scroll = (e) => {
|
||||||
oldScrollTop.value = e.detail.scrollTop
|
oldScrollTop.value = e.detail.scrollTop
|
||||||
}
|
}
|
||||||
@ -205,9 +240,6 @@ const onAdd = () => {
|
|||||||
url: '/pages/components/pages/invoice/add'
|
url: '/pages/components/pages/invoice/add'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@ -215,9 +247,11 @@ const onAdd = () => {
|
|||||||
background-color: #F7F7F7;
|
background-color: #F7F7F7;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
.page-box {
|
.page-box {
|
||||||
padding: 20rpx 20rpx 45rpx;
|
padding: 20rpx 20rpx 45rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.client {
|
.client {
|
||||||
width: 710rpx;
|
width: 710rpx;
|
||||||
background-color: #ffffff;
|
background-color: #ffffff;
|
||||||
@ -226,12 +260,15 @@ const onAdd = () => {
|
|||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
padding: 20rpx;
|
padding: 20rpx;
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
|
|
||||||
.top {
|
.top {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
.left {
|
.left {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
.store {
|
.store {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -239,21 +276,26 @@ const onAdd = () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
.item {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 20rpx 0 0;
|
margin: 20rpx 0 0;
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 28rpx;
|
font-size: 28rpx;
|
||||||
line-height: 50rpx;
|
line-height: 50rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.type {
|
.type {
|
||||||
margin: 10rpx 0;
|
margin: 10rpx 0;
|
||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
color: $uv-tips-color;
|
color: $uv-tips-color;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.right {
|
.right {
|
||||||
margin-left: 10rpx;
|
margin-left: 10rpx;
|
||||||
text-align: right;
|
text-align: right;
|
||||||
@ -261,15 +303,18 @@ const onAdd = () => {
|
|||||||
font-size: 24rpx;
|
font-size: 24rpx;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.bottom {
|
.bottom {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin-top: 20rpx;
|
margin-top: 20rpx;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.client_time {
|
.client_time {
|
||||||
color: #777;
|
color: #777;
|
||||||
font-size: 26rpx;
|
font-size: 28rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn {
|
.btn {
|
||||||
line-height: 56rpx;
|
line-height: 56rpx;
|
||||||
padding: 0rpx 25rpx;
|
padding: 0rpx 25rpx;
|
||||||
@ -278,16 +323,19 @@ const onAdd = () => {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
color: $uv-info-dark;
|
color: $uv-info-dark;
|
||||||
}
|
}
|
||||||
|
|
||||||
.entity {
|
.entity {
|
||||||
color: #fff;
|
color: #fff;
|
||||||
background-color: #FF6146;
|
background-color: #FF6146;
|
||||||
}
|
}
|
||||||
|
|
||||||
.primary {
|
.primary {
|
||||||
color: #FFF;
|
color: #FFF;
|
||||||
background-color: #09b4f1
|
background-color: #09b4f1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrap {
|
.wrap {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -315,6 +363,4 @@ const onAdd = () => {
|
|||||||
transition: opacity 0.4s;
|
transition: opacity 0.4s;
|
||||||
border: 1px solid #dcdfe6;
|
border: 1px solid #dcdfe6;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
</style>
|
</style>
|
Loading…
Reference in New Issue
Block a user