Browse Source

Merge remote-tracking branch 'origin/master'

master
God 7 months ago
parent
commit
15868ebbc4
  1. 2
      anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOutFeign.java
  2. 2
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleout/BaseVehicleOutMapper.java
  3. 1
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleout/BaseVehicleOutMapper.xml
  4. 2
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleout/BaseVehicleOutRest.java
  5. 6
      anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleout/BaseVehicleOutService.java
  6. 27
      anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderreturnvehapply/BusSalesOrderReturnVehApplyService.java
  7. 17
      anrui-scm/anrui-scm-ui/src/api/manufacturerrebates/collectionrebateallot.js
  8. 17
      anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
  9. 261
      anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/fenpeishenhe/collectionAudit.vue
  10. 218
      anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/fenpeishenhe/collectionrebateallotAdd.vue
  11. 176
      anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/fenpeishenhe/collectionrebateallotInfo.vue
  12. 220
      anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanfenpei/collectionrebateallot.vue
  13. 260
      anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanfenpei/collectionrebateallotAdd.vue
  14. 348
      anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanfenpei/collectionrebateallotByVehicleAdd.vue
  15. 184
      anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanfenpei/collectionrebateallotInfo.vue
  16. 136
      anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanfenpei/relation/collectionrebateallotSelectVehicle.vue

2
anrui-base/anrui-base-api/src/main/java/com/yxt/anrui/base/api/basevehicleout/BaseVehicleOutFeign.java

@ -91,7 +91,7 @@ public interface BaseVehicleOutFeign {
@ApiOperation("退车成功后查询出库记录")
@PostMapping("/selectByVehReturn")
@ResponseBody
public ResultBean<BaseSalesReturnVo> selectByVehReturn(@RequestParam("vinSid") String vinSid, @RequestParam("contractNo") String contractNo);
public ResultBean<List<BaseSalesReturnVo>> selectByVehReturn(@RequestParam("vinSid") String vinSid, @RequestParam("contractNo") String contractNo);
@ApiOperation("退车成功后删除出库记录")
@PostMapping("/deleteByVehReturn")

2
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleout/BaseVehicleOutMapper.java

@ -48,7 +48,7 @@ public interface BaseVehicleOutMapper extends BaseMapper<BaseVehicleOut> {
List<BaseVehicleOutVoExeclNew> listExcelNew(@Param(Constants.WRAPPER) QueryWrapper<BaseVehicleOutVoExeclNew> qw);
BaseSalesReturnVo selectByVehReturn(@Param("vinSid") String vinSid, @Param("contractNo") String contractNo);
List<BaseSalesReturnVo> selectByVehReturn(@Param("vinSid") String vinSid, @Param("contractNo") String contractNo);
void deleteByVehReturn(@Param("vinSid") String vinSid, @Param("mainSid") String mainSid);
}

1
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleout/BaseVehicleOutMapper.xml

@ -246,6 +246,7 @@
AND ba.contractNo = #{contractNo}
</select>
<update id="deleteByVehReturn">
UPDATE base_vehicle_out
SET isDelete = 1,

2
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleout/BaseVehicleOutRest.java

@ -126,7 +126,7 @@ public class BaseVehicleOutRest implements BaseVehicleOutFeign {
}
@Override
public ResultBean<BaseSalesReturnVo> selectByVehReturn(String vinSid, String contractNo) {
public ResultBean<List<BaseSalesReturnVo>> selectByVehReturn(String vinSid, String contractNo) {
return baseVehicleOutService.selectByVehReturn(vinSid,contractNo);
}

6
anrui-base/anrui-base-biz/src/main/java/com/yxt/anrui/base/biz/basevehicleout/BaseVehicleOutService.java

@ -2408,9 +2408,9 @@ public class BaseVehicleOutService extends MybatisBaseService<BaseVehicleOutMapp
return rb.success();
}
public ResultBean<BaseSalesReturnVo> selectByVehReturn(String vinSid, String contractNo) {
ResultBean<BaseSalesReturnVo> rb = ResultBean.fireFail();
BaseSalesReturnVo vo = baseMapper.selectByVehReturn(vinSid, contractNo);
public ResultBean<List<BaseSalesReturnVo>> selectByVehReturn(String vinSid, String contractNo) {
ResultBean<List<BaseSalesReturnVo>> rb = ResultBean.fireFail();
List<BaseSalesReturnVo> vo = baseMapper.selectByVehReturn(vinSid, contractNo);
return rb.success().setData(vo);
}

27
anrui-buscenter/anrui-buscenter-biz/src/main/java/com/yxt/anrui/buscenter/biz/bussalesorderreturnvehapply/BusSalesOrderReturnVehApplyService.java

@ -698,8 +698,10 @@ public class BusSalesOrderReturnVehApplyService extends MybatisBaseService<BusSa
salesReturnDetailDto.setFOwnerId(vehicleSelectVo.getOrgCode());
busSalesReturnOrdersDto.setSaleOrgId(vehicleSelectVo.getOrgCode());
}
BaseSalesReturnVo returnVo = baseVehicleOutFeign.selectByVehReturn(vehSid, busSalesOrderReturnVehApply.getContractNo()).getData();
if (null != returnVo) {
List<BaseSalesReturnVo> returnVos = baseVehicleOutFeign.selectByVehReturn(vehSid, busSalesOrderReturnVehApply.getContractNo()).getData();
if (null != returnVos) {
if (!returnVos.isEmpty()) {
for (BaseSalesReturnVo returnVo : returnVos) {
if (StringUtils.isNotBlank(returnVo.getMainSid())) {
baseVehicleOutFeign.deleteByVehReturn(vehSid, returnVo.getMainSid());
}
@ -728,6 +730,9 @@ public class BusSalesOrderReturnVehApplyService extends MybatisBaseService<BusSa
salesReturnDetails.add(salesReturnDetailDto);
}
}
}
}
}
}
baseVehicleFeign.updateLockedState(vehSid);
@ -742,12 +747,7 @@ public class BusSalesOrderReturnVehApplyService extends MybatisBaseService<BusSa
BusSalesOrderVehicle busSalesOrderVehicle = busSalesOrderVehicleService.fetchBySid(busSalesOrderReturnVehDetailsVo.getBusVinSid());
vehicleList.add(busSalesOrderVehicle);
}
//----------------------------推送金蝶销售退货单---------------------------------
salesReturnDetails.removeAll(Collections.singleton(null));
if (!salesReturnDetails.isEmpty()) {
salesReturn.setSalesReturnDetails(salesReturnDetails);
finKingDeeFeign.draftSalesReturnOrders(salesReturn);
}
//------------------------修改车辆持久状态--------------------------
vehicleList.removeAll(Collections.singleton(null));
if (!vehicleList.isEmpty()) {
@ -801,6 +801,17 @@ public class BusSalesOrderReturnVehApplyService extends MybatisBaseService<BusSa
stateQuery.setBusVinSid(busVinSidListState);
ResultBean updateStateResultBean = finUncollectedReceivablesDetailedFeign.updateKxState(stateQuery);
}
try {
//----------------------------推送金蝶销售退货单---------------------------------
salesReturnDetails.removeAll(Collections.singleton(null));
if (!salesReturnDetails.isEmpty()) {
salesReturn.setSalesReturnDetails(salesReturnDetails);
finKingDeeFeign.draftSalesReturnOrders(salesReturn);
}
} catch (Exception e) {
e.printStackTrace();
}
}
return rb.success().setData(resultBean.getData());
} else {

17
anrui-scm/anrui-scm-ui/src/api/manufacturerrebates/collectionrebateallot.js

@ -19,6 +19,14 @@ export default {
headers: { 'Content-Type': 'application/json' }
})
},
// 获取分摊参考比例
compute: function(data) {
return request({
url: '/scm/v1/scmcollectionrebatecheckapplydetail/compute',
method: 'get',
params: data
})
},
// 新增保存修改记录
save: function(data) {
return request({
@ -28,6 +36,15 @@ export default {
headers: { 'Content-Type': 'application/json' }
})
},
// 删除
delBySids: function(data) {
return request({
url: '/scm/v1/scmcollectionrebatedistribution/delBySids',
method: 'DELETE',
data: data,
headers: { 'Content-Type': 'application/json' }
})
},
// 通过sid查询一条记录
fetchBySid: function(data) {
return request({

17
anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js

@ -683,7 +683,7 @@ const codemenu = [{
component: () => import('@/views/manufacturerrebates/huikuanguanli/collectionrebatemanagement.vue'),
name: 'HuiKuanFanLiGuanLi',
meta: {
title: '厂家回款返利管理',
title: '回款返利管理',
noCache: true
}
},
@ -692,7 +692,7 @@ const codemenu = [{
component: () => import('@/views/manufacturerrebates/huikuanyuti/collectionrebatewithholding.vue'),
name: 'HuiKuanFanLiYuYiGuanLi',
meta: {
title: '厂家回款返利预提',
title: '回款返利预提',
noCache: true
}
},
@ -701,7 +701,7 @@ const codemenu = [{
component: () => import('@/views/manufacturerrebates/huikuanhedui/collectionrebatetobechecked.vue'),
name: 'HuiKuanFanLiDaiHeDui',
meta: {
title: '厂家回款返利核对',
title: '回款返利核对',
noCache: true
}
},
@ -710,7 +710,16 @@ const codemenu = [{
component: () => import('@/views/manufacturerrebates/huikuanfenpei/collectionrebateallot.vue'),
name: 'HuiKuanFanliFenPei',
meta: {
title: '厂家回款返利分摊',
title: '回款返利分摊',
noCache: true
}
},
{
path: '/fenpeishenhe/collectionAudit',
component: () => import('@/views/manufacturerrebates/fenpeishenhe/collectionAudit.vue'),
name: 'HuiKuanShenHe',
meta: {
title: '回款返利分摊审核',
noCache: true
}
},

261
anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/fenpeishenhe/collectionAudit.vue

@ -0,0 +1,261 @@
<template>
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<button-bar view-title="回款返利分摊审核管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="分公司">
<el-input v-model="listQuery.params.createOrgName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="采购系统">
<el-input v-model="listQuery.params.purchaseSystemName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="品牌">
<el-input v-model="listQuery.params.brandName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="状态">
<el-select v-model="listQuery.params.state" placeholder="请选择" clearable>
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="提交日期">
<el-date-picker v-model="listQuery.params.subitDateStart" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.subitDateEnd" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" icon="el-icon-search" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" icon="el-icon-refresh" @click="handleReset" size="small">重置</el-button>
</div>
</div>
</div>
<div class="listtop">
<div class="tit">回款返利分摊列表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;">
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column fixed label="操作" align="center" width="180">
<template slot-scope="scope">
<el-button type="primary" :disabled="scope.row.state !== '审核中'" size="mini" @click="toEdit(scope.row)">办理</el-button>
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="状态" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.state }}</span>
</template>
</el-table-column>
<el-table-column prop="createOrgName" label="分公司" align="center" min-width="150" />
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="140" />
<el-table-column prop="brandName" label="品牌" align="center" width="120" />
<el-table-column prop="subitDate" label="提交日期" align="center" width="120" />
<el-table-column prop="shareGinExaProportion" label="分摊参考比例" align="center" width="150" />
<el-table-column prop="shareProportion" label="分摊比例" align="center" width="120" />
<el-table-column prop="shareRebateTotal" label="分摊返利总额" align="center" width="150" />
<el-table-column prop="num" label="车辆台数" align="center" width="120" />
</el-table>
</div>
<div class="pages">
<!-- 翻页 -->
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
<collectionrebateallotAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<collectionrebateallotInfo v-show="viewState == 4" ref="divInfo" @doback="resetState"/>
</div>
</template>
<script>
import req from '@/api/manufacturerrebates/collectionrebateallot'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import { getOrgSidByPath } from '@/api/cheliang/dictcommons'
import collectionrebateallotAdd from './collectionrebateallotAdd'
import collectionrebateallotInfo from './collectionrebateallotInfo'
export default {
name: 'HuiKuanShenHe',
components: {
Pagination,
pageye,
ButtonBar,
collectionrebateallotAdd,
collectionrebateallotInfo
},
data() {
return {
btndisabled: false,
btnList: [
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
state_list: [
{
dictKey: '1',
dictValue: '审核中'
},
{
dictKey: '2',
dictValue: '已审核'
},
{
dictKey: '3',
dictValue: '已退回'
}
],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
createOrgName: '',
purchaseSystemName: '',
brandName: '',
createOrgSid: '',
subitDateStart: '',
subitDateEnd: '',
state: '',
isAuit: true,
orgPath: '',
userSid: '',
menuUrl: ''
},
current: 1,
size: 5,
total: 0
},
rules: {}
}
},
created() {
//
this.init()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
init() {
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
if (resp.success) {
this.listQuery.params.createOrgSid = resp.data
this.getList()
}
})
},
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'doClose':
this.doClose()
break
default:
break
}
},
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
this.listQuery.params.menuUrl = this.$route.path
req.listPage(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
this.list = []
this.listQuery.total = 0
}
})
},
//
handleFilter() {
this.listQuery.current = 1
this.getList()
},
handleReset() {
this.listQuery = {
params: {
createOrgName: '',
purchaseSystemName: '',
brandName: '',
createOrgSid: '',
subitDateStart: '',
subitDateEnd: '',
state: '',
isAuit: true,
orgPath: '',
userSid: '',
menuUrl: ''
},
current: 1,
size: 5,
total: 0
}
this.init()
},
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row, this.listQuery.params.createOrgSid)
},
toInfo(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed {
height: 100% !important;
}
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed-right {
height: 100% !important;
}
</style>

218
anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/fenpeishenhe/collectionrebateallotAdd.vue

@ -0,0 +1,218 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleConfirm()">确认</el-button>
<el-button type="danger" size="small" :disabled="submitdisabled" @click="handleBack()">退回</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="titwu"><span>回款返利分配</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="6">
<div class="span-sty">分公司</div>
<el-form-item><span class="addinputInfo">{{ formobj.createOrgName }}</span></el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">采购系统</div>
<el-form-item><span class="addinputInfo">{{ formobj.purchaseSystemName }}</span></el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">品牌</div>
<el-form-item><span class="addinputInfo">{{ formobj.brandName }}</span></el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">提交日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.subitDate }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<div class="span-sty">分摊参考比例</div>
<el-form-item><span class="addinputInfo">{{ formobj.shareGinExaProportion }}</span></el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">分摊比例</div>
<el-form-item><span class="addinputInfo">{{ formobj.shareProportion }}</span></el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">分摊返利总额</div>
<el-form-item><span class="addinputInfo">{{ formobj.shareRebateTotal }}</span></el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">台数</div>
<el-form-item><span class="addinputInfo">{{ formobj.number }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" v-for="(item, index) in formobj.urls" :key="index" :src="item" :preview-src-list="formobj.urls" /></el-form-item>
</el-col>
</el-row>
<div class="title">回款返利分摊车辆列表</div>
<el-table :key="tableKey" :data="formobj.scmCollectionRebateVehs" :index="index" border style="width: 100%">
<el-table-column width="80" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="carModelName" label="车型" align="center" min-width="150" />
<el-table-column prop="vinNo" label="车架号" align="center" width="120" />
<el-table-column prop="costPrice" label="厂家结算价" align="center" width="130" />
<el-table-column prop="priceDate" label="入库日期" align="center" width="120" />
<el-table-column prop="salesDate" label="销售日期" align="center" width="120" />
<el-table-column prop="solidDate" label="买断日期" align="center" width="120" />
<el-table-column prop="distributionCollectionRebate" label="分摊金额" align="center" width="130" />
</el-table>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/manufacturerrebates/collectionrebateallot'
export default {
name: 'HuiKuanFanLiFenPeiAdd',
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
viewState: 1,
//
formobj: {
sid: '',
useOrgName: '',
useOrgSid: '',
createOrgName: '',
createOrgSid: '',
purchaseSystemSid: '',
purchaseSystemName: '',
brandName: '',
brandSid: '',
subitDate: '',
shareGinExaProportion: '',
shareProportion: '',
shareRebateTotal: '',
number: '',
remarks: '',
state: '',
urls: [],
scmCollectionRebateVehs: []
},
rules: {},
submitdisabled: false
}
},
methods: {
showEdit(val) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '回款返利分摊'
req.fetchBySid(val.sid).then((res) => {
if (res.success) {
this.formobj = res.data
this.formobj.number = this.formobj.scmCollectionRebateVehs.length
if (this.formobj.urls.length > 0) {
const aa = []
this.formobj.urls.forEach((e) => {
aa.push(e.url)
})
this.formobj.urls = aa
}
}
})
},
handleConfirm() {
const tip = '请确认是否通过该申请?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.formobj.state = '2'
this.submitdisabled = true
req.save(this.formobj).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
})
},
handleBack() {
const tip = '请确认是否退回该申请?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.formobj.state = '3'
this.submitdisabled = true
req.save(this.formobj).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '操作成功' })
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
})
},
// ===
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
//
this.formobj = {
sid: '',
useOrgName: '',
useOrgSid: '',
createOrgName: '',
createOrgSid: '',
purchaseSystemSid: '',
purchaseSystemName: '',
brandName: '',
brandSid: '',
subitDate: '',
shareGinExaProportion: '',
shareProportion: '',
shareRebateTotal: '',
number: '',
remarks: '',
state: '',
urls: [],
scmCollectionRebateVehs: []
}
this.submitdisabled = false
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
.span-sty {
width: 140px !important;
}
.addinputInfo {
margin-left: 130px !important;
}
</style>

176
anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/fenpeishenhe/collectionrebateallotInfo.vue

@ -0,0 +1,176 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="6">
<div class="span-sty">分公司</div>
<el-form-item><span class="addinputInfo">{{ formobj.createOrgName }}</span></el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">采购系统</div>
<el-form-item><span class="addinputInfo">{{ formobj.purchaseSystemName }}</span></el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">品牌</div>
<el-form-item><span class="addinputInfo">{{ formobj.brandName }}</span></el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">提交日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.subitDate }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="6">
<div class="span-sty">分摊参考比例</div>
<el-form-item><span class="addinputInfo">{{ formobj.shareGinExaProportion }}</span></el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">分摊比例</div>
<el-form-item><span class="addinputInfo">{{ formobj.shareProportion }}</span></el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">分摊返利总额</div>
<el-form-item><span class="addinputInfo">{{ formobj.shareRebateTotal }}</span></el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">台数</div>
<el-form-item><span class="addinputInfo">{{ formobj.number }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><span class="addinputInfo">{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item><el-image class="addinputInfo" style="width: 150px;height: 150px" v-for="(item, index) in formobj.urls" :key="index" :src="item" :preview-src-list="formobj.urls" /></el-form-item>
</el-col>
</el-row>
<div class="title">回款返利分摊车辆列表</div>
<el-table :key="tableKey" :data="formobj.scmCollectionRebateVehs" :index="index" border style="width: 100%">
<el-table-column width="80" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column prop="carModelName" label="车型" align="center" min-width="150" />
<el-table-column prop="vinNo" label="车架号" align="center" width="120" />
<el-table-column prop="costPrice" label="厂家结算价" align="center" width="130" />
<el-table-column prop="priceDate" label="入库日期" align="center" width="120" />
<el-table-column prop="salesDate" label="销售日期" align="center" width="120" />
<el-table-column prop="solidDate" label="买断日期" align="center" width="120" />
<el-table-column prop="distributionCollectionRebate" label="分摊金额" align="center" width="130" />
</el-table>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/manufacturerrebates/collectionrebateallot'
export default {
name: 'HuiKuanFanLiFenPeiInfo',
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
viewState: 1,
//
formobj: {
sid: '',
useOrgName: '',
useOrgSid: '',
createOrgName: '',
createOrgSid: '',
purchaseSystemSid: '',
purchaseSystemName: '',
brandName: '',
brandSid: '',
subitDate: '',
shareGinExaProportion: '',
shareProportion: '',
shareRebateTotal: '',
number: '',
remarks: '',
state: '',
urls: [],
scmCollectionRebateVehs: []
},
rules: {},
submitdisabled: false
}
},
methods: {
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
this.formobj.number = this.formobj.scmCollectionRebateVehs.length
if (this.formobj.urls.length > 0) {
const aa = []
this.formobj.urls.forEach((e) => {
aa.push(e.url)
})
this.formobj.urls = aa
}
}
})
this.viewTitle = '回款返利分摊详情'
},
// ===
handleReturn() {
//
this.formobj = {
sid: '',
useOrgName: '',
useOrgSid: '',
createOrgName: '',
createOrgSid: '',
purchaseSystemSid: '',
purchaseSystemName: '',
brandName: '',
brandSid: '',
subitDate: '',
shareGinExaProportion: '',
shareProportion: '',
shareRebateTotal: '',
number: '',
remarks: '',
state: '',
urls: [],
scmCollectionRebateVehs: []
}
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
.span-sty {
width: 140px !important;
}
.addinputInfo {
margin-left: 130px !important;
}
</style>

220
anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanfenpei/collectionrebateallot.vue

@ -2,24 +2,30 @@
<div class="app-container">
<!-- Start 列表页面 -->
<div v-show="viewState == 1">
<button-bar view-title="回款返利分管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<button-bar view-title="回款返利分管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="分公司">
<el-input v-model="listQuery.params.createOrgName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="采购系统">
<el-input v-model="listQuery.params.purchaseSystemName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="品牌">
<el-select v-model="listQuery.params.brandSid" placeholder="请选择" filterable clearable>
<el-option v-for="item in brand_list" :key="item.sid" :label="item.name" :value="item.sid"/>
</el-select>
<el-input v-model="listQuery.params.brandName" placeholder="" clearable/>
</el-form-item>
<el-form-item label="申请标题">
<el-input v-model="listQuery.params.withholdingApply" placeholder="" clearable></el-input>
<el-form-item label="状态">
<el-select v-model="listQuery.params.state" placeholder="请选择" clearable>
<el-option v-for="item in state_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="创建日期">
<el-date-picker v-model="listQuery.params.createStartTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<el-form-item label="提交日期">
<el-date-picker v-model="listQuery.params.subitDateStart" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.createEndTime" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<el-date-picker v-model="listQuery.params.subitDateEnd" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
@ -29,68 +35,32 @@
</div>
</div>
<div class="listtop">
<div class="tit">回款返利分配申请列表</div>
<div class="tit">回款返利分列表</div>
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<div class="">
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;">
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80px"/>
<el-table-column fixed label="操作" align="center" width="180px" >
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column fixed type="selection" align="center" width="50"/>
<el-table-column fixed label="序号" type="index" :index="indexMethod" align="center" width="80" />
<el-table-column fixed label="操作" align="center" width="180">
<template slot-scope="scope">
<el-button type="primary" :disabled="scope.row.distributionState === '已分配'" size="mini" @click="toEdit(scope.row)">办理</el-button>
<el-button type="primary" :disabled="scope.row.state === '审核中' || scope.row.state === '已审核'" size="mini" @click="toEdit(scope.row)">办理</el-button>
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="状态" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.distributionState }}</span>
</template>
</el-table-column>
<el-table-column label="分公司" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.createOrgName }}</span>
</template>
</el-table-column>
<el-table-column label="品牌" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="预提申请" align="center" width="250">
<template slot-scope="scope">
<span>{{ scope.row.withholdingApply }}</span>
</template>
</el-table-column>
<el-table-column label="回款金额" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.collectionMoney }}</span>
</template>
</el-table-column>
<el-table-column label="预提返利" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.estimateRebate }}</span>
</template>
</el-table-column>
<el-table-column label="分摊参考比例" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.shareGinExaProportion }}</span>
</template>
</el-table-column>
<el-table-column label="分摊比例" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.shareProportion }}</span>
</template>
</el-table-column>
<el-table-column label="分摊返利总额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.shareRebateTotal }}</span>
</template>
</el-table-column>
<el-table-column label="本次返利余额" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.thisRebateBalance }}</span>
<span>{{ scope.row.state }}</span>
</template>
</el-table-column>
<el-table-column prop="createOrgName" label="分公司" align="center" min-width="150" />
<el-table-column prop="purchaseSystemName" label="采购系统" align="center" width="140" />
<el-table-column prop="brandName" label="品牌" align="center" width="120" />
<el-table-column prop="subitDate" label="提交日期" align="center" width="120" />
<el-table-column prop="shareGinExaProportion" label="分摊参考比例" align="center" width="150" />
<el-table-column prop="shareProportion" label="分摊比例" align="center" width="120" />
<el-table-column prop="shareRebateTotal" label="分摊返利总额" align="center" width="150" />
<el-table-column prop="num" label="车辆台数" align="center" width="120" />
</el-table>
</div>
<div class="pages">
@ -99,9 +69,8 @@
</div>
</div>
</div>
<collectionrebateallotByVehicleAdd v-show="viewState == 2" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<collectionrebateallotInfo v-show="viewState == 3" ref="divInfo" @doback="resetState"/>
<collectionrebateallotByVehicleAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<collectionrebateallotInfo v-show="viewState == 4" ref="divInfo" @doback="resetState"/>
</div>
</template>
@ -110,9 +79,9 @@ import req from '@/api/manufacturerrebates/collectionrebateallot'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import { brandDown, getOrgSidByPath } from '@/api/cheliang/dictcommons'
import { getOrgSidByPath } from '@/api/cheliang/dictcommons'
import collectionrebateallotByVehicleAdd from './collectionrebateallotByVehicleAdd'
import collectionrebateallotInfo from './collectionrebateallotInfo'
import collectionrebateallotInfo from '../fenpeishenhe/collectionrebateallotInfo'
export default {
name: 'HuiKuanFanLiFenPei',
@ -127,6 +96,20 @@ export default {
return {
btndisabled: false,
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'info',
size: 'small',
@ -141,16 +124,37 @@ export default {
// -----------
tableKey: 0,
list: [],
sids: [],
state_list: [
{
dictKey: '0',
dictValue: '未审核'
},
{
dictKey: '1',
dictValue: '审核中'
},
{
dictKey: '2',
dictValue: '已审核'
},
{
dictKey: '3',
dictValue: '已退回'
}
],
FormLoading: false,
listLoading: false,
brand_list: [],
listQuery: {
params: {
brandSid: '',
createOrgName: '',
purchaseSystemName: '',
brandName: '',
createOrgSid: '',
createStartTime: '',
createEndTime: '',
withholdingApply: '',
subitDateStart: '',
subitDateEnd: '',
state: '',
isAuit: false,
orgPath: '',
userSid: '',
menuUrl: ''
@ -174,11 +178,6 @@ export default {
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
if (resp.success) {
this.listQuery.params.createOrgSid = resp.data
brandDown({ useOrg: resp.data }).then((res) => {
if (res.success) {
this.brand_list = res.data
}
})
this.getList()
}
})
@ -195,6 +194,12 @@ export default {
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doDel':
this.doDel()
break
case 'doClose':
this.doClose()
break
@ -208,6 +213,13 @@ export default {
var pageindex = index + 1 + pagestart
return pageindex
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
},
//
getList() {
this.listLoading = true
@ -217,7 +229,7 @@ export default {
req.listPage(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (response.success && response.data && response.data.total > 0) {
if (response.success) {
this.list = response.data.records
this.listQuery.total = response.data.total
} else {
@ -234,11 +246,14 @@ export default {
handleReset() {
this.listQuery = {
params: {
brandSid: '',
createOrgName: '',
purchaseSystemName: '',
brandName: '',
createOrgSid: '',
createStartTime: '',
createEndTime: '',
withholdingApply: '',
subitDateStart: '',
subitDateEnd: '',
state: '',
isAuit: false,
orgPath: '',
userSid: '',
menuUrl: ''
@ -249,14 +264,47 @@ export default {
}
this.init()
},
toEdit(row) {
toAdd() {
this.viewState = 2
this.$refs['divAdd'].showAdd(this.listQuery.params.createOrgSid)
},
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row, this.listQuery.params.createOrgSid)
},
toInfo(row) {
this.viewState = 3
this.viewState = 4
this.$refs['divInfo'].showInfo(row)
},
doDel() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
req.delBySids(this.sids).then(resp => {
if (resp.success) {
this.$message({ type: 'success', message: resp.msg, showClose: true })
}
this.getList()
loading.close()
}).catch(e => {
loading.close()
})
}).catch(() => {
})
},
resetState() {
this.viewState = 1
},
@ -268,4 +316,12 @@ export default {
}
</script>
<style scoped>
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed {
height: 100% !important;
}
/*表格列设置fixed后固定列出现下边框的设置*/
/deep/ .el-table__fixed-right {
height: 100% !important;
}
</style>

260
anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanfenpei/collectionrebateallotAdd.vue

@ -1,260 +0,0 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="handleSave()">保存</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="titwu"><span>回款返利分配</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="3" class="tleftb">
<span>回款金额</span>
</el-col>
<el-col :span="5">
<el-form-item>
<span>{{ formobj.collectionMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span>预提返利</span>
</el-col>
<el-col :span="5">
<el-form-item>
<span>{{ formobj.estimateRebate }}</span>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span>分摊参考比例</span>
</el-col>
<el-col :span="5">
<el-form-item>
<span>{{ formobj.shareGinExaProportion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3" class="tleftb">
<span>分摊比例</span>
</el-col>
<el-col :span="5">
<el-form-item>
<el-input v-model="formobj.shareProportion" @input="shareProportionInput" @keyup.native="formobj.shareProportion = getNumber(formobj.shareProportion, 2)" clearable placeholder="" class="addinputw"/>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span>分摊返利总额</span>
</el-col>
<el-col :span="5">
<el-form-item>
<span>{{ formobj.shareRebateTotal }}</span>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span>本次返利余额</span>
</el-col>
<el-col :span="5">
<el-form-item>
<span>{{ formobj.thisRebateBalance }}</span>
</el-form-item>
</el-col>
</el-row>
<div class="title">
<div style="text-align: right">
<el-button type="primary" size="mini" class="btntopblueline" @click="handleAllocation()">分配</el-button>
</div>
</div>
<el-table :key="tableKey" :data="formobj.scmCollectionRebateDistributionVehs" :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">
<span>{{ scope.row.carModelName }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="厂家结算价" align="center">
<template slot-scope="scope">
<span>{{ scope.row.costPrice }}</span>
</template>
</el-table-column>
<el-table-column label="入库日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.priceDate }}</span>
</template>
</el-table-column>
<el-table-column label="销售日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.salesDate }}</span>
</template>
</el-table-column>
<el-table-column label="回款返利" align="center">
<template slot-scope="scope">
<span>{{ scope.row.distributionCollectionRebate }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/manufacturerrebates/collectionrebateallot'
export default {
name: 'HuiKuanFanLiFenPeiAdd',
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
viewState: 1,
aggregate: '',
//
formobj: {
sid: '',
brandName: '',
brandSid: '',
distributionState: '',
shareGinExaProportion: '',
shareProportion: '',
shareRebateTotal: '',
thisRebateBalance: '',
estimateRebate: '',
collectionMoney: '',
useOrgName: '',
useOrgSid: '',
createOrgName: '',
createOrgSid: '',
withholdingApply: '',
orgPath: '',
scmCollectionRebateDistributionVehs: []
},
rules: {},
submitdisabled: false
}
},
methods: {
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
},
showEdit(val) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.formobj.sid = val.sid
this.formobj.createOrgSid = val.createOrgSid
this.formobj.useOrgSid = val.useOrgSid
this.formobj.createOrgName = val.createOrgName
this.formobj.useOrgName = val.useOrgName
this.formobj.brandName = val.brandName
this.formobj.brandSid = val.brandSid
this.formobj.collectionMoney = val.collectionMoney
this.formobj.estimateRebate = val.estimateRebate
this.formobj.withholdingApply = val.withholdingApply
this.formobj.distributionState = '已分配'
this.formobj.scmCollectionRebateDistributionVehs = val.scmCollectionRebateDistributionVehs
// = /
this.formobj.shareGinExaProportion = Math.round((parseFloat(this.formobj.estimateRebate !== '' ? this.formobj.estimateRebate : 0) / parseFloat(this.formobj.collectionMoney !== '' ? this.formobj.collectionMoney : 0)) * 100) / 100
this.viewTitle = '回款返利分配'
},
shareProportionInput() {
// = *
this.formobj.shareRebateTotal = Math.round((parseFloat(this.formobj.collectionMoney !== '' ? this.formobj.collectionMoney : 0) * parseFloat(this.formobj.shareProportion !== '' ? this.formobj.shareProportion : 0)) * 100) / 100
// = -
this.formobj.thisRebateBalance = parseFloat(this.formobj.estimateRebate !== '' ? this.formobj.estimateRebate : 0) - parseFloat(this.formobj.shareRebateTotal !== '' ? this.formobj.shareRebateTotal : 0)
},
handleAllocation() {
for (var i = 0; i < this.formobj.scmCollectionRebateDistributionVehs.length; i++) {
// = *
this.formobj.scmCollectionRebateDistributionVehs[i].distributionCollectionRebate = Math.round((parseFloat(this.formobj.scmCollectionRebateDistributionVehs[i].costPrice !== '' ? this.formobj.scmCollectionRebateDistributionVehs[i].costPrice : 0) * (parseFloat(this.formobj.shareProportion !== '' ? this.formobj.shareProportion : 0) / 100)) * 100) / 100
}
},
handleSave() {
if (this.formobj.shareProportion === '') {
this.$message({ showClose: true, type: 'error', message: '分摊比例不能为空' })
return
}
for (var i = 0; i < this.formobj.scmCollectionRebateDistributionVehs.length; i++) {
if (this.formobj.scmCollectionRebateDistributionVehs[i].distributionCollectionRebate === '') {
this.$message({ showClose: true, type: 'error', message: '请点击分配后在保存' })
return
}
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.save(this.formobj).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: '保存成功' })
this.handleReturn()
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
// ===
handleReturn() {
//
this.formobj = {
sid: '',
brandName: '',
brandSid: '',
distributionState: '',
shareGinExaProportion: '',
shareProportion: '',
shareRebateTotal: '',
thisRebateBalance: '',
estimateRebate: '',
collectionMoney: '',
useOrgName: '',
useOrgSid: '',
createOrgName: '',
createOrgSid: '',
orgPath: '',
scmCollectionRebateDistributionVehs: []
}
this.submitdisabled = false
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
.title {
padding: 7px;
}
</style>

348
anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanfenpei/collectionrebateallotByVehicleAdd.vue

@ -7,107 +7,111 @@
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="save()">保存</el-button>
<el-button type="primary" size="small" :disabled="submitdisabled" @click="submit()">提交</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="titwu"><span>返利分配选择车辆</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formaddcopy02">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="2" class="tleftb">
<span>品牌</span>
<el-col :span="6">
<div class="span-sty">分公司</div>
<el-form-item><span class="addinputInfo">{{ formobj.createOrgName }}</span></el-form-item>
</el-col>
<el-col :span="4">
<el-form-item>
<span>{{ formobj.brandName }}</span>
<el-col :span="6">
<div class="span-sty"><span class="icon">*</span>采购系统</div>
<el-form-item prop="purchaseSystemName">
<el-select class="addinputInfo" v-model="formobj.purchaseSystemName" placeholder="请选择" @change="changeOrgDept" clearable filterable>
<el-option v-for="item in orgDept_list" :key="item.deptSid" :label="item.purchaseSystemName" :value="item.purchaseSystemName"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<span>回款金额</span>
</el-col>
<el-col :span="4">
<el-form-item>
<span>{{ formobj.collectionMoney }}</span>
<el-col :span="6">
<div class="span-sty"><span class="icon">*</span>品牌</div>
<el-form-item prop="brandName">
<el-select class="addinputInfo" v-model="formobj.brandName" placeholder="请选择" @change="changeCarBrand" clearable filterable>
<el-option v-for="item in carBrand_list" :key="item.sid" :label="item.brandName" :value="item.brandName"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<span>车辆台数</span>
<el-col :span="6">
<div class="span-sty">提交日期</div>
<el-form-item><span class="addinputInfo">{{ formobj.subitDate }}</span></el-form-item>
</el-col>
<el-col :span="4">
<el-form-item>
<span>{{ formobj.number }}</span>
</el-form-item>
</el-row>
<el-row>
<el-col :span="6">
<div class="span-sty">分摊参考比例</div>
<el-form-item><span class="addinputInfo">{{ formobj.shareGinExaProportion }}</span></el-form-item>
</el-col>
<el-col :span="6">
<div class="span-sty">分摊比例</div>
<el-form-item><span class="addinputInfo">{{ formobj.shareProportion }}</span></el-form-item>
</el-col>
<el-col :span="2" class="tleftb">
<span>厂家结算价合计</span>
<el-col :span="6">
<div class="span-sty">分摊返利总额</div>
<el-form-item><span class="addinputInfo">{{ shareRebateTotal }}</span></el-form-item>
</el-col>
<el-col :span="4">
<el-col :span="6">
<div class="span-sty">台数</div>
<el-form-item><span class="addinputInfo">{{ formobj.number }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">备注</div>
<el-form-item><el-input class="addinputInfo addinputw" v-model="formobj.remarks" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="24">
<div class="span-sty">附件</div>
<el-form-item>
<span>{{ formobj.constPrice }}</span>
<uploadImg ref="uploadImg" class="addinputInfo" v-model="formobj.urls" :limit="50" bucket="map" :upload-data="{ type: '0001' }"/>
</el-form-item>
</el-col>
</el-row>
<div class="title">
<div style="text-align: right">
<div class="title titleOne">
<div>回款返利分摊车辆列表</div>
<el-button type="primary" size="mini" icon="el-icon-plus" class="btntopblueline" @click="handleSelect()">选择</el-button>
<el-button type="primary" size="mini" class="btntopblueline" @click="handleRebate()">确定</el-button>
</div>
</div>
<el-table :key="tableKey" :data="formobj.scmCollectionRebateDistributionVehs" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed width="80" label="操作" align="center">
<template slot-scope="scope">
<el-button type="danger" size="mini" @click="dataDelete(scope)">删除</el-button>
</template>
</el-table-column>
<el-table-column label="车型" align="center">
<el-table :key="tableKey" :data="formobj.scmCollectionRebateVehs" :index="index" border style="width: 100%">
<el-table-column width="80" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column width="80" label="操作" align="center">
<template slot-scope="scope">
<span>{{ scope.row.carModelName }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="厂家结算价" align="center">
<template slot-scope="scope">
<span>{{ scope.row.costPrice }}</span>
</template>
</el-table-column>
<el-table-column label="入库日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.priceDate }}</span>
</template>
</el-table-column>
<el-table-column label="销售日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.salesDate }}</span>
<el-button type="danger" size="mini" @click="dataDelete(scope.$index)">删除</el-button>
</template>
</el-table-column>
<el-table-column prop="carModelName" label="车型" align="center" min-width="150" />
<el-table-column prop="vinNo" label="车架号" align="center" width="120" />
<el-table-column prop="costPrice" label="厂家结算价" align="center" width="130" />
<el-table-column prop="priceDate" label="入库日期" align="center" width="120" />
<el-table-column prop="salesDate" label="销售日期" align="center" width="120" />
<el-table-column prop="solidDate" label="买断日期" align="center" width="120" />
<el-table-column prop="distributionCollectionRebate" label="分摊金额" align="center" width="130" />
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
<collectionrebateallotSelectVehicle v-show="viewState == 2" ref="divSelect" @backData="backData" @doback="resetState"/>
<collectionrebateallotAdd v-show="viewState == 3" ref="divAdd" @doback="reset"/>
<collectionrebateallotSelectVehicle v-show="viewState == 2" ref="divSelect" @backData="backData" @doback="resetState" />
</div>
</template>
<script>
import req from '@/api/manufacturerrebates/collectionrebateallot'
import { fetchBySid } from '@/api/cheliang/dictcommons'
import { brandDown, fetchBySid, fetchDetailsByUseOrgSid } from '@/api/cheliang/dictcommons'
import collectionrebateallotSelectVehicle from './relation/collectionrebateallotSelectVehicle'
import collectionrebateallotAdd from './collectionrebateallotAdd'
import uploadImg from '@/components/uploadFile/uploadImg'
export default {
name: 'HuiKuanFanLiFenPeiByVehicleAdd',
components: {
collectionrebateallotSelectVehicle,
collectionrebateallotAdd
uploadImg
},
data() {
return {
@ -115,25 +119,48 @@ export default {
index: 0,
tableKey: 0,
viewState: 1,
aggregate: '',
submitdisabled: false,
orgDept_list: [], //
carBrand_list: [], //
//
formobj: {
sid: '',
brandName: '',
brandSid: '',
number: '',
constPrice: '',
estimateRebate: '',
collectionMoney: '',
withholdingApply: '',
useOrgName: '',
useOrgSid: '',
createOrgName: '',
createOrgSid: '',
scmCollectionRebateDistributionVehs: []
purchaseSystemSid: '',
purchaseSystemName: '',
brandName: '',
brandSid: '',
subitDate: '',
shareGinExaProportion: '',
shareProportion: '',
shareRebateTotal: '',
number: '',
remarks: '',
state: '',
urls: [],
scmCollectionRebateVehs: []
},
rules: {},
submitdisabled: false
rules: {
purchaseSystemName: [{ required: true, message: '采购系统不能为空', trigger: 'change' }],
brandName: [{ required: true, message: '品牌不能为空', trigger: 'change' }]
}
}
},
computed: {
shareRebateTotal() {
let shareRebate = '0'
if (this.formobj.scmCollectionRebateVehs.length > 0) {
this.formobj.scmCollectionRebateVehs.forEach((e) => {
// = /
e.distributionCollectionRebate = Math.round((parseFloat(e.costPrice !== '' ? e.costPrice : 0) * (parseFloat(this.formobj.shareProportion !== '' ? this.formobj.shareProportion : 0) / 100)) * 100) / 100
// =
shareRebate = Math.round((parseFloat(shareRebate) + parseFloat(e.distributionCollectionRebate)) * 100) / 100
})
}
return shareRebate
}
},
methods: {
@ -144,6 +171,25 @@ export default {
this.formobj.useOrgName = res.data.name
}
})
brandDown({ useOrg: this.formobj.createOrgSid }).then((res) => {
if (res.success) {
this.carBrand_list = res.data
}
})
fetchDetailsByUseOrgSid(this.formobj.createOrgSid).then((res) => {
if (res.success) {
this.orgDept_list = res.data
}
})
},
showAdd(createOrgSid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
this.init()
})
this.formobj.createOrgSid = createOrgSid
this.formobj.useOrgSid = createOrgSid
this.viewTitle = '【新增】回款返利分摊'
},
showEdit(row, createOrgSid) {
this.$nextTick(() => {
@ -152,80 +198,115 @@ export default {
})
this.formobj.createOrgSid = createOrgSid
this.formobj.useOrgSid = createOrgSid
this.viewTitle = '【编辑】回款返利分摊'
req.fetchBySid(row.sid).then((resp) => {
if (resp.success) {
this.formobj = resp.data
this.formobj.number = this.formobj.scmCollectionRebateVehs.length
}
})
this.viewTitle = '【编辑】回款返利'
},
handleSelect() {
this.viewState = 2
this.$refs['divSelect'].showData(this.formobj.scmCollectionRebateDistributionVehs, this.formobj.brandSid)
},
//
dataDelete(index) {
this.formobj.scmCollectionRebateDistributionVehs.splice(index, 1)
if (this.formobj.scmCollectionRebateDistributionVehs.length === 0) {
this.formobj.number = ''
this.formobj.constPrice = ''
changeOrgDept(value) {
const choose = this.orgDept_list.filter((item) => item.purchaseSystemName === value)
if (choose !== null && choose.length > 0) {
this.formobj.purchaseSystemSid = choose[0].deptSid
this.formobj.shareProportion = choose[0].shareProportion
req.compute({ createOrgSid: this.formobj.createOrgSid, purchaseSystemSid: this.formobj.purchaseSystemSid }).then((res) => {
if (res.success) {
this.formobj.shareGinExaProportion = res.data
}
})
} else {
this.formobj.number = this.formobj.scmCollectionRebateDistributionVehs.length
for (var i = 0; i < this.formobj.scmCollectionRebateDistributionVehs.length; i++) {
if (this.formobj.scmCollectionRebateDistributionVehs[i].costPrice !== '' && i === 0) {
this.formobj.constPrice = parseFloat(this.formobj.scmCollectionRebateDistributionVehs[i].costPrice)
this.formobj.purchaseSystemSid = ''
this.formobj.shareProportion = ''
this.formobj.shareGinExaProportion = ''
}
},
changeCarBrand(value) {
const choose = this.carBrand_list.filter((item) => item.brandName === value)
if (choose !== null && choose.length > 0) {
this.formobj.brandSid = choose[0].sid
} else {
this.formobj.constPrice = parseFloat(this.formobj.scmCollectionRebateDistributionVehs[i].costPrice) + parseFloat(this.formobj.constPrice)
this.formobj.brandSid = ''
}
},
handleSelect() {
if (this.formobj.purchaseSystemName !== '') {
if (this.formobj.shareProportion !== '') {
this.viewState = 2
this.$refs['divSelect'].showData(this.formobj.scmCollectionRebateVehs, this.formobj.createOrgSid, this.formobj.purchaseSystemSid)
} else {
this.$message({ showClose: true, type: 'error', message: '请维护该采购系统的分摊比例' })
}
} else {
this.$message({ showClose: true, type: 'error', message: '请先选择采购系统' })
}
},
// --
//
dataDelete(index) {
this.formobj.scmCollectionRebateVehs.splice(index, 1)
},
//
backData(value) {
this.viewState = 1
if (value.length > 0) {
value.forEach((e) => {
this.formobj.scmCollectionRebateDistributionVehs.push({
this.formobj.scmCollectionRebateVehs.push({
carModelName: e.vehicleAlias,
carModelSid: e.carModelSid,
vinNo: e.vinNo,
costPrice: e.guidedPrice,
priceDate: e.priceDate,
salesDate: e.salesDate,
solidDate: e.solidDate,
distributionCollectionRebate: '',
mainSid: '',
sid: ''
})
})
this.formobj.number = value.length
for (var i = 0; i < this.formobj.scmCollectionRebateDistributionVehs.length; i++) {
if (this.formobj.scmCollectionRebateDistributionVehs[i].costPrice !== '' && i === 0) {
this.formobj.constPrice = parseFloat(this.formobj.scmCollectionRebateDistributionVehs[i].costPrice)
} else {
this.formobj.constPrice = parseFloat(this.formobj.scmCollectionRebateDistributionVehs[i].costPrice) + parseFloat(this.formobj.constPrice)
}
}
}
},
handleRebate() {
if (this.formobj.scmCollectionRebateDistributionVehs.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择需要返利分配的车辆' })
return
} else {
if (parseFloat(this.formobj.estimateRebate) - parseFloat(this.formobj.constPrice) < 0) {
this.$message({ showClose: true, type: 'error', message: '厂家结算价之和不应大于回款金额' })
return
}
this.viewState = 3
this.$refs['divAdd'].showEdit(this.formobj)
this.formobj.number = this.formobj.scmCollectionRebateVehs.length
}
},
resetState() {
this.viewState = 1
},
reset() {
this.viewState = 1
save() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.formobj.shareRebateTotal = this.shareRebateTotal
this.formobj.state = '0'
this.submitdisabled = true
req.save(this.formobj).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},
submit() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.formobj.shareRebateTotal = this.shareRebateTotal
this.formobj.state = '1'
this.submitdisabled = true
req.save(this.formobj).then((resp) => {
if (resp.success) {
this.$message({ showClose: true, type: 'success', message: resp.msg })
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},
// ===
handleReturn(isreload) {
@ -233,19 +314,25 @@ export default {
//
this.formobj = {
sid: '',
brandName: '',
brandSid: '',
number: '',
constPrice: '',
withholdingApply: '',
estimateRebate: '',
collectionMoney: '',
useOrgName: '',
useOrgSid: '',
createOrgName: '',
createOrgSid: '',
scmCollectionRebateDistributionVehs: []
purchaseSystemSid: '',
purchaseSystemName: '',
brandName: '',
brandSid: '',
subitDate: '',
shareGinExaProportion: '',
shareProportion: '',
shareRebateTotal: '',
number: '',
remarks: '',
state: '',
urls: [],
scmCollectionRebateVehs: []
}
this.submitdisabled = false
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
@ -253,8 +340,25 @@ export default {
}
</script>
<style scoped>
.title {
.span-sty {
width: 140px !important;
}
.addinputInfo {
margin-left: 130px !important;
}
.formaddcopy02 .el-row .el-col /deep/ .el-form-item .addinputw {
margin-left: 130px !important;
width: calc(100% - 125px);
}
/deep/ .el-form-item__error {
margin-left: 130px !important;
}
.titleOne {
padding: 7px;
display: flex;
flex-direction: row;
justify-content: space-between;
align-items: center;
}
</style>

184
anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanfenpei/collectionrebateallotInfo.vue

@ -1,184 +0,0 @@
<template>
<div class="app-container">
<div v-show="viewState == 1">
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="titwu"><span>回款返利分配</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="3" class="tleftb">
<span>回款金额</span>
</el-col>
<el-col :span="5">
<el-form-item>
<span>{{ formobj.collectionMoney }}</span>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span>预提返利</span>
</el-col>
<el-col :span="5">
<el-form-item>
<span>{{ formobj.estimateRebate }}</span>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span>分摊参考比例</span>
</el-col>
<el-col :span="5">
<el-form-item>
<span>{{ formobj.shareGinExaProportion }}</span>
</el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="3" class="tleftb">
<span>分摊比例</span>
</el-col>
<el-col :span="5">
<el-form-item>
<span>{{ formobj.shareProportion }}</span>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span>分摊返利总额</span>
</el-col>
<el-col :span="5">
<el-form-item>
<span>{{ formobj.shareRebateTotal }}</span>
</el-form-item>
</el-col>
<el-col :span="3" class="tleftb">
<span>本次返利余额</span>
</el-col>
<el-col :span="5">
<el-form-item>
<span>{{ formobj.thisRebateBalance }}</span>
</el-form-item>
</el-col>
</el-row>
<el-table :key="tableKey" :data="formobj.scmCollectionRebateDistributionVehs" :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">
<span>{{ scope.row.carModelName }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="厂家结算价" align="center">
<template slot-scope="scope">
<span>{{ scope.row.costPrice }}</span>
</template>
</el-table-column>
<el-table-column label="入库日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.priceDate }}</span>
</template>
</el-table-column>
<el-table-column label="销售日期" align="center">
<template slot-scope="scope">
<span>{{ scope.row.salesDate }}</span>
</template>
</el-table-column>
<el-table-column label="回款返利" align="center">
<template slot-scope="scope">
<span>{{ scope.row.distributionCollectionRebate }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
</div>
</template>
<script>
import req from '@/api/manufacturerrebates/collectionrebateallot'
export default {
name: 'HuiKuanFanLiFenPeiInfo',
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
viewState: 1,
aggregate: '',
//
formobj: {
sid: '',
brandName: '',
brandSid: '',
distributionState: '',
shareGinExaProportion: '',
shareProportion: '',
shareRebateTotal: '',
thisRebateBalance: '',
estimateRebate: '',
collectionMoney: '',
useOrgName: '',
useOrgSid: '',
createOrgName: '',
createOrgSid: '',
withholdingApply: '',
scmCollectionRebateDistributionVehs: []
},
rules: {},
submitdisabled: false
}
},
methods: {
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchBySid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
this.viewTitle = '回款返利分配详情'
},
// ===
handleReturn() {
//
this.formobj = {
sid: '',
brandName: '',
brandSid: '',
distributionState: '',
shareGinExaProportion: '',
shareProportion: '',
shareRebateTotal: '',
thisRebateBalance: '',
estimateRebate: '',
collectionMoney: '',
useOrgName: '',
useOrgSid: '',
createOrgName: '',
createOrgSid: '',
scmCollectionRebateDistributionVehs: []
}
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

136
anrui-scm/anrui-scm-ui/src/views/manufacturerrebates/huikuanfenpei/relation/collectionrebateallotSelectVehicle.vue

@ -13,26 +13,26 @@
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="120px" class="tab-header">
<el-form-item label="品牌">
<el-select v-model="listQuery.params.brandSid" disabled class="addinputw" placeholder="请选择" filterable>
<el-option v-for="item in carbrand_list" :key="item.sid" :label="item.brandName" :value="item.sid"/>
</el-select>
</el-form-item>
<el-form-item label="车型">
<el-input v-model="listQuery.params.modelNameAndCode" clearable class="addinputw" placeholder=""/>
<el-input v-model="listQuery.params.vehicleAlias" placeholder="" clearable style="width: 150px"/>
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" clearable class="addinputw" placeholder=""/>
<el-input v-model="listQuery.params.vinNo" placeholder="" clearable style="width: 150px"/>
</el-form-item>
<el-form-item label="入库日期">
<el-date-picker v-model="listQuery.params.applicationDateStart" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.applicationDateEnd" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="颜色">
<el-select v-model="listQuery.params.carColorKey" placeholder="请选择" clearable class="addinputw" filterable>
<el-option v-for="item in carColor_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
<el-form-item label="销售日期">
<el-date-picker v-model="listQuery.params.salesStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.salesEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
<el-form-item label="存放地点">
<el-select v-model="listQuery.params.location" class="addinputw" clearable placeholder="请选择" filterable>
<el-option v-for="item in location_list" :key="item.sid" :label="item.warehouseName" :value="item.sid"/>
</el-select>
<el-form-item label="买断日期">
<el-date-picker v-model="listQuery.params.solidStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
<span style="padding: 0 8px"></span>
<el-date-picker v-model="listQuery.params.solidEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
@ -43,42 +43,17 @@
</div>
<div class="listtop">
<div class="tit">现车列表</div>
<!-- <pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>-->
</div>
<div class="">
<el-table :key="tableKey" ref="multipleTable" v-loading="listLoading" :data="list" border style="width: 100%" @selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center"/>
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column label="品牌" align="center">
<template slot-scope="scope">
<span>{{ scope.row.brandName }}</span>
</template>
</el-table-column>
<el-table-column label="车型" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vehicleAlias }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="颜色" align="center">
<template slot-scope="scope">
<span>{{ scope.row.color }}</span>
</template>
</el-table-column>
<el-table-column label="存放地点" align="center">
<template slot-scope="scope">
<span>{{ scope.row.location }}</span>
</template>
</el-table-column>
<el-table-column label="厂家结算价" align="center">
<template slot-scope="scope">
<span>{{ scope.row.guidedPrice }}</span>
</template>
</el-table-column>
<el-table-column prop="vehicleAlias" label="车型" align="center" min-width="150" />
<el-table-column prop="vinNo" label="车架号" align="center" width="120" />
<el-table-column prop="guidedPrice" label="厂家结算价" align="center" width="130" />
<el-table-column prop="priceDate" label="入库日期" align="center" width="120" />
<el-table-column prop="salesDate" label="销售日期" align="center" width="120" />
<el-table-column prop="solidDate" label="买断日期" align="center" width="120" />
</el-table>
</div>
<div class="pages">
@ -94,7 +69,6 @@
<script>
import Pagination from '@/components/pagination'
import req from '@/api/manufacturerrebates/collectionrebateallot'
import { brandDown, fetchByUseOrgSid, getOrgSidByPath, typeValues } from '@/api/cheliang/dictcommons.js'
export default {
name: 'xianchechaxun',
@ -103,9 +77,6 @@ export default {
},
data() {
return {
carbrand_list: [], //
carColor_list: [], //
location_list: [], //
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
@ -116,12 +87,16 @@ export default {
current: 1,
size: 5,
params: {
brandSid: '',
modelNameAndCode: '',
purchaseSystemSid: '',
vehicleAlias: '',
vinNo: '',
carColorKey: '',
location: '',
userSid: '',
applicationDateStart: '',
applicationDateEnd: '',
salesStartDate: '',
salesEndDate: '',
solidStartDate: '',
solidEndDate: '',
createOrgSid: '',
vinNoList: []
},
total: 0
@ -138,28 +113,6 @@ export default {
this.searchxianshitit = '显示查询条件'
}
},
init() {
typeValues({ type: 'bodyColor' }).then((resp) => {
if (resp.success) {
this.carColor_list = resp.data
}
})
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((res) => {
if (res.success) {
brandDown({ useOrg: res.data }).then((resp) => {
if (resp.success) {
this.carbrand_list = resp.data
}
})
fetchByUseOrgSid({ sid: res.data }).then((respsone) => {
if (respsone.success) {
this.location_list = respsone.data
}
})
}
})
this.getList()
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
@ -172,7 +125,6 @@ export default {
//
getList() {
this.listLoading = true
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
req.pageList(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
@ -191,11 +143,14 @@ export default {
this.listQuery.current = 1
this.listQuery.size = 5
this.listQuery.total = 0
this.listQuery.params.modelNameAndCode = ''
this.listQuery.params.vehicleAlias = ''
this.listQuery.params.vinNo = ''
this.listQuery.params.carColorKey = ''
this.listQuery.params.location = ''
this.listQuery.params.userSid = ''
this.listQuery.params.applicationDateStart = ''
this.listQuery.params.applicationDateEnd = ''
this.listQuery.params.salesStartDate = ''
this.listQuery.params.salesEndDate = ''
this.listQuery.params.solidStartDate = ''
this.listQuery.params.solidEndDate = ''
this.getList()
},
handleSelectionChange(row) {
@ -208,12 +163,13 @@ export default {
vinNo: element.vinNo,
guidedPrice: element.guidedPrice,
priceDate: element.priceDate,
salesDate: element.salesDate
salesDate: element.salesDate,
solidDate: element.solidDate
})
})
this.sids = aa
},
showData(value, carBrandSid) {
showData(value, createOrgSid, purchaseSystemSid) {
const aa = []
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
@ -226,20 +182,16 @@ export default {
this.listQuery.current = 1
this.listQuery.total = 0
this.listQuery.size = 5
this.listQuery.params.brandSid = carBrandSid
this.init()
this.listQuery.params.createOrgSid = createOrgSid
this.listQuery.params.purchaseSystemSid = purchaseSystemSid
this.getList()
},
//
AddUpdateReturn() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
this.$notify({
title: '提示',
message: '请选择至少一条车型记录!',
type: 'error',
duration: 2000
})
this.$notify({ title: '提示', message: '请选择至少一条车型记录!', type: 'error', duration: 2000 })
}
}
}

Loading…
Cancel
Save