|
@@ -18,9 +18,9 @@
|
|
<i class="iconfont firerock-icontianbao"></i>
|
|
<i class="iconfont firerock-icontianbao"></i>
|
|
<span>{{ $t('fillinthestaffexpenses') }}</span>
|
|
<span>{{ $t('fillinthestaffexpenses') }}</span>
|
|
</template>
|
|
</template>
|
|
- <el-menu-item index="1-1"><p @click="ssl(0)"> {{ $t('generalexpenses') }}</p></el-menu-item>
|
|
|
|
- <el-menu-item index="1-2"><p @click="ssl(1)">{{ $t('travelexpensess') }}</p></el-menu-item>
|
|
|
|
- <el-menu-item index="1-3"><p @click="ssl(2)">{{ $t('outsourcingcostshouldbereported') }}</p></el-menu-item>
|
|
|
|
|
|
+ <el-menu-item index="1-1"><p> {{ $t('expenses') }}</p></el-menu-item>
|
|
|
|
+ <!-- <el-menu-item index="1-2"><p @click="ssl(1)">{{ $t('travelexpensess') }}</p></el-menu-item>
|
|
|
|
+ <el-menu-item index="1-3"><p @click="ssl(2)">{{ $t('outsourcingcostshouldbereported') }}</p></el-menu-item> -->
|
|
</el-submenu>
|
|
</el-submenu>
|
|
<el-submenu index="2">
|
|
<el-submenu index="2">
|
|
<template slot="title">
|
|
<template slot="title">
|
|
@@ -48,17 +48,19 @@
|
|
<!-- 内容主体区域 -->
|
|
<!-- 内容主体区域 -->
|
|
<div class="contents">
|
|
<div class="contents">
|
|
<div v-if="!displayTable" class="headine" ref="headine">
|
|
<div v-if="!displayTable" class="headine" ref="headine">
|
|
- <h3 ref="headHe" style="padding-left: 220px">{{shuz[ins]}}</h3>
|
|
|
|
|
|
+ <!-- <h3 ref="headHe" style="padding-left: 220px">{{shuz[ins]}}</h3> -->
|
|
|
|
+ <h3 ref="headHe" style="padding-left: 220px">费用填报</h3>
|
|
<p style="float: right;margin-right: 25px;"><el-button type="primary" @click="submits" size="mini">{{ $t('btn.submit') }}</el-button></p>
|
|
<p style="float: right;margin-right: 25px;"><el-button type="primary" @click="submits" size="mini">{{ $t('btn.submit') }}</el-button></p>
|
|
<p style="float: right;margin-right: 25px;"><el-button type="primary" @click="submitUpload" size="mini">{{ $t('batchupload') }}</el-button></p>
|
|
<p style="float: right;margin-right: 25px;"><el-button type="primary" @click="submitUpload" size="mini">{{ $t('batchupload') }}</el-button></p>
|
|
<p style="float: right;margin-right: 25px;"><el-button type="primary" @click="customTypeOp" size="mini" v-if="permissions.costAll">{{ $t('expensetypemanagement') }}</el-button></p>
|
|
<p style="float: right;margin-right: 25px;"><el-button type="primary" @click="customTypeOp" size="mini" v-if="permissions.costAll">{{ $t('expensetypemanagement') }}</el-button></p>
|
|
|
|
+ <p style="float: right;margin-right: 25px;"><el-button type="primary" @click="expenseTypeOp" size="mini" v-if="permissions.costAll">费用主类型管理</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%" >
|
|
<div class="staff" v-if="!displayTable">
|
|
<div class="staff" v-if="!displayTable">
|
|
<!-- 公共 -->
|
|
<!-- 公共 -->
|
|
<div class="public">
|
|
<div class="public">
|
|
- <el-form :model="addForm" ref="mainAddForm" label-width="80px" :rules="addFormRules">
|
|
|
|
|
|
+ <el-form :model="addForm" ref="mainAddForm" label-width="100px" :rules="addFormRules">
|
|
<!-- <el-form :model="form" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> -->
|
|
<!-- <el-form :model="form" :rules="rules" ref="ruleForm" label-width="100px" class="demo-ruleForm"> -->
|
|
<!-- 报销人 -->
|
|
<!-- 报销人 -->
|
|
<el-form-item :label="$t('peopleconcerned')" prop="ownerId">
|
|
<el-form-item :label="$t('peopleconcerned')" prop="ownerId">
|
|
@@ -83,11 +85,17 @@
|
|
<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>
|
|
<!-- 费用类型 -->
|
|
<!-- 费用类型 -->
|
|
- <el-form-item :label="$t('costtype')">
|
|
|
|
- <el-select v-model="addForm.type" disabled style="width: 150px" >
|
|
|
|
- <el-option :label="$t('yi-ban')" :value="0"></el-option>
|
|
|
|
|
|
+ <el-form-item :label="'费用主类型'">
|
|
|
|
+ <el-select v-model="expenseMainTypeValue" style="width: 150px" @change="this.getExpList">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in expenseMainTypes"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ <!-- <el-option :label="$t('yi-ban')" :value="0"></el-option>
|
|
<el-option :label="$t('cha-lv')" :value="1"></el-option>
|
|
<el-option :label="$t('cha-lv')" :value="1"></el-option>
|
|
- <el-option :label="$t('wai-bao')" :value="2"></el-option>
|
|
|
|
|
|
+ <el-option :label="$t('wai-bao')" :value="2"></el-option> -->
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
|
|
|
|
@@ -214,11 +222,17 @@
|
|
<el-input v-model="code" size="small" :placeholder="$t('receiptnumber')" clearable="true" style="width: 120px"></el-input>
|
|
<el-input v-model="code" size="small" :placeholder="$t('receiptnumber')" clearable="true" style="width: 120px"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 费用类型 -->
|
|
<!-- 费用类型 -->
|
|
- <el-form-item :label="$t('costtype')">
|
|
|
|
- <el-select v-model="type" size="small" :placeholder="$t('pleaseselectthetypeoffee')" clearable="true" style="width: 150px">
|
|
|
|
- <el-option :label="$t('generalcost')" value="0"></el-option>
|
|
|
|
- <el-option :label="$t('travelexpenses')" value="1"></el-option>
|
|
|
|
- <el-option :label="$t('outsourcingcost')" value="2"></el-option>
|
|
|
|
|
|
+ <el-form-item :label="'费用主类型'">
|
|
|
|
+ <el-select size="small" v-model="expenseMainTypeValue" style="width: 150px">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in expenseMainTypes"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ <!-- <el-option :label="$t('yi-ban')" :value="0"></el-option>
|
|
|
|
+ <el-option :label="$t('cha-lv')" :value="1"></el-option>
|
|
|
|
+ <el-option :label="$t('wai-bao')" :value="2"></el-option> -->
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<!-- 填报日期 -->
|
|
<!-- 填报日期 -->
|
|
@@ -269,7 +283,7 @@
|
|
<el-table-column prop="ticketNum" :label="$t('invoicenumber')" ></el-table-column>
|
|
<el-table-column prop="ticketNum" :label="$t('invoicenumber')" ></el-table-column>
|
|
<el-table-column prop="type" :label="$t('ppertype')" >
|
|
<el-table-column prop="type" :label="$t('ppertype')" >
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- {{feeType[scope.row.type]}}
|
|
|
|
|
|
+ {{scope.row.expenseMainTypeName}}
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</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">
|
|
@@ -345,11 +359,17 @@
|
|
<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 v-model="ParticularsList.type" :placeholder="$t('defaultText.pleaseChoose')" :disabled="flg">
|
|
|
|
- <el-option :label="$t('yi-ban')" :value="0"></el-option>
|
|
|
|
- <el-option :label="$t('cha-lv')" :value="1"></el-option>
|
|
|
|
- <el-option :label="$t('wai-bao')" :value="2"></el-option>
|
|
|
|
- </el-select>
|
|
|
|
|
|
+ <el-select size="small" v-model="expenseMainTypeValue" style="width: 150px">
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in expenseMainTypes"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
|
|
+ <!-- <el-option :label="$t('yi-ban')" :value="0"></el-option>
|
|
|
|
+ <el-option :label="$t('cha-lv')" :value="1"></el-option>
|
|
|
|
+ <el-option :label="$t('wai-bao')" :value="2"></el-option> -->
|
|
|
|
+ </el-select>
|
|
</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"></el-input>
|
|
<el-input v-model="ParticularsList.remark" :disabled="flg"></el-input>
|
|
@@ -496,13 +516,48 @@
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <!-- 主费用类型自定义 -->
|
|
|
|
+ <el-dialog :title="费用类型大类管理" v-if="expenseTypeDialog" :visible.sync="expenseTypeDialog" customClass="customWidth" width="600px">
|
|
|
|
+ <el-table :data="expenseMainTypes" style="width:100%" height="400" :loading="expenseTypeListLoading">
|
|
|
|
+ <el-table-column :label="'类型名称'" min-width="150">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <span>{{scope.row.name}}</span>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ <el-table-column :label="$t('operation')" width="150">
|
|
|
|
+ <template slot-scope="scope">
|
|
|
|
+ <el-button @click="expenseTypeEditOp(scope.row)" size="small" type="primary">{{ $t('bian-ji') }}</el-button>
|
|
|
|
+ <el-button @click="expenseTypeEditDelete(scope.row)" size="small" type="danger">{{ $t('btn.delete') }}</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-table-column>
|
|
|
|
+ </el-table>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="expenseTypeDialog = false" size="medium">{{ $t('btn.cancel') }}</el-button>
|
|
|
|
+ <el-button type="primary" @click="expenseTypeEditOp()" size="medium">{{ $t('newtype') }}</el-button>
|
|
|
|
+ </span>
|
|
|
|
+
|
|
|
|
+ <!-- 新增/编辑费用类型 -->
|
|
|
|
+ <el-dialog :title="$t('addeditfeetypes')" v-if="expenseTypeEditDialog" :visible.sync="expenseTypeEditDialog" customClass="customWidth" width="400px" append-to-body>
|
|
|
|
+ <el-form label-width="80px" :rules="editExpenseTypeDataRules" ref="editExpenseTypeDataForm" :model="editExpenseTypeData">
|
|
|
|
+ <el-form-item :label="$t('typename ')" style="margin:30px 0" prop="typeName">
|
|
|
|
+ <el-input id="editExpenseTypeDataInput" size="medium" v-model="editExpenseTypeData.name" :placeholder="$t('customizethfeetypename')" style="width:90%" @keyup.native="editExpenseTypeDataInput('editExpenseTypeDataInput')"></el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-form>
|
|
|
|
+ <span slot="footer" class="dialog-footer">
|
|
|
|
+ <el-button @click="expenseTypeEditDialog = false" size="medium">{{ $t('btn.cancel') }}</el-button>
|
|
|
|
+ <el-button type="primary" @click="expenseTypeEditSure" size="medium">{{ $t('btn.determine') }}</el-button>
|
|
|
|
+ </span>
|
|
|
|
+ </el-dialog>
|
|
|
|
+ </el-dialog>
|
|
|
|
+
|
|
<!-- 费用类型自定义 -->
|
|
<!-- 费用类型自定义 -->
|
|
<el-dialog :title="$t('expensetypemanagement')" v-if="customTypeDialog" :visible.sync="customTypeDialog" customClass="customWidth" width="600px">
|
|
<el-dialog :title="$t('expensetypemanagement')" v-if="customTypeDialog" :visible.sync="customTypeDialog" customClass="customWidth" width="600px">
|
|
<el-table :data="customTypeList" style="width:100%" height="400" :loading="customTypeListLoading">
|
|
<el-table :data="customTypeList" style="width:100%" height="400" :loading="customTypeListLoading">
|
|
<el-table-column prop="typeName" :label="$t('costofname')" min-width="150"></el-table-column>
|
|
<el-table-column prop="typeName" :label="$t('costofname')" min-width="150"></el-table-column>
|
|
<el-table-column :label="$t('costtype')" min-width="150">
|
|
<el-table-column :label="$t('costtype')" min-width="150">
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
- <span>{{scope.row.mainType == 0 ? $t('generalcost') : (scope.row.mainType == 1 ? $t('travelexpenses') : $t('outsourcingcost'))}}</span>
|
|
|
|
|
|
+ <span>{{scope.row.expenseMainTypeName}}</span>
|
|
</template>
|
|
</template>
|
|
</el-table-column>
|
|
</el-table-column>
|
|
<el-table-column :label="$t('operation')" width="150">
|
|
<el-table-column :label="$t('operation')" width="150">
|
|
@@ -522,9 +577,12 @@
|
|
<el-form label-width="80px" :rules="editTypeDataRules" ref="editTypeDataForm" :model="editTypeData">
|
|
<el-form label-width="80px" :rules="editTypeDataRules" ref="editTypeDataForm" :model="editTypeData">
|
|
<el-form-item :label="$t('belongstype')" style="margin:30px 0">
|
|
<el-form-item :label="$t('belongstype')" style="margin:30px 0">
|
|
<el-select v-model="editTypeData.mainType" size="medium" style="width:90%">
|
|
<el-select v-model="editTypeData.mainType" size="medium" style="width:90%">
|
|
- <el-option :label="$t('generalcost')" :value="0"></el-option>
|
|
|
|
- <el-option :label="$t('travelexpenses')" :value="1"></el-option>
|
|
|
|
- <el-option :label="$t('outsourcingcost')" :value="2"></el-option>
|
|
|
|
|
|
+ <el-option
|
|
|
|
+ v-for="item in expenseMainTypes"
|
|
|
|
+ :key="item.id"
|
|
|
|
+ :label="item.name"
|
|
|
|
+ :value="item.id"
|
|
|
|
+ ></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item :label="$t('typename ')" style="margin:30px 0" prop="typeName">
|
|
<el-form-item :label="$t('typename ')" style="margin:30px 0" prop="typeName">
|
|
@@ -589,7 +647,6 @@ export default {
|
|
allExpList:[],
|
|
allExpList:[],
|
|
expenseTypeList:[],
|
|
expenseTypeList:[],
|
|
tian:{a: null,b: null,c: null,d: null,e: null,f: null,g: null,h: null,},
|
|
tian:{a: null,b: null,c: null,d: null,e: null,f: null,g: null,h: null,},
|
|
- feeType:[this.$t('generalcost'),this.$t('travelexpenses'),this.$t('outsourcingcost')],
|
|
|
|
typeInvoic: [this.$t('vATspecialinvoice'), this.$t('vATgeneralinvoice')],
|
|
typeInvoic: [this.$t('vATspecialinvoice'), this.$t('vATgeneralinvoice')],
|
|
listLoading:false,
|
|
listLoading:false,
|
|
tableHeight:0,
|
|
tableHeight:0,
|
|
@@ -639,6 +696,15 @@ export default {
|
|
editTypeDataRules:{
|
|
editTypeDataRules:{
|
|
typeName: [{ required: true, message: this.$t('pleaseentercustomfeetypename'), trigger: "blur" }],
|
|
typeName: [{ required: true, message: this.$t('pleaseentercustomfeetypename'), trigger: "blur" }],
|
|
},
|
|
},
|
|
|
|
+ expenseMainTypes:[],
|
|
|
|
+ expenseMainTypeValue:'',
|
|
|
|
+ expenseTypeDialog:false,
|
|
|
|
+ expenseTypeListLoading:false,
|
|
|
|
+ expenseTypeEditDialog:false,
|
|
|
|
+ editExpenseTypeData: {},
|
|
|
|
+ editExpenseTypeDataRules:{
|
|
|
|
+ name: [{ required: true, message: this.$t('pleaseentercustomfeetypename'), trigger: "blur" }],
|
|
|
|
+ },
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -668,6 +734,7 @@ export default {
|
|
this.getList() // 获取单据列表
|
|
this.getList() // 获取单据列表
|
|
this.getProjectList();
|
|
this.getProjectList();
|
|
this.getExpList();
|
|
this.getExpList();
|
|
|
|
+ this.getExpensMainTypes();
|
|
},
|
|
},
|
|
filters: {
|
|
filters: {
|
|
numberToCurrency(value) {
|
|
numberToCurrency(value) {
|
|
@@ -690,7 +757,6 @@ export default {
|
|
customTypeOp(){
|
|
customTypeOp(){
|
|
this.customTypeDialog = true
|
|
this.customTypeDialog = true
|
|
this.customTypeListLoading = true
|
|
this.customTypeListLoading = true
|
|
- this.getExpList()
|
|
|
|
},
|
|
},
|
|
customTypeEditOp(row){
|
|
customTypeEditOp(row){
|
|
this.customTypeEditDialog = true
|
|
this.customTypeEditDialog = true
|
|
@@ -712,6 +778,7 @@ export default {
|
|
if(res.code == 'ok'){
|
|
if(res.code == 'ok'){
|
|
this.customTypeEditDialog = false
|
|
this.customTypeEditDialog = false
|
|
this.customTypeOp()
|
|
this.customTypeOp()
|
|
|
|
+ this.getExpList()
|
|
}else{
|
|
}else{
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -739,6 +806,7 @@ export default {
|
|
if(res.code == 'ok'){
|
|
if(res.code == 'ok'){
|
|
this.customTypeEditDialog = false
|
|
this.customTypeEditDialog = false
|
|
this.customTypeOp()
|
|
this.customTypeOp()
|
|
|
|
+ this.getExpList()
|
|
}else{
|
|
}else{
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -762,6 +830,88 @@ export default {
|
|
let inpu = document.getElementById(typeName);
|
|
let inpu = document.getElementById(typeName);
|
|
inpu.value = inpu.value.replace(/^\s*|\s*$/g, '')
|
|
inpu.value = inpu.value.replace(/^\s*|\s*$/g, '')
|
|
},
|
|
},
|
|
|
|
+ // 费用主类型自定义
|
|
|
|
+ expenseTypeOp(){
|
|
|
|
+ this.expenseTypeDialog = true
|
|
|
|
+ this.customTypeListLoading = true
|
|
|
|
+ },
|
|
|
|
+ expenseTypeEditOp(row){
|
|
|
|
+ this.expenseTypeEditDialog = true
|
|
|
|
+ if(row){
|
|
|
|
+ this.editExpenseTypeData = row
|
|
|
|
+ }else{
|
|
|
|
+ this.editExpenseTypeData = {
|
|
|
|
+ isSystem: 0,
|
|
|
|
+ name: '',
|
|
|
|
+ companyId: this.user.companyId
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ expenseTypeEditSure(){
|
|
|
|
+ this.$refs.editExpenseTypeDataForm.validate(valid => {
|
|
|
|
+ if (valid) {
|
|
|
|
+ this.http.post('/expense-main-type/addOrMod',this.editExpenseTypeData,
|
|
|
|
+ res => {
|
|
|
|
+ if(res.code == 'ok'){
|
|
|
|
+ this.expenseTypeEditDialog = false
|
|
|
|
+ this.expenseTypeOp()
|
|
|
|
+ this.getExpensMainTypes()
|
|
|
|
+ this.getExpList()
|
|
|
|
+ }else{
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },err => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: err,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }})
|
|
|
|
+ },
|
|
|
|
+ expenseTypeEditDelete(row){
|
|
|
|
+ this.$confirm(this.$t('operationmaycausedatalossAreyousuredeletethedata'),this.$t('other.prompts'),{
|
|
|
|
+ confirmButtonText: this.$t('btn.determine'),
|
|
|
|
+ cancelButtonText: this.$t('btn.cancel'),
|
|
|
|
+ type: 'warning'
|
|
|
|
+ }).then(()=>{
|
|
|
|
+ this.http.post('/expense-main-type/delete',{
|
|
|
|
+ id: row.id
|
|
|
|
+ },
|
|
|
|
+ res => {
|
|
|
|
+ if(res.code == 'ok'){
|
|
|
|
+ this.expenseTypeEditDialog = false
|
|
|
|
+ this.expenseTypeOp()
|
|
|
|
+ this.getExpensMainTypes()
|
|
|
|
+ }else{
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ },err => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: err,
|
|
|
|
+ type: 'error'
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ }).catch(()=>{
|
|
|
|
+ this.$message({
|
|
|
|
+ type: 'info',
|
|
|
|
+ message: this.$t('thedeletionhasbeencancelled')
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ expenseTypeDataInput(typeName){
|
|
|
|
+ let inpu = document.getElementById(typeName);
|
|
|
|
+ inpu.value = inpu.value.replace(/^\s*|\s*$/g, '')
|
|
|
|
+ },
|
|
|
|
+ editExpenseTypeDataInput(name){
|
|
|
|
+ let inpu = document.getElementById(name);
|
|
|
|
+ inpu.value = inpu.value.replace(/^\s*|\s*$/g, '')
|
|
|
|
+ },
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -898,12 +1048,16 @@ export default {
|
|
if (res.code == "ok") {
|
|
if (res.code == "ok") {
|
|
this.allExpList = res.data;
|
|
this.allExpList = res.data;
|
|
this.customTypeList = res.data
|
|
this.customTypeList = res.data
|
|
- this.expenseTypeList = this.allExpList.filter(a=>a.mainType == 0);
|
|
|
|
|
|
+ this.addForm.type=this.expenseMainTypeValue
|
|
|
|
+ this.expenseTypeList = this.allExpList.filter(a=>a.mainType == this.expenseMainTypeValue);
|
|
if(!res.data != res.data.length == 0){
|
|
if(!res.data != res.data.length == 0){
|
|
this.http.post('/company/settingExpenseType',{},res => {
|
|
this.http.post('/company/settingExpenseType',{},res => {
|
|
if(res.code == 'ok'){}else{this.$message({message: res.msg,type: 'error'})}
|
|
if(res.code == 'ok'){}else{this.$message({message: res.msg,type: 'error'})}
|
|
},err => {this.$message({message: err,type: 'error'})})
|
|
},err => {this.$message({message: err,type: 'error'})})
|
|
}
|
|
}
|
|
|
|
+ for(let i in this.invoiceList){
|
|
|
|
+ this.invoiceList[i].expenseType=''
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
this.$message({
|
|
this.$message({
|
|
message: res.msg,
|
|
message: res.msg,
|
|
@@ -919,6 +1073,26 @@ export default {
|
|
});
|
|
});
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+ getExpensMainTypes(){
|
|
|
|
+ this.http.post('/expense-main-type/list', {
|
|
|
|
+ },
|
|
|
|
+ res => {
|
|
|
|
+ if (res.code == "ok") {
|
|
|
|
+ this.expenseMainTypes=res.data
|
|
|
|
+ } else {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: res.msg,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ error => {
|
|
|
|
+ this.$message({
|
|
|
|
+ message: error,
|
|
|
|
+ type: "error"
|
|
|
|
+ });
|
|
|
|
+ });
|
|
|
|
+ },
|
|
// 单据查看
|
|
// 单据查看
|
|
downloadByA(val) {
|
|
downloadByA(val) {
|
|
this.dialog = true
|
|
this.dialog = true
|
|
@@ -1087,7 +1261,7 @@ export default {
|
|
code:null,
|
|
code:null,
|
|
ownerId:this.user.id,
|
|
ownerId:this.user.id,
|
|
createDate: null,
|
|
createDate: null,
|
|
- type:this.z,
|
|
|
|
|
|
+ type:this.expenseMainTypeValue,
|
|
ticketNum:1,remark:null,totalAmount:0,}
|
|
ticketNum:1,remark:null,totalAmount:0,}
|
|
this.invoiceList = []
|
|
this.invoiceList = []
|
|
|
|
|
|
@@ -1142,7 +1316,7 @@ export default {
|
|
startDate: stat,
|
|
startDate: stat,
|
|
endDate: end,
|
|
endDate: end,
|
|
ownerId:this.ownerId,
|
|
ownerId:this.ownerId,
|
|
- type:this.type,
|
|
|
|
|
|
+ type:this.expenseMainTypeValue,
|
|
};
|
|
};
|
|
if (this.isAuditList) {
|
|
if (this.isAuditList) {
|
|
param.status = 1;
|
|
param.status = 1;
|