15 changed files with 2864 additions and 1204 deletions
@ -0,0 +1,419 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>出库申请详情</div> |
|||
<div> |
|||
<el-button type="primary" @click="openAgree('同意')">同 意</el-button> |
|||
<el-button type="danger" @click="openReject('驳回')">驳 回</el-button> |
|||
<el-button type="danger" @click="openStop('终止')">终 止</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-form ref="dataForm" :model="temp" label-position="right" label-width="100%" class="formadd" :rules="rules"> |
|||
<div class="tit"> |
|||
出库申请 |
|||
<div class="times"> |
|||
<div> |
|||
<span>合同编号:</span><span>{{ temp.contractNo }}</span> |
|||
</div> |
|||
<div> |
|||
<span>申请日期:</span><span>{{ temp.applyDate }}</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<el-row class="nothingBorder"> |
|||
<el-col :span="2"/> |
|||
<el-col :span="4"> |
|||
<el-form-item><span slot="label">客户名称:</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
{{ temp.name }} |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item><span slot="label">是否为终端客户:</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<el-radio v-model="temp.isTerminal" disabled :label="0">否</el-radio> |
|||
<el-radio v-model="temp.isTerminal" disabled :label="1">是</el-radio> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"/> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="2"/> |
|||
<el-col :span="4"> |
|||
<el-form-item><span slot="label">车型:</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<span>{{ temp.modelName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"/> |
|||
</el-row> |
|||
<!--Start 预订车辆信息--> |
|||
<div class="titcon"> |
|||
<div class="title">车辆信息</div> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="detailsList" border style="width: 100%" :index="index" fit> |
|||
<el-table-column align="center" label="序号" width="50"/> |
|||
<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.price }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="使用人信息" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button v-show="scope.row.isExist == '1'" size="medium" type="primary" @click="lookUserInfo(scope.row.vinNo)" class="btntopbluebut">查看</el-button> |
|||
<span v-show="temp.isTerminal == 0 && scope.row.isExist == '0'">无</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center" align="left"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.remarks }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<user-info-look v-show="viewState == 2" ref="divUserInfo" @doback="resetState"/> |
|||
<!-- 选择待办人 的弹出框--> |
|||
<el-dialog title="选择待办人" :visible.sync="nodeDialogVisible" width="80%"> |
|||
<el-form label-position="right" class="formadd" > |
|||
<el-row v-show="currentLink"> |
|||
<el-col :span="4" class="tleftb">当前环节</el-col> |
|||
<el-col :span="20" class="trightb"> |
|||
<el-form-item prop="purchasingUnitName"><span>{{ current.taskName }}->{{ nextNode.name }}</span></el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4" class="tleftb">意见</el-col> |
|||
<el-col :span="20" class="trightb"> |
|||
<el-input size="small" v-model="dialogList.comment" placeholder="审批意见" clearable ></el-input> |
|||
</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 { fetchDetailsBySid, complete, breakProcess, reject, getPreviousNodesForReject, getNextNodesForSubmit } from '@/api/chukuguanli/chukubanli' |
|||
import userInfoLook from './relation/userInfo' |
|||
|
|||
export default { |
|||
name: 'chukuDaiBanInfo', |
|||
components: { |
|||
userInfoLook |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
dialogStatus: 'add', // 提交状态 |
|||
// --按钮菜单------- |
|||
viewState: 1, |
|||
// === |
|||
listLoading: false, |
|||
list: [], |
|||
temp: { |
|||
applyName: window.sessionStorage.getItem('name'), // 申请人 |
|||
applySid: window.sessionStorage.getItem('staffSid'), // 申请人sid 即staffSid |
|||
contractNo: '', // 合同编号 |
|||
isTerminal: 3, // 是否是终端 1是,0不是 |
|||
modelName: '', // 车型别名 |
|||
name: '', // 客户名称 |
|||
sid: '', |
|||
applyDate: '', // 申请日期 |
|||
detailsList: [] |
|||
}, // 添加和修改 |
|||
detailsList: [], |
|||
sids: [], |
|||
vinNo_info: '', |
|||
rules: {}, |
|||
dialogList: { |
|||
comment: '' |
|||
}, |
|||
operation: '', // 点击操作按钮 |
|||
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) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
// 点击(同意、终止、驳回、驳回)操作时所需的参数 |
|||
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: document.body.scrollHeight + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
// ------------ 页面初始化 ------------ |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
fetchDetailsBySid({ sid: sid }).then((response) => { |
|||
if (response.success) { |
|||
this.temp = response.data |
|||
this.temp.sid = sid |
|||
this.detailsList = response.data.listVo |
|||
console.log('详情回显车辆信息', this.detailsList) |
|||
for (var i = 0; i < this.detailsList.length; i++) { |
|||
if (this.detailsList[i].useMessage.vinNo !== '') { |
|||
this.detailsList[i].isExist = '1' |
|||
} |
|||
if (this.detailsList[i].useMessage.vinNo == '') { |
|||
this.detailsList[i].isExist = '0' |
|||
} |
|||
} |
|||
this.temp = JSON.parse(JSON.stringify(this.temp).replace(/listVo/g, 'detailsList')) |
|||
console.log('isTerminal', this.temp.isTerminal) |
|||
} |
|||
}) |
|||
}, |
|||
// 查看用户人信息 |
|||
lookUserInfo(vinNo) { |
|||
console.log('1111', vinNo) |
|||
for (var i = 0; i < this.detailsList.length; i++) { |
|||
if (this.detailsList[i].vinNo === vinNo) { |
|||
let useMessage = {} |
|||
useMessage = this.detailsList[i].useMessage |
|||
this.viewState = 2 |
|||
this.$refs['divUserInfo'].showInfo(useMessage) |
|||
} |
|||
} |
|||
}, |
|||
// 同意 |
|||
openAgree(val) { |
|||
this.operation = val |
|||
this.currentLink = true |
|||
this.dialogList.comment = '' |
|||
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 = '' |
|||
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.dialogList.comment = '' |
|||
this.currentLink = false |
|||
this.nodeDialogVisible = true |
|||
}, |
|||
reject() { |
|||
if (this.operation === '同意') { |
|||
this.handleAgree() |
|||
} else if (this.operation === '驳回') { |
|||
this.handleReject() |
|||
} else if (this.operation === '终止') { |
|||
this.handleStop() |
|||
} |
|||
}, |
|||
/** 同意任务 */ |
|||
handleAgree() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
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 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 驳回任务 */ |
|||
handleReject() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
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 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
/** 终止任务 */ |
|||
handleStop() { |
|||
this.linkByParameter.comment = this.dialogList.comment |
|||
console.log(this.stopList, 99999) |
|||
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 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.tit { |
|||
margin: 0 0 20px 0; |
|||
padding: 10px 0 0 0; |
|||
} |
|||
|
|||
.times { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-around; |
|||
padding: 30px 0 10px 0; |
|||
margin: 0 auto 0px auto; |
|||
width: 70%; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
.formadd /deep/ .el-row { |
|||
border: 0; |
|||
} |
|||
|
|||
.formadd /deep/ .el-col { |
|||
border: 0; |
|||
} |
|||
|
|||
/deep/ .el-form-item__content { |
|||
margin-left: 0 !important; |
|||
} |
|||
|
|||
.titcon { |
|||
border: 1px solid #e0e3eb; |
|||
} |
|||
|
|||
.titcon, |
|||
.title { |
|||
background-color: white; |
|||
color: black; |
|||
} |
|||
|
|||
.changeIt { |
|||
line-height: 40px; |
|||
font-size: 17px; |
|||
float: right; |
|||
} |
|||
</style> |
@ -0,0 +1,456 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<!-- <div v-else></div> --> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="createBtn" @click="handLeSelect()">选择车辆</el-button> |
|||
<el-button type="primary" size="small" :disabled="createBtn" @click="handleCreate()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="createBtn" @click="handleSubmit()">提交</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-form ref="dataForm" :model="temp" label-position="right" label-width="100%" class="formadd" :rules="rules"> |
|||
<div class="tit"> |
|||
出库申请 |
|||
<div class="times"> |
|||
<div><span>合同编号:</span><span>{{ temp.contractNo }}</span></div> |
|||
<div><span>申请日期:</span><span>{{ temp.applyDate }}</span></div> |
|||
</div> |
|||
</div> |
|||
<el-row class="nothingBorder"> |
|||
<el-col :span="2"/> |
|||
<el-col :span="4"> |
|||
<el-form-item><span slot="label">客户名称:</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
{{ temp.name }} |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item><span slot="label">是否为终端客户:</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<el-radio v-model="temp.isTerminal" :label="0">否</el-radio> |
|||
<el-radio v-model="temp.isTerminal" :label="1">是</el-radio> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"/> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="2"/> |
|||
<el-col :span="4"> |
|||
<el-form-item><span slot="label">车型:</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<span>{{ temp.modelName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"/> |
|||
</el-row> |
|||
<!--Start 预订车辆信息--> |
|||
<div class="titcon"> |
|||
<div class="title">车辆信息</div> |
|||
<div class="baocun"> |
|||
<el-button v-show="temp.isTerminal === 0" size="medium" type="primary" @click="openUserInfo" class="btntopbluebut">录入用人信息</el-button> |
|||
<el-button v-show="temp.isTerminal === 0" size="medium" type="danger" @click="clearUserInfo">置空使用人信息</el-button> |
|||
</div> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="detailsList" border style="width: 100%" :index="index" fit @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed type="selection" align="center" width="50"/> |
|||
<el-table-column fixed align="center" label="序号" type="index" width="50"/> |
|||
<el-table-column fixed align="center" label="操作" type="index" width="80"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="danger" size="small" @click="handleDel(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"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.price }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="使用人信息" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button v-show="temp.isTerminal === 0 && scope.row.isExist == '1'" size="medium" type="primary" @click="updateUserInfo(scope.row.vinNo)" class="btntopbluebut">修改 |
|||
</el-button> |
|||
<el-button v-show="temp.isTerminal === 0 && scope.row.isExist == '1'" size="medium" type="primary" @click="lookUserInfo(scope.row.vinNo)" class="btntopbluebut">查看 |
|||
</el-button> |
|||
<el-button v-show="temp.isTerminal === 1" size="medium" type="primary" @click="lookUserInfo(scope.row.vinNo)" class="btntopbluebut">查看 |
|||
</el-button> |
|||
<span v-show="temp.isTerminal == 3">无</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-input v-model="scope.row.remarks" class="addinputw" placeholder="请输入备注" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> <!--@returnEdit="getUserInfoEdit"--> |
|||
<daichukucheliang v-show="viewState == 2" ref="divSelect" @doback="resetState" @backData="backData"/> |
|||
<user-info-add v-show="viewState == 3 || viewState == 4" ref="divUser" @doback="resetState" @returnInfo="getUserInfo"/> |
|||
<user-info-look v-show="viewState == 5" ref="divUserInfo" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { fetchDetailsBySid, save, submitInfo } from '@/api/chukuguanli/chukubanli' |
|||
import daichukucheliang from './daichuku' |
|||
import userInfoAdd from './relation/userEdit' |
|||
import userInfoLook from './relation/userInfo' |
|||
|
|||
export default { |
|||
name: 'chukuEdit', |
|||
components: { |
|||
daichukucheliang, |
|||
userInfoAdd, |
|||
userInfoLook |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
createBtn: false, // 保存、提交按钮状态 |
|||
// --按钮菜单------- |
|||
viewState: 1, |
|||
isShow: true, |
|||
// === |
|||
listLoading: false, |
|||
list: [], |
|||
temp: { |
|||
applyName: '', // 申请人 |
|||
applySid: '', // 申请人sid 即staffSid |
|||
contractNo: '', // 合同编号 |
|||
isTerminal: 3, // 是否是终端 1是,0不是 |
|||
modelName: '', // 车型别名 |
|||
name: '', // 客户名称 |
|||
sid: '', |
|||
applyDate: '', // 申请日期 |
|||
userSid: '', |
|||
taskId: '', |
|||
instanceId: '', |
|||
detailsList: [] |
|||
}, // 添加和修改 |
|||
detailsList: [], |
|||
sids: [], |
|||
vinNo_info: '', |
|||
index_list: [], |
|||
rules: {} |
|||
} |
|||
}, |
|||
created() { |
|||
console.log('url:' + window.location.href) |
|||
var one = window.location.href.indexOf('&data') + 6 |
|||
const data = window.location.href.substr(one) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
this.showInfo(obj.businessSid) |
|||
}, |
|||
mounted() { |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 告诉父级页面,子页面的弹框高度。 |
|||
code: 2, |
|||
data: document.body.scrollHeight + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
this.viewTitle = '【编辑】出库申请' |
|||
fetchDetailsBySid({ sid: sid }).then(response => { |
|||
if (response.success) { |
|||
this.temp = response.data |
|||
this.temp.sid = sid |
|||
this.temp.instanceId = response.data.procInstId |
|||
this.detailsList = response.data.listVo |
|||
for (var i = 0; i < this.detailsList.length; i++) { |
|||
// JSON.stringify() |
|||
if (this.detailsList[i].useMessage.vinNo !== '') { |
|||
this.detailsList[i].isExist = '1' |
|||
} |
|||
} |
|||
this.temp = JSON.parse(JSON.stringify(this.temp).replace(/listVo/g, 'detailsList')) |
|||
console.log('isTerminal', this.temp.isTerminal) |
|||
console.log('temp', this.temp) |
|||
} |
|||
}) |
|||
}, |
|||
// ------------ 页面跳转以及数据获取 ------------ |
|||
handLeSelect() { |
|||
this.viewState = 2 |
|||
this.$refs['divSelect'].showData(this.detailsList) |
|||
}, |
|||
handleDel(index) { |
|||
this.detailsList.splice(index, 1) |
|||
}, |
|||
backData(value) { |
|||
this.viewState = 1 |
|||
this.temp.contractNo = value[0].contractNo |
|||
this.temp.name = value[0].name |
|||
this.temp.modelName = value[0].modelName |
|||
if (value.length > 0) { |
|||
value.forEach((e) => { |
|||
this.detailsList.push({ |
|||
price: e.price, // 成交价 |
|||
remarks: '', // 备注 |
|||
vinNo: e.vinNo, // 车架号 |
|||
useMessage: { |
|||
contractNo: value[0].contractNo, |
|||
vinNo: value[0].vinNo, |
|||
name: value[0].name, |
|||
mobile: value[0].mobile, |
|||
idNo: value[0].idNo, |
|||
address: value[0].address |
|||
} |
|||
}) |
|||
}) |
|||
} |
|||
}, |
|||
handleSelectionChange(row) { |
|||
console.log('开票', row) |
|||
const aa = [] |
|||
const bb = [] |
|||
const index_arr = [] |
|||
row.forEach((element, index) => { |
|||
aa.push(element.vinNo) |
|||
bb.push(element.sid) |
|||
this.detailsList.forEach((v, i) => { |
|||
// id 是每一行的数据id |
|||
if (element.vinNo === v.vinNo) { |
|||
index_arr.push(i) |
|||
} |
|||
}) |
|||
}) |
|||
this.vinNo_info = aa.join() |
|||
this.sids = bb |
|||
this.index_list = index_arr |
|||
}, |
|||
openUserInfo() { |
|||
if (this.sids.length > 0) { |
|||
console.log('车架号', this.vinNo_info, '合同编号', this.temp.contractNo) |
|||
this.viewState = 3 |
|||
this.$refs['divUser'].showAdd(this.temp.contractNo, this.vinNo_info) |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '请选择出库车辆信息!', |
|||
type: 'error' |
|||
}) |
|||
return |
|||
} |
|||
}, |
|||
// 修改用户人信息 |
|||
updateUserInfo(vinNo) { |
|||
this.viewState = 4 |
|||
let useMessage = {} |
|||
for (var i = 0; i < this.detailsList.length; i++) { |
|||
if (this.detailsList[i].vinNo === vinNo) { |
|||
useMessage = { |
|||
address: this.detailsList[i].useMessage.address, |
|||
contractNo: this.detailsList[i].useMessage.contractNo, |
|||
idNo: this.detailsList[i].useMessage.idNo, |
|||
mobile: this.detailsList[i].useMessage.mobile, |
|||
name: this.detailsList[i].useMessage.name, |
|||
vinNo: this.detailsList[i].useMessage.vinNo |
|||
} |
|||
} |
|||
} |
|||
this.$refs['divUser'].showEdit(useMessage, vinNo) |
|||
}, |
|||
// 查看用户人信息 |
|||
lookUserInfo(vinNo) { |
|||
this.viewState = 5 |
|||
let useMessage = {} |
|||
if (this.temp.isTerminal === 1) { |
|||
for (var i = 0; i < this.detailsList.length; i++) { |
|||
useMessage = this.detailsList[i] |
|||
if (this.detailsList[i].useMessage !== {}) { |
|||
useMessage = this.detailsList[i].useMessage |
|||
} |
|||
} |
|||
} |
|||
if (this.temp.isTerminal === 0) { |
|||
for (var g = 0; g < this.detailsList.length; g++) { |
|||
if (this.detailsList[g].vinNo === vinNo) { |
|||
useMessage = { |
|||
address: this.detailsList[g].useMessage.address, |
|||
contractNo: this.detailsList[g].useMessage.contractNo, |
|||
idNo: this.detailsList[g].useMessage.idNo, |
|||
mobile: this.detailsList[g].useMessage.mobile, |
|||
name: this.detailsList[g].useMessage.name, |
|||
vinNo: this.detailsList[g].useMessage.vinNo |
|||
} |
|||
} |
|||
} |
|||
} |
|||
this.$refs['divUserInfo'].showInfo(useMessage) |
|||
}, |
|||
// 清空用户人信息 |
|||
clearUserInfo() { |
|||
if (this.sids.length > 0) { |
|||
for (var i = 0; i < this.index_list.length; i++) { |
|||
if (this.detailsList[this.index_list[i]].isExist == '1') { |
|||
this.detailsList[this.index_list[i]].useMessage = { |
|||
contractNo: '', |
|||
vinNo: '', |
|||
name: '', |
|||
mobile: '', |
|||
idNo: '', |
|||
address: '' |
|||
} |
|||
this.detailsList[this.index_list[i]].isExist = '' |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '成功置空使用人信息!', |
|||
type: 'success' |
|||
}) |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '此车辆无使用人信息!', |
|||
type: 'error' |
|||
}) |
|||
return |
|||
} |
|||
} |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '请选择出库车辆信息!', |
|||
type: 'error' |
|||
}) |
|||
return |
|||
} |
|||
}, |
|||
// 添加用户人信息 |
|||
getUserInfo(tempUser) { |
|||
console.log('开票申请页面的tempUser', tempUser) |
|||
const vinNo_array = tempUser.vinNo.split(',') // 这是保存过来的使用人信息 |
|||
console.log('保存过来的vinNo', vinNo_array) |
|||
for (var i = 0; i < this.detailsList.length; i++) { |
|||
for (var j = 0; j < vinNo_array.length; j++) { |
|||
if (this.detailsList[i].vinNo === vinNo_array[j]) { |
|||
this.detailsList[i].useMessage = tempUser |
|||
this.detailsList[i].isExist = '1' |
|||
console.log('保存到detailsList的信息', this.detailsList) |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
// ------------ 功能实现 ------------ |
|||
// 添加数据 |
|||
handleCreate() { |
|||
this.temp.detailsList = this.detailsList |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (valid) { |
|||
this.createBtn = true |
|||
save(this.temp).then((response) => { |
|||
if (response.success) { |
|||
this.createBtn = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}).catch((e) => { |
|||
this.createBtn = false |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// 提交 |
|||
handleSubmit() { |
|||
this.$confirm('是否确定提交该业务', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (valid) { |
|||
this.createBtn = true |
|||
this.temp.detailsList = this.detailsList |
|||
submitInfo(this.temp).then((response) => { |
|||
if (response.success) { |
|||
this.createBtn = false |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} |
|||
}).catch(e => { |
|||
this.createBtn = false |
|||
}) |
|||
} |
|||
}) |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.tit { |
|||
margin: 0 0 20px 0; |
|||
padding: 10px 0 0 0; |
|||
} |
|||
|
|||
.times { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-around; |
|||
padding: 30px 0 10px 0; |
|||
margin: 0 auto 0px auto; |
|||
width: 70%; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
.formadd /deep/ .el-row { |
|||
border: 0; |
|||
} |
|||
|
|||
.formadd /deep/ .el-col { |
|||
border: 0; |
|||
} |
|||
|
|||
/deep/ .el-form-item__content { |
|||
margin-left: 0 !important; |
|||
} |
|||
|
|||
.titcon { |
|||
border: 1px solid #e0e3eb; |
|||
} |
|||
|
|||
.titcon, .title { |
|||
background-color: white; |
|||
color: black; |
|||
} |
|||
|
|||
.formadd .el-row .el-col { |
|||
padding: 0 !important; |
|||
} |
|||
</style> |
@ -0,0 +1,291 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>出库申请详情</div> |
|||
<div> |
|||
<el-button type="danger" @click="openRevoke()">撤 回 </el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-form ref="dataForm" :model="temp" label-position="right" label-width="100%" class="formadd" :rules="rules"> |
|||
<div class="tit"> |
|||
出库申请 |
|||
<div class="times"> |
|||
<div> |
|||
<span>合同编号:</span><span>{{ temp.contractNo }}</span> |
|||
</div> |
|||
<div> |
|||
<span>申请日期:</span><span>{{ temp.applyDate }}</span> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<el-row class="nothingBorder"> |
|||
<el-col :span="2"/> |
|||
<el-col :span="4"> |
|||
<el-form-item><span slot="label">客户名称:</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
{{ temp.name }} |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="4"> |
|||
<el-form-item><span slot="label">是否为终端客户:</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<el-radio v-model="temp.isTerminal" disabled :label="0">否</el-radio> |
|||
<el-radio v-model="temp.isTerminal" disabled :label="1">是</el-radio> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="2"/> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="2"/> |
|||
<el-col :span="4"> |
|||
<el-form-item><span slot="label">车型:</span></el-form-item> |
|||
</el-col> |
|||
<el-col :span="6"> |
|||
<el-form-item> |
|||
<span>{{ temp.modelName }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
<el-col :span="12"/> |
|||
</el-row> |
|||
<!--Start 预订车辆信息--> |
|||
<div class="titcon"> |
|||
<div class="title">车辆信息</div> |
|||
</div> |
|||
<el-table v-loading="listLoading" :data="detailsList" border style="width: 100%" :index="index" fit> |
|||
<el-table-column align="center" label="序号" width="50"/> |
|||
<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.price }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="使用人信息" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button v-show="scope.row.isExist == '1'" size="medium" type="primary" @click="lookUserInfo(scope.row.vinNo)" class="btntopbluebut">查看</el-button> |
|||
<span v-show="temp.isTerminal == 0 && scope.row.isExist == '0'">无</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.remarks }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<user-info-look v-show="viewState == 2" ref="divUserInfo" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { fetchDetailsBySid, revokeProcess } from '@/api/chukuguanli/chukubanli' |
|||
import userInfoLook from './relation/userInfo' |
|||
|
|||
export default { |
|||
name: 'chukuYiBanInfo', |
|||
components: { |
|||
userInfoLook |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
dialogStatus: 'add', // 提交状态 |
|||
// --按钮菜单------- |
|||
viewState: 1, |
|||
// === |
|||
listLoading: false, |
|||
list: [], |
|||
temp: { |
|||
applyName: window.sessionStorage.getItem('name'), // 申请人 |
|||
applySid: window.sessionStorage.getItem('staffSid'), // 申请人sid 即staffSid |
|||
contractNo: '', // 合同编号 |
|||
isTerminal: 3, // 是否是终端 1是,0不是 |
|||
modelName: '', // 车型别名 |
|||
name: '', // 客户名称 |
|||
sid: '', |
|||
applyDate: '', // 申请日期 |
|||
detailsList: [] |
|||
}, // 添加和修改 |
|||
detailsList: [], |
|||
sids: [], |
|||
vinNo_info: '', |
|||
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) // url解码unescape()已从web中移除,尽量不使用 |
|||
const obj = JSON.parse(decodeURIComponent(data)) |
|||
// 点击(同意、终止、驳回、驳回)操作时所需的参数 |
|||
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: document.body.scrollHeight + 'px' |
|||
} |
|||
}, '*') |
|||
}, |
|||
methods: { |
|||
// ------------ 页面初始化 ------------ |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
showInfo(sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
fetchDetailsBySid({ sid: sid }).then((response) => { |
|||
if (response.success) { |
|||
this.temp = response.data |
|||
this.temp.sid = sid |
|||
this.detailsList = response.data.listVo |
|||
console.log('详情回显车辆信息', this.detailsList) |
|||
for (var i = 0; i < this.detailsList.length; i++) { |
|||
if (this.detailsList[i].useMessage.vinNo !== '') { |
|||
this.detailsList[i].isExist = '1' |
|||
} |
|||
if (this.detailsList[i].useMessage.vinNo == '') { |
|||
this.detailsList[i].isExist = '0' |
|||
} |
|||
} |
|||
this.temp = JSON.parse(JSON.stringify(this.temp).replace(/listVo/g, 'detailsList')) |
|||
console.log('isTerminal', this.temp.isTerminal) |
|||
} |
|||
}) |
|||
}, |
|||
// 查看用户人信息 |
|||
lookUserInfo(vinNo) { |
|||
console.log('1111', vinNo) |
|||
for (var i = 0; i < this.detailsList.length; i++) { |
|||
if (this.detailsList[i].vinNo === vinNo) { |
|||
let useMessage = {} |
|||
useMessage = this.detailsList[i].useMessage |
|||
this.viewState = 2 |
|||
this.$refs['divUserInfo'].showInfo(useMessage) |
|||
} |
|||
} |
|||
}, |
|||
/** 确认撤回任务 */ |
|||
openRevoke() { |
|||
this.$confirm('是否确认执行撤回操作', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.handleRevoke() |
|||
}).catch(() => { |
|||
this.$message({ |
|||
type: 'info', |
|||
message: '已取消撤回' |
|||
}) |
|||
}) |
|||
}, |
|||
/** 撤回任务 */ |
|||
handleRevoke() { |
|||
revokeProcess(this.linkByParameter).then((response) => { |
|||
if (response.success) { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行成功', |
|||
type: 'success', |
|||
duration: 2000 |
|||
}) |
|||
// 子页面向父级页面传递值 |
|||
window.parent.postMessage({ |
|||
cmd: 'returnHeight', |
|||
params: { |
|||
// 操作成功,告诉父级页面关闭弹框 |
|||
code: 1 |
|||
} |
|||
}, '*') |
|||
} else { |
|||
this.$notify({ |
|||
title: '提示', |
|||
message: '执行失败', |
|||
type: 'error', |
|||
duration: 2000 |
|||
}) |
|||
} |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.tit { |
|||
margin: 0 0 20px 0; |
|||
padding: 10px 0 0 0; |
|||
} |
|||
|
|||
.times { |
|||
display: flex; |
|||
flex-direction: row; |
|||
justify-content: space-around; |
|||
padding: 30px 0 10px 0; |
|||
margin: 0 auto 0px auto; |
|||
width: 70%; |
|||
font-size: 14px; |
|||
} |
|||
|
|||
.formadd /deep/ .el-row { |
|||
border: 0; |
|||
} |
|||
|
|||
.formadd /deep/ .el-col { |
|||
border: 0; |
|||
} |
|||
|
|||
/deep/ .el-form-item__content { |
|||
margin-left: 0 !important; |
|||
} |
|||
|
|||
.titcon { |
|||
border: 1px solid #e0e3eb; |
|||
} |
|||
|
|||
.titcon, |
|||
.title { |
|||
background-color: white; |
|||
color: black; |
|||
} |
|||
|
|||
.changeIt { |
|||
line-height: 40px; |
|||
font-size: 17px; |
|||
float: right; |
|||
} |
|||
</style> |
@ -0,0 +1,316 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--待开票列表页面--> |
|||
<div> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>待出库车辆列表</div> |
|||
<!--start 查询列表按钮部分开始--> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="handleCreate()">确定</el-button> |
|||
<el-button type="info" size="small" @click="handleColse()">确定</el-button> |
|||
</div> |
|||
<!--end 查询列表按钮部分结束--> |
|||
</div> |
|||
<!--按钮部分结束--> |
|||
<!--Start查询列表部分--> |
|||
<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.contractNo" placeholder="请输入合同编号" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<el-form-item label="客户名称"> |
|||
<el-select v-model="listQuery.name" class="addinputw" clearable filterable placeholder="请选择" @change="customerChange"> |
|||
<el-option v-for="item in customerList" :key="item.sid" :label="item.customerName" :value="item.customerName"/> |
|||
</el-select> |
|||
</el-form-item> |
|||
<el-form-item label="车架号"> |
|||
<el-input v-model="listQuery.vinNo" placeholder="请输入车架号" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<el-divider></el-divider> |
|||
<div class="searchbtns"> |
|||
<el-button type="primary" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" @click="handleReset">重置</el-button> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
<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> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class="listcon"> |
|||
<el-table ref="multipleTable" :key="tableKey" v-loading="listLoading" :data="list" :border="true" fit highlight-current-row style="width: 100%;" @selection-change="handleSelectionChange"> |
|||
<el-table-column fixed type="selection" align="center" width="50"/> |
|||
<el-table-column fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/> |
|||
<el-table-column label="认款状态" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.type }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="合同编号" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.contractNo }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="客户名称" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.name }}</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.modelName }}</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> |
|||
</template> |
|||
|
|||
<script> |
|||
import { listPage, customerName } from '@/api/chukuguanli/chukubanli' |
|||
import { setuser } from '@/utils/baocun' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
|
|||
export default { |
|||
name: 'daichuku', |
|||
components: { |
|||
Pagination, |
|||
pageye |
|||
}, |
|||
data() { |
|||
return { |
|||
isSearchShow: false, // 主页面:隐藏查询条件按钮 |
|||
searchxianshitit: '显示查询条件', |
|||
// 查询 ----------- |
|||
tableKey: 0, |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
customerList: [], |
|||
typeList: [], // 选择器 |
|||
list: [], |
|||
// 翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
contractNo: '', // 合同编号 |
|||
name: '', // 客户名称 |
|||
vinNo: '', // 车架号 |
|||
userSid: '', |
|||
vinNoList: [] |
|||
} |
|||
}, |
|||
multipleSelection: [] |
|||
} |
|||
}, |
|||
methods: { |
|||
showData(value) { |
|||
const aa = [] |
|||
console.log(value, 999999) |
|||
if (value.length > 0) { |
|||
for (var i = 0; i < value.length; i++) { |
|||
aa.push(value[i].vinNo) |
|||
} |
|||
console.log(aa, 8888) |
|||
this.listQuery.params.vinNoList = aa |
|||
} else { |
|||
this.listQuery.params.vinNoList = [] |
|||
} |
|||
this.getCustomer() |
|||
this.getList() |
|||
}, |
|||
// 客户下拉框 |
|||
getCustomer() { |
|||
customerName().then((response) => { |
|||
if (response.code === '200') { |
|||
this.customerList = response.data |
|||
console.log('客户列表', this.customerList) |
|||
} |
|||
}) |
|||
}, |
|||
// 客户名称 |
|||
customerChange(value) { |
|||
console.log('触发下拉框按钮', value) |
|||
let bb = {} |
|||
this.typeList.forEach((e) => { |
|||
if (e.customerName === value) { |
|||
bb = { |
|||
name: e.customerName, |
|||
sid: e.sid |
|||
} |
|||
} |
|||
}) |
|||
this.listQuery.params.name = bb.name |
|||
console.log('客户名称', this.listQuery.params.name) |
|||
}, |
|||
// ========== 页面按钮功能 ========== |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|||
var pageindex = index + 1 + pagestart |
|||
return pageindex |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
console.log('待出库', row) |
|||
this.multipleSelection = row |
|||
const aa = [] |
|||
for (var i = 0; i < row.length; i++) { |
|||
for (var j = i + 1; j < row.length; j++) { |
|||
if (row[i].contractNo !== row[j].contractNo) { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '请选择同一合同编号的车辆!', |
|||
type: 'error' |
|||
}) |
|||
} |
|||
} |
|||
} |
|||
row.forEach(element => { |
|||
aa.push({ |
|||
address: element.address, |
|||
contractNo: element.contractNo, |
|||
idNo: element.idNo, |
|||
mobile: element.mobile, |
|||
modelName: element.modelName, |
|||
name: element.name, |
|||
price: element.price, |
|||
vinNo: element.vinNo |
|||
}) |
|||
}) |
|||
this.sids = aa |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
total: 0, |
|||
params: { |
|||
contractNo: '', // 合同编号 |
|||
name: '', // 客户名称 |
|||
vinNo: '', // 车架号 |
|||
userSid: '', |
|||
vinNoList: [] |
|||
} |
|||
} |
|||
this.getList() |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
this.listQuery.params.userSid = window.sessionStorage.getItem('userSid') |
|||
listPage(this.listQuery).then(response => { // 拦截器 |
|||
this.listLoading = false |
|||
console.log(response) |
|||
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 |
|||
} |
|||
}) |
|||
}, |
|||
// 打开新增 |
|||
handleCreate() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({ showClose: true, type: 'error', message: '请选择一条记录进行出库申请' }) |
|||
return |
|||
} |
|||
if (this.sids.length > 0) { |
|||
this.FormLoading = true |
|||
for (var i = 0; i < this.multipleSelection.length; i++) { |
|||
for (var j = i + 1; j < this.multipleSelection.length; j++) { |
|||
if (this.multipleSelection[i].contractNo !== this.multipleSelection[j].contractNo) { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '请选择同一合同编号的车辆!', |
|||
type: 'error' |
|||
}) |
|||
return |
|||
} |
|||
} |
|||
} |
|||
this.$emit('backData', this.sids) |
|||
} |
|||
}, |
|||
handleColse() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.switch_btn { |
|||
padding: 15px 0 10px 0; |
|||
} |
|||
|
|||
.btn_style { |
|||
background-color: #018ad2; |
|||
color: white; |
|||
font-weight: 600; |
|||
} |
|||
|
|||
/deep/ .el-collapse { |
|||
border-top: 0px solid #e6ebf5; |
|||
border-bottom: 0px solid #e6ebf5; |
|||
} |
|||
|
|||
/deep/ .el-collapse-item__content { |
|||
margin: 0; |
|||
padding: 0; |
|||
} |
|||
|
|||
/deep/ .el-collapse-item__wrap { |
|||
border-bottom: 0px solid #ebeef5; |
|||
} |
|||
|
|||
/deep/ .el-collapse-item__header { |
|||
border-bottom: 0px solid #e6ebf5; |
|||
} |
|||
|
|||
.searchbtn { |
|||
border: #2cab69 1px solid; |
|||
color: #2cab69; |
|||
} |
|||
|
|||
.searchli { |
|||
padding: 5px 100px; |
|||
} |
|||
</style> |
@ -0,0 +1,196 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="visible"> |
|||
<div class="tab-header webtop"> |
|||
<div>录入使用人信息</div> |
|||
<!-- <div v-else></div> --> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="createBtn" @click="handleCreate()">保存</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-form ref="dataForm" :model="tempUser" :rules="rules" label-position="right" class="formadd"> |
|||
<div class="tit">录入使用人信息</div> |
|||
<el-row> |
|||
<el-col :span="4" class="topBor"> |
|||
<span>合同编号</span> |
|||
</el-col> |
|||
<el-col :span="10" class="topBor"> |
|||
<el-form-item prop="contractNo"> |
|||
<span slot="label">{{ tempUser.contractNo }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<span>车架号</span> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item prop="vinNo"> |
|||
<span slot="label">{{ tempUser.vinNo }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<span>客户名称</span> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item prop="name"> |
|||
<el-input v-model="tempUser.name" maxlength="125" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<span>联系电话</span> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item prop="mobile"> |
|||
<el-input v-model="tempUser.mobile" maxlength="125" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<span>证件号码</span> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item prop="idNo"> |
|||
<el-input v-model="tempUser.idNo" maxlength="125" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<span>联系地址</span> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item prop="address"> |
|||
<el-input v-model="tempUser.address" maxlength="125" placeholder="" class="addinputw" clearable/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: 'userEdit', |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
disabled: false, // 保存、提交按钮状态 |
|||
createBtn: false, |
|||
// --按钮菜单------- |
|||
visible: true, |
|||
listLoading: false, |
|||
tempUser: { |
|||
contractNo: '', |
|||
vinNo: '', |
|||
sid: '' |
|||
}, // 添加和修改 |
|||
rules: {} |
|||
} |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
}, |
|||
methods: { |
|||
// ------------ 页面初始化 ------------ |
|||
init() { |
|||
this.tempUser = { |
|||
contractNo: '', |
|||
vinNo: '', |
|||
name: '', |
|||
mobile: '', |
|||
idNo: '', |
|||
address: '' |
|||
} |
|||
}, |
|||
showAdd(contractNo, vinNo) { |
|||
this.init() |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
this.state = 'add' |
|||
this.tempUser.contractNo = contractNo |
|||
this.tempUser.vinNo = vinNo // 多个的话是以逗号隔开的字符串 |
|||
}, |
|||
showEdit(useMessage, vinNo) { |
|||
this.init() |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
console.log('编辑拿到的信息', useMessage) |
|||
this.state = 'edit' |
|||
this.tempUser = useMessage |
|||
this.tempUser.vinNo = vinNo |
|||
}, |
|||
// ------------ 功能实现 ------------ |
|||
// 添加数据 |
|||
handleCreate() { |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (valid) { |
|||
this.createBtn = true |
|||
if (this.state === 'add') { |
|||
this.createBtn = false |
|||
console.log('新增保存数据', this.tempUser) |
|||
const aa = this.tempUser |
|||
this.$emit('returnInfo', aa) |
|||
this.handleReturn() |
|||
} else { |
|||
this.createBtn = false |
|||
console.log('修改保存数据', this.tempUser) |
|||
const bb = this.tempUser |
|||
this.$emit('returnInfo', bb) |
|||
this.handleReturn() |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.tit { |
|||
margin: 45px 0 66px 0; |
|||
padding: 10px 0 0 0; |
|||
border: 0; |
|||
} |
|||
|
|||
/deep/ .el-row { |
|||
display: flex; |
|||
justify-content: center; |
|||
border-left: 0; |
|||
} |
|||
|
|||
.topBor { |
|||
border-top: 1px solid #e0e3eb; |
|||
} |
|||
|
|||
/deep/ .el-form-item__content { |
|||
margin-left: 0 !important; |
|||
} |
|||
|
|||
/deep/ .el-col-4 { |
|||
text-align: right; |
|||
float: left; |
|||
font-size: 14px; |
|||
color: #606266; |
|||
line-height: 40px !important; |
|||
font-weight: 600; |
|||
border-left: 1px solid #e0e3eb; |
|||
} |
|||
</style> |
@ -0,0 +1,138 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>录入使用人信息</div> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class=""> |
|||
<el-form ref="dataForm" :model="tempUserLook" :rules="rules" label-position="right" class="formadd"> |
|||
<div class="tit">录入使用人信息</div> |
|||
<el-row> |
|||
<el-col :span="4" class="topBor"> |
|||
<span>合同编号</span> |
|||
</el-col> |
|||
<el-col :span="10" class="topBor"> |
|||
<el-form-item prop="contractNo"> |
|||
<span>{{ tempUserLook.contractNo }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<span>车架号</span> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item prop="vinNo"> |
|||
<span>{{ tempUserLook.vinNo }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<span>客户名称</span> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item prop="name"> |
|||
<span>{{ tempUserLook.name }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<span>联系电话</span> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item prop="mobile"> |
|||
<span>{{ tempUserLook.mobile }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<span>证件号码</span> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item prop="idNo"> |
|||
<span>{{ tempUserLook.idNo }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="4"> |
|||
<span>联系地址</span> |
|||
</el-col> |
|||
<el-col :span="10"> |
|||
<el-form-item prop="address"> |
|||
<span>{{ tempUserLook.address }}</span> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
|
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import {} from '@/api/chukuguanli/chukubanli' |
|||
|
|||
export default { |
|||
name: 'userInfo', |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
tempUserLook: {}, |
|||
rules: {} |
|||
} |
|||
}, |
|||
methods: { |
|||
showInfo(useMessage) { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}) |
|||
console.log('详情拿到的信息', useMessage) |
|||
this.tempUserLook = useMessage |
|||
}, |
|||
// 返回 |
|||
handleReturn() { |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.tit { |
|||
margin: 45px 0 66px 0; |
|||
padding: 10px 0 0 0; |
|||
border: 0; |
|||
} |
|||
|
|||
/deep/ .el-row { |
|||
display: flex; |
|||
justify-content: center; |
|||
border-left: 0; |
|||
} |
|||
|
|||
.topBor { |
|||
border-top: 1px solid #e0e3eb; |
|||
} |
|||
|
|||
/deep/ .el-form-item__content { |
|||
margin-left: 0 !important; |
|||
} |
|||
|
|||
/deep/ .el-col-4 { |
|||
text-align: right; |
|||
float: left; |
|||
font-size: 14px; |
|||
color: #606266; |
|||
line-height: 40px !important; |
|||
font-weight: 600; |
|||
border-left: 1px solid #e0e3eb; |
|||
} |
|||
</style> |
Loading…
Reference in new issue