Browse Source

完善车辆外采

master
yunuo970428 3 years ago
parent
commit
cb62980b0f
  1. 11
      anrui-scm/anrui-scm-ui/src/api/cheliang/basevehicle.js
  2. 148
      anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue
  3. 30
      anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationInfo.vue
  4. 25
      anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/chexingbyconfiguration.vue
  5. 30
      anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplication.vue
  6. 128
      anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplicationAdd.vue
  7. 30
      anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplicationInfo.vue
  8. 25
      anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/chexingbyconfiguration.vue

11
anrui-scm/anrui-scm-ui/src/api/cheliang/basevehicle.js

@ -1,5 +1,6 @@
import request from '@/utils/request'
import qs from 'qs'
import {data} from "autoprefixer";
// 条件查询
export function pagerList(data) {
@ -217,3 +218,13 @@ export function pagerListByOrgSidPath(data) {
headers: { 'Content-Type': 'application/json' }
})
}
// 查询供应商
export function selectSupplier(data) {
return request({
url: '/base/v1/basemanufacturer/selectSupplier',
method: 'get',
params: data
})
}

148
anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationAdd.vue

@ -14,22 +14,32 @@
<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="3" class="tleftb">
<el-col :span="2" class="tleftb">
<span>分公司名称</span>
</el-col>
<el-col :span="5">
<el-col :span="4">
<el-form-item>{{ formobj.useOrgName }}</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<el-col :span="2" class="tleftb">
<span><span class="icon">*</span>采购系统</span>
</el-col>
<el-col :span="4">
<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>
<el-col :span="5">
<el-col :span="4">
<el-form-item>{{ formobj.createByName }}</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<el-col :span="2" class="tleftb">
<span>申请日期</span>
</el-col>
<el-col :span="5">
<el-col :span="4">
<el-form-item>{{ formobj.applicationDate }}</el-form-item>
</el-col>
</el-row>
@ -43,10 +53,20 @@
</el-col>
</el-row>-->
<el-row>
<el-col :span="3" class="tleftb">
<span><span class="icon">*</span>品牌</span>
</el-col>
<el-col :span="5">
<el-form-item prop="carBrandName">
<el-select v-model="formobj.carBrandName" filterable placeholder="请选择" @change="carBrandChange">
<el-option v-for="item in carBrand_list" :key="item.sid" :label="item.brandName" :value="item.brandName"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span><span class="icon">*</span>车型</span>
</el-col>
<el-col :span="19">
<el-col :span="11">
<el-form-item>{{ formobj.modelName }}</el-form-item>
</el-col>
<el-col :span="2">
@ -91,7 +111,7 @@
<el-col :span="3" class="tleftb">
<span><span class="icon">*</span>外采供应商</span>
</el-col>
<el-col :span="13">
<el-col :span="5">
<el-form-item prop="purchasingUnitName">
<el-select v-model="formobj.purchasingUnitName" filterable placeholder="请选择" @change="changeWcgys">
<el-option v-for="item in wcgys_list" :key="item.sid" :label="item.manufacturerName" :value="item.manufacturerName"></el-option>
@ -107,6 +127,16 @@
<el-radio v-model="formobj.isBeforePayment" label="0"></el-radio>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span v-show="formobj.isBeforePayment == '0'"><span class="icon">*</span>订金使用规则</span>
</el-col>
<el-col :span="5">
<el-form-item>
<el-select v-show="formobj.isBeforePayment == '0'" v-model="formobj.depositUseRuleValue" filterable placeholder="请选择" @change="depositUseRuleChange">
<el-option v-for="item in depositUseRule_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3" class="tleftb">
@ -147,7 +177,7 @@
<span>剩余车款</span>
</el-col>
<el-col :span="5">
<el-form-item prop="deposit">
<el-form-item>
<span>{{ ShengYuMoney() }}</span>
</el-form-item>
</el-col>
@ -246,18 +276,7 @@
</el-col>
<el-col :span="21">
<el-form-item>
<el-upload
:action="uploadAction"
:data="requestData"
:headers="accessToken"
:accept="filType"
:multiple="false"
:on-success="uploadSuccessHetong"
:limit="1"
:file-list="fileList"
:on-preview='handleDown'
class="upload-demo"
>
<el-upload :action="uploadAction" :data="requestData" :headers="accessToken" :accept="filType" :multiple="false" :on-success="uploadSuccessHetong" :limit="1" :file-list="fileList" :on-preview='handleDown' class="upload-demo">
<el-button size="small" type="primary">合同上传</el-button>
</el-upload>
</el-form-item>
@ -293,7 +312,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 } from '@/api/cheliang/basevehiclemodel'
import { getPathSidByUserSid, brandDown, selectOrgLists, typeValues } from '@/api/cheliang/dictcommons'
export default {
name: 'BaseOutsourcingApplicationAdd',
@ -320,11 +339,15 @@ export default {
uploadAction: process.env.VUE_APP_BASE_API + '/base/file/upload',
filType: '.pdf,.docx,.doc',
fileList: [],
orgDept_list: [],
carBrand_list: [],
depositUseRule_list: [],
wcgys_list: [], //
account_list: [],
formobj: {
remarks: '',
useOrgName: '',
useOrgSid: '',
accountName: '',
depositBankName: '',
bankAccount: '',
@ -362,11 +385,20 @@ export default {
businessSid: '',
taskId: '',
instanceId: '',
modelId: ''
modelId: '',
carBrandName: '',
carBrandSid: '',
purchaseSystemSid: '',
purchaseSystemName: '',
depositUseRuleValue: '',
depositUseRuleKey: '',
vehicleTypeKey: ''
},
rules: {
purchaseSystemName: [{ required: true, message: '采购系统不能为空', trigger: 'change' }], //
purchasingUnitName: [{ required: true, message: '外采供应商不能为空', trigger: 'change' }], //
accountName: [{ required: true, message: '车款账户不能为空', trigger: 'blur' }], //
carBrandName: [{ required: true, message: '品牌不能为空', trigger: 'change' }], //
accountName: [{ required: true, message: '车款账户不能为空', trigger: 'change' }], //
purchasePrice: [{ required: true, message: '采购价格不能为空', trigger: 'blur' }], //
num: [{ required: true, message: '台数不能为空', trigger: 'blur' }], //
deposit: [{ required: true, message: '订金不能为空', trigger: 'blur' }] //
@ -409,13 +441,29 @@ export default {
xhr.send()
},
init() {
typeValues({ type: 'depositUseRule' }).then((res) => {
if (res.success) {
this.depositUseRule_list = res.data
}
})
selectOrgLists({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
if (res.success) {
this.orgDept_list = res.data
}
})
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
if (res.success) {
this.formobj.useOrgSid = res.data
req.fetchOrgBySid(res.data).then((resp) => {
if (resp.success) {
this.formobj.useOrgName = resp.data.name
}
})
brandDown({ useOrg: res.data }).then((resp) => {
if (resp.success) {
this.carBrand_list = resp.data
}
})
req.wcgysNamesDown(res.data).then((response) => {
if (response.success) {
this.wcgys_list = response.data
@ -435,8 +483,12 @@ export default {
this.viewState = 1
},
selectModel() {
if (this.formobj.carBrandName === '') {
this.$message({ showClose: true, type: 'error', message: '请先选择品牌' })
return
}
this.viewState = 2
this.$refs['divconfiguration'].showData(this.formobj.baseOutsourcingApplicationVehicleDtos)
this.$refs['divconfiguration'].showData(this.formobj.baseOutsourcingApplicationVehicleDtos, this.formobj.carBrandSid)
},
selectChexing(info) {
this.viewState = '1'
@ -444,8 +496,9 @@ export default {
this.formobj.modelName = info[0].vehicleAlias //
this.formobj.configName = info[0].configName //
this.formobj.configSid = info[0].configSid // sid
this.formobj.guidedPrice = info[0].guidedPrice//
this.formobj.insideCode = info[0].insideCode//
this.formobj.guidedPrice = info[0].guidedPrice //
this.formobj.insideCode = info[0].insideCode //
this.formobj.vehicleTypeKey = info[0].vehicleTypeKey // Key
},
selectVehicleDialog() {
var objs = this.formobj.baseOutsourcingApplicationVehicleDtos
@ -532,12 +585,27 @@ export default {
this.formobj.expenseName = vdata.expenseName //
this.formobj.totalExpenseAmount = vdata.totalExpenseAmount //
this.formobj.orgSid = vdata.orgSid // sid
this.formobj.carBrandName = vdata.carBrandName
this.formobj.carBrandSid = vdata.carBrandSid
this.formobj.purchaseSystemName = vdata.purchaseSystemName
this.formobj.purchaseSystemSid = vdata.purchaseSystemSid
this.formobj.depositUseRuleValue = vdata.depositUseRuleValue
this.formobj.depositUseRuleKey = vdata.depositUseRuleKey
this.formobj.vehicleTypeKey = vdata.vehicleTypeKey
this.formobj.baseOutsourcingApplicationVehicleDtos = vdata.baseOutsourcingApplicationVehicleVos // sid
}
}).catch(e => {
console.log(e)
})
},
changeOrgDept(value) {
const choosetItem = this.orgDept_list.filter((item) => item.orgDeptName === value)
this.formobj.purchaseSystemSid = choosetItem[0].orgDeptSid
},
carBrandChange(value) {
const choosetItem = this.carBrand_list.filter((item) => item.brandName === value)
this.formobj.carBrandSid = choosetItem[0].sid
},
changeWcgys(value) {
let bb = null
this.wcgys_list.forEach((e) => {
@ -561,6 +629,10 @@ export default {
}
})
},
depositUseRuleChange(value) {
const choosetItem = this.depositUseRule_list.filter((item) => item.dictValue === value)
this.formobj.depositUseRuleKey = choosetItem[0].dictKey
},
changeAccountName(value) {
let bb = null
this.account_list.forEach((e) => {
@ -596,15 +668,20 @@ export default {
saveOrUpdate() {
this.formobj.userSid = window.sessionStorage.getItem('userSid')
this.formobj.orgSid = this.$store.getters.orgSid
if (this.formobj.externalMiningTypeKey == '1') {
if (this.formobj.externalMiningTypeKey === '1') {
this.formobj.externalMiningTypeValue = '直接外采'
} else if (this.formobj.externalMiningTypeKey == '2') {
} else if (this.formobj.externalMiningTypeKey === '2') {
this.formobj.externalMiningTypeValue = '政策外采'
}
if (this.formobj.modelName === '' || this.formobj.modelName === null) {
this.$message({ showClose: true, type: 'error', message: '车型不能为空,请选择车型' })
return
}
console.log((parseInt(this.formobj.deposit) - parseInt(this.formobj.purchasePrice)))
if ((parseInt(this.formobj.deposit) - parseInt(this.formobj.purchasePrice)) > 0 && this.formobj.depositUseRuleKey !== '002') {
this.$message({ showClose: true, type: 'error', message: '因其中订金大于采购单价,订金使用规则请选择均分使用' })
return
}
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true
@ -638,6 +715,11 @@ export default {
this.$message({ showClose: true, type: 'error', message: '车型不能为空,请选择车型' })
return
}
console.log((parseInt(this.formobj.deposit) - parseInt(this.formobj.purchasePrice)))
if ((parseInt(this.formobj.deposit) - parseInt(this.formobj.purchasePrice)) > 0 && this.formobj.depositUseRuleKey !== '002') {
this.$message({ showClose: true, type: 'error', message: '因其中订金大于采购单价,订金使用规则请选择均分使用' })
return
}
//
// this.submitdisabled = true
this.formobj.userSid = window.sessionStorage.getItem('userSid')
@ -681,6 +763,7 @@ export default {
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.formobj.id = ''
this.formobj.useOrgSid = ''
this.formobj.insideCode = ''
this.formobj.accountName = ''
this.formobj.depositBankName = ''
@ -709,6 +792,13 @@ export default {
this.formobj.modelBankAccount = ''
this.formobj.modelAccountName = ''
this.formobj.remarks = ''
this.formobj.carBrandName = ''
this.formobj.carBrandSid = ''
this.formobj.purchaseSystemName = ''
this.formobj.purchaseSystemSid = ''
this.formobj.depositUseRuleValue = ''
this.formobj.depositUseRuleKey = ''
this.formobj.vehicleTypeKey = ''
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}

30
anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/baseoutsourcingapplicationInfo.vue

@ -16,23 +16,31 @@
<el-form ref="form_obj" :model="formobj" label-position="right" class="formadd">
<div class="wlInfo" style="text-align: right;"><span style="font-size:14px;">金额单位</span></div>
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="3" class="tleftb">分公司名称</el-col>
<el-col :span="5">
<el-col :span="2" class="tleftb">分公司名称</el-col>
<el-col :span="4">
<el-form-item>
<span>{{ formobj.useOrgName }}</span></el-form-item>
</el-col>
<el-col :span="3" class="tleftb">申请人姓名</el-col>
<el-col :span="5">
<el-col :span="2" class="tleftb">采购系统</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.purchaseSystemName }}</span></el-form-item>
</el-col>
<el-col :span="2" class="tleftb">申请人姓名</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="3" class="tleftb">申请日期</el-col>
<el-col :span="5">
<el-col :span="2" class="tleftb">申请日期</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.applicationDate }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3" class="tleftb">品牌</el-col>
<el-col :span="5">
<el-form-item><span>{{ formobj.carBrandName }}</span></el-form-item>
</el-col>
<el-col :span="3" class="tleftb">车型名称</el-col>
<el-col :span="21">
<el-col :span="13">
<el-form-item><span>{{ formobj.modelName }}</span></el-form-item>
</el-col>
</el-row>
@ -62,7 +70,7 @@
</el-row>
<el-row>
<el-col :span="3" class="tleftb">外采供应商</el-col>
<el-col :span="13">
<el-col :span="5">
<el-form-item>
<span>{{ formobj.purchasingUnitName }}</span></el-form-item>
</el-col>
@ -70,6 +78,12 @@
<el-col :span="5">
<el-form-item><span>{{ formobj.isBeforePayment === '1' ? '是' : '否' }}</span></el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span v-show="formobj.isBeforePayment == '0'">订金使用规则</span>
</el-col>
<el-col :span="5">
<el-form-item><span v-show="formobj.isBeforePayment == '0'">{{ formobj.depositUseRuleValue }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3" class="tleftb">

25
anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/chexingbyconfiguration.vue

@ -84,6 +84,7 @@ export default {
configName: '',
useOrgSid: '',
vehicleStateValue: '',
carBrandSid: '',
sidList: []
},
total: 1
@ -135,18 +136,12 @@ export default {
},
//
handresetting() {
this.listQuery = {
current: 1,
size: 5,
params: {
vehicleAlias: '',
configName: '',
useOrgSid: '',
vehicleStateValue: '',
sidList: []
},
total: 0
}
this.listQuery.current = 1
this.listQuery.total = 0
this.listQuery.size = 5
this.listQuery.params.vehicleAlias = ''
this.listQuery.params.configName = ''
this.listQuery.params.vehicleStateValue = ''
this.getPathSid()
},
handleSelectionChange(row) {
@ -160,12 +155,13 @@ export default {
configSid: element.configSid,
guidedPrice: element.guidedPrice,
manufactorSettlementPrice: element.manufactorSettlementPrice,
insideCode: element.insideCode
insideCode: element.insideCode,
vehicleTypeKey: element.vehicleTypeKey
})
})
this.sids = aa
},
showData(value) {
showData(value, carBrandSid) {
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
@ -181,6 +177,7 @@ export default {
this.listQuery.current = 1
this.listQuery.total = 0
this.listQuery.size = 5
this.listQuery.params.carBrandSid = carBrandSid
this.getPathSid()
},
//

30
anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplication.vue

@ -18,23 +18,31 @@
<el-form ref="form_obj" :model="formobj" label-position="right" class="formadd">
<div class="wlInfo" style="text-align: right;"><span style="font-size:14px;">金额单位</span></div>
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="3" class="tleftb">分公司名称</el-col>
<el-col :span="5">
<el-col :span="2" class="tleftb">分公司名称</el-col>
<el-col :span="4">
<el-form-item>
<span>{{ formobj.useOrgName }}</span></el-form-item>
</el-col>
<el-col :span="3" class="tleftb">申请人姓名</el-col>
<el-col :span="5">
<el-col :span="2" class="tleftb">采购系统</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.purchaseSystemName }}</span></el-form-item>
</el-col>
<el-col :span="2" class="tleftb">申请人姓名</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="3" class="tleftb">申请日期</el-col>
<el-col :span="5">
<el-col :span="2" class="tleftb">申请日期</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.applicationDate }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3" class="tleftb">品牌</el-col>
<el-col :span="5">
<el-form-item><span>{{ formobj.carBrandName }}</span></el-form-item>
</el-col>
<el-col :span="3" class="tleftb">车型名称</el-col>
<el-col :span="21">
<el-col :span="13">
<el-form-item><span>{{ formobj.modelName }}</span></el-form-item>
</el-col>
</el-row>
@ -64,7 +72,7 @@
</el-row>
<el-row>
<el-col :span="3" class="tleftb">外采供应商</el-col>
<el-col :span="13">
<el-col :span="5">
<el-form-item>
<span>{{ formobj.purchasingUnitName }}</span></el-form-item>
</el-col>
@ -72,6 +80,12 @@
<el-col :span="5">
<el-form-item><span>{{ formobj.isBeforePayment === '1' ? '是' : '否' }}</span></el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span v-show="formobj.isBeforePayment == '0'">订金使用规则</span>
</el-col>
<el-col :span="5">
<el-form-item><span v-show="formobj.isBeforePayment == '0'">{{ formobj.depositUseRuleValue }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3" class="tleftb">

128
anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplicationAdd.vue

@ -14,22 +14,32 @@
<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="3" class="tleftb">
<el-col :span="2" class="tleftb">
<span><span class="icon">*</span>分公司名称</span>
</el-col>
<el-col :span="5">
<el-col :span="4">
<el-form-item>{{ formobj.useOrgName }}</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<el-col :span="2" class="tleftb">
<span><span class="icon">*</span>采购系统</span>
</el-col>
<el-col :span="4">
<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 class="icon">*</span>申请人</span>
</el-col>
<el-col :span="5">
<el-col :span="4">
<el-form-item>{{ formobj.createByName }}</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<el-col :span="2" class="tleftb">
<span><span class="icon">*</span>申请日期</span>
</el-col>
<el-col :span="5">
<el-col :span="4">
<el-form-item>{{ formobj.applicationDate }}</el-form-item>
</el-col>
</el-row>
@ -43,10 +53,20 @@
</el-col>
</el-row>-->
<el-row>
<el-col :span="3" class="tleftb">
<span><span class="icon">*</span>品牌</span>
</el-col>
<el-col :span="5">
<el-form-item prop="carBrandName">
<el-select v-model="formobj.carBrandName" filterable placeholder="请选择" @change="carBrandChange">
<el-option v-for="item in carBrand_list" :key="item.sid" :label="item.brandName" :value="item.brandName"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span><span class="icon">*</span>车型</span>
</el-col>
<el-col :span="19">
<el-col :span="11">
<el-form-item>{{ formobj.modelName }}</el-form-item>
</el-col>
<el-col :span="2">
@ -91,7 +111,7 @@
<el-col :span="3" class="tleftb">
<span><span class="icon">*</span>外采供应商</span>
</el-col>
<el-col :span="13">
<el-col :span="5">
<el-form-item prop="purchasingUnitName">
<el-select v-model="formobj.purchasingUnitName" filterable placeholder="请选择" @change="changeWcgys">
<el-option v-for="item in wcgys_list" :key="item.sid" :label="item.manufacturerName" :value="item.manufacturerName"></el-option>
@ -107,6 +127,16 @@
<el-radio v-model="formobj.isBeforePayment" label="0"></el-radio>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span v-show="formobj.isBeforePayment == '0'"><span class="icon">*</span>订金使用规则</span>
</el-col>
<el-col :span="5">
<el-form-item>
<el-select v-show="formobj.isBeforePayment == '0'" v-model="formobj.depositUseRuleValue" filterable placeholder="请选择" @change="depositUseRuleChange">
<el-option v-for="item in depositUseRule_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"></el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3" class="tleftb">
@ -147,7 +177,7 @@
<span>剩余车款</span>
</el-col>
<el-col :span="5">
<el-form-item prop="deposit">
<el-form-item>
<span>{{ ShengYuMoney() }}</span>
</el-form-item>
</el-col>
@ -293,7 +323,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 } from '@/api/cheliang/basevehiclemodel'
import { getPathSidByUserSid, brandDown, selectOrgLists, typeValues } from '@/api/cheliang/dictcommons'
export default {
name: 'BaseOutsourcingApplicationAdd',
@ -319,11 +349,15 @@ export default {
uploadAction: process.env.VUE_APP_BASE_API + '/base/file/upload',
filType: '.pdf,.docx',
fileList: [],
orgDept_list: [],
carBrand_list: [],
depositUseRule_list: [],
wcgys_list: [],
account_list: [],
formobj: {
remarks: '',
useOrgName: '',
useOrgSid: '',
accountName: '',
isBeforePayment: '',
depositBankName: '',
@ -355,7 +389,14 @@ export default {
taskId: '',
businessSid: '',
instanceId: '',
modelId: ''
modelId: '',
carBrandName: '',
carBrandSid: '',
purchaseSystemSid: '',
purchaseSystemName: '',
depositUseRuleValue: '',
depositUseRuleKey: '',
vehicleTypeKey: ''
},
stopList: { //
businessSid: '',
@ -366,8 +407,10 @@ export default {
},
obj: {},
rules: {
purchaseSystemName: [{ required: true, message: '采购系统不能为空', trigger: 'change' }], //
purchasingUnitName: [{ required: true, message: '外采供应商不能为空', trigger: 'change' }], //
accountName: [{ required: true, message: '车款账户不能为空', trigger: 'blur' }], //
carBrandName: [{ required: true, message: '品牌不能为空', trigger: 'change' }], //
accountName: [{ required: true, message: '车款账户不能为空', trigger: 'change' }], //
purchasePrice: [{ required: true, message: '采购价格不能为空', trigger: 'blur' }], //
num: [{ required: true, message: '台数不能为空', trigger: 'blur' }], //
deposit: [{ required: true, message: '订金不能为空', trigger: 'blur' }] //
@ -406,13 +449,29 @@ export default {
},
methods: {
init() {
typeValues({ type: 'depositUseRule' }).then((res) => {
if (res.success) {
this.depositUseRule_list = res.data
}
})
selectOrgLists({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
if (res.success) {
this.orgDept_list = res.data
}
})
getPathSidByUserSid({ userSid: window.sessionStorage.getItem('userSid') }).then((res) => {
if (res.success) {
this.formobj.useOrgSid = res.data
req.fetchOrgBySid(res.data).then((resp) => {
if (resp.success) {
this.formobj.useOrgName = resp.data.name
}
})
brandDown({ useOrg: res.data }).then((resp) => {
if (resp.success) {
this.carBrand_list = resp.data
}
})
req.wcgysNamesDown(res.data).then((response) => {
if (response.success) {
this.wcgys_list = response.data
@ -462,8 +521,9 @@ export default {
this.formobj.modelName = info[0].vehicleAlias //
this.formobj.configName = info[0].configName //
this.formobj.configSid = info[0].configSid // sid
this.formobj.guidedPrice = info[0].guidedPrice//
this.formobj.insideCode = info[0].insideCode//
this.formobj.guidedPrice = info[0].guidedPrice //
this.formobj.insideCode = info[0].insideCode //
this.formobj.vehicleTypeKey = info[0].vehicleTypeKey // Key
},
handleSubmit() {
// var contract = this.formobj.contract
@ -479,6 +539,10 @@ export default {
this.$message({ showClose: true, type: 'error', message: '车型不能为空,请选择车型' })
return
}
if ((parseInt(this.formobj.deposit) - parseInt(this.formobj.purchasePrice)) > 0 && this.formobj.depositUseRuleKey !== '002') {
this.$message({ showClose: true, type: 'error', message: '因其中订金大于采购单价,订金使用规则请选择均分使用' })
return
}
//
this.submitdisabled = true
this.formobj.userSid = window.sessionStorage.getItem('userSid')
@ -508,8 +572,12 @@ export default {
this.viewState = 1
},
selectModel() {
if (this.formobj.carBrandName === '') {
this.$message({ showClose: true, type: 'error', message: '请先选择品牌' })
return
}
this.viewState = 2
this.$refs['divconfiguration'].showData(this.formobj.baseOutsourcingApplicationVehicleDtos)
this.$refs['divconfiguration'].showData(this.formobj.baseOutsourcingApplicationVehicleDtos, this.formobj.carBrandSid)
},
selectVehicleDialog() {
var objs = this.formobj.baseOutsourcingApplicationVehicleDtos
@ -547,6 +615,13 @@ export default {
this.expenseName = '' //
this.totalExpenseAmount = '' // this.$store.getters.userInfo.orgSid,
this.orgSid = ''
this.formobj.carBrandName = ''
this.formobj.carBrandSid = ''
this.formobj.purchaseSystemName = ''
this.formobj.purchaseSystemSid = ''
this.formobj.depositUseRuleValue = ''
this.formobj.depositUseRuleKey = ''
this.formobj.vehicleTypeKey = ''
window.parent.postMessage({
cmd: 'returnHeight',
params: {
@ -606,6 +681,13 @@ export default {
this.formobj.totalExpenseAmount = vdata.totalExpenseAmount //
this.formobj.orgSid = vdata.orgSid // sid
this.formobj.useOrgSid = vdata.useOrgSid
this.formobj.carBrandName = vdata.carBrandName
this.formobj.carBrandSid = vdata.carBrandSid
this.formobj.purchaseSystemName = vdata.purchaseSystemName
this.formobj.purchaseSystemSid = vdata.purchaseSystemSid
this.formobj.depositUseRuleValue = vdata.depositUseRuleValue
this.formobj.depositUseRuleKey = vdata.depositUseRuleKey
this.formobj.vehicleTypeKey = vdata.vehicleTypeKey
this.formobj.baseOutsourcingApplicationVehicleDtos = vdata.baseOutsourcingApplicationVehicleVos // sid
} else {
// resp.code
@ -614,6 +696,14 @@ export default {
this.formobj = {}
})
},
changeOrgDept(value) {
const choosetItem = this.orgDept_list.filter((item) => item.orgDeptName === value)
this.formobj.purchaseSystemSid = choosetItem[0].orgDeptSid
},
carBrandChange(value) {
const choosetItem = this.carBrand_list.filter((item) => item.brandName === value)
this.formobj.carBrandSid = choosetItem[0].sid
},
changeWcgys(value) {
let bb = null
this.wcgys_list.forEach((e) => {
@ -637,6 +727,10 @@ export default {
}
})
},
depositUseRuleChange(value) {
const choosetItem = this.depositUseRule_list.filter((item) => item.dictValue === value)
this.formobj.depositUseRuleKey = choosetItem[0].dictKey
},
changeAccountName(value) {
let bb = null
this.account_list.forEach((e) => {
@ -676,6 +770,10 @@ export default {
this.$message({ showClose: true, type: 'error', message: '车型不能为空,请选择车型' })
return
}
if ((parseInt(this.formobj.deposit) - parseInt(this.formobj.purchasePrice)) > 0 && this.formobj.depositUseRuleKey !== '002') {
this.$message({ showClose: true, type: 'error', message: '因其中订金大于采购单价,订金使用规则请选择均分使用' })
return
}
this.$refs['form_obj'].validate(valid => {
if (valid) {
this.submitdisabled = true

30
anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/baseoutsourcingapplicationInfo.vue

@ -11,23 +11,31 @@
<el-form ref="form_obj" :model="formobj" label-position="right" class="formadd">
<div style="text-align: right;"><span style="font-size:14px;">金额单位</span></div>
<el-row style="border-top: 1px solid #e0e3eb">
<el-col :span="3" class="tleftb">分公司名称</el-col>
<el-col :span="5">
<el-col :span="2" class="tleftb">分公司名称</el-col>
<el-col :span="4">
<el-form-item>
<span>{{ formobj.useOrgName }}</span></el-form-item>
</el-col>
<el-col :span="3" class="tleftb">申请人姓名</el-col>
<el-col :span="5">
<el-col :span="2" class="tleftb">采购系统</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.purchaseSystemName }}</span></el-form-item>
</el-col>
<el-col :span="2" class="tleftb">申请人姓名</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.createByName }}</span></el-form-item>
</el-col>
<el-col :span="3" class="tleftb">申请日期</el-col>
<el-col :span="5">
<el-col :span="2" class="tleftb">申请日期</el-col>
<el-col :span="4">
<el-form-item><span>{{ formobj.applicationDate }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3" class="tleftb">品牌</el-col>
<el-col :span="5">
<el-form-item><span>{{ formobj.carBrandName }}</span></el-form-item>
</el-col>
<el-col :span="3" class="tleftb">车型名称</el-col>
<el-col :span="21">
<el-col :span="13">
<el-form-item><span>{{ formobj.modelName }}</span></el-form-item>
</el-col>
</el-row>
@ -57,7 +65,7 @@
</el-row>
<el-row>
<el-col :span="3" class="tleftb">外采供应商</el-col>
<el-col :span="13">
<el-col :span="5">
<el-form-item>
<span>{{ formobj.purchasingUnitName }}</span></el-form-item>
</el-col>
@ -65,6 +73,12 @@
<el-col :span="5">
<el-form-item><span>{{ formobj.isBeforePayment === '1' ? '是' : '否' }}</span></el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span v-show="formobj.isBeforePayment == '0'">订金使用规则</span>
</el-col>
<el-col :span="5">
<el-form-item><span v-show="formobj.isBeforePayment == '0'">{{ formobj.depositUseRuleValue }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3" class="tleftb">

25
anrui-scm/anrui-scm-ui/src/views/baseoutsourcingapplication/workflow/chexingbyconfiguration.vue

@ -84,6 +84,7 @@ export default {
configName: '',
useOrgSid: '',
vehicleStateValue: '',
carBrandSid: '',
sidList: []
},
total: 0
@ -135,18 +136,12 @@ export default {
},
//
handresetting() {
this.listQuery = {
current: 1,
size: 5,
params: {
vehicleAlias: '',
configName: '',
useOrgSid: '',
vehicleStateValue: '',
sidList: []
},
total: 1
}
this.listQuery.current = 1
this.listQuery.total = 0
this.listQuery.size = 5
this.listQuery.params.vehicleAlias = ''
this.listQuery.params.configName = ''
this.listQuery.params.vehicleStateValue = ''
this.getPathSid()
},
handleSelectionChange(row) {
@ -160,12 +155,13 @@ export default {
configSid: element.configSid,
guidedPrice: element.guidedPrice,
manufactorSettlementPrice: element.manufactorSettlementPrice,
insideCode: element.insideCode
insideCode: element.insideCode,
vehicleTypeKey: element.vehicleTypeKey
})
})
this.sids = aa
},
showData(value) {
showData(value, carBrandSid) {
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
@ -181,6 +177,7 @@ export default {
this.listQuery.current = 1
this.listQuery.total = 0
this.listQuery.size = 5
this.listQuery.params.carBrandSid = carBrandSid
this.getPathSid()
},
//

Loading…
Cancel
Save