|
|
@ -28,8 +28,8 @@ |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="span-sty">品牌</div> |
|
|
|
<el-form-item> |
|
|
|
<div class="span-sty"><span class="icon">*</span>品牌</div> |
|
|
|
<el-form-item prop="carBrandName"> |
|
|
|
<el-select class="addinputInfo" v-model="formobj.carBrandName" filterable placeholder="请选择" @change="changeCarBrand" clearable> |
|
|
|
<el-option v-for="item in carBrand_list" :key="item.sid" :label="item.brandName" :value="item.brandName"/> |
|
|
|
</el-select> |
|
|
@ -53,7 +53,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="6"> |
|
|
|
<div class="span-sty"><span class="icon">*</span>是否涉及车辆</div> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item prop="isVeh"> |
|
|
|
<el-radio-group class="addinputInfo" v-model="formobj.isVeh"> |
|
|
|
<el-radio label="1">是</el-radio> |
|
|
|
<el-radio label="0">否</el-radio> |
|
|
@ -63,8 +63,8 @@ |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty">付款单位</div> |
|
|
|
<el-form-item> |
|
|
|
<div class="span-sty"><span class="icon">*</span>付款单位</div> |
|
|
|
<el-form-item prop="payCompany"> |
|
|
|
<el-select class="addinputInfo" v-model="formobj.payCompany" filterable placeholder="请选择" @change="changePayCompany" clearable> |
|
|
|
<el-option v-for="item in payCompany_list" :key="item.companyInvoicingSid" :label="item.companyInvoicingName" :value="item.companyInvoicingName"/> |
|
|
|
</el-select> |
|
|
@ -78,7 +78,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<div class="span-sty"><span class="icon">*</span>是否事业部领导审批</div> |
|
|
|
<el-form-item> |
|
|
|
<el-form-item prop="isLeaderSp"> |
|
|
|
<el-radio-group class="addinputInfo" v-model="formobj.isLeaderSp"> |
|
|
|
<el-radio label="1">是</el-radio> |
|
|
|
<el-radio label="0">否</el-radio> |
|
|
@ -95,7 +95,7 @@ |
|
|
|
<el-table-column fixed label="操作" width="180" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button size="mini" type="danger" @click="handleDelete(scope.$index)">删除</el-button> |
|
|
|
<el-button size="mini" type="primary" @click="handleAddPayment(scope.row, scope.$index)">新增付款信息</el-button> |
|
|
|
<el-button size="mini" type="primary" @click="handleAddPayment(scope.row, scope.$index)">新增关联付款</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="款项名称" align="center" width="200"> |
|
|
@ -253,7 +253,7 @@ |
|
|
|
|
|
|
|
<script> |
|
|
|
import req from '@/api/anruifinmanagement/payment' |
|
|
|
import { typeValues, getOrgSidByPath, getInvoicingList, brandDown, selectNameByOrg } from '@/api/jichuxinxi/dictcommons' |
|
|
|
import { typeValues, getOrgSidByPath, getInvoicingList, brandDown, selectNameByOrg, getTypeValueList } from '@/api/jichuxinxi/dictcommons' |
|
|
|
import vehcile from './relation/vehcile' |
|
|
|
import paymentInformationAdd from './relation/paymentInformationAdd' |
|
|
|
import paymentInformationInfo from './relation/paymentInformationInfo' |
|
|
@ -313,7 +313,12 @@ export default { |
|
|
|
detailsList: [], |
|
|
|
vehicleList: [] |
|
|
|
}, |
|
|
|
rules: {}, |
|
|
|
rules: { |
|
|
|
carBrandName: [{ required: true, message: '品牌不能为空', trigger: 'change' }], |
|
|
|
isVeh: [{ required: true, message: '是否涉及车辆不能为空', trigger: 'change' }], |
|
|
|
payCompany: [{ required: true, message: '付款单位不能为空', trigger: 'change' }], |
|
|
|
isLeaderSp: [{ required: true, message: '是否事业部领导审批不能为空', trigger: 'change' }] |
|
|
|
}, |
|
|
|
paymentVisible: false, // 付款明细表 -- 新增付款信息弹框 |
|
|
|
paymentBtn: false, // 付款明细表 -- 新增付款信息弹框 -- 页面按钮是否显示隐藏 |
|
|
|
paymentInformation: { // 关联付款信息列表 |
|
|
@ -353,7 +358,7 @@ export default { |
|
|
|
this.costType_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
typeValues({ type: 'payCostTitle' }).then((res) => { |
|
|
|
getTypeValueList({ type: 'payCostType', groupNum: '001' }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.costTitle_list = res.data |
|
|
|
} |
|
|
@ -640,6 +645,19 @@ export default { |
|
|
|
} |
|
|
|
}, |
|
|
|
saveOrUpdate() { |
|
|
|
if (this.formobj.costTypeKey === '001' && this.formobj.isVeh === '1') { |
|
|
|
if (this.formobj.vehicleList.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表不能为空' }) |
|
|
|
return |
|
|
|
} else { |
|
|
|
for (var i = 0; i < this.formobj.vehicleList.length; i++) { |
|
|
|
if (this.formobj.vehicleList[i].isSettle === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表中是否申请买断不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
@ -647,6 +665,8 @@ export default { |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: resp.msg }) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.submitdisabled = false |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
@ -657,9 +677,18 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
submitVehicleApply() { |
|
|
|
if (this.formobj.isVeh === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '是否涉及车辆请选择是或否' }) |
|
|
|
return |
|
|
|
if (this.formobj.costTypeKey === '001' && this.formobj.isVeh === '1') { |
|
|
|
if (this.formobj.vehicleList.length === 0) { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表不能为空' }) |
|
|
|
return |
|
|
|
} else { |
|
|
|
for (var i = 0; i < this.formobj.vehicleList.length; i++) { |
|
|
|
if (this.formobj.vehicleList[i].isSettle === '') { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '车辆列表中是否申请买断不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
@ -668,6 +697,8 @@ export default { |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: resp.msg }) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
this.submitdisabled = false |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
|