|
@@ -23,6 +23,7 @@
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="报销日期" prop="reimDate" :rules="[{required: true, message:'请选择报销日期', trigger:'blur'}]">
|
|
|
<el-date-picker
|
|
|
+ placement="bottom-start"
|
|
|
v-model="inputForm.reimDate"
|
|
|
type="date"
|
|
|
value-format="yyyy-MM-dd"
|
|
@@ -31,6 +32,21 @@
|
|
|
</el-date-picker>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="报销类型" prop="sourceType"
|
|
|
+ :rules="[
|
|
|
+ {required: true, message:'请选择报销类型', trigger:'change'}
|
|
|
+ ]">
|
|
|
+ <el-select v-model="inputForm.sourceType" @change="changeSourceType" placeholder="请选择报销类型" style="width:100%;">
|
|
|
+ <el-option
|
|
|
+ v-for="item in $dictUtils.getDictList('cw_reimbursement_source_type')"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value">
|
|
|
+ </el-option>
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
<el-col :span="24">
|
|
|
<el-form-item label="备注" prop="remarks">
|
|
|
<el-input v-model="inputForm.remarks"
|
|
@@ -44,82 +60,318 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
|
|
|
- <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('detail')" plain>
|
|
|
- 新增
|
|
|
- </el-button>
|
|
|
- </el-divider>
|
|
|
- <el-row :gutter="15" >
|
|
|
- <vxe-table
|
|
|
- border
|
|
|
- show-footer
|
|
|
- show-overflow
|
|
|
- :footer-method="footerMethod"
|
|
|
- ref="detailTable"
|
|
|
- class="vxe-table-element"
|
|
|
- :data="inputForm.detailInfos"
|
|
|
- style="margin-left: 5em"
|
|
|
- @cell-click=""
|
|
|
- @edit-closed=""
|
|
|
- highlight-current-row
|
|
|
- :edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: false, 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="userPullListForm(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="typePullForm(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="openProgramPageForm(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,'detail')">删除</el-button>
|
|
|
- </template>
|
|
|
- </vxe-table-column>
|
|
|
- </vxe-table>
|
|
|
- </el-row>
|
|
|
-
|
|
|
+ <div v-if="inputForm.sourceType === '1'">
|
|
|
+ <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('detail')" plain>
|
|
|
+ 新增
|
|
|
+ </el-button>
|
|
|
+ </el-divider>
|
|
|
+ <el-row :gutter="15" >
|
|
|
+ <vxe-table
|
|
|
+ border
|
|
|
+ show-footer
|
|
|
+ show-overflow
|
|
|
+ :footer-method="footerMethod"
|
|
|
+ ref="detailTable"
|
|
|
+ :key="detailKey"
|
|
|
+ class="vxe-table-element"
|
|
|
+ :data="inputForm.detailInfos"
|
|
|
+ style="margin-left: 5em"
|
|
|
+ @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="userPullListForm(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="typePullForm(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="openProgramPageForm(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,'detail')">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ </vxe-table>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <div v-if="inputForm.sourceType === '2'">
|
|
|
+ <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('contract_detail')" plain>
|
|
|
+ 新增
|
|
|
+ </el-button>
|
|
|
+ </el-divider>
|
|
|
+ <el-row :gutter="15" >
|
|
|
+ <vxe-table
|
|
|
+ border
|
|
|
+ show-footer
|
|
|
+ show-overflow
|
|
|
+ :footer-method="footerMethod"
|
|
|
+ ref="detailTableContract"
|
|
|
+ :key="detailKeyContract"
|
|
|
+ class="vxe-table-element"
|
|
|
+ :data="inputForm.detailInfoContracts"
|
|
|
+ style="margin-left: 5em"
|
|
|
+ @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="userPullListForm2(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="typePullForm2(scope.$rowIndex)"></el-input>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ <vxe-table-column field="contractName" title="报销合同" :edit-render="{}" :rules="[{required: true, message:'请选择报销合同', trigger:'blur'}]">
|
|
|
+ <template v-slot:edit="scope">
|
|
|
+ <el-input v-model="scope.row.contractName" @focus="openContractForm(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,'contract_detail')">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ </vxe-table>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <div v-if="inputForm.sourceType === '3'">
|
|
|
+ <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('report_detail')" plain>
|
|
|
+ 新增
|
|
|
+ </el-button>
|
|
|
+ </el-divider>
|
|
|
+ <el-row :gutter="15" >
|
|
|
+ <vxe-table
|
|
|
+ border
|
|
|
+ show-footer
|
|
|
+ show-overflow
|
|
|
+ :footer-method="footerMethod"
|
|
|
+ ref="detailTableReport"
|
|
|
+ :key="detailKeyReport"
|
|
|
+ class="vxe-table-element"
|
|
|
+ :data="inputForm.detailInfoReports"
|
|
|
+ style="margin-left: 5em"
|
|
|
+ @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="userPullListForm3(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="typePullForm3(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="openProgramPageForm3(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,'report_detail')">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ </vxe-table>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
+ <div v-if="inputForm.sourceType === '4'">
|
|
|
+ <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('others')" plain>
|
|
|
+ 新增
|
|
|
+ </el-button>
|
|
|
+ </el-divider>
|
|
|
+ <el-row :gutter="15" >
|
|
|
+ <vxe-table
|
|
|
+ border
|
|
|
+ show-footer
|
|
|
+ show-overflow
|
|
|
+ :footer-method="footerMethod"
|
|
|
+ ref="detailTableOthers"
|
|
|
+ class="vxe-table-element"
|
|
|
+ :data="inputForm.detailInfoOthers"
|
|
|
+ style="margin-left: 5em"
|
|
|
+ :key="detailKeyOthers"
|
|
|
+ @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="userPullListForm4(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="typePullForm4(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="openProgramPageForm4(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,'others')">删除</el-button>
|
|
|
+ </template>
|
|
|
+ </vxe-table-column>
|
|
|
+ </vxe-table>
|
|
|
+ </el-row>
|
|
|
+ </div>
|
|
|
<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>
|
|
@@ -137,7 +389,7 @@
|
|
|
@cell-click=""
|
|
|
@edit-closed=""
|
|
|
highlight-current-row
|
|
|
- :edit-config="{trigger: 'click', mode: 'cell', showStatus: true, autoClear: true, icon:'_'}"
|
|
|
+ :edit-config="{trigger: 'click', mode: 'row', showStatus: true, autoClear: true, icon:'_'}"
|
|
|
>
|
|
|
<vxe-table-column field="code" title="发票代码" :edit-render="{}">
|
|
|
<template v-slot:edit="scope">
|
|
@@ -176,10 +428,21 @@
|
|
|
<UpLoadComponent ref="uploadComponent"></UpLoadComponent>
|
|
|
<!-- <ProgramPageForm ref="programPageForm" @getProgram="getProgram"></ProgramPageForm>-->
|
|
|
<CwProgramPageForm ref="cwProgramPageForm" @getProgram="getProgram"></CwProgramPageForm>
|
|
|
+ <CwProgramPageForm ref="cwProgramPageForm3" @getProgram="getProgram3"></CwProgramPageForm>
|
|
|
+ <CwProgramPageForm ref="cwProgramPageForm4" @getProgram="getProgram4"></CwProgramPageForm>
|
|
|
<!-- <ReimbursementTypePullForm ref="reimbursementTypePullForm" @getProgramForType="getProgramForType"></ReimbursementTypePullForm>-->
|
|
|
<CwReimbursementTypePullForm ref="cwReimbursementTypePullForm" @getProgramForType="getProgramForType"></CwReimbursementTypePullForm>
|
|
|
+ <CwReimbursementTypePullForm ref="cwReimbursementTypePullForm2" @getProgramForType="getProgramForType2"></CwReimbursementTypePullForm>
|
|
|
+ <CwReimbursementTypePullForm ref="cwReimbursementTypePullForm3" @getProgramForType="getProgramForType3"></CwReimbursementTypePullForm>
|
|
|
+ <CwReimbursementTypePullForm ref="cwReimbursementTypePullForm4" @getProgramForType="getProgramForType4"></CwReimbursementTypePullForm>
|
|
|
+
|
|
|
<UserPullForm ref="userPullForm" @getProgramForUser="getProgramForUser"></UserPullForm>
|
|
|
+ <UserPullForm ref="userPullForm2" @getProgramForUser="getProgramForUser2"></UserPullForm>
|
|
|
+ <UserPullForm ref="userPullForm3" @getProgramForUser="getProgramForUser3"></UserPullForm>
|
|
|
+ <UserPullForm ref="userPullForm4" @getProgramForUser="getProgramForUser4"></UserPullForm>
|
|
|
+
|
|
|
</el-form>
|
|
|
+ <WorkContractChooseCom ref="workContractChooseCom" @getContract="getContract"></WorkContractChooseCom>
|
|
|
<ReportNoChooseRadio ref="reportNoChooseRadio" @getWorkClientRadioChoose="getWorkClientChoose2"></ReportNoChooseRadio>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -202,6 +465,7 @@
|
|
|
import CwReimbursementTypePullForm from './CwReimbursementTypePullForm'
|
|
|
import UserPullForm from '@/views/modules/finance/invoice/UserPullForm'
|
|
|
import CommonApi from '@/api/cw/common/CommonApi'
|
|
|
+ import WorkContractChooseCom from '../../projectRecords/WorkContractChooseCom'
|
|
|
export default {
|
|
|
data () {
|
|
|
return {
|
|
@@ -218,6 +482,9 @@
|
|
|
projectName: [
|
|
|
{required: true, message: '报销项目不能为空'}
|
|
|
],
|
|
|
+ contractName: [
|
|
|
+ {required: true, message: '报销合同不能为空'}
|
|
|
+ ],
|
|
|
reportNumber: [
|
|
|
{required: true, message: '报告号不能为空'}
|
|
|
],
|
|
@@ -230,6 +497,10 @@
|
|
|
visible: false,
|
|
|
loading: false,
|
|
|
indexRow: '',
|
|
|
+ detailKey: '',
|
|
|
+ detailKeyContract: '',
|
|
|
+ detailKeyReport: '',
|
|
|
+ detailKeyOthers: '',
|
|
|
inputForm: {
|
|
|
userId: '',
|
|
|
userName: '',
|
|
@@ -238,9 +509,13 @@
|
|
|
reimDate: '',
|
|
|
remarks: '',
|
|
|
detailInfos: [],
|
|
|
+ detailInfoContracts: [],
|
|
|
+ detailInfoReports: [],
|
|
|
+ detailInfoOthers: [],
|
|
|
amountInfos: [],
|
|
|
files: [], // 附件信息
|
|
|
- procInsId: ''
|
|
|
+ procInsId: '',
|
|
|
+ sourceType: ''
|
|
|
}
|
|
|
}
|
|
|
},
|
|
@@ -253,10 +528,6 @@
|
|
|
created () {
|
|
|
this.reimbursementApprovalService = new ReimbursementApprovalService()
|
|
|
// this.reimbursementService = new ReimbursementService()
|
|
|
- this.inputForm.userId = this.userId
|
|
|
- this.inputForm.userName = this.name
|
|
|
- this.inputForm.reimDate = new Date()
|
|
|
- this.inputForm.department = this.officeName
|
|
|
this.userService = new UserService()
|
|
|
// this.reimbursementTypeService = new ReimbursementTypeService()
|
|
|
this.reimbursementApprovalTypeService = new ReimbursementApprovalTypeService()
|
|
@@ -282,7 +553,8 @@
|
|
|
CwReimbursementTypePullForm,
|
|
|
UserPullForm,
|
|
|
ReportNoChooseRadio,
|
|
|
- UserSelectV2
|
|
|
+ UserSelectV2,
|
|
|
+ WorkContractChooseCom
|
|
|
},
|
|
|
computed: {
|
|
|
name () {
|
|
@@ -318,9 +590,13 @@
|
|
|
reimDate: '',
|
|
|
remarks: '',
|
|
|
detailInfos: [],
|
|
|
+ detailInfoContracts: [],
|
|
|
+ detailInfoReports: [],
|
|
|
+ detailInfoOthers: [],
|
|
|
amountInfos: [],
|
|
|
files: [], // 附件信息
|
|
|
- procInsId: ''
|
|
|
+ procInsId: '',
|
|
|
+ sourceType: ''
|
|
|
}
|
|
|
if (method === 'add') {
|
|
|
this.title = `新建报销类型`
|
|
@@ -341,6 +617,18 @@
|
|
|
this.inputForm = this.recover(this.inputForm, data)
|
|
|
this.$refs.uploadComponent.newUpload(method, this.inputForm.files, 'reimbursement')
|
|
|
this.inputForm = JSON.parse(JSON.stringify(this.inputForm))
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.userId)) {
|
|
|
+ this.inputForm.userId = JSON.parse(localStorage.getItem('user')).id
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.userName)) {
|
|
|
+ this.inputForm.userName = JSON.parse(localStorage.getItem('user')).name
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.reimDate)) {
|
|
|
+ this.inputForm.reimDate = new Date()
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.department)) {
|
|
|
+ this.inputForm.department = JSON.parse(localStorage.getItem('user')).officeDTO.name
|
|
|
+ }
|
|
|
this.loading = false
|
|
|
})
|
|
|
// this.reimbursementService.findById(this.inputForm.id).then(({data}) => {
|
|
@@ -405,13 +693,27 @@
|
|
|
this.$refs.amountTable.remove(row)
|
|
|
this.inputForm.amountInfos.splice(rowIndex, 1)
|
|
|
}
|
|
|
+ if (type === 'contract_detail') {
|
|
|
+ this.$refs.detailTableContract.remove(row)
|
|
|
+ this.inputForm.detailInfoContracts.splice(rowIndex, 1)
|
|
|
+ }
|
|
|
+ if (type === 'report_detail') {
|
|
|
+ this.$refs.detailTableReport.remove(row)
|
|
|
+ this.inputForm.detailInfoReports.splice(rowIndex, 1)
|
|
|
+ }
|
|
|
+ if (type === 'others') {
|
|
|
+ this.$refs.detailTableOthers.remove(row)
|
|
|
+ this.inputForm.detailInfoOthers.splice(rowIndex, 1)
|
|
|
+ }
|
|
|
},
|
|
|
// 新增
|
|
|
async insertEvent (type) {
|
|
|
if (type === 'detail') {
|
|
|
await this.$refs.detailTable.insert().then((data) => {
|
|
|
- data.userName = this.name
|
|
|
+ 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.detailInfos.push(data)
|
|
|
})
|
|
|
}
|
|
@@ -420,6 +722,33 @@
|
|
|
this.inputForm.amountInfos.push(data)
|
|
|
})
|
|
|
}
|
|
|
+ if (type === 'contract_detail') {
|
|
|
+ await this.$refs.detailTableContract.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.detailInfoContracts.push(data)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (type === 'report_detail') {
|
|
|
+ await this.$refs.detailTableReport.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.detailInfoReports.push(data)
|
|
|
+ })
|
|
|
+ }
|
|
|
+ if (type === 'others') {
|
|
|
+ await this.$refs.detailTableOthers.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.detailInfoOthers.push(data)
|
|
|
+ })
|
|
|
+ }
|
|
|
},
|
|
|
// 暂存
|
|
|
async saveForm (callback) {
|
|
@@ -458,6 +787,7 @@
|
|
|
this.$refs['inputForm'].validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true
|
|
|
+ this.submitCheck()
|
|
|
if (this.$refs.uploadComponent.checkProgress()) {
|
|
|
this.loading = false
|
|
|
return
|
|
@@ -465,36 +795,6 @@
|
|
|
if (this.commonJS.isEmpty(this.inputForm.files)) {
|
|
|
this.inputForm.files = []
|
|
|
}
|
|
|
- if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
|
|
|
- this.$message.error('至少填写一条报销详情信息')
|
|
|
- this.loading = false
|
|
|
- return
|
|
|
- } else {
|
|
|
- let i = this.inputForm.detailInfos.length
|
|
|
- for (let j = 0; j < i; j++) {
|
|
|
- let k = j + 1
|
|
|
- if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].userName)) {
|
|
|
- this.$message.error('报销详情第' + k + '行请选择报销人')
|
|
|
- this.loading = false
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].typeName)) {
|
|
|
- this.$message.error('报销详情第' + k + '行请选择报销类型')
|
|
|
- this.loading = false
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].projectName)) {
|
|
|
- this.$message.error('报销详情第' + k + '行请选择报销项目')
|
|
|
- this.loading = false
|
|
|
- return
|
|
|
- }
|
|
|
- if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].number)) {
|
|
|
- this.$message.error('报销详情第' + k + '行请输入费用')
|
|
|
- this.loading = false
|
|
|
- return
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
// if (this.commonJS.isEmpty(this.inputForm.amountInfos)) {
|
|
|
// this.$message.error('至少填写一条专用发票信息')
|
|
|
// this.loading = false
|
|
@@ -526,6 +826,7 @@
|
|
|
this.$refs['inputForm'].validate(async (valid) => {
|
|
|
if (valid) {
|
|
|
this.loading = true
|
|
|
+ this.submitCheck()
|
|
|
if (this.$refs.uploadComponent.checkProgress()) {
|
|
|
this.loading = false
|
|
|
return
|
|
@@ -645,7 +946,7 @@
|
|
|
this.indexRow = rowIndex
|
|
|
console.log('this.indexRow', this.indexRow)
|
|
|
// let i = this.inputForm.detailInfos.length
|
|
|
- this.$refs.reportNoChooseRadio.init(this.inputForm.detailInfos[rowIndex].projectName)
|
|
|
+ this.$refs.reportNoChooseRadio.init(this.inputForm.detailInfoReports[rowIndex].projectId)
|
|
|
// for (let j = this.indexRow; j < i; j++) {
|
|
|
// if (this.commonJS.isNotEmpty(this.inputForm.detailInfos[j].projectName)) {
|
|
|
// console.log('this.inputForm.detailInfos[j].projectName', this.inputForm.detailInfos[j].projectName)
|
|
@@ -670,10 +971,39 @@
|
|
|
this.$refs.cwProgramPageForm.init('2', false)
|
|
|
} else {
|
|
|
// 打开单选组件
|
|
|
- this.$refs.cwProgramPageForm.init(null, false)
|
|
|
+ this.$refs.cwProgramPageForm.init('1', false)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
+ openProgramPageForm3 (rowIndex, row) {
|
|
|
+ if (this.commonJS.isEmpty(row.typeName)) {
|
|
|
+ this.$message.error('请选择报销类型')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.indexRow = rowIndex
|
|
|
+ this.reimbursementApprovalTypeService.findById(row.typeId).then(({data}) => {
|
|
|
+ let i = data.sort.toString()
|
|
|
+ i = i.substring(0, 1)
|
|
|
+ // 非业务报销
|
|
|
+ if (i !== '1') {
|
|
|
+ this.$refs.cwProgramPageForm3.init('2', false)
|
|
|
+ } else {
|
|
|
+ // 打开单选组件
|
|
|
+ this.$refs.cwProgramPageForm3.init('1', false)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ openProgramPageForm4 (rowIndex, row) {
|
|
|
+ if (this.commonJS.isEmpty(row.typeName)) {
|
|
|
+ this.$message.error('请选择报销类型')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.indexRow = rowIndex
|
|
|
+ this.$refs.cwProgramPageForm4.init('2', false)
|
|
|
+ },
|
|
|
+ openContractForm (rowIndex, row) {
|
|
|
+ this.$refs.workContractChooseCom.init(rowIndex)
|
|
|
+ },
|
|
|
getProgram (rows) {
|
|
|
this.inputForm.detailInfos[this.indexRow].projectId = rows[0].id
|
|
|
this.inputForm.detailInfos[this.indexRow].projectName = rows[0].projectName
|
|
@@ -681,11 +1011,40 @@
|
|
|
this.indexRow = ''
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
+ getProgram3 (rows) {
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].projectId = rows[0].id
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].projectName = rows[0].projectName
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].reportNumber = rows[0].reportNumber
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ getProgram4 (rows) {
|
|
|
+ this.inputForm.detailInfoOthers[this.indexRow].projectId = rows[0].id
|
|
|
+ this.inputForm.detailInfoOthers[this.indexRow].projectName = rows[0].projectName
|
|
|
+ this.inputForm.detailInfoOthers[this.indexRow].reportNumber = rows[0].reportNumber
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
// 报销类型下拉弹窗
|
|
|
typePullForm (rowIndex) {
|
|
|
this.indexRow = rowIndex
|
|
|
// this.$refs.reimbursementTypePullForm.init()
|
|
|
- this.$refs.cwReimbursementTypePullForm.init()
|
|
|
+ this.$refs.cwReimbursementTypePullForm.init('1')
|
|
|
+ },
|
|
|
+ typePullForm2 (rowIndex) {
|
|
|
+ this.indexRow = rowIndex
|
|
|
+ // this.$refs.reimbursementTypePullForm.init()
|
|
|
+ this.$refs.cwReimbursementTypePullForm2.init('2')
|
|
|
+ },
|
|
|
+ typePullForm3 (rowIndex) {
|
|
|
+ this.indexRow = rowIndex
|
|
|
+ // this.$refs.reimbursementTypePullForm.init()
|
|
|
+ this.$refs.cwReimbursementTypePullForm3.init('1')
|
|
|
+ },
|
|
|
+ typePullForm4 (rowIndex) {
|
|
|
+ this.indexRow = rowIndex
|
|
|
+ // this.$refs.reimbursementTypePullForm.init()
|
|
|
+ this.$refs.cwReimbursementTypePullForm4.init('2')
|
|
|
},
|
|
|
// 报销内容详情
|
|
|
getProgramForType (rows) {
|
|
@@ -694,11 +1053,41 @@
|
|
|
this.indexRow = ''
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
+ getProgramForType2 (rows) {
|
|
|
+ this.inputForm.detailInfoContracts[this.indexRow].typeId = rows.id
|
|
|
+ this.inputForm.detailInfoContracts[this.indexRow].typeName = rows.name
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ getProgramForType3 (rows) {
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].typeId = rows.id
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].typeName = rows.name
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ getProgramForType4 (rows) {
|
|
|
+ this.inputForm.detailInfoOthers[this.indexRow].typeId = rows.id
|
|
|
+ this.inputForm.detailInfoOthers[this.indexRow].typeName = rows.name
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
// 报销人下拉弹窗
|
|
|
userPullListForm (rowIndex) {
|
|
|
this.indexRow = rowIndex
|
|
|
this.$refs.userPullForm.init()
|
|
|
},
|
|
|
+ userPullListForm2 (rowIndex) {
|
|
|
+ this.indexRow = rowIndex
|
|
|
+ this.$refs.userPullForm2.init()
|
|
|
+ },
|
|
|
+ userPullListForm3 (rowIndex) {
|
|
|
+ this.indexRow = rowIndex
|
|
|
+ this.$refs.userPullForm3.init()
|
|
|
+ },
|
|
|
+ userPullListForm4 (rowIndex) {
|
|
|
+ this.indexRow = rowIndex
|
|
|
+ this.$refs.userPullForm4.init()
|
|
|
+ },
|
|
|
getProgramForUser (rows) {
|
|
|
this.inputForm.detailInfos[this.indexRow].userId = rows[0].id
|
|
|
this.inputForm.detailInfos[this.indexRow].userName = rows[0].name
|
|
@@ -707,10 +1096,187 @@
|
|
|
this.indexRow = ''
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
+ getProgramForUser2 (rows) {
|
|
|
+ this.inputForm.detailInfoContracts[this.indexRow].userId = rows[0].id
|
|
|
+ this.inputForm.detailInfoContracts[this.indexRow].userName = rows[0].name
|
|
|
+ this.inputForm.detailInfoContracts[this.indexRow].deptId = rows[0].parentId
|
|
|
+ this.inputForm.detailInfoContracts[this.indexRow].deptName = rows[0].officeName
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ getProgramForUser3 (rows) {
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].userId = rows[0].id
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].userName = rows[0].name
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].deptId = rows[0].parentId
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].deptName = rows[0].officeName
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ getProgramForUser4 (rows) {
|
|
|
+ this.inputForm.detailInfoOthers[this.indexRow].userId = rows[0].id
|
|
|
+ this.inputForm.detailInfoOthers[this.indexRow].userName = rows[0].name
|
|
|
+ this.inputForm.detailInfoOthers[this.indexRow].deptId = rows[0].parentId
|
|
|
+ this.inputForm.detailInfoOthers[this.indexRow].deptName = rows[0].officeName
|
|
|
+ this.indexRow = ''
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
getWorkClientChoose2 (list) {
|
|
|
- this.inputForm.detailInfos[this.indexRow].reportNumber = list.reportNo
|
|
|
+ this.inputForm.detailInfoReports[this.indexRow].reportNumber = list.reportNo
|
|
|
this.indexRow = ''
|
|
|
this.$forceUpdate()
|
|
|
+ },
|
|
|
+ getContract (row, rowIndex) {
|
|
|
+ this.inputForm.detailInfoContracts[rowIndex].contractId = row.id
|
|
|
+ this.inputForm.detailInfoContracts[rowIndex].contractName = row.contractName
|
|
|
+ this.$forceUpdate()
|
|
|
+ },
|
|
|
+ changeSourceType () {
|
|
|
+ this.inputForm.detailInfos = []
|
|
|
+ this.inputForm.detailInfoContracts = []
|
|
|
+ this.inputForm.detailInfoReports = []
|
|
|
+ this.inputForm.detailInfoOthers = []
|
|
|
+ this.detailKey = Math.random()
|
|
|
+ this.detailKeyContract = Math.random()
|
|
|
+ this.detailKeyReport = Math.random()
|
|
|
+ this.detailKeyOthers = Math.random()
|
|
|
+ },
|
|
|
+ submitCheck () {
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.sourceType)) {
|
|
|
+ this.$message.error('请填写报销类型')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('请填写报销类型')
|
|
|
+ } else {
|
|
|
+ if (this.inputForm.sourceType === '1') {
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfos)) {
|
|
|
+ this.$message.error('至少填写一条报销详情信息')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('至少填写一条报销详情信息')
|
|
|
+ } else {
|
|
|
+ let i = this.inputForm.detailInfos.length
|
|
|
+ for (let j = 0; j < i; j++) {
|
|
|
+ let k = j + 1
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].userName)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销人')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销人')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].typeName)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销类型')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销类型')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].projectName)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销项目')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销项目')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfos[j].number)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请输入费用')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请输入费用')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (this.inputForm.sourceType === '2') {
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoContracts)) {
|
|
|
+ this.$message.error('至少填写一条报销详情信息')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('至少填写一条报销详情信息')
|
|
|
+ } else {
|
|
|
+ let i = this.inputForm.detailInfoContracts.length
|
|
|
+ for (let j = 0; j < i; j++) {
|
|
|
+ let k = j + 1
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoContracts[j].userName)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销人')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销人')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoContracts[j].typeName)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销类型')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销类型')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoContracts[j].contractName)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销合同')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销合同')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoContracts[j].number)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请输入费用')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请输入费用')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (this.inputForm.sourceType === '3') {
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoReports)) {
|
|
|
+ this.$message.error('至少填写一条报销详情信息')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('至少填写一条报销详情信息')
|
|
|
+ } else {
|
|
|
+ let i = this.inputForm.detailInfoReports.length
|
|
|
+ for (let j = 0; j < i; j++) {
|
|
|
+ let k = j + 1
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoReports[j].userName)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销人')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销人')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoReports[j].typeName)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销类型')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销类型')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoReports[j].projectName)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销项目')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销项目')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoReports[j].reportNumber)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报告号')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报告号')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoReports[j].number)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请输入费用')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请输入费用')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ } else if (this.inputForm.sourceType === '4') {
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoOthers)) {
|
|
|
+ this.$message.error('至少填写一条报销详情信息')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('至少填写一条报销详情信息')
|
|
|
+ } else {
|
|
|
+ let i = this.inputForm.detailInfoOthers.length
|
|
|
+ for (let j = 0; j < i; j++) {
|
|
|
+ let k = j + 1
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoOthers[j].userName)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销人')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销人')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoOthers[j].typeName)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销类型')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销类型')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoOthers[j].projectName)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请选择报销项目')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请选择报销项目')
|
|
|
+ }
|
|
|
+ if (this.commonJS.isEmpty(this.inputForm.detailInfoOthers[j].number)) {
|
|
|
+ this.$message.error('报销详情第' + k + '行请输入费用')
|
|
|
+ this.loading = false
|
|
|
+ throw new Error('报销详情第' + k + '行请输入费用')
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|