@ -0,0 +1,156 @@ | |||
package org.jeecg.modules.tbOrder.controller; | |||
import java.util.Arrays; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import org.jeecg.common.api.vo.Result; | |||
import org.jeecg.common.system.query.QueryGenerator; | |||
import org.jeecg.modules.tbOrder.entity.TbOrder; | |||
import org.jeecg.modules.tbOrder.service.ITbOrderService; | |||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.jeecg.common.system.base.controller.JeecgController; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import org.springframework.web.servlet.ModelAndView; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.jeecg.common.aspect.annotation.AutoLog; | |||
/** | |||
* @Description: tb_order | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
@Api(tags="tb_order") | |||
@RestController | |||
@RequestMapping("/tbOrder/tbOrder") | |||
@Slf4j | |||
public class TbOrderController extends JeecgController<TbOrder, ITbOrderService> { | |||
@Autowired | |||
private ITbOrderService tbOrderService; | |||
/** | |||
* 分页列表查询 | |||
* | |||
* @param tbOrder | |||
* @param pageNo | |||
* @param pageSize | |||
* @param req | |||
* @return | |||
*/ | |||
//@AutoLog(value = "tb_order-分页列表查询") | |||
@ApiOperation(value="tb_order-分页列表查询", notes="tb_order-分页列表查询") | |||
@GetMapping(value = "/list") | |||
public Result<IPage<TbOrder>> queryPageList(TbOrder tbOrder, | |||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | |||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | |||
HttpServletRequest req) { | |||
QueryWrapper<TbOrder> queryWrapper = QueryGenerator.initQueryWrapper(tbOrder, req.getParameterMap()); | |||
Page<TbOrder> page = new Page<TbOrder>(pageNo, pageSize); | |||
IPage<TbOrder> pageList = tbOrderService.page(page, queryWrapper); | |||
return Result.OK(pageList); | |||
} | |||
/** | |||
* 添加 | |||
* | |||
* @param tbOrder | |||
* @return | |||
*/ | |||
@AutoLog(value = "tb_order-添加") | |||
@ApiOperation(value="tb_order-添加", notes="tb_order-添加") | |||
@PostMapping(value = "/add") | |||
public Result<String> add(@RequestBody TbOrder tbOrder) { | |||
tbOrderService.save(tbOrder); | |||
return Result.OK("添加成功!"); | |||
} | |||
/** | |||
* 编辑 | |||
* | |||
* @param tbOrder | |||
* @return | |||
*/ | |||
@AutoLog(value = "tb_order-编辑") | |||
@ApiOperation(value="tb_order-编辑", notes="tb_order-编辑") | |||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | |||
public Result<String> edit(@RequestBody TbOrder tbOrder) { | |||
tbOrderService.updateById(tbOrder); | |||
return Result.OK("编辑成功!"); | |||
} | |||
/** | |||
* 通过id删除 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
@AutoLog(value = "tb_order-通过id删除") | |||
@ApiOperation(value="tb_order-通过id删除", notes="tb_order-通过id删除") | |||
@DeleteMapping(value = "/delete") | |||
public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |||
tbOrderService.removeById(id); | |||
return Result.OK("删除成功!"); | |||
} | |||
/** | |||
* 批量删除 | |||
* | |||
* @param ids | |||
* @return | |||
*/ | |||
@AutoLog(value = "tb_order-批量删除") | |||
@ApiOperation(value="tb_order-批量删除", notes="tb_order-批量删除") | |||
@DeleteMapping(value = "/deleteBatch") | |||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |||
this.tbOrderService.removeByIds(Arrays.asList(ids.split(","))); | |||
return Result.OK("批量删除成功!"); | |||
} | |||
/** | |||
* 通过id查询 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
//@AutoLog(value = "tb_order-通过id查询") | |||
@ApiOperation(value="tb_order-通过id查询", notes="tb_order-通过id查询") | |||
@GetMapping(value = "/queryById") | |||
public Result<TbOrder> queryById(@RequestParam(name="id",required=true) String id) { | |||
TbOrder tbOrder = tbOrderService.getById(id); | |||
if(tbOrder==null) { | |||
return Result.error("未找到对应数据"); | |||
} | |||
return Result.OK(tbOrder); | |||
} | |||
/** | |||
* 导出excel | |||
* | |||
* @param request | |||
* @param tbOrder | |||
*/ | |||
@RequestMapping(value = "/exportXls") | |||
public ModelAndView exportXls(HttpServletRequest request, TbOrder tbOrder) { | |||
return super.exportXls(request, tbOrder, TbOrder.class, "tb_order"); | |||
} | |||
/** | |||
* 通过excel导入数据 | |||
* | |||
* @param request | |||
* @param response | |||
* @return | |||
*/ | |||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) | |||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | |||
return super.importExcel(request, response, TbOrder.class); | |||
} | |||
} |
@ -0,0 +1,198 @@ | |||
package org.jeecg.modules.tbOrder.entity; | |||
import java.io.Serializable; | |||
import java.io.UnsupportedEncodingException; | |||
import java.util.Date; | |||
import java.math.BigDecimal; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import lombok.Data; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import org.jeecgframework.poi.excel.annotation.Excel; | |||
import org.jeecg.common.aspect.annotation.Dict; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
/** | |||
* @Description: tb_order | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
@Data | |||
@TableName("tb_order") | |||
@Accessors(chain = true) | |||
@EqualsAndHashCode(callSuper = false) | |||
@ApiModel(value="tb_order对象", description="tb_order") | |||
public class TbOrder implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
/**id*/ | |||
@TableId(type = IdType.ASSIGN_ID) | |||
@ApiModelProperty(value = "id") | |||
private java.lang.String id; | |||
/**工人id*/ | |||
@Excel(name = "工人id", width = 15) | |||
@ApiModelProperty(value = "工人id") | |||
private java.lang.String workId; | |||
/**老板id*/ | |||
@Excel(name = "老板id", width = 15) | |||
@ApiModelProperty(value = "老板id") | |||
private java.lang.String bossId; | |||
/**老板名*/ | |||
@Excel(name = "老板名", width = 15) | |||
@ApiModelProperty(value = "老板名") | |||
private java.lang.String userName; | |||
/**工人名*/ | |||
@Excel(name = "工人名", width = 15) | |||
@ApiModelProperty(value = "工人名") | |||
private java.lang.String workName; | |||
/**工作标题*/ | |||
@Excel(name = "工作标题", width = 15) | |||
@ApiModelProperty(value = "工作标题") | |||
private java.lang.String title; | |||
/**公司名称*/ | |||
@Excel(name = "公司名称", width = 15) | |||
@ApiModelProperty(value = "公司名称") | |||
private java.lang.String companyName; | |||
/**工人出发地址*/ | |||
@Excel(name = "工人出发地址", width = 15) | |||
@ApiModelProperty(value = "工人出发地址") | |||
private java.lang.String workerAddress; | |||
/**出行方式 0出租车 1 网约车 2 公交地铁 3无*/ | |||
@Excel(name = "出行方式 0出租车 1 网约车 2 公交地铁 3无", width = 15, dicCode = "travel_type") | |||
@Dict(dicCode = "travel_type") | |||
@ApiModelProperty(value = "出行方式 0出租车 1 网约车 2 公交地铁 3无") | |||
private java.lang.Integer travelType; | |||
/**上班地址*/ | |||
@Excel(name = "上班地址", width = 15) | |||
@ApiModelProperty(value = "上班地址") | |||
private java.lang.String workAddress; | |||
/**上班地址经度*/ | |||
@Excel(name = "上班地址经度", width = 15) | |||
@ApiModelProperty(value = "上班地址经度") | |||
private java.lang.String latitude; | |||
/**上班地址纬度*/ | |||
@Excel(name = "上班地址纬度", width = 15) | |||
@ApiModelProperty(value = "上班地址纬度") | |||
private java.lang.String longitude; | |||
/**行业/工种*/ | |||
@Excel(name = "行业/工种", width = 15) | |||
@ApiModelProperty(value = "行业/工种") | |||
private java.lang.String industryName; | |||
/**行业/工种id*/ | |||
@Excel(name = "行业/工种id", width = 15) | |||
@ApiModelProperty(value = "行业/工种id") | |||
private java.lang.String industryId; | |||
/**工人个人简介*/ | |||
@Excel(name = "工人个人简介", width = 15) | |||
@ApiModelProperty(value = "工人个人简介") | |||
private java.lang.String detail; | |||
/**工作内容*/ | |||
@Excel(name = "工作内容", width = 15) | |||
@ApiModelProperty(value = "工作内容") | |||
private java.lang.String workDetail; | |||
/**图片上传*/ | |||
@Excel(name = "图片上传", width = 15) | |||
@ApiModelProperty(value = "图片上传") | |||
private java.lang.String workPic; | |||
/**工人联系方式*/ | |||
@Excel(name = "工人联系方式", width = 15) | |||
@ApiModelProperty(value = "工人联系方式") | |||
private java.lang.String phone; | |||
/**招聘方联系方式*/ | |||
@Excel(name = "招聘方联系方式", width = 15) | |||
@ApiModelProperty(value = "招聘方联系方式") | |||
private java.lang.String bossPhone; | |||
/**年龄*/ | |||
@Excel(name = "年龄", width = 15) | |||
@ApiModelProperty(value = "年龄") | |||
private java.lang.Integer age; | |||
/**性别*/ | |||
@Excel(name = "性别", width = 15, dicCode = "sex") | |||
@Dict(dicCode = "sex") | |||
@ApiModelProperty(value = "性别") | |||
private java.lang.Integer gender; | |||
/**时间范围*/ | |||
@Excel(name = "时间范围", width = 15) | |||
@ApiModelProperty(value = "时间范围") | |||
private java.util.Date startTime; | |||
/**时间范围*/ | |||
@Excel(name = "时间范围", width = 15) | |||
@ApiModelProperty(value = "时间范围") | |||
private java.util.Date endTime; | |||
/**支付时间*/ | |||
@Excel(name = "支付时间", width = 15) | |||
@ApiModelProperty(value = "支付时间") | |||
private java.util.Date payTime; | |||
/**工作时长*/ | |||
@Excel(name = "工作时长", width = 15) | |||
@ApiModelProperty(value = "工作时长") | |||
private java.lang.String workTime; | |||
/**订单状态 0待聘用 1 已接单 2 进行中 3试工完成 4 企业确认 5已支付 6已完成 7已取消*/ | |||
@Excel(name = "订单状态 0待聘用 1 已接单 2 进行中 3试工完成 4 企业确认 5已支付 6已完成 7已取消", width = 15, dicCode = "order_status") | |||
@Dict(dicCode = "order_status") | |||
@ApiModelProperty(value = "订单状态 0待聘用 1 已接单 2 进行中 3试工完成 4 企业确认 5已支付 6已完成 7已取消") | |||
private java.lang.Integer orderStatus; | |||
/**结算方式 0提前支付 1 试用后支付*/ | |||
@Excel(name = "结算方式 0提前支付 1 试用后支付", width = 15, dicCode = "pay_type") | |||
@Dict(dicCode = "pay_type") | |||
@ApiModelProperty(value = "结算方式 0提前支付 1 试用后支付") | |||
private java.lang.Integer payType; | |||
/**付款金额(元)、*/ | |||
@Excel(name = "付款金额(元)、", width = 15) | |||
@ApiModelProperty(value = "付款金额(元)、") | |||
private java.math.BigDecimal payMoney; | |||
/**支付方式 0微信支付 1 余额支付*/ | |||
@Excel(name = "支付方式 0微信支付 1 余额支付", width = 15, dicCode = "money_type") | |||
@Dict(dicCode = "money_type") | |||
@ApiModelProperty(value = "支付方式 0微信支付 1 余额支付") | |||
private java.lang.Integer moneyType; | |||
/**保险费(元)、*/ | |||
@Excel(name = "保险费(元)、", width = 15) | |||
@ApiModelProperty(value = "保险费(元)、") | |||
private java.math.BigDecimal premium; | |||
/**保险账单id*/ | |||
@Excel(name = "保险账单id", width = 15) | |||
@ApiModelProperty(value = "保险账单id") | |||
private java.lang.String premiumId; | |||
/**交通费用金额(元)、*/ | |||
@Excel(name = "交通费用金额(元)、", width = 15) | |||
@ApiModelProperty(value = "交通费用金额(元)、") | |||
private java.math.BigDecimal travelMoney; | |||
/**试工费用金额(元)、*/ | |||
@Excel(name = "试工费用金额(元)、", width = 15) | |||
@ApiModelProperty(value = "试工费用金额(元)、") | |||
private java.math.BigDecimal workMoney; | |||
/**总金额(元)、*/ | |||
@Excel(name = "总金额(元)、", width = 15) | |||
@ApiModelProperty(value = "总金额(元)、") | |||
private java.math.BigDecimal amount; | |||
/**平台手续费(元)、*/ | |||
@Excel(name = "平台手续费(元)、", width = 15) | |||
@ApiModelProperty(value = "平台手续费(元)、") | |||
private java.math.BigDecimal rateMoney; | |||
/**平台手续费率)、*/ | |||
@Excel(name = "平台手续费率)、", width = 15) | |||
@ApiModelProperty(value = "平台手续费率)、") | |||
private java.math.BigDecimal rate; | |||
/**创建人*/ | |||
@ApiModelProperty(value = "创建人") | |||
private java.lang.String createBy; | |||
/**创建日期*/ | |||
@ApiModelProperty(value = "创建日期") | |||
private java.util.Date createTime; | |||
/**更新人*/ | |||
@ApiModelProperty(value = "更新人") | |||
private java.lang.String updateBy; | |||
/**更新日期*/ | |||
@ApiModelProperty(value = "更新日期") | |||
private java.util.Date updateTime; | |||
/**所属部门*/ | |||
@ApiModelProperty(value = "所属部门") | |||
private java.lang.String sysOrgCode; | |||
} |
@ -0,0 +1,14 @@ | |||
package org.jeecg.modules.tbOrder.mapper; | |||
import org.jeecg.modules.tbOrder.entity.TbOrder; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
/** | |||
* @Description: tb_order | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
public interface TbOrderMapper extends BaseMapper<TbOrder> { | |||
} |
@ -0,0 +1,5 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
<mapper namespace="org.jeecg.modules.tbOrder.mapper.TbOrderMapper"> | |||
</mapper> |
@ -0,0 +1,14 @@ | |||
package org.jeecg.modules.tbOrder.service; | |||
import org.jeecg.modules.tbOrder.entity.TbOrder; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
/** | |||
* @Description: tb_order | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
public interface ITbOrderService extends IService<TbOrder> { | |||
} |
@ -0,0 +1,19 @@ | |||
package org.jeecg.modules.tbOrder.service.impl; | |||
import org.jeecg.modules.tbOrder.entity.TbOrder; | |||
import org.jeecg.modules.tbOrder.mapper.TbOrderMapper; | |||
import org.jeecg.modules.tbOrder.service.ITbOrderService; | |||
import org.springframework.stereotype.Service; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
/** | |||
* @Description: tb_order | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
@Service | |||
public class TbOrderServiceImpl extends ServiceImpl<TbOrderMapper, TbOrder> implements ITbOrderService { | |||
} |
@ -0,0 +1,368 @@ | |||
<template> | |||
<a-card :bordered="false"> | |||
<!-- 查询区域 --> | |||
<div class="table-page-search-wrapper"> | |||
<a-form layout="inline" @keyup.enter.native="searchQuery"> | |||
<a-row :gutter="24"> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="老板名"> | |||
<a-input placeholder="请输入老板名" v-model="queryParam.userName"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="工人名"> | |||
<a-input placeholder="请输入工人名" v-model="queryParam.workName"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<template v-if="toggleSearchStatus"> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="工人联系方式"> | |||
<a-input placeholder="请输入工人联系方式" v-model="queryParam.phone"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="招聘方联系方式"> | |||
<a-input placeholder="请输入招聘方联系方式" v-model="queryParam.bossPhone"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="订单状态 0待聘用 1 已接单 2 进行中 3试工完成 4 企业确认 5已支付 6已完成 7已取消"> | |||
<j-dict-select-tag placeholder="请选择订单状态 0待聘用 1 已接单 2 进行中 3试工完成 4 企业确认 5已支付 6已完成 7已取消" v-model="queryParam.orderStatus" dictCode="order_status"/> | |||
</a-form-item> | |||
</a-col> | |||
</template> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | |||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | |||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | |||
<a @click="handleToggleSearch" style="margin-left: 8px"> | |||
{{ toggleSearchStatus ? '收起' : '展开' }} | |||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |||
</a> | |||
</span> | |||
</a-col> | |||
</a-row> | |||
</a-form> | |||
</div> | |||
<!-- 查询区域-END --> | |||
<!-- 操作按钮区域 --> | |||
<div class="table-operator"> | |||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> | |||
<a-button type="primary" icon="download" @click="handleExportXls('tb_order')">导出</a-button> | |||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | |||
<a-button type="primary" icon="import">导入</a-button> | |||
</a-upload> | |||
<!-- 高级查询区域 --> | |||
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> | |||
<a-dropdown v-if="selectedRowKeys.length > 0"> | |||
<a-menu slot="overlay"> | |||
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | |||
</a-menu> | |||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | |||
</a-dropdown> | |||
</div> | |||
<!-- table区域-begin --> | |||
<div> | |||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | |||
<a style="margin-left: 24px" @click="onClearSelected">清空</a> | |||
</div> | |||
<a-table | |||
ref="table" | |||
size="middle" | |||
:scroll="{x:true}" | |||
bordered | |||
rowKey="id" | |||
:columns="columns" | |||
:dataSource="dataSource" | |||
:pagination="ipagination" | |||
:loading="loading" | |||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |||
class="j-table-force-nowrap" | |||
@change="handleTableChange"> | |||
<template slot="htmlSlot" slot-scope="text"> | |||
<div v-html="text"></div> | |||
</template> | |||
<template slot="imgSlot" slot-scope="text,record"> | |||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |||
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |||
</template> | |||
<template slot="fileSlot" slot-scope="text"> | |||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |||
<a-button | |||
v-else | |||
:ghost="true" | |||
type="primary" | |||
icon="download" | |||
size="small" | |||
@click="downloadFile(text)"> | |||
下载 | |||
</a-button> | |||
</template> | |||
<span slot="action" slot-scope="text, record"> | |||
<a @click="handleEdit(record)">编辑</a> | |||
<a-divider type="vertical" /> | |||
<a-dropdown> | |||
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |||
<a-menu slot="overlay"> | |||
<a-menu-item> | |||
<a @click="handleDetail(record)">详情</a> | |||
</a-menu-item> | |||
<a-menu-item> | |||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |||
<a>删除</a> | |||
</a-popconfirm> | |||
</a-menu-item> | |||
</a-menu> | |||
</a-dropdown> | |||
</span> | |||
</a-table> | |||
</div> | |||
<tb-order-modal ref="modalForm" @ok="modalFormOk"></tb-order-modal> | |||
</a-card> | |||
</template> | |||
<script> | |||
import '@/assets/less/TableExpand.less' | |||
import { mixinDevice } from '@/utils/mixin' | |||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |||
import TbOrderModal from './modules/TbOrderModal' | |||
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |||
export default { | |||
name: 'TbOrderList', | |||
mixins:[JeecgListMixin, mixinDevice], | |||
components: { | |||
TbOrderModal | |||
}, | |||
data () { | |||
return { | |||
description: 'tb_order管理页面', | |||
// 表头 | |||
columns: [ | |||
{ | |||
title: '#', | |||
dataIndex: '', | |||
key:'rowIndex', | |||
width:60, | |||
align:"center", | |||
customRender:function (t,r,index) { | |||
return parseInt(index)+1; | |||
} | |||
}, | |||
{ | |||
title:'老板名', | |||
align:"center", | |||
dataIndex: 'userName' | |||
}, | |||
{ | |||
title:'工人名', | |||
align:"center", | |||
dataIndex: 'workName' | |||
}, | |||
{ | |||
title:'工作标题', | |||
align:"center", | |||
dataIndex: 'title' | |||
}, | |||
{ | |||
title:'公司名称', | |||
align:"center", | |||
dataIndex: 'companyName' | |||
}, | |||
{ | |||
title:'工人出发地址', | |||
align:"center", | |||
dataIndex: 'workerAddress' | |||
}, | |||
{ | |||
title:'出行方式 0出租车 1 网约车 2 公交地铁 3无', | |||
align:"center", | |||
dataIndex: 'travelType_dictText' | |||
}, | |||
{ | |||
title:'上班地址', | |||
align:"center", | |||
dataIndex: 'workAddress' | |||
}, | |||
{ | |||
title:'行业/工种', | |||
align:"center", | |||
dataIndex: 'industryName' | |||
}, | |||
{ | |||
title:'图片上传', | |||
align:"center", | |||
dataIndex: 'workPic', | |||
scopedSlots: {customRender: 'imgSlot'} | |||
}, | |||
{ | |||
title:'工人联系方式', | |||
align:"center", | |||
dataIndex: 'phone' | |||
}, | |||
{ | |||
title:'招聘方联系方式', | |||
align:"center", | |||
dataIndex: 'bossPhone' | |||
}, | |||
{ | |||
title:'年龄', | |||
align:"center", | |||
dataIndex: 'age' | |||
}, | |||
{ | |||
title:'性别', | |||
align:"center", | |||
dataIndex: 'gender_dictText' | |||
}, | |||
{ | |||
title:'时间范围', | |||
align:"center", | |||
dataIndex: 'startTime' | |||
}, | |||
{ | |||
title:'时间范围', | |||
align:"center", | |||
dataIndex: 'endTime' | |||
}, | |||
{ | |||
title:'支付时间', | |||
align:"center", | |||
dataIndex: 'payTime' | |||
}, | |||
{ | |||
title:'工作时长', | |||
align:"center", | |||
dataIndex: 'workTime' | |||
}, | |||
{ | |||
title:'订单状态 0待聘用 1 已接单 2 进行中 3试工完成 4 企业确认 5已支付 6已完成 7已取消', | |||
align:"center", | |||
dataIndex: 'orderStatus_dictText' | |||
}, | |||
{ | |||
title:'结算方式 0提前支付 1 试用后支付', | |||
align:"center", | |||
dataIndex: 'payType_dictText' | |||
}, | |||
{ | |||
title:'付款金额(元)、', | |||
align:"center", | |||
dataIndex: 'payMoney' | |||
}, | |||
{ | |||
title:'支付方式 0微信支付 1 余额支付', | |||
align:"center", | |||
dataIndex: 'moneyType_dictText' | |||
}, | |||
{ | |||
title:'保险费(元)、', | |||
align:"center", | |||
dataIndex: 'premium' | |||
}, | |||
{ | |||
title:'交通费用金额(元)、', | |||
align:"center", | |||
dataIndex: 'travelMoney' | |||
}, | |||
{ | |||
title:'试工费用金额(元)、', | |||
align:"center", | |||
dataIndex: 'workMoney' | |||
}, | |||
{ | |||
title:'总金额(元)、', | |||
align:"center", | |||
dataIndex: 'amount' | |||
}, | |||
{ | |||
title:'平台手续费(元)、', | |||
align:"center", | |||
dataIndex: 'rateMoney' | |||
}, | |||
{ | |||
title:'平台手续费率)、', | |||
align:"center", | |||
dataIndex: 'rate' | |||
}, | |||
{ | |||
title: '操作', | |||
dataIndex: 'action', | |||
align:"center", | |||
fixed:"right", | |||
width:147, | |||
scopedSlots: { customRender: 'action' } | |||
} | |||
], | |||
url: { | |||
list: "/tbOrder/tbOrder/list", | |||
delete: "/tbOrder/tbOrder/delete", | |||
deleteBatch: "/tbOrder/tbOrder/deleteBatch", | |||
exportXlsUrl: "/tbOrder/tbOrder/exportXls", | |||
importExcelUrl: "tbOrder/tbOrder/importExcel", | |||
}, | |||
dictOptions:{}, | |||
superFieldList:[], | |||
} | |||
}, | |||
created() { | |||
this.getSuperFieldList(); | |||
}, | |||
computed: { | |||
importExcelUrl: function(){ | |||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |||
}, | |||
}, | |||
methods: { | |||
initDictConfig(){ | |||
}, | |||
getSuperFieldList(){ | |||
let fieldList=[]; | |||
fieldList.push({type:'string',value:'userName',text:'老板名',dictCode:''}) | |||
fieldList.push({type:'string',value:'workName',text:'工人名',dictCode:''}) | |||
fieldList.push({type:'string',value:'title',text:'工作标题',dictCode:''}) | |||
fieldList.push({type:'string',value:'companyName',text:'公司名称',dictCode:''}) | |||
fieldList.push({type:'string',value:'workerAddress',text:'工人出发地址',dictCode:''}) | |||
fieldList.push({type:'int',value:'travelType',text:'出行方式 0出租车 1 网约车 2 公交地铁 3无',dictCode:'travel_type'}) | |||
fieldList.push({type:'string',value:'workAddress',text:'上班地址',dictCode:''}) | |||
fieldList.push({type:'string',value:'industryName',text:'行业/工种',dictCode:''}) | |||
fieldList.push({type:'Text',value:'detail',text:'工人个人简介',dictCode:''}) | |||
fieldList.push({type:'Text',value:'workDetail',text:'工作内容',dictCode:''}) | |||
fieldList.push({type:'Text',value:'workPic',text:'图片上传',dictCode:''}) | |||
fieldList.push({type:'string',value:'phone',text:'工人联系方式',dictCode:''}) | |||
fieldList.push({type:'string',value:'bossPhone',text:'招聘方联系方式',dictCode:''}) | |||
fieldList.push({type:'int',value:'age',text:'年龄',dictCode:''}) | |||
fieldList.push({type:'int',value:'gender',text:'性别',dictCode:'sex'}) | |||
fieldList.push({type:'datetime',value:'startTime',text:'时间范围'}) | |||
fieldList.push({type:'datetime',value:'endTime',text:'时间范围'}) | |||
fieldList.push({type:'datetime',value:'payTime',text:'支付时间'}) | |||
fieldList.push({type:'string',value:'workTime',text:'工作时长',dictCode:''}) | |||
fieldList.push({type:'int',value:'orderStatus',text:'订单状态 0待聘用 1 已接单 2 进行中 3试工完成 4 企业确认 5已支付 6已完成 7已取消',dictCode:'order_status'}) | |||
fieldList.push({type:'int',value:'payType',text:'结算方式 0提前支付 1 试用后支付',dictCode:'pay_type'}) | |||
fieldList.push({type:'BigDecimal',value:'payMoney',text:'付款金额(元)、',dictCode:''}) | |||
fieldList.push({type:'int',value:'moneyType',text:'支付方式 0微信支付 1 余额支付',dictCode:'money_type'}) | |||
fieldList.push({type:'BigDecimal',value:'premium',text:'保险费(元)、',dictCode:''}) | |||
fieldList.push({type:'BigDecimal',value:'travelMoney',text:'交通费用金额(元)、',dictCode:''}) | |||
fieldList.push({type:'BigDecimal',value:'workMoney',text:'试工费用金额(元)、',dictCode:''}) | |||
fieldList.push({type:'BigDecimal',value:'amount',text:'总金额(元)、',dictCode:''}) | |||
fieldList.push({type:'BigDecimal',value:'rateMoney',text:'平台手续费(元)、',dictCode:''}) | |||
fieldList.push({type:'BigDecimal',value:'rate',text:'平台手续费率)、',dictCode:''}) | |||
this.superFieldList = fieldList | |||
} | |||
} | |||
} | |||
</script> | |||
<style scoped> | |||
@import '~@assets/less/common.less'; | |||
</style> |
@ -0,0 +1,265 @@ | |||
<template> | |||
<a-spin :spinning="confirmLoading"> | |||
<j-form-container :disabled="formDisabled"> | |||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | |||
<a-row> | |||
<a-col :span="24"> | |||
<a-form-model-item label="老板名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userName"> | |||
<a-input v-model="model.userName" placeholder="请输入老板名" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工人名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workName"> | |||
<a-input v-model="model.workName" placeholder="请输入工人名" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工作标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="title"> | |||
<a-input v-model="model.title" placeholder="请输入工作标题" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="公司名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyName"> | |||
<a-input v-model="model.companyName" placeholder="请输入公司名称" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工人出发地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workerAddress"> | |||
<a-input v-model="model.workerAddress" placeholder="请输入工人出发地址" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="出行方式 0出租车 1 网约车 2 公交地铁 3无" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="travelType"> | |||
<j-dict-select-tag type="list" v-model="model.travelType" dictCode="travel_type" placeholder="请选择出行方式 0出租车 1 网约车 2 公交地铁 3无" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="上班地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workAddress"> | |||
<a-input v-model="model.workAddress" placeholder="请输入上班地址" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="行业/工种" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="industryName"> | |||
<a-input v-model="model.industryName" placeholder="请输入行业/工种" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工人个人简介" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="detail"> | |||
<j-editor v-model="model.detail" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工作内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workDetail"> | |||
<j-editor v-model="model.workDetail" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="图片上传" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workPic"> | |||
<j-image-upload isMultiple v-model="model.workPic" ></j-image-upload> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工人联系方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone"> | |||
<a-input v-model="model.phone" placeholder="请输入工人联系方式" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="招聘方联系方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bossPhone"> | |||
<a-input v-model="model.bossPhone" placeholder="请输入招聘方联系方式" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="年龄" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="age"> | |||
<a-input-number v-model="model.age" placeholder="请输入年龄" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="gender"> | |||
<j-dict-select-tag type="list" v-model="model.gender" dictCode="sex" placeholder="请选择性别" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="时间范围" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime"> | |||
<j-date placeholder="请选择时间范围" v-model="model.startTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="时间范围" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime"> | |||
<j-date placeholder="请选择时间范围" v-model="model.endTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="支付时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payTime"> | |||
<j-date placeholder="请选择支付时间" v-model="model.payTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工作时长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workTime"> | |||
<a-input v-model="model.workTime" placeholder="请输入工作时长" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="订单状态 0待聘用 1 已接单 2 进行中 3试工完成 4 企业确认 5已支付 6已完成 7已取消" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderStatus"> | |||
<j-dict-select-tag type="list" v-model="model.orderStatus" dictCode="order_status" placeholder="请选择订单状态 0待聘用 1 已接单 2 进行中 3试工完成 4 企业确认 5已支付 6已完成 7已取消" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="结算方式 0提前支付 1 试用后支付" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payType"> | |||
<j-dict-select-tag type="list" v-model="model.payType" dictCode="pay_type" placeholder="请选择结算方式 0提前支付 1 试用后支付" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="付款金额(元)、" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payMoney"> | |||
<a-input-number v-model="model.payMoney" placeholder="请输入付款金额(元)、" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="支付方式 0微信支付 1 余额支付" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moneyType"> | |||
<j-dict-select-tag type="list" v-model="model.moneyType" dictCode="money_type" placeholder="请选择支付方式 0微信支付 1 余额支付" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="保险费(元)、" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="premium"> | |||
<a-input-number v-model="model.premium" placeholder="请输入保险费(元)、" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="交通费用金额(元)、" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="travelMoney"> | |||
<a-input-number v-model="model.travelMoney" placeholder="请输入交通费用金额(元)、" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="试工费用金额(元)、" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workMoney"> | |||
<a-input-number v-model="model.workMoney" placeholder="请输入试工费用金额(元)、" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="总金额(元)、" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="amount"> | |||
<a-input-number v-model="model.amount" placeholder="请输入总金额(元)、" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="平台手续费(元)、" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rateMoney"> | |||
<a-input-number v-model="model.rateMoney" placeholder="请输入平台手续费(元)、" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="平台手续费率)、" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="rate"> | |||
<a-input-number v-model="model.rate" placeholder="请输入平台手续费率)、" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
</a-row> | |||
</a-form-model> | |||
</j-form-container> | |||
</a-spin> | |||
</template> | |||
<script> | |||
import { httpAction, getAction } from '@/api/manage' | |||
import { validateDuplicateValue } from '@/utils/util' | |||
export default { | |||
name: 'TbOrderForm', | |||
components: { | |||
}, | |||
props: { | |||
//表单禁用 | |||
disabled: { | |||
type: Boolean, | |||
default: false, | |||
required: false | |||
} | |||
}, | |||
data () { | |||
return { | |||
model:{ | |||
}, | |||
labelCol: { | |||
xs: { span: 24 }, | |||
sm: { span: 5 }, | |||
}, | |||
wrapperCol: { | |||
xs: { span: 24 }, | |||
sm: { span: 16 }, | |||
}, | |||
confirmLoading: false, | |||
validatorRules: { | |||
payMoney: [ | |||
{ required: true, message: '请输入付款金额(元)、!'}, | |||
], | |||
premium: [ | |||
{ required: true, message: '请输入保险费(元)、!'}, | |||
], | |||
travelMoney: [ | |||
{ required: true, message: '请输入交通费用金额(元)、!'}, | |||
], | |||
workMoney: [ | |||
{ required: true, message: '请输入试工费用金额(元)、!'}, | |||
], | |||
amount: [ | |||
{ required: true, message: '请输入总金额(元)、!'}, | |||
], | |||
rateMoney: [ | |||
{ required: true, message: '请输入平台手续费(元)、!'}, | |||
], | |||
rate: [ | |||
{ required: true, message: '请输入平台手续费率)、!'}, | |||
], | |||
}, | |||
url: { | |||
add: "/tbOrder/tbOrder/add", | |||
edit: "/tbOrder/tbOrder/edit", | |||
queryById: "/tbOrder/tbOrder/queryById" | |||
} | |||
} | |||
}, | |||
computed: { | |||
formDisabled(){ | |||
return this.disabled | |||
}, | |||
}, | |||
created () { | |||
//备份model原始值 | |||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |||
}, | |||
methods: { | |||
add () { | |||
this.edit(this.modelDefault); | |||
}, | |||
edit (record) { | |||
this.model = Object.assign({}, record); | |||
this.visible = true; | |||
}, | |||
submitForm () { | |||
const that = this; | |||
// 触发表单验证 | |||
this.$refs.form.validate(valid => { | |||
if (valid) { | |||
that.confirmLoading = true; | |||
let httpurl = ''; | |||
let method = ''; | |||
if(!this.model.id){ | |||
httpurl+=this.url.add; | |||
method = 'post'; | |||
}else{ | |||
httpurl+=this.url.edit; | |||
method = 'put'; | |||
} | |||
httpAction(httpurl,this.model,method).then((res)=>{ | |||
if(res.success){ | |||
that.$message.success(res.message); | |||
that.$emit('ok'); | |||
}else{ | |||
that.$message.warning(res.message); | |||
} | |||
}).finally(() => { | |||
that.confirmLoading = false; | |||
}) | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> |
@ -0,0 +1,84 @@ | |||
<template> | |||
<a-drawer | |||
:title="title" | |||
:width="width" | |||
placement="right" | |||
:closable="false" | |||
@close="close" | |||
destroyOnClose | |||
:visible="visible"> | |||
<tb-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tb-order-form> | |||
<div class="drawer-footer"> | |||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> | |||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> | |||
</div> | |||
</a-drawer> | |||
</template> | |||
<script> | |||
import TbOrderForm from './TbOrderForm' | |||
export default { | |||
name: 'TbOrderModal', | |||
components: { | |||
TbOrderForm | |||
}, | |||
data () { | |||
return { | |||
title:"操作", | |||
width:800, | |||
visible: false, | |||
disableSubmit: false | |||
} | |||
}, | |||
methods: { | |||
add () { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.add(); | |||
}) | |||
}, | |||
edit (record) { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.edit(record); | |||
}); | |||
}, | |||
close () { | |||
this.$emit('close'); | |||
this.visible = false; | |||
}, | |||
submitCallback(){ | |||
this.$emit('ok'); | |||
this.visible = false; | |||
}, | |||
handleOk () { | |||
this.$refs.realForm.submitForm(); | |||
}, | |||
handleCancel () { | |||
this.close() | |||
} | |||
} | |||
} | |||
</script> | |||
<style lang="less" scoped> | |||
/** Button按钮间距 */ | |||
.ant-btn { | |||
margin-left: 30px; | |||
margin-bottom: 30px; | |||
float: right; | |||
} | |||
.drawer-footer{ | |||
position: absolute; | |||
bottom: -8px; | |||
width: 100%; | |||
border-top: 1px solid #e8e8e8; | |||
padding: 10px 16px; | |||
text-align: right; | |||
left: 0; | |||
background: #fff; | |||
border-radius: 0 0 2px 2px; | |||
} | |||
</style> |
@ -0,0 +1,60 @@ | |||
<template> | |||
<j-modal | |||
:title="title" | |||
:width="width" | |||
:visible="visible" | |||
switchFullscreen | |||
@ok="handleOk" | |||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | |||
@cancel="handleCancel" | |||
cancelText="关闭"> | |||
<tb-order-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tb-order-form> | |||
</j-modal> | |||
</template> | |||
<script> | |||
import TbOrderForm from './TbOrderForm' | |||
export default { | |||
name: 'TbOrderModal', | |||
components: { | |||
TbOrderForm | |||
}, | |||
data () { | |||
return { | |||
title:'', | |||
width:800, | |||
visible: false, | |||
disableSubmit: false | |||
} | |||
}, | |||
methods: { | |||
add () { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.add(); | |||
}) | |||
}, | |||
edit (record) { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.edit(record); | |||
}) | |||
}, | |||
close () { | |||
this.$emit('close'); | |||
this.visible = false; | |||
}, | |||
handleOk () { | |||
this.$refs.realForm.submitForm(); | |||
}, | |||
submitCallback(){ | |||
this.$emit('ok'); | |||
this.visible = false; | |||
}, | |||
handleCancel () { | |||
this.close() | |||
} | |||
} | |||
} | |||
</script> |
@ -0,0 +1,61 @@ | |||
import {defHttp} from '/@/utils/http/axios'; | |||
import {Modal} from 'ant-design-vue'; | |||
enum Api { | |||
list = '/tbOrder/tbOrder/list', | |||
save='/tbOrder/tbOrder/add', | |||
edit='/tbOrder/tbOrder/edit', | |||
deleteOne = '/tbOrder/tbOrder/delete', | |||
deleteBatch = '/tbOrder/tbOrder/deleteBatch', | |||
importExcel = '/tbOrder/tbOrder/importExcel', | |||
exportXls = '/tbOrder/tbOrder/exportXls', | |||
} | |||
/** | |||
* 导出api | |||
* @param params | |||
*/ | |||
export const getExportUrl = Api.exportXls; | |||
/** | |||
* 导入api | |||
*/ | |||
export const getImportUrl = Api.importExcel; | |||
/** | |||
* 列表接口 | |||
* @param params | |||
*/ | |||
export const list = (params) => | |||
defHttp.get({url: Api.list, params}); | |||
/** | |||
* 删除单个 | |||
*/ | |||
export const deleteOne = (params,handleSuccess) => { | |||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { | |||
handleSuccess(); | |||
}); | |||
} | |||
/** | |||
* 批量删除 | |||
* @param params | |||
*/ | |||
export const batchDelete = (params, handleSuccess) => { | |||
Modal.confirm({ | |||
title: '确认删除', | |||
content: '是否删除选中数据', | |||
okText: '确认', | |||
cancelText: '取消', | |||
onOk: () => { | |||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { | |||
handleSuccess(); | |||
}); | |||
} | |||
}); | |||
} | |||
/** | |||
* 保存或者更新 | |||
* @param params | |||
*/ | |||
export const saveOrUpdate = (params, isUpdate) => { | |||
let url = isUpdate ? Api.edit : Api.save; | |||
return defHttp.post({url: url, params}); | |||
} |
@ -0,0 +1,379 @@ | |||
import {BasicColumn} from '/@/components/Table'; | |||
import {FormSchema} from '/@/components/Table'; | |||
import { rules} from '/@/utils/helper/validator'; | |||
import { render } from '/@/utils/common/renderUtils'; | |||
//列表数据 | |||
export const columns: BasicColumn[] = [ | |||
{ | |||
title: '老板名', | |||
align:"center", | |||
dataIndex: 'userName' | |||
}, | |||
{ | |||
title: '工人名', | |||
align:"center", | |||
dataIndex: 'workName' | |||
}, | |||
{ | |||
title: '工作标题', | |||
align:"center", | |||
dataIndex: 'title' | |||
}, | |||
{ | |||
title: '公司名称', | |||
align:"center", | |||
dataIndex: 'companyName' | |||
}, | |||
{ | |||
title: '工人出发地址', | |||
align:"center", | |||
dataIndex: 'workerAddress' | |||
}, | |||
{ | |||
title: '出行方式 0出租车 1 网约车 2 公交地铁 3无', | |||
align:"center", | |||
dataIndex: 'travelType_dictText' | |||
}, | |||
{ | |||
title: '上班地址', | |||
align:"center", | |||
dataIndex: 'workAddress' | |||
}, | |||
{ | |||
title: '行业/工种', | |||
align:"center", | |||
dataIndex: 'industryName' | |||
}, | |||
{ | |||
title: '图片上传', | |||
align:"center", | |||
dataIndex: 'workPic', | |||
customRender:render.renderAvatar, | |||
}, | |||
{ | |||
title: '工人联系方式', | |||
align:"center", | |||
dataIndex: 'phone' | |||
}, | |||
{ | |||
title: '招聘方联系方式', | |||
align:"center", | |||
dataIndex: 'bossPhone' | |||
}, | |||
{ | |||
title: '年龄', | |||
align:"center", | |||
dataIndex: 'age' | |||
}, | |||
{ | |||
title: '性别', | |||
align:"center", | |||
dataIndex: 'gender_dictText' | |||
}, | |||
{ | |||
title: '时间范围', | |||
align:"center", | |||
dataIndex: 'startTime' | |||
}, | |||
{ | |||
title: '时间范围', | |||
align:"center", | |||
dataIndex: 'endTime' | |||
}, | |||
{ | |||
title: '支付时间', | |||
align:"center", | |||
dataIndex: 'payTime' | |||
}, | |||
{ | |||
title: '工作时长', | |||
align:"center", | |||
dataIndex: 'workTime' | |||
}, | |||
{ | |||
title: '订单状态 0待聘用 1 已接单 2 进行中 3试工完成 4 企业确认 5已支付 6已完成 7已取消', | |||
align:"center", | |||
dataIndex: 'orderStatus_dictText' | |||
}, | |||
{ | |||
title: '结算方式 0提前支付 1 试用后支付', | |||
align:"center", | |||
dataIndex: 'payType_dictText' | |||
}, | |||
{ | |||
title: '付款金额(元)、', | |||
align:"center", | |||
dataIndex: 'payMoney' | |||
}, | |||
{ | |||
title: '支付方式 0微信支付 1 余额支付', | |||
align:"center", | |||
dataIndex: 'moneyType_dictText' | |||
}, | |||
{ | |||
title: '保险费(元)、', | |||
align:"center", | |||
dataIndex: 'premium' | |||
}, | |||
{ | |||
title: '交通费用金额(元)、', | |||
align:"center", | |||
dataIndex: 'travelMoney' | |||
}, | |||
{ | |||
title: '试工费用金额(元)、', | |||
align:"center", | |||
dataIndex: 'workMoney' | |||
}, | |||
{ | |||
title: '总金额(元)、', | |||
align:"center", | |||
dataIndex: 'amount' | |||
}, | |||
{ | |||
title: '平台手续费(元)、', | |||
align:"center", | |||
dataIndex: 'rateMoney' | |||
}, | |||
{ | |||
title: '平台手续费率)、', | |||
align:"center", | |||
dataIndex: 'rate' | |||
}, | |||
]; | |||
//查询数据 | |||
export const searchFormSchema: FormSchema[] = [ | |||
{ | |||
label: "老板名", | |||
field: "userName", | |||
component: 'Input', | |||
colProps: {span: 6}, | |||
}, | |||
{ | |||
label: "工人名", | |||
field: "workName", | |||
component: 'Input', | |||
colProps: {span: 6}, | |||
}, | |||
{ | |||
label: "工人联系方式", | |||
field: "phone", | |||
component: 'Input', | |||
colProps: {span: 6}, | |||
}, | |||
{ | |||
label: "招聘方联系方式", | |||
field: "bossPhone", | |||
component: 'Input', | |||
colProps: {span: 6}, | |||
}, | |||
{ | |||
label: "订单状态 0待聘用 1 已接单 2 进行中 3试工完成 4 企业确认 5已支付 6已完成 7已取消", | |||
field: "orderStatus", | |||
component: 'JDictSelectTag', | |||
componentProps:{ | |||
dictCode:"order_status" | |||
}, | |||
colProps: {span: 6}, | |||
}, | |||
]; | |||
//表单数据 | |||
export const formSchema: FormSchema[] = [ | |||
{ | |||
label: '老板名', | |||
field: 'userName', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '工人名', | |||
field: 'workName', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '工作标题', | |||
field: 'title', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '公司名称', | |||
field: 'companyName', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '工人出发地址', | |||
field: 'workerAddress', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '出行方式 0出租车 1 网约车 2 公交地铁 3无', | |||
field: 'travelType', | |||
component: 'JDictSelectTag', | |||
componentProps:{ | |||
dictCode:"travel_type" | |||
}, | |||
}, | |||
{ | |||
label: '上班地址', | |||
field: 'workAddress', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '行业/工种', | |||
field: 'industryName', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '工人个人简介', | |||
field: 'detail', | |||
component: 'JCodeEditor', //TODO String后缀暂未添加 | |||
}, | |||
{ | |||
label: '工作内容', | |||
field: 'workDetail', | |||
component: 'JCodeEditor', //TODO String后缀暂未添加 | |||
}, | |||
{ | |||
label: '图片上传', | |||
field: 'workPic', | |||
component: 'JImageUpload', | |||
componentProps:{ | |||
}, | |||
}, | |||
{ | |||
label: '工人联系方式', | |||
field: 'phone', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '招聘方联系方式', | |||
field: 'bossPhone', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '年龄', | |||
field: 'age', | |||
component: 'InputNumber', | |||
}, | |||
{ | |||
label: '性别', | |||
field: 'gender', | |||
component: 'JDictSelectTag', | |||
componentProps:{ | |||
dictCode:"sex" | |||
}, | |||
}, | |||
{ | |||
label: '时间范围', | |||
field: 'startTime', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '时间范围', | |||
field: 'endTime', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '支付时间', | |||
field: 'payTime', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '工作时长', | |||
field: 'workTime', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '订单状态 0待聘用 1 已接单 2 进行中 3试工完成 4 企业确认 5已支付 6已完成 7已取消', | |||
field: 'orderStatus', | |||
component: 'JDictSelectTag', | |||
componentProps:{ | |||
dictCode:"order_status" | |||
}, | |||
}, | |||
{ | |||
label: '结算方式 0提前支付 1 试用后支付', | |||
field: 'payType', | |||
component: 'JDictSelectTag', | |||
componentProps:{ | |||
dictCode:"pay_type" | |||
}, | |||
}, | |||
{ | |||
label: '付款金额(元)、', | |||
field: 'payMoney', | |||
component: 'InputNumber', | |||
dynamicRules: ({model,schema}) => { | |||
return [ | |||
{ required: true, message: '请输入付款金额(元)、!'}, | |||
]; | |||
}, | |||
}, | |||
{ | |||
label: '支付方式 0微信支付 1 余额支付', | |||
field: 'moneyType', | |||
component: 'JDictSelectTag', | |||
componentProps:{ | |||
dictCode:"money_type" | |||
}, | |||
}, | |||
{ | |||
label: '保险费(元)、', | |||
field: 'premium', | |||
component: 'InputNumber', | |||
dynamicRules: ({model,schema}) => { | |||
return [ | |||
{ required: true, message: '请输入保险费(元)、!'}, | |||
]; | |||
}, | |||
}, | |||
{ | |||
label: '交通费用金额(元)、', | |||
field: 'travelMoney', | |||
component: 'InputNumber', | |||
dynamicRules: ({model,schema}) => { | |||
return [ | |||
{ required: true, message: '请输入交通费用金额(元)、!'}, | |||
]; | |||
}, | |||
}, | |||
{ | |||
label: '试工费用金额(元)、', | |||
field: 'workMoney', | |||
component: 'InputNumber', | |||
dynamicRules: ({model,schema}) => { | |||
return [ | |||
{ required: true, message: '请输入试工费用金额(元)、!'}, | |||
]; | |||
}, | |||
}, | |||
{ | |||
label: '总金额(元)、', | |||
field: 'amount', | |||
component: 'InputNumber', | |||
dynamicRules: ({model,schema}) => { | |||
return [ | |||
{ required: true, message: '请输入总金额(元)、!'}, | |||
]; | |||
}, | |||
}, | |||
{ | |||
label: '平台手续费(元)、', | |||
field: 'rateMoney', | |||
component: 'InputNumber', | |||
dynamicRules: ({model,schema}) => { | |||
return [ | |||
{ required: true, message: '请输入平台手续费(元)、!'}, | |||
]; | |||
}, | |||
}, | |||
{ | |||
label: '平台手续费率)、', | |||
field: 'rate', | |||
component: 'InputNumber', | |||
dynamicRules: ({model,schema}) => { | |||
return [ | |||
{ required: true, message: '请输入平台手续费率)、!'}, | |||
]; | |||
}, | |||
}, | |||
]; |
@ -0,0 +1,162 @@ | |||
<template> | |||
<div> | |||
<!--引用表格--> | |||
<BasicTable @register="registerTable" :rowSelection="rowSelection"> | |||
<!--插槽:table标题--> | |||
<template #tableTitle> | |||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> | |||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> | |||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> | |||
<a-dropdown v-if="checkedKeys.length > 0"> | |||
<template #overlay> | |||
<a-menu> | |||
<a-menu-item key="1" @click="batchHandleDelete"> | |||
<Icon icon="ant-design:delete-outlined"></Icon> | |||
删除 | |||
</a-menu-item> | |||
</a-menu> | |||
</template> | |||
<a-button>批量操作 | |||
<Icon icon="mdi:chevron-down"></Icon> | |||
</a-button> | |||
</a-dropdown> | |||
</template> | |||
<!--操作栏--> | |||
<template #action="{ record }"> | |||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> | |||
</template> | |||
<!--字段回显插槽--> | |||
<template #htmlSlot="{text}"> | |||
<div v-html="text"></div> | |||
</template> | |||
<template #fileSlot="{text}"> | |||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button> | |||
</template> | |||
</BasicTable> | |||
<!-- 表单区域 --> | |||
<TbOrderModal @register="registerModal" @success="handleSuccess"></TbOrderModal> | |||
</div> | |||
</template> | |||
<script lang="ts" name="tbOrder-tbOrder" setup> | |||
import {ref, computed, unref} from 'vue'; | |||
import {BasicTable, useTable, TableAction} from '/@/components/Table'; | |||
import {useModal} from '/@/components/Modal'; | |||
import { useListPage } from '/@/hooks/system/useListPage' | |||
import TbOrderModal from './components/TbOrderModal.vue' | |||
import {columns, searchFormSchema} from './tbOrder.data'; | |||
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './tbOrder.api'; | |||
const checkedKeys = ref<Array<string | number>>([]); | |||
//注册model | |||
const [registerModal, {openModal}] = useModal(); | |||
//注册table数据 | |||
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ | |||
tableProps:{ | |||
title: 'tb_order', | |||
api: list, | |||
columns, | |||
canResize:false, | |||
formConfig: { | |||
labelWidth: 120, | |||
schemas: searchFormSchema, | |||
autoSubmitOnEnter:true, | |||
showAdvancedButton:true, | |||
fieldMapToTime: [ | |||
], | |||
}, | |||
actionColumn: { | |||
width: 120, | |||
}, | |||
}, | |||
exportConfig: { | |||
name:"tb_order", | |||
url: getExportUrl, | |||
}, | |||
importConfig: { | |||
url: getImportUrl | |||
}, | |||
}) | |||
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext | |||
/** | |||
* 新增事件 | |||
*/ | |||
function handleAdd() { | |||
openModal(true, { | |||
isUpdate: false, | |||
showFooter: true, | |||
}); | |||
} | |||
/** | |||
* 编辑事件 | |||
*/ | |||
function handleEdit(record: Recordable) { | |||
openModal(true, { | |||
record, | |||
isUpdate: true, | |||
showFooter: true, | |||
}); | |||
} | |||
/** | |||
* 详情 | |||
*/ | |||
function handleDetail(record: Recordable) { | |||
openModal(true, { | |||
record, | |||
isUpdate: true, | |||
showFooter: false, | |||
}); | |||
} | |||
/** | |||
* 删除事件 | |||
*/ | |||
async function handleDelete(record) { | |||
await deleteOne({id: record.id}, reload); | |||
} | |||
/** | |||
* 批量删除事件 | |||
*/ | |||
async function batchHandleDelete() { | |||
await batchDelete({ids: checkedKeys.value}, reload); | |||
} | |||
/** | |||
* 成功回调 | |||
*/ | |||
function handleSuccess() { | |||
reload(); | |||
} | |||
/** | |||
* 操作栏 | |||
*/ | |||
function getTableAction(record){ | |||
return [ | |||
{ | |||
label: '编辑', | |||
onClick: handleEdit.bind(null, record), | |||
} | |||
] | |||
} | |||
/** | |||
* 下拉操作栏 | |||
*/ | |||
function getDropDownAction(record){ | |||
return [ | |||
{ | |||
label: '详情', | |||
onClick: handleDetail.bind(null, record), | |||
}, { | |||
label: '删除', | |||
popConfirm: { | |||
title: '是否确认删除', | |||
confirm: handleDelete.bind(null, record), | |||
} | |||
} | |||
] | |||
} | |||
</script> | |||
<style scoped> | |||
</style> |
@ -0,0 +1,58 @@ | |||
<template> | |||
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit"> | |||
<BasicForm @register="registerForm"/> | |||
</BasicModal> | |||
</template> | |||
<script lang="ts" setup> | |||
import {ref, computed, unref} from 'vue'; | |||
import {BasicModal, useModalInner} from '/@/components/Modal'; | |||
import {BasicForm, useForm} from '/@/components/Form/index'; | |||
import {formSchema} from '../tbOrder.data'; | |||
import {saveOrUpdate} from '../tbOrder.api'; | |||
// Emits声明 | |||
const emit = defineEmits(['register','success']); | |||
const isUpdate = ref(true); | |||
//表单配置 | |||
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({ | |||
labelWidth: 150, | |||
schemas: formSchema, | |||
showActionButtonGroup: false, | |||
}); | |||
//表单赋值 | |||
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => { | |||
//重置表单 | |||
await resetFields(); | |||
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter}); | |||
isUpdate.value = !!data?.isUpdate; | |||
if (unref(isUpdate)) { | |||
//表单赋值 | |||
await setFieldsValue({ | |||
...data.record, | |||
}); | |||
} | |||
// 隐藏底部时禁用整个表单 | |||
setProps({ disabled: !data?.showFooter }) | |||
}); | |||
//设置标题 | |||
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑')); | |||
//表单提交事件 | |||
async function handleSubmit(v) { | |||
try { | |||
let values = await validate(); | |||
setModalProps({confirmLoading: true}); | |||
//提交表单 | |||
await saveOrUpdate(values, isUpdate.value); | |||
//关闭弹窗 | |||
closeModal(); | |||
//刷新列表 | |||
emit('success'); | |||
} finally { | |||
setModalProps({confirmLoading: false}); | |||
} | |||
} | |||
</script> | |||
<style lang="less" scoped> | |||
</style> |
@ -0,0 +1,156 @@ | |||
package org.jeecg.modules.tbPremium.controller; | |||
import java.util.Arrays; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import org.jeecg.common.api.vo.Result; | |||
import org.jeecg.common.system.query.QueryGenerator; | |||
import org.jeecg.modules.tbPremium.entity.TbPremium; | |||
import org.jeecg.modules.tbPremium.service.ITbPremiumService; | |||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.jeecg.common.system.base.controller.JeecgController; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import org.springframework.web.servlet.ModelAndView; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.jeecg.common.aspect.annotation.AutoLog; | |||
/** | |||
* @Description: 保险费账单表 | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
@Api(tags="保险费账单表") | |||
@RestController | |||
@RequestMapping("/tbPremium/tbPremium") | |||
@Slf4j | |||
public class TbPremiumController extends JeecgController<TbPremium, ITbPremiumService> { | |||
@Autowired | |||
private ITbPremiumService tbPremiumService; | |||
/** | |||
* 分页列表查询 | |||
* | |||
* @param tbPremium | |||
* @param pageNo | |||
* @param pageSize | |||
* @param req | |||
* @return | |||
*/ | |||
//@AutoLog(value = "保险费账单表-分页列表查询") | |||
@ApiOperation(value="保险费账单表-分页列表查询", notes="保险费账单表-分页列表查询") | |||
@GetMapping(value = "/list") | |||
public Result<IPage<TbPremium>> queryPageList(TbPremium tbPremium, | |||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | |||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | |||
HttpServletRequest req) { | |||
QueryWrapper<TbPremium> queryWrapper = QueryGenerator.initQueryWrapper(tbPremium, req.getParameterMap()); | |||
Page<TbPremium> page = new Page<TbPremium>(pageNo, pageSize); | |||
IPage<TbPremium> pageList = tbPremiumService.page(page, queryWrapper); | |||
return Result.OK(pageList); | |||
} | |||
/** | |||
* 添加 | |||
* | |||
* @param tbPremium | |||
* @return | |||
*/ | |||
@AutoLog(value = "保险费账单表-添加") | |||
@ApiOperation(value="保险费账单表-添加", notes="保险费账单表-添加") | |||
@PostMapping(value = "/add") | |||
public Result<String> add(@RequestBody TbPremium tbPremium) { | |||
tbPremiumService.save(tbPremium); | |||
return Result.OK("添加成功!"); | |||
} | |||
/** | |||
* 编辑 | |||
* | |||
* @param tbPremium | |||
* @return | |||
*/ | |||
@AutoLog(value = "保险费账单表-编辑") | |||
@ApiOperation(value="保险费账单表-编辑", notes="保险费账单表-编辑") | |||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | |||
public Result<String> edit(@RequestBody TbPremium tbPremium) { | |||
tbPremiumService.updateById(tbPremium); | |||
return Result.OK("编辑成功!"); | |||
} | |||
/** | |||
* 通过id删除 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
@AutoLog(value = "保险费账单表-通过id删除") | |||
@ApiOperation(value="保险费账单表-通过id删除", notes="保险费账单表-通过id删除") | |||
@DeleteMapping(value = "/delete") | |||
public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |||
tbPremiumService.removeById(id); | |||
return Result.OK("删除成功!"); | |||
} | |||
/** | |||
* 批量删除 | |||
* | |||
* @param ids | |||
* @return | |||
*/ | |||
@AutoLog(value = "保险费账单表-批量删除") | |||
@ApiOperation(value="保险费账单表-批量删除", notes="保险费账单表-批量删除") | |||
@DeleteMapping(value = "/deleteBatch") | |||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |||
this.tbPremiumService.removeByIds(Arrays.asList(ids.split(","))); | |||
return Result.OK("批量删除成功!"); | |||
} | |||
/** | |||
* 通过id查询 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
//@AutoLog(value = "保险费账单表-通过id查询") | |||
@ApiOperation(value="保险费账单表-通过id查询", notes="保险费账单表-通过id查询") | |||
@GetMapping(value = "/queryById") | |||
public Result<TbPremium> queryById(@RequestParam(name="id",required=true) String id) { | |||
TbPremium tbPremium = tbPremiumService.getById(id); | |||
if(tbPremium==null) { | |||
return Result.error("未找到对应数据"); | |||
} | |||
return Result.OK(tbPremium); | |||
} | |||
/** | |||
* 导出excel | |||
* | |||
* @param request | |||
* @param tbPremium | |||
*/ | |||
@RequestMapping(value = "/exportXls") | |||
public ModelAndView exportXls(HttpServletRequest request, TbPremium tbPremium) { | |||
return super.exportXls(request, tbPremium, TbPremium.class, "保险费账单表"); | |||
} | |||
/** | |||
* 通过excel导入数据 | |||
* | |||
* @param request | |||
* @param response | |||
* @return | |||
*/ | |||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) | |||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | |||
return super.importExcel(request, response, TbPremium.class); | |||
} | |||
} |
@ -0,0 +1,80 @@ | |||
package org.jeecg.modules.tbPremium.entity; | |||
import java.io.Serializable; | |||
import java.io.UnsupportedEncodingException; | |||
import java.util.Date; | |||
import java.math.BigDecimal; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import lombok.Data; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import org.jeecgframework.poi.excel.annotation.Excel; | |||
import org.jeecg.common.aspect.annotation.Dict; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
/** | |||
* @Description: 保险费账单表 | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
@Data | |||
@TableName("tb_premium") | |||
@Accessors(chain = true) | |||
@EqualsAndHashCode(callSuper = false) | |||
@ApiModel(value="tb_premium对象", description="保险费账单表") | |||
public class TbPremium implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
/**id*/ | |||
@TableId(type = IdType.ASSIGN_ID) | |||
@ApiModelProperty(value = "id") | |||
private java.lang.String id; | |||
/**工人id*/ | |||
@Excel(name = "工人id", width = 15) | |||
@ApiModelProperty(value = "工人id") | |||
private java.lang.String userId; | |||
/**订单id*/ | |||
@Excel(name = "订单id", width = 15) | |||
@ApiModelProperty(value = "订单id") | |||
private java.lang.String orderId; | |||
/**保险费(元)、*/ | |||
@Excel(name = "保险费(元)、", width = 15) | |||
@ApiModelProperty(value = "保险费(元)、") | |||
private java.math.BigDecimal premium; | |||
/**支付方式 0微信支付 1 余额支付*/ | |||
@Excel(name = "支付方式 0微信支付 1 余额支付", width = 15, dicCode = "money_type") | |||
@Dict(dicCode = "money_type") | |||
@ApiModelProperty(value = "支付方式 0微信支付 1 余额支付") | |||
private java.lang.Integer moneyType; | |||
/**支付时间*/ | |||
@Excel(name = "支付时间", width = 20, format = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | |||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | |||
@ApiModelProperty(value = "支付时间") | |||
private java.util.Date payTime; | |||
/**创建人*/ | |||
@ApiModelProperty(value = "创建人") | |||
private java.lang.String createBy; | |||
/**创建日期*/ | |||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | |||
@DateTimeFormat(pattern="yyyy-MM-dd") | |||
@ApiModelProperty(value = "创建日期") | |||
private java.util.Date createTime; | |||
/**更新人*/ | |||
@ApiModelProperty(value = "更新人") | |||
private java.lang.String updateBy; | |||
/**更新日期*/ | |||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | |||
@DateTimeFormat(pattern="yyyy-MM-dd") | |||
@ApiModelProperty(value = "更新日期") | |||
private java.util.Date updateTime; | |||
/**所属部门*/ | |||
@ApiModelProperty(value = "所属部门") | |||
private java.lang.String sysOrgCode; | |||
} |
@ -0,0 +1,14 @@ | |||
package org.jeecg.modules.tbPremium.mapper; | |||
import org.jeecg.modules.tbPremium.entity.TbPremium; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
/** | |||
* @Description: 保险费账单表 | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
public interface TbPremiumMapper extends BaseMapper<TbPremium> { | |||
} |
@ -0,0 +1,5 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
<mapper namespace="org.jeecg.modules.tbPremium.mapper.TbPremiumMapper"> | |||
</mapper> |
@ -0,0 +1,14 @@ | |||
package org.jeecg.modules.tbPremium.service; | |||
import org.jeecg.modules.tbPremium.entity.TbPremium; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
/** | |||
* @Description: 保险费账单表 | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
public interface ITbPremiumService extends IService<TbPremium> { | |||
} |
@ -0,0 +1,19 @@ | |||
package org.jeecg.modules.tbPremium.service.impl; | |||
import org.jeecg.modules.tbPremium.entity.TbPremium; | |||
import org.jeecg.modules.tbPremium.mapper.TbPremiumMapper; | |||
import org.jeecg.modules.tbPremium.service.ITbPremiumService; | |||
import org.springframework.stereotype.Service; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
/** | |||
* @Description: 保险费账单表 | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
@Service | |||
public class TbPremiumServiceImpl extends ServiceImpl<TbPremiumMapper, TbPremium> implements ITbPremiumService { | |||
} |
@ -0,0 +1,190 @@ | |||
<template> | |||
<a-card :bordered="false"> | |||
<!-- 查询区域 --> | |||
<div class="table-page-search-wrapper"> | |||
<a-form layout="inline" @keyup.enter.native="searchQuery"> | |||
<a-row :gutter="24"> | |||
</a-row> | |||
</a-form> | |||
</div> | |||
<!-- 查询区域-END --> | |||
<!-- 操作按钮区域 --> | |||
<div class="table-operator"> | |||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> | |||
<a-button type="primary" icon="download" @click="handleExportXls('保险费账单表')">导出</a-button> | |||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | |||
<a-button type="primary" icon="import">导入</a-button> | |||
</a-upload> | |||
<!-- 高级查询区域 --> | |||
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> | |||
<a-dropdown v-if="selectedRowKeys.length > 0"> | |||
<a-menu slot="overlay"> | |||
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | |||
</a-menu> | |||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | |||
</a-dropdown> | |||
</div> | |||
<!-- table区域-begin --> | |||
<div> | |||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | |||
<a style="margin-left: 24px" @click="onClearSelected">清空</a> | |||
</div> | |||
<a-table | |||
ref="table" | |||
size="middle" | |||
:scroll="{x:true}" | |||
bordered | |||
rowKey="id" | |||
:columns="columns" | |||
:dataSource="dataSource" | |||
:pagination="ipagination" | |||
:loading="loading" | |||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |||
class="j-table-force-nowrap" | |||
@change="handleTableChange"> | |||
<template slot="htmlSlot" slot-scope="text"> | |||
<div v-html="text"></div> | |||
</template> | |||
<template slot="imgSlot" slot-scope="text,record"> | |||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |||
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |||
</template> | |||
<template slot="fileSlot" slot-scope="text"> | |||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |||
<a-button | |||
v-else | |||
:ghost="true" | |||
type="primary" | |||
icon="download" | |||
size="small" | |||
@click="downloadFile(text)"> | |||
下载 | |||
</a-button> | |||
</template> | |||
<span slot="action" slot-scope="text, record"> | |||
<a @click="handleEdit(record)">编辑</a> | |||
<a-divider type="vertical" /> | |||
<a-dropdown> | |||
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |||
<a-menu slot="overlay"> | |||
<a-menu-item> | |||
<a @click="handleDetail(record)">详情</a> | |||
</a-menu-item> | |||
<a-menu-item> | |||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |||
<a>删除</a> | |||
</a-popconfirm> | |||
</a-menu-item> | |||
</a-menu> | |||
</a-dropdown> | |||
</span> | |||
</a-table> | |||
</div> | |||
<tb-premium-modal ref="modalForm" @ok="modalFormOk"></tb-premium-modal> | |||
</a-card> | |||
</template> | |||
<script> | |||
import '@/assets/less/TableExpand.less' | |||
import { mixinDevice } from '@/utils/mixin' | |||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |||
import TbPremiumModal from './modules/TbPremiumModal' | |||
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |||
export default { | |||
name: 'TbPremiumList', | |||
mixins:[JeecgListMixin, mixinDevice], | |||
components: { | |||
TbPremiumModal | |||
}, | |||
data () { | |||
return { | |||
description: '保险费账单表管理页面', | |||
// 表头 | |||
columns: [ | |||
{ | |||
title: '#', | |||
dataIndex: '', | |||
key:'rowIndex', | |||
width:60, | |||
align:"center", | |||
customRender:function (t,r,index) { | |||
return parseInt(index)+1; | |||
} | |||
}, | |||
{ | |||
title:'订单id', | |||
align:"center", | |||
dataIndex: 'orderId' | |||
}, | |||
{ | |||
title:'保险费(元)、', | |||
align:"center", | |||
dataIndex: 'premium' | |||
}, | |||
{ | |||
title:'支付方式 0微信支付 1 余额支付', | |||
align:"center", | |||
dataIndex: 'moneyType_dictText' | |||
}, | |||
{ | |||
title:'支付时间', | |||
align:"center", | |||
dataIndex: 'payTime' | |||
}, | |||
{ | |||
title: '操作', | |||
dataIndex: 'action', | |||
align:"center", | |||
fixed:"right", | |||
width:147, | |||
scopedSlots: { customRender: 'action' } | |||
} | |||
], | |||
url: { | |||
list: "/tbPremium/tbPremium/list", | |||
delete: "/tbPremium/tbPremium/delete", | |||
deleteBatch: "/tbPremium/tbPremium/deleteBatch", | |||
exportXlsUrl: "/tbPremium/tbPremium/exportXls", | |||
importExcelUrl: "tbPremium/tbPremium/importExcel", | |||
}, | |||
dictOptions:{}, | |||
superFieldList:[], | |||
} | |||
}, | |||
created() { | |||
this.getSuperFieldList(); | |||
}, | |||
computed: { | |||
importExcelUrl: function(){ | |||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |||
}, | |||
}, | |||
methods: { | |||
initDictConfig(){ | |||
}, | |||
getSuperFieldList(){ | |||
let fieldList=[]; | |||
fieldList.push({type:'string',value:'orderId',text:'订单id',dictCode:''}) | |||
fieldList.push({type:'BigDecimal',value:'premium',text:'保险费(元)、',dictCode:''}) | |||
fieldList.push({type:'int',value:'moneyType',text:'支付方式 0微信支付 1 余额支付',dictCode:'money_type'}) | |||
fieldList.push({type:'datetime',value:'payTime',text:'支付时间'}) | |||
this.superFieldList = fieldList | |||
} | |||
} | |||
} | |||
</script> | |||
<style scoped> | |||
@import '~@assets/less/common.less'; | |||
</style> |
@ -0,0 +1,122 @@ | |||
<template> | |||
<a-spin :spinning="confirmLoading"> | |||
<j-form-container :disabled="formDisabled"> | |||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | |||
<a-row> | |||
<a-col :span="24"> | |||
<a-form-model-item label="订单id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="orderId"> | |||
<a-input v-model="model.orderId" placeholder="请输入订单id" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="保险费(元)、" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="premium"> | |||
<a-input-number v-model="model.premium" placeholder="请输入保险费(元)、" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="支付方式 0微信支付 1 余额支付" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moneyType"> | |||
<j-dict-select-tag type="list" v-model="model.moneyType" dictCode="money_type" placeholder="请选择支付方式 0微信支付 1 余额支付" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="支付时间" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payTime"> | |||
<j-date placeholder="请选择支付时间" v-model="model.payTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
</a-row> | |||
</a-form-model> | |||
</j-form-container> | |||
</a-spin> | |||
</template> | |||
<script> | |||
import { httpAction, getAction } from '@/api/manage' | |||
import { validateDuplicateValue } from '@/utils/util' | |||
export default { | |||
name: 'TbPremiumForm', | |||
components: { | |||
}, | |||
props: { | |||
//表单禁用 | |||
disabled: { | |||
type: Boolean, | |||
default: false, | |||
required: false | |||
} | |||
}, | |||
data () { | |||
return { | |||
model:{ | |||
}, | |||
labelCol: { | |||
xs: { span: 24 }, | |||
sm: { span: 5 }, | |||
}, | |||
wrapperCol: { | |||
xs: { span: 24 }, | |||
sm: { span: 16 }, | |||
}, | |||
confirmLoading: false, | |||
validatorRules: { | |||
premium: [ | |||
{ required: true, message: '请输入保险费(元)、!'}, | |||
], | |||
}, | |||
url: { | |||
add: "/tbPremium/tbPremium/add", | |||
edit: "/tbPremium/tbPremium/edit", | |||
queryById: "/tbPremium/tbPremium/queryById" | |||
} | |||
} | |||
}, | |||
computed: { | |||
formDisabled(){ | |||
return this.disabled | |||
}, | |||
}, | |||
created () { | |||
//备份model原始值 | |||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |||
}, | |||
methods: { | |||
add () { | |||
this.edit(this.modelDefault); | |||
}, | |||
edit (record) { | |||
this.model = Object.assign({}, record); | |||
this.visible = true; | |||
}, | |||
submitForm () { | |||
const that = this; | |||
// 触发表单验证 | |||
this.$refs.form.validate(valid => { | |||
if (valid) { | |||
that.confirmLoading = true; | |||
let httpurl = ''; | |||
let method = ''; | |||
if(!this.model.id){ | |||
httpurl+=this.url.add; | |||
method = 'post'; | |||
}else{ | |||
httpurl+=this.url.edit; | |||
method = 'put'; | |||
} | |||
httpAction(httpurl,this.model,method).then((res)=>{ | |||
if(res.success){ | |||
that.$message.success(res.message); | |||
that.$emit('ok'); | |||
}else{ | |||
that.$message.warning(res.message); | |||
} | |||
}).finally(() => { | |||
that.confirmLoading = false; | |||
}) | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> |
@ -0,0 +1,84 @@ | |||
<template> | |||
<a-drawer | |||
:title="title" | |||
:width="width" | |||
placement="right" | |||
:closable="false" | |||
@close="close" | |||
destroyOnClose | |||
:visible="visible"> | |||
<tb-premium-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tb-premium-form> | |||
<div class="drawer-footer"> | |||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> | |||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> | |||
</div> | |||
</a-drawer> | |||
</template> | |||
<script> | |||
import TbPremiumForm from './TbPremiumForm' | |||
export default { | |||
name: 'TbPremiumModal', | |||
components: { | |||
TbPremiumForm | |||
}, | |||
data () { | |||
return { | |||
title:"操作", | |||
width:800, | |||
visible: false, | |||
disableSubmit: false | |||
} | |||
}, | |||
methods: { | |||
add () { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.add(); | |||
}) | |||
}, | |||
edit (record) { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.edit(record); | |||
}); | |||
}, | |||
close () { | |||
this.$emit('close'); | |||
this.visible = false; | |||
}, | |||
submitCallback(){ | |||
this.$emit('ok'); | |||
this.visible = false; | |||
}, | |||
handleOk () { | |||
this.$refs.realForm.submitForm(); | |||
}, | |||
handleCancel () { | |||
this.close() | |||
} | |||
} | |||
} | |||
</script> | |||
<style lang="less" scoped> | |||
/** Button按钮间距 */ | |||
.ant-btn { | |||
margin-left: 30px; | |||
margin-bottom: 30px; | |||
float: right; | |||
} | |||
.drawer-footer{ | |||
position: absolute; | |||
bottom: -8px; | |||
width: 100%; | |||
border-top: 1px solid #e8e8e8; | |||
padding: 10px 16px; | |||
text-align: right; | |||
left: 0; | |||
background: #fff; | |||
border-radius: 0 0 2px 2px; | |||
} | |||
</style> |
@ -0,0 +1,60 @@ | |||
<template> | |||
<j-modal | |||
:title="title" | |||
:width="width" | |||
:visible="visible" | |||
switchFullscreen | |||
@ok="handleOk" | |||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | |||
@cancel="handleCancel" | |||
cancelText="关闭"> | |||
<tb-premium-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tb-premium-form> | |||
</j-modal> | |||
</template> | |||
<script> | |||
import TbPremiumForm from './TbPremiumForm' | |||
export default { | |||
name: 'TbPremiumModal', | |||
components: { | |||
TbPremiumForm | |||
}, | |||
data () { | |||
return { | |||
title:'', | |||
width:800, | |||
visible: false, | |||
disableSubmit: false | |||
} | |||
}, | |||
methods: { | |||
add () { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.add(); | |||
}) | |||
}, | |||
edit (record) { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.edit(record); | |||
}) | |||
}, | |||
close () { | |||
this.$emit('close'); | |||
this.visible = false; | |||
}, | |||
handleOk () { | |||
this.$refs.realForm.submitForm(); | |||
}, | |||
submitCallback(){ | |||
this.$emit('ok'); | |||
this.visible = false; | |||
}, | |||
handleCancel () { | |||
this.close() | |||
} | |||
} | |||
} | |||
</script> |
@ -0,0 +1,61 @@ | |||
import {defHttp} from '/@/utils/http/axios'; | |||
import {Modal} from 'ant-design-vue'; | |||
enum Api { | |||
list = '/tbPremium/tbPremium/list', | |||
save='/tbPremium/tbPremium/add', | |||
edit='/tbPremium/tbPremium/edit', | |||
deleteOne = '/tbPremium/tbPremium/delete', | |||
deleteBatch = '/tbPremium/tbPremium/deleteBatch', | |||
importExcel = '/tbPremium/tbPremium/importExcel', | |||
exportXls = '/tbPremium/tbPremium/exportXls', | |||
} | |||
/** | |||
* 导出api | |||
* @param params | |||
*/ | |||
export const getExportUrl = Api.exportXls; | |||
/** | |||
* 导入api | |||
*/ | |||
export const getImportUrl = Api.importExcel; | |||
/** | |||
* 列表接口 | |||
* @param params | |||
*/ | |||
export const list = (params) => | |||
defHttp.get({url: Api.list, params}); | |||
/** | |||
* 删除单个 | |||
*/ | |||
export const deleteOne = (params,handleSuccess) => { | |||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { | |||
handleSuccess(); | |||
}); | |||
} | |||
/** | |||
* 批量删除 | |||
* @param params | |||
*/ | |||
export const batchDelete = (params, handleSuccess) => { | |||
Modal.confirm({ | |||
title: '确认删除', | |||
content: '是否删除选中数据', | |||
okText: '确认', | |||
cancelText: '取消', | |||
onOk: () => { | |||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { | |||
handleSuccess(); | |||
}); | |||
} | |||
}); | |||
} | |||
/** | |||
* 保存或者更新 | |||
* @param params | |||
*/ | |||
export const saveOrUpdate = (params, isUpdate) => { | |||
let url = isUpdate ? Api.edit : Api.save; | |||
return defHttp.post({url: url, params}); | |||
} |
@ -0,0 +1,61 @@ | |||
import {BasicColumn} from '/@/components/Table'; | |||
import {FormSchema} from '/@/components/Table'; | |||
import { rules} from '/@/utils/helper/validator'; | |||
import { render } from '/@/utils/common/renderUtils'; | |||
//列表数据 | |||
export const columns: BasicColumn[] = [ | |||
{ | |||
title: '订单id', | |||
align:"center", | |||
dataIndex: 'orderId' | |||
}, | |||
{ | |||
title: '保险费(元)、', | |||
align:"center", | |||
dataIndex: 'premium' | |||
}, | |||
{ | |||
title: '支付方式 0微信支付 1 余额支付', | |||
align:"center", | |||
dataIndex: 'moneyType_dictText' | |||
}, | |||
{ | |||
title: '支付时间', | |||
align:"center", | |||
dataIndex: 'payTime' | |||
}, | |||
]; | |||
//查询数据 | |||
export const searchFormSchema: FormSchema[] = [ | |||
]; | |||
//表单数据 | |||
export const formSchema: FormSchema[] = [ | |||
{ | |||
label: '订单id', | |||
field: 'orderId', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '保险费(元)、', | |||
field: 'premium', | |||
component: 'InputNumber', | |||
dynamicRules: ({model,schema}) => { | |||
return [ | |||
{ required: true, message: '请输入保险费(元)、!'}, | |||
]; | |||
}, | |||
}, | |||
{ | |||
label: '支付方式 0微信支付 1 余额支付', | |||
field: 'moneyType', | |||
component: 'JDictSelectTag', | |||
componentProps:{ | |||
dictCode:"money_type" | |||
}, | |||
}, | |||
{ | |||
label: '支付时间', | |||
field: 'payTime', | |||
component: 'Input', | |||
}, | |||
]; |
@ -0,0 +1,162 @@ | |||
<template> | |||
<div> | |||
<!--引用表格--> | |||
<BasicTable @register="registerTable" :rowSelection="rowSelection"> | |||
<!--插槽:table标题--> | |||
<template #tableTitle> | |||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> | |||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> | |||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> | |||
<a-dropdown v-if="checkedKeys.length > 0"> | |||
<template #overlay> | |||
<a-menu> | |||
<a-menu-item key="1" @click="batchHandleDelete"> | |||
<Icon icon="ant-design:delete-outlined"></Icon> | |||
删除 | |||
</a-menu-item> | |||
</a-menu> | |||
</template> | |||
<a-button>批量操作 | |||
<Icon icon="mdi:chevron-down"></Icon> | |||
</a-button> | |||
</a-dropdown> | |||
</template> | |||
<!--操作栏--> | |||
<template #action="{ record }"> | |||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> | |||
</template> | |||
<!--字段回显插槽--> | |||
<template #htmlSlot="{text}"> | |||
<div v-html="text"></div> | |||
</template> | |||
<template #fileSlot="{text}"> | |||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button> | |||
</template> | |||
</BasicTable> | |||
<!-- 表单区域 --> | |||
<TbPremiumModal @register="registerModal" @success="handleSuccess"></TbPremiumModal> | |||
</div> | |||
</template> | |||
<script lang="ts" name="tbPremium-tbPremium" setup> | |||
import {ref, computed, unref} from 'vue'; | |||
import {BasicTable, useTable, TableAction} from '/@/components/Table'; | |||
import {useModal} from '/@/components/Modal'; | |||
import { useListPage } from '/@/hooks/system/useListPage' | |||
import TbPremiumModal from './components/TbPremiumModal.vue' | |||
import {columns, searchFormSchema} from './tbPremium.data'; | |||
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './tbPremium.api'; | |||
const checkedKeys = ref<Array<string | number>>([]); | |||
//注册model | |||
const [registerModal, {openModal}] = useModal(); | |||
//注册table数据 | |||
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ | |||
tableProps:{ | |||
title: '保险费账单表', | |||
api: list, | |||
columns, | |||
canResize:false, | |||
formConfig: { | |||
labelWidth: 120, | |||
schemas: searchFormSchema, | |||
autoSubmitOnEnter:true, | |||
showAdvancedButton:true, | |||
fieldMapToTime: [ | |||
], | |||
}, | |||
actionColumn: { | |||
width: 120, | |||
}, | |||
}, | |||
exportConfig: { | |||
name:"保险费账单表", | |||
url: getExportUrl, | |||
}, | |||
importConfig: { | |||
url: getImportUrl | |||
}, | |||
}) | |||
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext | |||
/** | |||
* 新增事件 | |||
*/ | |||
function handleAdd() { | |||
openModal(true, { | |||
isUpdate: false, | |||
showFooter: true, | |||
}); | |||
} | |||
/** | |||
* 编辑事件 | |||
*/ | |||
function handleEdit(record: Recordable) { | |||
openModal(true, { | |||
record, | |||
isUpdate: true, | |||
showFooter: true, | |||
}); | |||
} | |||
/** | |||
* 详情 | |||
*/ | |||
function handleDetail(record: Recordable) { | |||
openModal(true, { | |||
record, | |||
isUpdate: true, | |||
showFooter: false, | |||
}); | |||
} | |||
/** | |||
* 删除事件 | |||
*/ | |||
async function handleDelete(record) { | |||
await deleteOne({id: record.id}, reload); | |||
} | |||
/** | |||
* 批量删除事件 | |||
*/ | |||
async function batchHandleDelete() { | |||
await batchDelete({ids: checkedKeys.value}, reload); | |||
} | |||
/** | |||
* 成功回调 | |||
*/ | |||
function handleSuccess() { | |||
reload(); | |||
} | |||
/** | |||
* 操作栏 | |||
*/ | |||
function getTableAction(record){ | |||
return [ | |||
{ | |||
label: '编辑', | |||
onClick: handleEdit.bind(null, record), | |||
} | |||
] | |||
} | |||
/** | |||
* 下拉操作栏 | |||
*/ | |||
function getDropDownAction(record){ | |||
return [ | |||
{ | |||
label: '详情', | |||
onClick: handleDetail.bind(null, record), | |||
}, { | |||
label: '删除', | |||
popConfirm: { | |||
title: '是否确认删除', | |||
confirm: handleDelete.bind(null, record), | |||
} | |||
} | |||
] | |||
} | |||
</script> | |||
<style scoped> | |||
</style> |
@ -0,0 +1,58 @@ | |||
<template> | |||
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit"> | |||
<BasicForm @register="registerForm"/> | |||
</BasicModal> | |||
</template> | |||
<script lang="ts" setup> | |||
import {ref, computed, unref} from 'vue'; | |||
import {BasicModal, useModalInner} from '/@/components/Modal'; | |||
import {BasicForm, useForm} from '/@/components/Form/index'; | |||
import {formSchema} from '../tbPremium.data'; | |||
import {saveOrUpdate} from '../tbPremium.api'; | |||
// Emits声明 | |||
const emit = defineEmits(['register','success']); | |||
const isUpdate = ref(true); | |||
//表单配置 | |||
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({ | |||
labelWidth: 150, | |||
schemas: formSchema, | |||
showActionButtonGroup: false, | |||
}); | |||
//表单赋值 | |||
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => { | |||
//重置表单 | |||
await resetFields(); | |||
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter}); | |||
isUpdate.value = !!data?.isUpdate; | |||
if (unref(isUpdate)) { | |||
//表单赋值 | |||
await setFieldsValue({ | |||
...data.record, | |||
}); | |||
} | |||
// 隐藏底部时禁用整个表单 | |||
setProps({ disabled: !data?.showFooter }) | |||
}); | |||
//设置标题 | |||
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑')); | |||
//表单提交事件 | |||
async function handleSubmit(v) { | |||
try { | |||
let values = await validate(); | |||
setModalProps({confirmLoading: true}); | |||
//提交表单 | |||
await saveOrUpdate(values, isUpdate.value); | |||
//关闭弹窗 | |||
closeModal(); | |||
//刷新列表 | |||
emit('success'); | |||
} finally { | |||
setModalProps({confirmLoading: false}); | |||
} | |||
} | |||
</script> | |||
<style lang="less" scoped> | |||
</style> |
@ -0,0 +1,156 @@ | |||
package org.jeecg.modules.tbTask.controller; | |||
import java.util.Arrays; | |||
import javax.servlet.http.HttpServletRequest; | |||
import javax.servlet.http.HttpServletResponse; | |||
import org.jeecg.common.api.vo.Result; | |||
import org.jeecg.common.system.query.QueryGenerator; | |||
import org.jeecg.modules.tbTask.entity.TbTask; | |||
import org.jeecg.modules.tbTask.service.ITbTaskService; | |||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; | |||
import com.baomidou.mybatisplus.core.metadata.IPage; | |||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; | |||
import lombok.extern.slf4j.Slf4j; | |||
import org.jeecg.common.system.base.controller.JeecgController; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.*; | |||
import org.springframework.web.servlet.ModelAndView; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.jeecg.common.aspect.annotation.AutoLog; | |||
/** | |||
* @Description: tb_task | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
@Api(tags="tb_task") | |||
@RestController | |||
@RequestMapping("/tbTask/tbTask") | |||
@Slf4j | |||
public class TbTaskController extends JeecgController<TbTask, ITbTaskService> { | |||
@Autowired | |||
private ITbTaskService tbTaskService; | |||
/** | |||
* 分页列表查询 | |||
* | |||
* @param tbTask | |||
* @param pageNo | |||
* @param pageSize | |||
* @param req | |||
* @return | |||
*/ | |||
//@AutoLog(value = "tb_task-分页列表查询") | |||
@ApiOperation(value="tb_task-分页列表查询", notes="tb_task-分页列表查询") | |||
@GetMapping(value = "/list") | |||
public Result<IPage<TbTask>> queryPageList(TbTask tbTask, | |||
@RequestParam(name="pageNo", defaultValue="1") Integer pageNo, | |||
@RequestParam(name="pageSize", defaultValue="10") Integer pageSize, | |||
HttpServletRequest req) { | |||
QueryWrapper<TbTask> queryWrapper = QueryGenerator.initQueryWrapper(tbTask, req.getParameterMap()); | |||
Page<TbTask> page = new Page<TbTask>(pageNo, pageSize); | |||
IPage<TbTask> pageList = tbTaskService.page(page, queryWrapper); | |||
return Result.OK(pageList); | |||
} | |||
/** | |||
* 添加 | |||
* | |||
* @param tbTask | |||
* @return | |||
*/ | |||
@AutoLog(value = "tb_task-添加") | |||
@ApiOperation(value="tb_task-添加", notes="tb_task-添加") | |||
@PostMapping(value = "/add") | |||
public Result<String> add(@RequestBody TbTask tbTask) { | |||
tbTaskService.save(tbTask); | |||
return Result.OK("添加成功!"); | |||
} | |||
/** | |||
* 编辑 | |||
* | |||
* @param tbTask | |||
* @return | |||
*/ | |||
@AutoLog(value = "tb_task-编辑") | |||
@ApiOperation(value="tb_task-编辑", notes="tb_task-编辑") | |||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST}) | |||
public Result<String> edit(@RequestBody TbTask tbTask) { | |||
tbTaskService.updateById(tbTask); | |||
return Result.OK("编辑成功!"); | |||
} | |||
/** | |||
* 通过id删除 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
@AutoLog(value = "tb_task-通过id删除") | |||
@ApiOperation(value="tb_task-通过id删除", notes="tb_task-通过id删除") | |||
@DeleteMapping(value = "/delete") | |||
public Result<String> delete(@RequestParam(name="id",required=true) String id) { | |||
tbTaskService.removeById(id); | |||
return Result.OK("删除成功!"); | |||
} | |||
/** | |||
* 批量删除 | |||
* | |||
* @param ids | |||
* @return | |||
*/ | |||
@AutoLog(value = "tb_task-批量删除") | |||
@ApiOperation(value="tb_task-批量删除", notes="tb_task-批量删除") | |||
@DeleteMapping(value = "/deleteBatch") | |||
public Result<String> deleteBatch(@RequestParam(name="ids",required=true) String ids) { | |||
this.tbTaskService.removeByIds(Arrays.asList(ids.split(","))); | |||
return Result.OK("批量删除成功!"); | |||
} | |||
/** | |||
* 通过id查询 | |||
* | |||
* @param id | |||
* @return | |||
*/ | |||
//@AutoLog(value = "tb_task-通过id查询") | |||
@ApiOperation(value="tb_task-通过id查询", notes="tb_task-通过id查询") | |||
@GetMapping(value = "/queryById") | |||
public Result<TbTask> queryById(@RequestParam(name="id",required=true) String id) { | |||
TbTask tbTask = tbTaskService.getById(id); | |||
if(tbTask==null) { | |||
return Result.error("未找到对应数据"); | |||
} | |||
return Result.OK(tbTask); | |||
} | |||
/** | |||
* 导出excel | |||
* | |||
* @param request | |||
* @param tbTask | |||
*/ | |||
@RequestMapping(value = "/exportXls") | |||
public ModelAndView exportXls(HttpServletRequest request, TbTask tbTask) { | |||
return super.exportXls(request, tbTask, TbTask.class, "tb_task"); | |||
} | |||
/** | |||
* 通过excel导入数据 | |||
* | |||
* @param request | |||
* @param response | |||
* @return | |||
*/ | |||
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) | |||
public Result<?> importExcel(HttpServletRequest request, HttpServletResponse response) { | |||
return super.importExcel(request, response, TbTask.class); | |||
} | |||
} |
@ -0,0 +1,182 @@ | |||
package org.jeecg.modules.tbTask.entity; | |||
import java.io.Serializable; | |||
import java.io.UnsupportedEncodingException; | |||
import java.util.Date; | |||
import java.math.BigDecimal; | |||
import com.baomidou.mybatisplus.annotation.IdType; | |||
import com.baomidou.mybatisplus.annotation.TableId; | |||
import com.baomidou.mybatisplus.annotation.TableName; | |||
import lombok.Data; | |||
import com.fasterxml.jackson.annotation.JsonFormat; | |||
import org.springframework.format.annotation.DateTimeFormat; | |||
import org.jeecgframework.poi.excel.annotation.Excel; | |||
import org.jeecg.common.aspect.annotation.Dict; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.EqualsAndHashCode; | |||
import lombok.experimental.Accessors; | |||
/** | |||
* @Description: tb_task | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
@Data | |||
@TableName("tb_task") | |||
@Accessors(chain = true) | |||
@EqualsAndHashCode(callSuper = false) | |||
@ApiModel(value="tb_task对象", description="tb_task") | |||
public class TbTask implements Serializable { | |||
private static final long serialVersionUID = 1L; | |||
/**id*/ | |||
@TableId(type = IdType.ASSIGN_ID) | |||
@ApiModelProperty(value = "id") | |||
private java.lang.String id; | |||
/**用户id*/ | |||
@Excel(name = "用户id", width = 15) | |||
@ApiModelProperty(value = "用户id") | |||
private java.lang.String userId; | |||
/**用户名*/ | |||
@Excel(name = "用户名", width = 15) | |||
@ApiModelProperty(value = "用户名") | |||
private java.lang.String userName; | |||
/**工人名*/ | |||
@Excel(name = "工人名", width = 15) | |||
@ApiModelProperty(value = "工人名") | |||
private java.lang.String workName; | |||
/**头像图片*/ | |||
@Excel(name = "头像图片", width = 15) | |||
@ApiModelProperty(value = "头像图片") | |||
private java.lang.String headPic; | |||
/**工作标题*/ | |||
@Excel(name = "工作标题", width = 15) | |||
@ApiModelProperty(value = "工作标题") | |||
private java.lang.String title; | |||
/**公司名称*/ | |||
@Excel(name = "公司名称", width = 15) | |||
@ApiModelProperty(value = "公司名称") | |||
private java.lang.String companyName; | |||
/**工人出发地址*/ | |||
@Excel(name = "工人出发地址", width = 15) | |||
@ApiModelProperty(value = "工人出发地址") | |||
private java.lang.String workerAddress; | |||
/**出行方式 0出租车 1 网约车 2 公交地铁 3无*/ | |||
@Excel(name = "出行方式 0出租车 1 网约车 2 公交地铁 3无", width = 15, dicCode = "travel_type") | |||
@Dict(dicCode = "travel_type") | |||
@ApiModelProperty(value = "出行方式 0出租车 1 网约车 2 公交地铁 3无") | |||
private java.lang.Integer travelType; | |||
/**上班地址*/ | |||
@Excel(name = "上班地址", width = 15) | |||
@ApiModelProperty(value = "上班地址") | |||
private java.lang.String workAddress; | |||
/**上班地址经度*/ | |||
@Excel(name = "上班地址经度", width = 15) | |||
@ApiModelProperty(value = "上班地址经度") | |||
private java.lang.String latitude; | |||
/**上班地址纬度*/ | |||
@Excel(name = "上班地址纬度", width = 15) | |||
@ApiModelProperty(value = "上班地址纬度") | |||
private java.lang.String longitude; | |||
/**行业/工种*/ | |||
@Excel(name = "行业/工种", width = 15) | |||
@ApiModelProperty(value = "行业/工种") | |||
private java.lang.String industryName; | |||
/**行业/工种id*/ | |||
@Excel(name = "行业/工种id", width = 15) | |||
@ApiModelProperty(value = "行业/工种id") | |||
private java.lang.String industryId; | |||
/**工人个人简介*/ | |||
@Excel(name = "工人个人简介", width = 15) | |||
@ApiModelProperty(value = "工人个人简介") | |||
private java.lang.String detail; | |||
/**工作内容*/ | |||
@Excel(name = "工作内容", width = 15) | |||
@ApiModelProperty(value = "工作内容") | |||
private java.lang.String workDetail; | |||
/**图片上传*/ | |||
@Excel(name = "图片上传", width = 15) | |||
@ApiModelProperty(value = "图片上传") | |||
private java.lang.String workPic; | |||
/**工人联系方式*/ | |||
@Excel(name = "工人联系方式", width = 15) | |||
@ApiModelProperty(value = "工人联系方式") | |||
private java.lang.String phone; | |||
/**招聘方联系方式*/ | |||
@Excel(name = "招聘方联系方式", width = 15) | |||
@ApiModelProperty(value = "招聘方联系方式") | |||
private java.lang.String bossPhone; | |||
/**角色 0招聘方 1 求职方*/ | |||
@Excel(name = "角色 0招聘方 1 求职方", width = 15, dicCode = "user_role") | |||
@Dict(dicCode = "user_role") | |||
@ApiModelProperty(value = "角色 0招聘方 1 求职方") | |||
private java.lang.Integer role; | |||
/**年龄*/ | |||
@Excel(name = "年龄", width = 15) | |||
@ApiModelProperty(value = "年龄") | |||
private java.lang.Integer age; | |||
/**性别*/ | |||
@Excel(name = "性别", width = 15, dicCode = "sex") | |||
@Dict(dicCode = "sex") | |||
@ApiModelProperty(value = "性别") | |||
private java.lang.Integer gender; | |||
/**期望日薪*/ | |||
@Excel(name = "期望日薪", width = 15) | |||
@ApiModelProperty(value = "期望日薪") | |||
private java.lang.Integer dayMoney; | |||
/**时间范围*/ | |||
@Excel(name = "时间范围", width = 20, format = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | |||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | |||
@ApiModelProperty(value = "时间范围") | |||
private java.util.Date startTime; | |||
/**时间范围*/ | |||
@Excel(name = "时间范围", width = 20, format = "yyyy-MM-dd HH:mm:ss") | |||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | |||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | |||
@ApiModelProperty(value = "时间范围") | |||
private java.util.Date endTime; | |||
/**工作时长*/ | |||
@Excel(name = "工作时长", width = 15) | |||
@ApiModelProperty(value = "工作时长") | |||
private java.lang.String workTime; | |||
/**期望薪资最小值*/ | |||
@Excel(name = "期望薪资最小值", width = 15) | |||
@ApiModelProperty(value = "期望薪资最小值") | |||
private java.lang.Integer moneymin; | |||
/**期望薪资最大值*/ | |||
@Excel(name = "期望薪资最大值", width = 15) | |||
@ApiModelProperty(value = "期望薪资最大值") | |||
private java.lang.Integer moneymax; | |||
/**审核状态 0审核中 1 审核通过 2审核未通过*/ | |||
@Excel(name = "审核状态 0审核中 1 审核通过 2审核未通过", width = 15, dicCode = "audit_status") | |||
@Dict(dicCode = "audit_status") | |||
@ApiModelProperty(value = "审核状态 0审核中 1 审核通过 2审核未通过") | |||
private java.lang.Integer auditStatus; | |||
/**结算方式 0提前支付 1 试用后支付*/ | |||
@Excel(name = "结算方式 0提前支付 1 试用后支付", width = 15, dicCode = "pay_type") | |||
@Dict(dicCode = "pay_type") | |||
@ApiModelProperty(value = "结算方式 0提前支付 1 试用后支付") | |||
private java.lang.Integer payType; | |||
/**创建人*/ | |||
@ApiModelProperty(value = "创建人") | |||
private java.lang.String createBy; | |||
/**创建日期*/ | |||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss") | |||
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") | |||
@ApiModelProperty(value = "创建日期") | |||
private java.util.Date createTime; | |||
/**更新人*/ | |||
@ApiModelProperty(value = "更新人") | |||
private java.lang.String updateBy; | |||
/**更新日期*/ | |||
@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd") | |||
@DateTimeFormat(pattern="yyyy-MM-dd") | |||
@ApiModelProperty(value = "更新日期") | |||
private java.util.Date updateTime; | |||
/**所属部门*/ | |||
@ApiModelProperty(value = "所属部门") | |||
private java.lang.String sysOrgCode; | |||
} |
@ -0,0 +1,14 @@ | |||
package org.jeecg.modules.tbTask.mapper; | |||
import org.jeecg.modules.tbTask.entity.TbTask; | |||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; | |||
/** | |||
* @Description: tb_task | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
public interface TbTaskMapper extends BaseMapper<TbTask> { | |||
} |
@ -0,0 +1,5 @@ | |||
<?xml version="1.0" encoding="UTF-8"?> | |||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> | |||
<mapper namespace="org.jeecg.modules.tbTask.mapper.TbTaskMapper"> | |||
</mapper> |
@ -0,0 +1,14 @@ | |||
package org.jeecg.modules.tbTask.service; | |||
import org.jeecg.modules.tbTask.entity.TbTask; | |||
import com.baomidou.mybatisplus.extension.service.IService; | |||
/** | |||
* @Description: tb_task | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
public interface ITbTaskService extends IService<TbTask> { | |||
} |
@ -0,0 +1,19 @@ | |||
package org.jeecg.modules.tbTask.service.impl; | |||
import org.jeecg.modules.tbTask.entity.TbTask; | |||
import org.jeecg.modules.tbTask.mapper.TbTaskMapper; | |||
import org.jeecg.modules.tbTask.service.ITbTaskService; | |||
import org.springframework.stereotype.Service; | |||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; | |||
/** | |||
* @Description: tb_task | |||
* @Author: jeecg-boot | |||
* @Date: 2024-12-12 | |||
* @Version: V1.0 | |||
*/ | |||
@Service | |||
public class TbTaskServiceImpl extends ServiceImpl<TbTaskMapper, TbTask> implements ITbTaskService { | |||
} |
@ -0,0 +1,357 @@ | |||
<template> | |||
<a-card :bordered="false"> | |||
<!-- 查询区域 --> | |||
<div class="table-page-search-wrapper"> | |||
<a-form layout="inline" @keyup.enter.native="searchQuery"> | |||
<a-row :gutter="24"> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="用户名"> | |||
<a-input placeholder="请输入用户名" v-model="queryParam.userName"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="工人名"> | |||
<a-input placeholder="请输入工人名" v-model="queryParam.workName"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<template v-if="toggleSearchStatus"> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="公司名称"> | |||
<a-input placeholder="请输入公司名称" v-model="queryParam.companyName"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="工人联系方式"> | |||
<a-input placeholder="请输入工人联系方式" v-model="queryParam.phone"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<a-form-item label="招聘方联系方式"> | |||
<a-input placeholder="请输入招聘方联系方式" v-model="queryParam.bossPhone"></a-input> | |||
</a-form-item> | |||
</a-col> | |||
</template> | |||
<a-col :xl="6" :lg="7" :md="8" :sm="24"> | |||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons"> | |||
<a-button type="primary" @click="searchQuery" icon="search">查询</a-button> | |||
<a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button> | |||
<a @click="handleToggleSearch" style="margin-left: 8px"> | |||
{{ toggleSearchStatus ? '收起' : '展开' }} | |||
<a-icon :type="toggleSearchStatus ? 'up' : 'down'"/> | |||
</a> | |||
</span> | |||
</a-col> | |||
</a-row> | |||
</a-form> | |||
</div> | |||
<!-- 查询区域-END --> | |||
<!-- 操作按钮区域 --> | |||
<div class="table-operator"> | |||
<a-button @click="handleAdd" type="primary" icon="plus">新增</a-button> | |||
<a-button type="primary" icon="download" @click="handleExportXls('tb_task')">导出</a-button> | |||
<a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl" @change="handleImportExcel"> | |||
<a-button type="primary" icon="import">导入</a-button> | |||
</a-upload> | |||
<!-- 高级查询区域 --> | |||
<j-super-query :fieldList="superFieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query> | |||
<a-dropdown v-if="selectedRowKeys.length > 0"> | |||
<a-menu slot="overlay"> | |||
<a-menu-item key="1" @click="batchDel"><a-icon type="delete"/>删除</a-menu-item> | |||
</a-menu> | |||
<a-button style="margin-left: 8px"> 批量操作 <a-icon type="down" /></a-button> | |||
</a-dropdown> | |||
</div> | |||
<!-- table区域-begin --> | |||
<div> | |||
<div class="ant-alert ant-alert-info" style="margin-bottom: 16px;"> | |||
<i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a style="font-weight: 600">{{ selectedRowKeys.length }}</a>项 | |||
<a style="margin-left: 24px" @click="onClearSelected">清空</a> | |||
</div> | |||
<a-table | |||
ref="table" | |||
size="middle" | |||
:scroll="{x:true}" | |||
bordered | |||
rowKey="id" | |||
:columns="columns" | |||
:dataSource="dataSource" | |||
:pagination="ipagination" | |||
:loading="loading" | |||
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}" | |||
class="j-table-force-nowrap" | |||
@change="handleTableChange"> | |||
<template slot="htmlSlot" slot-scope="text"> | |||
<div v-html="text"></div> | |||
</template> | |||
<template slot="imgSlot" slot-scope="text,record"> | |||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span> | |||
<img v-else :src="getImgView(text)" :preview="record.id" height="25px" alt="" style="max-width:80px;font-size: 12px;font-style: italic;"/> | |||
</template> | |||
<template slot="fileSlot" slot-scope="text"> | |||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |||
<a-button | |||
v-else | |||
:ghost="true" | |||
type="primary" | |||
icon="download" | |||
size="small" | |||
@click="downloadFile(text)"> | |||
下载 | |||
</a-button> | |||
</template> | |||
<span slot="action" slot-scope="text, record"> | |||
<a @click="handleEdit(record)">编辑</a> | |||
<a-divider type="vertical" /> | |||
<a-dropdown> | |||
<a class="ant-dropdown-link">更多 <a-icon type="down" /></a> | |||
<a-menu slot="overlay"> | |||
<a-menu-item> | |||
<a @click="handleDetail(record)">详情</a> | |||
</a-menu-item> | |||
<a-menu-item> | |||
<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)"> | |||
<a>删除</a> | |||
</a-popconfirm> | |||
</a-menu-item> | |||
</a-menu> | |||
</a-dropdown> | |||
</span> | |||
</a-table> | |||
</div> | |||
<tb-task-modal ref="modalForm" @ok="modalFormOk"></tb-task-modal> | |||
</a-card> | |||
</template> | |||
<script> | |||
import '@/assets/less/TableExpand.less' | |||
import { mixinDevice } from '@/utils/mixin' | |||
import { JeecgListMixin } from '@/mixins/JeecgListMixin' | |||
import TbTaskModal from './modules/TbTaskModal' | |||
import {filterMultiDictText} from '@/components/dict/JDictSelectUtil' | |||
export default { | |||
name: 'TbTaskList', | |||
mixins:[JeecgListMixin, mixinDevice], | |||
components: { | |||
TbTaskModal | |||
}, | |||
data () { | |||
return { | |||
description: 'tb_task管理页面', | |||
// 表头 | |||
columns: [ | |||
{ | |||
title: '#', | |||
dataIndex: '', | |||
key:'rowIndex', | |||
width:60, | |||
align:"center", | |||
customRender:function (t,r,index) { | |||
return parseInt(index)+1; | |||
} | |||
}, | |||
{ | |||
title:'用户名', | |||
align:"center", | |||
dataIndex: 'userName' | |||
}, | |||
{ | |||
title:'工人名', | |||
align:"center", | |||
dataIndex: 'workName' | |||
}, | |||
{ | |||
title:'头像图片', | |||
align:"center", | |||
dataIndex: 'headPic', | |||
scopedSlots: {customRender: 'imgSlot'} | |||
}, | |||
{ | |||
title:'工作标题', | |||
align:"center", | |||
dataIndex: 'title' | |||
}, | |||
{ | |||
title:'公司名称', | |||
align:"center", | |||
dataIndex: 'companyName' | |||
}, | |||
{ | |||
title:'工人出发地址', | |||
align:"center", | |||
dataIndex: 'workerAddress' | |||
}, | |||
{ | |||
title:'出行方式 0出租车 1 网约车 2 公交地铁 3无', | |||
align:"center", | |||
dataIndex: 'travelType_dictText' | |||
}, | |||
{ | |||
title:'上班地址', | |||
align:"center", | |||
dataIndex: 'workAddress' | |||
}, | |||
{ | |||
title:'行业/工种', | |||
align:"center", | |||
dataIndex: 'industryName' | |||
}, | |||
{ | |||
title:'工人个人简介', | |||
align:"center", | |||
dataIndex: 'detail', | |||
scopedSlots: {customRender: 'htmlSlot'} | |||
}, | |||
{ | |||
title:'工作内容', | |||
align:"center", | |||
dataIndex: 'workDetail', | |||
scopedSlots: {customRender: 'htmlSlot'} | |||
}, | |||
{ | |||
title:'图片上传', | |||
align:"center", | |||
dataIndex: 'workPic', | |||
scopedSlots: {customRender: 'imgSlot'} | |||
}, | |||
{ | |||
title:'工人联系方式', | |||
align:"center", | |||
dataIndex: 'phone' | |||
}, | |||
{ | |||
title:'招聘方联系方式', | |||
align:"center", | |||
dataIndex: 'bossPhone' | |||
}, | |||
{ | |||
title:'角色 0招聘方 1 求职方', | |||
align:"center", | |||
dataIndex: 'role_dictText' | |||
}, | |||
{ | |||
title:'年龄', | |||
align:"center", | |||
dataIndex: 'age' | |||
}, | |||
{ | |||
title:'性别', | |||
align:"center", | |||
dataIndex: 'gender_dictText' | |||
}, | |||
{ | |||
title:'期望日薪', | |||
align:"center", | |||
dataIndex: 'dayMoney' | |||
}, | |||
{ | |||
title:'时间范围', | |||
align:"center", | |||
dataIndex: 'startTime' | |||
}, | |||
{ | |||
title:'时间范围', | |||
align:"center", | |||
dataIndex: 'endTime' | |||
}, | |||
{ | |||
title:'工作时长', | |||
align:"center", | |||
dataIndex: 'workTime' | |||
}, | |||
{ | |||
title:'期望薪资最小值', | |||
align:"center", | |||
dataIndex: 'moneymin' | |||
}, | |||
{ | |||
title:'期望薪资最大值', | |||
align:"center", | |||
dataIndex: 'moneymax' | |||
}, | |||
{ | |||
title:'审核状态 0审核中 1 审核通过 2审核未通过', | |||
align:"center", | |||
dataIndex: 'auditStatus_dictText' | |||
}, | |||
{ | |||
title:'结算方式 0提前支付 1 试用后支付', | |||
align:"center", | |||
dataIndex: 'payType_dictText' | |||
}, | |||
{ | |||
title: '操作', | |||
dataIndex: 'action', | |||
align:"center", | |||
fixed:"right", | |||
width:147, | |||
scopedSlots: { customRender: 'action' } | |||
} | |||
], | |||
url: { | |||
list: "/tbTask/tbTask/list", | |||
delete: "/tbTask/tbTask/delete", | |||
deleteBatch: "/tbTask/tbTask/deleteBatch", | |||
exportXlsUrl: "/tbTask/tbTask/exportXls", | |||
importExcelUrl: "tbTask/tbTask/importExcel", | |||
}, | |||
dictOptions:{}, | |||
superFieldList:[], | |||
} | |||
}, | |||
created() { | |||
this.getSuperFieldList(); | |||
}, | |||
computed: { | |||
importExcelUrl: function(){ | |||
return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`; | |||
}, | |||
}, | |||
methods: { | |||
initDictConfig(){ | |||
}, | |||
getSuperFieldList(){ | |||
let fieldList=[]; | |||
fieldList.push({type:'string',value:'userName',text:'用户名',dictCode:''}) | |||
fieldList.push({type:'string',value:'workName',text:'工人名',dictCode:''}) | |||
fieldList.push({type:'Text',value:'headPic',text:'头像图片',dictCode:''}) | |||
fieldList.push({type:'string',value:'title',text:'工作标题',dictCode:''}) | |||
fieldList.push({type:'string',value:'companyName',text:'公司名称',dictCode:''}) | |||
fieldList.push({type:'string',value:'workerAddress',text:'工人出发地址',dictCode:''}) | |||
fieldList.push({type:'int',value:'travelType',text:'出行方式 0出租车 1 网约车 2 公交地铁 3无',dictCode:'travel_type'}) | |||
fieldList.push({type:'string',value:'workAddress',text:'上班地址',dictCode:''}) | |||
fieldList.push({type:'string',value:'industryName',text:'行业/工种',dictCode:''}) | |||
fieldList.push({type:'Text',value:'detail',text:'工人个人简介',dictCode:''}) | |||
fieldList.push({type:'Text',value:'workDetail',text:'工作内容',dictCode:''}) | |||
fieldList.push({type:'Text',value:'workPic',text:'图片上传',dictCode:''}) | |||
fieldList.push({type:'string',value:'phone',text:'工人联系方式',dictCode:''}) | |||
fieldList.push({type:'string',value:'bossPhone',text:'招聘方联系方式',dictCode:''}) | |||
fieldList.push({type:'int',value:'role',text:'角色 0招聘方 1 求职方',dictCode:'user_role'}) | |||
fieldList.push({type:'int',value:'age',text:'年龄',dictCode:''}) | |||
fieldList.push({type:'int',value:'gender',text:'性别',dictCode:'sex'}) | |||
fieldList.push({type:'int',value:'dayMoney',text:'期望日薪',dictCode:''}) | |||
fieldList.push({type:'datetime',value:'startTime',text:'时间范围'}) | |||
fieldList.push({type:'datetime',value:'endTime',text:'时间范围'}) | |||
fieldList.push({type:'string',value:'workTime',text:'工作时长',dictCode:''}) | |||
fieldList.push({type:'int',value:'moneymin',text:'期望薪资最小值',dictCode:''}) | |||
fieldList.push({type:'int',value:'moneymax',text:'期望薪资最大值',dictCode:''}) | |||
fieldList.push({type:'int',value:'auditStatus',text:'审核状态 0审核中 1 审核通过 2审核未通过',dictCode:'audit_status'}) | |||
fieldList.push({type:'int',value:'payType',text:'结算方式 0提前支付 1 试用后支付',dictCode:'pay_type'}) | |||
this.superFieldList = fieldList | |||
} | |||
} | |||
} | |||
</script> | |||
<style scoped> | |||
@import '~@assets/less/common.less'; | |||
</style> |
@ -0,0 +1,224 @@ | |||
<template> | |||
<a-spin :spinning="confirmLoading"> | |||
<j-form-container :disabled="formDisabled"> | |||
<a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail"> | |||
<a-row> | |||
<a-col :span="24"> | |||
<a-form-model-item label="用户名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="userName"> | |||
<a-input v-model="model.userName" placeholder="请输入用户名" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工人名" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workName"> | |||
<a-input v-model="model.workName" placeholder="请输入工人名" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="头像图片" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="headPic"> | |||
<j-image-upload isMultiple v-model="model.headPic" ></j-image-upload> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工作标题" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="title"> | |||
<a-input v-model="model.title" placeholder="请输入工作标题" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="公司名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="companyName"> | |||
<a-input v-model="model.companyName" placeholder="请输入公司名称" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工人出发地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workerAddress"> | |||
<a-input v-model="model.workerAddress" placeholder="请输入工人出发地址" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="出行方式 0出租车 1 网约车 2 公交地铁 3无" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="travelType"> | |||
<j-dict-select-tag type="list" v-model="model.travelType" dictCode="travel_type" placeholder="请选择出行方式 0出租车 1 网约车 2 公交地铁 3无" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="上班地址" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workAddress"> | |||
<a-input v-model="model.workAddress" placeholder="请输入上班地址" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="行业/工种" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="industryName"> | |||
<a-input v-model="model.industryName" placeholder="请输入行业/工种" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工人个人简介" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="detail"> | |||
<j-editor v-model="model.detail" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工作内容" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workDetail"> | |||
<j-editor v-model="model.workDetail" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="图片上传" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workPic"> | |||
<j-image-upload isMultiple v-model="model.workPic" ></j-image-upload> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工人联系方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="phone"> | |||
<a-input v-model="model.phone" placeholder="请输入工人联系方式" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="招聘方联系方式" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="bossPhone"> | |||
<a-input v-model="model.bossPhone" placeholder="请输入招聘方联系方式" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="角色 0招聘方 1 求职方" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="role"> | |||
<j-dict-select-tag type="list" v-model="model.role" dictCode="user_role" placeholder="请选择角色 0招聘方 1 求职方" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="年龄" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="age"> | |||
<a-input-number v-model="model.age" placeholder="请输入年龄" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="性别" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="gender"> | |||
<j-dict-select-tag type="list" v-model="model.gender" dictCode="sex" placeholder="请选择性别" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="期望日薪" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="dayMoney"> | |||
<a-input-number v-model="model.dayMoney" placeholder="请输入期望日薪" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="时间范围" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="startTime"> | |||
<j-date placeholder="请选择时间范围" v-model="model.startTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="时间范围" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="endTime"> | |||
<j-date placeholder="请选择时间范围" v-model="model.endTime" :show-time="true" date-format="YYYY-MM-DD HH:mm:ss" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="工作时长" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="workTime"> | |||
<a-input v-model="model.workTime" placeholder="请输入工作时长" ></a-input> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="期望薪资最小值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moneymin"> | |||
<a-input-number v-model="model.moneymin" placeholder="请输入期望薪资最小值" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="期望薪资最大值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="moneymax"> | |||
<a-input-number v-model="model.moneymax" placeholder="请输入期望薪资最大值" style="width: 100%" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="审核状态 0审核中 1 审核通过 2审核未通过" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="auditStatus"> | |||
<j-dict-select-tag type="list" v-model="model.auditStatus" dictCode="audit_status" placeholder="请选择审核状态 0审核中 1 审核通过 2审核未通过" /> | |||
</a-form-model-item> | |||
</a-col> | |||
<a-col :span="24"> | |||
<a-form-model-item label="结算方式 0提前支付 1 试用后支付" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="payType"> | |||
<j-dict-select-tag type="list" v-model="model.payType" dictCode="pay_type" placeholder="请选择结算方式 0提前支付 1 试用后支付" /> | |||
</a-form-model-item> | |||
</a-col> | |||
</a-row> | |||
</a-form-model> | |||
</j-form-container> | |||
</a-spin> | |||
</template> | |||
<script> | |||
import { httpAction, getAction } from '@/api/manage' | |||
import { validateDuplicateValue } from '@/utils/util' | |||
export default { | |||
name: 'TbTaskForm', | |||
components: { | |||
}, | |||
props: { | |||
//表单禁用 | |||
disabled: { | |||
type: Boolean, | |||
default: false, | |||
required: false | |||
} | |||
}, | |||
data () { | |||
return { | |||
model:{ | |||
}, | |||
labelCol: { | |||
xs: { span: 24 }, | |||
sm: { span: 5 }, | |||
}, | |||
wrapperCol: { | |||
xs: { span: 24 }, | |||
sm: { span: 16 }, | |||
}, | |||
confirmLoading: false, | |||
validatorRules: { | |||
}, | |||
url: { | |||
add: "/tbTask/tbTask/add", | |||
edit: "/tbTask/tbTask/edit", | |||
queryById: "/tbTask/tbTask/queryById" | |||
} | |||
} | |||
}, | |||
computed: { | |||
formDisabled(){ | |||
return this.disabled | |||
}, | |||
}, | |||
created () { | |||
//备份model原始值 | |||
this.modelDefault = JSON.parse(JSON.stringify(this.model)); | |||
}, | |||
methods: { | |||
add () { | |||
this.edit(this.modelDefault); | |||
}, | |||
edit (record) { | |||
this.model = Object.assign({}, record); | |||
this.visible = true; | |||
}, | |||
submitForm () { | |||
const that = this; | |||
// 触发表单验证 | |||
this.$refs.form.validate(valid => { | |||
if (valid) { | |||
that.confirmLoading = true; | |||
let httpurl = ''; | |||
let method = ''; | |||
if(!this.model.id){ | |||
httpurl+=this.url.add; | |||
method = 'post'; | |||
}else{ | |||
httpurl+=this.url.edit; | |||
method = 'put'; | |||
} | |||
httpAction(httpurl,this.model,method).then((res)=>{ | |||
if(res.success){ | |||
that.$message.success(res.message); | |||
that.$emit('ok'); | |||
}else{ | |||
that.$message.warning(res.message); | |||
} | |||
}).finally(() => { | |||
that.confirmLoading = false; | |||
}) | |||
} | |||
}) | |||
}, | |||
} | |||
} | |||
</script> |
@ -0,0 +1,84 @@ | |||
<template> | |||
<a-drawer | |||
:title="title" | |||
:width="width" | |||
placement="right" | |||
:closable="false" | |||
@close="close" | |||
destroyOnClose | |||
:visible="visible"> | |||
<tb-task-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit" normal></tb-task-form> | |||
<div class="drawer-footer"> | |||
<a-button @click="handleCancel" style="margin-bottom: 0;">关闭</a-button> | |||
<a-button v-if="!disableSubmit" @click="handleOk" type="primary" style="margin-bottom: 0;">提交</a-button> | |||
</div> | |||
</a-drawer> | |||
</template> | |||
<script> | |||
import TbTaskForm from './TbTaskForm' | |||
export default { | |||
name: 'TbTaskModal', | |||
components: { | |||
TbTaskForm | |||
}, | |||
data () { | |||
return { | |||
title:"操作", | |||
width:800, | |||
visible: false, | |||
disableSubmit: false | |||
} | |||
}, | |||
methods: { | |||
add () { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.add(); | |||
}) | |||
}, | |||
edit (record) { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.edit(record); | |||
}); | |||
}, | |||
close () { | |||
this.$emit('close'); | |||
this.visible = false; | |||
}, | |||
submitCallback(){ | |||
this.$emit('ok'); | |||
this.visible = false; | |||
}, | |||
handleOk () { | |||
this.$refs.realForm.submitForm(); | |||
}, | |||
handleCancel () { | |||
this.close() | |||
} | |||
} | |||
} | |||
</script> | |||
<style lang="less" scoped> | |||
/** Button按钮间距 */ | |||
.ant-btn { | |||
margin-left: 30px; | |||
margin-bottom: 30px; | |||
float: right; | |||
} | |||
.drawer-footer{ | |||
position: absolute; | |||
bottom: -8px; | |||
width: 100%; | |||
border-top: 1px solid #e8e8e8; | |||
padding: 10px 16px; | |||
text-align: right; | |||
left: 0; | |||
background: #fff; | |||
border-radius: 0 0 2px 2px; | |||
} | |||
</style> |
@ -0,0 +1,60 @@ | |||
<template> | |||
<j-modal | |||
:title="title" | |||
:width="width" | |||
:visible="visible" | |||
switchFullscreen | |||
@ok="handleOk" | |||
:okButtonProps="{ class:{'jee-hidden': disableSubmit} }" | |||
@cancel="handleCancel" | |||
cancelText="关闭"> | |||
<tb-task-form ref="realForm" @ok="submitCallback" :disabled="disableSubmit"></tb-task-form> | |||
</j-modal> | |||
</template> | |||
<script> | |||
import TbTaskForm from './TbTaskForm' | |||
export default { | |||
name: 'TbTaskModal', | |||
components: { | |||
TbTaskForm | |||
}, | |||
data () { | |||
return { | |||
title:'', | |||
width:800, | |||
visible: false, | |||
disableSubmit: false | |||
} | |||
}, | |||
methods: { | |||
add () { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.add(); | |||
}) | |||
}, | |||
edit (record) { | |||
this.visible=true | |||
this.$nextTick(()=>{ | |||
this.$refs.realForm.edit(record); | |||
}) | |||
}, | |||
close () { | |||
this.$emit('close'); | |||
this.visible = false; | |||
}, | |||
handleOk () { | |||
this.$refs.realForm.submitForm(); | |||
}, | |||
submitCallback(){ | |||
this.$emit('ok'); | |||
this.visible = false; | |||
}, | |||
handleCancel () { | |||
this.close() | |||
} | |||
} | |||
} | |||
</script> |
@ -0,0 +1,61 @@ | |||
import {defHttp} from '/@/utils/http/axios'; | |||
import {Modal} from 'ant-design-vue'; | |||
enum Api { | |||
list = '/tbTask/tbTask/list', | |||
save='/tbTask/tbTask/add', | |||
edit='/tbTask/tbTask/edit', | |||
deleteOne = '/tbTask/tbTask/delete', | |||
deleteBatch = '/tbTask/tbTask/deleteBatch', | |||
importExcel = '/tbTask/tbTask/importExcel', | |||
exportXls = '/tbTask/tbTask/exportXls', | |||
} | |||
/** | |||
* 导出api | |||
* @param params | |||
*/ | |||
export const getExportUrl = Api.exportXls; | |||
/** | |||
* 导入api | |||
*/ | |||
export const getImportUrl = Api.importExcel; | |||
/** | |||
* 列表接口 | |||
* @param params | |||
*/ | |||
export const list = (params) => | |||
defHttp.get({url: Api.list, params}); | |||
/** | |||
* 删除单个 | |||
*/ | |||
export const deleteOne = (params,handleSuccess) => { | |||
return defHttp.delete({url: Api.deleteOne, params}, {joinParamsToUrl: true}).then(() => { | |||
handleSuccess(); | |||
}); | |||
} | |||
/** | |||
* 批量删除 | |||
* @param params | |||
*/ | |||
export const batchDelete = (params, handleSuccess) => { | |||
Modal.confirm({ | |||
title: '确认删除', | |||
content: '是否删除选中数据', | |||
okText: '确认', | |||
cancelText: '取消', | |||
onOk: () => { | |||
return defHttp.delete({url: Api.deleteBatch, data: params}, {joinParamsToUrl: true}).then(() => { | |||
handleSuccess(); | |||
}); | |||
} | |||
}); | |||
} | |||
/** | |||
* 保存或者更新 | |||
* @param params | |||
*/ | |||
export const saveOrUpdate = (params, isUpdate) => { | |||
let url = isUpdate ? Api.edit : Api.save; | |||
return defHttp.post({url: url, params}); | |||
} |
@ -0,0 +1,316 @@ | |||
import {BasicColumn} from '/@/components/Table'; | |||
import {FormSchema} from '/@/components/Table'; | |||
import { rules} from '/@/utils/helper/validator'; | |||
import { render } from '/@/utils/common/renderUtils'; | |||
//列表数据 | |||
export const columns: BasicColumn[] = [ | |||
{ | |||
title: '用户名', | |||
align:"center", | |||
dataIndex: 'userName' | |||
}, | |||
{ | |||
title: '工人名', | |||
align:"center", | |||
dataIndex: 'workName' | |||
}, | |||
{ | |||
title: '头像图片', | |||
align:"center", | |||
dataIndex: 'headPic', | |||
customRender:render.renderAvatar, | |||
}, | |||
{ | |||
title: '工作标题', | |||
align:"center", | |||
dataIndex: 'title' | |||
}, | |||
{ | |||
title: '公司名称', | |||
align:"center", | |||
dataIndex: 'companyName' | |||
}, | |||
{ | |||
title: '工人出发地址', | |||
align:"center", | |||
dataIndex: 'workerAddress' | |||
}, | |||
{ | |||
title: '出行方式 0出租车 1 网约车 2 公交地铁 3无', | |||
align:"center", | |||
dataIndex: 'travelType_dictText' | |||
}, | |||
{ | |||
title: '上班地址', | |||
align:"center", | |||
dataIndex: 'workAddress' | |||
}, | |||
{ | |||
title: '行业/工种', | |||
align:"center", | |||
dataIndex: 'industryName' | |||
}, | |||
{ | |||
title: '工人个人简介', | |||
align:"center", | |||
dataIndex: 'detail', | |||
slots: { customRender: 'htmlSlot' }, | |||
}, | |||
{ | |||
title: '工作内容', | |||
align:"center", | |||
dataIndex: 'workDetail', | |||
slots: { customRender: 'htmlSlot' }, | |||
}, | |||
{ | |||
title: '图片上传', | |||
align:"center", | |||
dataIndex: 'workPic', | |||
customRender:render.renderAvatar, | |||
}, | |||
{ | |||
title: '工人联系方式', | |||
align:"center", | |||
dataIndex: 'phone' | |||
}, | |||
{ | |||
title: '招聘方联系方式', | |||
align:"center", | |||
dataIndex: 'bossPhone' | |||
}, | |||
{ | |||
title: '角色 0招聘方 1 求职方', | |||
align:"center", | |||
dataIndex: 'role_dictText' | |||
}, | |||
{ | |||
title: '年龄', | |||
align:"center", | |||
dataIndex: 'age' | |||
}, | |||
{ | |||
title: '性别', | |||
align:"center", | |||
dataIndex: 'gender_dictText' | |||
}, | |||
{ | |||
title: '期望日薪', | |||
align:"center", | |||
dataIndex: 'dayMoney' | |||
}, | |||
{ | |||
title: '时间范围', | |||
align:"center", | |||
dataIndex: 'startTime' | |||
}, | |||
{ | |||
title: '时间范围', | |||
align:"center", | |||
dataIndex: 'endTime' | |||
}, | |||
{ | |||
title: '工作时长', | |||
align:"center", | |||
dataIndex: 'workTime' | |||
}, | |||
{ | |||
title: '期望薪资最小值', | |||
align:"center", | |||
dataIndex: 'moneymin' | |||
}, | |||
{ | |||
title: '期望薪资最大值', | |||
align:"center", | |||
dataIndex: 'moneymax' | |||
}, | |||
{ | |||
title: '审核状态 0审核中 1 审核通过 2审核未通过', | |||
align:"center", | |||
dataIndex: 'auditStatus_dictText' | |||
}, | |||
{ | |||
title: '结算方式 0提前支付 1 试用后支付', | |||
align:"center", | |||
dataIndex: 'payType_dictText' | |||
}, | |||
]; | |||
//查询数据 | |||
export const searchFormSchema: FormSchema[] = [ | |||
{ | |||
label: "用户名", | |||
field: "userName", | |||
component: 'Input', | |||
colProps: {span: 6}, | |||
}, | |||
{ | |||
label: "工人名", | |||
field: "workName", | |||
component: 'Input', | |||
colProps: {span: 6}, | |||
}, | |||
{ | |||
label: "公司名称", | |||
field: "companyName", | |||
component: 'Input', | |||
colProps: {span: 6}, | |||
}, | |||
{ | |||
label: "工人联系方式", | |||
field: "phone", | |||
component: 'Input', | |||
colProps: {span: 6}, | |||
}, | |||
{ | |||
label: "招聘方联系方式", | |||
field: "bossPhone", | |||
component: 'Input', | |||
colProps: {span: 6}, | |||
}, | |||
]; | |||
//表单数据 | |||
export const formSchema: FormSchema[] = [ | |||
{ | |||
label: '用户名', | |||
field: 'userName', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '工人名', | |||
field: 'workName', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '头像图片', | |||
field: 'headPic', | |||
component: 'JImageUpload', | |||
componentProps:{ | |||
}, | |||
}, | |||
{ | |||
label: '工作标题', | |||
field: 'title', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '公司名称', | |||
field: 'companyName', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '工人出发地址', | |||
field: 'workerAddress', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '出行方式 0出租车 1 网约车 2 公交地铁 3无', | |||
field: 'travelType', | |||
component: 'JDictSelectTag', | |||
componentProps:{ | |||
dictCode:"travel_type" | |||
}, | |||
}, | |||
{ | |||
label: '上班地址', | |||
field: 'workAddress', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '行业/工种', | |||
field: 'industryName', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '工人个人简介', | |||
field: 'detail', | |||
component: 'JCodeEditor', //TODO String后缀暂未添加 | |||
}, | |||
{ | |||
label: '工作内容', | |||
field: 'workDetail', | |||
component: 'JCodeEditor', //TODO String后缀暂未添加 | |||
}, | |||
{ | |||
label: '图片上传', | |||
field: 'workPic', | |||
component: 'JImageUpload', | |||
componentProps:{ | |||
}, | |||
}, | |||
{ | |||
label: '工人联系方式', | |||
field: 'phone', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '招聘方联系方式', | |||
field: 'bossPhone', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '角色 0招聘方 1 求职方', | |||
field: 'role', | |||
component: 'JDictSelectTag', | |||
componentProps:{ | |||
dictCode:"user_role" | |||
}, | |||
}, | |||
{ | |||
label: '年龄', | |||
field: 'age', | |||
component: 'InputNumber', | |||
}, | |||
{ | |||
label: '性别', | |||
field: 'gender', | |||
component: 'JDictSelectTag', | |||
componentProps:{ | |||
dictCode:"sex" | |||
}, | |||
}, | |||
{ | |||
label: '期望日薪', | |||
field: 'dayMoney', | |||
component: 'InputNumber', | |||
}, | |||
{ | |||
label: '时间范围', | |||
field: 'startTime', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '时间范围', | |||
field: 'endTime', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '工作时长', | |||
field: 'workTime', | |||
component: 'Input', | |||
}, | |||
{ | |||
label: '期望薪资最小值', | |||
field: 'moneymin', | |||
component: 'InputNumber', | |||
}, | |||
{ | |||
label: '期望薪资最大值', | |||
field: 'moneymax', | |||
component: 'InputNumber', | |||
}, | |||
{ | |||
label: '审核状态 0审核中 1 审核通过 2审核未通过', | |||
field: 'auditStatus', | |||
component: 'JDictSelectTag', | |||
componentProps:{ | |||
dictCode:"audit_status" | |||
}, | |||
}, | |||
{ | |||
label: '结算方式 0提前支付 1 试用后支付', | |||
field: 'payType', | |||
component: 'JDictSelectTag', | |||
componentProps:{ | |||
dictCode:"pay_type" | |||
}, | |||
}, | |||
]; |
@ -0,0 +1,162 @@ | |||
<template> | |||
<div> | |||
<!--引用表格--> | |||
<BasicTable @register="registerTable" :rowSelection="rowSelection"> | |||
<!--插槽:table标题--> | |||
<template #tableTitle> | |||
<a-button type="primary" @click="handleAdd" preIcon="ant-design:plus-outlined"> 新增</a-button> | |||
<a-button type="primary" preIcon="ant-design:export-outlined" @click="onExportXls"> 导出</a-button> | |||
<j-upload-button type="primary" preIcon="ant-design:import-outlined" @click="onImportXls">导入</j-upload-button> | |||
<a-dropdown v-if="checkedKeys.length > 0"> | |||
<template #overlay> | |||
<a-menu> | |||
<a-menu-item key="1" @click="batchHandleDelete"> | |||
<Icon icon="ant-design:delete-outlined"></Icon> | |||
删除 | |||
</a-menu-item> | |||
</a-menu> | |||
</template> | |||
<a-button>批量操作 | |||
<Icon icon="mdi:chevron-down"></Icon> | |||
</a-button> | |||
</a-dropdown> | |||
</template> | |||
<!--操作栏--> | |||
<template #action="{ record }"> | |||
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> | |||
</template> | |||
<!--字段回显插槽--> | |||
<template #htmlSlot="{text}"> | |||
<div v-html="text"></div> | |||
</template> | |||
<template #fileSlot="{text}"> | |||
<span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span> | |||
<a-button v-else :ghost="true" type="primary" preIcon="ant-design:download-outlined" size="small" @click="downloadFile(text)">下载</a-button> | |||
</template> | |||
</BasicTable> | |||
<!-- 表单区域 --> | |||
<TbTaskModal @register="registerModal" @success="handleSuccess"></TbTaskModal> | |||
</div> | |||
</template> | |||
<script lang="ts" name="tbTask-tbTask" setup> | |||
import {ref, computed, unref} from 'vue'; | |||
import {BasicTable, useTable, TableAction} from '/@/components/Table'; | |||
import {useModal} from '/@/components/Modal'; | |||
import { useListPage } from '/@/hooks/system/useListPage' | |||
import TbTaskModal from './components/TbTaskModal.vue' | |||
import {columns, searchFormSchema} from './tbTask.data'; | |||
import {list, deleteOne, batchDelete, getImportUrl,getExportUrl} from './tbTask.api'; | |||
const checkedKeys = ref<Array<string | number>>([]); | |||
//注册model | |||
const [registerModal, {openModal}] = useModal(); | |||
//注册table数据 | |||
const { prefixCls,tableContext,onExportXls,onImportXls } = useListPage({ | |||
tableProps:{ | |||
title: 'tb_task', | |||
api: list, | |||
columns, | |||
canResize:false, | |||
formConfig: { | |||
labelWidth: 120, | |||
schemas: searchFormSchema, | |||
autoSubmitOnEnter:true, | |||
showAdvancedButton:true, | |||
fieldMapToTime: [ | |||
], | |||
}, | |||
actionColumn: { | |||
width: 120, | |||
}, | |||
}, | |||
exportConfig: { | |||
name:"tb_task", | |||
url: getExportUrl, | |||
}, | |||
importConfig: { | |||
url: getImportUrl | |||
}, | |||
}) | |||
const [registerTable, {reload},{ rowSelection, selectedRowKeys }] = tableContext | |||
/** | |||
* 新增事件 | |||
*/ | |||
function handleAdd() { | |||
openModal(true, { | |||
isUpdate: false, | |||
showFooter: true, | |||
}); | |||
} | |||
/** | |||
* 编辑事件 | |||
*/ | |||
function handleEdit(record: Recordable) { | |||
openModal(true, { | |||
record, | |||
isUpdate: true, | |||
showFooter: true, | |||
}); | |||
} | |||
/** | |||
* 详情 | |||
*/ | |||
function handleDetail(record: Recordable) { | |||
openModal(true, { | |||
record, | |||
isUpdate: true, | |||
showFooter: false, | |||
}); | |||
} | |||
/** | |||
* 删除事件 | |||
*/ | |||
async function handleDelete(record) { | |||
await deleteOne({id: record.id}, reload); | |||
} | |||
/** | |||
* 批量删除事件 | |||
*/ | |||
async function batchHandleDelete() { | |||
await batchDelete({ids: checkedKeys.value}, reload); | |||
} | |||
/** | |||
* 成功回调 | |||
*/ | |||
function handleSuccess() { | |||
reload(); | |||
} | |||
/** | |||
* 操作栏 | |||
*/ | |||
function getTableAction(record){ | |||
return [ | |||
{ | |||
label: '编辑', | |||
onClick: handleEdit.bind(null, record), | |||
} | |||
] | |||
} | |||
/** | |||
* 下拉操作栏 | |||
*/ | |||
function getDropDownAction(record){ | |||
return [ | |||
{ | |||
label: '详情', | |||
onClick: handleDetail.bind(null, record), | |||
}, { | |||
label: '删除', | |||
popConfirm: { | |||
title: '是否确认删除', | |||
confirm: handleDelete.bind(null, record), | |||
} | |||
} | |||
] | |||
} | |||
</script> | |||
<style scoped> | |||
</style> |
@ -0,0 +1,58 @@ | |||
<template> | |||
<BasicModal v-bind="$attrs" @register="registerModal" :title="title" @ok="handleSubmit"> | |||
<BasicForm @register="registerForm"/> | |||
</BasicModal> | |||
</template> | |||
<script lang="ts" setup> | |||
import {ref, computed, unref} from 'vue'; | |||
import {BasicModal, useModalInner} from '/@/components/Modal'; | |||
import {BasicForm, useForm} from '/@/components/Form/index'; | |||
import {formSchema} from '../tbTask.data'; | |||
import {saveOrUpdate} from '../tbTask.api'; | |||
// Emits声明 | |||
const emit = defineEmits(['register','success']); | |||
const isUpdate = ref(true); | |||
//表单配置 | |||
const [registerForm, {setProps,resetFields, setFieldsValue, validate}] = useForm({ | |||
labelWidth: 150, | |||
schemas: formSchema, | |||
showActionButtonGroup: false, | |||
}); | |||
//表单赋值 | |||
const [registerModal, {setModalProps, closeModal}] = useModalInner(async (data) => { | |||
//重置表单 | |||
await resetFields(); | |||
setModalProps({confirmLoading: false,showCancelBtn:!!data?.showFooter,showOkBtn:!!data?.showFooter}); | |||
isUpdate.value = !!data?.isUpdate; | |||
if (unref(isUpdate)) { | |||
//表单赋值 | |||
await setFieldsValue({ | |||
...data.record, | |||
}); | |||
} | |||
// 隐藏底部时禁用整个表单 | |||
setProps({ disabled: !data?.showFooter }) | |||
}); | |||
//设置标题 | |||
const title = computed(() => (!unref(isUpdate) ? '新增' : '编辑')); | |||
//表单提交事件 | |||
async function handleSubmit(v) { | |||
try { | |||
let values = await validate(); | |||
setModalProps({confirmLoading: true}); | |||
//提交表单 | |||
await saveOrUpdate(values, isUpdate.value); | |||
//关闭弹窗 | |||
closeModal(); | |||
//刷新列表 | |||
emit('success'); | |||
} finally { | |||
setModalProps({confirmLoading: false}); | |||
} | |||
} | |||
</script> | |||
<style lang="less" scoped> | |||
</style> |