|
|
@ -1,5 +1,5 @@ |
|
|
|
<template> |
|
|
|
<div> |
|
|
|
<div class="app-container"> |
|
|
|
<div v-show="viewState == 1"> |
|
|
|
<!-- 标题按钮部分开始 --> |
|
|
|
<div class="tab-header webtop"> |
|
|
@ -54,7 +54,7 @@ |
|
|
|
<span><span class="icon">*</span>采购单位</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="21" class="trightb"> |
|
|
|
<el-form-item prop="purchasingUnitName"><el-input size="small" v-model="formobj.purchasingUnitName" placeholder="采购单位" class="addinputw" clearable /></el-form-item> |
|
|
|
<el-form-item prop="purchasingUnitName"><el-input v-model="formobj.purchasingUnitName" placeholder="采购单位" class="addinputw" clearable /></el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row>--> |
|
|
|
<el-row> |
|
|
@ -65,8 +65,10 @@ |
|
|
|
<el-form-item prop="modelName">{{ formobj.modelName }}</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="2" class="trightb"> |
|
|
|
<el-form-item> |
|
|
|
<!--<button type="primary" size="small" @click="saveOrUpdate">选择</button>--> |
|
|
|
<el-button type="primary" size="small" @click="selectModel">选择</el-button> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
@ -78,39 +80,55 @@ |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<!-- <el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>采购价格</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="9" class="trightb"> |
|
|
|
<el-form-item prop="purchasePrice"><el-input size="small" v-model="formobj.purchasePrice" placeholder="采购价格" class="addinputw" clearable /></el-form-item> |
|
|
|
</el-col>--> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>销售指导价</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="7" class="trightb"> |
|
|
|
<el-col :span="5" class="trightb"> |
|
|
|
<el-form-item v-show="formobj.externalMiningTypeKey==1" prop="guidedPrice">{{ formobj.guidedPrice }} |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-show="formobj.externalMiningTypeKey==2" prop="guidedPrice">{{ formobj.guidedPrice }} |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span>内部编码</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5" class="trightb"> |
|
|
|
<el-form-item prop=""> |
|
|
|
<span>{{ formobj.insideCode }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>厂家合同价</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="trightb"> |
|
|
|
<el-form-item v-show="formobj.externalMiningTypeKey==1" prop="manufactorSettlementPrice"> |
|
|
|
{{ formobj.manufactorSettlementPrice }} |
|
|
|
<el-col :span="5" class="trightb"> |
|
|
|
<el-form-item prop="manufactorSettlementPrice"> |
|
|
|
<el-input v-model="formobj.manufactorSettlementPrice" class="addinputw" clearable></el-input> |
|
|
|
</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="5" class="trightb"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formobj.modelAccountName" placeholder="" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-show="formobj.externalMiningTypeKey==2" prop="manufactorSettlementPrice"> |
|
|
|
{{ formobj.manufactorSettlementPrice }} |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>订金开户银行</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="5" class="trightb"> |
|
|
|
<el-form-item prop="modelBankName"> |
|
|
|
<el-input v-model="formobj.modelBankName" placeholder="" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span>内部编码</span> |
|
|
|
<span><span class="icon">*</span>订金银行账号</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="trightb"> |
|
|
|
<el-form-item prop=""> |
|
|
|
<el-input size="small" v-model="formobj.insideCode" placeholder="内部编码" class="addinputw" |
|
|
|
clearable/> |
|
|
|
<el-col :span="5" class="trightb"> |
|
|
|
<el-form-item prop="modelBankAccount"> |
|
|
|
<el-input v-model="formobj.modelBankAccount" placeholder="" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -118,81 +136,79 @@ |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>采购单位</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="7" class="trightb"> |
|
|
|
<el-col :span="5" class="trightb"> |
|
|
|
<el-form-item prop="purchasingUnitName"> |
|
|
|
<el-input size="small" v-model="formobj.purchasingUnitName" placeholder="采购单位" class="addinputw" |
|
|
|
clearable/> |
|
|
|
<el-input v-model="formobj.purchasingUnitName" placeholder="采购单位" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>开户银行</span> |
|
|
|
<span><span class="icon">*</span>车款开户银行</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="trightb"> |
|
|
|
<el-col :span="5" class="trightb"> |
|
|
|
<el-form-item prop="depositBankName"> |
|
|
|
<el-input size="small" v-model="formobj.depositBankName" placeholder="开户银行" class="addinputw" |
|
|
|
clearable/> |
|
|
|
<el-input v-model="formobj.depositBankName" placeholder="开户银行" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>银行账号</span> |
|
|
|
<span><span class="icon">*</span>车款银行账号</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="trightb"> |
|
|
|
<el-col :span="5" class="trightb"> |
|
|
|
<el-form-item prop="bankAccount"> |
|
|
|
<el-input size="small" v-model="formobj.bankAccount" placeholder="银行账号" class="addinputw" clearable/> |
|
|
|
<el-input v-model="formobj.bankAccount" placeholder="银行账号" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<!-- <el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>台数</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="9" class="trightb"> |
|
|
|
<el-form-item v-show="formobj.externalMiningTypeKey==1" prop="num"><el-input size="small" v-model="formobj.num" placeholder="台数" class="addinputw" clearable /></el-form-item> |
|
|
|
<el-form-item v-show="formobj.externalMiningTypeKey==2" prop="num">{{formobj.num}}</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="7" class="trightb"> |
|
|
|
<el-col :span="5" class="trightb"> |
|
|
|
<el-form-item prop="purchasePrice"> |
|
|
|
<el-input size="small" v-model="formobj.purchasePrice" placeholder="采购价格" class="addinputw" clearable/> |
|
|
|
<el-input v-model="formobj.purchasePrice" placeholder="采购价格" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>台数</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="trightb"> |
|
|
|
<el-col :span="5" class="trightb"> |
|
|
|
<el-form-item v-show="formobj.externalMiningTypeKey==1" prop="num"> |
|
|
|
<el-input size="small" v-model="formobj.num" placeholder="台数" class="addinputw" clearable/> |
|
|
|
<el-input v-model="formobj.num" placeholder="台数" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item v-show="formobj.externalMiningTypeKey==2" prop="num">{{ formobj.num }}</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span><span class="icon">*</span>订金</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="4" class="trightb"> |
|
|
|
<el-col :span="5" class="trightb"> |
|
|
|
<el-form-item prop="deposit"> |
|
|
|
<el-input size="small" style="height:10px;" v-model="formobj.deposit" placeholder="订金" class="addinputw" |
|
|
|
clearable/> |
|
|
|
<el-input style="height:10px;" v-model="formobj.deposit" placeholder="订金" class="addinputw" clearable/> |
|
|
|
</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="5" class="trightb"> |
|
|
|
<el-form-item prop="isBeforePayment"> |
|
|
|
<el-radio v-model="formobj.isBeforePayment" label="0">否</el-radio> |
|
|
|
<el-radio v-model="formobj.isBeforePayment" label="1">是</el-radio> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span>其他费用名称</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="7" class="trightb"> |
|
|
|
<el-col :span="5" class="trightb"> |
|
|
|
<el-form-item prop="expenseName"> |
|
|
|
<el-input size="small" v-model="formobj.expenseName" placeholder="费用名称" class="addinputw" clearable/> |
|
|
|
<el-input v-model="formobj.expenseName" placeholder="费用名称" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="3" class="tleftb"> |
|
|
|
<span>费用合计</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="11" class="trightb"> |
|
|
|
<el-col :span="5" class="trightb"> |
|
|
|
<el-form-item prop="totalExpenseAmount"> |
|
|
|
<el-input size="small" v-model="formobj.totalExpenseAmount" placeholder="费用金额合计" class="addinputw" |
|
|
|
clearable/> |
|
|
|
<el-input v-model="formobj.totalExpenseAmount" placeholder="费用金额合计" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -202,7 +218,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="21" class="trightb"> |
|
|
|
<el-form-item prop="remarks"> |
|
|
|
<el-input size="small" v-model="formobj.remarks" placeholder="备注" class="addinputw" clearable/> |
|
|
|
<el-input v-model="formobj.remarks" placeholder="备注" class="addinputw" clearable/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -260,6 +276,7 @@ |
|
|
|
<el-button type="primary" @click="queding(this)">确 定</el-button> |
|
|
|
</span> |
|
|
|
</el-dialog>--> |
|
|
|
<configuration v-show="viewState == 1.2" ref="divconfiguration" @backData="selectChexing" @doback="closePage"/> |
|
|
|
<!-- 车型配置分页列表 --> |
|
|
|
<el-dialog |
|
|
|
title="车辆列表" |
|
|
@ -280,8 +297,8 @@ |
|
|
|
import modellibrary from '@/views/baseoutsourcingapplication/relation/modellibrary' |
|
|
|
import req from '@/api/baseoutsourcingapplication/baseoutsourcingapplication' |
|
|
|
import vehicle from '@/views/baseoutsourcingapplication/baseoutsourcingapplicationvehicle.vue' |
|
|
|
import configuration from "@/views/baseoutsourcingapplication/chexingbyconfiguration"; |
|
|
|
import {getStorage} from "@/utils/auth"; |
|
|
|
import configuration from '@/views/baseoutsourcingapplication/chexingbyconfiguration' |
|
|
|
import { getStorage } from '@/utils/auth' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'BaseOutsourcingApplicationAdd', |
|
|
@ -307,10 +324,10 @@ export default { |
|
|
|
filType: '.pdf,.docx', |
|
|
|
fileList: [], |
|
|
|
formobj: { |
|
|
|
remarks : "", |
|
|
|
useOrgName : "", |
|
|
|
depositBankName : "", |
|
|
|
bankAccount : "", |
|
|
|
remarks: '', |
|
|
|
useOrgName: '', |
|
|
|
depositBankName: '', |
|
|
|
bankAccount: '', |
|
|
|
contract: {}, |
|
|
|
sid: '', |
|
|
|
insideCode: '', |
|
|
@ -352,15 +369,20 @@ export default { |
|
|
|
createByName: [{ required: true, message: '申请人姓名不能为空', trigger: 'blur' }], // 申请人姓名 |
|
|
|
externalMiningTypeKey: [{ required: true, message: '外采类型key不能为空', trigger: 'blur' }], // 外采类型key |
|
|
|
externalMiningTypeValue: [{ required: true, message: '外采类型value不能为空', trigger: 'blur' }], // 外采类型value |
|
|
|
purchasingUnitName: [{ required: true, message: '采购单位名称不能为空', trigger: 'blur' }], // 采购单位名称 |
|
|
|
purchasingUnitName: [{ required: true, message: '采购单位不能为空', trigger: 'blur' }], // 采购单位名称 |
|
|
|
depositBankName: [{ required: true, message: '车款开户银行不能为空', trigger: 'blur' }], // 采购单位名称 |
|
|
|
bankAccount: [{ required: true, message: '车款银行账号不能为空', trigger: 'blur' }], // 采购单位名称 |
|
|
|
modelBankName: [{ required: true, message: '订金开户银行不能为空', trigger: 'blur' }], // 采购单位名称 |
|
|
|
modelBankAccount: [{ required: true, message: '订金银行账号不能为空', trigger: 'blur' }], // 采购单位名称 |
|
|
|
modelSid: [{ required: true, message: '车型不能为空', trigger: 'blur' }], // 车型sid |
|
|
|
configSid: [{ required: true, message: '常用配置不能为空', trigger: 'blur' }], // 常用配置名称 |
|
|
|
purchasePrice: [{ required: true, message: '采购价格不能为空', trigger: 'blur' }], // 采购价格 |
|
|
|
guidedPrice: [{ required: true, message: '销售指导价不能为空', trigger: 'blur' }], // 销售指导价 |
|
|
|
// guidedPrice: [{ required: true, message: '销售指导价不能为空', trigger: 'blur' }], // 销售指导价 |
|
|
|
manufactorSettlementPrice: [{ required: true, message: '厂家合同价不能为空', trigger: 'blur' }], // 厂家合同价 |
|
|
|
num: [{ required: true, message: '台数不能为空', trigger: 'blur' }], // 台数 |
|
|
|
deposit: [{ required: true, message: '订金不能为空', trigger: 'blur' }], // 订金 |
|
|
|
/* expenseName: [{ required: true, message: '费用名称不能为空', trigger: 'blur' }], // 费用名称*/ |
|
|
|
// expenseName: [{ required: true, message: '费用名称不能为空', trigger: 'blur' }], // 费用名称 |
|
|
|
// totalExpenseAmount: [{ required: true, message: '费用金额合计不能为空', trigger: 'blur' }], // 费用金额合计 |
|
|
|
orgSid: [{ required: true, message: '部门sid不能为空', trigger: 'blur' }] // 部门sid |
|
|
|
} |
|
|
|
} |
|
|
@ -369,7 +391,7 @@ export default { |
|
|
|
var one = window.location.href.indexOf('&data') + 6 |
|
|
|
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|
|
|
const obj = JSON.parse(decodeURIComponent(data)) |
|
|
|
this.obj=obj; |
|
|
|
this.obj = obj |
|
|
|
// ===获取sid |
|
|
|
this.showEdit(obj.businessSid) |
|
|
|
if (obj.taskName == '已完结' || '已终止') { |
|
|
@ -391,41 +413,38 @@ export default { |
|
|
|
params: { |
|
|
|
// 告诉父级页面,子页面的弹框高度。 |
|
|
|
code: 2, |
|
|
|
data: 600 + 'px' |
|
|
|
data: 550 + 'px' |
|
|
|
} |
|
|
|
}, '*') |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 删除附件 |
|
|
|
handleRemoveAttachment(file, files) { |
|
|
|
|
|
|
|
this.fileList = this.fileList.filter(item => item.uid !== file.uid) |
|
|
|
|
|
|
|
this.formobj.contract = {} |
|
|
|
}, |
|
|
|
// 下载附件 |
|
|
|
handleDown(row) { |
|
|
|
|
|
|
|
var xhr=new XMLHttpRequest(); |
|
|
|
xhr.open('GET', process.env.VUE_APP_BASE_API+"/base/file/download?filePath="+ row.url+"&outFileName="+row.name,true); |
|
|
|
xhr.setRequestHeader("token", getStorage()); |
|
|
|
xhr.responseType='blob'; |
|
|
|
var xhr = new XMLHttpRequest() |
|
|
|
xhr.open('GET', process.env.VUE_APP_BASE_API + '/base/file/download?filePath=' + row.url + '&outFileName=' + row.name, true) |
|
|
|
xhr.setRequestHeader('token', getStorage()) |
|
|
|
xhr.responseType = 'blob' |
|
|
|
xhr.onload = function(e) { |
|
|
|
// 如果请求执行成功 |
|
|
|
var blob = this.response; |
|
|
|
var filename = row.name; |
|
|
|
var a = document.createElement('a'); |
|
|
|
var blob = this.response |
|
|
|
var filename = row.name |
|
|
|
var a = document.createElement('a') |
|
|
|
// blob.type="application/octet-stream"; |
|
|
|
// 创键临时url对象 |
|
|
|
var url = URL.createObjectURL(blob); |
|
|
|
a.href = url; |
|
|
|
a.download=filename; |
|
|
|
a.click(); |
|
|
|
var url = URL.createObjectURL(blob) |
|
|
|
a.href = url |
|
|
|
a.download = filename |
|
|
|
a.click() |
|
|
|
// 释放之前创建的URL对象 |
|
|
|
window.URL.revokeObjectURL(url); |
|
|
|
}; |
|
|
|
window.URL.revokeObjectURL(url) |
|
|
|
} |
|
|
|
// 发送请求 |
|
|
|
xhr.send(); |
|
|
|
xhr.send() |
|
|
|
}, |
|
|
|
uploadSuccessHetong(response, file) { |
|
|
|
this.formobj.contract = { |
|
|
@ -436,27 +455,29 @@ export default { |
|
|
|
}, |
|
|
|
selectChexing(info) { |
|
|
|
this.viewState = '1' |
|
|
|
this.formobj.modelSid = info.modelSid // 车型sid |
|
|
|
this.formobj.modelName = info.modelName // 车型名称 |
|
|
|
this.formobj.configName = info.configName // 常用配置名称 |
|
|
|
this.formobj.configSid = info.configSid // 常用配置sid |
|
|
|
this.formobj.guidedPrice = info.guidedPrice// 销售指导价 |
|
|
|
this.formobj.manufactorSettlementPrice = info.manufactorSettlementPrice// 厂家合同价 |
|
|
|
this.formobj.modelSid = info[0].modelSid // 车型sid |
|
|
|
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.manufactorSettlementPrice = info[0].manufactorSettlementPrice// 厂家合同价 |
|
|
|
}, |
|
|
|
handleSubmit() { |
|
|
|
var contract=this.formobj.contract; |
|
|
|
|
|
|
|
if(!contract.fileName){ |
|
|
|
alert('合同附件不能为空!'); |
|
|
|
return false; |
|
|
|
var contract = this.formobj.contract |
|
|
|
if (contract.fileName === '' || contract.fileName === null || contract.fileName === undefined) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '合同附件不能为空' }) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.formobj.isBeforePayment === '' || this.formobj.isBeforePayment === null) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '请检查是否先付款已选择' }) |
|
|
|
return |
|
|
|
} |
|
|
|
// 提交的代码 |
|
|
|
this.submitdisabled = true |
|
|
|
this.formobj.userSid = window.sessionStorage.getItem('userSid'); |
|
|
|
this.formobj.orgSid = this.$store.getters.orgSid; |
|
|
|
req |
|
|
|
.doSubmit(this.formobj) |
|
|
|
.then(resp => { |
|
|
|
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
this.formobj.orgSid = this.$store.getters.orgSid |
|
|
|
req.doSubmit(this.formobj).then(resp => { |
|
|
|
this.submitdisabled = false |
|
|
|
if (resp.success) { |
|
|
|
window.parent.postMessage({ |
|
|
@ -469,41 +490,40 @@ export default { |
|
|
|
} else { |
|
|
|
// 根据resp.code进行异常情况处理 |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
}, |
|
|
|
quedingVehicle() { |
|
|
|
var obj = this.$refs['vehicle'].getSids(); |
|
|
|
var length = obj.length; |
|
|
|
var obj = this.$refs['vehicle'].getSids() |
|
|
|
var length = obj.length |
|
|
|
|
|
|
|
if (length < 1) { |
|
|
|
alert('必须选择一条数据!'); |
|
|
|
return ; |
|
|
|
alert('必须选择一条数据!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.formobj.num=length; |
|
|
|
this.formobj.baseOutsourcingApplicationVehicleDtos = obj; |
|
|
|
this.formobj.num = length |
|
|
|
this.formobj.baseOutsourcingApplicationVehicleDtos = obj |
|
|
|
this.vehicleDialogVisible = false |
|
|
|
}, |
|
|
|
queding(dialog) { |
|
|
|
var obj = this.$refs['modellibrary'].getConfigDataList(); |
|
|
|
var length = obj.configs.length; |
|
|
|
var obj = this.$refs['modellibrary'].getConfigDataList() |
|
|
|
var length = obj.configs.length |
|
|
|
if (length > 1) { |
|
|
|
alert('只能选择一条数据!'); |
|
|
|
return ; |
|
|
|
alert('只能选择一条数据!') |
|
|
|
return |
|
|
|
} else if (length < 1) { |
|
|
|
alert('必须选择一条数据!'); |
|
|
|
return ; |
|
|
|
alert('必须选择一条数据!') |
|
|
|
return |
|
|
|
} |
|
|
|
this.formobj.modelName = obj.model.vehicleAlias |
|
|
|
this.formobj.modelSid = obj.model.sid |
|
|
|
this.formobj.configName = obj.configs[0].configName |
|
|
|
this.formobj.configSid = obj.configs[0].sid |
|
|
|
this.formobj.guidedPrice = obj.configs[0].guidedPrice // 销售指导价 |
|
|
|
this.formobj.manufactorSettlementPrice = 1;// obj.configs[0].manufactorSettlementPrice // 厂家合同价 |
|
|
|
this.formobj.baseOutsourcingApplicationVehicleDtos = []; |
|
|
|
this.formobj.num=0; |
|
|
|
this.formobj.manufactorSettlementPrice = 1 // obj.configs[0].manufactorSettlementPrice // 厂家合同价 |
|
|
|
this.formobj.baseOutsourcingApplicationVehicleDtos = [] |
|
|
|
this.formobj.num = 0 |
|
|
|
this.dialogVisible = false |
|
|
|
}, |
|
|
|
resetState() { |
|
|
@ -515,21 +535,22 @@ export default { |
|
|
|
/* this.viewState = 1.2 |
|
|
|
this.$refs['modellibrary'].showData('123456');*/ |
|
|
|
this.viewState = 1.2 |
|
|
|
this.$refs['chexingxuanze'].showChexing() |
|
|
|
// this.$refs['chexingxuanze'].showChexing(this.formobj.baseOutsourcingApplicationVehicleDtos) |
|
|
|
this.$refs['divconfiguration'].showData(this.formobj.baseOutsourcingApplicationVehicleDtos) |
|
|
|
}, |
|
|
|
selectVehicleDialog() { |
|
|
|
var objs = this.formobj.baseOutsourcingApplicationVehicleDtos |
|
|
|
var s = ""; |
|
|
|
var s = '' |
|
|
|
for (var i = 0; i < objs.length; i++) { |
|
|
|
if (i == objs.length - 1) { |
|
|
|
s =s+ objs[i].sid; |
|
|
|
s = s + objs[i].sid |
|
|
|
} else { |
|
|
|
s =s+ objs[i].sid+","; |
|
|
|
s = s + objs[i].sid + ',' |
|
|
|
} |
|
|
|
} |
|
|
|
this.selectedSids = s; |
|
|
|
this.vehicleDialogVisible = true; |
|
|
|
this.$refs['vehicle'].loadList(); |
|
|
|
this.selectedSids = s |
|
|
|
this.vehicleDialogVisible = true |
|
|
|
this.$refs['vehicle'].loadList() |
|
|
|
}, |
|
|
|
handleReturn(isreload) { |
|
|
|
if (isreload === 'true') this.$emit('reloadlist') |
|
|
@ -561,87 +582,73 @@ export default { |
|
|
|
} |
|
|
|
}, '*') |
|
|
|
}, |
|
|
|
showAdd() { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['form_obj'].clearValidate() |
|
|
|
}) |
|
|
|
this.viewTitle = '【新增】外采申请表' |
|
|
|
}, |
|
|
|
showEdit(sid) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['form_obj'].clearValidate() |
|
|
|
}) |
|
|
|
this.viewTitle = '【修改】外采申请表' |
|
|
|
const _this = this |
|
|
|
_this.formobj.sid = sid // SID |
|
|
|
req |
|
|
|
.fetchBySid(sid) |
|
|
|
.then(resp => { |
|
|
|
this.formobj.sid = sid // SID |
|
|
|
req.fetchBySid(sid).then(resp => { |
|
|
|
if (resp.success) { |
|
|
|
const vdata = resp.data |
|
|
|
_this.fileList=[] |
|
|
|
this.fileList = [] |
|
|
|
if (vdata.contract != null) { |
|
|
|
_this.fileList.push({ |
|
|
|
this.fileList.push({ |
|
|
|
name: vdata.contract.fileName, |
|
|
|
url: vdata.contract.filePath |
|
|
|
}) |
|
|
|
} |
|
|
|
this.formobj.contract = vdata.contract |
|
|
|
/* _this.fileList[0] = vdata.contract*/ |
|
|
|
_this.formobj.taskId = vdata.taskId |
|
|
|
_this.formobj.insideCode = vdata.insideCode |
|
|
|
_this.formobj.instanceId = vdata.procInstSid |
|
|
|
_this.formobj.modelId = vdata.procDefId |
|
|
|
_this.formobj.remarks = vdata.remarks |
|
|
|
_this.formobj.useOrgName = vdata.useOrgName |
|
|
|
_this.formobj.depositBankName = vdata.depositBankName |
|
|
|
_this.formobj.bankAccount = vdata.bankAccount |
|
|
|
_this.formobj.applicationCode = vdata.applicationCode // 申请编号 |
|
|
|
_this.formobj.createByName = vdata.createByName // 申请人姓名 |
|
|
|
_this.formobj.applicationDate = vdata.applicationDate // 申请日期 |
|
|
|
_this.formobj.externalMiningTypeKey = vdata.externalMiningTypeKey // 外采类型key |
|
|
|
_this.formobj.externalMiningTypeValue = vdata.externalMiningTypeValue // 外采类型value |
|
|
|
_this.formobj.purchasingUnitName = vdata.purchasingUnitName // 采购单位名称 |
|
|
|
_this.formobj.modelSid = vdata.modelSid // 车型sid |
|
|
|
_this.formobj.modelName = vdata.modelName // 车型名称 |
|
|
|
_this.formobj.configName = vdata.configName // 常用配置名称 |
|
|
|
_this.formobj.configSid = vdata.configSid // 常用配置sid |
|
|
|
_this.formobj.purchasePrice = vdata.purchasePrice // 采购价格 |
|
|
|
_this.formobj.guidedPrice = vdata.guidedPrice // 销售指导价 |
|
|
|
_this.formobj.manufactorSettlementPrice = vdata.manufactorSettlementPrice // 厂家合同价 |
|
|
|
_this.formobj.num = vdata.num // 台数 |
|
|
|
_this.formobj.deposit = vdata.deposit // 订金 |
|
|
|
_this.formobj.expenseName = vdata.expenseName // 费用名称 |
|
|
|
_this.formobj.totalExpenseAmount = vdata.totalExpenseAmount // 费用金额合计 |
|
|
|
_this.formobj.orgSid = vdata.orgSid // 部门sid |
|
|
|
_this.formobj.baseOutsourcingApplicationVehicleDtos = vdata.baseOutsourcingApplicationVehicleVos // 部门sid |
|
|
|
this.formobj.taskId = vdata.taskId |
|
|
|
this.formobj.insideCode = vdata.insideCode |
|
|
|
this.formobj.instanceId = vdata.procInstSid |
|
|
|
this.formobj.modelId = vdata.procDefId |
|
|
|
this.formobj.remarks = vdata.remarks |
|
|
|
this.formobj.useOrgName = vdata.useOrgName |
|
|
|
this.formobj.depositBankName = vdata.depositBankName |
|
|
|
this.formobj.bankAccount = vdata.bankAccount |
|
|
|
this.formobj.modelAccountName = vdata.modelAccountName |
|
|
|
this.formobj.isBeforePayment = vdata.isBeforePayment |
|
|
|
this.formobj.modelBankName = vdata.modelBankName |
|
|
|
this.formobj.modelBankAccount = vdata.modelBankAccount |
|
|
|
this.formobj.applicationCode = vdata.applicationCode // 申请编号 |
|
|
|
this.formobj.createByName = vdata.createByName // 申请人姓名 |
|
|
|
this.formobj.applicationDate = vdata.applicationDate // 申请日期 |
|
|
|
this.formobj.externalMiningTypeKey = vdata.externalMiningTypeKey // 外采类型key |
|
|
|
this.formobj.externalMiningTypeValue = vdata.externalMiningTypeValue // 外采类型value |
|
|
|
this.formobj.purchasingUnitName = vdata.purchasingUnitName // 采购单位名称 |
|
|
|
this.formobj.modelSid = vdata.modelSid // 车型sid |
|
|
|
this.formobj.modelName = vdata.modelName // 车型名称 |
|
|
|
this.formobj.configName = vdata.configName // 常用配置名称 |
|
|
|
this.formobj.configSid = vdata.configSid // 常用配置sid |
|
|
|
this.formobj.purchasePrice = vdata.purchasePrice // 采购价格 |
|
|
|
this.formobj.guidedPrice = vdata.guidedPrice // 销售指导价 |
|
|
|
this.formobj.manufactorSettlementPrice = vdata.manufactorSettlementPrice // 厂家合同价 |
|
|
|
this.formobj.num = vdata.num // 台数 |
|
|
|
this.formobj.deposit = vdata.deposit // 订金 |
|
|
|
this.formobj.expenseName = vdata.expenseName // 费用名称 |
|
|
|
this.formobj.totalExpenseAmount = vdata.totalExpenseAmount // 费用金额合计 |
|
|
|
this.formobj.orgSid = vdata.orgSid // 部门sid |
|
|
|
this.formobj.baseOutsourcingApplicationVehicleDtos = vdata.baseOutsourcingApplicationVehicleVos // 部门sid |
|
|
|
} else { |
|
|
|
// 根据resp.code进行异常情况处理 |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(e => { |
|
|
|
this.formobj = row |
|
|
|
}).catch(e => { |
|
|
|
this.formobj = {} |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleClose() { |
|
|
|
this.vehicleDialogVisible = false |
|
|
|
this.dialogVisible = false |
|
|
|
}, |
|
|
|
indexMethod(index){ |
|
|
|
/* var pagestart=(this.queryParams.current-1) * this.queryParams.size; |
|
|
|
var pageindex=index+1+pagestart; |
|
|
|
return pageindex;*/ |
|
|
|
}, |
|
|
|
saveOrUpdate() { |
|
|
|
const _this = this |
|
|
|
this.formobj.userSid = window.sessionStorage.getItem('userSid'); |
|
|
|
this.formobj.orgSid = this.$store.getters.orgSid; |
|
|
|
this.formobj.userSid = window.sessionStorage.getItem('userSid') |
|
|
|
this.formobj.orgSid = this.$store.getters.orgSid |
|
|
|
this.$refs['form_obj'].validate(valid => { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
|
req |
|
|
|
.saveOrUpdate(this.formobj) |
|
|
|
.then(resp => { |
|
|
|
req.saveOrUpdate(this.formobj).then(resp => { |
|
|
|
this.submitdisabled = false |
|
|
|
if (resp.success) { |
|
|
|
window.parent.postMessage({ |
|
|
@ -654,8 +661,7 @@ export default { |
|
|
|
} else { |
|
|
|
// 根据resp.code进行异常情况处理 |
|
|
|
} |
|
|
|
}) |
|
|
|
.catch(() => { |
|
|
|
}).catch(() => { |
|
|
|
this.submitdisabled = false |
|
|
|
}) |
|
|
|
} else { |
|
|
@ -664,8 +670,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
deleteVehicle(row) { |
|
|
|
var arr=this.formobj.baseOutsourcingApplicationVehicleDtos; |
|
|
|
|
|
|
|
var arr = this.formobj.baseOutsourcingApplicationVehicleDtos |
|
|
|
const tip = '请确认是否删除车架号为' + row.vinNo + '记录?' |
|
|
|
this.$confirm(tip, '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
@ -674,12 +679,12 @@ export default { |
|
|
|
}).then(() => { |
|
|
|
for (var i = 0; i < arr.length; i++) { |
|
|
|
if (row.vinNo == arr[i].vinNo) { |
|
|
|
arr.splice(i,1); |
|
|
|
arr.splice(i, 1) |
|
|
|
} |
|
|
|
} |
|
|
|
this.formobj.num=this.formobj.num-1; |
|
|
|
}).catch(() => {}) |
|
|
|
|
|
|
|
this.formobj.num = this.formobj.num - 1 |
|
|
|
}).catch(() => { |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -689,6 +694,7 @@ export default { |
|
|
|
.formadd .el-row .el-col /deep/ .el-form-item .addinputw { |
|
|
|
width: 100%; |
|
|
|
} |
|
|
|
|
|
|
|
.titwu { |
|
|
|
font-size: 28px; |
|
|
|
text-align: center; |
|
|
|