|
@@ -1,4 +1,4 @@
|
|
-<template>
|
|
|
|
|
|
+<template xmlns:v-slot="http://www.w3.org/1999/XSL/Transform">
|
|
<div>
|
|
<div>
|
|
<el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="formReadOnly"
|
|
<el-form size="middle" :model="inputForm" ref="inputForm" v-loading="loading" :class="method==='view'?'readonly':''" :disabled="formReadOnly"
|
|
label-width="100px" @submit.native.prevent>
|
|
label-width="100px" @submit.native.prevent>
|
|
@@ -47,6 +47,15 @@
|
|
</el-select>
|
|
</el-select>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
|
|
+ <el-col :span="12" v-if="inputForm.sourceType === '5'">
|
|
|
|
+ <el-form-item label="采购编号" prop="purchaseNo"
|
|
|
|
+ :rules="[{required: true, message:'采购编号不能为空', trigger:'blur'},
|
|
|
|
+ {required: true, message:'采购编号不能为空', trigger:'change'}]">
|
|
|
|
+ <el-input size="medium" :readonly="true" @focus="openPurForm()" v-model="inputForm.purchaseNo" placeholder="请选择采购编号">
|
|
|
|
+ <el-button slot="append" icon="el-icon-search" @click="openPurForm()"></el-button>
|
|
|
|
+ </el-input>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
<el-col :span="24">
|
|
<el-col :span="24">
|
|
<el-form-item label="备注" prop="remarks">
|
|
<el-form-item label="备注" prop="remarks">
|
|
<el-input v-model="inputForm.remarks"
|
|
<el-input v-model="inputForm.remarks"
|
|
@@ -59,7 +68,41 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
-
|
|
|
|
|
|
+ <div v-if="inputForm.sourceType === '5'">
|
|
|
|
+ <el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
|
+ 采购详情
|
|
|
|
+ </el-divider>
|
|
|
|
+ <el-row :gutter="15" >
|
|
|
|
+ <vxe-table
|
|
|
|
+ border
|
|
|
|
+ show-footer
|
|
|
|
+ show-overflow
|
|
|
|
+ :footer-method="footerMethod555"
|
|
|
|
+ ref="preTable"
|
|
|
|
+ class="vxe-table-element"
|
|
|
|
+ :data="inputForm.preList"
|
|
|
|
+ style="margin-left: 5em"
|
|
|
|
+ @cell-click=""
|
|
|
|
+ @edit-closed=""
|
|
|
|
+ highlight-current-row
|
|
|
|
+ >
|
|
|
|
+ <vxe-table-column field="purchaser" title="采购人" :edit-render="{}" :rules="[{required: true, message:'请选择采购人', trigger:'blur'}]"></vxe-table-column>
|
|
|
|
+ <vxe-table-column field="procurementOffice" title="采购部门" :edit-render="{}"></vxe-table-column>
|
|
|
|
+ <vxe-table-column field="procurementType" title="采购类型" :edit-render="{}" :rules="[{required: true, message:'请选择采购类型', trigger:'blur'}]"></vxe-table-column>
|
|
|
|
+ <vxe-table-column field="tradeName" title="商品名称" :edit-render="{}" :rules="[{required: true, message:'请填写商品名称', trigger:'blur'}]"></vxe-table-column>
|
|
|
|
+ <vxe-table-column field="tradePrice" title="商品单价(元)" :edit-render="{}" :rules="[{required: true, message:'请输入商品单价', trigger:'blur'}]"></vxe-table-column>
|
|
|
|
+ <vxe-table-column field="tradeNumber" title="商品数量" :edit-render="{}"></vxe-table-column>
|
|
|
|
+ <vxe-table-column field="priceSum" title="商品总价" :edit-render="{}"></vxe-table-column>
|
|
|
|
+ <vxe-table-column field="company" title="单位" :edit-render="{}"></vxe-table-column>
|
|
|
|
+ <vxe-table-column field="remarks" title="备注" :edit-render="{}"></vxe-table-column>
|
|
|
|
+ <vxe-table-column title="操作">
|
|
|
|
+ <template v-slot="scope">
|
|
|
|
+ <el-button size="mini" type="primary" :disabled="false" @click="seeFileInfo(scope.$rowIndex)">文件详情</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ </vxe-table>
|
|
|
|
+ </el-row>
|
|
|
|
+ </div>
|
|
<div v-if="inputForm.sourceType === '1'">
|
|
<div v-if="inputForm.sourceType === '1'">
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
项目报销详情
|
|
项目报销详情
|
|
@@ -372,6 +415,84 @@
|
|
</vxe-table>
|
|
</vxe-table>
|
|
</el-row>
|
|
</el-row>
|
|
</div>
|
|
</div>
|
|
|
|
+ <div v-if="inputForm.sourceType === '5'">
|
|
|
|
+ <el-divider content-position="left"><i class="el-icon-document"></i>
|
|
|
|
+ 采购报销详情
|
|
|
|
+ <el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || this.formReadOnly" size="mini" @click="insertEvent('procured')" plain>
|
|
|
|
+ 新增
|
|
|
|
+ </el-button>
|
|
|
|
+ </el-divider>
|
|
|
|
+ <el-row :gutter="15" >
|
|
|
|
+ <vxe-table
|
|
|
|
+ border
|
|
|
|
+ show-footer
|
|
|
|
+ show-overflow
|
|
|
|
+ :footer-method="footerMethod"
|
|
|
|
+ ref="detailTableProcured"
|
|
|
|
+ class="vxe-table-element"
|
|
|
|
+ :data="inputForm.detailInfoProcured"
|
|
|
|
+ style="margin-left: 5em"
|
|
|
|
+ :key="detailKeyProcured"
|
|
|
|
+ @cell-click=""
|
|
|
|
+ @edit-closed=""
|
|
|
|
+ highlight-current-row
|
|
|
|
+ :edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
|
|
|
|
+ :edit-rules="validRules"
|
|
|
|
+ >
|
|
|
|
+ <vxe-table-column field="userName" title="报销人" :edit-render="{}" :rules="[{required: true, message:'请选择报销人', trigger:'blur'}]">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input v-model="scope.row.userName" @focus="userPullListForm5(scope.$rowIndex)"></el-input>
|
|
|
|
+ <!-- <UserSelectV2 :limit='1' :userName="scope.row.userName" @getValue='(value, label) => {scope.row.userName = label}'></UserSelectV2>-->
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ <vxe-table-column field="deptName" title="报销部门" :edit-render="{}">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input :disabled='true' v-model="scope.row.deptName" ></el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ <vxe-table-column field="typeName" title="报销类别" :edit-render="{}" :rules="[{required: true, message:'请选择报销类别', trigger:'blur'}]">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input v-model="scope.row.typeName" @focus="typePullForm5(scope.$rowIndex)"></el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ <vxe-table-column field="projectName" title="报销项目" :edit-render="{}" :rules="[{required: true, message:'请选择报销项目', trigger:'blur'}]">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input v-model="scope.row.projectName" @focus="openProgramPageForm5(scope.$rowIndex, scope.row)"></el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ <!-- <vxe-table-column field="reportNumber" title="报告号" :edit-render="{}">-->
|
|
|
|
+ <!-- <template v-slot:edit="scope">-->
|
|
|
|
+ <!-- <el-input :readonly="true" v-model="scope.row.reportNumber" @focus="openReportNoPageForm(scope.$rowIndex, scope.row)"></el-input>-->
|
|
|
|
+ <!-- </template>-->
|
|
|
|
+ <!-- </vxe-table-column>-->
|
|
|
|
+ <vxe-table-column field="number" title="费用(元)" :edit-render="{}" :rules="[{required: true, message:'请输入费用', trigger:'blur'}]">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input maxlength="15" v-model="scope.row.number" @keyup.native="scope.row.number = twoDecimalPlaces(scope.row.number)"></el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ <vxe-table-column field="receiptNumber" title="收据张数" :edit-render="{}">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input v-model="scope.row.receiptNumber" oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10"></el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ <vxe-table-column field="days" title="出差天数" :edit-render="{}">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input v-model="scope.row.days" oninput ="value=value.replace(/\D|^0/g,'')" maxlength="10"></el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ <vxe-table-column field="content" title="内容" :edit-render="{}">
|
|
|
|
+ <template v-slot:edit="scope">
|
|
|
|
+ <el-input v-model="scope.row.content" ></el-input>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ <vxe-table-column title="操作" width="100">
|
|
|
|
+ <template v-slot="scope">
|
|
|
|
+ <el-button size="mini" type="danger" @click="removeEvent(scope.row,scope.$rowIndex,'procured')">删除</el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </vxe-table-column>
|
|
|
|
+ </vxe-table>
|
|
|
|
+ </el-row>
|
|
|
|
+ </div>
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
<el-divider content-position="left"><i class="el-icon-document"></i>
|
|
专用发票信息
|
|
专用发票信息
|
|
<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || this.formReadOnly " size="mini" @click="insertEvent('amount')" plain>
|
|
<el-button style="margin-left: 20px" type="primary" :disabled="method==='view' || this.formReadOnly " size="mini" @click="insertEvent('amount')" plain>
|
|
@@ -430,20 +551,25 @@
|
|
<CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
|
|
<CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
|
|
<CwProgramPageForm ref="cwProgramPageForm3" @getProgram="getProgram3"></CwProgramPageForm>
|
|
<CwProgramPageForm ref="cwProgramPageForm3" @getProgram="getProgram3"></CwProgramPageForm>
|
|
<CwProgramPageForm ref="cwProgramPageForm4" @getProgram="getProgram4"></CwProgramPageForm>
|
|
<CwProgramPageForm ref="cwProgramPageForm4" @getProgram="getProgram4"></CwProgramPageForm>
|
|
|
|
+ <CwProgramPageForm ref="cwProgramPageForm5" @getProgram="getProgram5"></CwProgramPageForm>
|
|
<!-- <ReimbursementTypePullForm ref="reimbursementTypePullForm" @getProgramForType="getProgramForType"></ReimbursementTypePullForm>-->
|
|
<!-- <ReimbursementTypePullForm ref="reimbursementTypePullForm" @getProgramForType="getProgramForType"></ReimbursementTypePullForm>-->
|
|
<CwReimbursementTypePullForm ref="cwReimbursementTypePullForm" @getProgramForType="getProgramForType"></CwReimbursementTypePullForm>
|
|
<CwReimbursementTypePullForm ref="cwReimbursementTypePullForm" @getProgramForType="getProgramForType"></CwReimbursementTypePullForm>
|
|
<CwReimbursementTypePullForm ref="cwReimbursementTypePullForm2" @getProgramForType="getProgramForType2"></CwReimbursementTypePullForm>
|
|
<CwReimbursementTypePullForm ref="cwReimbursementTypePullForm2" @getProgramForType="getProgramForType2"></CwReimbursementTypePullForm>
|
|
<CwReimbursementTypePullForm ref="cwReimbursementTypePullForm3" @getProgramForType="getProgramForType3"></CwReimbursementTypePullForm>
|
|
<CwReimbursementTypePullForm ref="cwReimbursementTypePullForm3" @getProgramForType="getProgramForType3"></CwReimbursementTypePullForm>
|
|
<CwReimbursementTypePullForm ref="cwReimbursementTypePullForm4" @getProgramForType="getProgramForType4"></CwReimbursementTypePullForm>
|
|
<CwReimbursementTypePullForm ref="cwReimbursementTypePullForm4" @getProgramForType="getProgramForType4"></CwReimbursementTypePullForm>
|
|
|
|
+ <CwReimbursementTypePullForm ref="cwReimbursementTypePullForm5" @getProgramForType="getProgramForType5"></CwReimbursementTypePullForm>
|
|
|
|
|
|
<UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>
|
|
<UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>
|
|
<UserPullForm ref="userPullForm2" @getProgramForUser="getProgramForUser2"></UserPullForm>
|
|
<UserPullForm ref="userPullForm2" @getProgramForUser="getProgramForUser2"></UserPullForm>
|
|
<UserPullForm ref="userPullForm3" @getProgramForUser="getProgramForUser3"></UserPullForm>
|
|
<UserPullForm ref="userPullForm3" @getProgramForUser="getProgramForUser3"></UserPullForm>
|
|
<UserPullForm ref="userPullForm4" @getProgramForUser="getProgramForUser4"></UserPullForm>
|
|
<UserPullForm ref="userPullForm4" @getProgramForUser="getProgramForUser4"></UserPullForm>
|
|
|
|
+ <UserPullForm ref="userPullForm5" @getProgramForUser="getProgramForUser5"></UserPullForm>
|
|
|
|
|
|
</el-form>
|
|
</el-form>
|
|
<WorkContractChooseCom ref="workContractChooseCom" @getContract="getContract"></WorkContractChooseCom>
|
|
<WorkContractChooseCom ref="workContractChooseCom" @getContract="getContract"></WorkContractChooseCom>
|
|
<ReportNoChooseRadio ref="reportNoChooseRadio" @getWorkClientRadioChoose="getWorkClientChoose2"></ReportNoChooseRadio>
|
|
<ReportNoChooseRadio ref="reportNoChooseRadio" @getWorkClientRadioChoose="getWorkClientChoose2"></ReportNoChooseRadio>
|
|
|
|
+ <PurchaseChooseForm ref="purchaseChooseForm" @getProject="getPurChoose"></PurchaseChooseForm>
|
|
|
|
+ <MaterialManagementDialog ref="materialManagementDialog" @getUpload="getUpload"></MaterialManagementDialog>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -466,6 +592,9 @@
|
|
import UserPullForm from '@/views/modules/finance/invoice/UserPullForm'
|
|
import UserPullForm from '@/views/modules/finance/invoice/UserPullForm'
|
|
import CommonApi from '@/api/cw/common/CommonApi'
|
|
import CommonApi from '@/api/cw/common/CommonApi'
|
|
import WorkContractChooseCom from '../../projectRecords/WorkContractChooseCom'
|
|
import WorkContractChooseCom from '../../projectRecords/WorkContractChooseCom'
|
|
|
|
+ import PurchaseChooseForm from '../../../materialManagement/wareHouse/PurchaseChooseForm'
|
|
|
|
+ import MaterialManagementService from '@/api/materialManagement/MaterialManagementService'
|
|
|
|
+ import MaterialManagementDialog from '../../../materialManagement/file/MaterialManagementDialog'
|
|
export default {
|
|
export default {
|
|
data () {
|
|
data () {
|
|
return {
|
|
return {
|
|
@@ -501,6 +630,7 @@
|
|
detailKeyContract: '',
|
|
detailKeyContract: '',
|
|
detailKeyReport: '',
|
|
detailKeyReport: '',
|
|
detailKeyOthers: '',
|
|
detailKeyOthers: '',
|
|
|
|
+ detailKeyProcured: '',
|
|
inputForm: {
|
|
inputForm: {
|
|
userId: '',
|
|
userId: '',
|
|
userName: '',
|
|
userName: '',
|
|
@@ -512,10 +642,15 @@
|
|
detailInfoContracts: [],
|
|
detailInfoContracts: [],
|
|
detailInfoReports: [],
|
|
detailInfoReports: [],
|
|
detailInfoOthers: [],
|
|
detailInfoOthers: [],
|
|
|
|
+ detailInfoProcured: [],
|
|
amountInfos: [],
|
|
amountInfos: [],
|
|
files: [], // 附件信息
|
|
files: [], // 附件信息
|
|
procInsId: '',
|
|
procInsId: '',
|
|
- sourceType: ''
|
|
|
|
|
|
+ sourceType: '',
|
|
|
|
+ preList: [],
|
|
|
|
+ purchaseNo: '',
|
|
|
|
+ tradeTotalPrice: '',
|
|
|
|
+ purchaseId: ''
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
@@ -525,6 +660,7 @@
|
|
reimbursementApprovalTypeService: null,
|
|
reimbursementApprovalTypeService: null,
|
|
userService: null,
|
|
userService: null,
|
|
commonApi: null,
|
|
commonApi: null,
|
|
|
|
+ materialManagementService: null,
|
|
created () {
|
|
created () {
|
|
this.reimbursementApprovalService = new ReimbursementApprovalService()
|
|
this.reimbursementApprovalService = new ReimbursementApprovalService()
|
|
// this.reimbursementService = new ReimbursementService()
|
|
// this.reimbursementService = new ReimbursementService()
|
|
@@ -532,6 +668,7 @@
|
|
// this.reimbursementTypeService = new ReimbursementTypeService()
|
|
// this.reimbursementTypeService = new ReimbursementTypeService()
|
|
this.reimbursementApprovalTypeService = new ReimbursementApprovalTypeService()
|
|
this.reimbursementApprovalTypeService = new ReimbursementApprovalTypeService()
|
|
this.commonApi = new CommonApi()
|
|
this.commonApi = new CommonApi()
|
|
|
|
+ this.materialManagementService = new MaterialManagementService()
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
businessId: {
|
|
businessId: {
|
|
@@ -554,7 +691,9 @@
|
|
UserPullForm,
|
|
UserPullForm,
|
|
ReportNoChooseRadio,
|
|
ReportNoChooseRadio,
|
|
UserSelectV2,
|
|
UserSelectV2,
|
|
- WorkContractChooseCom
|
|
|
|
|
|
+ WorkContractChooseCom,
|
|
|
|
+ PurchaseChooseForm,
|
|
|
|
+ MaterialManagementDialog
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
name () {
|
|
name () {
|
|
@@ -593,10 +732,15 @@
|
|
detailInfoContracts: [],
|
|
detailInfoContracts: [],
|
|
detailInfoReports: [],
|
|
detailInfoReports: [],
|
|
detailInfoOthers: [],
|
|
detailInfoOthers: [],
|
|
|
|
+ detailInfoProcured: [],
|
|
amountInfos: [],
|
|
amountInfos: [],
|
|
files: [], // 附件信息
|
|
files: [], // 附件信息
|
|
procInsId: '',
|
|
procInsId: '',
|
|
- sourceType: ''
|
|
|
|
|
|
+ sourceType: '',
|
|
|
|
+ preList: [],
|
|
|
|
+ purchaseNo: '',
|
|
|
|
+ tradeTotalPrice: '',
|
|
|
|
+ purchaseId: ''
|
|
}
|
|
}
|
|
if (method === 'add') {
|
|
if (method === 'add') {
|
|
this.title = `新建报销类型`
|
|
this.title = `新建报销类型`
|
|
@@ -629,6 +773,9 @@
|
|
if (this.commonJS.isEmpty(this.inputForm.department)) {
|
|
if (this.commonJS.isEmpty(this.inputForm.department)) {
|
|
this.inputForm.department = JSON.parse(localStorage.getItem('user')).officeDTO.name
|
|
this.inputForm.department = JSON.parse(localStorage.getItem('user')).officeDTO.name
|
|
}
|
|
}
|
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.purchaseId)) {
|
|
|
|
+ this.startPur(this.inputForm.purchaseId)
|
|
|
|
+ }
|
|
this.loading = false
|
|
this.loading = false
|
|
})
|
|
})
|
|
// this.reimbursementService.findById(this.inputForm.id).then(({data}) => {
|
|
// this.reimbursementService.findById(this.inputForm.id).then(({data}) => {
|
|
@@ -677,8 +824,15 @@
|
|
})
|
|
})
|
|
},
|
|
},
|
|
close () {
|
|
close () {
|
|
- this.$refs.inputForm.resetFields()
|
|
|
|
this.inputForm.detailInfos = []
|
|
this.inputForm.detailInfos = []
|
|
|
|
+ this.inputForm.detailInfoContracts = []
|
|
|
|
+ this.inputForm.detailInfoReports = []
|
|
|
|
+ this.inputForm.detailInfoOthers = []
|
|
|
|
+ this.inputForm.detailInfoProcured = []
|
|
|
|
+ this.inputForm.purchaseNo = ''
|
|
|
|
+ this.inputForm.preList = ''
|
|
|
|
+ this.inputForm.purchaseId = ''
|
|
|
|
+ this.$refs.inputForm.resetFields()
|
|
this.inputForm.amountInfos = []
|
|
this.inputForm.amountInfos = []
|
|
this.$refs.uploadComponent.clearUpload()
|
|
this.$refs.uploadComponent.clearUpload()
|
|
this.visible = false
|
|
this.visible = false
|
|
@@ -705,6 +859,10 @@
|
|
this.$refs.detailTableOthers.remove(row)
|
|
this.$refs.detailTableOthers.remove(row)
|
|
this.inputForm.detailInfoOthers.splice(rowIndex, 1)
|
|
this.inputForm.detailInfoOthers.splice(rowIndex, 1)
|
|
}
|
|
}
|
|
|
|
+ if (type === 'procured') {
|
|
|
|
+ this.$refs.detailTableProcured.remove(row)
|
|
|
|
+ this.inputForm.detailInfoProcured.splice(rowIndex, 1)
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 新增
|
|
// 新增
|
|
async insertEvent (type) {
|
|
async insertEvent (type) {
|
|
@@ -749,6 +907,15 @@
|
|
this.inputForm.detailInfoOthers.push(data)
|
|
this.inputForm.detailInfoOthers.push(data)
|
|
})
|
|
})
|
|
}
|
|
}
|
|
|
|
+ if (type === 'procured') {
|
|
|
|
+ await this.$refs.detailTableProcured.insert().then((data) => {
|
|
|
|
+ data.userName = JSON.parse(localStorage.getItem('user')).name
|
|
|
|
+ data.deptName = this.officeName
|
|
|
|
+ data.userId = JSON.parse(localStorage.getItem('user')).id
|
|
|
|
+ data.deptId = JSON.parse(localStorage.getItem('user')).officeDTO.id
|
|
|
|
+ this.inputForm.detailInfoProcured.push(data)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 暂存
|
|
// 暂存
|
|
async saveForm (callback) {
|
|
async saveForm (callback) {
|
|
@@ -944,7 +1111,6 @@
|
|
return
|
|
return
|
|
}
|
|
}
|
|
this.indexRow = rowIndex
|
|
this.indexRow = rowIndex
|
|
- console.log('this.indexRow', this.indexRow)
|
|
|
|
// let i = this.inputForm.detailInfos.length
|
|
// let i = this.inputForm.detailInfos.length
|
|
this.$refs.reportNoChooseRadio.init(this.inputForm.detailInfoReports[rowIndex].projectId)
|
|
this.$refs.reportNoChooseRadio.init(this.inputForm.detailInfoReports[rowIndex].projectId)
|
|
// for (let j = this.indexRow; j < i; j++) {
|
|
// for (let j = this.indexRow; j < i; j++) {
|
|
@@ -1001,6 +1167,14 @@
|
|
this.indexRow = rowIndex
|
|
this.indexRow = rowIndex
|
|
this.$refs.cwProgramPageForm4.init('2', false)
|
|
this.$refs.cwProgramPageForm4.init('2', false)
|
|
},
|
|
},
|
|
|
|
+ openProgramPageForm5 (rowIndex, row) {
|
|
|
|
+ if (this.commonJS.isEmpty(row.typeName)) {
|
|
|
|
+ this.$message.error('请选择报销类型')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ this.indexRow = rowIndex
|
|
|
|
+ this.$refs.cwProgramPageForm5.init('2', false)
|
|
|
|
+ },
|
|
openContractForm (rowIndex, row) {
|
|
openContractForm (rowIndex, row) {
|
|
this.$refs.workContractChooseCom.init(rowIndex)
|
|
this.$refs.workContractChooseCom.init(rowIndex)
|
|
},
|
|
},
|
|
@@ -1025,6 +1199,13 @@
|
|
this.indexRow = ''
|
|
this.indexRow = ''
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
},
|
|
},
|
|
|
|
+ getProgram5 (rows) {
|
|
|
|
+ this.inputForm.detailInfoProcured[this.indexRow].projectId = rows[0].id
|
|
|
|
+ this.inputForm.detailInfoProcured[this.indexRow].projectName = rows[0].projectName
|
|
|
|
+ this.inputForm.detailInfoProcured[this.indexRow].reportNumber = rows[0].reportNumber
|
|
|
|
+ this.indexRow = ''
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ },
|
|
// 报销类型下拉弹窗
|
|
// 报销类型下拉弹窗
|
|
typePullForm (rowIndex) {
|
|
typePullForm (rowIndex) {
|
|
this.indexRow = rowIndex
|
|
this.indexRow = rowIndex
|
|
@@ -1046,6 +1227,11 @@
|
|
// this.$refs.reimbursementTypePullForm.init()
|
|
// this.$refs.reimbursementTypePullForm.init()
|
|
this.$refs.cwReimbursementTypePullForm4.init('2')
|
|
this.$refs.cwReimbursementTypePullForm4.init('2')
|
|
},
|
|
},
|
|
|
|
+ typePullForm5 (rowIndex) {
|
|
|
|
+ this.indexRow = rowIndex
|
|
|
|
+ // this.$refs.reimbursementTypePullForm.init()
|
|
|
|
+ this.$refs.cwReimbursementTypePullForm5.init('2')
|
|
|
|
+ },
|
|
// 报销内容详情
|
|
// 报销内容详情
|
|
getProgramForType (rows) {
|
|
getProgramForType (rows) {
|
|
this.inputForm.detailInfos[this.indexRow].typeId = rows.id
|
|
this.inputForm.detailInfos[this.indexRow].typeId = rows.id
|
|
@@ -1071,6 +1257,12 @@
|
|
this.indexRow = ''
|
|
this.indexRow = ''
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
},
|
|
},
|
|
|
|
+ getProgramForType5 (rows) {
|
|
|
|
+ this.inputForm.detailInfoProcured[this.indexRow].typeId = rows.id
|
|
|
|
+ this.inputForm.detailInfoProcured[this.indexRow].typeName = rows.name
|
|
|
|
+ this.indexRow = ''
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ },
|
|
// 报销人下拉弹窗
|
|
// 报销人下拉弹窗
|
|
userPullListForm (rowIndex) {
|
|
userPullListForm (rowIndex) {
|
|
this.indexRow = rowIndex
|
|
this.indexRow = rowIndex
|
|
@@ -1088,6 +1280,10 @@
|
|
this.indexRow = rowIndex
|
|
this.indexRow = rowIndex
|
|
this.$refs.userPullForm4.init()
|
|
this.$refs.userPullForm4.init()
|
|
},
|
|
},
|
|
|
|
+ userPullListForm5 (rowIndex) {
|
|
|
|
+ this.indexRow = rowIndex
|
|
|
|
+ this.$refs.userPullForm5.init()
|
|
|
|
+ },
|
|
getProgramForUser (rows) {
|
|
getProgramForUser (rows) {
|
|
this.inputForm.detailInfos[this.indexRow].userId = rows[0].id
|
|
this.inputForm.detailInfos[this.indexRow].userId = rows[0].id
|
|
this.inputForm.detailInfos[this.indexRow].userName = rows[0].name
|
|
this.inputForm.detailInfos[this.indexRow].userName = rows[0].name
|
|
@@ -1120,6 +1316,14 @@
|
|
this.indexRow = ''
|
|
this.indexRow = ''
|
|
this.$forceUpdate()
|
|
this.$forceUpdate()
|
|
},
|
|
},
|
|
|
|
+ getProgramForUser5 (rows) {
|
|
|
|
+ this.inputForm.detailInfoProcured[this.indexRow].userId = rows[0].id
|
|
|
|
+ this.inputForm.detailInfoProcured[this.indexRow].userName = rows[0].name
|
|
|
|
+ this.inputForm.detailInfoProcured[this.indexRow].deptId = rows[0].parentId
|
|
|
|
+ this.inputForm.detailInfoProcured[this.indexRow].deptName = rows[0].officeName
|
|
|
|
+ this.indexRow = ''
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ },
|
|
getWorkClientChoose2 (list) {
|
|
getWorkClientChoose2 (list) {
|
|
this.inputForm.detailInfoReports[this.indexRow].reportNumber = list.reportNo
|
|
this.inputForm.detailInfoReports[this.indexRow].reportNumber = list.reportNo
|
|
this.indexRow = ''
|
|
this.indexRow = ''
|
|
@@ -1135,10 +1339,15 @@
|
|
this.inputForm.detailInfoContracts = []
|
|
this.inputForm.detailInfoContracts = []
|
|
this.inputForm.detailInfoReports = []
|
|
this.inputForm.detailInfoReports = []
|
|
this.inputForm.detailInfoOthers = []
|
|
this.inputForm.detailInfoOthers = []
|
|
|
|
+ this.inputForm.detailInfoProcured = []
|
|
|
|
+ this.inputForm.purchaseNo = ''
|
|
|
|
+ this.inputForm.preList = ''
|
|
|
|
+ this.inputForm.purchaseId = ''
|
|
this.detailKey = Math.random()
|
|
this.detailKey = Math.random()
|
|
this.detailKeyContract = Math.random()
|
|
this.detailKeyContract = Math.random()
|
|
this.detailKeyReport = Math.random()
|
|
this.detailKeyReport = Math.random()
|
|
this.detailKeyOthers = Math.random()
|
|
this.detailKeyOthers = Math.random()
|
|
|
|
+ this.detailKeyProcured = Math.random()
|
|
},
|
|
},
|
|
submitCheck () {
|
|
submitCheck () {
|
|
if (this.commonJS.isEmpty(this.inputForm.sourceType)) {
|
|
if (this.commonJS.isEmpty(this.inputForm.sourceType)) {
|
|
@@ -1275,8 +1484,83 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ } else if (this.inputForm.sourceType === '5') {
|
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoProcured)) {
|
|
|
|
+ this.$message.error('至少填写一条报销详情信息')
|
|
|
|
+ this.loading = false
|
|
|
|
+ throw new Error('至少填写一条报销详情信息')
|
|
|
|
+ } else {
|
|
|
|
+ let i = this.inputForm.detailInfoProcured.length
|
|
|
|
+ for (let j = 0; j < i; j++) {
|
|
|
|
+ let k = j + 1
|
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoProcured[j].userName)) {
|
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销人')
|
|
|
|
+ this.loading = false
|
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销人')
|
|
|
|
+ }
|
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoProcured[j].typeName)) {
|
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销类型')
|
|
|
|
+ this.loading = false
|
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销类型')
|
|
|
|
+ }
|
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoProcured[j].projectName)) {
|
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销项目')
|
|
|
|
+ this.loading = false
|
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销项目')
|
|
|
|
+ }
|
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoProcured[j].number)) {
|
|
|
|
+ this.$message.error('报销详情第' + k + '行请输入费用')
|
|
|
|
+ this.loading = false
|
|
|
|
+ throw new Error('报销详情第' + k + '行请输入费用')
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ openPurForm () {
|
|
|
|
+ this.$refs.purchaseChooseForm.init()
|
|
|
|
+ },
|
|
|
|
+ startPur (id) {
|
|
|
|
+ this.materialManagementService.findById(id).then(({data}) => {
|
|
|
|
+ this.inputForm.preList = data.detailInfos
|
|
|
|
+ this.inputForm.purchaseNo = data.purchaseNo
|
|
|
|
+ let i = this.inputForm.preList.length
|
|
|
|
+ for (let j = 0; j < i; j++) {
|
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.preList[j].tradePrice)) {
|
|
|
|
+ if (this.commonJS.isNotEmpty(this.inputForm.preList[j].tradeNumber)) {
|
|
|
|
+ this.inputForm.preList[j].priceSum = this.inputForm.preList[j].tradePrice * this.inputForm.preList[j].tradeNumber
|
|
|
|
+ }
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+ })
|
|
|
|
+ this.$forceUpdate()
|
|
|
|
+ },
|
|
|
|
+ getPurChoose (row) {
|
|
|
|
+ this.inputForm.purchaseId = row.id
|
|
|
|
+ this.startPur(row.id)
|
|
|
|
+ },
|
|
|
|
+ footerMethod555 ({ columns, data }) {
|
|
|
|
+ const footerData = [
|
|
|
|
+ columns.map((column, columnIndex) => {
|
|
|
|
+ if (columnIndex === 0) {
|
|
|
|
+ return '商品总价'
|
|
|
|
+ }
|
|
|
|
+ if (['priceSum'].includes(column.property)) {
|
|
|
|
+ // eslint-disable-next-line no-undef
|
|
|
|
+ this.inputForm.tradeTotalPrice = XEUtils.sum(data, column.property)
|
|
|
|
+ return XEUtils.sum(data, column.property)
|
|
|
|
+ }
|
|
|
|
+ return null
|
|
|
|
+ })
|
|
|
|
+ ]
|
|
|
|
+ return footerData
|
|
|
|
+ },
|
|
|
|
+ seeFileInfo (index) {
|
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.preList[index].fileInfoLost)) {
|
|
|
|
+ this.inputForm.preList[index].fileInfoLost = []
|
|
}
|
|
}
|
|
|
|
+ this.$refs.materialManagementDialog.newUpload('view', this.inputForm.preList[index].fileInfoLost, null, null, null, null, null, false, index)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|