|
@@ -59,6 +59,8 @@
|
|
v-if="permissions.costAll">{{ $t('expensetypemanagement') }}</el-button></p>
|
|
v-if="permissions.costAll">{{ $t('expensetypemanagement') }}</el-button></p>
|
|
<p style="float: right;margin-right: 25px;"><el-button type="primary" @click="expenseTypeOp" size="mini"
|
|
<p style="float: right;margin-right: 25px;"><el-button type="primary" @click="expenseTypeOp" size="mini"
|
|
v-if="permissions.costAll">{{ $t('feiYongZhuLeiXingGuanLi') }}</el-button></p>
|
|
v-if="permissions.costAll">{{ $t('feiYongZhuLeiXingGuanLi') }}</el-button></p>
|
|
|
|
+ <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="equipmentOwner" size="mini"
|
|
|
|
+ v-if="user.isMachineCost == 2">设备归属人管理</el-button></p>
|
|
</div>
|
|
</div>
|
|
<!-- 上面部分 -->
|
|
<!-- 上面部分 -->
|
|
<div ref="staff" style="margin: 20px 20px 0 220px; width: 81.5%">
|
|
<div ref="staff" style="margin: 20px 20px 0 220px; width: 81.5%">
|
|
@@ -71,7 +73,7 @@
|
|
<el-form-item :label="$t('peopleconcerned')" prop="ownerId">
|
|
<el-form-item :label="$t('peopleconcerned')" prop="ownerId">
|
|
<!--普通员工只能自己填报自己的 -->
|
|
<!--普通员工只能自己填报自己的 -->
|
|
<el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.ownerId"
|
|
<el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.ownerId"
|
|
- :placeholder="$t('pleaseselecttheapplicant')" style="width: 150px" :disabled="!permissions.costAudit"
|
|
|
|
|
|
+ :placeholder="$t('pleaseselecttheapplicant')" style="width: 150px" :disabled="!permissions.costAudit && expenseMainTypeValue != 14454"
|
|
filterable="true">
|
|
filterable="true">
|
|
<span v-for="(item, index) in users" :key="index">
|
|
<span v-for="(item, index) in users" :key="index">
|
|
<el-option :label="item.name" :value="item.id"></el-option>
|
|
<el-option :label="item.name" :value="item.id"></el-option>
|
|
@@ -91,7 +93,7 @@
|
|
</el-col>
|
|
</el-col>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 发票张数 -->
|
|
<!-- 发票张数 -->
|
|
- <el-form-item :label="$t('invoicenumber')" v-if="this.user.timeType.easyExpense == 0">
|
|
|
|
|
|
+ <el-form-item :label="$t('invoicenumber')" v-if="this.user.timeType.easyExpense == 0 && (expenseMainTypeValue != 14454)">
|
|
<el-input v-model="addForm.ticketNum" style="width: 150px"></el-input>
|
|
<el-input v-model="addForm.ticketNum" style="width: 150px"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 费用主类型 -->
|
|
<!-- 费用主类型 -->
|
|
@@ -116,10 +118,10 @@
|
|
@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 && user.companyId != 4811">
|
|
|
|
|
|
+ <el-form-item :label="$t('di-er-shen-he-ren')" v-if="auditTypeItem.auditType == 2">
|
|
<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" :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>
|
|
@@ -129,23 +131,22 @@
|
|
:subject="usersNoInfo" :subjectId="addForm.secondCheckerId" ref="selectCat"
|
|
:subject="usersNoInfo" :subjectId="addForm.secondCheckerId" 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 && user.companyId == 4811 && expenseMainTypeValue != 14454">
|
|
|
|
- <el-select v-if="user.userNameNeedTranslate != '1'" v-model="addForm.secondCheckerId"
|
|
|
|
- :placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px"
|
|
|
|
|
|
+
|
|
|
|
+ <!-- 设备归属人 -->
|
|
|
|
+ <el-form-item label="设备归属人" v-if="expenseMainTypeValue == 14454">
|
|
|
|
+ <el-select v-model="addForm.equipmentOwnerId"
|
|
|
|
+ placeholder="请选择设备归属人" style="width: 150px"
|
|
filterable="true">
|
|
filterable="true">
|
|
- <span v-for="(item, index) in usersNoInfo" :key="index">
|
|
|
|
- <el-option :label="item.name" :value="item.id"></el-option>
|
|
|
|
|
|
+ <span v-for="(item, index) in equipmentOwnerList" :key="index">
|
|
|
|
+ <el-option :label="item.equipmentOwner" :value="item.id"></el-option>
|
|
</span>
|
|
</span>
|
|
</el-select>
|
|
</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>
|
|
|
|
+
|
|
<!-- 备注 -->
|
|
<!-- 备注 -->
|
|
<el-form-item :label="$t('bei-zhu')" style="display: block; width: 70%">
|
|
<el-form-item :label="$t('bei-zhu')" style="display: block; width: 70%">
|
|
<el-input type="textarea" v-model="addForm.remark" :autosize="{ minRows: 2, maxRows: 2 }"
|
|
<el-input type="textarea" v-model="addForm.remark" :autosize="{ minRows: 2, maxRows: 2 }"
|
|
- maxlength="100"></el-input>
|
|
|
|
|
|
+ maxlength="100" :disabled="expenseMainTypeValue == 14454"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 总费用 -->
|
|
<!-- 总费用 -->
|
|
<!-- <div style="float: left; line-height: 55px;margin-left:20px">总费用 <el-link disabled v-model="addForm.totalAmount">{{addForm.totalAmount}}</el-link> 元</div> -->
|
|
<!-- <div style="float: left; line-height: 55px;margin-left:20px">总费用 <el-link disabled v-model="addForm.totalAmount">{{addForm.totalAmount}}</el-link> 元</div> -->
|
|
@@ -187,7 +188,7 @@
|
|
<el-table-column :label="$t('invoices')" width="175px" v-if="this.user.timeType.easyExpense == 0">
|
|
<el-table-column :label="$t('invoices')" width="175px" v-if="this.user.timeType.easyExpense == 0">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-select size="small" v-model="scope.row.invoiceType" :placeholder="$t('pleaseselectthetypeoffee')"
|
|
<el-select size="small" v-model="scope.row.invoiceType" :placeholder="$t('pleaseselectthetypeoffee')"
|
|
- style="width: 150px;">
|
|
|
|
|
|
+ style="width: 150px;" :disabled="user.companyId == 4811 && user.id != addForm.ownerId && expenseMainTypeValue == 14454">
|
|
<el-option :label="$t('vATspecialinvoice')" value="0"></el-option>
|
|
<el-option :label="$t('vATspecialinvoice')" value="0"></el-option>
|
|
<el-option :label="$t('vATgeneralinvoice')" value="1"></el-option>
|
|
<el-option :label="$t('vATgeneralinvoice')" value="1"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -211,13 +212,13 @@
|
|
<el-table-column prop="invoiceNo" :label="$t('invoiceno')" width="135px"
|
|
<el-table-column prop="invoiceNo" :label="$t('invoiceno')" width="135px"
|
|
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-model.number="scope.row.invoiceNo"></el-input>
|
|
|
|
|
|
+ <el-input size="small" v-model.number="scope.row.invoiceNo" :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('shui-shuai')" width="135px" v-if="this.user.timeType.easyExpense == 0">
|
|
<el-table-column :label="$t('shui-shuai')" width="135px" v-if="this.user.timeType.easyExpense == 0">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-input size="small" type="number" v-model="scope.row.taxPercent"
|
|
<el-input size="small" type="number" v-model="scope.row.taxPercent"
|
|
- @input="zhi(scope.$index)"></el-input>
|
|
|
|
|
|
+ @input="zhi(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('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">
|
|
@@ -375,6 +376,7 @@
|
|
:summary-method="getSummaries" show-summary>
|
|
:summary-method="getSummaries" show-summary>
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
<el-table-column prop="code" :label="$t('ticketnumber')" width="120"></el-table-column>
|
|
<el-table-column prop="code" :label="$t('ticketnumber')" width="120"></el-table-column>
|
|
|
|
+ <el-table-column prop="engineeringName" label="工程名称" width="200" v-if="user.companyId == 4811"></el-table-column>
|
|
<el-table-column prop="totalAmount" :label="$t('amountof') + '(' + $t('yuan') + ')'" align="center" width="120">
|
|
<el-table-column prop="totalAmount" :label="$t('amountof') + '(' + $t('yuan') + ')'" align="center" width="120">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span style="float:right;margin-right:20px">{{ scope.row.totalAmount ? scope.row.totalAmount.toFixed(2) :
|
|
<span style="float:right;margin-right:20px">{{ scope.row.totalAmount ? scope.row.totalAmount.toFixed(2) :
|
|
@@ -395,12 +397,13 @@
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column prop="createDate" :label="$t('fillinthedate')" width="100"></el-table-column>
|
|
<el-table-column prop="createDate" :label="$t('fillinthedate')" width="100"></el-table-column>
|
|
<el-table-column prop="ticketNum" :label="$t('invoicenumber')"
|
|
<el-table-column prop="ticketNum" :label="$t('invoicenumber')"
|
|
- v-if="this.user.timeType.easyExpense == 0"></el-table-column>
|
|
|
|
|
|
+ v-if="this.user.timeType.easyExpense == 0 && user.companyId != 4811"></el-table-column>
|
|
<el-table-column prop="type" :label="$t('ppertype')" v-if="this.user.timeType.easyExpense == 0">
|
|
<el-table-column prop="type" :label="$t('ppertype')" v-if="this.user.timeType.easyExpense == 0">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
{{ scope.row.expenseMainTypeName }}
|
|
{{ scope.row.expenseMainTypeName }}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
|
+ <el-table-column prop="equipmentOwnerName" label="设备归属人" v-if="user.companyId == 4811" width="150"></el-table-column>
|
|
<el-table-column prop="remark" :label="$t('bei-zhu')" width="180">
|
|
<el-table-column prop="remark" :label="$t('bei-zhu')" width="180">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<span style="font-size:12px;">{{ scope.row.remark }}</span>
|
|
<span style="font-size:12px;">{{ scope.row.remark }}</span>
|
|
@@ -496,7 +499,7 @@
|
|
|
|
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 第一审核人 -->
|
|
<!-- 第一审核人 -->
|
|
- <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 && user.companyId != 4811">
|
|
<el-select v-if="user.userNameNeedTranslate != '1'" v-model="ParticularsList.firstCheckerId"
|
|
<el-select v-if="user.userNameNeedTranslate != '1'" v-model="ParticularsList.firstCheckerId"
|
|
:placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px" :disabled="ParticularsList.reviewProcess > 0 || (flg || ParticularsList.ownerId == ParticularsList.operatorId)"
|
|
:placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px" :disabled="ParticularsList.reviewProcess > 0 || (flg || ParticularsList.ownerId == ParticularsList.operatorId)"
|
|
filterable="true">
|
|
filterable="true">
|
|
@@ -509,8 +512,22 @@
|
|
:subject="users" :subjectId="ParticularsList.firstCheckerId" ref="selectCat" :disabled="ParticularsList.reviewProcess > 0 || (flg || ParticularsList.ownerId == ParticularsList.operatorId)"
|
|
:subject="users" :subjectId="ParticularsList.firstCheckerId" ref="selectCat" :disabled="ParticularsList.reviewProcess > 0 || (flg || ParticularsList.ownerId == ParticularsList.operatorId)"
|
|
@selectCal="selectCal"></selectCat>
|
|
@selectCal="selectCal"></selectCat>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item :label="$t('di-yi-shen-he-ren')" v-if="auditTypeItem.auditType == 2 && user.companyId == 4811">
|
|
|
|
+ <el-select v-if="user.userNameNeedTranslate != '1'" v-model="ParticularsList.firstCheckerId"
|
|
|
|
+ :placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px" :disabled="user.id != ParticularsList.ownerId"
|
|
|
|
+ filterable="true">
|
|
|
|
+ <span v-for="(item, index) in users" :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="'6'"
|
|
|
|
+ :subject="users" :subjectId="ParticularsList.firstCheckerId" ref="selectCat" :disabled="user.id != ParticularsList.ownerId"
|
|
|
|
+ @selectCal="selectCal"></selectCat>
|
|
|
|
+ </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="ParticularsList.secondCheckerId"
|
|
<el-select v-if="user.userNameNeedTranslate != '1'" v-model="ParticularsList.secondCheckerId"
|
|
:placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px" :disabled="ParticularsList.reviewProcess > 1 || (flg || ParticularsList.ownerId == ParticularsList.operatorId)"
|
|
:placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px" :disabled="ParticularsList.reviewProcess > 1 || (flg || ParticularsList.ownerId == ParticularsList.operatorId)"
|
|
filterable="true">
|
|
filterable="true">
|
|
@@ -524,18 +541,47 @@
|
|
@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 && user.companyId == 4811">
|
|
|
|
+ <el-select v-if="user.userNameNeedTranslate != '1'" v-model="ParticularsList.secondCheckerId"
|
|
|
|
+ :placeholder="$t('message.Pleaseselectareviewer')" style="width: 150px" :disabled="user.id != ParticularsList.ownerId"
|
|
|
|
+ filterable="true">
|
|
|
|
+ <span v-for="(item, index) in users" :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="'7'"
|
|
|
|
+ :subject="users" :subjectId="ParticularsList.secondCheckerId" ref="selectCat" :disabled="user.id != ParticularsList.ownerId"
|
|
|
|
+ @selectCal="selectCal"></selectCat>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
|
|
+ <el-form-item label="设备归属人" v-if="ParticularsList.type == 14454">
|
|
|
|
+ <el-select v-model="ParticularsList.equipmentOwnerId"
|
|
|
|
+ placeholder="请选择设备归属人" style="width: 150px"
|
|
|
|
+ filterable="true" :disabled="(ParticularsList.type == 14454 && user.companyId == 4811)">
|
|
|
|
+ <span v-for="(item, index) in equipmentOwnerList" :key="index">
|
|
|
|
+ <el-option :label="item.equipmentOwner" :value="item.id"></el-option>
|
|
|
|
+ </span>
|
|
|
|
+ </el-select>
|
|
|
|
+ </el-form-item>
|
|
|
|
+
|
|
<el-form-item :label="$t('fillinthedate')">
|
|
<el-form-item :label="$t('fillinthedate')">
|
|
<!-- <el-input v-model="ParticularsList.createDate" :disabled="flg"></el-input> -->
|
|
<!-- <el-input v-model="ParticularsList.createDate" :disabled="flg"></el-input> -->
|
|
- <el-date-picker type="date" :disabled="flg" :placeholder="$t('optiondate')"
|
|
|
|
|
|
+ <el-date-picker type="date" :disabled="flg || (ParticularsList.type == 14454 && user.companyId == 4811)" :placeholder="$t('optiondate')"
|
|
v-model="ParticularsList.createDate" value-format="yyyy-MM-dd" style="width: 200px;"></el-date-picker>
|
|
v-model="ParticularsList.createDate" value-format="yyyy-MM-dd" style="width: 200px;"></el-date-picker>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item :label="$t('invoicenumber')">
|
|
|
|
|
|
+ <el-form-item :label="$t('invoicenumber')" v-if="user.companyId == 4811 && ParticularsList.type != 14454">
|
|
<el-input v-enter-number v-model="ParticularsList.ticketNum" :disabled="flg"></el-input>
|
|
<el-input v-enter-number v-model="ParticularsList.ticketNum" :disabled="flg"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item :label="$t('costtype')" style="width: 270px">
|
|
<el-form-item :label="$t('costtype')" style="width: 270px">
|
|
- <el-select size="small" v-model="ParticularsList.type" style="width: 150px" :disabled="flg">
|
|
|
|
- <el-option v-for="item in expenseMainTypes" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <template v-if="user.companyId == 4811 && ParticularsList.type == 14454">
|
|
|
|
+ 机械费用
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <el-select size="small" v-model="ParticularsList.type" style="width: 150px" :disabled="flg || (ParticularsList.type == 14454 && user.companyId == 4811)">
|
|
|
|
+ <el-option v-for="item in expenseMainTypes" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </template>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item :label="$t('bei-zhu')" style="width: 280px">
|
|
<el-form-item :label="$t('bei-zhu')" style="width: 280px">
|
|
<el-input v-model="ParticularsList.remark" :disabled="flg" maxlength="100"></el-input>
|
|
<el-input v-model="ParticularsList.remark" :disabled="flg" maxlength="100"></el-input>
|
|
@@ -567,7 +613,7 @@
|
|
<el-table-column prop="projectId" :label="$t('other.project')" width="155">
|
|
<el-table-column prop="projectId" :label="$t('other.project')" width="155">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-select size="small" v-if="!flg" v-model="scope.row.projectId" :placeholder="$t('other.project')"
|
|
<el-select size="small" v-if="!flg" v-model="scope.row.projectId" :placeholder="$t('other.project')"
|
|
- style="width: 130px">
|
|
|
|
|
|
+ style="width: 130px" :disabled="(ParticularsList.type == 14454 && user.companyId == 4811)">
|
|
<el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName + item.projectCode"
|
|
<el-option v-for="(item, index) in projectList" :key="index" :label="item.projectName + item.projectCode"
|
|
:value="item.id" @click="ok(item)">
|
|
:value="item.id" @click="ok(item)">
|
|
<span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
|
|
<span style="float: left;color: #8492a6; font-size: 13px">{{ item.projectCode }}</span>
|
|
@@ -582,7 +628,7 @@
|
|
<el-table-column prop="happenDate" :label="$t('forthedate')" width="172">
|
|
<el-table-column prop="happenDate" :label="$t('forthedate')" width="172">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-date-picker size="small" v-if="!flg" v-model="scope.row.happenDate" type="date" style=" width: 145px"
|
|
<el-date-picker size="small" v-if="!flg" v-model="scope.row.happenDate" type="date" style=" width: 145px"
|
|
- value-format="yyyy-MM-dd" :placeholder="$t('optiondate')">
|
|
|
|
|
|
+ value-format="yyyy-MM-dd" :placeholder="$t('optiondate')" :disabled="(ParticularsList.type == 14454 && user.companyId == 4811)">
|
|
</el-date-picker>
|
|
</el-date-picker>
|
|
<span v-else>{{ scope.row.happenDate }}</span>
|
|
<span v-else>{{ scope.row.happenDate }}</span>
|
|
</template>
|
|
</template>
|
|
@@ -601,7 +647,7 @@
|
|
<el-table-column prop="invoiceType" :label="$t('costtype')" width="172">
|
|
<el-table-column prop="invoiceType" :label="$t('costtype')" width="172">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
<el-select v-if="!flg" size="small" v-model="scope.row.expenseType"
|
|
<el-select v-if="!flg" size="small" v-model="scope.row.expenseType"
|
|
- :placeholder="$t('pleaseselectthetypeoffee')" style="width: 150px">
|
|
|
|
|
|
+ :placeholder="$t('pleaseselectthetypeoffee')" style="width: 150px" :disabled="(ParticularsList.type == 14454 && user.companyId == 4811)">
|
|
<el-option v-for="(item, index) in expenseTypeList" :key="index" :label="item.typeName"
|
|
<el-option v-for="(item, index) in expenseTypeList" :key="index" :label="item.typeName"
|
|
:value="item.typeName"></el-option>
|
|
:value="item.typeName"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -854,7 +900,7 @@
|
|
<span class="detail-item-title"><span class="printBox">{{ $t('tianBaoShiJian') }}</span></span>
|
|
<span class="detail-item-title"><span class="printBox">{{ $t('tianBaoShiJian') }}</span></span>
|
|
<span class="detail-item-content">{{ ParticularsList.createDate }}</span>
|
|
<span class="detail-item-content">{{ ParticularsList.createDate }}</span>
|
|
</div>
|
|
</div>
|
|
- <div class="detail-item">
|
|
|
|
|
|
+ <div class="detail-item" v-if="ParticularsList.type != 14454">
|
|
<span class="detail-item-title"><span class="printBox">{{ $t('invoicenumber') }}</span></span>
|
|
<span class="detail-item-title"><span class="printBox">{{ $t('invoicenumber') }}</span></span>
|
|
<span class="detail-item-content">{{ ParticularsList.ticketNum }} {{ $t('zhang') }}</span>
|
|
<span class="detail-item-content">{{ ParticularsList.ticketNum }} {{ $t('zhang') }}</span>
|
|
</div>
|
|
</div>
|
|
@@ -862,6 +908,10 @@
|
|
<span class="detail-item-title"><span class="printBox">{{ $t('feiYongLeiXing') }}</span></span>
|
|
<span class="detail-item-title"><span class="printBox">{{ $t('feiYongLeiXing') }}</span></span>
|
|
<span class="detail-item-content">{{ detaExpenseMainTypeName }}</span>
|
|
<span class="detail-item-content">{{ detaExpenseMainTypeName }}</span>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div class="detail-item" v-if="ParticularsList.type == 14454">
|
|
|
|
+ <span class="detail-item-title"><span class="printBox">设备归属人</span></span>
|
|
|
|
+ <span class="detail-item-content">{{ ParticularsList.equipmentOwnerName }}</span>
|
|
|
|
+ </div>
|
|
<div class="detail-item">
|
|
<div class="detail-item">
|
|
<span class="detail-item-title"><span class="printBox">{{ $t('totalcostos') }}</span></span>
|
|
<span class="detail-item-title"><span class="printBox">{{ $t('totalcostos') }}</span></span>
|
|
<span class="detail-item-content">¥ {{ ParticularsList.totalAmount | numberToCurrency }}</span>
|
|
<span class="detail-item-content">¥ {{ ParticularsList.totalAmount | numberToCurrency }}</span>
|
|
@@ -1099,6 +1149,36 @@
|
|
<el-button type="primary" @click="callingInterface(1, releaseData.data)">{{ $t('queDing') }}</el-button>
|
|
<el-button type="primary" @click="callingInterface(1, releaseData.data)">{{ $t('queDing') }}</el-button>
|
|
</span>
|
|
</span>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
+
|
|
|
|
+ <!-- 设备归属人管理 -->
|
|
|
|
+ <el-dialog title="设备归属人管理" :visible.sync="equipmentOwnerVisable" width="600" :before-close="handleClose">
|
|
|
|
+ <el-table :data="equipmentOwnerList" style="width: 100%" height="40vh">
|
|
|
|
+ <el-table-column label="序号" width="180">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ {{ scope.$index + 1 }}
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column prop="equipmentOwner" label="姓名"></el-table-column>
|
|
|
|
+ <el-table-column label="操作" width="240">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button type="primary" size="small" @click="updateOwner(scope.row)">编辑</el-button>
|
|
|
|
+ <el-button type="danger" size="small" @click="deleteOwner(scope.row)">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="equipmentOwnerVisable = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="updateOwner()">新增归属人</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
|
|
+ <el-dialog :title="`${equipmentOwnerValue.id ? '编辑' : '新增'}归属人`" :visible.sync="equipmentOwnertextVisable" width="600" :before-close="handleClose">
|
|
|
|
+ <el-input v-model.trim="equipmentOwnerValue.equipmentOwner" placeholder="请输入归属人名称" clearable></el-input>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="equipmentOwnertextVisable = false">取 消</el-button>
|
|
|
|
+ <el-button type="primary" @click="addEditorOwner()" :disabled="!equipmentOwnerValue.equipmentOwner">确 定</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
</section>
|
|
</section>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -1129,6 +1209,7 @@ export default {
|
|
reason: '',
|
|
reason: '',
|
|
id: null
|
|
id: null
|
|
},
|
|
},
|
|
|
|
+ copyUsers: [],
|
|
basecostSettingList: [],
|
|
basecostSettingList: [],
|
|
exportingData:false,
|
|
exportingData:false,
|
|
fileList: [],
|
|
fileList: [],
|
|
@@ -1223,6 +1304,11 @@ export default {
|
|
dialogVisibleRelease: false, // 发放弹出框
|
|
dialogVisibleRelease: false, // 发放弹出框
|
|
|
|
|
|
selectProject: null, // 项目选择
|
|
selectProject: null, // 项目选择
|
|
|
|
+
|
|
|
|
+ equipmentOwnerVisable: false,
|
|
|
|
+ equipmentOwnerList: [],
|
|
|
|
+ equipmentOwnertextVisable: false,
|
|
|
|
+ equipmentOwnerValue: { equipmentOwner: '' }
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -1256,6 +1342,9 @@ export default {
|
|
this.getBasecostItemList();
|
|
this.getBasecostItemList();
|
|
this.getAuditType();
|
|
this.getAuditType();
|
|
this.getSendStateList();
|
|
this.getSendStateList();
|
|
|
|
+ if(this.user.companyId == 4811) {
|
|
|
|
+ this.getEquipmentOwnerList()
|
|
|
|
+ }
|
|
},
|
|
},
|
|
filters: {
|
|
filters: {
|
|
numberToCurrency(value) {
|
|
numberToCurrency(value) {
|
|
@@ -1274,6 +1363,66 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ updateOwner(row) {
|
|
|
|
+ if(!row) {
|
|
|
|
+ this.equipmentOwnerValue = { equipmentOwner: '' }
|
|
|
|
+ } else {
|
|
|
|
+ this.equipmentOwnerValue = { equipmentOwner: row.equipmentOwner, id: row.id }
|
|
|
|
+ }
|
|
|
|
+ this.equipmentOwnertextVisable = true
|
|
|
|
+ },
|
|
|
|
+ equipmentOwner() {
|
|
|
|
+ this.equipmentOwnerVisable = true
|
|
|
|
+ },
|
|
|
|
+ deleteOwner(row) {
|
|
|
|
+ this.$confirm(`此操作将删除【${row.equipmentOwner}】设备归属人, 是否继续?`, '提示', {
|
|
|
|
+ confirmButtonText: '确定',
|
|
|
|
+ cancelButtonText: '取消',
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(() => {
|
|
|
|
+ this.http.post('/equipment-owner/removeEquipmentOwner', {
|
|
|
|
+ id: row.id
|
|
|
|
+ },
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code == 'ok') {
|
|
|
|
+ this.$message({ message: '删除成功', type: 'success' })
|
|
|
|
+ this.getEquipmentOwnerList()
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({ message: res.msg, type: 'error'})
|
|
|
|
+ }
|
|
|
|
+ }, err => {
|
|
|
|
+ this.$message({ message: err, type: 'error' })
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ addEditorOwner() {
|
|
|
|
+ this.http.post('/equipment-owner/addOrUpdate', {
|
|
|
|
+ ...this.equipmentOwnerValue
|
|
|
|
+ },
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code == 'ok') {
|
|
|
|
+ this.$message({ message: '添加成功', type: 'success' })
|
|
|
|
+ this.equipmentOwnertextVisable = false
|
|
|
|
+ this.getEquipmentOwnerList()
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({ message: res.msg, type: 'error'})
|
|
|
|
+ }
|
|
|
|
+ }, err => {
|
|
|
|
+ this.$message({ message: err, type: 'error' })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ getEquipmentOwnerList() {
|
|
|
|
+ this.http.post('/equipment-owner/getList', {},
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code == 'ok') {
|
|
|
|
+ this.equipmentOwnerList = res.data || [];
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({ message: res.msg, type: 'error'})
|
|
|
|
+ }
|
|
|
|
+ }, err => {
|
|
|
|
+ this.$message({ message: err, type: 'error' })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
getBasecostItemList() {
|
|
getBasecostItemList() {
|
|
this.http.post('/project-basecost-setting/list', {},
|
|
this.http.post('/project-basecost-setting/list', {},
|
|
res => {
|
|
res => {
|
|
@@ -1645,8 +1794,18 @@ export default {
|
|
});
|
|
});
|
|
},
|
|
},
|
|
costMainTypeSwitching() {
|
|
costMainTypeSwitching() {
|
|
- if(this.user.companyId == 4811 && this.expenseMainTypeValue == 14454) {
|
|
|
|
- this.addForm.firstCheckerId = this.user.id
|
|
|
|
|
|
+ if(this.user.companyId == 4811) {
|
|
|
|
+ if(this.expenseMainTypeValue == 14454) {
|
|
|
|
+ this.users = JSON.parse(JSON.stringify(this.copyUsers)).filter(item => item.id != this.user.id)
|
|
|
|
+ this.addForm.firstCheckerId = ''
|
|
|
|
+ this.addForm.secondCheckerId = ''
|
|
|
|
+ if(this.addForm.ownerId == this.user.id) {
|
|
|
|
+ this.addForm.ownerId = ''
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ this.addForm.ownerId = this.user.id
|
|
|
|
+ this.users = JSON.parse(JSON.stringify(this.copyUsers))
|
|
|
|
+ }
|
|
}
|
|
}
|
|
this.getExpList()
|
|
this.getExpList()
|
|
},
|
|
},
|
|
@@ -1689,11 +1848,11 @@ export default {
|
|
},
|
|
},
|
|
res => {
|
|
res => {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
- if(this.user.roleName == '费用管理员') {
|
|
|
|
- this.expenseMainTypes = res.data.filter(item => item.id == 14454)
|
|
|
|
- this.addForm.firstCheckerId = this.user.id
|
|
|
|
- } else {
|
|
|
|
|
|
+ if(this.user.isMachineCost != 2) {
|
|
this.expenseMainTypes = res.data.filter(item => item.id != 14454)
|
|
this.expenseMainTypes = res.data.filter(item => item.id != 14454)
|
|
|
|
+ // this.addForm.firstCheckerId = this.user.id
|
|
|
|
+ } else {
|
|
|
|
+ this.expenseMainTypes = res.data
|
|
}
|
|
}
|
|
this.expenseMainTypeValue = this.expenseMainTypes[0].id
|
|
this.expenseMainTypeValue = this.expenseMainTypes[0].id
|
|
} else {
|
|
} else {
|
|
@@ -1748,6 +1907,16 @@ export default {
|
|
this.displayTable = true;
|
|
this.displayTable = true;
|
|
},
|
|
},
|
|
present() {
|
|
present() {
|
|
|
|
+ if(this.user.companyId == 4811) {
|
|
|
|
+ if(!this.ParticularsList.firstCheckerId || !this.ParticularsList.secondCheckerId) {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: !this.ParticularsList.firstCheckerId ? this.$t('qingXuanZeDiYiShenHeRen') : this.$t('qingXuanZeDiErShenHeRen'),
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
this.adds();
|
|
this.adds();
|
|
},
|
|
},
|
|
// 删除操作
|
|
// 删除操作
|
|
@@ -1820,8 +1989,9 @@ export default {
|
|
// this.users = res.data.records;
|
|
// this.users = res.data.records;
|
|
const { id } = JSON.parse(sessionStorage.getItem('user'))
|
|
const { id } = JSON.parse(sessionStorage.getItem('user'))
|
|
this.users = res.data;
|
|
this.users = res.data;
|
|
- // this.usersNoInfo = res.data.filter(item => item.id != id)
|
|
|
|
- this.usersNoInfo = res.data
|
|
|
|
|
|
+ this.usersNoInfo = res.data.filter(item => item.id != id)
|
|
|
|
+ this.copyUsers = JSON.parse(JSON.stringify(res.data))
|
|
|
|
+ // this.usersNoInfo = res.data
|
|
if (!this.permissions.costAudit) {
|
|
if (!this.permissions.costAudit) {
|
|
this.addForm.ownerId = this.user.id;
|
|
this.addForm.ownerId = this.user.id;
|
|
this.addForm.status = 1;
|
|
this.addForm.status = 1;
|
|
@@ -1846,7 +2016,7 @@ 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)) {
|
|
- if(this.user.id != 4811 && this.expenseMainTypeValue != 14454) {
|
|
|
|
|
|
+ if(this.user.companyId != 4811 && this.expenseMainTypeValue != 14454) {
|
|
this.$message({
|
|
this.$message({
|
|
message: !this.addForm.firstCheckerId ? this.$t('qingXuanZeDiYiShenHeRen') : this.$t('qingXuanZeDiErShenHeRen'),
|
|
message: !this.addForm.firstCheckerId ? this.$t('qingXuanZeDiYiShenHeRen') : this.$t('qingXuanZeDiErShenHeRen'),
|
|
type: "error"
|
|
type: "error"
|
|
@@ -2048,7 +2218,7 @@ export default {
|
|
});
|
|
});
|
|
this.addForm = {
|
|
this.addForm = {
|
|
code: null,
|
|
code: null,
|
|
- ownerId: this.user.id,
|
|
|
|
|
|
+ ownerId: this.expenseMainTypeValue == 14454 ? '' : this.user.id,
|
|
createDate: null,
|
|
createDate: null,
|
|
type: this.expenseMainTypeValue,
|
|
type: this.expenseMainTypeValue,
|
|
ticketNum: 1, remark: null, totalAmount: 0,
|
|
ticketNum: 1, remark: null, totalAmount: 0,
|