|
@@ -96,7 +96,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 费用主类型 -->
|
|
<!-- 费用主类型 -->
|
|
<el-form-item :label="$t('feiYongZhuLeiXing')">
|
|
<el-form-item :label="$t('feiYongZhuLeiXing')">
|
|
- <el-select v-model="expenseMainTypeValue" style="width: 150px" @change="this.getExpList">
|
|
|
|
|
|
+ <el-select v-model="expenseMainTypeValue" style="width: 150px" @change="costMainTypeSwitching">
|
|
<el-option v-for="item in expenseMainTypes" :key="item.id" :label="item.name"
|
|
<el-option v-for="item in expenseMainTypes" :key="item.id" :label="item.name"
|
|
:value="item.id"></el-option>
|
|
:value="item.id"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -105,18 +105,31 @@
|
|
<el-form-item :label="$t('di-yi-shen-he-ren')" v-if="auditTypeItem.auditType == 2">
|
|
<el-form-item :label="$t('di-yi-shen-he-ren')" v-if="auditTypeItem.auditType == 2">
|
|
<el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.firstCheckerId"
|
|
<el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.firstCheckerId"
|
|
:placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px"
|
|
:placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px"
|
|
- filterable="true">
|
|
|
|
|
|
+ filterable="true" :disabled="expenseMainTypeValue == 14454">
|
|
<span v-for="(item, index) in usersNoInfo" :key="index">
|
|
<span v-for="(item, index) in usersNoInfo" :key="index">
|
|
<el-option :label="item.name" :value="item.id"></el-option>
|
|
<el-option :label="item.name" :value="item.id"></el-option>
|
|
</span>
|
|
</span>
|
|
</el-select>
|
|
</el-select>
|
|
|
|
|
|
- <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'4'"
|
|
|
|
|
|
+ <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'4'" :disabled="expenseMainTypeValue == 14454"
|
|
:subject="usersNoInfo" :subjectId="addForm.firstCheckerId" ref="selectCat"
|
|
:subject="usersNoInfo" :subjectId="addForm.firstCheckerId" ref="selectCat"
|
|
@selectCal="selectCal"></selectCat>
|
|
@selectCal="selectCal"></selectCat>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <!-- 第一审核人 -->
|
|
|
|
- <el-form-item :label="$t('di-er-shen-he-ren')" v-if="auditTypeItem.auditType == 2">
|
|
|
|
|
|
+ <!-- 第二审核人 -->
|
|
|
|
+ <el-form-item :label="$t('di-er-shen-he-ren')" v-if="auditTypeItem.auditType == 2 && user.companyId != 4811">
|
|
|
|
+ <el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.secondCheckerId"
|
|
|
|
+ :placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px"
|
|
|
|
+ filterable="true">
|
|
|
|
+ <span v-for="(item, index) in usersNoInfo" :key="index">
|
|
|
|
+ <el-option :label="item.name" :value="item.id"></el-option>
|
|
|
|
+ </span>
|
|
|
|
+ </el-select>
|
|
|
|
+
|
|
|
|
+ <selectCat v-if="user.userNameNeedTranslate == '1'" :size="'medium'" :widthStr="'150'" :distinction="'5'"
|
|
|
|
+ :subject="usersNoInfo" :subjectId="addForm.secondCheckerId" ref="selectCat"
|
|
|
|
+ @selectCal="selectCal"></selectCat>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ <el-form-item :label="$t('di-er-shen-he-ren')" v-if="auditTypeItem.auditType == 2 && user.companyId == 4811 && expenseMainTypeValue != 14454">
|
|
<el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.secondCheckerId"
|
|
<el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.secondCheckerId"
|
|
:placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px"
|
|
:placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px"
|
|
filterable="true">
|
|
filterable="true">
|
|
@@ -192,7 +205,7 @@
|
|
<el-table-column :label="this.user.timeType.easyExpense == 0 ? $t('amountoffees') : '费用金额'" width="135px">
|
|
<el-table-column :label="this.user.timeType.easyExpense == 0 ? $t('amountoffees') : '费用金额'" width="135px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-input size="small" :id="'upam' + scope.$index" v-model="scope.row.amount" @input="zhi(scope.$index)"
|
|
<el-input size="small" :id="'upam' + scope.$index" v-model="scope.row.amount" @input="zhi(scope.$index)"
|
|
- @change="shiqu(scope.row.amount)" @keyup.native="restrictNumber('upam' + scope.$index)"></el-input>
|
|
|
|
|
|
+ @change="shiqu(scope.row.amount)" @keyup.native="restrictNumber('upam' + scope.$index)" :disabled="user.companyId == 4811 && user.id != addForm.ownerId && expenseMainTypeValue == 14454"></el-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="invoiceNo" :label="$t('invoiceno')" width="135px"
|
|
<el-table-column prop="invoiceNo" :label="$t('invoiceno')" width="135px"
|
|
@@ -209,12 +222,12 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('taxs')" width="135px" v-if="this.user.timeType.easyExpense == 0">
|
|
<el-table-column :label="$t('taxs')" width="135px" v-if="this.user.timeType.easyExpense == 0">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input size="small" v-model="scope.row.taxValue" @input="zhis(scope.$index)"></el-input>
|
|
|
|
|
|
+ <el-input size="small" v-model="scope.row.taxValue" @input="zhis(scope.$index)" :disabled="user.companyId == 4811 && user.id != addForm.ownerId && expenseMainTypeValue == 14454"></el-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('bei-zhu')" width="135px">
|
|
<el-table-column :label="$t('bei-zhu')" width="135px">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input size="small" v-model="scope.row.remark"></el-input>
|
|
|
|
|
|
+ <el-input size="small" v-model="scope.row.remark" :disabled="user.companyId == 4811 && user.id != addForm.ownerId && expenseMainTypeValue == 14454"></el-input>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('expensereimbursementvoucher')" width="135px">
|
|
<el-table-column :label="$t('expensereimbursementvoucher')" width="135px">
|
|
@@ -398,6 +411,7 @@
|
|
<span v-if="scope.row.status == 1" class="waiting">{{ statusTxt[scope.row.status] }}</span>
|
|
<span v-if="scope.row.status == 1" class="waiting">{{ statusTxt[scope.row.status] }}</span>
|
|
<span v-if="scope.row.status == 2" class="rejected">{{ statusTxt[scope.row.status] }}</span>
|
|
<span v-if="scope.row.status == 2" class="rejected">{{ statusTxt[scope.row.status] }}</span>
|
|
<span v-if="scope.row.status == 0 || scope.row.status == 3">{{ statusTxt[scope.row.status] }}</span>
|
|
<span v-if="scope.row.status == 0 || scope.row.status == 3">{{ statusTxt[scope.row.status] }}</span>
|
|
|
|
+ <span v-if="scope.row.status == 4" style="color: red">{{ statusTxt[scope.row.status] }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="reviewProcess" :label="$t('title.reviewProcess')" width="180" v-if="auditTypeItem.auditType == 2">
|
|
<el-table-column prop="reviewProcess" :label="$t('title.reviewProcess')" width="180" v-if="auditTypeItem.auditType == 2">
|
|
@@ -405,6 +419,7 @@
|
|
<span v-if="scope.row.reviewProcess == 0">{{ $t('daiDiYiShenHeRenShenHe') }}</span>
|
|
<span v-if="scope.row.reviewProcess == 0">{{ $t('daiDiYiShenHeRenShenHe') }}</span>
|
|
<span v-if="scope.row.reviewProcess == 1">{{ $t('daiDiErShenHeRenShenHe') }}</span>
|
|
<span v-if="scope.row.reviewProcess == 1">{{ $t('daiDiErShenHeRenShenHe') }}</span>
|
|
<span v-if="scope.row.reviewProcess == 2">{{ $t('shenHeWanCheng') }}</span>
|
|
<span v-if="scope.row.reviewProcess == 2">{{ $t('shenHeWanCheng') }}</span>
|
|
|
|
+ <span v-if="scope.row.reviewProcess == 3">未提交</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<!-- <el-table-column prop="denyReason" :label="$t('dismissreason')" width="180">
|
|
<!-- <el-table-column prop="denyReason" :label="$t('dismissreason')" width="180">
|
|
@@ -597,7 +612,7 @@
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-input size="small" v-if="!flg" :id="'am' + scope.$index" v-model="scope.row.amount"
|
|
<el-input size="small" v-if="!flg" :id="'am' + scope.$index" v-model="scope.row.amount"
|
|
@input="zhiNum(scope.$index, scope)" @change="kan"
|
|
@input="zhiNum(scope.$index, scope)" @change="kan"
|
|
- @keyup.native="restrictNumber('am' + scope.$index)"></el-input>
|
|
|
|
|
|
+ @keyup.native="restrictNumber('am' + scope.$index)" :disabled="user.companyId == 4811 && user.id != ParticularsList.ownerId && ParticularsList.type == 14454"></el-input>
|
|
<span v-else>¥{{ scope.row.amount }}</span>
|
|
<span v-else>¥{{ scope.row.amount }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -619,13 +634,13 @@
|
|
<el-table-column prop="taxValue" :label="$t('taxs') + '(' + $t('yuan') + ')'" width="172"
|
|
<el-table-column prop="taxValue" :label="$t('taxs') + '(' + $t('yuan') + ')'" width="172"
|
|
v-if="this.user.timeType.easyExpense == 0">
|
|
v-if="this.user.timeType.easyExpense == 0">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input size="small" v-if="!flg" v-model="scope.row.taxValue"></el-input>
|
|
|
|
|
|
+ <el-input size="small" v-if="!flg" v-model="scope.row.taxValue" :disabled="user.companyId == 4811 && user.id != ParticularsList.ownerId && ParticularsList.type == 14454"></el-input>
|
|
<span v-else>¥{{ scope.row.taxValue }}</span>
|
|
<span v-else>¥{{ scope.row.taxValue }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="remark" :label="$t('bei-zhu')" width="300">
|
|
<el-table-column prop="remark" :label="$t('bei-zhu')" width="300">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <el-input size="small" v-if="!flg" v-model="scope.row.remark" maxlength="100"></el-input>
|
|
|
|
|
|
+ <el-input size="small" v-if="!flg" v-model="scope.row.remark" maxlength="100" :disabled="user.companyId == 4811 && user.id != ParticularsList.ownerId && ParticularsList.type == 14454"></el-input>
|
|
<span v-else>{{ scope.row.remark }}</span>
|
|
<span v-else>{{ scope.row.remark }}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
@@ -1124,7 +1139,7 @@ export default {
|
|
createDate: [{ required: true, message: this.$t('pleaseselectadate'), trigger: "blur" }],
|
|
createDate: [{ required: true, message: this.$t('pleaseselectadate'), trigger: "blur" }],
|
|
},
|
|
},
|
|
isAuditList: false,
|
|
isAuditList: false,
|
|
- statusTxt: [this.$t('state.approved'), this.$t('state.WaitingAudit'), this.$t('state.rejected'), this.$t('state.undone')],
|
|
|
|
|
|
+ statusTxt: [this.$t('state.approved'), this.$t('state.WaitingAudit'), this.$t('state.rejected'), this.$t('state.undone'), '未填写'],
|
|
user: JSON.parse(sessionStorage.getItem("user")),
|
|
user: JSON.parse(sessionStorage.getItem("user")),
|
|
permissions: JSON.parse(sessionStorage.getItem("permissions")),
|
|
permissions: JSON.parse(sessionStorage.getItem("permissions")),
|
|
allExpList: [],
|
|
allExpList: [],
|
|
@@ -1628,6 +1643,12 @@ export default {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ costMainTypeSwitching() {
|
|
|
|
+ if(this.user.companyId == 4811 && this.expenseMainTypeValue == 14454) {
|
|
|
|
+ this.addForm.firstCheckerId = this.user.id
|
|
|
|
+ }
|
|
|
|
+ this.getExpList()
|
|
|
|
+ },
|
|
getExpList() {
|
|
getExpList() {
|
|
this.http.post('/expense-type/getList', {
|
|
this.http.post('/expense-type/getList', {
|
|
},
|
|
},
|
|
@@ -1741,11 +1762,13 @@ export default {
|
|
console.log(paramData, '<== paramData')
|
|
console.log(paramData, '<== paramData')
|
|
let noAmount = paramData.invoiceList.filter(item => !item.amount)
|
|
let noAmount = paramData.invoiceList.filter(item => !item.amount)
|
|
if(noAmount.length > 0) {
|
|
if(noAmount.length > 0) {
|
|
- this.$message({
|
|
|
|
- message: this.$t('qingTianXieWanZhengFeiYongJinE'),
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- return;
|
|
|
|
|
|
+ if(this.user.companyId != 4811 && this.ParticularsList.type != 14454 && this.user.id != this.ParticularsList.ownerId) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: this.$t('qingTianXieWanZhengFeiYongJinE'),
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
paramData.items = JSON.stringify(paramData.invoiceList)//这里要传发票列表的json转string
|
|
paramData.items = JSON.stringify(paramData.invoiceList)//这里要传发票列表的json转string
|
|
// console.log(paramData, '<== paramData')
|
|
// console.log(paramData, '<== paramData')
|
|
@@ -1816,11 +1839,13 @@ export default {
|
|
this.$refs.mainAddForm.validate(valid => {
|
|
this.$refs.mainAddForm.validate(valid => {
|
|
if (valid) {
|
|
if (valid) {
|
|
if(this.auditTypeItem.auditType == 2 && (!this.addForm.firstCheckerId || !this.addForm.secondCheckerId)) {
|
|
if(this.auditTypeItem.auditType == 2 && (!this.addForm.firstCheckerId || !this.addForm.secondCheckerId)) {
|
|
- this.$message({
|
|
|
|
- message: !this.addForm.firstCheckerId ? this.$t('qingXuanZeDiYiShenHeRen') : this.$t('qingXuanZeDiErShenHeRen'),
|
|
|
|
- type: "error"
|
|
|
|
- });
|
|
|
|
- return;
|
|
|
|
|
|
+ if(this.user.id != 4811 && this.expenseMainTypeValue != 14454) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: !this.addForm.firstCheckerId ? this.$t('qingXuanZeDiYiShenHeRen') : this.$t('qingXuanZeDiErShenHeRen'),
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
if (this.invoiceList.length == 0) {
|
|
if (this.invoiceList.length == 0) {
|
|
this.$message({
|
|
this.$message({
|
|
@@ -1854,9 +1879,11 @@ export default {
|
|
strObj.datas = this.$t('forthedate')
|
|
strObj.datas = this.$t('forthedate')
|
|
strObj.flg = true
|
|
strObj.flg = true
|
|
}
|
|
}
|
|
- if (!this.invoiceList[i].amount || this.invoiceList[i].amount == '') {
|
|
|
|
- strObj.rmb = this.$t('feiYongJinE')
|
|
|
|
- strObj.flg = true
|
|
|
|
|
|
+ if(this.user.companyId != 4811 && this.expenseMainTypeValue != 14454 && this.user.id != this.addForm.ownerId) {
|
|
|
|
+ if (!this.invoiceList[i].amount || this.invoiceList[i].amount == '') {
|
|
|
|
+ strObj.rmb = this.$t('feiYongJinE')
|
|
|
|
+ strObj.flg = true
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
if (strObj.flg) {
|
|
if (strObj.flg) {
|