|
|
@ -7,16 +7,11 @@ |
|
|
|
<div>{{ viewTitle }}</div> |
|
|
|
<!--start 添加修改按钮--> |
|
|
|
<div> |
|
|
|
<el-button |
|
|
|
type="primary" |
|
|
|
size="small" |
|
|
|
:disabled="submitdisabled" |
|
|
|
@click="handleCreate()" |
|
|
|
>保存 |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleCreate()">保存 |
|
|
|
</el-button> |
|
|
|
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleSubmit()">提交 |
|
|
|
</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|
|
|
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|
|
|
</div> |
|
|
|
<!--end 添加修改按钮--> |
|
|
|
<!--end 详情按钮--> |
|
|
@ -35,16 +30,13 @@ |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop="callInOrgName" label="调入分公司"> |
|
|
|
<span>{{temp.callInOrgName}}</span> |
|
|
|
<span>{{ temp.callInOrgName }}</span> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
<el-col :span="8"> |
|
|
|
<el-form-item prop="callOutOrgSid" label="调出分公司"> |
|
|
|
<el-select v-model="temp.callOutOrgSid" placeholder="请选择" clearable class="addinputw" |
|
|
|
@change="callOutOrgSidChange" |
|
|
|
:disabled="dialogStatus == 'edit'"> |
|
|
|
<el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name" |
|
|
|
:value="item.sid"/> |
|
|
|
<el-select v-model="temp.callOutOrgSid" placeholder="请选择" clearable class="addinputw" @change="callOutOrgSidChange" :disabled="dialogStatus == 'edit'"> |
|
|
|
<el-option v-for="item in useOrg_list" :key="item.sid" :label="item.name" :value="item.sid"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
@ -63,9 +55,8 @@ |
|
|
|
<el-table-column align="center" fixed label="序号" type="index" width="50"/> |
|
|
|
<el-table-column label="操作" fixed align="center" width="90" class-name="small-padding fixed-width"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button size="mini" |
|
|
|
type="danger" |
|
|
|
@click="dataDelete(scope.row,scope.$index,list[scope.$index])">删除</el-button> |
|
|
|
<el-button size="mini" type="danger" @click="dataDelete(scope.row,scope.$index,list[scope.$index])">删除 |
|
|
|
</el-button> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="190" label="车型" align="center"> |
|
|
@ -79,12 +70,12 @@ |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="200" label="合格证信息" align="center"> |
|
|
|
<template slot-scope="scope" @click=""> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-input v-model="scope.row.certificate" placeholder="请输入" class="addinputw"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="120" label="车架号" align="center"> |
|
|
|
<template slot-scope="scope" @click=""> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<span>{{ scope.row.vinNo }}</span> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -95,36 +86,27 @@ |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="200" label="发票类型" align="center"> |
|
|
|
<template slot-scope="scope"><!-- :disabled="scope.row.isAvailable || dialogStatus == 'edit'" --> |
|
|
|
<!-- <span>{{ scope.row.invoiceTypeValue }}</span>--> |
|
|
|
<el-select v-model="scope.row.invoiceTypeKey" placeholder="请选择" clearable class="addinputw" |
|
|
|
@change="invoiceTypeChange(scope.row,scope.row.invoiceTypeKey)" |
|
|
|
> |
|
|
|
<el-option v-for="item in invoiceType_list" :key="item.dictKey" :label="item.dictValue" |
|
|
|
:value="item.dictKey"/> |
|
|
|
<el-select v-model="scope.row.invoiceTypeKey" placeholder="请选择" clearable class="addinputw" @change="invoiceTypeChange(scope.row,scope.row.invoiceTypeKey)"> |
|
|
|
<el-option v-for="item in invoiceType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/> |
|
|
|
</el-select> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="130" label="开票金额" align="center"> |
|
|
|
<template slot-scope="scope"><!-- 由发票类型决定,增值税票:开票金额=内销价格 :disabled="scope.row.invoiceTypeKey == '02'"--> |
|
|
|
<el-input |
|
|
|
v-model="scope.row.invoiceTypeKey == '02' ? scope.row.witPinMoney :scope.row.invoicinMoney" |
|
|
|
placeholder="请输入" class="addinputw" |
|
|
|
@keyup.native="scope.row.invoicinMoney = oninput(scope.row.invoicinMoney,2)" |
|
|
|
/> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 由发票类型决定,增值税票:开票金额=内销价格 :disabled="scope.row.invoiceTypeKey == '02'"--> |
|
|
|
<el-input v-model="scope.row.invoiceTypeKey == '02' ? scope.row.witPinMoney :scope.row.invoicinMoney" placeholder="请输入" class="addinputw" @keyup.native="scope.row.invoicinMoney = oninput(scope.row.invoicinMoney,2)"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="180" label="开票单位" align="center"> |
|
|
|
<template slot-scope="scope"><!-- 由发票类型决定,增值税票:开票单位=调入公司 :disabled="scope.row.invoiceTypeKey == '02'"--> |
|
|
|
<el-input |
|
|
|
v-model="scope.row.invoiceTypeKey == '02' ? temp.callInOrgName :scope.row.invoicinCompanyName" |
|
|
|
placeholder="请输入" class="addinputw" /> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<!-- 由发票类型决定,增值税票:开票单位=调入公司 :disabled="scope.row.invoiceTypeKey == '02'"--> |
|
|
|
<el-input v-model="scope.row.invoiceTypeKey == '02' ? temp.callInOrgName :scope.row.invoicinCompanyName" placeholder="请输入" class="addinputw"/> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column width="180" label="开票信息图片" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="upload_img"> |
|
|
|
<upload_diaoche ref="uploadMoreImg" v-model="imgList" bucket="map" |
|
|
|
:upload-data="{type:'0001',sid: scope.row.purchaseSid}"/> |
|
|
|
<upload_diaoche ref="uploadMoreImg" v-model="imgList" bucket="map" :upload-data="{type:'0001',sid: scope.row.purchaseSid}"/> |
|
|
|
</div> |
|
|
|
<el-button size="mini" type="primary" @click="open(scope.row)">查看</el-button> |
|
|
|
</template> |
|
|
@ -156,8 +138,7 @@ |
|
|
|
|
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<diaochecheliang-list ref="xuanChe" v-show="isXuanche === true" @handleVehicle="selectVehicle" |
|
|
|
@doback="resetState"/> |
|
|
|
<diaochecheliang-list ref="xuanChe" v-show="isXuanche === true" @handleVehicle="selectVehicle" @doback="resetState"/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
@ -203,14 +184,14 @@ export default { |
|
|
|
useOrgSid: '', |
|
|
|
createOrgSid: '', |
|
|
|
nodeState: '', |
|
|
|
shuntingTypeValue:'调入', |
|
|
|
shuntingTypeKey:'01', |
|
|
|
shuntingTypeValue: '调入', |
|
|
|
shuntingTypeKey: '01', |
|
|
|
baseShuntingInvoicinApplyeVehs: [] |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
callOutOrgSid: [ |
|
|
|
{ required: true, message: '请选择调出公司', trigger: 'change' } |
|
|
|
], |
|
|
|
] |
|
|
|
}, |
|
|
|
submitdisabled: false, // 保存按钮 |
|
|
|
disabled: false // 提交按钮 |
|
|
@ -219,12 +200,12 @@ export default { |
|
|
|
methods: { |
|
|
|
// 输入数字正则 |
|
|
|
oninput(val, limit = 0) { |
|
|
|
val = val.replace(/[^\d.]/g, '') //保留数字 |
|
|
|
val = val.replace(/^00/, '0.') //开头不能有两个0 |
|
|
|
val = val.replace(/^\./g, '0.') //开头为小数点转换为0. |
|
|
|
val = val.replace(/\.{2,}/g, '.') //两个以上的小数点转换成一个 |
|
|
|
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); //只保留一个小数点 |
|
|
|
/^0\d+/.test(val) ? val = val.slice(1) : '' //两位以上数字开头不能为0 |
|
|
|
val = val.replace(/[^\d.]/g, '') // 保留数字 |
|
|
|
val = val.replace(/^00/, '0.') // 开头不能有两个0 |
|
|
|
val = val.replace(/^\./g, '0.') // 开头为小数点转换为0. |
|
|
|
val = val.replace(/\.{2,}/g, '.') // 两个以上的小数点转换成一个 |
|
|
|
val = val.replace('.', '$#$').replace(/\./g, '').replace('$#$', '.'); // 只保留一个小数点 |
|
|
|
/^0\d+/.test(val) ? val = val.slice(1) : '' // 两位以上数字开头不能为0 |
|
|
|
const str = '^(\\d+)\\.(\\d{' + limit + '}).*$' |
|
|
|
const reg = new RegExp(str) |
|
|
|
if (limit === 0) { |
|
|
@ -248,7 +229,7 @@ export default { |
|
|
|
invoiceTypeChange(row, val) { |
|
|
|
console.log('215545', row, val) |
|
|
|
if (val) { |
|
|
|
const choosetItem = this.invoiceType_list.filter((item) => item.dictKey == val) |
|
|
|
const choosetItem = this.invoiceType_list.filter((item) => item.dictKey === val) |
|
|
|
row.invoiceTypeValue = choosetItem[0].dictValue |
|
|
|
} |
|
|
|
}, |
|
|
@ -262,7 +243,7 @@ export default { |
|
|
|
}) |
|
|
|
}, |
|
|
|
callOutOrgSidChange(val) { |
|
|
|
const choosetItem = this.useOrg_list.filter((item) => item.sid == val) |
|
|
|
const choosetItem = this.useOrg_list.filter((item) => item.sid === val) |
|
|
|
this.temp.callOutOrgName = choosetItem[0].name |
|
|
|
console.log('name:', this.temp.callOutOrgName, 'key:', this.temp.callOutOrgSid) |
|
|
|
}, |
|
|
@ -274,7 +255,7 @@ export default { |
|
|
|
this.useOrg = res.data |
|
|
|
this.temp.createOrgSid = res.data |
|
|
|
this.temp.callInOrgSid = res.data |
|
|
|
const name = this.useOrg_list.filter((item) => item.sid == this.temp.callInOrgSid) |
|
|
|
const name = this.useOrg_list.filter((item) => item.sid === this.temp.callInOrgSid) |
|
|
|
this.temp.callInOrgName = name[0].name |
|
|
|
} |
|
|
|
}) |
|
|
@ -307,7 +288,7 @@ export default { |
|
|
|
}, |
|
|
|
// 明细表添加一行数据 |
|
|
|
handlediaocheliang() { |
|
|
|
if (this.temp.callOutOrgSid == '') { |
|
|
|
if (this.temp.callOutOrgSid === '') { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '请选择调出分公司', |
|
|
@ -315,7 +296,7 @@ export default { |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
if (this.temp.callInOrgSid == '') { |
|
|
|
if (this.temp.callInOrgSid === '') { |
|
|
|
this.$message({ |
|
|
|
showClose: true, |
|
|
|
message: '请选择调入分公司', |
|
|
@ -328,7 +309,7 @@ export default { |
|
|
|
this.list.forEach(element => { |
|
|
|
vinNoList.push(element.purchaseSid) |
|
|
|
}) |
|
|
|
this.$refs['xuanChe'].showCheList( this.temp.callOutOrgSid, this.temp.callInOrgSid, vinNoList) |
|
|
|
this.$refs['xuanChe'].showCheList(this.temp.callOutOrgSid, this.temp.callInOrgSid, vinNoList) |
|
|
|
}, |
|
|
|
// 明细表删除一行数据 |
|
|
|
dataDelete(row, index) { |
|
|
@ -456,8 +437,8 @@ export default { |
|
|
|
useOrgSid: '', |
|
|
|
createOrgSid: '', |
|
|
|
nodeState: '', |
|
|
|
shuntingTypeValue:'调入', |
|
|
|
shuntingTypeKey:'01', |
|
|
|
shuntingTypeValue: '调入', |
|
|
|
shuntingTypeKey: '01', |
|
|
|
baseShuntingInvoicinApplyeVehs: [] |
|
|
|
} |
|
|
|
this.list = [] |
|
|
@ -507,8 +488,7 @@ export default { |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
|
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
|
|
|
@ -521,12 +501,14 @@ export default { |
|
|
|
display: inline-block; |
|
|
|
padding-right: 10px; |
|
|
|
} |
|
|
|
.dialogImg{ |
|
|
|
|
|
|
|
.dialogImg { |
|
|
|
display: flex; |
|
|
|
flex-direction: column; |
|
|
|
justify-content: center; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
|
|
|
|
.formadd /deep/ .el-row { |
|
|
|
border: 0; |
|
|
|
} |
|
|
|