| | |
| | | </view> |
| | | |
| | | <!-- 发票列表 --> |
| | | <view v-for="(item, index) in list" :key="index" class="invoice-item bg-white margin-sm padding-sm radius shadow"> |
| | | <view v-for="(item, index) in list" :key="index" class="invoice-item bg-white margin-sm padding-sm radius shadow" @click="handleDetail(item)"> |
| | | <view class="flex justify-between border-bottom padding-bottom-xs margin-bottom-xs"> |
| | | <text class="text-bold">服务单号: {{ item.serviceCode || item.legacyServiceOrderId || '未知' }}</text> |
| | | <text :class="item.status === 0 ? 'text-orange' : item.status === 1 ? 'text-green' : item.status === 2 ? 'text-red' : 'text-gray'">{{ item.status === 0 ? '待审核' : item.status === 1 ? '已通过' : item.status === 2 ? '已驳回' : '未知' }}</text> |
| | |
| | | <text class="value">{{ item.invoiceNo }}</text> |
| | | </view> |
| | | |
| | | <view class="action-bar margin-top-sm flex justify-end" v-if="item.invoiceUrl"> |
| | | <button class="cu-btn sm bg-green" @click="handleDownload" :data-url="item.invoiceUrl">查看发票</button> |
| | | <view class="action-bar margin-top-sm flex justify-end"> |
| | | <button v-if="item.invoiceUrl" class="cu-btn sm bg-green margin-right-xs" @click.stop="handleDownload" :data-url="item.invoiceUrl">查看发票</button> |
| | | <button v-if="item.status === 0 || item.status === 2" class="cu-btn sm bg-blue" @click.stop="handleEdit(item)">编辑</button> |
| | | </view> |
| | | <view v-if="item.status === 2 && item.auditRemarks" class="margin-top-xs padding-xs bg-gray radius"> |
| | | <text class="text-sm text-red">驳回原因: {{ item.auditRemarks }}</text> |
| | |
| | | }, |
| | | handleApply() { |
| | | this.$tab.navigateTo('/pages/mine/invoice/apply') |
| | | }, |
| | | handleDetail(item) { |
| | | this.$tab.navigateTo(`/pages/mine/invoice/detail?invoiceId=${item.invoiceId}`) |
| | | }, |
| | | handleEdit(item) { |
| | | const invoiceInfo = encodeURIComponent(JSON.stringify(item)) |
| | | this.$tab.navigateTo(`/pages/mine/invoice/edit?invoiceInfo=${invoiceInfo}`) |
| | | }, |
| | | handleDownload(e) { |
| | | const url = e.currentTarget.dataset.url |
| | |
| | | } |
| | | |
| | | .invoice-item { |
| | | cursor: pointer; |
| | | transition: box-shadow 0.2s; |
| | | &:active { opacity: 0.85; } |
| | | |
| | | .border-bottom { |
| | | border-bottom: 1rpx solid #eee; |
| | | } |