|
|
@ -13,7 +13,7 @@ |
|
|
|
</div> |
|
|
|
<div class="listconadd"> |
|
|
|
<div class="wlInfo"><span>公司申请入账单</span></div> |
|
|
|
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top"> |
|
|
|
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top" class="formadd"> |
|
|
|
<el-row class="linetwo"> |
|
|
|
<el-col :span="3" class="el-form-item-right"> |
|
|
|
<el-form-item label="合同编号:"></el-form-item> |
|
|
@ -46,29 +46,33 @@ |
|
|
|
</el-row> |
|
|
|
<div class="tableStyle"> |
|
|
|
<div style="margin-left: 5px;font-weight: bold">开票信息</div> |
|
|
|
<div> |
|
|
|
<span>单台开票金额:<el-input v-model="formobj.configName" placeholder="" clearable></el-input></span> |
|
|
|
<div style="display: flex;justify-content: flex-start;align-items: center"> |
|
|
|
<span style="width: 150px">单台开票金额: </span><el-input v-model="formobj.configName" @keyup.native="UpNumber" @keydown.native="UpNumber" style="padding: 5px;" placeholder="" clearable></el-input> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-table :key="tableKey" :data="formobj.vehicleList" :index="index" border style="width: 100%"> |
|
|
|
<el-table :key="tableKey" :data="formobj.finBillVehicles" :index="index" border style="width: 100%"> |
|
|
|
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|
|
|
<el-table-column label="车架号" align="left" header-align="center"> |
|
|
|
<template slot-scope="scope" prop="vehicleName"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="开票类型" align="left" header-align="center"> |
|
|
|
<template slot-scope="scope" prop="vehicleName"> |
|
|
|
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable/> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.billTypeKey" placeholder="请选择" filterable clearable> |
|
|
|
<el-option v-for="item in billType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="开票名称" align="left" header-align="center"> |
|
|
|
<template slot-scope="scope" prop="vehicleName"> |
|
|
|
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable/> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-select v-model="scope.row.params.billName" placeholder="请选择" filterable clearable> |
|
|
|
<el-option v-for="item in billName_list" :key="item.sid" :label="item.orgName" :value="item.sid"/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="备注" header-align="center"> |
|
|
|
<template slot-scope="scope" prop="remarks"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -79,7 +83,7 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="21"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formobj.configName" readonly/> |
|
|
|
{{ formobj.configName }} |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
@ -95,14 +99,45 @@ |
|
|
|
</el-row> |
|
|
|
<el-row> |
|
|
|
<el-col :span="3" class="el-form-item-right"> |
|
|
|
<el-form-item label="备注"></el-form-item> |
|
|
|
<el-form-item label="开票状态"></el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="21"> |
|
|
|
<el-form-item> |
|
|
|
<el-input v-model="formobj.remarks" readonly/> |
|
|
|
{{ formobj.configName }} |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
<div class="tableStyle"> |
|
|
|
<div style="margin-left: 5px;font-weight: bold">所附资料附件</div> |
|
|
|
</div> |
|
|
|
<el-table :key="fileKey" :data="formobj.finBillVehicles" :index="index" border style="width: 100%"> |
|
|
|
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|
|
|
<el-table-column label="操作" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button type="primary" size="small">上传</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="附件名称" header-align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="文件格式" header-align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="上传人" header-align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="上传时间" header-align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-form> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -111,7 +146,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import req from '@/api/ruzhang/scmapplyinbound' |
|
|
|
import { save, dataDictionary, fetchDetailsBySid, submitFinBillApplication, namesDown } from '@/api/zhengchangkaipiao/openTicket.js' |
|
|
|
export default { |
|
|
|
name: 'zhengchangkaipiaoAdd', |
|
|
|
data() { |
|
|
@ -119,75 +154,67 @@ export default { |
|
|
|
viewTitle: '', |
|
|
|
index: 0, |
|
|
|
tableKey: 0, |
|
|
|
fileKey: 1, |
|
|
|
billType_list: [], |
|
|
|
billName_list: [], |
|
|
|
// 表单数据 |
|
|
|
formobj: { |
|
|
|
sid: '', // 一条数据的sid |
|
|
|
applicationSid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|
|
|
userSid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|
|
|
applicationName: window.sessionStorage.getItem('name'), // 申请人 |
|
|
|
applicationCode: '', // 申请编号 |
|
|
|
configName: '', |
|
|
|
departureDate: '', |
|
|
|
modelName: '', |
|
|
|
modelSid: '', |
|
|
|
purchaseOrderNo: '', |
|
|
|
remarks: '', // 备注 |
|
|
|
vehicleOrderSid: '', |
|
|
|
vehicleList: [] |
|
|
|
sid: '', |
|
|
|
billAppPublicSid: '', |
|
|
|
billState: '', |
|
|
|
contractNo: '', |
|
|
|
contractSid: '', |
|
|
|
createByName: window.sessionStorage.getItem('name'), |
|
|
|
customerName: '', |
|
|
|
customerSid: '', |
|
|
|
oneBillMoney: '', |
|
|
|
totalBillMoney: '', |
|
|
|
useOrgSid: '', |
|
|
|
finBillApplicationAppendxs: [], |
|
|
|
finBillFiles: [], |
|
|
|
finBillVehicles: [] |
|
|
|
}, |
|
|
|
rules: {}, |
|
|
|
submitdisabled: false |
|
|
|
} |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
showEdit(sid, row) { |
|
|
|
// 数据字典加载 |
|
|
|
DataDictionary() { |
|
|
|
dataDictionary({ type: 'invoiceType' }).then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.billType_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
namesDown().then((res) => { |
|
|
|
if (res.code === '200') { |
|
|
|
this.billName_list = res.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
UpNumber(e) { |
|
|
|
e.target.value = e.target.value.replace(/[^0-9.]/g, '') |
|
|
|
}, |
|
|
|
showEdit(row) { |
|
|
|
this.$nextTick(() => { |
|
|
|
this.$refs['form_obj'].clearValidate() |
|
|
|
}) |
|
|
|
this.viewTitle = '【编辑】入账单' |
|
|
|
console.log('编辑回显', sid, row) |
|
|
|
req.fetchBySid(sid).then((resp) => { |
|
|
|
const data = resp.data |
|
|
|
this.formobj.applicationCode = data.applicationCode |
|
|
|
this.formobj.remarks = data.remarks |
|
|
|
this.formobj.sid = sid |
|
|
|
this.formobj.configName = data.configName |
|
|
|
this.formobj.departureDate = data.departureDate |
|
|
|
this.formobj.modelName = data.modelName |
|
|
|
this.formobj.modelSid = data.modelSid |
|
|
|
this.formobj.purchaseOrderNo = data.purchaseOrderNo |
|
|
|
this.formobj.vehicleOrderSid = data.vehicleOrderSid |
|
|
|
if (data.inboundVehicleList.length > 0) { |
|
|
|
data.inboundVehicleList.forEach((e) => { |
|
|
|
this.formobj.vehicleList.push({ |
|
|
|
applySid: e.applySid, |
|
|
|
remarks: e.remarks, |
|
|
|
modelSid: e.modelSid, |
|
|
|
sid: e.sid, |
|
|
|
vinNo: e.vinNo |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else { |
|
|
|
for (var i = 0; i < row[0].vehicleNum; i++) { |
|
|
|
this.formobj.vehicleList.push({ |
|
|
|
applySid: '', |
|
|
|
remarks: '', |
|
|
|
modelSid: this.formobj.modelSid, |
|
|
|
sid: '', |
|
|
|
vinNo: '' |
|
|
|
}) |
|
|
|
} |
|
|
|
this.viewTitle = '【编辑】公司开票申请' |
|
|
|
console.log('编辑回显', row) |
|
|
|
fetchDetailsBySid(row.sid).then((resp) => { |
|
|
|
this.DataDictionary() |
|
|
|
if (resp.code === '200') { |
|
|
|
this.formobj = resp.data |
|
|
|
} |
|
|
|
}).catch((e) => { |
|
|
|
this.formobj = row |
|
|
|
}) |
|
|
|
}, |
|
|
|
saveEdit() { |
|
|
|
console.log(this.formobj, 636363) |
|
|
|
this.$refs['form_obj'].validate((valid) => { |
|
|
|
if (valid) { |
|
|
|
this.submitdisabled = true |
|
|
|
req.saveOrUpdate(this.formobj).then((resp) => { |
|
|
|
save(this.formobj).then((resp) => { |
|
|
|
this.submitdisabled = false |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
@ -204,7 +231,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
submitVehicleApply() { |
|
|
|
req.submitVehicleApply(this.formobj).then((res) => { |
|
|
|
submitFinBillApplication(this.formobj).then((res) => { |
|
|
|
console.log(res.code, res.success) |
|
|
|
if (res.code === '200' && res.success) { |
|
|
|
this.$message({ |
|
|
@ -242,7 +269,11 @@ export default { |
|
|
|
line-height: 90px; |
|
|
|
} |
|
|
|
.linetwo { |
|
|
|
margin-top: 10px; |
|
|
|
border-left: 0px; |
|
|
|
border-right: 0px; |
|
|
|
} |
|
|
|
.linetwo .el-col{ |
|
|
|
border: 0; |
|
|
|
} |
|
|
|
.linetwo .el-form-item { |
|
|
|
margin-bottom: 0px !important; |
|
|
@ -253,10 +284,10 @@ export default { |
|
|
|
.tableStyle { |
|
|
|
background-color: #FFFFFF; |
|
|
|
display: flex; |
|
|
|
justify-content: start; |
|
|
|
justify-content: space-between; |
|
|
|
align-items: center; |
|
|
|
border: 1px solid #dfe4ed; |
|
|
|
height: 40px; |
|
|
|
height: 45px; |
|
|
|
} |
|
|
|
.el-form-item-right { |
|
|
|
text-align: right; |
|
|
|