|
@@ -12,13 +12,17 @@
|
|
|
@click.stop="openCheckDialog">
|
|
|
审批
|
|
|
</el-button>
|
|
|
+ <el-button v-if="form.status == 2 && tenantId == 681169 && roleName.indexOf('财务') !== -1" type="primary" size="small" class="el-button--small-yh"
|
|
|
+ @click.stop="reimbursementCompleted">
|
|
|
+ 报销完成
|
|
|
+ </el-button>
|
|
|
<el-button v-if="form.status > 0" @click.native="checkScheduleDialog = true, checkId = form.id" type="primary"
|
|
|
size="small">审核进度</el-button>
|
|
|
<el-button type="primary" v-if="!checkDisabled" :disabled="!form.id || disabled" size="small"
|
|
|
@click="pleaseCheck" :loading="btnLoading">请核</el-button>
|
|
|
<el-button type="success" :disabled="!form.id" size="small" @click="copyDoc" :loading="btnLoading" v-if="false">
|
|
|
复制单据</el-button>
|
|
|
- <el-button type="primary" @click="editCustomer" size="small" :disabled="form.status > 0" :loading="btnLoading">
|
|
|
+ <el-button type="primary" @click="editCustomer" size="small" :disabled="form.status > 0 && form.status !== 2" :loading="btnLoading">
|
|
|
保存数据</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -48,7 +52,7 @@
|
|
|
:disabled="disabled || checkDisabled"></avue-input-tree>
|
|
|
</template>
|
|
|
<template slot="postId">
|
|
|
- <el-select v-model="form.postId" clearable filterable placeholder="请选择 岗位" @change="postHandle"
|
|
|
+ <el-select v-model="form.postId" clearable filterable placeholder="请选择岗位" @change="postHandle"
|
|
|
@clear="form.postId == null" :disabled="disabled || checkDisabled">
|
|
|
<el-option v-for="(item, index) in postDic" :label="item.postName" :value="item.id" :key="index" />
|
|
|
</el-select>
|
|
@@ -63,47 +67,29 @@
|
|
|
:disabled="disabled || checkDisabled">录入明细</el-button>
|
|
|
<el-button type="info" icon="el-icon-printer" size="small" @click="openReport">报表打印</el-button>
|
|
|
</template>
|
|
|
+ <template slot="detailId" slot-scope="{ row }">
|
|
|
+ <el-select v-if="row.$cellEdit" v-model="row.detailId" filterable clearable @change="detailChange(row)"
|
|
|
+ size="small">
|
|
|
+ <el-option v-for="(item, index) in row.feeList" :key="index" :label="item.cname" :value="item.id">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ <span v-else>{{ row.detail }}</span>
|
|
|
+ </template>
|
|
|
<template slot="menu" slot-scope="{ row, index }">
|
|
|
<el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
|
|
|
- :disabled="disabled || checkDisabled">{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
|
|
|
+ :disabled="(disabled || checkDisabled) && form.status !== 2" v-if="form.status == 2 && tenantId == 681169 && roleName.indexOf('财务') !== -1">{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
|
|
|
+ <el-button size="small" icon="el-icon-edit" type="text" @click="rowCell(row, index)"
|
|
|
+ :disabled="disabled || checkDisabled" v-else>{{ row.$cellEdit ? "保存" : "修改" }}</el-button>
|
|
|
<el-button size="small" icon="el-icon-delete" type="text" @click="rowDel(row, index)"
|
|
|
:disabled="disabled || checkDisabled">删除</el-button>
|
|
|
</template>
|
|
|
- <template slot="payDate" slot-scope="{ row, index }">
|
|
|
- <el-date-picker v-if="row.$cellEdit" v-model="row.payDate" type="date" placeholder="选择日期" size="small"
|
|
|
- style="width: 100%" format="yyyy-MM-dd" valueFormat="yyyy-MM-dd"></el-date-picker>
|
|
|
- <span v-else>{{ row.payDate }}</span>
|
|
|
- </template>
|
|
|
<template slot="moldId" slot-scope="{ row }">
|
|
|
<avue-cascader v-if="row.$cellEdit" v-model="row.moldId" size="small" style="width: 100%;" :dic="dicArea"
|
|
|
- :props="props" check-strictly :emit-path="false" :show-all-levels="false"
|
|
|
+ :props="props" :disabled="disabled || checkDisabled" check-strictly :emit-path="false" :show-all-levels="false"
|
|
|
@change="moldChange($event, row, dicArea)" @clear="row.feeList = feesOption" placeholder="请选择">
|
|
|
</avue-cascader>
|
|
|
<span v-else>{{ row.mold }}</span>
|
|
|
</template>
|
|
|
- <template slot="detailId" slot-scope="{ row }">
|
|
|
- <el-select v-if="row.$cellEdit" v-model="row.detailId" filterable clearable @change="detailChange(row)"
|
|
|
- size="small">
|
|
|
- <el-option v-for="(item, index) in row.feeList" :key="index" :label="item.cname" :value="item.id">
|
|
|
- </el-option>
|
|
|
- </el-select>
|
|
|
- <span v-else>{{ row.detail }}</span>
|
|
|
- </template>
|
|
|
- <template slot="explanation" slot-scope="{ row, index }">
|
|
|
- <el-input v-if="row.$cellEdit" v-model="row.explanation" size="small" placeholder="输入内容" />
|
|
|
- <span v-else>{{ row.explanation }}</span>
|
|
|
- </template>
|
|
|
- <template slot="payMethod" slot-scope="{ row, index }">
|
|
|
- <el-select v-model="row.payMethod" size="small" placeholder="请选择" clearable :disabled="!row.$cellEdit">
|
|
|
- <el-option v-for="(item, index) in paymentOption" :key="index" :label="item.dictValue"
|
|
|
- :value="item.dictKey"></el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
- <template slot="amount" slot-scope="{ row, index }">
|
|
|
- <el-input-number v-if="row.$cellEdit" v-model="row.amount" size="small" :controls="false" :precision="2"
|
|
|
- style="width: 100%" placeholder="金额"></el-input-number>
|
|
|
- <span v-else>{{ row.amount }}</span>
|
|
|
- </template>
|
|
|
</avue-crud>
|
|
|
</trade-card>
|
|
|
<trade-card title="上传附件">
|
|
@@ -112,14 +98,8 @@
|
|
|
:disabled="disabled || checkDisabled"
|
|
|
:data="fileList"></c-upload>
|
|
|
</trade-card>
|
|
|
- <trade-card title="付款信息">
|
|
|
+ <trade-card title="付款信息" v-if="tenantId == 681169">
|
|
|
<avue-form :option="optionTwo" v-model="form">
|
|
|
- <template slot="paymentMethodName" slot-scope="{ row, index }">
|
|
|
- <el-select v-model="form.paymentMethodName" filterable size="small" placeholder="请选择" clearable>
|
|
|
- <el-option v-for="(item, index) in paymentOption" :key="index" :label="item.dictValue"
|
|
|
- :value="item.dictKey"></el-option>
|
|
|
- </el-select>
|
|
|
- </template>
|
|
|
</avue-form>
|
|
|
</trade-card>
|
|
|
</div>
|
|
@@ -153,7 +133,7 @@ import { getUserInfo } from "@/api/system/user";
|
|
|
import { getDeptTree } from "@/api/system/dept";
|
|
|
import { getCurrentDate } from "@/util/date";
|
|
|
import { getList as getPostList } from "@/api/system/post";
|
|
|
-import { dataDetail, typeSave, removeGoods, pleaseCheck } from "@/api/standAlone/reimbursement";
|
|
|
+import { dataDetail, typeSave, removeGoods, pleaseCheck ,reimbursementModify} from "@/api/standAlone/reimbursement";
|
|
|
import { contrastObj, contrastList } from "@/util/contrastData";
|
|
|
import check from "@/components/check/check";
|
|
|
import checkSchedule from "@/components/check/checkSchedule";
|
|
@@ -179,6 +159,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ roleName: localStorage.getItem("roleName").split(','),
|
|
|
disabled: false,
|
|
|
pageLoading: false,
|
|
|
btnLoading: false,
|
|
@@ -405,6 +386,16 @@ export default {
|
|
|
}
|
|
|
this.$set(this.form, 'claimDate', getCurrentDate()); // 默认当前日期
|
|
|
this.tableOption = await this.getColumnData(this.getColumnName(107),this.tableOptionBack);
|
|
|
+ this.findObject(this.tableOption.column, "quantity").change = (data)=>{
|
|
|
+ if (data.row.quantity && data.row.price){
|
|
|
+ data.row.amount = data.row.quantity * data.row.price
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.findObject(this.tableOption.column, "price").change = (data)=>{
|
|
|
+ if (data.row.quantity && data.row.price){
|
|
|
+ data.row.amount = data.row.quantity * data.row.price
|
|
|
+ }
|
|
|
+ }
|
|
|
this.key++
|
|
|
gainUser().then(res => {
|
|
|
this.userList = res.data.data;
|
|
@@ -471,7 +462,6 @@ export default {
|
|
|
methods: {
|
|
|
returnBack(row) {
|
|
|
getlistBankBy(row.id).then(res =>{
|
|
|
- this.form.belongToCorpCode = row.code
|
|
|
this.findObject(this.option.column, "accountReimbursement").dicData = res.data
|
|
|
})
|
|
|
},
|
|
@@ -521,15 +511,37 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- this.optionTwo.column.map(e => {
|
|
|
- if (this.checkDisabled) {
|
|
|
+ if (this.form.status == 2){
|
|
|
+ if (this.roleName.indexOf('财务') !== -1){
|
|
|
+ this.optionTwo.column.map(e => {
|
|
|
+ this.$set(e, 'disabled', false)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ this.tableOption.column.map(e => {
|
|
|
+ if (this.roleName.indexOf('财务') !== -1){
|
|
|
+ if (e.prop == 'subjectName'){
|
|
|
+ this.$set(e, 'disabled', false)
|
|
|
+ }else if(e.prop == 'accountingItemsName'){
|
|
|
+ this.$set(e, 'disabled', false)
|
|
|
+ }else {
|
|
|
+ this.$set(e, 'disabled', true)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }else {
|
|
|
+ this.optionTwo.column.map(e => {
|
|
|
this.$set(e, 'disabled', true)
|
|
|
- } else {
|
|
|
- if (e.prop != 'serialNo') {
|
|
|
+ })
|
|
|
+ this.tableOption.column.map(e => {
|
|
|
+ if (e.prop == 'subjectName'){
|
|
|
+ this.$set(e, 'disabled', true)
|
|
|
+ }else if(e.prop == 'accountingItemsName'){
|
|
|
+ this.$set(e, 'disabled', true)
|
|
|
+ }else {
|
|
|
this.$set(e, 'disabled', false)
|
|
|
}
|
|
|
- }
|
|
|
- })
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
// 复制
|
|
|
copyDoc() {
|
|
@@ -669,6 +681,18 @@ export default {
|
|
|
deptClick(data) {
|
|
|
this.$set(this.form, 'deptName', data.title)
|
|
|
},
|
|
|
+ //报销完成
|
|
|
+ reimbursementCompleted(){
|
|
|
+ this.$set(this.form, 'itemList', this.dataList)
|
|
|
+ let formTwo = {
|
|
|
+ ...this.form,
|
|
|
+ itemList:this.dataList,
|
|
|
+ fileList:this.fileList
|
|
|
+ }
|
|
|
+ reimbursementModify(formTwo).then(res=>{
|
|
|
+ this.$message.success('生成成功')
|
|
|
+ })
|
|
|
+ },
|
|
|
//打开审核
|
|
|
openCheckDialog() {
|
|
|
this.checkData = this.detailData.check
|