|
@@ -1,104 +1,110 @@
|
|
|
<!-- -->
|
|
|
<template>
|
|
|
<div>
|
|
|
- <el-form ref="formRef" :model="otherInfo" label-position="left" label-width="auto" disabled>
|
|
|
+ <el-form ref="formRef" :model="otherInfo" label-position="left" label-width="auto" disabled>
|
|
|
<div class="hc-form-item">
|
|
|
<el-form-item label="申请时间:" prop="invoiceDate">
|
|
|
- <el-date-picker type="date" class="block" v-model="otherInfo.invoiceDate" format="YYYY-MM-DD"
|
|
|
- value-format="YYYY-MM-DD" />
|
|
|
+ <el-date-picker
|
|
|
+ v-model="otherInfo.invoiceDate" type="date" class="block" format="YYYY-MM-DD"
|
|
|
+ value-format="YYYY-MM-DD"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="发票抬头:">
|
|
|
- <el-input v-model="otherInfo.key2" disabled />
|
|
|
+ <el-input v-model="otherInfo.invoiceHead" disabled />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="hc-form-item">
|
|
|
<el-form-item label="开票事由:" prop="invoiceDesc">
|
|
|
- <el-input type="textarea" v-model="otherInfo.invoiceDesc" :autosize="{ minRows: 3, maxRows: 5 }" />
|
|
|
+ <el-input v-model="otherInfo.invoiceDesc" type="textarea" :autosize="{ minRows: 3, maxRows: 5 }" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="纳税人识别号:">
|
|
|
- <el-input v-model="otherInfo.key2" disabled />
|
|
|
+ <el-input v-model="otherInfo.taxpayerNumber" disabled />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="hc-form-item">
|
|
|
<el-form-item label="开票人:" prop="invoiceUserId">
|
|
|
- <el-select block v-model="otherInfo.invoiceUserId">
|
|
|
- <el-option v-for="item in userList" :label="item.name" :value="item.id"/>
|
|
|
+ <el-select v-model="otherInfo.invoiceUserId" block>
|
|
|
+ <el-option v-for="item in userList" :label="item.name" :value="item.id" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="开户银行:">
|
|
|
- <el-input v-model="otherInfo.key2" disabled />
|
|
|
+ <el-input v-model="otherInfo.openAccountBank" disabled />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="hc-form-item">
|
|
|
<el-form-item label="发票类型:" prop="invoiceType">
|
|
|
- <el-select block v-model="otherInfo.invoiceType">
|
|
|
+ <el-select v-model="otherInfo.invoiceType" block>
|
|
|
<el-option v-for="item in invoiceTypeData" :label="item.dictName" :value="item.dictValue" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="银行账户:">
|
|
|
- <el-input v-model="otherInfo.key2" disabled />
|
|
|
+ <el-input v-model="otherInfo.bankAccount" disabled />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="hc-form-item">
|
|
|
<el-form-item label="关联项目:" prop="projectId">
|
|
|
- <el-select block v-model="otherInfo.projectId">
|
|
|
+ <el-select v-model="otherInfo.projectId" block>
|
|
|
<el-option v-for="item in projectType" :label="item.projectName" :value="item.projectId" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="收件人:">
|
|
|
- <el-input v-model="otherInfo.key2" disabled />
|
|
|
+ <el-input v-model="otherInfo.addresseeUserName" disabled />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="hc-form-item">
|
|
|
<el-form-item label="开票金额:" prop="invoiceMoney">
|
|
|
<el-input v-model="otherInfo.invoiceMoney" onkeyup="this.value=this.value.match(/\d+\.?\d{0,2}/)">
|
|
|
- <template #append>元</template>
|
|
|
+ <template #append>
|
|
|
+ 元
|
|
|
+ </template>
|
|
|
</el-input>
|
|
|
</el-form-item>
|
|
|
- <el-form-item label="联系电话:">
|
|
|
- <el-input v-model="otherInfo.key2" disabled />
|
|
|
+ <el-form-item label="联系电话:">
|
|
|
+ <el-input v-model="otherInfo.addresseePhone" disabled />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
<div class="hc-form-item">
|
|
|
- <el-form-item label="开票内容:" prop="invoiceContentType">
|
|
|
- <el-select block v-model="otherInfo.invoiceContentType">
|
|
|
- <el-option v-for="item in invoiceContentList" :label="item" :value="item"/>
|
|
|
+ <el-form-item label="开票内容:" prop="invoiceContent">
|
|
|
+ <el-select v-model="otherInfo.invoiceContent" block>
|
|
|
+ <el-option v-for="item in invoiceContentList" :label="item" :value="item" />
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="邮寄地址:">
|
|
|
- <el-input v-model="otherInfo.key2" disabled />
|
|
|
+ <el-input v-model="otherInfo.mailingAddress" disabled />
|
|
|
</el-form-item>
|
|
|
</div>
|
|
|
-
|
|
|
</el-form>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
|
-import { ref, watch,onActivated } from 'vue'
|
|
|
-import {getProjectList,getuserList,getDictInfo} from "~api/other";
|
|
|
-import {getArrValue} from "js-fast-way";
|
|
|
-import {useAppStore} from "~src/store";
|
|
|
-import mainApi from "~api/expense/invoice";
|
|
|
-const useAppState = useAppStore();
|
|
|
-onActivated(()=>{
|
|
|
-
|
|
|
- })
|
|
|
+import { onActivated, ref, watch } from 'vue'
|
|
|
+import { getDictInfo, getProjectList, getuserList } from '~api/other'
|
|
|
+import { getArrValue, getObjValue } from 'js-fast-way'
|
|
|
+import { useAppStore } from '~src/store'
|
|
|
+import mainApi from '~api/expense/invoice'
|
|
|
//参数
|
|
|
const props = defineProps({
|
|
|
otherInfo: {
|
|
|
type: Object,
|
|
|
- default: {}
|
|
|
- }
|
|
|
+ default: {},
|
|
|
+ },
|
|
|
})
|
|
|
-const invoiceTypeData=ref([])
|
|
|
-const projectType=ref([])
|
|
|
+const useAppState = useAppStore()
|
|
|
+onActivated(()=>{
|
|
|
+
|
|
|
+ })
|
|
|
+const invoiceTypeData = ref([])
|
|
|
+const projectType = ref([])
|
|
|
//监听
|
|
|
watch(() => [
|
|
|
props.otherInfo,
|
|
|
], ([otherInfo]) => {
|
|
|
- console.log(otherInfo, 'otherInfo');
|
|
|
+ console.log(otherInfo, 'otherInfo')
|
|
|
+ let invoiceInfo = getObjValue(otherInfo['contractInvoiceInfoVO'])
|
|
|
+ let emInvoiceInfoVO = getObjValue(otherInfo['emInvoiceInfoVO'])
|
|
|
+ Object.assign(otherInfo, invoiceInfo, emInvoiceInfoVO)
|
|
|
getUserDict()
|
|
|
getInvoiceContentList()
|
|
|
getInvoiceType()
|
|
@@ -106,9 +112,9 @@ watch(() => [
|
|
|
|
|
|
})
|
|
|
//获取所有员工
|
|
|
-const userList=ref([])
|
|
|
-const getUserDict=async()=>{
|
|
|
- const {error, code, data} = await getuserList({tenantId:useAppState.tenantId})
|
|
|
+const userList = ref([])
|
|
|
+const getUserDict = async ()=>{
|
|
|
+ const { error, code, data } = await getuserList({ tenantId:useAppState.tenantId })
|
|
|
if (!error && code === 200) {
|
|
|
userList.value = getArrValue(data)
|
|
|
|
|
@@ -118,9 +124,9 @@ const getUserDict=async()=>{
|
|
|
}
|
|
|
}
|
|
|
//获取开票内容
|
|
|
-const invoiceContentList=ref([])
|
|
|
-const getInvoiceContentList=async()=>{
|
|
|
- const {error, code, data} = await mainApi.getInvoiceContentList()
|
|
|
+const invoiceContentList = ref([])
|
|
|
+const getInvoiceContentList = async ()=>{
|
|
|
+ const { error, code, data } = await mainApi.getInvoiceContentList()
|
|
|
if (!error && code === 200) {
|
|
|
invoiceContentList.value = getArrValue(data)
|
|
|
|
|
@@ -131,7 +137,7 @@ const getInvoiceContentList=async()=>{
|
|
|
}
|
|
|
//发票类型字典
|
|
|
const getInvoiceType = async () => {
|
|
|
- const {error, code, data} = await getDictInfo('invoice_type')
|
|
|
+ const { error, code, data } = await getDictInfo('invoice_type')
|
|
|
//判断状态
|
|
|
if (!error && code === 200) {
|
|
|
invoiceTypeData.value = getArrValue(data)
|
|
@@ -141,7 +147,7 @@ const getInvoiceType = async () => {
|
|
|
}
|
|
|
//项目类型
|
|
|
const getProjectData = async () => {
|
|
|
- const {error, code, data} = await getProjectList()
|
|
|
+ const { error, code, data } = await getProjectList()
|
|
|
//判断状态
|
|
|
if (!error && code === 200) {
|
|
|
projectType.value = getArrValue(data)
|
|
@@ -150,4 +156,5 @@ const getProjectData = async () => {
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
|
+
|
|
|
<style lang='scss' scoped></style>
|