|
|
@ -14,33 +14,57 @@ |
|
|
|
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="right" class="formadd"> |
|
|
|
<div class="wlInfo" style="text-align: right;"><span style="font-size:14px;">金额单位:元</span></div> |
|
|
|
<el-row class="first_row"> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span>分公司名称</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item>{{ formobj.useOrgName }}</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
|
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span>申请人</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item>{{ formobj.createByName }}</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span>申请日期</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item>{{ formobj.applicationDate }}</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>采购系统</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item prop="purchaseSystemName"> |
|
|
|
<el-select v-model="formobj.purchaseSystemName" placeholder="请选择" @change="changeOrgDept" clearable> |
|
|
|
<el-option v-for="item in orgDept_list" :key="item.orgDeptSid" :label="item.orgDeptName" :value="item.orgDeptName"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<span>申请人</span> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>是否销售部审批</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item>{{ formobj.createByName }}</el-form-item> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item prop="isSaleOrgApproval"> |
|
|
|
<el-radio-group v-model="formobj.isSaleOrgApproval"> |
|
|
|
<el-radio label="1">是</el-radio> |
|
|
|
<el-radio label="0">否</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2" class="tleftb"> |
|
|
|
<span>申请日期</span> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span v-show="formobj.isSaleOrgApproval === '1'">销售经理</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4"> |
|
|
|
<el-form-item>{{ formobj.applicationDate }}</el-form-item> |
|
|
|
<el-col :span="5"> |
|
|
|
<el-form-item v-show="formobj.isSaleOrgApproval === '1'"> |
|
|
|
<el-select v-model="formobj.approvalName" placeholder="请选择" @change="changeUser" class="addinputw"> |
|
|
|
<el-option v-for="item in user_list" :key="item.sid" :label="item.name" :value="item.name"></el-option> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<!-- <el-row> |
|
|
@ -312,7 +336,7 @@ import modellibrary from '@/views/baseoutsourcingapplication/relation/modellibra |
|
|
|
import req from '@/api/baseoutsourcingapplication/baseoutsourcingapplication' |
|
|
|
import configuration from './chexingbyconfiguration' |
|
|
|
import { getStorage } from '@/utils/auth' |
|
|
|
import { getPathSidByUserSid, brandDown, selectOrgLists, typeValues } from '@/api/cheliang/dictcommons' |
|
|
|
import { getPathSidByUserSid, brandDown, selectOrgLists, typeValues, selectSysUserList } from '@/api/cheliang/dictcommons' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'BaseOutsourcingApplicationAdd', |
|
|
@ -339,6 +363,7 @@ export default { |
|
|
|
uploadAction: process.env.VUE_APP_BASE_API + '/base/file/upload', |
|
|
|
filType: '.pdf,.docx,.doc', |
|
|
|
fileList: [], |
|
|
|
user_list: [], |
|
|
|
orgDept_list: [], |
|
|
|
carBrand_list: [], |
|
|
|
depositUseRule_list: [], |
|
|
@ -392,13 +417,17 @@ export default { |
|
|
|
purchaseSystemName: '', |
|
|
|
depositUseRuleValue: '', |
|
|
|
depositUseRuleKey: '', |
|
|
|
vehicleTypeKey: '' |
|
|
|
vehicleTypeKey: '', |
|
|
|
isSaleOrgApproval: '', |
|
|
|
approvalName: '', |
|
|
|
approvalSid: '' |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
purchaseSystemName: [{ required: true, message: '采购系统不能为空', trigger: 'change' }], // 采购系统名称 |
|
|
|
purchasingUnitName: [{ required: true, message: '外采供应商不能为空', trigger: 'change' }], // 采购单位名称 |
|
|
|
carBrandName: [{ required: true, message: '品牌不能为空', trigger: 'change' }], // 品牌名称 |
|
|
|
accountName: [{ required: true, message: '车款账户不能为空', trigger: 'change' }], // 车款账户 |
|
|
|
isSaleOrgApproval: [{ required: true, message: '是否销售部审批不能为空', trigger: 'change' }], // 是否销售部审批 |
|
|
|
purchasePrice: [{ required: true, message: '采购价格不能为空', trigger: 'blur' }], // 采购价格 |
|
|
|
num: [{ required: true, message: '台数不能为空', trigger: 'blur' }], // 台数 |
|
|
|
deposit: [{ required: true, message: '订金不能为空', trigger: 'blur' }] // 订金 |
|
|
@ -451,6 +480,11 @@ export default { |
|
|
|
this.orgDept_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
selectSysUserList({ userSid: window.sessionStorage.getItem('userSid') }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.user_list = resp.data |
|
|
|
} |
|
|
|
}) |
|
|
|
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => { |
|
|
|
if (res.success) { |
|
|
|
this.formobj.useOrgSid = res.data |
|
|
@ -592,6 +626,9 @@ export default { |
|
|
|
this.formobj.depositUseRuleValue = vdata.depositUseRuleValue |
|
|
|
this.formobj.depositUseRuleKey = vdata.depositUseRuleKey |
|
|
|
this.formobj.vehicleTypeKey = vdata.vehicleTypeKey |
|
|
|
this.formobj.isSaleOrgApproval = vdata.isSaleOrgApproval |
|
|
|
this.formobj.approvalName = vdata.approvalName |
|
|
|
this.formobj.approvalSid = vdata.approvalSid |
|
|
|
this.formobj.baseOutsourcingApplicationVehicleDtos = vdata.baseOutsourcingApplicationVehicleVos // 部门sid |
|
|
|
} |
|
|
|
}).catch(e => { |
|
|
@ -629,6 +666,10 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
changeUser(value) { |
|
|
|
const choosetItem = this.user_list.filter((item) => item.name === value) |
|
|
|
this.formobj.approvalSid = choosetItem[0].sid |
|
|
|
}, |
|
|
|
depositUseRuleChange(value) { |
|
|
|
const choosetItem = this.depositUseRule_list.filter((item) => item.dictValue === value) |
|
|
|
this.formobj.depositUseRuleKey = choosetItem[0].dictKey |
|
|
@ -690,12 +731,9 @@ export default { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
|
req.saveOrUpdate(this.formobj).then(resp => { |
|
|
|
this.submitdisabled = false |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: resp.msg }) |
|
|
|
this.handleReturn('true') |
|
|
|
} else { |
|
|
|
// 根据resp.code进行异常情况处理 |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
@ -729,14 +767,13 @@ export default { |
|
|
|
return |
|
|
|
} |
|
|
|
// 提交的代码 |
|
|
|
// this.submitdisabled = true |
|
|
|
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
this.formobj.orgSid = this.$store.getters.orgSid |
|
|
|
// 查验下一环节要用到,流程定义的id |
|
|
|
this.$refs['form_obj'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
|
req.doSubmit(this.formobj).then(resp => { |
|
|
|
this.submitdisabled = false |
|
|
|
if (resp.success) { |
|
|
|
// 加提交后的逻辑 |
|
|
|
this.$message({ showClose: true, type: 'success', message: resp.msg }) |
|
|
@ -777,6 +814,9 @@ export default { |
|
|
|
this.formobj.depositBankName = '' |
|
|
|
this.formobj.bankAccount = '' |
|
|
|
this.formobj.sid = '' // SID |
|
|
|
this.formobj.businessSid = '' |
|
|
|
this.formobj.instanceId = '' |
|
|
|
this.formobj.taskId = '' |
|
|
|
this.formobj.applicationCode = '' // 申请编号 |
|
|
|
this.formobj.createByName = '' // 申请人姓名 |
|
|
|
this.formobj.applicationDate = '' // 申请日期 |
|
|
@ -807,6 +847,10 @@ export default { |
|
|
|
this.formobj.depositUseRuleValue = '' |
|
|
|
this.formobj.depositUseRuleKey = '' |
|
|
|
this.formobj.vehicleTypeKey = '' |
|
|
|
this.formobj.isSaleOrgApproval = '' |
|
|
|
this.formobj.approvalName = '' |
|
|
|
this.formobj.approvalSid = '' |
|
|
|
this.submitdisabled = false |
|
|
|
this.$refs['form_obj'].resetFields() |
|
|
|
this.$emit('doback') |
|
|
|
} |
|
|
|