| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113 |
- <template>
- <view class="contact-main">
- <view class="todo-list">
- <u-empty mode="list" v-if="list.length == 0"></u-empty>
- <view v-else v-for="(v, i) in list" :key="i">
- <view class="contact-item">
- <view class="flex_l">
- <view class="label">合同编号:</view>
- <view class="val">{{ v.contractCode }}</view>
- </view>
- <view class="flex_l">
- <view class="label">开票金额:</view>
- <view class="val">{{ formatPrice(v.invoiceAmount) }}</view>
- </view>
- <view class="flex_l">
- <view class="label">开票日期:</view>
- <view class="val">{{ v.invoiceDate }}</view>
- </view>
- <view class="flex_l">
- <view class="label">开票类型:</view>
- <view class="val">{{ invoiceTypeData.filter((item) => item.key == v.invoiceType)[0].value || '-' }}</view>
- </view>
- <view class="flex_l">
- <view class="label">审核状态:</view>
- <view class="val"> {{
- v.approStatus == '10'
- ? '待提交审核'
- : v.approStatus == '20'
- ? '待审核'
- : v.approStatus == '30'
- ? '审核已同意'
- : v.approStatus == '40'
- ? '审核已拒绝'
- : v.approStatus == '50'
- ? '审核已撤销'
- : ''
- }}</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- import to from 'await-to-js'
- import api from '@/api/contract'
- export default {
- name: 'OmsContractInvoice',
- props: {
- contractId: {
- type: [String, Number],
- default: '0',
- },
- },
- data() {
- return {
- invoiceTypeData: [], //发票类型
- list: []
- }
- },
- mounted() {
- this.getOptions()
- this.fetchData()
- },
- methods: {
- getOptions() {
- Promise.all([this.getDicts('invoice_type')])
- .then(([invoiceType]) => {
- this.invoiceTypeData = invoiceType.data.values || []
- })
- .catch((err) => console.log(err))
- },
- async fetchData() {
- const [err, res] = await to(api.getInvoice({
- contractId: this.contractId,
- pageNum: 0
- }))
- if (err) return
- this.list = res.data.list || []
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .contact-main {
- height: 100%;
- .todo-list {
- height: 100%;
- overflow: auto;
- padding: 20rpx 20rpx 0;
- .contact-item {
- padding: 20rpx;
- margin-bottom: 20rpx;
- box-shadow: 0 6rpx 19rpx 2rpx rgba(0, 45, 132, 0.15);
- border-radius: 8px;
- .label,
- .val {
- font-size: 28rpx;
- padding-bottom: 14rpx;
- }
- .label {
- color: #646464;
- }
- }
- }
- }
- </style>
|