|
@@ -171,6 +171,27 @@
|
|
/>
|
|
/>
|
|
</template>
|
|
</template>
|
|
</van-field>
|
|
</van-field>
|
|
|
|
+ <van-field
|
|
|
|
+ label="状态" >
|
|
|
|
+ <template #input>
|
|
|
|
+ <span :class="statusClass[item.status]">{{
|
|
|
|
+ statusList[item.status] }}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </van-field>
|
|
|
|
+
|
|
|
|
+ <van-field
|
|
|
|
+ label="操作" v-if="isAudit && item.isIncharger && item.status == 1"
|
|
|
|
+ >
|
|
|
|
+ <template #input>
|
|
|
|
+ <div style="float:right;">
|
|
|
|
+ <van-button type="info" :loading="item.approveLoading"
|
|
|
|
+ @click.stop="approveSingle(item)">通过</van-button>
|
|
|
|
+ <van-button style="margin-left:25px" type="danger" :loading="item.approveLoading"
|
|
|
|
+ @click.stop="denySingle(item)">驳回</van-button>
|
|
|
|
+ </div>
|
|
|
|
+ </template>
|
|
|
|
+ </van-field>
|
|
|
|
+
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="addinvoice" v-if="canEdit"><van-button size="small" icon="plus" type="info" plain hairline @click="addInvoice">添加发票</van-button></div>
|
|
<div class="addinvoice" v-if="canEdit"><van-button size="small" icon="plus" type="info" plain hairline @click="addInvoice">添加发票</van-button></div>
|
|
@@ -252,9 +273,11 @@
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
|
|
+ statusList: ['审核通过', '待审核', '已驳回', '已撤销'],
|
|
|
|
+ statusClass: ['', 'waiting', 'rejected', ''],
|
|
|
|
+ isAudit: false,
|
|
user: JSON.parse(localStorage.userInfo),
|
|
user: JSON.parse(localStorage.userInfo),
|
|
canEdit: this.$route.params.canEdit,
|
|
canEdit: this.$route.params.canEdit,
|
|
- canExamine: false,
|
|
|
|
currentDate1 : new Date(),
|
|
currentDate1 : new Date(),
|
|
currentDate2 : new Date(),
|
|
currentDate2 : new Date(),
|
|
minDate: new Date(2020,0,1),
|
|
minDate: new Date(2020,0,1),
|
|
@@ -320,17 +343,10 @@ export default {
|
|
},
|
|
},
|
|
mounted() {
|
|
mounted() {
|
|
console.log(this.$route.params);
|
|
console.log(this.$route.params);
|
|
- for(let i in this.user.functionList){
|
|
|
|
- if(this.user.functionList[i].name == '费用审核'){
|
|
|
|
- this.canExamine = true
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+ this.isAudit = this.$route.params.isAudit;
|
|
|
|
|
|
this.getDetail()
|
|
this.getDetail()
|
|
if(this.canEdit){
|
|
if(this.canEdit){
|
|
- // if(this.canExamine){
|
|
|
|
- // this.getUserList()
|
|
|
|
- // }
|
|
|
|
this.getProjectList()
|
|
this.getProjectList()
|
|
}
|
|
}
|
|
this.getExpensMainTypes()
|
|
this.getExpensMainTypes()
|
|
@@ -540,6 +556,7 @@ export default {
|
|
this.invoiceList = res.data.invoiceList
|
|
this.invoiceList = res.data.invoiceList
|
|
for(let i in res.data.invoiceList){
|
|
for(let i in res.data.invoiceList){
|
|
this.formshowText.inProjectName.push(res.data.invoiceList[i].projectName)
|
|
this.formshowText.inProjectName.push(res.data.invoiceList[i].projectName)
|
|
|
|
+ res.data.invoiceList[i].approveLoading = false;
|
|
if(res.data.invoiceList[i].pic){
|
|
if(res.data.invoiceList[i].pic){
|
|
this.uploader[i] = [{url:'/upload/' + res.data.invoiceList[i].pic}]
|
|
this.uploader[i] = [{url:'/upload/' + res.data.invoiceList[i].pic}]
|
|
}else{
|
|
}else{
|
|
@@ -583,6 +600,34 @@ export default {
|
|
}
|
|
}
|
|
}).catch(err=> {this.$toast.clear();console.log(err)});
|
|
}).catch(err=> {this.$toast.clear();console.log(err)});
|
|
},
|
|
},
|
|
|
|
+ // 单据审核
|
|
|
|
+ approveSingle(item) {
|
|
|
|
+ item.approveLoading = true;
|
|
|
|
+ this.$axios.post("/expense-sheet/approveSingleProject", { id: item.id })
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.$toast.success('已通过')
|
|
|
|
+ item.approveLoading = false
|
|
|
|
+ this.getDetail();
|
|
|
|
+ } else {
|
|
|
|
+ this.$toast.fail('获取失败');
|
|
|
|
+ }
|
|
|
|
+ }).catch(err => { this.$toast.clear(); console.log(err) });
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ denySingle(item) {
|
|
|
|
+ item.approveLoading = true;
|
|
|
|
+ this.$axios.post("/expense-sheet/denySingleProject", {id: item.id})
|
|
|
|
+ .then(res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.$toast.success('已驳回')
|
|
|
|
+ item.approveLoading = false
|
|
|
|
+ this.getDetail();
|
|
|
|
+ } else {
|
|
|
|
+ this.$toast.fail('获取失败');
|
|
|
|
+ }
|
|
|
|
+ }).catch(err => { this.$toast.clear(); console.log(err) });
|
|
|
|
+ },
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|
|
@@ -621,6 +666,13 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+.waiting {
|
|
|
|
+ color: orange;
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+.rejected {
|
|
|
|
+ color: red;
|
|
|
|
+}
|
|
</style>
|
|
</style>
|
|
<style>
|
|
<style>
|
|
.edit_form .invoice .van-field__label{
|
|
.edit_form .invoice .van-field__label{
|