4 changed files with 552 additions and 0 deletions
@ -0,0 +1,54 @@ |
|||
import request from '@/utils/request' |
|||
|
|||
// 盖章申请管理分页列表
|
|||
export function listPage(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/bussealapply/listPage', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 盖章申请管理保存(新增、编辑)
|
|||
export function save(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/bussealapply/save', |
|||
method: 'post', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 盖章申请管理分页列表删除
|
|||
export function delBySids(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/bussealapply/delBySids', |
|||
method: 'DELETE', |
|||
data: data, |
|||
headers: { |
|||
'Content-Type': 'application/json' |
|||
} |
|||
}) |
|||
} |
|||
|
|||
// 盖章申请管理根据Sid获取一条记录
|
|||
export function fetchDetailsBySid(data) { |
|||
return request({ |
|||
url: '/buscenter/v1/bussealapply/fetchDetailsBySid/' + data, |
|||
method: 'get' |
|||
}) |
|||
} |
|||
|
|||
// 数据字典
|
|||
export function dataDictionary(data) { |
|||
return request({ |
|||
url: '/portal/v1/dictcommons/typeValues', |
|||
method: 'get', |
|||
params: data |
|||
}) |
|||
} |
@ -0,0 +1,234 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div v-show="viewState == 1"> |
|||
<div class="tab-header webtop"> |
|||
<div>公司开票申请管理</div> |
|||
<div> |
|||
<el-button type="info" size="small" @click="handleReturn()">关闭</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="webcon"> |
|||
<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-row> |
|||
<el-form-item label="合同编号:" class="searchlist"> |
|||
<el-input v-model="listQuery.params.fileNameOrSealReason" placeholder="" clearable style="width: 150px"/> |
|||
</el-form-item> |
|||
<el-form-item label="客户名称:" class="searchlist"> |
|||
<el-input v-model="listQuery.params.fileNameOrSealReason" placeholder="" clearable style="width: 150px"/> |
|||
</el-form-item> |
|||
<el-form-item label="开票类型:" class="searchlist"> |
|||
<el-input v-model="listQuery.params.fileNameOrSealReason" placeholder="" clearable style="width: 150px"/> |
|||
</el-form-item> |
|||
<el-form-item label="开票名称:" class="searchlist"> |
|||
<el-input v-model="listQuery.params.fileNameOrSealReason" placeholder="" clearable style="width: 150px"/> |
|||
</el-form-item> |
|||
</el-row> |
|||
<el-row> |
|||
<el-form-item label="申请日期:" class="searchlist"> |
|||
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.sealStartDate" clearable style="width: 160px" type="date" placeholder="开始日期"/> |
|||
<div class="line">至</div> |
|||
<el-date-picker value-format="yyyy-MM-dd" v-model="listQuery.params.sealEndDate" clearable style="width: 160px" type="date" placeholder="结束日期"/> |
|||
</el-form-item> |
|||
<el-form-item label="申请人:" class="searchlist"> |
|||
<el-input v-model="listQuery.params.fileNameOrSealReason" placeholder="" clearable style="width: 150px"/> |
|||
</el-form-item> |
|||
<el-form-item label="开票状态:" class="searchlist"> |
|||
<el-input v-model="listQuery.params.fileNameOrSealReason" placeholder="" clearable style="width: 150px"/> |
|||
</el-form-item> |
|||
</el-row> |
|||
<div class="searchbtns"> |
|||
<el-button type="primary" @click="handleFilter">查询</el-button> |
|||
<el-button type="primary" @click="handReset">重置</el-button> |
|||
</div> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<div> |
|||
<div class="listtop"> |
|||
<div class="tit">公司开票申请列表</div> |
|||
<pageye v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
<div class=""> |
|||
<el-table :key="tableKey" v-loading="listLoading" :data="list" border style="width: 100%"> |
|||
<el-table-column width="80px" label="序号" type="index" :index="indexMethod" align="center"/> |
|||
<el-table-column label="操作" align="center"> |
|||
<template slot-scope="scope"> |
|||
<el-button type="primary" size="small" @click="handUpdate(scope.row)">办理</el-button> |
|||
<el-button type="primary" size="small" @click="handLook(scope.row)">查看</el-button> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="状态" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.nodeState }}</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-column label="客户名称" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.sealDate }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="数量" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.sealTypeValue }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="开票总金额" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.fileNameOrSealReason }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="开票状态" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.fileNameOrSealReason }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="申请人" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.fileNameOrSealReason }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="申请日期" align="center"> |
|||
<template slot-scope="scope"> |
|||
<span>{{ scope.row.fileNameOrSealReason }}</span> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
</div> |
|||
<div class="pages"> |
|||
<!-- 翻页 --> |
|||
<pagination v-show="list.length > 0" :total="listQuery.total" :page.sync="listQuery.current" :limit.sync="listQuery.size" class="pagination" @pagination="getList"/> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
</div> |
|||
<zhengchangkaipiaoAdd v-show="viewState == 2" ref="divAdd" @doback="resetState"/> |
|||
<zhengchangkaipiaoInfo v-show="viewState == 3" ref="divInfo" @doback="resetState"/> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import { listPage } from '@/api/zhengchangkaipiao/openTicket.js' |
|||
import Pagination from '@/components/pagination' |
|||
import pageye from '@/components/pagination/pageye' |
|||
import zhengchangkaipiaoAdd from './zhengchangkaipiaoAdd' |
|||
import zhengchangkaipiaoInfo from './zhengchangkaipiaoInfo.vue' |
|||
|
|||
export default { |
|||
name: 'zhengchangkaipiaoguanli', |
|||
components: { |
|||
Pagination, |
|||
pageye, |
|||
zhengchangkaipiaoAdd, |
|||
zhengchangkaipiaoInfo |
|||
}, |
|||
data() { |
|||
return { |
|||
isSearchShow: false, |
|||
searchxianshitit: '隐藏查询条件', |
|||
viewState: 1, |
|||
tableKey: 0, |
|||
list: [], |
|||
listLoading: false, |
|||
listQuery: { |
|||
current: 1, |
|||
size: 10, |
|||
params: { |
|||
fileNameOrSealReason: '', |
|||
sealStartDate: '', |
|||
sealEndDate: '', |
|||
userSid: window.sessionStorage.getItem('staffSid') |
|||
}, |
|||
total: 0 |
|||
} |
|||
} |
|||
}, |
|||
created() { |
|||
this.getList() |
|||
}, |
|||
methods: { |
|||
// 搜索条件效果 |
|||
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 |
|||
}, |
|||
// 查询列表信息 |
|||
getList() { |
|||
this.listLoading = true |
|||
listPage(this.listQuery).then((response) => { |
|||
this.listLoading = false |
|||
if (response.code === '200') { |
|||
this.listQuery.total = response.data.total |
|||
this.list = response.data.records |
|||
} |
|||
}) |
|||
}, |
|||
// 查询按钮 |
|||
handleFilter() { |
|||
this.getList() |
|||
}, |
|||
handReset() { |
|||
this.listQuery = { |
|||
current: 1, |
|||
size: 10, |
|||
params: { |
|||
fileNameOrSealReason: '', |
|||
sealStartDate: '', |
|||
sealEndDate: '', |
|||
userSid: window.sessionStorage.getItem('staffSid') |
|||
}, |
|||
total: 0 |
|||
} |
|||
this.getList() |
|||
}, |
|||
handUpdate(row) { |
|||
this.viewState = 2 |
|||
this.$refs['divAdd'].showEdit(row) |
|||
}, |
|||
handlook(row) { |
|||
this.viewState = 3 |
|||
this.$refs['divInfo'].showInfo(row) |
|||
}, |
|||
resetState() { |
|||
this.viewState = 1 |
|||
this.handReset() |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
<style scoped> |
|||
.listtop { |
|||
display: flex; |
|||
justify-content: space-between; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.tit { |
|||
margin-bottom: -10px; |
|||
} |
|||
.pagination { |
|||
margin-bottom: -10px; |
|||
} |
|||
.line { |
|||
display: inline-block; |
|||
margin: 0px 15px; |
|||
} |
|||
</style> |
@ -0,0 +1,264 @@ |
|||
<template> |
|||
<div class="app-container"> |
|||
<div> |
|||
<div class="tab-header webtop"> |
|||
<div>{{ viewTitle }}</div> |
|||
<div> |
|||
<el-button type="primary" size="small" :disabled="submitdisabled" @click="saveEdit()">保存 |
|||
</el-button> |
|||
<el-button type="primary" size="small" @click="submitVehicleApply()">提交 |
|||
</el-button> |
|||
<el-button type="info" size="small" @click="handleReturn()">返回</el-button> |
|||
</div> |
|||
</div> |
|||
<div class="listconadd"> |
|||
<div class="wlInfo"><span>公司申请入账单</span></div> |
|||
<el-form ref="form_obj" :model="formobj" :rules="rules" label-position="top"> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="合同编号:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.modelName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="申请日期:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.configName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row class="linetwo"> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="客户名称:"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.configName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<div class="tableStyle"> |
|||
<div style="margin-left: 5px;font-weight: bold">开票信息</div> |
|||
<div> |
|||
<span>单台开票金额:<el-input v-model="formobj.configName" placeholder="" clearable></el-input></span> |
|||
</div> |
|||
</div> |
|||
<el-table :key="tableKey" :data="formobj.vehicleList" :index="index" border style="width: 100%"> |
|||
<el-table-column fixed width="80px" label="序号" type="index" :index="index + 1" align="center"/> |
|||
<el-table-column label="车架号" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="开票类型" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="开票名称" align="left" header-align="center"> |
|||
<template slot-scope="scope" prop="vehicleName"> |
|||
<el-input v-model="scope.row.vinNo" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
<el-table-column label="备注" header-align="center"> |
|||
<template slot-scope="scope" prop="remarks"> |
|||
<el-input v-model="scope.row.remarks" placeholder="" class="addinputw" clearable/> |
|||
</template> |
|||
</el-table-column> |
|||
</el-table> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="开票金额合计"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.configName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.configName" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
<el-row> |
|||
<el-col :span="3" class="el-form-item-right"> |
|||
<el-form-item label="备注"></el-form-item> |
|||
</el-col> |
|||
<el-col :span="21"> |
|||
<el-form-item> |
|||
<el-input v-model="formobj.remarks" readonly/> |
|||
</el-form-item> |
|||
</el-col> |
|||
</el-row> |
|||
</el-form> |
|||
</div> |
|||
</div> |
|||
<!--End 添加修改部分--> |
|||
</div> |
|||
</template> |
|||
|
|||
<script> |
|||
import req from '@/api/ruzhang/scmapplyinbound' |
|||
export default { |
|||
name: 'zhengchangkaipiaoAdd', |
|||
data() { |
|||
return { |
|||
viewTitle: '', |
|||
index: 0, |
|||
tableKey: 0, |
|||
// 表单数据 |
|||
formobj: { |
|||
sid: '', // 一条数据的sid |
|||
applicationSid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
userSid: window.sessionStorage.getItem('userSid'), // 用户人sid |
|||
applicationName: window.sessionStorage.getItem('name'), // 申请人 |
|||
applicationCode: '', // 申请编号 |
|||
configName: '', |
|||
departureDate: '', |
|||
modelName: '', |
|||
modelSid: '', |
|||
purchaseOrderNo: '', |
|||
remarks: '', // 备注 |
|||
vehicleOrderSid: '', |
|||
vehicleList: [] |
|||
}, |
|||
rules: {}, |
|||
submitdisabled: false |
|||
} |
|||
}, |
|||
methods: { |
|||
showEdit(sid, row) { |
|||
this.$nextTick(() => { |
|||
this.$refs['form_obj'].clearValidate() |
|||
}) |
|||
this.viewTitle = '【编辑】入账单' |
|||
console.log('编辑回显', sid, row) |
|||
req.fetchBySid(sid).then((resp) => { |
|||
const data = resp.data |
|||
this.formobj.applicationCode = data.applicationCode |
|||
this.formobj.remarks = data.remarks |
|||
this.formobj.sid = sid |
|||
this.formobj.configName = data.configName |
|||
this.formobj.departureDate = data.departureDate |
|||
this.formobj.modelName = data.modelName |
|||
this.formobj.modelSid = data.modelSid |
|||
this.formobj.purchaseOrderNo = data.purchaseOrderNo |
|||
this.formobj.vehicleOrderSid = data.vehicleOrderSid |
|||
if (data.inboundVehicleList.length > 0) { |
|||
data.inboundVehicleList.forEach((e) => { |
|||
this.formobj.vehicleList.push({ |
|||
applySid: e.applySid, |
|||
remarks: e.remarks, |
|||
modelSid: e.modelSid, |
|||
sid: e.sid, |
|||
vinNo: e.vinNo |
|||
}) |
|||
}) |
|||
} else { |
|||
for (var i = 0; i < row[0].vehicleNum; i++) { |
|||
this.formobj.vehicleList.push({ |
|||
applySid: '', |
|||
remarks: '', |
|||
modelSid: this.formobj.modelSid, |
|||
sid: '', |
|||
vinNo: '' |
|||
}) |
|||
} |
|||
} |
|||
}).catch((e) => { |
|||
this.formobj = row |
|||
}) |
|||
}, |
|||
saveEdit() { |
|||
console.log(this.formobj, 636363) |
|||
this.$refs['form_obj'].validate((valid) => { |
|||
if (valid) { |
|||
this.submitdisabled = true |
|||
req.saveOrUpdate(this.formobj).then((resp) => { |
|||
this.submitdisabled = false |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: resp.msg |
|||
}) |
|||
this.handleReturn('true') |
|||
}).catch(() => { |
|||
this.submitdisabled = false |
|||
}) |
|||
} else { |
|||
return false |
|||
} |
|||
}) |
|||
}, |
|||
submitVehicleApply() { |
|||
req.submitVehicleApply(this.formobj).then((res) => { |
|||
console.log(res.code, res.success) |
|||
if (res.code === '200' && res.success) { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'success', |
|||
message: '提交成功' |
|||
}) |
|||
this.handleReturn('true') |
|||
} else { |
|||
this.$message({ |
|||
showClose: true, |
|||
type: 'error', |
|||
message: '提交失败' |
|||
}) |
|||
} |
|||
}) |
|||
}, |
|||
// 返回(===既判断又赋值) |
|||
handleReturn(isreload) { |
|||
if (isreload === 'true') this.$emit('reloadlist') |
|||
this.formobj.departureDate = '' |
|||
this.formobj.remarks = '' // 备注 |
|||
this.formobj.vehicleList = [] |
|||
this.$refs['form_obj'].resetFields() |
|||
this.$emit('doback') |
|||
} |
|||
} |
|||
} |
|||
</script> |
|||
|
|||
<style scoped> |
|||
.wlInfo { |
|||
text-align: center; |
|||
font-size: 28px; |
|||
line-height: 90px; |
|||
} |
|||
.linetwo { |
|||
margin-top: 10px; |
|||
} |
|||
.linetwo .el-form-item { |
|||
margin-bottom: 0px !important; |
|||
} |
|||
.linetwo >>> .el-input__inner { |
|||
border: 0; |
|||
} |
|||
.tableStyle { |
|||
background-color: #FFFFFF; |
|||
display: flex; |
|||
justify-content: start; |
|||
align-items: center; |
|||
border: 1px solid #dfe4ed; |
|||
height: 40px; |
|||
} |
|||
.el-form-item-right { |
|||
text-align: right; |
|||
} |
|||
</style> |
Loading…
Reference in new issue