Browse Source

完善销售订单退车

master
yunuo970428 2 years ago
parent
commit
dd3d83a3b3
  1. 102
      anrui-buscenter/anrui-buscenter-ui/src/api/salesManagement/salesorderbycar.js
  2. 32
      anrui-buscenter/anrui-buscenter-ui/src/router/index.js
  3. 377
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarDaiBanInfo.vue
  4. 282
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarEdit.vue
  5. 252
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarYiBanInfo.vue
  6. 14
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdan.vue
  7. 338
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdantuiche/salesorderbycar.vue
  8. 307
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdantuiche/salesorderbycarAdd.vue
  9. 208
      anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdantuiche/salesorderbycarInfo.vue

102
anrui-buscenter/anrui-buscenter-ui/src/api/salesManagement/salesorderbycar.js

@ -0,0 +1,102 @@
import request from '@/utils/request'
export default {
// 查询分页列表
listPage: function(params) {
return request({
url: '/buscenter/v1/bussalesorderreturnvehapply/listPage',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 删除
delete: function(params) {
return request({
url: '/buscenter/v1/bussalesorderreturnvehapply/delBySids',
method: 'DELETE',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 保存修改记录
saveOrUpdate: function(params) {
return request({
url: '/buscenter/v1/bussalesorderreturnvehapply/save',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 提交流程
submitVehicleApply: function(params) {
return request({
url: '/buscenter/v1/bussalesorderreturnvehapply/submitVehicleApply',
method: 'post',
data: params,
headers: { 'Content-Type': 'application/json' }
})
},
// 通过sid查询一条记录
fetchBySid: function(data) {
return request({
url: '/buscenter/v1/bussalesorderreturnvehapply/fetchDetailsBySid/' + data,
method: 'get'
})
},
// 通过sid查询一条记录(销售订单列表--点击退车调用)
fetchDetailsByOrderSid: function(data) {
return request({
url: '/buscenter/v1/bussalesorderreturnvehapply/fetchDetailsByOrderSid/' + data,
method: 'get'
})
},
// 流程审批(同意)
complete: function(params) {
return request({
url: '/buscenter/v1/bussalesorderreturnvehapply/complete',
method: 'post',
data: params
})
},
// 流程审批(驳回)
reject: function(params) {
return request({
url: '/buscenter/v1/bussalesorderreturnvehapply/reject',
method: 'post',
data: params
})
},
// 流程审批(终止)
breakProcess: function(params) {
return request({
url: '/buscenter/v1/bussalesorderreturnvehapply/breakProcess',
method: 'post',
data: params
})
},
// 流程审批(撤回)
revokeProcess: function(params) {
return request({
url: '/buscenter/v1/bussalesorderreturnvehapply/revokeProcess',
method: 'post',
data: params
})
},
// 审批流程(同意)获取下一环节
getNextNodesForSubmit: function(data) {
return request({
url: '/buscenter/v1/bussalesorderreturnvehapply/getNextNodesForSubmit',
method: 'get',
params: data
})
},
// 审批流程(驳回)获取上一环节
getPreviousNodesForReject: function(data) {
return request({
url: '/buscenter/v1/bussalesorderreturnvehapply/getPreviousNodesForReject',
method: 'get',
params: data
})
}
}

32
anrui-buscenter/anrui-buscenter-ui/src/router/index.js

@ -189,6 +189,16 @@ export const constantRoutes = [
title: '销售订单管理'
}
},
// 销售订单退车申请
{
path: '/xiaoshouguanli/xiaoshoudingdantuiche',
component: () =>
import('@/views/xiaoshouguanli/xiaoshoudingdantuiche/salesorderbycar.vue'),
name: 'XiaoShouDingDanTuiChe',
meta: {
title: '销售订单退车', noCache: true
}
},
{
path: '/xiaoshouguanli/xiaoshouzhengce',
component: () =>
@ -535,6 +545,28 @@ export const constantRoutes = [
component: () =>
import('@/views/workflow/xiaoshouguanliFlow/xiaoshouzhengceFlow/xiaoshouzhengceEdit.vue'),
name: 'xiaoshouzhengceEdit'
},
// 销售订单退车申请管理待办详情
{
path: '/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarDaiBanInfo',
component: () =>
import('@/views/workflow/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarDaiBanInfo.vue'),
name: 'XiaoShouDingDanTuiCheDaiBanInfo'
},
// 销售订单退车申请管理已办详情
{
path: '/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarYiBanInfo',
component: () =>
import('@/views/workflow/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarYiBanInfo.vue'),
name: 'XiaoShouDingDanTuiCheYiBanInfo'
},
// 销售订单退车申请管理驳回到发起人办理
{
path: '/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarEdit',
component: () =>
import('@/views/workflow/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarEdit.vue'),
name: 'XiaoShouDingDanTuiCheEdit'
}
// 404 page must be placed at the end !!!

377
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarDaiBanInfo.vue

@ -0,0 +1,377 @@
<template>
<div class="app-container">
<div>
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="primary" size="small" @click="openAgree('同意')"> </el-button>
<el-button type="danger" size="small" @click="openReject('驳回')"> </el-button>
<el-button type="danger" size="small" @click="openStop('终止')"> </el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="4" class="tleftb">
<span>合同编号</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.contractNo }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>客户名称</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.customerName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>销售类型</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.saleTypeValue }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>车型</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.modelName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>台数</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.orderNum }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>成交价()</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.salePrice }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>收款情况</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ formobj.collection }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>终止原因</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ formobj.stopRemarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>备注</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>车辆列表</div>
</div>
<el-table :key="tableKey" :data="formobj.busSalesOrderReturnVehs" :index="index" border style="width: 100%">
<el-table-column fixed label="序号" width="60" type="index" :index="index + 1" align="center" />
<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" width="130">
<template slot-scope="scope">
<span>{{ scope.row.carColorValue }}</span>
</template>
</el-table-column>
<el-table-column label="合格证状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.certificateStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="开票状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.invoicingStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="投保状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.insureStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="库存状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.stockStateValue }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
<!-- 选择待办人 的弹出框-->
<el-dialog title="填写审批意见" :visible.sync="nodeDialogVisible" width="80%">
<el-form class="formadd" >
<el-row v-show="currentLink" style="border-top: 1px solid #e0e3eb">
<el-col :span="4" class="tleftb">
<span>当前环节:</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item>
</el-col>
</el-row>
<el-row :class="{rowClass:!currentLink}">
<el-col :span="4" class="tleftb">
<span>意见:</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input size="small" v-model="dialogList.comment" placeholder="审批意见" class="addinputw" type="textarea" :autosize="{ minRows: 1, maxRows: 10}" clearable ></el-input></el-form-item>
</el-col>
</el-row>
<div style="text-align:center;margin-top: 20px;">
<el-button type="primary" size="mini" @click="reject"> </el-button>
<el-button type="info " size="mini" @click="nodeDialogVisible = false"> </el-button>
</div>
</el-form>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/salesManagement/salesorderbycar'
export default {
name: 'XiaoShouDingDanTuiCheDaiBanInfo',
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
//
formobj: {
sid: '', // sid
collection: '', //
contractNo: '', //
createByName: '', //
createBySid: '', // sid
customerName: '', //
customerNo: '', //
customerSid: '', // sid
modelName: '', //
modelSid: '', // sid
orderNum: '', //
salePrice: '', //
saleTypeKey: '', // key
saleTypeValue: '', // Value
stopRemarks: '', //
useOrgName: '',
useOrgSid: '',
taskId: '',
busSalesOrderReturnVehs: [],
orgSidPath: ''
},
rules: {},
operation: '', //
dialogList: {
comment: ''
},
startTask: true,
current: {
taskDefKey: '',
taskName: '' //
},
nextNode: {}, //
nodeDialogVisible: false,
currentLink: true,
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
this.current.taskDefKey = obj.taskDefKey
this.current.taskName = obj.taskName
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 450 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '销售订单退车申请'
req.fetchBySid(sid).then((resp) => {
this.formobj = resp.data
}).catch((e) => {
this.formobj = {}
})
},
//
openAgree(val) {
this.operation = val
this.currentLink = true
this.dialogList.comment = '同意'
req.getNextNodesForSubmit({ taskDefKey: this.current.taskDefKey }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openReject(val) {
this.operation = val
this.currentLink = true
this.dialogList.comment = ''
req.getPreviousNodesForReject({ taskDefKey: this.current.taskDefKey }).then((resp) => {
if (resp.success) {
var arr = resp.data
this.nextNode = arr[0]
this.nodeDialogVisible = true
}
this.submitdisabled = false
})
},
//
openStop(val) {
this.operation = val
this.currentLink = false
this.dialogList.comment = ''
this.nodeDialogVisible = true
},
reject() {
if (this.operation === '同意') {
this.handleAgree()
} else if (this.operation === '驳回') {
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleReject()
}
} else if (this.operation === '终止') {
if (this.dialogList.comment === '') {
this.$message({ showClose: true, type: 'error', message: '请填写审批意见' })
} else {
this.handleStop()
}
}
},
/** 同意任务 */
handleAgree() {
this.linkByParameter.comment = this.dialogList.comment
req.complete(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 驳回任务 */
handleReject() {
this.linkByParameter.comment = this.dialogList.comment
req.reject(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
},
/** 终止任务 */
handleStop() {
this.linkByParameter.comment = this.dialogList.comment
req.breakProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
</style>

282
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarEdit.vue

@ -0,0 +1,282 @@
<template>
<div class="app-container">
<div>
<!--标题按钮部分开始-->
<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" :disabled="submitdisabled" @click="submitVehicleApply()">提交
</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="4" class="tleftb">
<span>合同编号</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.contractNo }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>客户名称</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.customerName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>销售类型</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.saleTypeValue }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>车型</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.modelName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>台数</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.orderNum }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>成交价()</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.salePrice }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>收款情况</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ formobj.collection }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>终止原因</span>
</el-col>
<el-col :span="20">
<el-form-item prop="stopRemarks"><el-input v-model="formobj.stopRemarks" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>备注</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>车辆列表</div>
</div>
<el-table :key="tableKey" :data="formobj.busSalesOrderReturnVehs" :index="index" border style="width: 100%">
<el-table-column fixed label="序号" width="60" type="index" :index="index + 1" align="center"/>
<el-table-column fixed label="操作" width="80" align="center">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除
</el-button>
</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" width="130">
<template slot-scope="scope">
<span>{{ scope.row.carColorValue }}</span>
</template>
</el-table-column>
<el-table-column label="合格证状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.certificateStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="开票状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.invoicingStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="投保状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.insureStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="库存状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.stockStateValue }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
</div>
</template>
<script>
import req from '@/api/salesManagement/salesorderbycar'
import { getOrgSidByPath, fetchBySid } from '@/api/dictcommons/dictcommons'
export default {
name: 'XiaoShouDingDanTuiCheEdit',
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
//
formobj: {
sid: '', // sid
collection: '', //
contractNo: '', //
createByName: '', //
createBySid: '', // sid
customerName: '', //
customerNo: '', //
customerSid: '', // sid
modelName: '', //
modelSid: '', // sid
orderNum: '', //
salePrice: '', //
saleTypeKey: '', // key
saleTypeValue: '', // Value
stopRemarks: '', //
useOrgName: '',
useOrgSid: '',
taskId: '',
busSalesOrderReturnVehs: [],
orgSidPath: ''
},
rules: {
stopRemarks: [{ required: true, message: '终止原因不能为空', trigger: 'blur' }]
},
submitdisabled: false
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 450 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '【编辑】销售订单退车申请'
req.fetchBySid(sid).then((resp) => {
this.formobj = resp.data
this.formobj.instanceId = resp.data.procInstId
}).catch((e) => {
this.formobj = {}
})
},
//
dataDelete(index) {
this.formobj.busSalesOrderReturnVehs.splice(index, 1)
},
save() {
if (this.formobj.busSalesOrderReturnVehs.length === 0) {
this.$message({ showClose: true, type: 'error', message: '车型列表不能为空' })
return
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((resp) => {
if (resp.success) {
this.submitdisabled = false
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},
submitVehicleApply() {
if (this.formobj.busSalesOrderReturnVehs.length === 0) {
this.$message({ showClose: true, type: 'error', message: '车型列表不能为空' })
return
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.submitdisabled = false
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
// ()
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
}
}
}
</script>
<style scoped>
</style>

252
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/xiaoshouguanliFlow/xiaoshoudingdantuicheFlow/salesorderbycarYiBanInfo.vue

@ -0,0 +1,252 @@
<template>
<div class="app-container">
<div>
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>{{ viewTitle }}</div>
<!--start 添加修改按钮-->
<div>
<el-button type="danger" size="small" @click="openRevoke()">撤回</el-button>
</div>
</div>
<!--标题按钮部分结束-->
<!--Start 新增修改部分-->
<div class="">
<el-form ref="form_obj" :model="formobj" :rules="rules" class="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="4" class="tleftb">
<span>合同编号</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.contractNo }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>客户名称</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.customerName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>销售类型</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.saleTypeValue }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>车型</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.modelName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>台数</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.orderNum }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>成交价()</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.salePrice }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>收款情况</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ formobj.collection }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>终止原因</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ formobj.stopRemarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>备注</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>车辆列表</div>
</div>
<el-table :key="tableKey" :data="formobj.busSalesOrderReturnVehs" :index="index" border style="width: 100%">
<el-table-column fixed label="序号" width="60" type="index" :index="index + 1" align="center" />
<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" width="130">
<template slot-scope="scope">
<span>{{ scope.row.carColorValue }}</span>
</template>
</el-table-column>
<el-table-column label="合格证状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.certificateStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="开票状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.invoicingStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="投保状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.insureStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="库存状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.stockStateValue }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
</div>
</template>
<script>
import req from '@/api/salesManagement/salesorderbycar'
export default {
name: 'XiaoShouDingDanTuiCheYiBanInfo',
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
//
formobj: {
sid: '', // sid
collection: '', //
contractNo: '', //
createByName: '', //
createBySid: '', // sid
customerName: '', //
customerNo: '', //
customerSid: '', // sid
modelName: '', //
modelSid: '', // sid
orderNum: '', //
salePrice: '', //
saleTypeKey: '', // key
saleTypeValue: '', // Value
stopRemarks: '', //
useOrgName: '',
useOrgSid: '',
taskId: '',
busSalesOrderReturnVehs: [],
orgSidPath: ''
},
rules: {},
//
linkByParameter: {
businessSid: '',
comment: '',
instanceId: '',
taskId: '',
orgSidPath: '',
taskDefKey: '',
userSid: ''
}
}
},
created() {
console.log('url:' + window.location.href)
var one = window.location.href.indexOf('&data') + 6
const data = window.location.href.substr(one) // urlunescape()web,使
const obj = JSON.parse(decodeURIComponent(data))
console.log('iframe页面获取的obj:', obj)
//
this.linkByParameter.businessSid = obj.businessSid
this.linkByParameter.instanceId = obj.instanceId
this.linkByParameter.taskId = obj.taskId
this.linkByParameter.taskDefKey = obj.taskDefKey
this.linkByParameter.orgSidPath = window.sessionStorage.getItem('orgSidPath')
this.linkByParameter.userSid = window.sessionStorage.getItem('userSid')
//
this.showInfo(obj.businessSid)
},
mounted() {
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 2,
data: 450 + 'px'
}
}, '*')
},
methods: {
showInfo(sid) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '销售订单退车申请'
req.fetchBySid(sid).then((resp) => {
this.formobj = resp.data
}).catch((e) => {
this.formobj = {}
})
},
/** 确认撤回任务 */
openRevoke() {
this.$confirm('是否确认执行撤回操作', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.handleRevoke()
}).catch(() => {
this.$message({
type: 'info',
message: '已取消撤回'
})
})
},
/** 撤回任务 */
handleRevoke() {
req.revokeProcess(this.linkByParameter).then((response) => {
if (response.success) {
this.$notify({
title: '提示',
message: '执行成功',
type: 'success',
duration: 2000
})
this.nodeDialogVisible = false
//
window.parent.postMessage({
cmd: 'returnHeight',
params: {
//
code: 1
}
}, '*')
}
})
}
}
}
</script>
<style scoped>
</style>

14
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdan/xiaoshoudingdan.vue

@ -45,10 +45,11 @@
<el-table :key="tableKey" v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column type="selection" align="center" width="50"/>
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column width="160px" label="操作" align="center">
<el-table-column width="220" label="操作" align="center">
<template slot-scope="scope">
<el-button size="small" type="primary" :disabled="scope.row.nodeState == '待提交' ? false : scope.row.nodeState == '' ? false : true" @click="toEdit(scope.row)">办理
</el-button>
<el-button size="small" type="primary" :disabled="scope.row.nodeState == '已办结' ? false : true" @click="handReturn(scope.row)">退车</el-button>
<el-button size="small" type="primary" @click="toInfo(scope.row)">查看</el-button>
<!-- <el-button size="small" type="primary" @click="printContract(scope.row)">打印合同</el-button>-->
</template>
@ -125,6 +126,8 @@
<print-contract/>
<!-- 确认贷款人 -->
<confirm-lender/>
<!-- 销售订单退车 -->
<salesorderbycarAdd v-show="viewState == 5" ref="divSalesAdd" @doback="resetState" />
</div>
</template>
@ -138,6 +141,7 @@ import divAdd from './xiaoshoudingdanAdd.vue'
import divInfo from './xiaoshoudingdanInfo.vue'
import printContract from '@/views/xiaoshouguanli/xiaoshoudingdan/printContract'
import confirmLender from '@/views/xiaoshouguanli/xiaoshoudingdan/confirmLender'
import salesorderbycarAdd from '../xiaoshoudingdantuiche/salesorderbycarAdd'
export default {
name: 'xiaoshoudingdan',
@ -148,7 +152,8 @@ export default {
divAdd,
divInfo,
printContract,
confirmLender
confirmLender,
salesorderbycarAdd
},
data() {
return {
@ -303,6 +308,11 @@ export default {
this.viewState = 3
this.$refs['divadd'].showEdit(row.sid)
},
// 退
handReturn(row) {
this.viewState = 5
this.$refs['divSalesAdd'].showAdd(row)
},
//
toInfo(row) {
this.viewState = 4

338
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdantuiche/salesorderbycar.vue

@ -0,0 +1,338 @@
<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-date-picker v-model="listQuery.params.createStartTime" 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-form-item>
<el-form-item label="合同编号">
<el-input v-model="listQuery.params.contractNo" placeholder="" clearable/>
</el-form-item>
<el-form-item label="客户名称">
<el-input v-model="listQuery.params.customerName" placeholder="" clearable/>
</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%;" @selection-change="handleSelectionChange">
<el-table-column width="50px" type="selection" align="center" />
<el-table-column width="60" label="序号" type="index" :index="indexMethod" align="center" />
<el-table-column label="操作" width="180" align="center">
<template slot-scope="scope">
<el-button type="primary" size="mini" @click="toEdit(scope.row)" :disabled="scope.row.nodeState =='发起申请' ? false : scope.row.nodeState == '待提交' ? false : true">办理</el-button>
<el-button type="primary" size="mini" @click="toInfo(scope.row)">查看</el-button>
</template>
</el-table-column>
<el-table-column label="状态" width="120" header-align="center">
<template slot-scope="scope">
<span v-if="scope.row.nodeState=='待提交'" type="primary" size="mini">待提交</span>
<span v-else @click="flowRecord(scope.row)" class="bluezi">{{ scope.row.nodeState }}</span>
</template>
</el-table-column>
<el-table-column label="申请日期" align="center" width="110">
<template slot-scope="scope">
<span>{{ scope.row.createTime }}</span>
</template>
</el-table-column>
<el-table-column label="申请人" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.createByName }}</span>
</template>
</el-table-column>
<el-table-column label="合同编号" align="left" header-align="center" width="160">
<template slot-scope="scope">
<span>{{ scope.row.contractNo }}</span>
</template>
</el-table-column>
<el-table-column label="客户名称" align="center" width="100">
<template slot-scope="scope">
<span>{{ scope.row.customerName }}</span>
</template>
</el-table-column>
<el-table-column label="车型" align="center" width="120">
<template slot-scope="scope">
<span>{{ scope.row.modelName }}</span>
</template>
</el-table-column>
<el-table-column label="订单台数" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.orderNum }}</span>
</template>
</el-table-column>
<el-table-column label="终止台数" align="center" width="90">
<template slot-scope="scope">
<span>{{ scope.row.stopNum }}</span>
</template>
</el-table-column>
<el-table-column label="终止原因" align="center" min-width="200">
<template slot-scope="scope">
<span>{{ scope.row.stopRemarks }}</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>
<salesorderbycarAdd v-show="viewState == 2 || viewState == 3" ref="divAdd" @doback="resetState" @reloadlist="getList"/>
<salesorderbycarInfo v-show="viewState == 4" ref="divInfo" @doback="resetState"/>
<el-dialog title="" :visible.sync="centerDialogVisible" width="78%" height="1%" :before-close="closeIt" center>
<iframe frameborder="0" id="iframe" style="width:100%;" scrolling="no" :src="this.centerDialogVisible === true ? url :''"></iframe>
</el-dialog>
</div>
</template>
<script>
import req from '@/api/salesManagement/salesorderbycar'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import ButtonBar from '@/components/ButtonBar'
import salesorderbycarAdd from './salesorderbycarAdd.vue'
import salesorderbycarInfo from './salesorderbycarInfo.vue'
import { getOrgSidByPath } from '@/api/dictcommons/dictcommons'
import { getStorage } from '@/utils/auth'
export default {
name: 'XiaoShouDingDanTuiChe',
components: {
Pagination,
pageye,
ButtonBar,
salesorderbycarAdd,
salesorderbycarInfo
},
data() {
return {
url: '',
dialogHeight: '80%',
centerDialogVisible: false,
btndisabled: false,
btnList: [
{
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: {
customerName: '',
createEndTime: '',
createStartTime: '',
contractNo: '',
useOrgSid: ''
},
current: 1,
size: 5,
total: 0
},
rules: {}
}
},
created() {
//
this.init()
},
mounted() {
// vuewindowpostMessagehandleMessage
window.addEventListener('message', this.handleMessage)
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
async handleMessage(event) {
var code = ''
if (event.data.params !== null && event.data.params !== undefined) {
code = event.data.params.code
}
if (code === 1) {
this.init()
this.centerDialogVisible = false
} else if (code === 2) {
this.dialogHeight = event.data.params.data
this.setIframeHeight(document.getElementById('iframe'))
}
},
closeIt() {
this.url = ''
this.centerDialogVisible = false
},
setIframeHeight(iframe) {
iframe.height = this.dialogHeight
},
flowRecord(row) {
this.centerDialogVisible = true
var params = {
deployId: row.procDefId,
procInsId: row.procInstId,
token: getStorage()
}
this.url = '/#/flow/flowRecordForBusiness?data=' + encodeURI((JSON.stringify(params)))
},
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 'doDel':
this.doDel()
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
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid')
this.listQuery.params.orgPath = window.sessionStorage.getItem('defaultOrgPath')
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: {
customerName: '',
createEndTime: '',
createStartTime: '',
contractNo: '',
useOrgSid: ''
},
current: 1,
size: 5,
total: 0
}
this.init()
},
toEdit(row) {
this.viewState = 3
this.$refs['divAdd'].showEdit(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.delete(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(() => {
})
},
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>
</style>

307
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdantuiche/salesorderbycarAdd.vue

@ -0,0 +1,307 @@
<template>
<div class="app-container">
<div>
<!--标题按钮部分开始-->
<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" :disabled="submitdisabled" @click="submitVehicleApply()">提交
</el-button>
<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="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="4" class="tleftb">
<span>合同编号</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.contractNo }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>客户名称</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.customerName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>销售类型</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.saleTypeValue }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>车型</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.modelName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>台数</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.orderNum }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>成交价()</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.salePrice }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>收款情况</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ formobj.collection }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span><span class="icon">*</span>终止原因</span>
</el-col>
<el-col :span="20">
<el-form-item prop="stopRemarks"><el-input v-model="formobj.stopRemarks" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>备注</span>
</el-col>
<el-col :span="20">
<el-form-item><el-input v-model="formobj.remarks" clearable placeholder="" /></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>车辆列表</div>
</div>
<el-table :key="tableKey" :data="formobj.busSalesOrderReturnVehs" :index="index" border style="width: 100%">
<el-table-column fixed label="序号" width="60" type="index" :index="index + 1" align="center"/>
<el-table-column fixed label="操作" width="80" align="center">
<template slot-scope="scope">
<el-button size="mini" type="danger" @click="dataDelete(scope.$index)">删除
</el-button>
</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" width="130">
<template slot-scope="scope">
<span>{{ scope.row.carColorValue }}</span>
</template>
</el-table-column>
<el-table-column label="合格证状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.certificateStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="开票状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.invoicingStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="投保状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.insureStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="库存状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.stockStateValue }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
</div>
</template>
<script>
import req from '@/api/salesManagement/salesorderbycar'
import { getOrgSidByPath, fetchBySid } from '@/api/dictcommons/dictcommons'
export default {
name: 'XiaoShouDingDanTuiCheAdd',
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
//
formobj: {
sid: '', // sid
collection: '', //
contractNo: '', //
createByName: '', //
createBySid: '', // sid
customerName: '', //
customerNo: '', //
customerSid: '', // sid
modelName: '', //
modelSid: '', // sid
orderNum: '', //
salePrice: '', //
saleTypeKey: '', // key
saleTypeValue: '', // Value
stopRemarks: '', //
useOrgName: '',
useOrgSid: '',
taskId: '',
busSalesOrderReturnVehs: [],
orgSidPath: ''
},
rules: {
stopRemarks: [{ required: true, message: '终止原因不能为空', trigger: 'blur' }]
},
submitdisabled: false
}
},
methods: {
showAdd(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
req.fetchDetailsByOrderSid(row.sid).then((res) => {
if (res.success) {
this.formobj = res.data
getOrgSidByPath({ orgPath: window.sessionStorage.getItem('defaultOrgPath') }).then((resp) => {
if (resp.success) {
this.formobj.useOrgSid = resp.data
fetchBySid(resp.data).then((res) => {
if (res.success) {
this.formobj.useOrgName = res.data.name
}
})
}
})
this.formobj.createByName = window.sessionStorage.getItem('name')
this.formobj.createBySid = window.sessionStorage.getItem('userSid')
this.formobj.orgSidPath = window.sessionStorage.getItem('defaultOrgPath')
}
})
this.viewTitle = '【新增】销售订单退车申请'
},
showEdit(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '【编辑】销售订单退车申请'
console.log('编辑回显', row.sid)
req.fetchBySid(row.sid).then((resp) => {
this.formobj = resp.data
this.formobj.instanceId = resp.data.procInstId
}).catch((e) => {
this.formobj = row
})
},
//
dataDelete(index) {
this.formobj.busSalesOrderReturnVehs.splice(index, 1)
},
save() {
if (this.formobj.busSalesOrderReturnVehs.length === 0) {
this.$message({ showClose: true, type: 'error', message: '车型列表不能为空' })
return
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.saveOrUpdate(this.formobj).then((resp) => {
if (resp.success) {
this.submitdisabled = false
this.$message({
showClose: true,
type: 'success',
message: resp.msg
})
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
} else {
return false
}
})
},
submitVehicleApply() {
if (this.formobj.busSalesOrderReturnVehs.length === 0) {
this.$message({ showClose: true, type: 'error', message: '车型列表不能为空' })
return
}
this.$refs['form_obj'].validate((valid) => {
if (valid) {
this.submitdisabled = true
req.submitVehicleApply(this.formobj).then((res) => {
if (res.success) {
this.submitdisabled = false
this.$message({
showClose: true,
type: 'success',
message: '提交成功'
})
this.handleReturn('true')
} else {
this.submitdisabled = false
}
}).catch(() => {
this.submitdisabled = false
})
}
})
},
// ===
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
//
this.formobj = {
sid: '', // sid
collection: '', //
contractNo: '', //
createByName: '', //
createBySid: '', // sid
customerName: '', //
customerNo: '', //
customerSid: '', // sid
modelName: '', //
modelSid: '', // sid
orderNum: '', //
salePrice: '', //
saleTypeKey: '', // key
saleTypeValue: '', // Value
stopRemarks: '', //
useOrgName: '',
useOrgSid: '',
taskId: '',
busSalesOrderReturnVehs: [],
orgSidPath: ''
}
this.submitdisabled = false
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>

208
anrui-buscenter/anrui-buscenter-ui/src/views/xiaoshouguanli/xiaoshoudingdantuiche/salesorderbycarInfo.vue

@ -0,0 +1,208 @@
<template>
<div class="app-container">
<div>
<!--标题按钮部分开始-->
<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="formadd">
<el-row style="border-top: 1px solid #E0E3EB">
<el-col :span="4" class="tleftb">
<span>合同编号</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.contractNo }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>客户名称</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.customerName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>销售类型</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.saleTypeValue }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>车型</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.modelName }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>台数</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.orderNum }}</span></el-form-item>
</el-col>
<el-col :span="4" class="tleftb">
<span>成交价()</span>
</el-col>
<el-col :span="8">
<el-form-item><span>{{ formobj.salePrice }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>收款情况</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ formobj.collection }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>终止原因</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ formobj.stopRemarks }}</span></el-form-item>
</el-col>
</el-row>
<el-row>
<el-col :span="4" class="tleftb">
<span>备注</span>
</el-col>
<el-col :span="20">
<el-form-item><span>{{ formobj.remarks }}</span></el-form-item>
</el-col>
</el-row>
<div class="title">
<div>车辆列表</div>
</div>
<el-table :key="tableKey" :data="formobj.busSalesOrderReturnVehs" :index="index" border style="width: 100%">
<el-table-column fixed label="序号" width="60" type="index" :index="index + 1" align="center" />
<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" width="130">
<template slot-scope="scope">
<span>{{ scope.row.carColorValue }}</span>
</template>
</el-table-column>
<el-table-column label="合格证状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.certificateStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="开票状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.invoicingStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="投保状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.insureStateValue }}</span>
</template>
</el-table-column>
<el-table-column label="库存状态" align="center" width="150">
<template slot-scope="scope">
<span>{{ scope.row.stockStateValue }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--End 添加修改部分-->
</div>
</template>
<script>
import req from '@/api/salesManagement/salesorderbycar'
export default {
name: 'XiaoShouDingDanTuiCheInfo',
data() {
return {
viewTitle: '',
index: 0,
tableKey: 0,
//
formobj: {
sid: '', // sid
collection: '', //
contractNo: '', //
createByName: '', //
createBySid: '', // sid
customerName: '', //
customerNo: '', //
customerSid: '', // sid
modelName: '', //
modelSid: '', // sid
orderNum: '', //
salePrice: '', //
saleTypeKey: '', // key
saleTypeValue: '', // Value
stopRemarks: '', //
useOrgName: '',
useOrgSid: '',
taskId: '',
busSalesOrderReturnVehs: [],
orgSidPath: ''
},
rules: {}
}
},
methods: {
showInfo(row) {
this.$nextTick(() => {
this.$refs['form_obj'].clearValidate()
})
this.viewTitle = '销售订单退车申请'
console.log('编辑回显', row.sid)
req.fetchBySid(row.sid).then((resp) => {
this.formobj = resp.data
}).catch((e) => {
this.formobj = row
})
},
// ===
handleReturn() {
//
this.formobj = {
sid: '', // sid
collection: '', //
contractNo: '', //
createByName: '', //
createBySid: '', // sid
customerName: '', //
customerNo: '', //
customerSid: '', // sid
modelName: '', //
modelSid: '', // sid
orderNum: '', //
salePrice: '', //
saleTypeKey: '', // key
saleTypeValue: '', // Value
stopRemarks: '', //
useOrgName: '',
useOrgSid: '',
taskId: '',
busSalesOrderReturnVehs: [],
orgSidPath: ''
}
this.$refs['form_obj'].resetFields()
this.$emit('doback')
}
}
}
</script>
<style scoped>
</style>
Loading…
Cancel
Save