Browse Source

完善车辆台账--增加修改厂家结算价

master
yunuo970428 2 months ago
parent
commit
c2b2a68c27
  1. 9
      anrui-scm/anrui-scm-ui/src/api/cheliang/basevehicle.js
  2. 83
      anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/cheliangtaizhang.vue

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

@ -209,6 +209,15 @@ export function setManDate(data) {
})
}
// 车辆台账--修改厂家结算价
export function updateSettlePrice(data) {
return request({
url: '/base/v1/basevehicle/updateSettlePrice',
method: 'post',
params: data
})
}
// 获取厂家销售通路
export function actualList(data) {
return request({

83
anrui-scm/anrui-scm-ui/src/views/cheliang/cheliangtaizhang/cheliangtaizhang.vue

@ -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) {

Loading…
Cancel
Save