调整路径
This commit is contained in:
parent
627b4361f1
commit
78bdbea59a
running/file
ruoyi-admin/src/main/java/com/ruoyi/web/controller/custom
ruoyi-custom/src/main/java/com/ruoyi/custom
ruoyi-ui/src
BIN
running/file/1603673251084.pdf
Normal file
BIN
running/file/1603673251084.pdf
Normal file
Binary file not shown.
BIN
running/file/1603933440270.pdf
Normal file
BIN
running/file/1603933440270.pdf
Normal file
Binary file not shown.
@ -96,7 +96,7 @@ public class SysContractController extends BaseController {
|
||||
public AjaxResult getfile(@PathVariable long id) {
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
SysContract contract = sysContractService.selectSysContractById(id);
|
||||
if (contract.getStatus() == 1) {
|
||||
if (contract.getStatus().equals("yes")) {
|
||||
ajax.put("url", contract.getPath());
|
||||
} else {
|
||||
Map<String, String> data = new HashMap<>();
|
||||
@ -114,11 +114,11 @@ public class SysContractController extends BaseController {
|
||||
*/
|
||||
@PostMapping("/sign")
|
||||
public AjaxResult signContract(@RequestBody SysContract sysContract) {
|
||||
sysContract.setStatus(1);
|
||||
String path = "/file/" + sysContract.getId() + ".pdf";
|
||||
sysContract.setPath(path);
|
||||
PdfProcessInfo result = sysContractService.signContract(sysContract);
|
||||
if (result.getCode() == 1) {
|
||||
sysContract.setStatus("yes");
|
||||
sysContractService.updateSysContract(sysContract);
|
||||
AjaxResult ajax = AjaxResult.success();
|
||||
ajax.put("url", path);
|
||||
|
@ -70,7 +70,7 @@ public class SysContract extends BaseEntity {
|
||||
* 合同状态
|
||||
* 0-未签订;1-已签订
|
||||
*/
|
||||
private int Status;
|
||||
private String Status;
|
||||
|
||||
public Long getId() {
|
||||
return id;
|
||||
@ -128,11 +128,11 @@ public class SysContract extends BaseEntity {
|
||||
this.path = path;
|
||||
}
|
||||
|
||||
public int getStatus() {
|
||||
public String getStatus() {
|
||||
return Status;
|
||||
}
|
||||
|
||||
public void setStatus(int status) {
|
||||
public void setStatus(String status) {
|
||||
Status = status;
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,8 @@ public class SysContractServiceImpl implements ISysContractService {
|
||||
public int insertSysContract(SysContract sysContract) {
|
||||
sysContract.setId(DateUtils.getNowDate().getTime());
|
||||
sysContract.setCreateTime(DateUtils.getNowDate());
|
||||
sysContract.setPath("/file/contract/" + sysContract.getId());
|
||||
sysContract.setStatus("no");
|
||||
sysContract.setPath("/f/contract/" + sysContract.getId());
|
||||
return sysContractMapper.insertSysContract(sysContract);
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ router.beforeEach((to, from, next) => {
|
||||
}
|
||||
} else {
|
||||
// 没有token
|
||||
if (whiteList.indexOf(to.path) !== -1 || to.path.startsWith('/file')) {
|
||||
if (whiteList.indexOf(to.path) !== -1 || to.path.startsWith('/f/contract/')) {
|
||||
// 在免登录白名单,直接进入
|
||||
next()
|
||||
} else {
|
||||
|
@ -125,7 +125,7 @@ export const constantRoutes = [
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/file/contract/:id(\\d+)',
|
||||
path: '/f/contract/:id(\\d+)',
|
||||
hidden: true,
|
||||
component: (resolve) => require(['@/views/custom/signContract'], resolve),
|
||||
meta: { title: '合同' }
|
||||
|
@ -28,6 +28,16 @@
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="合同状态" prop="status">
|
||||
<el-select v-model="queryParams.status" placeholder="请选择合同状态">
|
||||
<el-option
|
||||
v-for="dict in signStatusOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictLabel"
|
||||
:value="dict.dictValue"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="cyan" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
|
||||
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
|
||||
@ -80,20 +90,21 @@
|
||||
<el-table v-loading="loading" :data="contractList" @selection-change="handleSelectionChange">
|
||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
||||
<el-table-column label="合同编号" align="center" prop="id"/>
|
||||
<el-table-column label="合同状态" align="center" prop="status">
|
||||
<el-table-column label="合同状态" align="center" prop="status" width="80">
|
||||
<template slot-scope="scope">
|
||||
<el-tag
|
||||
:type="scope.row.status ? 'success' : 'danger'"
|
||||
:type="scope.row.status === 'yes' ? 'success' : 'danger'"
|
||||
disable-transitions>
|
||||
{{scope.row.status ? '已签订':'未签订'}}
|
||||
{{scope.row.status === 'yes' ? '已签订':'未签订'}}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="客户姓名" align="center" prop="name"/>
|
||||
<el-table-column label="证件号" align="center" prop="cusId"/>
|
||||
<el-table-column label="电话" align="center" prop="phone"/>
|
||||
<el-table-column label="服务时间" align="center" prop="serveTime" :formatter="serveTimeFormat"/>
|
||||
<el-table-column label="证件号" align="center" prop="cusId" width="180"/>
|
||||
<el-table-column label="电话" align="center" prop="phone" width="120"/>
|
||||
<el-table-column label="服务时间" align="center" prop="serveTime" :formatter="serveTimeFormat" width="100"/>
|
||||
<el-table-column label="金额" align="center" prop="amount"/>
|
||||
<el-table-column label="签订时间" align="center" prop="updateTime" width="180"/>
|
||||
<el-table-column label="合同地址" align="center" prop="path">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" icon="el-icon-copy-document" @click="handleCopy(scope.row.path)" class="copyBtn"
|
||||
@ -153,9 +164,6 @@
|
||||
<el-form-item label="金额" prop="amount">
|
||||
<el-input v-model="form.amount" placeholder="请输入金额"/>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="文件路径" prop="path">-->
|
||||
<!-- <el-input v-model="form.path" placeholder="请输入文件路径" />-->
|
||||
<!-- </el-form-item>-->
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容"/>
|
||||
</el-form-item>
|
||||
@ -204,6 +212,8 @@
|
||||
open: false,
|
||||
// 服务时间字典
|
||||
serveTimeOptions: [],
|
||||
// 签约状态字典
|
||||
signStatusOptions: [],
|
||||
//
|
||||
copyValue: '',
|
||||
// 查询参数
|
||||
@ -213,6 +223,7 @@
|
||||
id: null,
|
||||
name: null,
|
||||
phone: null,
|
||||
status: null,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -229,6 +240,9 @@
|
||||
this.getDicts("cus_serve_time").then(response => {
|
||||
this.serveTimeOptions = response.data;
|
||||
});
|
||||
this.getDicts("cus_sign_status").then(response => {
|
||||
this.signStatusOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询合同列表 */
|
||||
@ -244,6 +258,9 @@
|
||||
serveTimeFormat(row, column) {
|
||||
return this.selectDictLabel(this.serveTimeOptions, row.serveTime);
|
||||
},
|
||||
signStatusFormat(row, column) {
|
||||
return this.selectDictLabel(this.signStatusOptions, row.serveTime);
|
||||
},
|
||||
// 取消按钮
|
||||
cancel() {
|
||||
this.open = false;
|
||||
|
@ -207,7 +207,7 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="成交时间" align="center" prop="orderTime" width="160" fixed="left">
|
||||
<el-table-column label="成交时间" align="center" prop="orderTime" width="180" fixed="left">
|
||||
<template slot-scope="scope">
|
||||
<span>{{ parseTime(scope.row.orderTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
|
||||
</template>
|
||||
|
Loading…
x
Reference in New Issue
Block a user