Browse Source

申请详情

apply
song 4 years ago
parent
commit
3428a00d9e
  1. 1
      components/FinanceManage.vue
  2. 168
      pages/application-details.vue

1
components/FinanceManage.vue

@ -45,7 +45,6 @@ const data = reactive({
const projectId = useProjectId() const projectId = useProjectId()
/** /**
* 查看项目下的所有任务对应的财务信息 * 查看项目下的所有任务对应的财务信息
* @param { Number } pageNum * @param { Number } pageNum

168
pages/application-details.vue

@ -12,22 +12,22 @@
<!-- 审核结果 --> <!-- 审核结果 -->
<div class="bg-white px-3"> <div class="bg-white px-3">
<div class="text-gray-500 font-semibold px-1 py-3">审核结果</div> <div class="text-gray-500 font-semibold px-1 py-3">审核结果</div>
<div v-for="item in checkerList" class="flex py-3 px-4 text-gray-400 text-base justify-between"> <div v-for="(item, checkerIndex) in checkerList" :key="checkerIndex" class="flex py-3 px-4 text-gray-400 text-base justify-between">
<div> <div>
<div>{{item.name}}</div> <div>{{item.checkerName}}</div>
<div class="text-sm pt-1">{{item.advice}}</div> <div class="text-sm pt-1">{{item.remark}}</div>
<div class="text-sm pt-1">{{item.checkedTime}}</div> <div class="text-sm pt-1">{{item.time}}</div>
</div> </div>
<div class="text-center"> <div class="text-center">
<div :class="item.status === '1' ? 'text-green-500' : item.status === '2' ? 'text-red-500' : ''"> <div :class="item.checkStatus === '1' ? 'text-green-500' : item.checkStatus === '2' ? 'text-red-500' : ''">
{{item.status === '1' ? '已通过' : item.status === '2' ? '已驳回' : '待审批'}} {{item.checkStatus === '1' ? '已通过' : item.checkStatus === '2' ? '已驳回' : '待审批'}}
</div> </div>
<div v-if="item.score>0" class="mt-1"> <div class="mt-1">
<van-circle <van-circle
v-model:current-rate="item.score" v-model:current-rate="currentRate"
:rate="item.score" :rate="100"
:speed="100" :speed="100"
:text="item.score" :text="100"
class="w-12" class="w-12"
color="#ff6700" color="#ff6700"
:stroke-width="100" :stroke-width="100"
@ -37,9 +37,39 @@
</div> </div>
</div> </div>
<!-- 发票信息 --> <!-- 发票信息 -->
<div class="bg-white px-3"> <div class="bg-white px-3" v-if="isInvoice">
<div class="text-gray-500 font-semibold px-1 py-3 mt-5">发票信息</div> <div class="text-gray-500 font-semibold px-1 py-3 mt-5">发票信息</div>
<div v-for="item in billList" class="flex py-2 px-4 text-gray-400 text-base justify-between"> <div v-for="(item,invoiceIndex) in invoiceList" :key="invoiceIndex">
<div class="flex py-2 px-4 text-gray-400 text-base justify-between">
<div>发票代码</div>
<div>{{item.invoiceCode}}</div>
</div>
<div class="flex py-2 px-4 text-gray-400 text-base justify-between">
<div>发票号码</div>
<div>{{item.invoiceNumber}}</div>
</div>
<div class="flex py-2 px-4 text-gray-400 text-base justify-between">
<div>合计金额()</div>
<div>{{item.money}}</div>
</div>
<div class="flex py-2 px-4 text-gray-400 text-base justify-between">
<div>税额()</div>
<div>{{item.taxMoney}}</div>
</div>
<div class="flex py-2 px-4 text-gray-400 text-base justify-between">
<div>开票日期</div>
<div>{{dayjs(item.invoiceTime - 0).format('YYYY年MM月DD日')}}</div>
</div>
<div class="flex py-2 px-4 text-gray-400 text-base justify-between">
<div>备注</div>
<div>{{item.remark}}</div>
</div>
</div>
</div>
<!-- 金额信息 -->
<div class="bg-white px-3" v-else>
<div class="text-gray-500 font-semibold px-1 py-3 mt-5">发票信息</div>
<div v-for="(item,moneyIndex) in moneyInfo" :key="moneyIndex" class="flex py-2 px-4 text-gray-400 text-base justify-between">
<div>{{item.name}}</div> <div>{{item.name}}</div>
<div>{{item.value}}</div> <div>{{item.value}}</div>
</div> </div>
@ -47,7 +77,7 @@
<!-- 其他信息 --> <!-- 其他信息 -->
<div class="bg-white px-3"> <div class="bg-white px-3">
<div class="text-gray-500 font-semibold px-1 py-3 mt-5">其他信息</div> <div class="text-gray-500 font-semibold px-1 py-3 mt-5">其他信息</div>
<div v-for="item in otherData" class="flex py-2 px-4 text-gray-400 text-base justify-between"> <div v-for="(item,otherIndex) in otherData" :key="otherIndex" class="flex py-2 px-4 text-gray-400 text-base justify-between">
<div>{{item.name}}</div> <div>{{item.name}}</div>
<div>{{item.value}}</div> <div>{{item.value}}</div>
</div> </div>
@ -55,7 +85,7 @@
<!-- 提交人信息 --> <!-- 提交人信息 -->
<div class="bg-white px-3"> <div class="bg-white px-3">
<div class="text-gray-500 font-semibold px-1 py-3 mt-5">提交人信息</div> <div class="text-gray-500 font-semibold px-1 py-3 mt-5">提交人信息</div>
<div v-for="item in submitter" class="flex py-2 px-4 text-gray-400 text-base justify-between"> <div v-for="(item, index) in submitter" :key="index" class="flex py-2 px-4 text-gray-400 text-base justify-between">
<div>{{item.name}}</div> <div>{{item.name}}</div>
<div>{{item.value}}</div> <div>{{item.value}}</div>
</div> </div>
@ -64,93 +94,73 @@
</template> </template>
<script setup> <script setup>
import dayjs from "dayjs";
import { ref, computed } from 'vue';
import { getApplyDetail } from 'apis/finance' import { getApplyDetail } from 'apis/finance'
// //
const checkerList = ref([ const currentRate = ref(0);
{ const text = computed(() => currentRate.value.toFixed(0));
name: "冯教授", const isInvoice = ref(false)
advice: "", const checkerList = ref([])
checkedTime: "",
status: "0",
},
{
name: "薇薇安",
advice: "很棒!",
checkedTime: "12/18 14:55",
status: "1",
score:100
},
{
name: "小明",
advice: "很棒!",
checkedTime: "12/18 14:55",
status: "1",
score:80
}
])
// //
const billList = ref([ const invoiceList = ref([])
{ //
name: "发票代码", const moneyInfo = ref([
value: "4154153125646",
},
{
name: "发票号码",
value: "545648789",
},
{
name: "合计金额(元)",
value: "40",
},
{
name: "税额(元)",
value: "2",
},
{ {
name: "开票日期", name: "申请金额",
value: "2022年1月2日", value: "",
label: "money",
}, },
{ {
name: "备注", name: "备注",
value: "业务支出", value: "",
label: "remark",
}, },
]) ])
// //
const otherData = ref([ const otherData = ref([
{ {
name: "申请类型", name: "申请类型",
value: "项目申请" value: "",
label: "typeName",
}, },
{ {
name: "所属项目", name: "所属项目",
value: "PT项目" value: "",
label: "projectName",
}, },
{ {
name: "所属任务", name: "所属任务",
value: "财务条界面设计" value: "",
label: "taskDetailName",
}, },
{ {
name: "类目", name: "类目",
value: "报销" value: "",
label: "categoryName",
}, },
{ {
name: "名目", name: "名目",
value: "业务招待费" value: "",
label: "rowName",
}, },
]) ])
// //
const submitter = ref([ const submitter = ref([
{ {
name:'姓名', name:'姓名',
value:'黛西' value:'',
label: "submitName",
}, },
{ {
name:'部门', name:'部门',
value:'软件部' value:'软件部',
label: "department",
}, },
{ {
name:'提交时间', name:'提交时间',
value:'2021/12/29 13:22' value:'',
label: "applyTime",
}, },
]) ])
@ -165,7 +175,35 @@ function onClickLeft(){
async function handleApplyDetail(){ async function handleApplyDetail(){
try { try {
const params = {param : { applyId: '1485797754654695424' }} const params = {param : { applyId: '1485797754654695424' }}
await getApplyDetail(params) const res = await getApplyDetail(params)
//
checkerList.value = res.checkerList
//
isInvoice.value = res.invoiceList && res.invoiceList.length ? true : false;
invoiceList.value = res.invoiceList
for(let key in res){
moneyInfo.value.forEach(item => {
if(item.label === key){
item.value = res[key]
}
})
}
//
for(let key in res){
otherData.value.forEach(item => {
if(item.label === key){
item.value = res[key]
}
})
}
//
for(let key in res){
submitter.value.forEach(item => {
if(item.label === key){
item.value = res[key]
}
})
}
} catch (error) { } catch (error) {
console.error('error: ', error); console.error('error: ', error);
} }

Loading…
Cancel
Save