|
|
@ -320,6 +320,7 @@ |
|
|
|
<el-table-column prop="manufSaleAccessName" width="140" label="厂家销售通路" align="center"/> |
|
|
|
<el-table-column prop="contractPrice" width="180" label="厂家合同价(含运费)" align="center"/> |
|
|
|
<el-table-column prop="costPrice" width="180" label="车辆入库价(含运费)" align="center"/> |
|
|
|
<el-table-column prop="settlePrice" width="150" label="厂家结算价" align="center"/> |
|
|
|
<el-table-column prop="freight" width="130" label="运费" align="center"/> |
|
|
|
<el-table-column prop="guidedPrice" width="180" label="全款销售指导价" align="center"/> |
|
|
|
<el-table-column prop="manufactorSettlementPrice" width="180" label="贷款销售指导价" align="center"/> |
|
|
@ -499,11 +500,30 @@ |
|
|
|
<el-button size="small" @click="handleDateQuXiao">取 消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
<!-- 修改厂家结算价 --> |
|
|
|
<el-dialog :visible.sync="dialogPrice" width="50%" :close-on-click-modal="false"> |
|
|
|
<el-form :model="priceMap" class="formadd"> |
|
|
|
<el-row style="border-top: 1px solid #E0E3EB"> |
|
|
|
<el-col :span="4" class="tleftb"> |
|
|
|
<span>厂家结算价</span> |
|
|
|
</el-col> |
|
|
|
<el-col :span="20"> |
|
|
|
<el-form-item> |
|
|
|
<el-input @keyup.native="priceMap.settlePrice = getNumber(priceMap.settlePrice, 2)" v-model="priceMap.settlePrice" clearable placeholder=""/> |
|
|
|
</el-form-item> |
|
|
|
</el-col> |
|
|
|
</el-row> |
|
|
|
</el-form> |
|
|
|
<div slot="footer" class="dialog-footer"> |
|
|
|
<el-button type="primary" size="small" @click="handlePriceConfirm">确 定</el-button> |
|
|
|
<el-button size="small" @click="handlePriceQuXiao">取 消</el-button> |
|
|
|
</div> |
|
|
|
</el-dialog> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { basefinbankExportExcel, deleteBySids, pagerList, selectCarTransferListAll, updateVehRemarks, setManDate } from '@/api/cheliang/basevehicle' |
|
|
|
import { basefinbankExportExcel, deleteBySids, pagerList, selectCarTransferListAll, updateVehRemarks, setManDate, updateSettlePrice } from '@/api/cheliang/basevehicle' |
|
|
|
import { typeValues, brandDown, getOrgSidByPath, fetchByUseOrgSid, getButtonPermissions } from '@/api/cheliang/dictcommons' |
|
|
|
import cheliangtaizhangAdd from './cheliangtaizhangAdd' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
@ -537,6 +557,7 @@ export default { |
|
|
|
dialogVisible: false, |
|
|
|
dialogRemarks: false, |
|
|
|
dialogDate: false, |
|
|
|
dialogPrice: false, |
|
|
|
index: 0, |
|
|
|
activeNames: ['3'], |
|
|
|
searchxianshitit: '显示查询条件', |
|
|
@ -578,6 +599,13 @@ export default { |
|
|
|
btnKey: 'setDate', |
|
|
|
btnLabel: '设置厂家开票日期' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
|
size: 'small', |
|
|
|
icon: '', |
|
|
|
btnKey: 'setPrice', |
|
|
|
btnLabel: '修改厂家结算价' |
|
|
|
}, |
|
|
|
{ |
|
|
|
type: 'primary', |
|
|
|
size: 'small', |
|
|
@ -712,6 +740,10 @@ export default { |
|
|
|
vinSids: [], |
|
|
|
manDate: '' |
|
|
|
}, |
|
|
|
priceMap: { |
|
|
|
sid: '', |
|
|
|
settlePrice: '' |
|
|
|
}, |
|
|
|
multipleSelection: [], |
|
|
|
dialogFormVisible: false, // 添加修改对话框状态 |
|
|
|
dialogFormShowVisible: false, // 查看对话框默认关闭状态 |
|
|
@ -799,6 +831,24 @@ export default { |
|
|
|
// }) |
|
|
|
this.setDater() |
|
|
|
}, |
|
|
|
getNumber(val, limit) { |
|
|
|
val = val.replace(/[^0-9.]/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) { |
|
|
|
// 不需要小数点 |
|
|
|
val = val.replace(reg, '$1') |
|
|
|
} else { |
|
|
|
// 通过正则保留小数点后指定的位数 |
|
|
|
val = val.replace(reg, '$1.$2') |
|
|
|
} |
|
|
|
return val |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|
|
@ -826,6 +876,9 @@ export default { |
|
|
|
case 'setDate': |
|
|
|
this.setDate() |
|
|
|
break |
|
|
|
case 'setPrice': |
|
|
|
this.setPrice() |
|
|
|
break |
|
|
|
case 'doMaiduan': |
|
|
|
this.doMaiduan() |
|
|
|
break |
|
|
@ -1256,6 +1309,34 @@ export default { |
|
|
|
} |
|
|
|
this.dialogDate = false |
|
|
|
}, |
|
|
|
setPrice() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
this.dialogPrice = true |
|
|
|
this.priceMap.sid = this.sids[0] |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, message: '请选择一条记录进行修改', type: 'error' }) |
|
|
|
} |
|
|
|
}, |
|
|
|
handlePriceConfirm() { |
|
|
|
if (this.priceMap.settlePrice !== '') { |
|
|
|
updateSettlePrice({ sid: this.priceMap.sid, settlePrice: this.priceMap.settlePrice }).then((resp) => { |
|
|
|
if (resp.success) { |
|
|
|
this.$message({ showClose: true, type: 'success', message: '修改成功' }) |
|
|
|
this.handlePriceQuXiao() |
|
|
|
this.getList() |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$message({ showClose: true, type: 'error', message: '厂家结算价不能为空' }) |
|
|
|
} |
|
|
|
}, |
|
|
|
handlePriceQuXiao() { |
|
|
|
this.priceMap = { |
|
|
|
sid: '', |
|
|
|
settlePrice: '' |
|
|
|
} |
|
|
|
this.dialogPrice = false |
|
|
|
}, |
|
|
|
// 买断 |
|
|
|
doMaiduan() { |
|
|
|
if (this.sids.length > 0) { |
|
|
|