Browse Source

开发未售买断管理的前端页面代码

master
yunuo970428 3 years ago
parent
commit
01e1ec1db3
  1. 29
      anrui-scm/anrui-scm-ui/src/api/cheliang/dictcommons.js
  2. 92
      anrui-scm/anrui-scm-ui/src/api/weishoumaiduan/unsold.js
  3. 31
      anrui-scm/anrui-scm-ui/src/router/modules/codemenu.js
  4. 279
      anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldAdd.vue
  5. 145
      anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldInfo.vue
  6. 322
      anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldguanli.vue
  7. 370
      anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/vehicle.vue
  8. 366
      anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/weishoumaiduanInfo.vue
  9. 0
      anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/weushoumaiduanEdit.vue

29
anrui-scm/anrui-scm-ui/src/api/cheliang/dictcommons.js

@ -1,5 +1,4 @@
import request from '@/utils/request'
import qs from 'qs';
export function typeValues(data) {
return request({
@ -8,4 +7,30 @@ export function typeValues(data) {
params: data
})
}
//rearAxle 后桥 speedRatio速比
// 品牌下拉
export function brandDown(data) {
return request({
url: '/base/v1/basevehiclebrand/namesDown',
method: 'get',
params: data
})
}
// 获取分公司
export function getListOrg(data) {
return request({
url: '/portal/v1/sysorganization/getListOrg',
method: 'get',
params: data
})
}
// 根据登陆人sid查询分公司
export function getPathSidByUserSid(data) {
return request({
url: '/portal/v1/sysstafforg/getPathSidByUserSid',
method: 'get',
params: data
})
}

92
anrui-scm/anrui-scm-ui/src/api/weishoumaiduan/unsold.js

@ -0,0 +1,92 @@
import request from '@/utils/request'
export default {
// 查询分页列表
listPage: function(params) {
return request({
url: '/base/v1/basevehicleactualsales/listPage',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 选择车辆信息--查询分页列表
pageList: function(params) {
return request({
url: '/base/v1/basevehicle/vehicleActualList',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 保存修改记录
saveOrUpdate: function(params) {
return request({
url: '/base/v1/basevehicleactualsales/saveOrUpdate',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 提交流程
submitVehicleApply: function(params) {
return request({
url: '/base/v1/basevehicleactualsales/submitVehicleSales',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 通过sid查询一条记录
fetchBySid: function(data) {
return request({
url: '/base/v1/basevehicleactualsales/details',
params: { sid: data },
method: 'get'
})
},
// 代办任务同意办理
businessAgree: function(params) {
return request({
url: '/scm/v1/scmapplyinbound/complete',
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 代办任务驳回任务
rejectTask: function(params) {
return request({
url: '/scm/v1/scmapplyinbound/reject/' + params.businessSid,
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 代办任务终止任务
breakTask: function(params) {
return request({
url: '/base/v1/basevehicleactualsales/breakProcess/' + params.businessSid,
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
},
// 代办任务撤回任务
revokeTask: function(params) {
return request({
url: '/scm/v1/scmapplyinbound/revokeProcess/' + params.userSid + '/' + params.businessSid,
method: 'post',
data: params,
headers: {
'Content-Type': 'application/json'
}
})
}
}

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

@ -300,6 +300,22 @@ const codemenu = [
}
]
},
{
path: '/supplychain',
component: Layout,
redirect: '/supplychain/cheliangneigou',
meta: {
title: '车辆内购购'
},
children: [
{
path: '/supplychain/cheliangneigou',
component: () => import('@/views/supplychain/cheliangneigou/cheliangneigouguanli.vue'),
name: 'cheliangneigouguanli',
meta: { title: '内购申请管理' }
}
]
},
{
path: '/baseoutsourcingapplication',
component: Layout,
@ -361,6 +377,21 @@ const codemenu = [
meta: { title: '入账管理' }
}]
},
// 未售买断管理
{
path: '/weishoumaiduan',
component: Layout,
redirect: '/weishoumaiduan/weishoumaiduanguanli',
meta: {
title: '未售买断管理'
},
children: [{
path: '/weishoumaiduan/weishoumaiduanguanli',
component: () => import('@/views/weishoumaiduan/weishoumaiduanguanli/unsoldguanli.vue'),
name: 'unsoldguanli',
meta: { title: '未售买断申请管理' }
}]
},
// 流程审批
// 入账管理编辑
{

279
anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldAdd.vue

@ -0,0 +1,279 @@
<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="save()">保存
</el-button>
<el-button type="primary" size="small" @click="submitVehicleApply()">提交
</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="wlInfo"><span>车辆未售买断申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top">
<el-row>
<el-col :span="4">
<span>申请日期:</span>
</el-col>
<el-col :span="8">
<span style="margin-left: 5px">{{ formobj.createTime }}</span>
</el-col>
<el-col :span="4">
<span>申请人:</span>
</el-col>
<el-col :span="8">
<span style="margin-left: 5px">{{ formobj.applicationName }}</span>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="el-form-item-right">
<span>买断原因:</span>
</el-col>
<el-col :span="20">
<el-form-item>
<el-input v-model="formobj.reason" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" resize="none" clearable style="width: 30%"/>
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="tableStyle">
<div style="margin-left: 5px;font-weight: bold">车辆列表</div>
<div style="margin-left: 15px">
<el-button type="primary" size="mini" icon="el-icon-plus" @click="addCommodity()">选择车辆</el-button>
</div>
</div>
<el-table :key="tableKey" :data="formobj.detailsList" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column fixed prop="name" label="操作" width="100px" align="center" header-align="center">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="dataDelete(scope.$index, formobj.detailsList[scope.$index])">删除
</el-button>
</template>
</el-table-column>
<el-table-column label="车架号" align="center" width="300">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="车型" align="left" header-align="center">
<template slot-scope="scope">
<span>{{ scope.row.modelName }}</span>
</template>
</el-table-column>
<el-table-column label="入库日期" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span>
</template>
</el-table-column>
<el-table-column label="入库价" align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.inboundPrice }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!--End 添加修改部分-->
<!--选择车型和常用配置-->
<vehicle v-show="viewState == 2" ref="divVehicle" @backData="backData" @doback="closePage"/>
</div>
</template>
<script>
import req from '@/api/weishoumaiduan/unsold'
import vehicle from './vehicle.vue'
export default {
name: 'weishoumaiduanAdd',
components: {
vehicle
},
data() {
return {
viewTitle: '',
viewState: 1,
index: 0,
tableKey: 0,
//
formobj: {
sid: '', // sid
applicationName: window.sessionStorage.getItem('name'),
createTime: '',
reason: '',
userSid: window.sessionStorage.getItem('userSid'),
detailsList: []
},
rules: {},
submitdisabled: false
}
},
methods: {
//
newDate() {
let date = new Date()
let year = date.getFullYear() //
let month = date.getMonth() + 1 //
let day = date.getDate() //
if (month < 10) {
month = '0' + month
}
if (day < 10) {
day = '0' + day
}
this.formobj.createTime = year + '-' + month + '-' + day
},
//
addCommodity() {
this.viewState = 2
this.$refs['divVehicle'].showData(this.formobj.detailsList)
},
//
dataDelete(index, row) {
this.formobj.detailsList.splice(index, 1)
},
showAdd() {
this.newDate()
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '【新增】车辆调价申请'
},
showEdit(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '【编辑】车辆调价申请'
console.log('编辑回显', row.sid)
req.fetchBySid(row.sid).then((resp) => {
const data = resp.data
this.formobj.applicationName = data.applicationName
this.formobj.sid = data.sid
this.formobj.reason = data.reason
this.formobj.createTime = data.createTime
this.formobj.detailsList = data.voList
}).catch((e) => {
this.formobj = row
})
},
// --
backData(value) {
this.viewState = 1
if (value.length > 0) {
value.forEach((e) => {
this.formobj.detailsList.push({
inboundDate: e.priceDate,
inboundPrice: e.priced,
modelName: e.vehicleAlias,
vinNo: e.vinNo
})
})
}
},
save() {
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((resp) => {
this.submitdisabled = false
if (resp.success) {
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
}
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},
submitVehicleApply() {
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
this.handleReturn('true')
} else {
this.$message({
showClose: true,
type: 'error',
message: '提交失败'
})
}
})
},
// ===
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
//
this.formobj = {
sid: '', // sid
applicationName: window.sessionStorage.getItem('name'),
createTime: '',
reason: '',
userSid: window.sessionStorage.getItem('userSid'),
detailsList: []
}
this.$refs['form_obj'].resetFields()
this.$refs['divVehicle'].getList()
this.$emit('doback')
},
closePage() {
this.viewState = 1
}
}
}
</script>
<style scoped>
.wlInfo {
text-align: center;
font-size: 28px;
line-height: 90px;
}
.tableStyle {
background-color: #FFFFFF;
display: flex;
justify-content: flex-start;
align-items: center;
border: 1px solid #dfe4ed;
height: 40px;
}
/deep/ .el-col-4 {
text-align: right;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
/deep/ .el-col-8 {
text-align: left;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
.icon {
color: #e84026;
margin-right: 4px;
}
</style>

145
anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldInfo.vue

@ -0,0 +1,145 @@
<template>
<div class="app-container">
<div>
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>车辆未售买断详情</div>
<!--start 添加修改按钮-->
<div>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="wlInfo"><span>车辆未售买断申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top">
<el-row>
<el-col :span="4">
<span>申请日期:</span>
</el-col>
<el-col :span="8">
<span style="margin-left: 5px">{{ formobj.createTime }}</span>
</el-col>
<el-col :span="4">
<span>申请人:</span>
</el-col>
<el-col :span="8">
<span style="margin-left: 5px">{{ formobj.applicationName }}</span>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="el-form-item-right">
<span>买断原因:</span>
</el-col>
<el-col :span="20">
<el-form-item>
{{ formobj.reason }}
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="tableStyle">
<div style="margin-left: 5px;font-weight: bold">车辆列表</div>
</div>
<el-table :key="tableKey" :data="formobj.voList" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="车架号" align="left" header-align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="车型" align="left" header-align="center">
<template slot-scope="scope">
<span>{{ scope.row.modelName }}</span>
</template>
</el-table-column>
<el-table-column label="入库日期" header-align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span>
</template>
</el-table-column>
<el-table-column label="入库价" header-align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.inboundPrice }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!--End 添加修改部分-->
</div>
</template>
<script>
import req from '@/api/weishoumaiduan/unsold'
export default {
name: 'weishoumaiduanInfo',
data() {
return {
dialogStatus: '',
viewState: 1,
index: 0,
tableKey: 0,
list1: [],
//
formobj: {},
rules: {},
submitdisabled: false
}
},
methods: {
showInfo(row) {
req.fetchBySid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
// ===
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.wlInfo {
text-align: center;
font-size: 28px;
line-height: 90px;
}
.tableStyle {
background-color: #FFFFFF;
display: flex;
justify-content: flex-start;
align-items: center;
border: 1px solid #dfe4ed;
height: 40px;
}
/deep/ .el-col-4 {
text-align: right;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
/deep/ .el-col-8 {
text-align: left;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
.icon {
color: #e84026;
margin-right: 4px;
}
</style>

322
anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/unsoldguanli.vue

@ -0,0 +1,322 @@
<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="申请日期">
<div class="block" style="float: left;">
<el-date-picker v-model="listQuery.params.applyStartDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</div>
<div style="float: left;margin: 0px 10px"></div>
<div class="block" style="float: left;">
<el-date-picker v-model="listQuery.params.applyEndDate" type="date" clearable value-format="yyyy-MM-dd" placeholder="选择日期"/>
</div>
</el-form-item>
<el-form-item label="状态">
<el-input v-model="listQuery.params.nodeState" placeholder="请输入状态" clearable/>
</el-form-item>
<el-form-item label="车架号">
<el-input v-model="listQuery.params.vinNo" placeholder="请输入车架号" clearable/>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" @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%;" @selection-change="handleSelectionChange">
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/>
<el-table-column width="50px" type="selection" align="center"/>
<el-table-column label="操作" width="180px" align="center">
<template slot-scope="scope">
<el-button type="primary" 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="120">
<template slot-scope="scope">
<span>{{ scope.row.nodeState }}</span>
</template>
</el-table-column>
<el-table-column label="申请人" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.applicationName }}</span>
</template>
</el-table-column>
<el-table-column label="申请日期" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="买断原因" align="left" header-align="center">
<template slot-scope="scope">
<span>{{ scope.row.reason }}</span>
</template>
</el-table-column>
<el-table-column label="台数" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.num }}</span>
</template>
</el-table-column>
</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>
<unsoldAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<unsoldInfo v-show="viewState == 4" ref="divInfo" @doback="resetState"/>
</div>
</template>
<script>
import req from '@/api/weishoumaiduan/unsold'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import unsoldAdd from './unsoldAdd.vue'
import unsoldInfo from './unsoldInfo.vue'
export default {
name: 'weishoumaiduanguanli',
components: {
Pagination,
pageye,
ButtonBar,
unsoldAdd,
unsoldInfo
},
data() {
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',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
],
isSearchShow: false,
searchxianshitit: '显示查询条件',
viewState: 1,
// -----------
tableKey: 0,
list: [],
sids: [],
FormLoading: false,
listLoading: false,
listQuery: {
params: {
vinNo: '',
applyEndDate: '',
applyStartDate: '',
nodeState: ''
},
current: 1,
size: 10,
total: 0
},
rules: {}
}
},
created() {
//
this.getList()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'toEdit':
this.toEdit()
break
case 'doDel':
this.doDel()
break
case 'doImport':
this.doImport()
break
case 'doExport':
this.doExport()
break
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
},
handleSelectionChange(row) {
const aa = []
row.forEach((element) => {
aa.push(element.sid)
})
this.sids = aa
console.log('sids', this.sids)
},
//
getList() {
this.listLoading = true
req.listPage(this.listQuery).then((response) => {
console.log('列表查询结果:', response)
this.listLoading = false
if (
response.success &&
response.data &&
response.data.total > 0
) {
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: {
vinNo: '',
applyEndDate: '',
applyStartDate: '',
nodeState: ''
},
current: 1,
size: 10,
total: 0
}
this.getList()
},
toAdd() {
this.viewState = 2
this.$refs['divAdd'].showAdd()
},
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(row)
},
toInfo(row) {
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 => {
// loading.close()
// this.$message({ type: 'success', message: resp.msg, showClose: true })
// this.loadList()
// }).catch(e => {
// loading.close()
// })
}).catch(() => {
})
},
resetState() {
this.viewState = 1
},
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
}
}
</script>
<style scoped>
.btn {
padding: 15px 0 15px 0;
border: 1px solid #e0e3eb;
}
.tab-header {
background-color: #edf1f7;
padding: 8px 20px;
margin-bottom: 0 !important;
}
.tab-header /deep/ .el-form-item {
margin-bottom: 10px;
}
.listtop {
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid #dfe4ed;
height: 40px;
}
.tit {
margin-bottom: -10px;
}
.pagination {
margin-bottom: -10px;
}
</style>

370
anrui-scm/anrui-scm-ui/src/views/weishoumaiduan/weishoumaiduanguanli/vehicle.vue

@ -0,0 +1,370 @@
<template>
<div class="app-container">
<div>
<div class="tab-header webtop">
<div>选择车辆页面</div>
<div>
<el-button type="primary" size="small" @click="AddUpdateReturn">确定</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<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-row>
<el-form-item label="品牌:" class="searchlist">
<el-select v-model="listQuery.params.carBrand" placeholder="请选择" filterable clearable>
<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="功能:" class="searchlist">
<el-select v-model="listQuery.params.vehicleType" placeholder="请选择" filterable clearable>
<el-option v-for="item in vehicleType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="系列:" class="searchlist">
<el-select v-model="listQuery.params.productLine" placeholder="请选择" filterable clearable>
<el-option v-for="item in productLine_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="变速箱:" class="searchlist">
<el-select v-model="listQuery.params.gearboxType" placeholder="请选择" filterable clearable>
<el-option v-for="item in gearboxType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="驱动:" class="searchlist">
<el-select v-model="listQuery.params.driveForm" placeholder="请选择" filterable clearable>
<el-option v-for="item in driveForm_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="排放标准:" class="searchlist">
<el-select v-model="listQuery.params.emissionStandard" placeholder="请选择" filterable clearable>
<el-option v-for="item in emissionStandard_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
</el-row>
<el-row>
<el-form-item label="马力:" class="searchlist">
<el-select v-model="listQuery.params.power" placeholder="请选择" filterable clearable>
<el-option v-for="item in power_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="燃料:" class="searchlist">
<el-select v-model="listQuery.params.fuelType" placeholder="请选择" filterable clearable>
<el-option v-for="item in fuelType_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="版本:" class="searchlist">
<el-select v-model="listQuery.params.vehicleVersion" placeholder="请选择" filterable clearable>
<el-option v-for="item in vehicleVersion_list" :key="item.dictKey" :label="item.dictValue" :value="item.dictKey"/>
</el-select>
</el-form-item>
<el-form-item label="车型:" class="searchlist">
<el-input v-model="listQuery.params.vehicleAlias" placeholder="" clearable style="width: 150px"/>
</el-form-item>
<el-form-item label="快捷检索:" class="searchlist">
<el-input v-model="listQuery.params.modelName" placeholder="" clearable style="width: 150px"/>
</el-form-item>
</el-row>
</el-form>
<div class="btn" style="text-align: center;">
<el-button type="primary" @click="handleFilter" size="small">查询</el-button>
<el-button type="primary" @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" 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>
</div>
<div class="pages">
<div class="tit"/>
<!-- 翻页 -->
<Pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
</div>
</div>
</div>
</template>
<script>
import Pagination from '@/components/pagination'
import req from '@/api/weishoumaiduan/unsold'
import { typeValues, brandDown, getPathSidByUserSid } from '@/api/cheliang/dictcommons.js'
export default {
name: 'xianchechaxun',
components: {
Pagination
},
data() {
return {
useOrg: '',
carBrand_list: [],
vehicleType_list: [],
productLine_list: [],
gearboxType_list: [],
driveForm_list: [],
emissionStandard_list: [],
power_list: [],
fuelType_list: [],
vehicleVersion_list: [],
isSearchShow: false,
searchxianshitit: '隐藏查询条件',
tableKey: 0,
showbackState: 30,
sids: [],
list: [],
number: '',
listLoading: false,
listQuery: {
current: 1,
size: 10,
params: {
brandSid: '',
driveForm: '',
emissionStandard: '',
fuelType: '',
gearboxType: '',
modelName: '',
power: '',
productLine: '',
vehicleAlias: '',
vehicleType: '',
vehicleVersion: '',
vinNoList: []
},
total: 1
}
}
},
created() {
//
this.init()
},
methods: {
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
init() {
this.getPathSid()
this.shujuzidian()
this.getList()
},
getPathSid() {
const userSid = window.sessionStorage.getItem('userSid')
getPathSidByUserSid({ userSid: userSid }).then((res) => {
if (res.success) {
this.useOrg = res.data
}
})
},
shujuzidian() {
// -
brandDown({ useOrg: this.useOrg }).then((res) => {
if (res.success) {
this.carBrand_list = res.data
console.log('下拉框请求品牌', res.data)
}
})
typeValues({ type: 'vehicleFunction' }).then((res) => {
if (res.success) {
this.vehicleType_list = res.data
}
})
typeValues({ type: 'productLine' }).then((res) => {
if (res.code === '200') {
this.productLine_list = res.data
}
})
typeValues({ type: 'driver' }).then((res) => {
if (res.code === '200') {
this.driveForm_list = res.data
}
})
typeValues({ type: 'horsepower' }).then((res) => {
if (res.code === '200') {
this.power_list = res.data
}
})
typeValues({ type: 'vehicleVersion' }).then((res) => {
if (res.code === '200') {
this.vehicleVersion_list = res.data
}
})
typeValues({ type: 'fuelType' }).then((res) => {
if (res.code === '200') {
this.fuelType_list = res.data
}
})
typeValues({ type: 'gearbox' }).then((res) => {
if (res.code === '200') {
this.gearboxType_list = res.data
}
})
typeValues({ type: 'emissionStandard' }).then((res) => {
if (res.code === '200') {
this.emissionStandard_list = res.data
}
})
},
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
//
handleReturn() {
this.$emit('doback')
},
//
getList() {
this.listLoading = true
req.pageList(this.listQuery).then((response) => {
this.listLoading = false
if (response.success) {
this.listQuery.total = response.data.total
this.list = response.data.records
}
})
this.listQuery.params.vinNoList = []
},
//
handleFilter() {
this.getList()
},
//
handleReset() {
this.listQuery = {
current: 1,
size: 10,
params: {
brandSid: '',
driveForm: '',
emissionStandard: '',
fuelType: '',
gearboxType: '',
modelName: '',
power: '',
productLine: '',
vehicleAlias: '',
vehicleType: '',
vehicleVersion: '',
vinNoList: []
},
total: 0
}
this.getList()
},
handleSelectionChange(row) {
this.sids = []
const aa = []
row.forEach((element) => {
aa.push({
vinNo: element.vinNo,
vehicleAlias: element.vehicleAlias,
priceDate: element.priceDate,
priced: element.priced
})
})
this.sids = aa
},
showData(value) {
if (value.length > 0) {
for (var i = 0; i < value.length; i++) {
this.listQuery.params.vinNoList.push(value[i].vinNo)
}
this.getList()
} else {
this.listQuery.params.vinNoList = []
}
},
//
AddUpdateReturn() {
if (this.sids.length > 0) {
this.$emit('backData', this.sids)
} else {
this.$notify({
title: '提示',
message: '请选择至少一条车型记录!',
type: 'error',
duration: 2000
})
}
}
}
}
</script>
<style scoped>
.btn {
padding: 15px 0 15px 0;
border: 1px solid #e0e3eb;
}
.tab-header {
background-color: #edf1f7;
padding: 8px 20px;
margin-bottom: 0 !important;
}
.tab-header /deep/ .el-form-item {
margin-bottom: 10px;
}
.listtop {
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid #dfe4ed;
height: 40px;
}
.tit {
margin-bottom: -10px;
}
.pagination {
margin-bottom: -10px;
}
</style>

366
anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/weishoumaiduanInfo.vue

@ -0,0 +1,366 @@
<template>
<div class="app-container">
<div>
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>车辆未售买断详情</div>
<!--start 添加修改按钮-->
<div>
<el-button v-show="transactState=='00'" type="primary" @click="openAgree"> </el-button>
<el-button v-show="transactState=='00'" type="danger" @click="openReject"> </el-button>
<el-button v-show="transactState=='00'" type="danger" @click="openStop"> </el-button>
<el-button v-show="transactState=='01'" type="danger" @click="openRevoke"> </el-button>
<el-button type="info"> </el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="listconadd">
<div class="wlInfo"><span>车辆未售买断申请</span></div>
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top">
<el-row>
<el-col :span="4">
<span>申请日期:</span>
</el-col>
<el-col :span="8">
<span style="margin-left: 5px">{{ formobj.createTime }}</span>
</el-col>
<el-col :span="4">
<span>申请人:</span>
</el-col>
<el-col :span="8">
<span style="margin-left: 5px">{{ formobj.applicationName }}</span>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="el-form-item-right">
<span>买断原因:</span>
</el-col>
<el-col :span="20">
<el-form-item>
{{ formobj.reason }}
</el-form-item>
</el-col>
</el-row>
</el-form>
<div class="tableStyle">
<div style="margin-left: 5px;font-weight: bold">车辆列表</div>
</div>
<el-table :key="tableKey" :data="formobj.voList" :index="index" border style="width: 100%">
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/>
<el-table-column label="车架号" align="left" header-align="center">
<template slot-scope="scope">
<span>{{ scope.row.vinNo }}</span>
</template>
</el-table-column>
<el-table-column label="车型" align="left" header-align="center">
<template slot-scope="scope">
<span>{{ scope.row.modelName }}</span>
</template>
</el-table-column>
<el-table-column label="入库日期" header-align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.inboundDate }}</span>
</template>
</el-table-column>
<el-table-column label="入库价" header-align="center" width="200">
<template slot-scope="scope">
<span>{{ scope.row.inboundPrice }}</span>
</template>
</el-table-column>
</el-table>
</div>
</div>
<!--End 添加修改部分-->
</div>
</template>
<script>
import req from '@/api/weishoumaiduan/unsold'
export default {
name: 'weishoumaiduanInfo',
data() {
return {
dialogStatus: '',
viewState: 1,
index: 0,
tableKey: 0,
list1: [],
//
formobj: {},
rules: {},
dialogList: {
comment: ''
},
transactState: '', //
//
agreeList: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
userSid: ''
},
//
regectList: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
userSid: ''
},
//
stopList: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
userSid: ''
},
//
revokeList: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var a = window.location.href.indexOf('?') + 1 // ?
var b = window.location.href.indexOf('#data') // #data
const info = window.location.href.slice(a, b)
var sid = info.substr(info.indexOf('=') + 1)
this.showInfo(sid)
// ===
var one = window.location.href.lastIndexOf('#') + 1
var two = window.location.href.lastIndexOf('}') + 1
const data = decodeURI(window.location.href.slice(one, two)) // urlunescape()web,使
var tar = data.substr(data.indexOf('=') + 1)
const obj = JSON.parse(tar)
console.log('iframe页面获取的obj:', obj)
//
this.agreeList.businessSid = sid
this.agreeList.instanceId = obj.instanceId
this.agreeList.taskId = obj.taskId
this.agreeList.userSid = obj.userSid
//
this.regectList.businessSid = sid
this.regectList.instanceId = obj.instanceId
this.regectList.taskId = obj.taskId
this.regectList.userSid = obj.userSid
//
this.stopList.businessSid = sid
this.stopList.instanceId = obj.instanceId
this.stopList.taskId = obj.taskId
this.stopList.userSid = obj.userSid
//
this.revokeList.businessSid = sid
this.revokeList.instanceId = obj.instanceId
this.revokeList.taskId = obj.taskId
this.revokeList.userSid = obj.userSid
//
this.transactState = obj.transactState
},
methods: {
showInfo(row) {
req.fetchBySid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
}
})
},
//
openAgree() {
this.$confirm('是否确认执行同意操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleAgree()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消同意'
})
})
},
//
openReject() {
this.$confirm('是否确认执行驳回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleReject()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消驳回'
})
})
},
//
openStop() {
this.$confirm('是否确认执行终止操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleStop()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消终止'
})
})
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 同意任务 */
handleAgree() {
this.agreeList.comment = this.dialogList.comment
req.businessAgree(this.agreeList).then((response) => {
if (response.code === '200') {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.refreshIt()
} else {
this.$notify({
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000
})
}
})
},
/** 终止任务 */
handleStop() {
this.stopList.comment = this.dialogList.comment
req.breakTask(this.stopList).then((response) => {
if (response.code === '200') {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
} else {
this.$notify({
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000
})
}
})
},
/** 驳回任务 */
handleReject() {
this.regectList.comment = this.dialogList.comment
req.rejectTask(this.regectList).then((response) => {
if (response.code === '200') {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
} else {
this.$notify({
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000
})
}
})
},
/** 撤回任务 */
handleRevoke() {
this.revokeList.comment = this.dialogList.comment
req.revokeTask(this.revokeList).then((response) => {
if (response.code === '200') {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
} else {
this.$notify({
title: '提示',
message: '执行失败',
type: 'error',
duration: 2000
})
}
})
},
// ===
handleReturn() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.wlInfo {
text-align: center;
font-size: 28px;
line-height: 90px;
}
.tableStyle {
background-color: #FFFFFF;
display: flex;
justify-content: flex-start;
align-items: center;
border: 1px solid #dfe4ed;
height: 40px;
}
/deep/ .el-col-4 {
text-align: right;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
/deep/ .el-col-8 {
text-align: left;
float: left;
font-size: 14px;
color: #606266;
line-height: 40px !important;
font-weight: 600;
}
.icon {
color: #e84026;
margin-right: 4px;
}
</style>

0
anrui-scm/anrui-scm-ui/src/views/workFlow/weishoumaiduanFlow/weishoumaiduanguanli/weushoumaiduanEdit.vue

Loading…
Cancel
Save