Browse Source

完善出库申请管理部分功能、优化代码,新增流程相关页面和功能

zhanglei
yunuo970428 3 years ago
parent
commit
5f33792e06
  1. 74
      anrui-buscenter/anrui-buscenter-ui/src/api/chukuguanli/chukubanli.js
  2. 30
      anrui-buscenter/anrui-buscenter-ui/src/main.js
  3. 29
      anrui-buscenter/anrui-buscenter-ui/src/router/index.js
  4. 1
      anrui-buscenter/anrui-buscenter-ui/src/styles/index.scss
  5. 407
      anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqing.vue
  6. 733
      anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqingAdd.vue
  7. 330
      anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqingInfo.vue
  8. 510
      anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/daichukucheliang.vue
  9. 138
      anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/relation/userInfoLook.vue
  10. 419
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/chukuDaiBanInfo.vue
  11. 456
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/chukuEdit.vue
  12. 291
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/chukuYiBanInfo.vue
  13. 316
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/daichuku.vue
  14. 196
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/relation/userEdit.vue
  15. 138
      anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/relation/userInfo.vue

74
anrui-buscenter/anrui-buscenter-ui/src/api/chukuguanli/chukubanli.js

@ -52,11 +52,13 @@ export function pagerList(params) {
export function revokeBySid(params) {
return request({
url: '/buscenter/v1/busdeliveredapply/revokeBySid',
method: 'PUT',
data: params,
// headers: {
// 'Content-Type': 'application/json'
// }
method: 'put',
params: {
sid: params
},
headers: {
'Content-Type': 'application/x-www-form-urlencoded'
}
})
}
@ -89,7 +91,7 @@ export function submitBySid(params) {
// 表单中的提交 已改
export function submitInfo(params) {
return request({
url: '/buscenter/v1/busdeliveredapply/submit',
url: '/buscenter/v1/busdeliveredapply/submitDeliveredApply',
method: 'post',
data: params,
headers: {
@ -126,3 +128,63 @@ export function typeValues(data) {
params: data
})
}
// 代办任务同意办理
export function complete(data) {
return request({
url: '/buscenter/v1/busdeliveredapply/complete',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 代办任务驳回任务
export function reject(data) {
return request({
url: '/buscenter/v1/busdeliveredapply/reject',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 代办任务终止任务
export function breakProcess(data) {
return request({
url: '/buscenter/v1/busdeliveredapply/breakProcess',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 代办任务撤回任务
export function revokeProcess(data) {
return request({
url: '/buscenter/v1/busdeliveredapply/revokeProcess',
method: 'post',
data: data,
headers: {
'Content-Type': 'application/json'
}
})
}
// 审批流程(驳回)获取下一环节
export function getNextNodesForSubmit(data) {
return request({
url: '/buscenter/v1/busdeliveredapply/getNextNodesForSubmit',
method: 'get',
params: data
})
}
// 审批流程(驳回)获取上一环节
export function getPreviousNodesForReject(data) {
return request({
url: '/buscenter/v1/busdeliveredapply/getPreviousNodesForReject',
method: 'get',
params: data
})
}

30
anrui-buscenter/anrui-buscenter-ui/src/main.js

@ -105,26 +105,30 @@ function getUserInfo() {
roleSid: data.roleSid,
name: data.name,
userName: data.userName,
departmentName: data.departmentName, //部门名称
departmentSid: data.departmentSid, //部门sid
departmentName: data.departmentName, // 部门名称
departmentSid: data.departmentSid, // 部门sid
isAdmin: data.isAdmin,
staffSid: data.staffSid, //业务员sid
staffSid: data.staffSid, // 业务员sid
userSid: data.sid,
orgSid: data.organizationSid, //单位sid
orgSid: data.organizationSid, // 单位sid
Orgname: data.organizationName,
dwjb: data.dwjb,
orgNamePath: data.orgNamePath, // 使用组织全路径名称
orgSidPath: data.orgSidPath, // 使用组织全路径Sid
pNameAndDepartmentNameAndPostName:data.pNameAndDepartmentNameAndPostName
};
//结果存入缓存
window.sessionStorage.setItem('staffSid', user.staffSid);
window.sessionStorage.setItem('userSid', user.userSid);
window.sessionStorage.setItem('Orgname', user.Orgname);
window.sessionStorage.setItem('orgSid', user.orgSid);
window.sessionStorage.setItem('departmentName', user.departmentName);
window.sessionStorage.setItem('name', user.name);
window.sessionStorage.setItem('user', user);
window.sessionStorage.setItem('departmentName', user.departmentName);
window.sessionStorage.setItem('departmentSid', user.departmentSid);
window.sessionStorage.setItem('staffSid', user.staffSid)
window.sessionStorage.setItem('userSid', user.userSid)
window.sessionStorage.setItem('Orgname', user.Orgname)
window.sessionStorage.setItem('orgSid', user.orgSid)
window.sessionStorage.setItem('departmentName', user.departmentName)
window.sessionStorage.setItem('name', user.name)
window.sessionStorage.setItem('user', user)
window.sessionStorage.setItem('departmentName', user.departmentName)
window.sessionStorage.setItem('departmentSid', user.departmentSid)
window.sessionStorage.setItem('orgNamePath', user.orgNamePath)
window.sessionStorage.setItem('orgSidPath', user.orgSidPath)
window.sessionStorage.setItem('pNameAndDepartmentNameAndPostName', user.pNameAndDepartmentNameAndPostName)
new Vue({
el: '#app',

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

@ -223,11 +223,9 @@ export const constantRoutes = [
{
path: '/chukuguanli/chukubanli',
component: () =>
import('@/views/chukuguanli/chukubanli/daichukucheliang.vue'),
name: 'daichukucheliang',
meta: {
title: '出库办理'
}
import('@/views/chukuguanli/chukubanli/chukushenqing.vue'),
name: 'chukushenqing',
meta: { title: '出库办理', noCache: true }
}
]
},
@ -662,6 +660,27 @@ export const constantRoutes = [
import('@/views/workflow/xiaoshouguanliFlow/xiaoshoudingdanFlow/xiaoshoudingdanEdit.vue'),
name: 'xiaoshoudingdanFlowEdit',
},
// 出库申请管理待办详情
{
path: '/chukuguanliFlow/chukuguanli/chukuDaiBanInfo',
component: () =>
import('@/views/workflow/chukuguanliFlow/chukuguanli/chukuDaiBanInfo.vue'),
name: 'chukuDaiBanInfo'
},
// 出库申请管理已办详情
{
path: '/chukuguanliFlow/chukuguanli/chukuYiBanInfo',
component: () =>
import('@/views/workflow/chukuguanliFlow/chukuguanli/chukuYiBanInfo.vue'),
name: 'chukuYiBanInfo'
},
// 出库申请管理驳回到发起人办理
{
path: '/chukuguanliFlow/chukuguanli/chukuEdit',
component: () =>
import('@/views/workflow/chukuguanliFlow/chukuguanli/chukuEdit.vue'),
name: 'chukuEdit'
}
// 404 page must be placed at the end !!!
// { path: '*', redirect: '/404', hidden: true }

1
anrui-buscenter/anrui-buscenter-ui/src/styles/index.scss

@ -105,6 +105,7 @@ div:focus {
.app-container {margin: 5px;
background-color: #fff;
}
.main-content{ overflow-x: hidden;overflow-y: auto;height: calc(100vh - 200px);}
.webcon{height: calc(100vh - 220px);overflow-y: auto;overflow-x: hidden;}
// .listcon{height: calc(100vh - 425px);overflow-y: auto;overflow-x: hidden;}
.listconadd{height: calc(100vh - 200px);overflow-y: auto;overflow-x: hidden;}

407
anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqing.vue

@ -1,128 +1,113 @@
<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>
<button-bar view-title="出库申请管理" ref="btnbar" :btndisabled="btndisabled" @btnhandle="btnHandle"/>
<!--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.params.name" class="addinputw" clearable filterable placeholder="请选择" @change="customerChange">
<el-option v-for="item in customerList" :key="item.sid" :label="item.name" :value="item.name"/>
</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">
<div class="main-content">
<div class="searchcon">
<el-button size="small" class="searchbtn" @click="clicksearchShow">{{ searchxianshitit }}</el-button>
<div v-show="isSearchShow" class="search">
<el-form ref="listQueryform" :inline="true" :model="listQuery" label-width="100px" class="tab-header">
<el-form-item label="合同编号">
<el-input v-model="listQuery.params.contractNo" placeholder="请输入合同编号" clearable class="filter-item"/>
</el-form-item>
<el-form-item label="客户名称">
<el-select v-model="listQuery.params.name" class="addinputw" clearable filterable placeholder="请选择">
<el-option v-for="item in customerList" :key="item.sid" :label="item.name" :value="item.name"/>
</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="选择日期" clearable></el-date-picker>
</div>
<label></label>
<div class="block">
<el-date-picker v-model="listQuery.params.applyDateEnd" type="date" placeholder="选择日期" clearable></el-date-picker>
</div>
</el-form-item>
</el-form>
<div class="btn" style="text-align: center;">
<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 :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 fixed label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<el-table-column fixed width="220px" label="操作" align="center">
<template slot-scope="scope">
<div class="searchbtns"> <!--:disabled="scope.row.nodeState == ''?false:true"-->
<el-button size="small" type="danger" :disabled="!scope.row.revokeState" @click="handleRevoke(scope.row)">撤回</el-button>
<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="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/>
</div>
<!--End查询列表部分-->
</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="220px" label="操作" align="center">
<template slot-scope="scope">
<div class="searchbtns"> <!--:disabled="scope.row.nodeState == ''?false:true"-->
<el-button size="small" type="danger" :disabled="!scope.row.revokeState" @click="handleRevoke()">撤回</el-button>
<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-add v-show="viewState == 2 || viewState == 3" ref="divadd" @doback="resetState" @reloadlist="getList"/>
<chukushenqing-info v-show="viewState == 4" ref="divInfo" @doback="resetState" @reloadlist="getList"/>
</div>
</template>
<script>
import {customerName, delBySids, pagerList, submitBySid,revokeBySid} from '@/api/chukuguanli/chukubanli'
import { customerName, delBySids, pagerList, submitBySid, revokeProcess } from '@/api/chukuguanli/chukubanli'
import Pagination from '@/components/pagination'
import pageye from '@/components/pagination/pageye'
import chukushenqingAdd from './chukushenqingAdd'
import chukushenqingInfo from './chukushenqingInfo'
import ButtonBar from '@/components/ButtonBar'
export default {
name: 'chukushenqing',
components: {
ButtonBar,
Pagination,
pageye,
chukushenqingAdd,
@ -142,32 +127,45 @@ export default {
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,
size: 10,
total: 0,
params: {
applyDateEnd: '', //
applyDateStart: '', //
applyName: '', //
applySid: window.sessionStorage.getItem('staffSid'), // sid
applySid: '', // sid
contractNo: '', //
name: '' //
}
},
temp: {}, //
templook: {}, //
textMap: {
update: '编辑',
create: '创建'
},
dialogStatus: ''
btnList: [
{
type: 'primary',
size: 'small',
icon: 'plus',
btnKey: 'toAdd',
btnLabel: '新增'
},
{
type: 'danger',
size: 'small',
icon: 'del',
btnKey: 'doDel',
btnLabel: '删除'
},
{
type: 'info',
size: 'small',
icon: 'cross',
btnKey: 'doClose',
btnLabel: '关闭'
}
]
}
},
@ -175,15 +173,30 @@ export default {
//
this.init()
},
mounted() {
this.$refs['btnbar'].setButtonList(this.btnList)
},
methods: {
// ========== ==========
init() {
this.getList()
this.getCustomer()
},
//
resetTemp() {
this.temp = {}
btnHandle(btnKey) {
console.log('XXXXXXXXXXXXXXX ' + btnKey)
switch (btnKey) {
case 'toAdd':
this.toAdd()
break
case 'doDel':
this.doDel()
break
case 'doClose':
this.doClose()
break
default:
break
}
},
//
getCustomer() {
@ -194,21 +207,6 @@ export default {
}
})
},
//
customerChange(value) {
console.log('触发下拉框按钮', value)
let bb = null
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
@ -216,11 +214,6 @@ export default {
return pageindex
},
// ========== ==========
//
handleWaitList() {
this.$parent.viewState = 1
this.$parent.getList()
},
//
resetState() {
this.viewState = 5
@ -234,15 +227,16 @@ export default {
this.searchxianshitit = '显示查询条件'
}
},
handleRevoke(row){
handleRevoke(row) {
this.$confirm('是否确定提交该业务', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
revokeBySid(row.sid).then((response) => {
if (response.code === '200') {
revokeProcess({ taskId: row.taskId, businessSid: row.sid, instanceId: row.procInstId, userSid: window.sessionStorage.getItem('userSid') }).then((response) => {
if (response.success) {
this.$message({ showClose: true,type: 'success', message: response.msg })
this.getList()
}
})
})
@ -269,35 +263,46 @@ export default {
},
//
handleReset() {
this.listQuery.params = {
applicant: '',
contractNo: '',
customerName: '',
endDate: '',
invoiceState: '',
startDate: ''
this.listQuery = {
current: 1,
size: 10,
total: 0,
params: {
applyDateEnd: '', //
applyDateStart: '', //
applyName: '', //
applySid: '', // sid
contractNo: '', //
name: '' //
}
}
this.getList()
},
// ========== ==========
//
getList() {
this.listLoading = true
this.listQuery.params.applySid = window.sessionStorage.getItem('staffSid')
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
this.listQuery.total = response.data.total
} else {
this.list = []
this.total = 0
this.listQuery.total = 0
}
})
},
//
handleCheck(row) {
this.viewState = 4
this.$refs['divInfo'].showInfo(row.sid, row.state)
this.$refs['divInfo'].showInfo(row.sid)
},
toAdd() {
this.viewState = 2
this.$refs['divadd'].showAdd()
},
//
changeNodeState(row) {
@ -329,52 +334,45 @@ export default {
}
},
//
handleDelete() {
if (this.sids.length > 0) {
const sids = this.sids
delBySids(sids).then((response) => {
if (response.code === '200') {
doDel() {
if (this.sids.length === 0) {
this.$message({ showClose: true, type: 'error', message: '请选择至少一条记录进行删除操作' })
return
}
const tip = '请确认是否删除所选 ' + this.sids.length + ' 条记录?'
this.$confirm(tip, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
const loading = this.$loading({
lock: true,
text: 'Loading',
spinner: 'el-icon-loading',
background: 'rgba(0, 0, 0, 0.7)'
})
delBySids(this.sids).then(resp => {
loading.close()
if (resp.success) {
this.$message({ type: 'success', message: resp.msg, showClose: true })
this.getList()
}
}).catch(e => {
loading.close()
})
} else {
this.$message({
showClose: true,
message: '请选择出库申请信息!',
type: 'error'
})
return
}
}).catch(() => {
})
},
//
handleClose() {
doClose() {
this.$store.dispatch('tagsView/delView', this.$route)
this.$router.go(-1)
}
//
// 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;
}
@ -383,12 +381,6 @@ 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;
@ -412,7 +404,32 @@ label {
color: #2cab69;
}
.searchli {
padding: 5px 100px;
.btn {
padding: 15px 0 15px 0;
border: 1px solid #e0e3eb;
}
.tab-header {
background-color: #edf1f7;
padding: 8px 20px;
margin-bottom: 0 !important;
}
.tab-header /deep/ .el-form-item {
margin-bottom: 10px;
}
.listtop {
display: flex;
justify-content: space-between;
align-items: center;
border: 1px solid #dfe4ed;
height: 40px;
}
.tit {
margin-bottom: -10px;
}
.pagination {
margin-bottom: -10px;
}
</style>

733
anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqingAdd.vue

@ -1,14 +1,14 @@
<template>
<div class="app-container">
<div v-show="isShow">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>{{viewTitle}}</div>
<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="disabled" @click="handleSubmit()">提交</el-button>
<el-button type="primary" size="small">打印</el-button>
<el-button type="info" size="small" @click="handleReturn()">返回</el-button>
<el-button type="primary" size="small" :disabled="createBtn" @click="handleSubmit()">提交</el-button>
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button>
</div>
</div>
<div class="listconadd">
@ -48,53 +48,44 @@
</el-col>
<el-col :span="6">
<el-form-item>
<span>{{temp.modelName}}</span>
<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>
<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 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" @click="">
<span>{{scope.row.vinNo}}</span>
<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>
<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 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 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 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>
@ -108,410 +99,362 @@
</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"/>
<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 {mapGetters} from 'vuex'
import {fetchDetailsBySid, save, submitInfo} from '@/api/chukuguanli/chukubanli'
import userInfoAdd from "./relation/userInfoAdd";
import userInfoLook from "./relation/userInfoLook";
import { fetchDetailsBySid, save, submitInfo } from '@/api/chukuguanli/chukubanli'
import daichukucheliang from './daichukucheliang'
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, // 10
modelName: '', //
name: '',//
sid: '',
applyDate: '', //
detailsList: []
}, //
detailsList: [{
price: '', //
remarks: '', //
vinNo: '',//
useMessage: {}
}],
sids: [],
vinNo_info: '',
index_list: [],
rules: {},
// ------------------------------------
export default {
name: 'chukushenqingAdd',
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, // 10
modelName: '', //
name: '', //
sid: '',
applyDate: '', //
userSid: '',
taskId: '',
instanceId: '',
detailsList: []
}, //
detailsList: [],
sids: [],
vinNo_info: '',
index_list: [],
rules: {}
}
},
methods: {
showAdd() {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
})
this.viewTitle = '【新增】出库申请'
var nowDate = new Date()
var date = {
year: nowDate.getFullYear(),
month: nowDate.getMonth() + 1,
day: nowDate.getDate()
}
var dayDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day)
this.temp.applyDate = dayDate
this.temp.applyName = window.sessionStorage.getItem('name')
this.temp.applySid = window.sessionStorage.getItem('staffSid')
this.temp.userSid = window.sessionStorage.getItem('userSid')
},
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, // 10
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
showEdit(row, 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'
}
// useMessage = this.detailsList[i].useMessage
console.log('点击编辑useMessage', this.detailsList[i].useMessage)
this.isShow = false
this.isShowAdd = true
this.$refs['divUser'].showEdit(useMessage, vinNo)
}
this.temp = JSON.parse(JSON.stringify(this.temp).replace(/listVo/g, 'detailsList'))
console.log('isTerminal', this.temp.isTerminal)
}
},
//
lookUserInfo(vinNo) {
console.log('1111', vinNo)
if (this.temp.isTerminal == 1){
for (var i = 0; i < this.detailsList.length; i++) {
if (this.detailsList[i].vinNo == vinNo) {
let useMessage = {}
useMessage = this.detailsList[i]
this.isShow = false
this.isShowLook = true
const createBtn = false
this.$refs['divUserInfo'].showInfo(useMessage, vinNo,createBtn)
})
},
// ------------ ------------
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
}
}
if (this.temp.isTerminal == 0){
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.isShowLook = true
const createBtn = false
this.$refs['divUserInfo'].showInfo(useMessage, vinNo,createBtn)
}
}
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
}
}
},
//
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
}
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
}
}
} 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)
}
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
}
}
},
showAdd(temp) {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
});
this.dialogStatus = 'add'
this.viewTitle = '【新增】出库申请';
console.log('新增初始化', temp)
this.temp.contractNo = temp[0].contractNo
this.temp.isTerminal = temp[0].isTerminal
this.temp.modelName = temp[0].modelName
this.temp.name = temp[0].name
this.temp.applyDate = temp[0].applyDate
const details_list = []
temp.forEach((item) => {
details_list.push({
vinNo:item.vinNo,
price:item.price,
address:item.address,
contractNo:item.contractNo,
idNo:item.idNo,
name:item.name,
type:item.type,
mobile:item.mobile
})
} else {
this.$message({
showClose: true,
message: '请选择出库车辆信息!',
type: 'error'
})
this.detailsList = details_list
var nowDate = new Date();
var date = {
year: nowDate.getFullYear(),
month: nowDate.getMonth() + 1,
day: nowDate.getDate(),
}
var dayDate = date.year + '-' + (date.month >= 10 ? date.month : '0' + date.month) + '-' + (date.day >= 10 ? date.day : '0' + date.day)
this.temp.applyDate = dayDate
console.log(dayDate);
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++) {
//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)
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)
}
})
},
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)
}
}
},
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
this.handleReturn('true')
}
}).catch((e) => {
this.createBtn = false
})
})
this.vinNo_info = aa.join()
this.sids = bb
this.index_list = index_arr
},
// ------------ ------------
//
handleCreate() {
this.temp.detailsList = this.detailsList
console.log('112233', this.temp)
}
})
},
//
handleSubmit() {
this.$confirm('是否确定提交该业务', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
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.temp.detailsList = this.detailsList
submitInfo(this.temp).then((response) => {
if (response.success) {
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
})
}
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')
},
// ------------ ------------
})
},
//
handleReturn(isreload) {
if (isreload === 'true') this.$emit('reloadlist')
this.$refs['dataForm'].resetFields()
this.temp = {
applyName: '', //
applySid: '', // sid staffSid
contractNo: '', //
isTerminal: 3, // 10
modelName: '', //
name: '', //
sid: '',
applyDate: '', //
detailsList: []
}
this.detailsList = []
this.$emit('doback')
}
}
}
</script>
<style scoped>
.tit {
margin: 0 0 20px 0;
padding: 10px 0 0 0;
}
.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;
}
.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-row {
border: 0;
}
.formadd /deep/ .el-col {
border: 0;
}
.formadd /deep/ .el-col {
border: 0;
}
/deep/ .el-form-item__content {
margin-left: 0 !important;
}
/deep/ .el-form-item__content {
margin-left: 0 !important;
}
.titcon {
border: 1px solid #e0e3eb;
}
.titcon {
border: 1px solid #e0e3eb;
}
.titcon, .title {
background-color: white;
color: black;
}
.titcon, .title {
background-color: white;
color: black;
}
.changeIt {
line-height: 40px;
font-size: 17px;
float: right;
}
.formadd .el-row .el-col{
padding: 0 !important;
}
.formadd .el-row .el-col {
padding: 0 !important;
}
</style>

330
anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/chukushenqingInfo.vue

@ -1,23 +1,14 @@
<template>
<div class="app-container">
<div v-show="isShow">
<div v-show="viewState == 1">
<div class="tab-header webtop">
<div>出库申请详情</div>
<!-- <div v-else></div> -->
<div>
<el-button type="info" size="small" @click="handleReturn()"
>返回
</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">
<el-form ref="dataForm" :model="temp" label-position="right" label-width="100%" class="formadd" :rules="rules">
<div class="tit">
出库申请
<div class="times">
@ -40,9 +31,7 @@
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item
><span slot="label">是否为终端客户</span></el-form-item
>
<el-form-item><span slot="label">是否为终端客户</span></el-form-item>
</el-col>
<el-col :span="6">
<el-form-item>
@ -64,27 +53,12 @@
</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 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>
@ -97,208 +71,148 @@
</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="lookUserInfo(scope.row.vinNo)"
class="btntopbluebut"
>查看
</el-button>
<span v-show="temp.isTerminal == 3"></span>
<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">
<el-table-column label="备注" align="left" header-align="center">
<template slot-scope="scope">
<el-input
v-model="scope.row.remarks"
class="addinputw"
placeholder="请输入备注"
clearable
/>
<span>{{ scope.row.remarks }}</span>
</template>
</el-table-column>
</el-table>
</el-form>
</div>
</div>
<!--@returnEdit="getUserInfoEdit"-->
<user-info-look
v-show="isShowLook"
ref="divUserInfo"
@doback="resetState"
/>
<user-info-look v-show="viewState == 2" ref="divUserInfo" @doback="resetState"/>
</div>
</template>
<script>
import {mapGetters} from "vuex";
import {fetchDetailsBySid,} from '@/api/chukuguanli/chukubanli'
import userInfoLook from "./relation/userInfoLook";
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, // 10
modelName: "", //
name: "", //
sid: "",
applyDate: "", //
detailsList: [],
}, //
detailsList: [],
sids: [],
vinNo_info: "",
submitDto: {
businessSid: "",
userSid: window.sessionStorage.getItem("userSid"),
},
rules: {},
// ------------------------------------
};
},
computed: {
...mapGetters([
"id",
"roles",
"rolesIds",
"departmentId",
"departmentCode",
]),
export default {
name: 'chukushenqingInfo',
components: {
userInfoLook
},
data() {
return {
index: 0,
// ---------
viewState: 1,
listLoading: false,
list: [],
temp: {
applyName: window.sessionStorage.getItem('name'), //
applySid: window.sessionStorage.getItem('staffSid'), // sid staffSid
contractNo: '', //
isTerminal: 3, // 10
modelName: '', //
name: '', //
sid: '',
applyDate: '', //
detailsList: []
}, //
detailsList: [],
sids: [],
vinNo_info: '',
rules: {}
}
},
methods: {
// ------------ ------------
resetState() {
this.viewState = 1
},
created() {
//
},
methods: {
// ------------ ------------
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;
console.log('详情回显车辆信息', this.detailsList)
for (var i = 0; i < this.detailsList.length; i++) {
//JSON.stringify()
if (this.detailsList[i].useMessage.vinNo !== "") {
this.detailsList[i].isExist = "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.isShow = false;
this.isShowLook = true;
const createBtn = true
this.$refs["divUserInfo"].showInfo(useMessage, vinNo,createBtn);
}
this.temp = JSON.parse(
JSON.stringify(this.temp).replace(/listVo/g, 'detailsList')
)
console.log('isTerminal', this.temp.isTerminal)
}
})
},
//
lookUserInfo(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)
}
},
//
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");
},
}
},
};
// ------------ ------------
//
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;
}
.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;
}
.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-row {
border: 0;
}
.formadd /deep/ .el-col {
border: 0;
}
.formadd /deep/ .el-col {
border: 0;
}
/deep/ .el-form-item__content {
margin-left: 0 !important;
}
/deep/ .el-form-item__content {
margin-left: 0 !important;
}
.titcon {
border: 1px solid #e0e3eb;
}
.titcon {
border: 1px solid #e0e3eb;
}
.titcon,
.title {
background-color: white;
color: black;
}
.titcon,
.title {
background-color: white;
color: black;
}
.changeIt {
line-height: 40px;
font-size: 17px;
float: right;
}
.changeIt {
line-height: 40px;
font-size: 17px;
float: right;
}
</style>

510
anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/daichukucheliang.vue

@ -1,22 +1,19 @@
<template>
<div class="app-container">
<!--待开票列表页面-->
<div v-show="viewState == 1">
<div>
<!--标题按钮部分开始-->
<div class="tab-header webtop">
<!--标题-->
<div>待出库车辆列表</div>
<!--start 查询列表按钮部分开始-->
<div>
<el-button type="primary" size="small" @click="handleCreate()">出库申请</el-button>
<el-button type="primary" size="small" @click="handleCreate()">确定</el-button>
<el-button type="info" size="small" @click="handleColse()">关闭</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>
@ -26,10 +23,8 @@
<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 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="车架号">
@ -46,16 +41,13 @@
<!--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"/>
<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 type="selection" align="center" width="50"/>
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center"/>
<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>
@ -68,7 +60,7 @@
</el-table-column>
<el-table-column label="客户名称" align="center">
<template slot-scope="scope">
<span>{{ scope.row.name}}</span>
<span>{{ scope.row.name }}</span>
</template>
</el-table-column>
<el-table-column label="车架号" align="center">
@ -76,321 +68,249 @@
<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="total > 0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size"
class="pagination" @pagination="getList"/>
<pagination v-show="list.length > 0" :total="listQuery.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,
checkingApply,
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'
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: 'daichukucheliang',
components: {
Pagination,
pageye,
chukushenqing,
chukushenqingAdd
export default {
name: 'daichukucheliang',
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)
}
})
},
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: '' //
//
customerChange(value) {
console.log('触发下拉框按钮', value)
let bb = {}
this.typeList.forEach((e) => {
if (e.customerName === value) {
bb = {
name: e.customerName,
sid: e.sid
}
},
textMap: {
update: '编辑',
create: '创建'
},
temp: {},
initObj: {
detailVo: {
applyDate: '', //
contractNo: '', //
isTerminal: '', //
modelName: '', //
name: '', //
listVo: [],
},
sid: '',
stringList: []
},
multipleSelection:[],
// { // listVo
// price:'', //
// remarks:'', //
// sid:'', //sid
// useMessageSid:'', //使sid
// vinNo:'',//
// },
dialogStatus: ''
}
}
})
this.listQuery.params.name = bb.name
console.log('客户名称', this.listQuery.params.name)
},
// ------------------------------------
computed: {
...mapGetters(['id', 'roles', 'rolesIds', 'departmentId', 'departmentCode'])
// ========== ==========
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
} else {
this.searchxianshitit = '显示查询条件'
}
},
created() {
//
this.init()
//
this.getList()
//
indexMethod(index) {
var pagestart = (this.listQuery.current - 1) * this.listQuery.size
var pageindex = index + 1 + pagestart
return pageindex
},
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
}
// 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.listQuery.params.name = bb.name
console.log('客户名称', this.listQuery.params.name)
},
// ========== ==========
//
clicksearchShow() {
this.isSearchShow = !this.isSearchShow
if (this.isSearchShow) {
this.searchxianshitit = '隐藏查询条件'
})
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.searchxianshitit = '显示查询条件'
this.list = []
this.listQuery.total = 0
}
},
//
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 = [] // 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) {
})
},
//
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'
});
// 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
this.$refs['divchuku'].getList()
},
//
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
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.viewState = 2
this.$refs['divadd'].showAdd(this.multipleSelection)
// checkingApply(this.initObj).then(response => {
// if (response.success) {
// this.viewState = 2
// this.temp = response.data
// this.$refs['divadd'].showAdd(this.temp)
// }
// })
}
},
this.$emit('backData', this.sids)
}
},
handleColse() {
this.$emit('doback')
}
}
}
</script>
<style scoped>
.switch_btn {
padding: 15px 0 10px 0;
}
.switch_btn {
padding: 15px 0 10px 0;
}
.btn_style {
background-color: #018ad2;
color: white;
font-weight: 600;
}
.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 {
border-top: 0px solid #e6ebf5;
border-bottom: 0px solid #e6ebf5;
}
/deep/ .el-collapse-item__content {
margin: 0;
padding: 0;
}
/deep/ .el-collapse-item__content {
margin: 0;
padding: 0;
}
/deep/ .el-collapse-item__wrap {
border-bottom: 0px solid #ebeef5;
}
/deep/ .el-collapse-item__wrap {
border-bottom: 0px solid #ebeef5;
}
/deep/ .el-collapse-item__header {
border-bottom: 0px solid #e6ebf5;
}
/deep/ .el-collapse-item__header {
border-bottom: 0px solid #e6ebf5;
}
.searchbtn {
border: #2cab69 1px solid;
color: #2cab69;
}
.searchbtn {
border: #2cab69 1px solid;
color: #2cab69;
}
.searchli {
padding: 5px 100px;
}
.searchli {
padding: 5px 100px;
}
</style>

138
anrui-buscenter/anrui-buscenter-ui/src/views/chukuguanli/chukubanli/relation/userInfoLook.vue

@ -1,17 +1,14 @@
<template>
<div class="app-container">
<div v-show="visible">
<div>
<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>
<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">
<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">
@ -81,94 +78,61 @@
</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,createBtn) {
this.$nextTick(() => {
this.$refs['dataForm'].clearValidate()
});
console.log('详情拿到的信息', useMessage)
this.tempUserLook = useMessage
this.createBtn = createBtn
},
// ------------ ------------
//
handleReturn() {
this.$emit('doback')
},
// ------------ ------------
import {} from '@/api/chukuguanli/chukubanli'
export default {
name: 'userInfoLook',
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;
}
.tit {
margin: 45px 0 66px 0;
padding: 10px 0 0 0;
border: 0;
}
/deep/ .el-row {
display: flex;
justify-content: center;
border-left: 0;
}
/deep/ .el-row {
display: flex;
justify-content: center;
border-left: 0;
}
.topBor {
border-top: 1px solid #e0e3eb;
}
.topBor {
border-top: 1px solid #e0e3eb;
}
/deep/ .el-form-item__content {
margin-left: 0 !important;
}
/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;
}
/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>

419
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/chukuDaiBanInfo.vue

@ -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, // 10
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) // urlunescape()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>

456
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/chukuEdit.vue

@ -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, // 10
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) // urlunescape()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>

291
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/chukuYiBanInfo.vue

@ -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, // 10
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) // urlunescape()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>

316
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/daichuku.vue

@ -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>

196
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/relation/userEdit.vue

@ -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>

138
anrui-buscenter/anrui-buscenter-ui/src/views/workflow/chukuguanliFlow/chukuguanli/relation/userInfo.vue

@ -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…
Cancel
Save