|
|
@ -18,7 +18,6 @@ |
|
|
|
<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="部门名称" class="searchlist"> |
|
|
|
<el-input v-model="listQuery.params.orgName" placeholder="请填写" clearable class="filter-item"/> |
|
|
|
<!-- <el-select v-model="listQuery.params.orgName" class="filter-item" clearable placeholder="请选择"> |
|
|
@ -34,22 +33,18 @@ |
|
|
|
<el-input v-model="listQuery.params.customerName" placeholder="" clearable class="filter-item"/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="单据日期" class="searchlist"> |
|
|
|
<el-date-picker v-model="listQuery.params.createDateStart" class="filter-item-time" type="date" |
|
|
|
value-format="yyyy-MM-dd" placeholder="请选择"/> |
|
|
|
<el-date-picker v-model="listQuery.params.createDateStart" class="filter-item-time" type="date" value-format="yyyy-MM-dd" placeholder="请选择"/> |
|
|
|
<label>至</label> |
|
|
|
<el-date-picker v-model="listQuery.params.createDateEnd" class="filter-item-time" type="date" |
|
|
|
value-format="yyyy-MM-dd" placeholder="请选择"/> |
|
|
|
<el-date-picker v-model="listQuery.params.createDateEnd" class="filter-item-time" type="date" value-format="yyyy-MM-dd" placeholder="请选择"/> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="支付方式" class="searchlist"> |
|
|
|
<el-select v-model="listQuery.params.payType" class="filter-item" clearable placeholder="请选择"> |
|
|
|
<el-option v-for="item2 in payTypeList" :key="item2.dictKey" :label="item2.dictValue" |
|
|
|
:value="item2.dictValue"/> |
|
|
|
<el-option v-for="item2 in payTypeList" :key="item2.dictKey" :label="item2.dictValue" :value="item2.dictValue"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="提车方式" class="searchlist"> |
|
|
|
<el-select v-model="listQuery.params.saleType" class="filter-item" clearable placeholder="请选择"> |
|
|
|
<el-option v-for="item in saleTypeList" :key="item.dictKey" :label="item.dictValue" |
|
|
|
:value="item.dictValue"/> |
|
|
|
<el-option v-for="item in saleTypeList" :key="item.dictKey" :label="item.dictValue" :value="item.dictValue"/> |
|
|
|
</el-select> |
|
|
|
</el-form-item> |
|
|
|
<el-form-item label="车型名称" class="searchlist"> |
|
|
@ -65,21 +60,17 @@ |
|
|
|
<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="total>0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|
|
|
</div> |
|
|
|
<div class=""> |
|
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border fit highlight-current-row |
|
|
|
style="width: 100%;" @selection-change="handleSelectionChange"> |
|
|
|
<el-table :key="tableKey" v-loading="listLoading" :data="list" border fit highlight-current-row style="width: 100%;" @selection-change="handleSelectionChange"> |
|
|
|
<el-table-column type="selection" align="center" width="50"/> |
|
|
|
<el-table-column label="序号" type="index" width="80" :index="indexMethod" align="center"/> |
|
|
|
<el-table-column width="150px" label="操作" align="center"> |
|
|
|
<el-table-column width="180px" label="操作" align="center"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<div class="searchbtns"> |
|
|
|
<el-button size="small" type="primary" |
|
|
|
:disabled="scope.row.nodeState == ''?false:true" |
|
|
|
@click="changeNodeState(scope.row)">办理 |
|
|
|
</el-button> |
|
|
|
<el-button size="small" type="primary" :disabled="scope.row.nodeState == ''?false:true" @click="changeNodeState(scope.row)">办理</el-button> |
|
|
|
<el-button size="small" type="primary" @click="printContract(scope.row)">打印合同</el-button> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
@ -173,8 +164,7 @@ |
|
|
|
<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="total > 0" :total="total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -189,463 +179,466 @@ |
|
|
|
<xiaodaijinrongfangan-info v-show="xiaodaijinrongfanganInfoShow" @noClickclose="noClickclose"/> |
|
|
|
<!-- 合同编辑--> |
|
|
|
<!-- <hetongdanganguanliInfo ref="hetongdanganguanli-Info" @handleReturn="visible = true"/> --> |
|
|
|
|
|
|
|
<!-- 打印合同 --> |
|
|
|
<divPrint ref="divPrint" @doback="resetState"/> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { |
|
|
|
getPageList, |
|
|
|
getListOrg, |
|
|
|
deleteByids, |
|
|
|
submitOrder, |
|
|
|
dictType, |
|
|
|
} from '@/api/salesManagement/orderManagement' |
|
|
|
import {submitSales, updateSales} from '@/api/portal/workFlow' |
|
|
|
// import { setuser, getuser } from '@/utils/baocun' |
|
|
|
// import { delUser } from '@/api/system/user/Auser' |
|
|
|
import {loginDetails} from '@/api/dictcommons/basemanufacturer' |
|
|
|
import {getStorage} from '@/utils/auth' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import divAdd from './dingdanxinxiAdd.vue' |
|
|
|
import divInfo from './dingdanxinxiInfo.vue' |
|
|
|
import xiaodaijinrongfanganInfo from '../../xiaodaijinrongfangan/xiaodaijinrongfanganinfo.vue' |
|
|
|
import hetongdanganguanliInfo from '@/views/hetongguanli/hetongdanganguanli/hetongdanganguanliInfo.vue' |
|
|
|
import { |
|
|
|
getPageList, |
|
|
|
getListOrg, |
|
|
|
deleteByids, |
|
|
|
dictType |
|
|
|
} from '@/api/salesManagement/orderManagement' |
|
|
|
import { submitSales, updateSales } from '@/api/portal/workFlow' |
|
|
|
import { loginDetails } from '@/api/dictcommons/basemanufacturer' |
|
|
|
import { getStorage } from '@/utils/auth' |
|
|
|
import Pagination from '@/components/pagination' |
|
|
|
import pageye from '@/components/pagination/pageye' |
|
|
|
import divAdd from './dingdanxinxiAdd.vue' |
|
|
|
import divInfo from './dingdanxinxiInfo.vue' |
|
|
|
import divPrint from './dayinxiangshezhi.vue' |
|
|
|
import xiaodaijinrongfanganInfo from '../../xiaodaijinrongfangan/xiaodaijinrongfanganinfo.vue' |
|
|
|
import hetongdanganguanliInfo from '@/views/hetongguanli/hetongdanganguanli/hetongdanganguanliInfo.vue' |
|
|
|
|
|
|
|
export default { |
|
|
|
name: 'Dingdanxinxi', |
|
|
|
components: { |
|
|
|
Pagination, |
|
|
|
pageye, |
|
|
|
divAdd, |
|
|
|
divInfo, |
|
|
|
xiaodaijinrongfanganInfo, |
|
|
|
hetongdanganguanliInfo, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
isableSub:false, |
|
|
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|
|
|
xiaodaijinrongfanganInfoShow: false, |
|
|
|
hetongdanganguanliAddShow: false, |
|
|
|
userSid: '', |
|
|
|
treedata: [], |
|
|
|
payTypeList: [], |
|
|
|
saleTypeList: [], |
|
|
|
isSearchShow: false, |
|
|
|
searchxianshitit: '隐藏查询条件', |
|
|
|
// 查询 ----------- |
|
|
|
tableKey: 0, |
|
|
|
addOrUpdatetypes: '', |
|
|
|
list: [ |
|
|
|
{ |
|
|
|
name: '2345', |
|
|
|
contractNum: '2222', |
|
|
|
}, |
|
|
|
], |
|
|
|
sids: [], |
|
|
|
defaultProps: { |
|
|
|
children: 'children', |
|
|
|
label: 'name', |
|
|
|
}, |
|
|
|
total: 1, |
|
|
|
listLoading: false, |
|
|
|
listQuery: { |
|
|
|
current: 1, |
|
|
|
size: 20, |
|
|
|
params: { |
|
|
|
customerName: '', |
|
|
|
modelName: '', |
|
|
|
orgName: '', |
|
|
|
payType: '', |
|
|
|
saleType: '', |
|
|
|
staffName: '', |
|
|
|
}, |
|
|
|
}, |
|
|
|
temp: { |
|
|
|
contactMobile: '1', |
|
|
|
}, // 添加和修改 |
|
|
|
nodeState: '', // 节点状态 |
|
|
|
submitDto: { |
|
|
|
businessSid: '', |
|
|
|
userSid: window.sessionStorage.getItem('userSid') |
|
|
|
}, |
|
|
|
updateDto: { |
|
|
|
nodeState: '', |
|
|
|
sid: '', |
|
|
|
}, |
|
|
|
visible: true, |
|
|
|
// ------------------------------------ |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: {}, |
|
|
|
created() { |
|
|
|
// 加载列表 |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
|
if (this.isSearchShow) { |
|
|
|
this.searchxianshitit = '隐藏查询条件' |
|
|
|
} else { |
|
|
|
this.searchxianshitit = '显示查询条件' |
|
|
|
export default { |
|
|
|
name: 'Dingdanxinxi', |
|
|
|
components: { |
|
|
|
Pagination, |
|
|
|
pageye, |
|
|
|
divAdd, |
|
|
|
divInfo, |
|
|
|
divPrint, |
|
|
|
xiaodaijinrongfanganInfo, |
|
|
|
hetongdanganguanliInfo |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
isableSub: false, |
|
|
|
viewState: 1, // 1、列表 2、添加 3、修改 4、查看 |
|
|
|
xiaodaijinrongfanganInfoShow: false, |
|
|
|
hetongdanganguanliAddShow: false, |
|
|
|
userSid: '', |
|
|
|
treedata: [], |
|
|
|
payTypeList: [], |
|
|
|
saleTypeList: [], |
|
|
|
isSearchShow: false, |
|
|
|
searchxianshitit: '隐藏查询条件', |
|
|
|
// 查询 ----------- |
|
|
|
tableKey: 0, |
|
|
|
addOrUpdatetypes: '', |
|
|
|
list: [ |
|
|
|
{ |
|
|
|
name: '2345', |
|
|
|
contractNum: '2222' |
|
|
|
} |
|
|
|
], |
|
|
|
sids: [], |
|
|
|
defaultProps: { |
|
|
|
children: 'children', |
|
|
|
label: 'name' |
|
|
|
}, |
|
|
|
init() { |
|
|
|
total: 1, |
|
|
|
listLoading: false, |
|
|
|
listQuery: { |
|
|
|
current: 1, |
|
|
|
size: 20, |
|
|
|
params: { |
|
|
|
customerName: '', |
|
|
|
modelName: '', |
|
|
|
orgName: '', |
|
|
|
payType: '', |
|
|
|
saleType: '', |
|
|
|
staffName: '' |
|
|
|
} |
|
|
|
}, |
|
|
|
// ----------功能打开开始-------- |
|
|
|
resetState() { |
|
|
|
this.visible = true |
|
|
|
this.getList() |
|
|
|
temp: { |
|
|
|
contactMobile: '1' |
|
|
|
}, // 添加和修改 |
|
|
|
nodeState: '', // 节点状态 |
|
|
|
submitDto: { |
|
|
|
businessSid: '', |
|
|
|
userSid: window.sessionStorage.getItem('userSid') |
|
|
|
}, |
|
|
|
xiaoshouhetong(row) { |
|
|
|
console.log('9511', row) |
|
|
|
this.visible = false |
|
|
|
this.$refs['hetongdanganguanli-Info'].showOrderHeTong(row.sid) |
|
|
|
updateDto: { |
|
|
|
nodeState: '', |
|
|
|
sid: '' |
|
|
|
}, |
|
|
|
// 打开查看详情 |
|
|
|
handleCheck(row) { |
|
|
|
visible: true |
|
|
|
// ------------------------------------ |
|
|
|
} |
|
|
|
}, |
|
|
|
computed: {}, |
|
|
|
created() { |
|
|
|
// 加载列表 |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
// 搜索条件效果 |
|
|
|
clicksearchShow() { |
|
|
|
this.isSearchShow = !this.isSearchShow |
|
|
|
if (this.isSearchShow) { |
|
|
|
this.searchxianshitit = '隐藏查询条件' |
|
|
|
} else { |
|
|
|
this.searchxianshitit = '显示查询条件' |
|
|
|
} |
|
|
|
}, |
|
|
|
init() { |
|
|
|
}, |
|
|
|
// ----------功能打开开始-------- |
|
|
|
resetState() { |
|
|
|
this.visible = true |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
xiaoshouhetong(row) { |
|
|
|
console.log('9511', row) |
|
|
|
this.visible = false |
|
|
|
this.$refs['hetongdanganguanli-Info'].showOrderHeTong(row.sid) |
|
|
|
}, |
|
|
|
// 打开查看详情 |
|
|
|
handleCheck(row) { |
|
|
|
this.visible = false |
|
|
|
this.$refs['dingdanxinxiinfo'].showInfo(row.billNo) |
|
|
|
}, |
|
|
|
// 打开添加 |
|
|
|
handleCreate(row) { |
|
|
|
this.visible = false |
|
|
|
this.$refs['divadd'].showAdd() |
|
|
|
}, |
|
|
|
// 办理 |
|
|
|
changeNodeState(row) { |
|
|
|
if (row.nodeState == '') { |
|
|
|
this.visible = false |
|
|
|
this.$refs['dingdanxinxiinfo'].showInfo(row.billNo) |
|
|
|
}, |
|
|
|
// 打开添加 |
|
|
|
handleCreate(row) { |
|
|
|
this.$refs['divadd'].showEdit(row.sid) |
|
|
|
} |
|
|
|
}, |
|
|
|
printContract(row) { |
|
|
|
this.visible = false |
|
|
|
this.$refs['divPrint'].showInfo(row) |
|
|
|
}, |
|
|
|
// 打开修改 |
|
|
|
handleUpdate() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
this.visible = false |
|
|
|
this.$refs['divadd'].showAdd() |
|
|
|
}, |
|
|
|
// 办理 |
|
|
|
changeNodeState(row) { |
|
|
|
if (row.nodeState == '') { |
|
|
|
this.visible = false |
|
|
|
this.$refs['divadd'].showEdit(row.sid) |
|
|
|
this.$refs['divadd'].showEdit(this.sids[0]) |
|
|
|
} else if (this.sids.length > 1) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '不能选中多个信息修改!!', |
|
|
|
type: 'warning', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
return |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择信息!!', |
|
|
|
type: 'warning', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
}, |
|
|
|
// ----------功能打开结束-------- |
|
|
|
// ----------功能打开下一级页面开始-------- |
|
|
|
noClickclose() { |
|
|
|
this.xiaodaijinrongfanganInfoShow = false |
|
|
|
this.hetongdanganguanliAddShow = false |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
|
|
|
|
|
// 打开消贷业务详情 |
|
|
|
handleCheckxiaodai() { |
|
|
|
this.viewState = false |
|
|
|
this.xiaodaijinrongfanganInfoShow = true |
|
|
|
this.hetongdanganguanliAddShow = false |
|
|
|
}, |
|
|
|
// ----------功能打开下一级页面结束-------- |
|
|
|
// 重置 |
|
|
|
handleReset() { |
|
|
|
this.listQuery.params.customerName = '' |
|
|
|
this.listQuery.params.modelName = '' |
|
|
|
this.listQuery.params.orgName = '' |
|
|
|
this.listQuery.params.payType = '' |
|
|
|
this.listQuery.params.saleType = '' |
|
|
|
this.listQuery.params.staffName = '' |
|
|
|
this.listQuery.params.createDateEnd = '' |
|
|
|
this.listQuery.params.createDateStart = '' |
|
|
|
// // this.getList() |
|
|
|
}, |
|
|
|
// 返回 |
|
|
|
handleReturn() { |
|
|
|
this.$router.go(-1) |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|
|
|
var pageindex = index + 1 + pagestart |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
// 部门 treedata |
|
|
|
getOrgList() { |
|
|
|
getListOrg().then((response) => { |
|
|
|
if (response.code === '200' && response.data) { |
|
|
|
this.treedata = response.data[0].children |
|
|
|
this.getpayTypeList() |
|
|
|
} |
|
|
|
}, |
|
|
|
// 打开修改 |
|
|
|
handleUpdate() { |
|
|
|
if (this.sids.length === 1) { |
|
|
|
this.visible = false |
|
|
|
this.$refs['divadd'].showEdit(this.sids[0]) |
|
|
|
} else if (this.sids.length > 1) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '不能选中多个信息修改!!', |
|
|
|
type: 'warning', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
return |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 支付方式 purchaseType |
|
|
|
getpayTypeList() { |
|
|
|
dictType({ |
|
|
|
type: 'purchaseType', |
|
|
|
}).then((response) => { |
|
|
|
if (response.code === '200' && response.data) { |
|
|
|
this.payTypeList = response.data |
|
|
|
|
|
|
|
this.getpaySaleList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 提车方式 saleType |
|
|
|
getpaySaleList() { |
|
|
|
dictType({ |
|
|
|
type: 'saleType' |
|
|
|
}).then((response) => { |
|
|
|
if (response.code === '200' && response.data) { |
|
|
|
this.saleTypeList = response.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 查询列表信息 |
|
|
|
getList() { |
|
|
|
this.listLoading = true |
|
|
|
getPageList(this.listQuery).then((response) => { |
|
|
|
this.listLoading = false |
|
|
|
if ( |
|
|
|
response.code === '200' && |
|
|
|
response.data && |
|
|
|
response.data.total > 0 |
|
|
|
) { |
|
|
|
this.list = response.data.records |
|
|
|
this.total = response.data.total |
|
|
|
this.getHuoquyonghu() |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择信息!!', |
|
|
|
type: 'warning', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
return |
|
|
|
this.list = [] |
|
|
|
this.total = 0 |
|
|
|
} |
|
|
|
}, |
|
|
|
// ----------功能打开结束-------- |
|
|
|
// ----------功能打开下一级页面开始-------- |
|
|
|
noClickclose() { |
|
|
|
this.xiaodaijinrongfanganInfoShow = false |
|
|
|
this.hetongdanganguanliAddShow = false |
|
|
|
this.viewState = 1 |
|
|
|
}, |
|
|
|
|
|
|
|
// 打开消贷业务详情 |
|
|
|
handleCheckxiaodai() { |
|
|
|
this.viewState = false |
|
|
|
this.xiaodaijinrongfanganInfoShow = true |
|
|
|
this.hetongdanganguanliAddShow = false |
|
|
|
}, |
|
|
|
// ----------功能打开下一级页面结束-------- |
|
|
|
// 重置 |
|
|
|
handleReset() { |
|
|
|
this.listQuery.params.customerName = '' |
|
|
|
this.listQuery.params.modelName = '' |
|
|
|
this.listQuery.params.orgName = '' |
|
|
|
this.listQuery.params.payType = '' |
|
|
|
this.listQuery.params.saleType = '' |
|
|
|
this.listQuery.params.staffName = '' |
|
|
|
this.listQuery.params.createDateEnd = '' |
|
|
|
this.listQuery.params.createDateStart = '' |
|
|
|
// // this.getList() |
|
|
|
}, |
|
|
|
// 返回 |
|
|
|
handleReturn() { |
|
|
|
this.$router.go(-1) |
|
|
|
}, |
|
|
|
// 序号 |
|
|
|
indexMethod(index) { |
|
|
|
var pagestart = (this.listQuery.current - 1) * this.listQuery.size |
|
|
|
var pageindex = index + 1 + pagestart |
|
|
|
return pageindex |
|
|
|
}, |
|
|
|
// 部门 treedata |
|
|
|
getOrgList() { |
|
|
|
getListOrg().then((response) => { |
|
|
|
if (response.code === '200' && response.data) { |
|
|
|
this.treedata = response.data[0].children |
|
|
|
this.getpayTypeList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 支付方式 purchaseType |
|
|
|
getpayTypeList() { |
|
|
|
dictType({ |
|
|
|
type: 'purchaseType', |
|
|
|
}).then((response) => { |
|
|
|
if (response.code === '200' && response.data) { |
|
|
|
this.payTypeList = response.data |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
this.getpaySaleList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 提车方式 saleType |
|
|
|
getpaySaleList() { |
|
|
|
dictType({ |
|
|
|
type: 'saleType', |
|
|
|
}).then((response) => { |
|
|
|
if (response.code === '200' && response.data) { |
|
|
|
this.saleTypeList = response.data |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 查询列表信息 |
|
|
|
getList() { |
|
|
|
this.listLoading = true |
|
|
|
getPageList(this.listQuery).then((response) => { |
|
|
|
this.listLoading = false |
|
|
|
if ( |
|
|
|
response.code === '200' && |
|
|
|
response.data && |
|
|
|
response.data.total > 0 |
|
|
|
) { |
|
|
|
this.list = response.data.records |
|
|
|
this.total = response.data.total |
|
|
|
this.getHuoquyonghu() |
|
|
|
} else { |
|
|
|
this.list = [] |
|
|
|
this.total = 0 |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
handleCheckChange(data, checked, node) { |
|
|
|
this.listQuery.params.orgName = data.name |
|
|
|
}, |
|
|
|
// 查询按钮 |
|
|
|
handleFilter() { |
|
|
|
this.listQuery.current = 1 |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
|
|
|
|
handleCheckChange(data, checked, node) { |
|
|
|
this.listQuery.params.orgName = data.name |
|
|
|
}, |
|
|
|
// 查询按钮 |
|
|
|
handleFilter() { |
|
|
|
this.listQuery.current = 1 |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
// 勾选 |
|
|
|
handleSelectionChange(row) { |
|
|
|
const aa = [] |
|
|
|
row.forEach((element) => { |
|
|
|
aa.push(element.sid) |
|
|
|
console.log(element.sid) |
|
|
|
// setuser(this.sids) |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
const bb = [] |
|
|
|
row.forEach((element) => { |
|
|
|
bb.push(element.nodeState) |
|
|
|
console.log(element.nodeState) |
|
|
|
if (element.nodeState !== '') { |
|
|
|
this.isableSub = true |
|
|
|
} else if (element.nodeState == '') { |
|
|
|
this.isableSub = false |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 获取用户信息 |
|
|
|
getHuoquyonghu() { |
|
|
|
var token = getStorage() |
|
|
|
loginDetails(token).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.userSid = response.data.sid |
|
|
|
this.getOrgList() |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 勾选 |
|
|
|
handleSelectionChange(row) { |
|
|
|
const aa = [] |
|
|
|
row.forEach((element) => { |
|
|
|
aa.push(element.sid) |
|
|
|
console.log(element.sid) |
|
|
|
// setuser(this.sids) |
|
|
|
// 提交审核 |
|
|
|
handleSubmit() { |
|
|
|
if (this.sids.length == 1) { |
|
|
|
this.$confirm('是否确定提交该业务', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.submitDto.businessSid = this.sids[0] |
|
|
|
submitSales(this.submitDto).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.updateDto.nodeState = response.data.nodeState |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '添加成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
// 更新审批 状态 |
|
|
|
this.updateDto.sid = this.sids[0] |
|
|
|
updateSales(this.updateDto).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '更新成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
this.getList() |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '更新失败', |
|
|
|
message: response.msg, |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '添加失败', |
|
|
|
message: response.msg, |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.sids = aa |
|
|
|
const bb = [] |
|
|
|
row.forEach((element) => { |
|
|
|
bb.push(element.nodeState) |
|
|
|
console.log(element.nodeState) |
|
|
|
if (element.nodeState !==''){ |
|
|
|
this.isableSub = true |
|
|
|
}else if (element.nodeState ==''){ |
|
|
|
this.isableSub = false |
|
|
|
} |
|
|
|
} else if (this.sids.length == 0) { |
|
|
|
this.$notify({ |
|
|
|
title: '您还未选择,请选择数据!!!', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
|
|
|
|
}, |
|
|
|
// 获取用户信息 |
|
|
|
getHuoquyonghu() { |
|
|
|
var token = getStorage() |
|
|
|
loginDetails(token).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.userSid = response.data.sid |
|
|
|
this.getOrgList() |
|
|
|
} |
|
|
|
} else if (this.sids.length > 1) { |
|
|
|
this.$notify({ |
|
|
|
title: '您选择的数据过多,请选择一条数据编辑!!', |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 提交审核 |
|
|
|
handleSubmit() { |
|
|
|
if (this.sids.length == 1) { |
|
|
|
this.$confirm('是否确定提交该业务', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}).then(() => { |
|
|
|
this.submitDto.businessSid = this.sids[0] |
|
|
|
submitSales(this.submitDto).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.updateDto.nodeState = response.data.nodeState |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '添加成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
// 更新审批 状态 |
|
|
|
this.updateDto.sid = this.sids[0] |
|
|
|
updateSales(this.updateDto).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '更新成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
this.getList() |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '更新失败', |
|
|
|
message: response.msg, |
|
|
|
type: 'error', |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '添加失败', |
|
|
|
message: response.msg, |
|
|
|
type: 'error', |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}) |
|
|
|
} else if (this.sids.length == 0) { |
|
|
|
} |
|
|
|
}, |
|
|
|
// 提交 |
|
|
|
// submitOrder() { |
|
|
|
// submitOrder(this.userSid, this.sids.join(',')).then((response) => { |
|
|
|
// if (response.code === '200') { |
|
|
|
// this.$notify({ |
|
|
|
// title: '提示', |
|
|
|
// message: '删除成功', |
|
|
|
// type: 'success', |
|
|
|
// duration: 2000, |
|
|
|
// }) |
|
|
|
// this.getList() |
|
|
|
// } else { |
|
|
|
// this.$notify({ |
|
|
|
// title: '删除失败', |
|
|
|
// message: response.msg, |
|
|
|
// type: 'error', |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
// 根据本行ID删除数据 |
|
|
|
handleDelete() { |
|
|
|
if (this.sids.length === 0) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择!!', |
|
|
|
type: 'warning', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
deleteByids(this.sids.join(',')).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.$notify({ |
|
|
|
title: '您还未选择,请选择数据!!!', |
|
|
|
type: 'error', |
|
|
|
title: '提示', |
|
|
|
message: '删除成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000 |
|
|
|
}) |
|
|
|
} else if (this.sids.length > 1) { |
|
|
|
this.getList() |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '您选择的数据过多,请选择一条数据编辑!!', |
|
|
|
type: 'error', |
|
|
|
title: '删除失败', |
|
|
|
message: response.msg, |
|
|
|
type: 'error' |
|
|
|
}) |
|
|
|
} |
|
|
|
}, |
|
|
|
// 提交 |
|
|
|
// submitOrder() { |
|
|
|
// submitOrder(this.userSid, this.sids.join(',')).then((response) => { |
|
|
|
// if (response.code === '200') { |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 导出 |
|
|
|
handleDaoChu(row) { |
|
|
|
this.$confirm('确定要导出数据, 是否继续?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning' |
|
|
|
}) |
|
|
|
// .then(() => { |
|
|
|
// const tempData = Object.assign({}, row) // copy obj |
|
|
|
// // console.log('测试删除ID' + JSON.stringify(tempData.id)) |
|
|
|
// delServiceType(tempData.id).then(response => { |
|
|
|
// if (response.code === 20000) { |
|
|
|
// // console.log('测试删除' + JSON.stringify(response)) |
|
|
|
// this.$notify({ |
|
|
|
// title: '提示', |
|
|
|
// message: '删除成功', |
|
|
|
// message: '导出成功', |
|
|
|
// type: 'success', |
|
|
|
// duration: 2000, |
|
|
|
// duration: 2000 |
|
|
|
// }) |
|
|
|
// this.getList() |
|
|
|
// } else { |
|
|
|
// this.$notify({ |
|
|
|
// title: '删除失败', |
|
|
|
// title: '失败', |
|
|
|
// message: response.msg, |
|
|
|
// type: 'error', |
|
|
|
// type: 'error' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }, |
|
|
|
// 根据本行ID删除数据 |
|
|
|
handleDelete() { |
|
|
|
if (this.sids.length === 0) { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '没有选择!!', |
|
|
|
type: 'warning', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
return |
|
|
|
} |
|
|
|
deleteByids(this.sids.join(',')).then((response) => { |
|
|
|
if (response.code === '200') { |
|
|
|
this.$notify({ |
|
|
|
title: '提示', |
|
|
|
message: '删除成功', |
|
|
|
type: 'success', |
|
|
|
duration: 2000, |
|
|
|
}) |
|
|
|
this.getList() |
|
|
|
} else { |
|
|
|
this.$notify({ |
|
|
|
title: '删除失败', |
|
|
|
message: response.msg, |
|
|
|
type: 'error', |
|
|
|
}) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
// 导出 |
|
|
|
handleDaoChu(row) { |
|
|
|
this.$confirm('确定要导出数据, 是否继续?', '提示', { |
|
|
|
confirmButtonText: '确定', |
|
|
|
cancelButtonText: '取消', |
|
|
|
type: 'warning', |
|
|
|
}) |
|
|
|
// .then(() => { |
|
|
|
// const tempData = Object.assign({}, row) // copy obj |
|
|
|
// // console.log('测试删除ID' + JSON.stringify(tempData.id)) |
|
|
|
// delServiceType(tempData.id).then(response => { |
|
|
|
// if (response.code === 20000) { |
|
|
|
// // console.log('测试删除' + JSON.stringify(response)) |
|
|
|
// this.$notify({ |
|
|
|
// title: '提示', |
|
|
|
// message: '导出成功', |
|
|
|
// type: 'success', |
|
|
|
// duration: 2000 |
|
|
|
// }) |
|
|
|
// this.getList() |
|
|
|
// } else { |
|
|
|
// this.$notify({ |
|
|
|
// title: '失败', |
|
|
|
// message: response.msg, |
|
|
|
// type: 'error' |
|
|
|
// }) |
|
|
|
// } |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// .catch(() => { |
|
|
|
// this.$message({ |
|
|
|
// type: 'info', |
|
|
|
// message: '已取消' |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 添加修改返回 |
|
|
|
AddUpdateReturn() { |
|
|
|
this.visible = true |
|
|
|
}, |
|
|
|
// 添加保存完成 |
|
|
|
dataCreated() { |
|
|
|
this.visible = true |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
// 修改保存完成 |
|
|
|
dataUpdated() { |
|
|
|
this.visible = true |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
// }) |
|
|
|
// .catch(() => { |
|
|
|
// this.$message({ |
|
|
|
// type: 'info', |
|
|
|
// message: '已取消' |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
}, |
|
|
|
// 添加修改返回 |
|
|
|
AddUpdateReturn() { |
|
|
|
this.visible = true |
|
|
|
}, |
|
|
|
// 添加保存完成 |
|
|
|
dataCreated() { |
|
|
|
this.visible = true |
|
|
|
this.getList() |
|
|
|
}, |
|
|
|
// 修改保存完成 |
|
|
|
dataUpdated() { |
|
|
|
this.visible = true |
|
|
|
this.getList() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
</script> |
|
|
|
<style scoped> |
|
|
|
.filter-item { |
|
|
|
padding: 0 10px; |
|
|
|
width: 220px; |
|
|
|
display: inline-block; |
|
|
|
} |
|
|
|
.filter-item { |
|
|
|
padding: 0 10px; |
|
|
|
width: 220px; |
|
|
|
display: inline-block; |
|
|
|
} |
|
|
|
|
|
|
|
/* .filter-item-time { |
|
|
|
padding: 0 10px; |
|
|
|
width: 300px; |
|
|
|
display: inline-block; |
|
|
|
} */ |
|
|
|
/* .listcon{height: calc(100vh - 550px);overflow-y: auto;overflow-x: hidden;} */ |
|
|
|
/* .filter-item-time { |
|
|
|
padding: 0 10px; |
|
|
|
width: 300px; |
|
|
|
display: inline-block; |
|
|
|
} */ |
|
|
|
/* .listcon{height: calc(100vh - 550px);overflow-y: auto;overflow-x: hidden;} */ |
|
|
|
</style> |
|
|
|