| | |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="120px"> |
| | | <el-row> |
| | | <el-col :span="5"> |
| | | <el-form-item label="申请日期" prop="createTime"> |
| | | <el-date-picker clearable :disabled="true" style="width: 100%" v-model="form.createTime" type="date" |
| | | <el-form-item label="申请日期" prop="applyTime"> |
| | | <el-date-picker clearable :disabled="true" style="width: 100%" v-model="form.applyTime" type="date" |
| | | value-format="yyyy-MM-dd HH:mm:ss" placeholder="日 期"> |
| | | </el-date-picker> |
| | | </el-form-item> |
| | |
| | | </el-row> |
| | | <el-row> |
| | | <el-col :span="3" v-if="businessType == '1'"> |
| | | <el-button @click.native.prevent="importFeeItems" type="primary" size="small"> |
| | | 导入服务项目 |
| | | </el-button> |
| | | </el-col> |
| | | <el-col :span="3"> |
| | | <div style="margin-bottom: 15px;" v-if="businessType == 2"> |
| | | <el-button type="success" icon="el-icon-download" @click="Batchentry">批量录入</el-button> |
| | | <div style="margin-bottom: 15px;"> |
| | | <el-button type="primary" icon="el-icon-download" size="small" @click.native.prevent="importFeeItems"> |
| | | 批量导入服务项目 |
| | | </el-button> |
| | | </div> |
| | | </el-col> |
| | | |
| | | <el-col :span="3"> |
| | | <div style="margin-bottom: 15px;" v-if="userprofile.nickName == '陈慕华' && |
| | | (businessType == '1' || businessType == '2') |
| | | "> |
| | | <el-button type="success" icon="el-icon-edit-outline" @click="Manualcalculationfn">计算个税</el-button> |
| | | <el-col :span="3" v-if="businessType == 2"> |
| | | <div style="margin-bottom: 15px;"> |
| | | <el-button type="primary" icon="el-icon-download" size="small" @click="Batchentry">批量录入专家</el-button> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="3" v-if="userprofile.nickName == '陈慕华' && (businessType == '1' || businessType == '2')"> |
| | | <div style="margin-bottom: 15px;"> |
| | | <el-button type="success" icon="el-icon-edit-outline" size="small" |
| | | @click="Manualcalculationfn">计算个税</el-button> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="servicesscope" align="center" label="服务说明" v-if="form.applytype == '1'" width="180"> |
| | | <el-table-column prop="servicesscope" align="center" label="服务说明" v-if="businessType == '1'" width="180"> |
| | | <template slot-scope="scope"> |
| | | <el-select v-model="scope.row.servicesscope" placeholder="服务说明" clearable allow-create |
| | | @change="verifyFeeRemark(scope.row)"> |
| | |
| | | " /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column v-if="businessType == 2 || |
| | | businessType == 3 || |
| | | businessType == 4 || |
| | | ismanager == true |
| | | " prop="amount" align="center" :label="amountLabel" width="120"> |
| | | <el-table-column prop="amount" align="center" :label="amountlabel" width="120"> |
| | | <template slot-scope="scope"> |
| | | <!-- |
| | | <el-select v-model="scope.row.amount" placeholder="税前金额" clearable filterable allow-create |
| | | @change="selectamount(scope.row)"> |
| | | <el-option v-for="dict in scope.row.rowfeeblocks" :key="dict.expensedescribe" :label="dict.expense" |
| | | :value="dict.expense"></el-option> |
| | | </el-select> |
| | | --> |
| | | <el-input v-model="scope.row.amount" placeholder="金额" @blur="val => { |
| | | calculateTax(scope.row, 'A'); |
| | | } |
| | | " /> |
| | | <el-input v-model="scope.row.amount" placeholder="金额" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taxamount" align="center" label="扣税金额" width="120" v-if="(this.ismanager == true) & |
| | | (form.applytype == '1' || form.applytype == '2') |
| | | "> |
| | | <el-table-column prop="taxamount" align="center" label="扣税金额" width="120" |
| | | v-if="(ismanager == true) && (businessType == '1' || businessType == '2')"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.taxamount" placeholder="扣税金额" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="taxedamount" align="center" label="税后金额" width="120" v-if="(this.ismanager == true) & |
| | | (form.applytype == '1' || form.applytype == '2') |
| | | "> |
| | | <el-table-column prop="taxedamount" align="center" label="税后金额" width="120" |
| | | v-if="(ismanager == true) && (businessType == '1' || businessType == '2')"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.taxedamount" placeholder="税后金额" @blur="val => { |
| | | calculateTax(scope.row, 'B'); |
| | | } |
| | | " /> |
| | | <el-input v-model="scope.row.taxedamount" placeholder="税后金额" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="beneficiaryname" align="center" :label="beneficiarylabel" width="200"> |
| | | <el-table-column prop="beneficiaryname" column-key="sdad" align="center" :label="beneficiarylabel" |
| | | width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" plain @click="showSelectionDialog(scope, 'account')">{{ |
| | | scope.row.beneficiaryname |
| | | ? scope.row.beneficiaryname |
| | | : "点击选择" |
| | | }}</el-button> |
| | | scope.row.beneficiaryname ? scope.row.beneficiaryname : "点击选择" }}</el-button> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="unitno" align="center" label="专家所在单位" width="250" |
| | | v-if="form.applytype == '1' && form.applytype == '2'"> |
| | | v-if="businessType == '1' || businessType == '2'"> |
| | | <template slot-scope="scope"> |
| | | <el-button type="primary" plain @click="showSelectionDialog(scope, 'workunit')">{{ |
| | | scope.row.unitname ? scope.row.unitname : "点击选择" |
| | |
| | | </el-table-column> |
| | | --> |
| | | <el-table-column prop="title" align="center" label="职称" width="120" |
| | | v-if="form.applytype == '1' || form.applytype == '2'"> |
| | | v-if="businessType == '1' || businessType == '2'"> |
| | | <template slot-scope="scope"> |
| | | <el-input v-model="scope.row.title" placeholder="职称" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="idcardno" align="center" label="身份证号" width="200" |
| | | v-if="form.applytype == '1' || form.applytype == '2'"> |
| | | v-if="businessType == '1' || businessType == '2'"> |
| | | <template slot-scope="scope"> |
| | | <el-form-item :error="scope.row.error" label-width="0"> |
| | | <el-input :disabled="userprofile.nickName != '陈慕华' && businessType == 1 |
| | | <el-form-item label-width="0"> |
| | | <el-input :disabled="userprofile.nickName != '陈慕华' |
| | | " v-model.number="scope.row.idcardno" @input="tableParValueChange1(scope.row)" |
| | | placeholder="身份证号" /> |
| | | </el-form-item> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="depositbank" align="center" label="开户银行" width="200"> |
| | | <template slot-scope="scope"> |
| | | <el-input :disabled="userprofile.nickName != '陈慕华' && businessType == 1 |
| | | " v-model="scope.row.depositbank" placeholder="开户银行" /> |
| | | <el-input :disabled="userprofile.nickName != '陈慕华'" v-model="scope.row.depositbank" placeholder="开户银行" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="bankcardno" align="center" label="银行帐号" width="210"> |
| | | <template slot-scope="scope"> |
| | | <el-input :disabled="userprofile.nickName != '陈慕华' && businessType == 1 |
| | | <el-input :disabled="userprofile.nickName != '陈慕华' |
| | | " v-model="scope.row.bankcardno" placeholder="银行帐号" /> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-input type="textarea" :rows="2" v-model="scope.row.itemdescribe" placeholder="项目说明" /> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="remark" align="center" width="330" label="备注" v-if="businessType == 2 || |
| | | businessType == 3 || |
| | | businessType == 4 || |
| | | ismanager == true |
| | | "> |
| | | <el-table-column prop="remark" align="center" width="330" label="备注" v-show="ismanager == true"> |
| | | <template slot-scope="scope"> |
| | | <el-input type="textarea" :rows="2" v-model="scope.row.remark" placeholder="备注" /> |
| | | </template> |
| | |
| | | </el-button> |
| | | <el-button @click.native.prevent=" |
| | | Filepopup(scope.$index, rbDetails, scope.row) |
| | | " type="text" size="small" v-if="businessType == 3 || businessType == 2 || businessType == 4 |
| | | " type="text" size="small" v-if="businessType == 2 || businessType == 3 || businessType == 4 |
| | | ">票据</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | <el-form ref="accountselectform" :rules="dialogrules" :model="accountselectform" label-width="120px"> |
| | | <el-row v-if="selectionType == 'workunit'"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="单位名称" prop="expertunitno" label-width="120px"> |
| | | <el-select v-model="accountselectform.expertunitno" placeholder="单位名称" clearable filterable allow-create |
| | | <el-form-item label="单位名称" prop="expertunitname" label-width="120px"> |
| | | <el-select v-model="accountselectform.expertunitname" placeholder="单位名称" clearable filterable allow-create |
| | | style="width: 100%"> |
| | | <el-option v-for="(spec, index) in unitList" :key="index" :label="spec.organizationname" |
| | | :value="spec.organizationid"></el-option> |
| | | :value="spec.organizationname"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="accountfrom == '2'"> |
| | | <el-row v-if="selectionType == 'account' && accountfrom == '2'"> |
| | | <el-col :span="16"><el-form-item label="新增类型" prop="usertype"> |
| | | <el-radio-group v-model="accountselectform.usertype" style="margin-bottom: 0"> |
| | | <el-radio-group v-model="accountselectform.usertype" style="margin-bottom: 0" |
| | | @change="userTypeChange(accountselectform.usertype)"> |
| | | <el-radio label="expert">新增专家账号</el-radio> |
| | | <el-radio label="org">新增单位账号</el-radio> |
| | | </el-radio-group> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="accountfrom == '2'"> |
| | | <el-row v-if="selectionType == 'account' && accountfrom == '2'"> |
| | | <el-col :span="24"> |
| | | <el-form-item label="账号名称" prop="username"> |
| | | <el-input v-model="accountselectform.username" placeholder="请输入单位名称或专家姓名" /> </el-form-item> |
| | | <el-input v-model="accountselectform.username" placeholder="请输入单位名称或专家姓名" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="accountfrom == '2' && accountselectform.usertype != 'org'"> |
| | | <el-row v-if="selectionType == 'account' && accountfrom == '2' && accountselectform.usertype != 'org'"> |
| | | <el-col :span="12"> |
| | | <el-form-item label="身份证号" prop="idcardno"> |
| | | <el-input v-model="accountselectform.idcardno" placeholder="请输入身份证号" /> </el-form-item> |
| | | <el-input v-model="accountselectform.idcardno" placeholder="请输入身份证号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <el-form-item label="职称" prop="title"> |
| | | <el-select v-model="accountselectform.title" placeholder="请选择人员职称"> |
| | | <el-option v-for="dict in dict.type.sys_professionaltitle" :key="dict.value" :label="dict.label" |
| | | :value="dict.label"></el-option> </el-select> |
| | | :value="dict.label"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="accountfrom == '2' && accountselectform.usertype != 'org'"> |
| | | <el-row v-if="selectionType == 'account' && accountfrom == '2' && accountselectform.usertype != 'org'"> |
| | | <el-col> |
| | | <el-form-item label="所在单位" prop="unitno"> |
| | | <el-select v-model="accountselectform.unitno" placeholder="单位名称" clearable filterable allow-create |
| | | style="width: 100%"> |
| | | <el-option v-for="(spec, index) in unitList" :key="index" :label="spec.organizationname" |
| | | :value="spec.organizationid"></el-option> |
| | | </el-select> </el-form-item> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="accountfrom == '2'"> |
| | | <el-row v-if="selectionType == 'account' && accountfrom == '2'"> |
| | | <el-col><el-form-item label="开户银行" prop="depositbank"> |
| | | <el-input v-model="accountselectform.depositbank" placeholder="请输入开户银行名称" /> </el-form-item> |
| | | <el-input v-model="accountselectform.depositbank" placeholder="请输入开户银行名称" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col><el-form-item label="银行卡号" prop="bankcardno"> |
| | | <el-input v-model="accountselectform.bankcardno" placeholder="请输入银行卡号" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="accountfrom == '2'"> |
| | | <el-row v-if="selectionType == 'account' && accountfrom == '2'"> |
| | | <el-col> |
| | | <el-form-item label="联系地址" prop="address"> |
| | | <el-input v-model="accountselectform.address" placeholder="请输入联系地址" /> </el-form-item> |
| | | <el-input v-model="accountselectform.address" placeholder="请输入联系地址" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row v-if="accountfrom == '2'"> |
| | | <el-row v-if="selectionType == 'account' && accountfrom == '2'"> |
| | | <el-col> |
| | | <el-form-item label="联系电话" prop="telephone"> |
| | | <el-input v-model="accountselectform.telephone" placeholder="请输入联系电话" /> </el-form-item> |
| | | <el-input v-model="accountselectform.telephone" placeholder="请输入联系电话" /> |
| | | </el-form-item> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | |
| | | </el-table-column> |
| | | <el-table-column prop="quantity" align="center" label="数量" v-if="businessType == 4"> |
| | | </el-table-column> |
| | | <el-table-column prop="amount" align="center" :label="amountLabel"> |
| | | <el-table-column prop="amount" align="center" :label="amountlabel"> |
| | | </el-table-column> |
| | | <el-table-column prop="taxedamount" align="center" label="税后金额" v-if="(this.ismanager == true) & |
| | | (form.applytype == '1' || form.applytype == '2') |
| | |
| | | delExternalperson, |
| | | addExternalperson, |
| | | updateExternalperson, |
| | | exportExternalperson |
| | | exportExternalperson, |
| | | getOnlyCode, |
| | | } from "@/api/project/externalperson"; |
| | | |
| | | import { listItemexpense } from "@/api/project/itemexpense"; |
| | |
| | | selectionScope: "", |
| | | //选择类型:专家(单位)账户、工作单位(account/workunit) |
| | | selectionType: "", |
| | | //受益人标签:专家费-专家(单位)名称,医学成本-办公-单位(个人)名称 |
| | | beneficiarylabel: "", |
| | | //账户选择:1是账户库,2是新增 |
| | | accountfrom: "1", |
| | | //受益人标签:专家费-专家(单位)名称,医学成本-办公-单位(个人)名称 |
| | | beneficiarylabel: "", |
| | | //税前金额标题:专家费-税前金额;医学成本、办公费用-金额 |
| | | amountLabel: "税前金额", |
| | | amountlabel: "税前金额", |
| | | |
| | | // 表单校验 |
| | | rules: { |
| | | // createTime: [ |
| | | // { required: true, message: "请输入填报日期", trigger: "blur" } |
| | | // ], |
| | | reason: [ |
| | | { required: true, message: "请输入出差事由", trigger: "blur" } |
| | | ], |
| | | deptmentname: [ |
| | | { required: true, message: "请输入所属业务组", trigger: "blur" } |
| | | ] |
| | | reason: [{ required: true, message: "请输入出差事由", trigger: "blur" }], |
| | | deptmentname: [{ required: true, message: "请输入所属业务组", trigger: "blur" }] |
| | | }, |
| | | |
| | | dialogrules: { |
| | | // expertidcardno: [{ validator: validatePass, trigger: "blur" }], |
| | | depositbank: [ |
| | | { required: true, message: "请输入开户银行", trigger: "change" } |
| | | ], |
| | | bankcardno: [ |
| | | { required: true, message: "请输入银行卡号", trigger: "change" } |
| | | ], |
| | | unitno: [ |
| | | { required: true, message: "请选择单位名称", trigger: "change" } |
| | | ] |
| | | usertype: [{ required: true, message: "请输入账户类型", trigger: "blur" }], |
| | | username: [{ required: true, message: "请输入账户名称", trigger: "blur" }], |
| | | idcardno: [{ required: true, message: "请输入身份账号", trigger: "blur" }], |
| | | //idcardno: [{ validator: validatePass, trigger: "blur" }], |
| | | depositbank: [{ required: true, message: "请输入开户银行", trigger: "change" }], |
| | | bankcardno: [{ required: true, message: "请输入银行卡号", trigger: "change" }], |
| | | }, |
| | | |
| | | accountselectform: { |
| | | index: null, |
| | | usertype: 'expert', |
| | | usertype: "expert", |
| | | accountname: null, |
| | | accountno: null, |
| | | expertunitname: null, |
| | |
| | | unitno: null, |
| | | personnelunitno: null, |
| | | address: null, |
| | | telephone: null |
| | | telephone: null, |
| | | username: null, |
| | | userno: null |
| | | }, |
| | | |
| | | accountform: { |
| | | searchValue: null, |
| | | id: null, |
| | | userstatus: 1, |
| | | userstatus: 0, |
| | | usertype: null, |
| | | |
| | | pym: null, |
| | |
| | | userno: null, |
| | | username: null, |
| | | usertype: null |
| | | }, |
| | | // 查询最新序号参数 |
| | | seqnoParams: { |
| | | businessType: "externalperson", |
| | | datequery: false, |
| | | }, |
| | | |
| | | //计算个税参数 |
| | |
| | | // if (!this.businessType && !this.operationType) { |
| | | if (this.businessType == "1") { |
| | | this.businessName = "专家劳务费申请单"; |
| | | this.amountLabel = "税前金额"; |
| | | this.amountlabel = "税前金额"; |
| | | this.beneficiarylabel = "专家或单位名称"; |
| | | this.getUnitList(); |
| | | } else if (this.businessType == "2") { |
| | | this.businessName = "伦理专家劳务费申请单"; |
| | | this.amountLabel = "税前金额"; |
| | | this.amountlabel = "税前金额"; |
| | | this.beneficiarylabel = "专家或单位名称"; |
| | | this.getUnitList(); |
| | | } else if (this.businessType == "3") { |
| | | this.businessName = "医学成本报销单"; |
| | | this.amountLabel = "金额"; |
| | | this.amountlabel = "金额"; |
| | | this.beneficiarylabel = "单位名称或个人"; |
| | | this.getUnitList(); |
| | | } else if (this.businessType == "4") { |
| | | this.businessName = "办公费用报销单"; |
| | | this.amountLabel = "金额"; |
| | | this.amountlabel = "金额"; |
| | | this.beneficiarylabel = "单位名称或个人"; |
| | | this.getUnitList(); |
| | | |
| | |
| | | //判断是否存在上报记录 |
| | | this.form.recordstatus = 0; |
| | | var currenttime = new Date(); |
| | | this.form.createTime = currenttime.getFullYear() + "-" + (currenttime.getMonth() + 1) + "-" + currenttime.getDate() + " " + currenttime.getHours() + ":" + currenttime.getMinutes() + ":" + currenttime.getSeconds(); |
| | | this.form.applyTime = |
| | | currenttime.getFullYear() + |
| | | "-" + |
| | | (currenttime.getMonth() + 1) + |
| | | "-" + |
| | | currenttime.getDate() + |
| | | " " + |
| | | currenttime.getHours() + |
| | | ":" + |
| | | currenttime.getMinutes() + |
| | | ":" + |
| | | currenttime.getSeconds(); |
| | | |
| | | if (!this.form.id) { |
| | | this.form.id = this.$route.query.id; |
| | |
| | | // }); |
| | | } else { |
| | | this.form.recordstatus = -1; |
| | | var currenttime = new Date(); |
| | | this.form.applyTime = currenttime.getFullYear() + "-" + (currenttime.getMonth() + 1) + "-" + currenttime.getDate() + " " + currenttime.getHours() + ":" + currenttime.getMinutes() + ":" + currenttime.getSeconds(); |
| | | |
| | | // addorupdateFund(this.form).then((response) => { |
| | | // if (response.code === 200) { |
| | |
| | | // ); |
| | | // return; |
| | | // } |
| | | if ((this.form.applytype == "1") && this.form.fundtaxtime == null) { |
| | | this.$modal.msgError( |
| | | "提交专家费用申请单审核,需要先完成个税计算!" |
| | | ); |
| | | if (this.form.applytype == "1" && this.form.fundtaxtime == null) { |
| | | this.$modal.msgError("提交专家费用申请单审核,需要先完成个税计算!"); |
| | | return; |
| | | } |
| | | } |
| | |
| | | this.form.deptmentno = this.userprofile.dept.deptId; |
| | | this.form.managername = this.userprofile.dept.leader; |
| | | this.form.phone = this.userprofile.phonenumber; |
| | | // this.form.applytype = this.businessType; |
| | | // this.form.createTime = new Date(); |
| | | // this.form.applytype = this.businessType; |
| | | |
| | | if (this.businessType == "4") { |
| | | this.getUserAccount(); |
| | |
| | | getAccountList() { |
| | | listExternalperson().then(res => { |
| | | this.accountlist = res.rows; |
| | | //获取启用的账户列表 |
| | | for (let j = 0; j < res.length; j++) { |
| | | //单位账号列表 |
| | | if (res.userstatus == "1") { |
| | | this.accountlist.push({ |
| | | id: res.id, |
| | | userno: res.userno, |
| | | username: res.username, |
| | | idcardno: res.idcardno, |
| | | title: res.title, |
| | | depositbank: res.depositbank, |
| | | bankcardno: res.bankcardno, |
| | | unitno: res.unitno, |
| | | unitname: res.unitname |
| | | }); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | for (let j = 0; j < this.accountlist.length; j++) { |
| | | //单位账号列表 |
| | |
| | | console.log(row); |
| | | window.location.href = this.Networkheader + "/prod-api" + row.url; |
| | | }, |
| | | |
| | | //专家/医疗机构/费用报销机构选择 |
| | | showSelectionDialog(scope, selectiontype) { |
| | | this.selectionScope = scope; |
| | |
| | | if (this.selectionType == "account") { |
| | | //默认从账户库选择:1,账户库;2,新建账户 |
| | | this.accountfrom = "1"; |
| | | |
| | | this.accountselectform.accountno = scope.row.beneficiaryno; |
| | | this.accountselectform.accountname = scope.row.beneficiaryname; |
| | | this.accountselectform.accountno = scope.row.beneficiaryno; |
| | | this.accountselectform.expertunitname = ""; |
| | | this.accountselectform.expertunitno = ""; |
| | | this.accountselectform.unitno = ""; |
| | | this.accountselectform.unitname = ""; |
| | | this.accountselectform.telephone = ""; |
| | | |
| | | this.accountselectform.username = ''; |
| | | this.accountselectform.userno = ''; |
| | | this.accountselectform.idcardno = ""; |
| | | this.accountselectform.telephone = ""; |
| | | this.accountselectform.title = ""; |
| | | this.accountselectform.unitno = ""; |
| | | this.accountselectform.unitname = ""; |
| | |
| | | if (this.selectionType == "account") { |
| | | if (this.accountfrom == "1") { |
| | | //赋值信息 |
| | | this.accountlist.map(res => { |
| | | if (res.username == this.accountselectform.accountname) { |
| | | this.rbDetails[tempIndex].beneficiaryno = res.userno; |
| | | this.rbDetails[tempIndex].beneficiaryname = res.username; |
| | | this.rbDetails[tempIndex].depositbank = res.depositbank; |
| | | this.rbDetails[tempIndex].branchbankname = res.branchbankname; |
| | | this.rbDetails[tempIndex].bankcardno = res.bankcardno; |
| | | this.rbDetails[tempIndex].phone = res.telephone; |
| | | if (this.rbDetails[tempIndex].beneficiaryname != this.accountselectform.accountname) { |
| | | this.accountlist.map(res => { |
| | | if (res.username == this.accountselectform.accountname) { |
| | | this.rbDetails[tempIndex].beneficiaryno = res.userno; |
| | | this.rbDetails[tempIndex].beneficiaryname = res.username; |
| | | this.rbDetails[tempIndex].depositbank = res.depositbank; |
| | | this.rbDetails[tempIndex].branchbankname = res.branchbankname; |
| | | this.rbDetails[tempIndex].bankcardno = res.bankcardno; |
| | | this.rbDetails[tempIndex].phone = res.telephone; |
| | | |
| | | if (res.usertype == 'org') { |
| | | this.rbDetails[tempIndex].idcardno = ""; |
| | | this.rbDetails[tempIndex].title = ""; |
| | | this.rbDetails[tempIndex].unitno = ""; |
| | | this.rbDetails[tempIndex].unitname = ""; |
| | | } else { |
| | | this.rbDetails[tempIndex].idcardno = res.idcardno; |
| | | this.rbDetails[tempIndex].title = res.title; |
| | | this.rbDetails[tempIndex].unitno = parseInt(res.unitno); |
| | | this.rbDetails[tempIndex].unitname = res.unitname; |
| | | } |
| | | } |
| | | }); |
| | | } else if (this.accountfrom == "2") { |
| | | //保存新增账号 |
| | | this.accountform.id = null; |
| | | this.accountform.userno = this.accountlist[this.accountlist.length - 1].id + 1; |
| | | this.accountform.usertype = this.accountselectform.usertype; |
| | | this.accountform.username = this.accountselectform.username; |
| | | this.accountform.idcardno = this.accountselectform.idcardno; |
| | | this.accountform.sex = null; |
| | | this.accountform.title = this.accountselectform.title; |
| | | this.accountform.telephone = this.accountselectform.telephone; |
| | | this.accountform.address = this.accountselectform.address; |
| | | this.accountform.wbm = null; |
| | | this.accountform.pym = null; |
| | | |
| | | this.accountform.depositbank = this.accountselectform.depositbank; |
| | | this.accountform.bankcardno = this.accountselectform.bankcardno; |
| | | this.accountform.branchbankname = null; |
| | | this.accountform.remark = null; |
| | | this.accountform.del_flag = "0"; |
| | | this.accountform.personnelunitno = null; |
| | | |
| | | if (this.accountselectform.usertype != 'org') { |
| | | this.accountform.unitno = this.accountselectform.unitno; |
| | | this.unitList.map(res => { |
| | | if (res.organizationid == this.accountform.unitno) { |
| | | this.accountform.unitname = res.organizationname; |
| | | if (res.usertype == "org") { |
| | | this.rbDetails[tempIndex].idcardno = ""; |
| | | this.rbDetails[tempIndex].title = ""; |
| | | this.rbDetails[tempIndex].unitno = ""; |
| | | this.rbDetails[tempIndex].unitname = ""; |
| | | } else { |
| | | this.rbDetails[tempIndex].idcardno = res.idcardno; |
| | | this.rbDetails[tempIndex].title = res.title; |
| | | this.rbDetails[tempIndex].unitno = parseInt(res.unitno); |
| | | this.rbDetails[tempIndex].unitname = res.unitname; |
| | | } |
| | | } |
| | | }); |
| | | // try { |
| | | // let unitIndex = this.unitList.findIndex( |
| | | // item => this.accountform.unitno == item.organizationid |
| | | // ); |
| | | // if (unitIndex > -1) { |
| | | // this.accountform.unitname = this.unitList[unitIndex].organizationname; |
| | | // } else { |
| | | // this.accountform.unitname = this.accountform.unitno; |
| | | // } |
| | | // } catch { |
| | | // this.accountform.unitname = this.accountform.unitno; |
| | | // } |
| | | } |
| | | addExternalperson(this.accountform).then(response => { |
| | | if (response.code == 200) { |
| | | //this.$modal.msgSuccess("新的专家或单位账户信息已添加成功!"); |
| | | this.accountselectform.accountno = this.accountselectform.userno; |
| | | this.accountselectform.accountname = this.accountselectform.username; |
| | | } else if (this.accountfrom == "2") { |
| | | //保存新增账号 |
| | | //获取用户编号 |
| | | // this.accountform.userno = this.accountlist[this.accountlist.length - 1].id + 1; |
| | | getOnlyCode(this.seqnoParams).then((res) => { |
| | | this.accountform.userno = res.data.currentvalue; |
| | | this.accountform.id = null; |
| | | |
| | | //重新获取账户列表 |
| | | listExternalperson().then(res => { |
| | | this.accountlist = res.rows; |
| | | this.accountform.usertype = this.accountselectform.usertype; |
| | | this.accountform.username = this.accountselectform.username; |
| | | this.accountform.idcardno = this.accountselectform.idcardno; |
| | | this.accountform.sex = null; |
| | | this.accountform.title = this.accountselectform.title; |
| | | this.accountform.telephone = this.accountselectform.telephone; |
| | | this.accountform.address = this.accountselectform.address; |
| | | this.accountform.wbm = null; |
| | | this.accountform.pym = null; |
| | | |
| | | //赋值信息 |
| | | this.accountlist.map(res => { |
| | | if (res.username == this.accountselectform.accountname) { |
| | | this.rbDetails[tempIndex].beneficiaryno = res.userno; |
| | | this.rbDetails[tempIndex].beneficiaryname = res.username; |
| | | this.rbDetails[tempIndex].depositbank = res.depositbank; |
| | | this.rbDetails[tempIndex].branchbankname = res.branchbankname; |
| | | this.rbDetails[tempIndex].bankcardno = res.bankcardno; |
| | | this.rbDetails[tempIndex].phone = res.telephone; |
| | | this.accountform.depositbank = this.accountselectform.depositbank; |
| | | this.accountform.bankcardno = this.accountselectform.bankcardno; |
| | | this.accountform.branchbankname = null; |
| | | this.accountform.remark = null; |
| | | this.accountform.del_flag = "0"; |
| | | this.accountform.personnelunitno = null; |
| | | |
| | | if (res.usertype == 'org') { |
| | | this.rbDetails[tempIndex].idcardno = ""; |
| | | this.rbDetails[tempIndex].title = ""; |
| | | this.rbDetails[tempIndex].unitno = ""; |
| | | this.rbDetails[tempIndex].unitname = ""; |
| | | } else { |
| | | this.rbDetails[tempIndex].idcardno = res.idcardno; |
| | | this.rbDetails[tempIndex].title = res.title; |
| | | this.rbDetails[tempIndex].unitno = parseInt(res.unitno); |
| | | this.rbDetails[tempIndex].unitname = res.unitname; |
| | | } |
| | | } |
| | | }); |
| | | if (this.accountselectform.usertype != "org") { |
| | | this.accountform.unitno = this.accountselectform.unitno; |
| | | this.unitList.map(res => { |
| | | if (res.organizationid == this.accountform.unitno) { |
| | | this.accountform.unitname = res.organizationname; |
| | | } |
| | | }); |
| | | } |
| | | addExternalperson(this.accountform).then(response => { |
| | | if (response.code == 200) { |
| | | this.$modal.msgSuccess("新账户信息已添加成功,需要在账号状态启用后才能被使用!"); |
| | | |
| | | /** |
| | | this.accountselectform.accountno = this.accountselectform.userno; |
| | | this.accountselectform.accountname = this.accountselectform.username; |
| | | |
| | | //重新获取账户列表 |
| | | listExternalperson().then(res => { |
| | | this.accountlist = res.rows; |
| | | |
| | | //赋值信息 |
| | | this.accountlist.map(res => { |
| | | if (res.username == this.accountselectform.accountname) { |
| | | this.rbDetails[tempIndex].beneficiaryno = res.userno; |
| | | this.rbDetails[tempIndex].beneficiaryname = res.username; |
| | | this.rbDetails[tempIndex].depositbank = res.depositbank; |
| | | this.rbDetails[tempIndex].branchbankname = |
| | | res.branchbankname; |
| | | this.rbDetails[tempIndex].bankcardno = res.bankcardno; |
| | | this.rbDetails[tempIndex].phone = res.telephone; |
| | | |
| | | if (res.usertype == "org") { |
| | | this.rbDetails[tempIndex].idcardno = ""; |
| | | this.rbDetails[tempIndex].title = ""; |
| | | this.rbDetails[tempIndex].unitno = ""; |
| | | this.rbDetails[tempIndex].unitname = ""; |
| | | } else { |
| | | this.rbDetails[tempIndex].idcardno = res.idcardno; |
| | | this.rbDetails[tempIndex].title = res.title; |
| | | this.rbDetails[tempIndex].unitno = parseInt(res.unitno); |
| | | this.rbDetails[tempIndex].unitname = res.unitname; |
| | | } |
| | | } |
| | | }); |
| | | }); |
| | | */ |
| | | } |
| | | }); |
| | | }); |
| | | |
| | | |
| | | } |
| | | } else if (this.selectionType == "workunit") { |
| | | if (this.rbDetails[tempIndex].unitname != this.accountselectform.expertunitname) { |
| | | this.rbDetails[tempIndex].unitname = this.accountselectform.expertunitname; |
| | | this.unitList.map(res => { |
| | | if (res.organizationname == this.accountselectform.expertunitname) { |
| | | this.rbDetails[tempIndex].unitno = res.organizationid; |
| | | } |
| | | }); |
| | | } |
| | | } else if (this.selectionType == "workunit") { |
| | | this.rbDetails[tempIndex].unitno = this.accountselectform.expertunitno; |
| | | this.unitList.map(res => { |
| | | if (res.organizationid == this.accountform.unitno) { |
| | | this.rbDetails[tempIndex].unitno.unitname = res.organizationname; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | //关闭窗口 |
| | |
| | | } else { |
| | | row.error = "身份证号码格式错误"; |
| | | } |
| | | }, |
| | | |
| | | //账户类型选择变化 |
| | | userTypeChange(type) { |
| | | if (type == "org") { |
| | | this.accountselectform.idcardno = ""; |
| | | this.accountselectform.unitno = ""; |
| | | this.accountselectform.unitname = ""; |
| | | this.accountselectform.personnelunitno = ""; |
| | | }; |
| | | // this.$modal.msgWarning(type); |
| | | } |
| | | }, |
| | | |
| | |
| | | this.Getnetworkheader(); |
| | | this.getroute(); |
| | | this.getAccountList(); |
| | | this.getUserProfile(); |
| | | }, |
| | | |
| | | //生命周期 - 挂载完成(可以访问DOM元素) |
| | | mounted() { |
| | | window.addEventListener("beforeunload", e => this.beforeunloadHandler(e)); |
| | | this.getUserList(); |
| | | this.getUserProfile(); |
| | | let apiaccountselectform = this.accountselectform; |
| | | let apiform = this.form; |
| | | }, |