
20 changed files with 3283 additions and 24 deletions
@ -0,0 +1,109 @@ |
|||
import request from '@/utils/request' |
|||
import qs from 'qs' |
|||
|
|||
// 待出库分页列表 已改
|
|||
export function listPage(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdelivered/listPage', |
|||
method: "post", |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 出库申请初始化/详情 已改
|
|||
export function fetchDetailsBySid(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/fetchDetailsBySid', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 出库分页列表 已改
|
|||
export function pagerList(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/listPage', |
|||
method: "post", |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 保存和修改接口 已改
|
|||
export function save(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/save', |
|||
method: "post", |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 列表提交 已改
|
|||
export function submitBySid(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/submitBySid', |
|||
method: "put", |
|||
params: { |
|||
sid: params |
|||
}, |
|||
headers: { |
|||
'Content-Type': 'application/x-www-form-urlencoded' |
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 表单中的提交 已改
|
|||
export function submitInfo(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/submit', |
|||
method: "post", |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 出库列表批量删除 已改
|
|||
export function delBySids(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/delBySids', |
|||
method: "DELETE", |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 模糊搜索客户
|
|||
export function customerName() { |
|||
return request({ |
|||
url: "/buscenter/v1/busorder/likeGetCustomerName", |
|||
method: "post" |
|||
// params: { staffSid: id }
|
|||
}); |
|||
} |
|||
|
|||
// 获取下拉框option
|
|||
export function typeValues(data) { |
|||
return request({ |
|||
url: '/portal/v1/dictcommons/typeValues', |
|||
method: 'get', |
|||
params: data |
|||
// headers: {
|
|||
// 'Content-Type':'multipart/form-data',
|
|||
// }
|
|||
}) |
|||
} |
@ -0,0 +1,450 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 5"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>出库申请管理</div> |
|||
<!--start 查询列表按钮部分开始--> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="handleSubmit()">提交</el-button> |
|||
<el-button type="danger" size="small" @click="handleDelete()">删除</el-button> |
|||
<el-button type="info" size="small" @click="handleClose()">关闭</el-button> |
|||
</div> |
|||
<!--end 查询列表按钮部分结束--> |
|||
</div> |
|||
<!--按钮部分结束--> |
|||
<div class="switch_btn"> |
|||
<el-button class="" @click="handleWaitList">待出库车辆列表</el-button> |
|||
<el-button :class="{btn_style:viewState === 5}">出库申请列表</el-button> |
|||
</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.params.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.params.applyName" placeholder="请输入申请人姓名" clearable class="filter-item"/> |
|||
</el-form-item> |
|||
<el-form-item label="申请日期"> |
|||
<div class="block"> |
|||
<el-date-picker |
|||
v-model="listQuery.params.applyDateStart" |
|||
type="date" |
|||
placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</div> |
|||
<label>至</label> |
|||
<div class="block"> |
|||
<el-date-picker |
|||
v-model="listQuery.params.applyDateEnd" |
|||
type="date" |
|||
placeholder="选择日期"> |
|||
</el-date-picker> |
|||
</div> |
|||
</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="total > 0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" |
|||
class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class="listcon"> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" :border="true" 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="150px" label="操作" align="center"> |
|||
<template slot-scope="scope"> |
|||
<div class="searchbtns"> <!--:disabled="scope.row.nodeState == ''?false:true"--> |
|||
<el-button size="small" type="primary" |
|||
:disabled="scope.row.state !== '待提交'" |
|||
@click="changeNodeState(scope.row)">办理 |
|||
</el-button> |
|||
<el-button size="small" type="primary" @click="handleCheck(scope.row)">查看</el-button> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.state }}</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.applyDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="申请人" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.applyName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="total > 0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" |
|||
class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
<chukushenqing-add v-show="viewState == 3" ref="divadd" @doback="resetState" |
|||
@reloadlist="getList"/> |
|||
<chukushenqing-info v-show="viewState == 4" ref="divInfo" @doback="resetState" |
|||
@reloadlist="getList"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import {mapGetters} from 'vuex' |
|||
import { |
|||
pagerList, |
|||
delBySids, |
|||
submitBySid, |
|||
customerName |
|||
} from '@/api/chukuguanli/chukubanli' |
|||
import {setuser, getuser} from '@/utils/baocun' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import chukushenqingAdd from "./chukushenqingAdd"; |
|||
import chukushenqingInfo from "./chukushenqingInfo"; |
|||
|
|||
export default { |
|||
name: "chukushenqing", |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
chukushenqingAdd, |
|||
chukushenqingInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
//主页面:隐藏查询条件按钮 |
|||
isSearchShow: false, |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 5, // 1、列表 2、新增 3、编辑 4、查看 |
|||
//查询 ----------- |
|||
tableKey: 0, |
|||
customerList: [], |
|||
list: [], |
|||
sids: [],// 用于导出的时候保存已选择的SIDs |
|||
sides: '', |
|||
state_list: [], |
|||
total: 1, |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
departmentSid: window.sessionStorage.getItem('departmentSid'), //部门sid |
|||
departmentName: window.sessionStorage.getItem('departmentName'), //部门名称 |
|||
typeList: [], //选择器 |
|||
//翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 20, |
|||
params: { |
|||
applyDateEnd: '', // 申请日期结束时间 |
|||
applyDateStart: '', // 申请日期开始时间 |
|||
applyName: '', // 申请人 |
|||
applySid: window.sessionStorage.getItem('staffSid'), // 申请人sid |
|||
contractNo: '', // 合同编号 |
|||
name: '', // 客户名称 |
|||
}, |
|||
}, |
|||
initObj: { |
|||
detailVo: { |
|||
applyDate: '', // 申请日期 |
|||
contractNo: '', // 合同编号 |
|||
isTerminal: '', // 是否是终端 |
|||
listVo: [], |
|||
modelName: '', // 车型别名 |
|||
name: '', // 客户名称 |
|||
}, |
|||
sid: '', |
|||
stringList: [] |
|||
}, |
|||
temp: {}, // 添加和修改 |
|||
templook: {}, // 查看实体 |
|||
textMap: { |
|||
update: '编辑', |
|||
create: '创建' |
|||
}, |
|||
dialogStatus: '', |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters(['id', 'roles', 'rolesIds', 'departmentId', 'departmentCode']), |
|||
}, |
|||
|
|||
created() { |
|||
// 初始化变量 |
|||
this.init(); |
|||
}, |
|||
methods: { |
|||
// ========== 初始化加载 ========== |
|||
init() { |
|||
this.getList() |
|||
this.getCustomer() |
|||
}, |
|||
//页面初始化 |
|||
resetTemp() { |
|||
this.temp = {} |
|||
}, |
|||
// 客户下拉框 |
|||
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) |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size; |
|||
var pageindex = index + 1 + pagestart; |
|||
return pageindex |
|||
}, |
|||
// ========== 页面按钮功能 ========== |
|||
// 切换列表页面 |
|||
handleWaitList() { |
|||
this.$parent.viewState = 1 |
|||
}, |
|||
// 编辑、详情返回列表页面 |
|||
resetState() { |
|||
this.viewState = 5 |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow; |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = '隐藏查询条件' |
|||
} else { |
|||
this.searchxianshitit = '显示查询条件' |
|||
} |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
console.log('开票', row) |
|||
const aa = []; |
|||
const bb = [] |
|||
row.forEach(element => { |
|||
aa.push(element.sid); |
|||
setuser(this.sids) //用于导出的时候保存已选择的sids |
|||
bb.push(element.state) |
|||
}); |
|||
this.sids = aa; |
|||
this.sides = this.sids.join(); //将sid数组的元素转化成字符串 |
|||
this.state_list = bb |
|||
console.log('sids数组', this.sids) |
|||
console.log('sides字符串', this.sides) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1; |
|||
this.getList() |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery.params = { |
|||
applicant: '', |
|||
contractNo: '', |
|||
customerName: '', |
|||
endDate: '', |
|||
invoiceState: '', |
|||
startDate: '' |
|||
} |
|||
}, |
|||
// ========== 业务功能 ========== |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true; |
|||
pagerList(this.listQuery).then(response => { //拦截器 |
|||
this.listLoading = false; |
|||
console.log(response) |
|||
if (response.code === '200' && response.data && response.data.total > 0) { |
|||
this.list = response.data.records; |
|||
this.total = response.data.total; |
|||
} else { |
|||
this.list = []; |
|||
this.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
// 打开查看 |
|||
handleCheck(row) { |
|||
this.viewState = 4; |
|||
this.$refs['divInfo'].showInfo(row.sid,row.state) |
|||
}, |
|||
// 办理 |
|||
changeNodeState(row) { |
|||
this.viewState = 3 |
|||
this.$refs['divadd'].showEdit(row, row.sid) |
|||
}, |
|||
// 提交 state_list |
|||
handleSubmit() { |
|||
if (this.sids.length > 1) { |
|||
this.$message({showClose: true, message: '请选择一条出库申请!', type: 'error'}); |
|||
return |
|||
} |
|||
if (this.sids.length == 0) { |
|||
this.$message({showClose: true, message: '请选择一条出库申请!', type: 'error'}); |
|||
return |
|||
} |
|||
if (this.sids.length == 1) { |
|||
if (this.state_list[0] == '待提交') { |
|||
const sid = this.sids[0] |
|||
submitBySid(sid).then((response) => { |
|||
if (response.success) { |
|||
this.getList() |
|||
} |
|||
}) |
|||
} else { |
|||
this.$message({showClose: true, message: '该业务已提交!', type: 'error'}); |
|||
return |
|||
} |
|||
} |
|||
}, |
|||
// 删除 |
|||
handleDelete() { |
|||
if (this.sids.length > 0) { |
|||
if (this.state_list.length > 0) { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '该业务已提交,不可删除!', |
|||
type: 'error' |
|||
}); |
|||
return |
|||
} |
|||
const sids = this.sids |
|||
delBySids(sids).then((response) => { |
|||
if (response.code === '200') { |
|||
this.getList() |
|||
} |
|||
}) |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '请选择出库申请信息!', |
|||
type: 'error' |
|||
}); |
|||
return |
|||
} |
|||
}, |
|||
// 关闭 |
|||
handleClose() { |
|||
|
|||
}, |
|||
// 导入 |
|||
// handleDaoRu() { |
|||
// this.$confirm('确定要导入数据, 是否继续?', '提示', { |
|||
// confirmButtonText: '确定', |
|||
// cancelButtonText: '取消', |
|||
// type: 'warning' |
|||
// }) |
|||
// }, |
|||
// 导出 |
|||
// handleDaoChu(row) { |
|||
// this.$confirm('确定要导出数据, 是否继续?', '提示', { |
|||
// confirmButtonText: '确定', |
|||
// cancelButtonText: '取消', |
|||
// type: 'warning' |
|||
// }) |
|||
// } |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.switch_btn { |
|||
padding: 15px 0 10px 0; |
|||
} |
|||
|
|||
.block { |
|||
display: inline-block; |
|||
} |
|||
|
|||
label { |
|||
padding: 0 6px; |
|||
} |
|||
|
|||
.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,467 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="isShow"> |
|||
<div class="tab-header webtop"> |
|||
<div>{{viewTitle}}</div> |
|||
<!-- <div v-else></div> --> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="createBtn" @click="handleCreate()">保存</el-button> |
|||
<el-button type="primary" size="small" :disabled="disabled" @click="handleSubmit()">提交</el-button> |
|||
<el-button type="primary" size="small">打印</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<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 type="selection" align="center" width="50"/> |
|||
<el-table-column align="center" label="序号" type="index" width="50"/> |
|||
<el-table-column label="车架号" align="center"> |
|||
<template slot-scope="scope" @click=""> |
|||
<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"> |
|||
<!-- && scope.row.exist == '1' scope.row.nodeState == '' ? false:scope.row.nodeState == '发起订单'?false : true --> |
|||
<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"--> |
|||
<user-info-add v-show="isShowAdd" ref="divUser" @doback="resetState" @returnInfo="getUserInfo"/> |
|||
<user-info-look v-show="isShowLook" ref="divUserInfo" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import {mapGetters} from 'vuex' |
|||
import {fetchDetailsBySid, save, submitInfo} from '@/api/chukuguanli/chukubanli' |
|||
import userInfoAdd from "./relation/userInfoAdd"; |
|||
import userInfoLook from "./relation/userInfoLook"; |
|||
|
|||
export default { |
|||
name: 'chukushenqingAdd', |
|||
components: { |
|||
userInfoAdd, |
|||
userInfoLook |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
disabled: false, // 保存、提交按钮状态 |
|||
createBtn: false, |
|||
dialogStatus: 'add', // 提交状态 |
|||
// --按钮菜单------- |
|||
isShow: true, |
|||
isShowAdd: false, |
|||
isShowLook: false, |
|||
// === |
|||
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: [{ |
|||
price: '', //成交价 |
|||
remarks: '', // 备注 |
|||
vinNo: '',// 车架号 |
|||
useMessage: {} |
|||
}], |
|||
sids: [], |
|||
vinNo_info: '', |
|||
index_list: [], |
|||
rules: {}, |
|||
|
|||
// ------------------------------------ |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'id', |
|||
'roles', |
|||
'rolesIds', |
|||
'departmentId', |
|||
'departmentCode', |
|||
]), |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.init() |
|||
}, |
|||
methods: { |
|||
// ------------ 页面初始化 ------------ |
|||
init() { |
|||
this.temp = { |
|||
applyName: window.sessionStorage.getItem('name'), // 申请人 |
|||
applySid: window.sessionStorage.getItem('staffSid'), // 申请人sid 即staffSid |
|||
contractNo: '', // 合同编号 |
|||
isTerminal: 3, // 是否是终端 1是,0不是 |
|||
modelName: '', // 车型别名 |
|||
name: '',// 客户名称 |
|||
sid: '', |
|||
applyDate: '', //申请日期 |
|||
detailsList: [] |
|||
} |
|||
}, |
|||
resetState() { |
|||
this.isShow = true |
|||
this.isShowAdd = false |
|||
this.isShowLook = false |
|||
}, |
|||
openUserInfo() { |
|||
if (this.sids.length > 0) { |
|||
this.isShow = false |
|||
this.isShowAdd = true |
|||
console.log('车架号', this.vinNo_info, '合同编号', this.temp.contractNo) |
|||
this.$refs['divUser'].showAdd(this.temp.contractNo, this.vinNo_info) |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: '请选择出库车辆信息!', |
|||
type: 'error' |
|||
}); |
|||
return |
|||
} |
|||
// this.isShow = false |
|||
}, |
|||
// 修改用户人信息 |
|||
updateUserInfo(vinNo) { |
|||
console.log('1111', vinNo) |
|||
for (var i = 0; i < this.detailsList.length; i++) { |
|||
if (this.detailsList[i].vinNo == vinNo) { |
|||
let 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 |
|||
} |
|||
// useMessage = this.detailsList[i].useMessage |
|||
console.log('点击编辑useMessage', this.detailsList[i].useMessage) |
|||
this.isShow = false |
|||
this.isShowAdd = true |
|||
this.$refs['divUser'].showEdit(useMessage, vinNo) |
|||
} |
|||
} |
|||
}, |
|||
// 查看用户人信息 |
|||
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.isShow = false |
|||
this.isShowLook = true |
|||
this.$refs['divUserInfo'].showInfo(useMessage, vinNo) |
|||
} |
|||
} |
|||
}, |
|||
// 清空用户人信息 |
|||
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 |
|||
} |
|||
// this.vinNo_info |
|||
}, |
|||
// 添加用户人信息 |
|||
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) |
|||
} |
|||
} |
|||
} |
|||
}, |
|||
showAdd(temp) { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}); |
|||
this.dialogStatus = 'add' |
|||
this.viewTitle = '【新增】出库申请'; |
|||
console.log('新增初始化', temp) |
|||
this.temp.contractNo = temp.contractNo |
|||
this.temp.isTerminal = temp.isTerminal |
|||
this.temp.modelName = temp.modelName |
|||
this.temp.name = temp.name |
|||
this.temp.applyDate = temp.applyDate |
|||
this.detailsList = temp.listVo; |
|||
console.log('新增初始化temp', this.temp) |
|||
console.log('新增初始化detailsList', this.detailsList) |
|||
}, |
|||
showEdit(row, sid) { |
|||
this.$nextTick(() => { |
|||
this.$refs['dataForm'].clearValidate() |
|||
}); |
|||
this.dialogStatus = 'edit'; |
|||
this.viewTitle = '【编辑】出库申请'; |
|||
fetchDetailsBySid({sid: sid}).then(response => { |
|||
if (response.success) { |
|||
this.temp = response.data |
|||
this.temp.sid = sid |
|||
this.detailsList = response.data.listVo |
|||
for (var i = 0; i < this.detailsList.length; i++) { |
|||
if (JSON.stringify(this.detailsList[i].useMessage) !== '{}') { |
|||
this.detailsList[i].isExist = '1' |
|||
} |
|||
} |
|||
this.temp = JSON.parse(JSON.stringify(this.temp).replace(/listVo/g, 'detailsList')) |
|||
console.log('isTerminal', this.temp.isTerminal) |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
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 |
|||
}, |
|||
// ------------ 功能实现 ------------ |
|||
// 添加数据 |
|||
handleCreate() { |
|||
this.temp.detailsList = this.detailsList |
|||
console.log('112233', this.temp) |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (valid) { |
|||
this.createBtn = true |
|||
if (this.dialogStatus === 'add') { |
|||
save(this.temp).then((response) => { |
|||
if (response.success) { |
|||
this.createBtn = false |
|||
this.handleReturn('true') |
|||
} |
|||
}).catch(e => { |
|||
this.createBtn = false |
|||
}) |
|||
} else { |
|||
this.createBtn = true |
|||
save(this.temp).then((response) => { |
|||
if (response.success) { |
|||
this.createBtn = false |
|||
this.handleReturn('true') |
|||
} |
|||
}).catch(e => { |
|||
this.createBtn = false |
|||
}) |
|||
} |
|||
} |
|||
}) |
|||
}, |
|||
// 提交 |
|||
handleSubmit() { |
|||
this.$confirm('是否确定提交该业务', '提示', { |
|||
confirmButtonText: '确定', |
|||
cancelButtonText: '取消', |
|||
type: 'warning' |
|||
}).then(() => { |
|||
this.$refs['dataForm'].validate((valid) => { |
|||
if (valid) { |
|||
this.disabled = true; |
|||
this.temp.detailsList = this.detailsList |
|||
submitInfo(this.temp).then((response) => { |
|||
if (response.success) { |
|||
this.disabled = false |
|||
this.handleReturn('true') |
|||
} |
|||
}).catch(e => { |
|||
this.createBtn = false |
|||
}) |
|||
} |
|||
}) |
|||
}) |
|||
}, |
|||
// 返回 |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist'); |
|||
this.$refs['dataForm'].resetFields(); |
|||
this.$emit('doback') |
|||
}, |
|||
// ------------ 页面跳转以及数据获取 ------------ |
|||
|
|||
}, |
|||
} |
|||
</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,323 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="isShow"> |
|||
<div class="tab-header webtop"> |
|||
<div>出库申请详情</div> |
|||
<!-- <div v-else></div> --> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()" |
|||
>返回 |
|||
</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<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> |
|||
<!--@selection-change="handleSelectionChange"--> |
|||
<el-table |
|||
v-loading="listLoading" |
|||
:data="detailsList" |
|||
border |
|||
style="width: 100%" |
|||
:index="index" |
|||
fit |
|||
> |
|||
<!-- <el-table-column type="selection" align="center" width="50"/>--> |
|||
<el-table-column |
|||
align="center" |
|||
label="序号" |
|||
type="index" |
|||
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"> |
|||
<!-- && scope.row.exist == '1' scope.row.nodeState == '' ? false:scope.row.nodeState == '发起订单'?false : true --> |
|||
<el-button |
|||
v-show="temp.isTerminal === 0" |
|||
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"--> |
|||
<user-info-look |
|||
v-show="isShowLook" |
|||
ref="divUserInfo" |
|||
@doback="resetState" |
|||
/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import {mapGetters} from "vuex"; |
|||
import {fetchDetailsBySid,} from '@/api/chukuguanli/chukubanli' |
|||
import userInfoLook from "./relation/userInfoLook"; |
|||
|
|||
export default { |
|||
name: "chukushenqingInfo", |
|||
components: { |
|||
userInfoLook, |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: "", |
|||
index: 0, |
|||
disabled: false, // 保存、提交按钮状态 |
|||
createBtn: false, |
|||
dialogStatus: "add", // 提交状态 |
|||
// --按钮菜单------- |
|||
isShow: true, |
|||
isShowLook: false, |
|||
// === |
|||
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: [ |
|||
{ |
|||
price: "", //成交价 |
|||
remarks: "", // 备注 |
|||
vinNo: "", // 车架号 |
|||
useMessage: {}, |
|||
}, |
|||
], |
|||
sids: [], |
|||
vinNo_info: "", |
|||
submitDto: { |
|||
businessSid: "", |
|||
userSid: window.sessionStorage.getItem("userSid"), |
|||
}, |
|||
rules: {}, |
|||
// ------------------------------------ |
|||
}; |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
"id", |
|||
"roles", |
|||
"rolesIds", |
|||
"departmentId", |
|||
"departmentCode", |
|||
]), |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.init(); |
|||
}, |
|||
methods: { |
|||
// ------------ 页面初始化 ------------ |
|||
init() { |
|||
this.temp = { |
|||
applyName: window.sessionStorage.getItem("name"), // 申请人 |
|||
applySid: window.sessionStorage.getItem("staffSid"), // 申请人sid 即staffSid |
|||
contractNo: "", // 合同编号 |
|||
isTerminal: 3, // 是否是终端 1是,0不是 |
|||
modelName: "", // 车型别名 |
|||
name: "", // 客户名称 |
|||
sid: "", |
|||
applyDate: "", //申请日期 |
|||
detailsList: [], |
|||
isUse: false, |
|||
}; |
|||
}, |
|||
resetState() { |
|||
this.isShow = true; |
|||
this.isShowLook = false; |
|||
}, |
|||
showInfo(sid, state) { |
|||
this.$nextTick(() => { |
|||
this.$refs["dataForm"].clearValidate(); |
|||
}); |
|||
if (state == "已通过" || state == "未通过") { |
|||
this.disabled = true; |
|||
this.createBtn = true; |
|||
} |
|||
fetchDetailsBySid({sid: sid}).then((response) => { |
|||
if (response.success) { |
|||
this.temp = response.data; |
|||
this.temp.sid = sid; |
|||
this.detailsList = response.data.listVo; |
|||
for (var i = 0; i < this.detailsList.length; i++) { |
|||
if (JSON.stringify(this.detailsList[i].useMessage) !== "{}") { |
|||
this.detailsList[i].isExist = "1"; |
|||
} |
|||
} |
|||
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.isShow = false; |
|||
this.isShowLook = true; |
|||
this.$refs["divUserInfo"].showInfo(useMessage, vinNo); |
|||
} |
|||
} |
|||
}, |
|||
// 选择信息 |
|||
handleSelectionChange(row) { |
|||
console.log("开票", row); |
|||
const aa = []; |
|||
const bb = []; |
|||
row.forEach((element) => { |
|||
aa.push(element.vinNo); |
|||
bb.push(element.sid); |
|||
}); |
|||
this.vinNo_info = aa.join(); |
|||
this.sids = bb; |
|||
}, |
|||
// ------------ 功能实现 ------------ |
|||
// 返回 |
|||
handleReturn(isreload) { |
|||
if (isreload === "true") this.$emit("reloadlist"); |
|||
this.$refs["dataForm"].resetFields(); |
|||
this.$emit("doback"); |
|||
}, |
|||
}, |
|||
}; |
|||
</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,379 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<!--待开票列表页面--> |
|||
<div v-show="viewState == 1"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>待出库车辆列表</div> |
|||
<!--start 查询列表按钮部分开始--> |
|||
<div> |
|||
<el-button type="primary" size="small" @click="handleCreate()">出库申请</el-button> |
|||
</div> |
|||
<!--end 查询列表按钮部分结束--> |
|||
</div> |
|||
<!--按钮部分结束--> |
|||
<div class="switch_btn"> |
|||
<el-button :class="{btn_style:viewState === 1}">待出库车辆列表</el-button> |
|||
<el-button class="" @click="handleInvoiceList">出库申请列表</el-button> |
|||
</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="total > 0" :total="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 type="selection" align="center" width="50"/> |
|||
<el-table-column 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> |
|||
</div> |
|||
<div class="pages"> |
|||
<div class="tit"/> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="total > 0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" |
|||
class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
<!-- 出库申请新增页面 --> |
|||
<chukushenqing-add v-show="viewState == 2" ref="divadd" @doback="resetState" |
|||
@reloadlist="getList"/> |
|||
<!-- 出库申请列表 --> |
|||
<chukushenqing v-show="viewState == 5" ref="divchuku"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import {mapGetters} from 'vuex' |
|||
import { |
|||
listPage, |
|||
fetchDetailsBySid, |
|||
typeValues, |
|||
customerName, |
|||
checkNum |
|||
} from '@/api/chukuguanli/chukubanli' |
|||
import {setuser, getuser} from '@/utils/baocun' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import chukushenqing from './chukushenqing' |
|||
import chukushenqingAdd from './chukushenqingAdd' |
|||
|
|||
export default { |
|||
name: 'daichukucheliang', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
chukushenqing, |
|||
chukushenqingAdd |
|||
}, |
|||
data() { |
|||
return { |
|||
isSearchShow: false, //主页面:隐藏查询条件按钮 |
|||
searchxianshitit: '显示查询条件', |
|||
viewState: 1, // 1、列表 2、新增 3、编辑 4、查看 5.开票申请 |
|||
//查询 ----------- |
|||
tableKey: 0, |
|||
infoList: [], |
|||
sids: [],// 用于导出的时候保存已选择的SIDs |
|||
total: 1, |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
customerList: [], |
|||
invoicingNature: 'invoicingNature', |
|||
typeList: [], //选择器 |
|||
list: [], |
|||
//翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 20, |
|||
params: { |
|||
contractNo: '', // 合同编号 |
|||
name: '', // 客户名称 |
|||
vinNo: '' // 车架号 |
|||
} |
|||
}, |
|||
textMap: { |
|||
update: '编辑', |
|||
create: '创建' |
|||
}, |
|||
temp: {}, |
|||
initObj: { |
|||
detailVo: { |
|||
applyDate: '', // 申请日期 |
|||
contractNo: '', // 合同编号 |
|||
isTerminal: '', // 是否是终端 |
|||
modelName: '', // 车型别名 |
|||
name: '', // 客户名称 |
|||
listVo: [], |
|||
}, |
|||
sid: '', |
|||
stringList: [] |
|||
}, |
|||
// { // listVo |
|||
// price:'', //成交价 |
|||
// remarks:'', // 备注 |
|||
// sid:'', //库关联sid |
|||
// useMessageSid:'', //使用人sid |
|||
// vinNo:'',// 车架号 |
|||
// }, |
|||
dialogStatus: '' |
|||
} |
|||
}, |
|||
// ------------------------------------ |
|||
computed: { |
|||
...mapGetters(['id', 'roles', 'rolesIds', 'departmentId', 'departmentCode']) |
|||
}, |
|||
|
|||
created() { |
|||
// 初始化变量 |
|||
this.init() |
|||
// 加载列表 |
|||
this.getList() |
|||
}, |
|||
methods: { |
|||
// ========== 初始化加载 ========== |
|||
init() { |
|||
this.getCustomer() |
|||
}, |
|||
// 客户下拉框 |
|||
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) |
|||
const aa = [] // sid |
|||
const bb = [] // contractNo |
|||
const cc = [] // listVo 使用车辆表 |
|||
var dd = {} |
|||
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' |
|||
}); |
|||
// this.$refs.multipleTable.clearSelection(); |
|||
return |
|||
} |
|||
} |
|||
} |
|||
row.forEach(element => { |
|||
aa.push(element.sid) |
|||
setuser(this.sids) // 用于导出的时候保存已选择的sids |
|||
bb.push(element.contractNo) |
|||
cc.push({ |
|||
price: element.price, //成交价 |
|||
remarks: '', // 备注 |
|||
sid: '', //库关联sid 可不传 |
|||
useMessageSid: '', //使用人sid可不传,已默认“无” |
|||
vinNo: element.vinNo,//车架号 |
|||
}) |
|||
dd = { |
|||
applyDate: element.applyDate, // 申请日期 |
|||
contractNo: element.contractNo, // 合同编号 |
|||
isTerminal: element.isTerminal, // 是否是终端 |
|||
modelName: element.modelName, // 车型别名 |
|||
name: element.name, // 客户名称 |
|||
} |
|||
}) |
|||
this.sids = aa |
|||
this.initObj.stringList = bb |
|||
console.log('cc',cc) |
|||
this.initObj.detailVo.listVo = cc |
|||
this.initObj.detailVo.applyDate = dd.applyDate |
|||
this.initObj.detailVo.contractNo = dd.contractNo |
|||
this.initObj.detailVo.isTerminal = dd.isTerminal |
|||
this.initObj.detailVo.modelName = dd.modelName |
|||
this.initObj.detailVo.name = dd.name |
|||
console.log('sids:', this.sids, 'this.initObj.stringList', this.initObj.stringList, 'this.initObj', this.initObj) |
|||
}, |
|||
|
|||
// ========== 业务功能 ========== |
|||
handleInvoiceList() { |
|||
this.viewState = 5 |
|||
}, |
|||
//修改、编辑、详情返回列表页面 |
|||
resetState() { |
|||
this.viewState = 1 |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1 |
|||
this.getList() |
|||
}, |
|||
//点击重置 |
|||
handleReset() { |
|||
this.listQuery.params.vinNo = ''// 单据编号 |
|||
this.listQuery.params.contractNo = ''// 开票性质 |
|||
this.listQuery.params.name = '' // 开票名称 |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
listPage({ |
|||
current: this.listQuery.current, |
|||
size: this.listQuery.size, |
|||
params: { |
|||
contractNo: this.listQuery.contractNo, |
|||
name: this.listQuery.name, //传递参数, |
|||
vinNo: this.listQuery.vinNo |
|||
} |
|||
}).then(response => { //拦截器 |
|||
this.listLoading = false |
|||
console.log(response) |
|||
if (response.success && response.data && response.data.total > 0) { |
|||
this.list = response.data.records |
|||
this.total = response.data.total |
|||
} else { |
|||
this.list = [] |
|||
this.total = 0 |
|||
} |
|||
}) |
|||
}, |
|||
|
|||
// 打开新增 |
|||
handleCreate() { |
|||
if (this.sids.length === 0) { |
|||
this.$message({showClose: true, type: 'error', message: '请选择一条记录进行出库申请'}) |
|||
return |
|||
} |
|||
if (this.sids.length > 0) { |
|||
this.FormLoading = true |
|||
fetchDetailsBySid(this.initObj).then(response => { |
|||
if (response.success) { |
|||
this.viewState = 2 |
|||
this.temp = response.data |
|||
this.$refs['divadd'].showAdd(this.temp) |
|||
} |
|||
}) |
|||
} |
|||
}, |
|||
} |
|||
} |
|||
</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,213 @@ |
|||
<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="listconadd"> |
|||
<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> |
|||
import {mapGetters} from 'vuex' |
|||
|
|||
export default { |
|||
name: 'userInfo', |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
disabled: false, // 保存、提交按钮状态 |
|||
createBtn: false, |
|||
// --按钮菜单------- |
|||
visible: true, |
|||
listLoading: false, |
|||
tempUser: { |
|||
contractNo: '', |
|||
vinNo: '', |
|||
sid: '', |
|||
}, // 添加和修改 |
|||
rules: {}, |
|||
// ------------------------------------ |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'id', |
|||
'roles', |
|||
'rolesIds', |
|||
'departmentId', |
|||
'departmentCode', |
|||
]), |
|||
}, |
|||
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() { |
|||
var that = this |
|||
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,173 @@ |
|||
<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="listconadd"> |
|||
<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 {mapGetters} from 'vuex' |
|||
import {} from '@/api/chukuguanli/chukubanli' |
|||
|
|||
export default { |
|||
name: 'userInfoLook', |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
disabled: false, // 保存、提交按钮状态 |
|||
createBtn: false, |
|||
// --按钮菜单------- |
|||
visible: true, |
|||
listLoading: false, |
|||
tempUserLook: {}, |
|||
rules: {}, |
|||
// ------------------------------------ |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'id', |
|||
'roles', |
|||
'rolesIds', |
|||
'departmentId', |
|||
'departmentCode', |
|||
]), |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.init() |
|||
}, |
|||
methods: { |
|||
// ------------ 页面初始化 ------------ |
|||
// 添加前数据初始化 |
|||
resetTemp() { |
|||
}, |
|||
init() { |
|||
|
|||
}, |
|||
showInfo(useMessage, vinNo) { |
|||
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> |
@ -0,0 +1,13 @@ |
|||
<template> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "xiaoshoudingdan" |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -0,0 +1,13 @@ |
|||
<template> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "xiaoshoudingdanAdd" |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -0,0 +1,13 @@ |
|||
<template> |
|||
|
|||
</template> |
|||
|
|||
<script> |
|||
export default { |
|||
name: "xiaoshoudingdanInfo" |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
|
|||
</style> |
@ -0,0 +1,59 @@ |
|||
import request from '@/utils/request' |
|||
import qs from 'qs' |
|||
|
|||
// 出库申请初始化/详情 已改
|
|||
export function fetchDetailsBySid(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/fetchDetailsBySid', |
|||
method: 'post', |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 出库审核分页列表 已改
|
|||
export function listExaminePage(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/listExaminePage', |
|||
method: "post", |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 出库分页列表 已改
|
|||
export function examine(params) { |
|||
return request({ |
|||
url: '/buscenter/v1/busdeliveredapply/examine', |
|||
method: "post", |
|||
data: params, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}); |
|||
} |
|||
|
|||
// 模糊搜索客户
|
|||
export function customerName() { |
|||
return request({ |
|||
url: "/buscenter/v1/busorder/likeGetCustomerName", |
|||
method: "post" |
|||
// params: { staffSid: id }
|
|||
}); |
|||
} |
|||
|
|||
// 获取下拉框option
|
|||
export function typeValues(data) { |
|||
return request({ |
|||
url: '/portal/v1/dictcommons/typeValues', |
|||
method: 'get', |
|||
params: data |
|||
// headers: {
|
|||
// 'Content-Type':'multipart/form-data',
|
|||
// }
|
|||
}) |
|||
} |
@ -0,0 +1,442 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<!--标题按钮部分开始--> |
|||
<div class="tab-header webtop"> |
|||
<!--标题--> |
|||
<div>出库申请管理</div> |
|||
<!--start 查询列表按钮部分开始--> |
|||
<div> |
|||
<!-- <el-button type="primary" size="small" @click="handleSubmit()">提交</el-button>--> |
|||
<el-button type="info" size="small" @click="handleClose()" |
|||
>关闭</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.params.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.params.applyName" |
|||
placeholder="请输入申请人姓名" |
|||
clearable |
|||
class="filter-item" |
|||
/> |
|||
</el-form-item> |
|||
<el-form-item label="申请日期"> |
|||
<div class="block"> |
|||
<el-date-picker |
|||
v-model="listQuery.params.applyDateStart" |
|||
type="date" |
|||
placeholder="选择日期" |
|||
> |
|||
</el-date-picker> |
|||
</div> |
|||
<label>至</label> |
|||
<div class="block"> |
|||
<el-date-picker |
|||
v-model="listQuery.params.applyDateEnd" |
|||
type="date" |
|||
placeholder="选择日期" |
|||
> |
|||
</el-date-picker> |
|||
</div> |
|||
</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="total > 0" |
|||
:total="total" |
|||
:page.sync="listQuery.current" |
|||
:limit.sync="listQuery.size" |
|||
class="pagination" |
|||
@pagination="getList" |
|||
/> |
|||
</div> |
|||
<!--Start 主页面主要部分 --> |
|||
<div class="listcon"> |
|||
<el-table |
|||
:key="tableKey" |
|||
v-loading="listLoading" |
|||
:data="list" |
|||
:border="true" |
|||
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="150px" label="操作" align="center"> |
|||
<template slot-scope="scope"> |
|||
<div class="searchbtns"> |
|||
<!--:disabled="scope.row.nodeState == ''?false:true"--> |
|||
<el-button |
|||
size="small" |
|||
type="primary" |
|||
@click="handleCheck(scope.row)" |
|||
>办理</el-button |
|||
> |
|||
</div> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.state }}</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.applyDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="申请人" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.applyName }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<!--End 主页面主要部分--> |
|||
<div class="pages"> |
|||
<div class="tit" /> |
|||
<!-- 翻页 --> |
|||
<pagination |
|||
v-show="total > 0" |
|||
:total="total" |
|||
:page.sync="listQuery.current" |
|||
:limit.sync="listQuery.size" |
|||
class="pagination" |
|||
@pagination="getList" |
|||
/> |
|||
</div> |
|||
<!--End查询列表部分--> |
|||
</div> |
|||
<chukushenqing-info |
|||
v-show="viewState == 2" |
|||
ref="divInfo" |
|||
@doback="resetState" |
|||
@reloadlist="getList" |
|||
/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapGetters } from "vuex"; |
|||
import { |
|||
listExaminePage, |
|||
submitBySid, |
|||
customerName, |
|||
} from "@/api/examinePage/chukushenhe"; |
|||
import { setuser, getuser } from "@/utils/baocun"; |
|||
import Pagination from "@/components/pagination"; |
|||
import pageye from "@/components/pagination/pageye"; |
|||
import chukushenqingInfo from "./chukushenheTodo"; |
|||
|
|||
export default { |
|||
name: "chukushenhe", |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
chukushenqingInfo, |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: "", |
|||
//主页面:隐藏查询条件按钮 |
|||
isSearchShow: false, |
|||
searchxianshitit: "显示查询条件", |
|||
viewState: 1, // 1、列表 2、审批 |
|||
//查询 ----------- |
|||
tableKey: 0, |
|||
customerList: [], |
|||
list: [], |
|||
sids: [], // 用于导出的时候保存已选择的SIDs |
|||
sides: "", |
|||
state_list: [], |
|||
total: 1, |
|||
FormLoading: false, |
|||
listLoading: false, |
|||
departmentSid: window.sessionStorage.getItem("departmentSid"), //部门sid |
|||
departmentName: window.sessionStorage.getItem("departmentName"), //部门名称 |
|||
typeList: [], //选择器 |
|||
//翻页 |
|||
listQuery: { |
|||
current: 1, |
|||
size: 20, |
|||
params: { |
|||
applyDateEnd: "", // 申请日期结束时间 |
|||
applyDateStart: "", // 申请日期开始时间 |
|||
applyName: "", // 申请人 |
|||
staffSid: window.sessionStorage.getItem("staffSid"), // 申请人sid |
|||
contractNo: "", // 合同编号 |
|||
name: "", // 客户名称 |
|||
}, |
|||
}, |
|||
initObj: { |
|||
detailVo: { |
|||
applyDate: "", // 申请日期 |
|||
contractNo: "", // 合同编号 |
|||
isTerminal: "", // 是否是终端 |
|||
listVo: [], |
|||
modelName: "", // 车型别名 |
|||
name: "", // 客户名称 |
|||
}, |
|||
sid: "", |
|||
stringList: [], |
|||
}, |
|||
temp: {}, // 添加和修改 |
|||
templook: {}, // 查看实体 |
|||
textMap: { |
|||
update: "编辑", |
|||
create: "创建", |
|||
}, |
|||
dialogStatus: "", |
|||
}; |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
"id", |
|||
"roles", |
|||
"rolesIds", |
|||
"departmentId", |
|||
"departmentCode", |
|||
]), |
|||
}, |
|||
|
|||
created() { |
|||
// 初始化变量 |
|||
this.init(); |
|||
}, |
|||
methods: { |
|||
// ========== 初始化加载 ========== |
|||
init() { |
|||
this.getList(); |
|||
this.getCustomer(); |
|||
}, |
|||
//页面初始化 |
|||
resetTemp() { |
|||
this.temp = {}; |
|||
}, |
|||
// 客户下拉框 |
|||
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); |
|||
}, |
|||
// 表中序号 |
|||
indexMethod(index) { |
|||
var pagestart = (this.listQuery.current - 1) * this.listQuery.size; |
|||
var pageindex = index + 1 + pagestart; |
|||
return pageindex; |
|||
}, |
|||
// ========== 页面按钮功能 ========== |
|||
// 编辑、详情返回列表页面 |
|||
resetState() { |
|||
this.viewState = 1; |
|||
}, |
|||
// 搜索条件效果 |
|||
clicksearchShow() { |
|||
this.isSearchShow = !this.isSearchShow; |
|||
if (this.isSearchShow) { |
|||
this.searchxianshitit = "隐藏查询条件"; |
|||
} else { |
|||
this.searchxianshitit = "显示查询条件"; |
|||
} |
|||
}, |
|||
// 信息条数 获取点击时当前的sid |
|||
handleSelectionChange(row) { |
|||
console.log("开票", row); |
|||
const aa = []; |
|||
const bb = []; |
|||
row.forEach((element) => { |
|||
aa.push(element.sid); |
|||
setuser(this.sids); //用于导出的时候保存已选择的sids |
|||
bb.push(element.state); |
|||
}); |
|||
this.sids = aa; |
|||
this.sides = this.sids.join(); //将sid数组的元素转化成字符串 |
|||
this.state_list = bb; |
|||
console.log("sids数组", this.sids); |
|||
console.log("sides字符串", this.sides); |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.listQuery.current = 1; |
|||
this.getList(); |
|||
}, |
|||
// 点击重置 |
|||
handleReset() { |
|||
this.listQuery.params = { |
|||
applicant: "", |
|||
contractNo: "", |
|||
customerName: "", |
|||
endDate: "", |
|||
invoiceState: "", |
|||
startDate: "", |
|||
}; |
|||
}, |
|||
// ========== 业务功能 ========== |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true; |
|||
listExaminePage(this.listQuery).then((response) => { |
|||
//拦截器 |
|||
this.listLoading = false; |
|||
console.log(response); |
|||
if ( |
|||
response.code === "200" && |
|||
response.data && |
|||
response.data.total > 0 |
|||
) { |
|||
this.list = response.data.records; |
|||
this.total = response.data.total; |
|||
} else { |
|||
this.list = []; |
|||
this.total = 0; |
|||
} |
|||
}); |
|||
}, |
|||
// 打开查看 |
|||
handleCheck(row) { |
|||
this.viewState = 2; |
|||
this.$refs["divInfo"].showInfo(row.sid, row.state); |
|||
}, |
|||
|
|||
// 关闭 |
|||
handleClose() {}, |
|||
}, |
|||
}; |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.switch_btn { |
|||
padding: 15px 0 10px 0; |
|||
} |
|||
|
|||
.block { |
|||
display: inline-block; |
|||
} |
|||
|
|||
label { |
|||
padding: 0 6px; |
|||
} |
|||
.searchbtns { |
|||
margin: 10px 0; |
|||
text-align: center; |
|||
} |
|||
.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,392 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="isShow"> |
|||
<div class="tab-header webtop"> |
|||
<div>出库申请详情</div> |
|||
<!-- <div v-else></div> --> |
|||
<div> |
|||
<el-button |
|||
type="primary" |
|||
size="small" |
|||
:disabled="createBtn" |
|||
@click="handleAgree()" |
|||
>同意</el-button |
|||
> |
|||
<el-button |
|||
type="primary" |
|||
size="small" |
|||
:disabled="disabled" |
|||
@click="handleDisagree()" |
|||
>不同意</el-button |
|||
> |
|||
<el-button type="info" size="small" @click="handleReturn()" |
|||
>返回</el-button |
|||
> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<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> |
|||
<!--@selection-change="handleSelectionChange"--> |
|||
<el-table |
|||
v-loading="listLoading" |
|||
:data="detailsList" |
|||
border |
|||
style="width: 100%" |
|||
:index="index" |
|||
fit |
|||
> |
|||
<!-- <el-table-column type="selection" align="center" width="50"/>--> |
|||
<el-table-column |
|||
align="center" |
|||
label="序号" |
|||
type="index" |
|||
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"> |
|||
<!-- && scope.row.exist == '1' scope.row.nodeState == '' ? false:scope.row.nodeState == '发起订单'?false : true --> |
|||
<el-button |
|||
v-show="temp.isTerminal === 0" |
|||
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"--> |
|||
<user-info-look |
|||
v-show="isShowLook" |
|||
ref="divUserInfo" |
|||
@doback="resetState" |
|||
/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { mapGetters } from "vuex"; |
|||
import { fetchDetailsBySid, examine } from "@/api/examinePage/chukushenhe"; |
|||
import userInfoLook from "./relation/userInfoLook"; |
|||
|
|||
export default { |
|||
name: "chukushenheTodo", |
|||
components: { |
|||
userInfoLook, |
|||
}, |
|||
data() { |
|||
return { |
|||
viewTitle: "", |
|||
index: 0, |
|||
disabled: false, // 保存、提交按钮状态 |
|||
createBtn: false, |
|||
dialogStatus: "add", // 提交状态 |
|||
// --按钮菜单------- |
|||
isShow: true, |
|||
isShowLook: false, |
|||
// === |
|||
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: [ |
|||
{ |
|||
price: "", //成交价 |
|||
remarks: "", // 备注 |
|||
vinNo: "", // 车架号 |
|||
useMessage: {}, |
|||
}, |
|||
], |
|||
sids: [], |
|||
vinNo_info: "", |
|||
submitDto: { |
|||
businessSid: "", |
|||
userSid: window.sessionStorage.getItem("userSid"), |
|||
}, |
|||
rules: {}, |
|||
// ------------------------------------ |
|||
}; |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
"id", |
|||
"roles", |
|||
"rolesIds", |
|||
"departmentId", |
|||
"departmentCode", |
|||
]), |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.init(); |
|||
}, |
|||
methods: { |
|||
// ------------ 页面初始化 ------------ |
|||
init() { |
|||
this.temp = { |
|||
applyName: window.sessionStorage.getItem("name"), // 申请人 |
|||
applySid: window.sessionStorage.getItem("staffSid"), // 申请人sid 即staffSid |
|||
contractNo: "", // 合同编号 |
|||
isTerminal: 3, // 是否是终端 1是,0不是 |
|||
modelName: "", // 车型别名 |
|||
name: "", // 客户名称 |
|||
sid: "", |
|||
applyDate: "", //申请日期 |
|||
detailsList: [], |
|||
isUse: false, |
|||
}; |
|||
}, |
|||
resetState() { |
|||
this.isShow = true; |
|||
this.isShowLook = false; |
|||
}, |
|||
showInfo(sid, state) { |
|||
this.$nextTick(() => { |
|||
this.$refs["dataForm"].clearValidate(); |
|||
}); |
|||
if (state == "已通过" || state == "未通过") { |
|||
this.disabled = true; |
|||
this.createBtn = true; |
|||
} |
|||
|
|||
fetchDetailsBySid({ sid: sid }).then((response) => { |
|||
if (response.success) { |
|||
this.temp = response.data; |
|||
this.temp.sid = sid; |
|||
this.detailsList = response.data.listVo; |
|||
for (var i = 0; i < this.detailsList.length; i++) { |
|||
if (JSON.stringify(this.detailsList[i].useMessage) !== "{}") { |
|||
this.detailsList[i].isExist = "1"; |
|||
} |
|||
} |
|||
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.isShow = false; |
|||
this.isShowLook = true; |
|||
this.$refs["divUserInfo"].showInfo(useMessage, vinNo); |
|||
} |
|||
} |
|||
}, |
|||
|
|||
handleSelectionChange(row) { |
|||
console.log("开票", row); |
|||
const aa = []; |
|||
const bb = []; |
|||
row.forEach((element) => { |
|||
aa.push(element.vinNo); |
|||
bb.push(element.sid); |
|||
}); |
|||
this.vinNo_info = aa.join(); |
|||
this.sids = bb; |
|||
}, |
|||
// ------------ 功能实现 ------------ |
|||
handleAgree() { |
|||
this.$confirm("是否确认同意此审核", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
type: "warning", |
|||
}).then(() => { |
|||
const info = { |
|||
sid: this.temp.sid, |
|||
state: 3, |
|||
}; |
|||
examine(info).then((response) => { |
|||
if (response.success) { |
|||
this.handleReturn("true"); |
|||
} |
|||
}); |
|||
}); |
|||
}, |
|||
handleDisagree() { |
|||
this.$prompt("请输入不通过原因", "提示", { |
|||
confirmButtonText: "确定", |
|||
cancelButtonText: "取消", |
|||
}).then(({ value }) => { |
|||
if (value) { |
|||
const info = { |
|||
sid: this.temp.sid, |
|||
reason: value, |
|||
state: 4, |
|||
}; |
|||
examine(info).then((response) => { |
|||
if (response.success) { |
|||
this.handleReturn("true"); |
|||
} |
|||
}); |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
message: "请填写不通过原因!", |
|||
type: "error", |
|||
}); |
|||
return; |
|||
} |
|||
}); |
|||
}, |
|||
// 返回 |
|||
handleReturn(isreload) { |
|||
if (isreload === "true") this.$emit("reloadlist"); |
|||
this.$refs["dataForm"].resetFields(); |
|||
this.$emit("doback"); |
|||
}, |
|||
}, |
|||
}; |
|||
</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; |
|||
} |
|||
.formadd { |
|||
padding: 20px 0; |
|||
} |
|||
.formadd .tit { |
|||
font-size: 32px; |
|||
border-bottom: 1px solid #e0e3eb; |
|||
text-align: center; |
|||
margin: 0 0 20px 0; |
|||
padding: 20px 0; |
|||
} |
|||
</style> |
@ -0,0 +1,181 @@ |
|||
<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="listconadd"> |
|||
<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 {mapGetters} from 'vuex' |
|||
|
|||
export default { |
|||
name: 'userInfoLook', |
|||
components: {}, |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
disabled: false, // 保存、提交按钮状态 |
|||
createBtn: false, |
|||
// --按钮菜单------- |
|||
visible: true, |
|||
listLoading: false, |
|||
tempUserLook: {}, |
|||
rules: {}, |
|||
// ------------------------------------ |
|||
} |
|||
}, |
|||
computed: { |
|||
...mapGetters([ |
|||
'id', |
|||
'roles', |
|||
'rolesIds', |
|||
'departmentId', |
|||
'departmentCode', |
|||
]), |
|||
}, |
|||
created() { |
|||
// 初始化变量 |
|||
this.init() |
|||
}, |
|||
methods: { |
|||
// ------------ 页面初始化 ------------ |
|||
// 添加前数据初始化 |
|||
resetTemp() { |
|||
}, |
|||
init() { |
|||
|
|||
}, |
|||
showInfo(useMessage, vinNo) { |
|||
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; |
|||
} |
|||
.formadd { |
|||
padding: 20px 0; |
|||
} |
|||
.formadd .tit { |
|||
font-size: 32px; |
|||
text-align: center; |
|||
margin: 0 0 20px 0; |
|||
padding: 20px 0; |
|||
} |
|||
</style> |
Loading…
Reference in new issue