完善订单功能
This commit is contained in:
parent
58f276922f
commit
41fb244499
@ -1,6 +1,14 @@
|
|||||||
package com.ruoyi.web.controller.custom;
|
package com.ruoyi.web.controller.custom;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||||
|
import com.ruoyi.system.domain.SysPost;
|
||||||
|
import com.ruoyi.system.domain.SysUserPost;
|
||||||
|
import com.ruoyi.system.domain.custom.UserPostOption;
|
||||||
|
import com.ruoyi.system.service.ISysPostService;
|
||||||
|
import com.ruoyi.system.service.ISysUserService;
|
||||||
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
@ -28,31 +36,36 @@ import com.ruoyi.common.core.page.TableDataInfo;
|
|||||||
*/
|
*/
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping("/custom/order")
|
@RequestMapping("/custom/order")
|
||||||
public class SysOrderController extends BaseController
|
public class SysOrderController extends BaseController {
|
||||||
{
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private ISysOrderService sysOrderService;
|
private ISysOrderService sysOrderService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysPostService postService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService userService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询销售订单列表
|
* 查询销售订单列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('custom:order:list')")
|
@PreAuthorize("@ss.hasPermi('custom:order:list')")
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SysOrder sysOrder)
|
public TableDataInfo list(SysOrder sysOrder) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<SysOrder> list = sysOrderService.selectSysOrderList(sysOrder);
|
List<SysOrder> list = sysOrderService.selectSysOrderList(sysOrder);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 导出销售订单列表
|
* 导出销售订单列表
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('custom:order:export')")
|
@PreAuthorize("@ss.hasPermi('custom:order:export')")
|
||||||
@Log(title = "销售订单", businessType = BusinessType.EXPORT)
|
@Log(title = "销售订单", businessType = BusinessType.EXPORT)
|
||||||
@GetMapping("/export")
|
@GetMapping("/export")
|
||||||
public AjaxResult export(SysOrder sysOrder)
|
public AjaxResult export(SysOrder sysOrder) {
|
||||||
{
|
|
||||||
List<SysOrder> list = sysOrderService.selectSysOrderList(sysOrder);
|
List<SysOrder> list = sysOrderService.selectSysOrderList(sysOrder);
|
||||||
ExcelUtil<SysOrder> util = new ExcelUtil<SysOrder>(SysOrder.class);
|
ExcelUtil<SysOrder> util = new ExcelUtil<SysOrder>(SysOrder.class);
|
||||||
return util.exportExcel(list, "order");
|
return util.exportExcel(list, "order");
|
||||||
@ -63,8 +76,7 @@ public class SysOrderController extends BaseController
|
|||||||
*/
|
*/
|
||||||
@PreAuthorize("@ss.hasPermi('custom:order:query')")
|
@PreAuthorize("@ss.hasPermi('custom:order:query')")
|
||||||
@GetMapping(value = "/{orderId}")
|
@GetMapping(value = "/{orderId}")
|
||||||
public AjaxResult getInfo(@PathVariable("orderId") Long orderId)
|
public AjaxResult getInfo(@PathVariable("orderId") Long orderId) {
|
||||||
{
|
|
||||||
return AjaxResult.success(sysOrderService.selectSysOrderById(orderId));
|
return AjaxResult.success(sysOrderService.selectSysOrderById(orderId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -74,8 +86,7 @@ public class SysOrderController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('custom:order:add')")
|
@PreAuthorize("@ss.hasPermi('custom:order:add')")
|
||||||
@Log(title = "销售订单", businessType = BusinessType.INSERT)
|
@Log(title = "销售订单", businessType = BusinessType.INSERT)
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public AjaxResult add(@RequestBody SysOrder sysOrder)
|
public AjaxResult add(@RequestBody SysOrder sysOrder) {
|
||||||
{
|
|
||||||
return toAjax(sysOrderService.insertSysOrder(sysOrder));
|
return toAjax(sysOrderService.insertSysOrder(sysOrder));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -85,8 +96,7 @@ public class SysOrderController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('custom:order:edit')")
|
@PreAuthorize("@ss.hasPermi('custom:order:edit')")
|
||||||
@Log(title = "销售订单", businessType = BusinessType.UPDATE)
|
@Log(title = "销售订单", businessType = BusinessType.UPDATE)
|
||||||
@PutMapping
|
@PutMapping
|
||||||
public AjaxResult edit(@RequestBody SysOrder sysOrder)
|
public AjaxResult edit(@RequestBody SysOrder sysOrder) {
|
||||||
{
|
|
||||||
return toAjax(sysOrderService.updateSysOrder(sysOrder));
|
return toAjax(sysOrderService.updateSysOrder(sysOrder));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -96,8 +106,29 @@ public class SysOrderController extends BaseController
|
|||||||
@PreAuthorize("@ss.hasPermi('custom:order:remove')")
|
@PreAuthorize("@ss.hasPermi('custom:order:remove')")
|
||||||
@Log(title = "销售订单", businessType = BusinessType.DELETE)
|
@Log(title = "销售订单", businessType = BusinessType.DELETE)
|
||||||
@DeleteMapping("/{orderIds}")
|
@DeleteMapping("/{orderIds}")
|
||||||
public AjaxResult remove(@PathVariable Long[] orderIds)
|
public AjaxResult remove(@PathVariable Long[] orderIds) {
|
||||||
{
|
|
||||||
return toAjax(sysOrderService.deleteSysOrderByIds(orderIds));
|
return toAjax(sysOrderService.deleteSysOrderByIds(orderIds));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@GetMapping("/getOptions")
|
||||||
|
public AjaxResult getOptions() {
|
||||||
|
AjaxResult ajax = AjaxResult.success();
|
||||||
|
List<SysUserPost> userPosts = postService.selectUserPostAll();
|
||||||
|
|
||||||
|
List<UserPostOption> userPostOptions = new ArrayList<>();
|
||||||
|
|
||||||
|
for (SysUserPost userPost : userPosts) {
|
||||||
|
SysPost post = postService.selectPostById(userPost.getPostId());
|
||||||
|
SysUser user = userService.selectUserById(userPost.getUserId());
|
||||||
|
UserPostOption userPostOption = new UserPostOption();
|
||||||
|
userPostOption.setPostCode(post.getPostCode());
|
||||||
|
userPostOption.setUserId(userPost.getUserId());
|
||||||
|
userPostOption.setUserName(user.getNickName());
|
||||||
|
userPostOptions.add(userPostOption);
|
||||||
|
}
|
||||||
|
|
||||||
|
ajax.put(AjaxResult.DATA_TAG, userPostOptions);
|
||||||
|
return ajax;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
@ -1,57 +1,60 @@
|
|||||||
# 数据源配置
|
# 数据源配置
|
||||||
spring:
|
spring:
|
||||||
datasource:
|
datasource:
|
||||||
type: com.alibaba.druid.pool.DruidDataSource
|
type: com.alibaba.druid.pool.DruidDataSource
|
||||||
driverClassName: com.mysql.cj.jdbc.Driver
|
driverClassName: com.mysql.cj.jdbc.Driver
|
||||||
druid:
|
druid:
|
||||||
# 主库数据源
|
# 主库数据源
|
||||||
master:
|
master:
|
||||||
url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
# url: jdbc:mysql://localhost:3306/ry-vue?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
username: root
|
# password: wonderdb
|
||||||
password: wonderdb
|
|
||||||
# 从库数据源
|
url: jdbc:mysql://47.97.194.44:3306/long_shop?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
|
||||||
slave:
|
password: 9gPUnV$#2s/j(7_(
|
||||||
# 从数据源开关/默认关闭
|
username: root
|
||||||
enabled: false
|
# 从库数据源
|
||||||
url:
|
slave:
|
||||||
username:
|
# 从数据源开关/默认关闭
|
||||||
password:
|
enabled: false
|
||||||
# 初始连接数
|
url:
|
||||||
initialSize: 5
|
username:
|
||||||
# 最小连接池数量
|
password:
|
||||||
minIdle: 10
|
# 初始连接数
|
||||||
# 最大连接池数量
|
initialSize: 5
|
||||||
maxActive: 20
|
# 最小连接池数量
|
||||||
# 配置获取连接等待超时的时间
|
minIdle: 10
|
||||||
maxWait: 60000
|
# 最大连接池数量
|
||||||
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
maxActive: 20
|
||||||
timeBetweenEvictionRunsMillis: 60000
|
# 配置获取连接等待超时的时间
|
||||||
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
maxWait: 60000
|
||||||
minEvictableIdleTimeMillis: 300000
|
# 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒
|
||||||
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
timeBetweenEvictionRunsMillis: 60000
|
||||||
maxEvictableIdleTimeMillis: 900000
|
# 配置一个连接在池中最小生存的时间,单位是毫秒
|
||||||
# 配置检测连接是否有效
|
minEvictableIdleTimeMillis: 300000
|
||||||
validationQuery: SELECT 1 FROM DUAL
|
# 配置一个连接在池中最大生存的时间,单位是毫秒
|
||||||
testWhileIdle: true
|
maxEvictableIdleTimeMillis: 900000
|
||||||
testOnBorrow: false
|
# 配置检测连接是否有效
|
||||||
testOnReturn: false
|
validationQuery: SELECT 1 FROM DUAL
|
||||||
webStatFilter:
|
testWhileIdle: true
|
||||||
enabled: true
|
testOnBorrow: false
|
||||||
statViewServlet:
|
testOnReturn: false
|
||||||
enabled: true
|
webStatFilter:
|
||||||
# 设置白名单,不填则允许所有访问
|
enabled: true
|
||||||
allow:
|
statViewServlet:
|
||||||
url-pattern: /druid/*
|
enabled: true
|
||||||
# 控制台管理用户名和密码
|
# 设置白名单,不填则允许所有访问
|
||||||
login-username:
|
allow:
|
||||||
login-password:
|
url-pattern: /druid/*
|
||||||
filter:
|
# 控制台管理用户名和密码
|
||||||
stat:
|
login-username:
|
||||||
enabled: true
|
login-password:
|
||||||
# 慢SQL记录
|
filter:
|
||||||
log-slow-sql: true
|
stat:
|
||||||
slow-sql-millis: 1000
|
enabled: true
|
||||||
merge-sql: true
|
# 慢SQL记录
|
||||||
wall:
|
log-slow-sql: true
|
||||||
config:
|
slow-sql-millis: 1000
|
||||||
multi-statement-allow: true
|
merge-sql: true
|
||||||
|
wall:
|
||||||
|
config:
|
||||||
|
multi-statement-allow: true
|
@ -0,0 +1,43 @@
|
|||||||
|
package com.ruoyi.system.domain.custom;
|
||||||
|
|
||||||
|
public class UserPostOption {
|
||||||
|
|
||||||
|
private Long userId;
|
||||||
|
|
||||||
|
private String userName;
|
||||||
|
|
||||||
|
private String postCode;
|
||||||
|
|
||||||
|
public String getPostCode() {
|
||||||
|
return postCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getUserId() {
|
||||||
|
return userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserName() {
|
||||||
|
return userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPostCode(String postCode) {
|
||||||
|
this.postCode = postCode;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserId(Long userId) {
|
||||||
|
this.userId = userId;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserName(String userName) {
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return "UserPostOption{" +
|
||||||
|
"userId=" + userId +
|
||||||
|
", userName='" + userName + '\'' +
|
||||||
|
", postCode='" + postCode + '\'' +
|
||||||
|
'}';
|
||||||
|
}
|
||||||
|
}
|
@ -1,18 +1,19 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.ruoyi.system.domain.SysPost;
|
import com.ruoyi.system.domain.SysPost;
|
||||||
|
import com.ruoyi.system.domain.SysUserPost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位信息 数据层
|
* 岗位信息 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysPostMapper
|
public interface SysPostMapper {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* 查询岗位数据集合
|
* 查询岗位数据集合
|
||||||
*
|
*
|
||||||
* @param post 岗位信息
|
* @param post 岗位信息
|
||||||
* @return 岗位数据集合
|
* @return 岗位数据集合
|
||||||
*/
|
*/
|
||||||
@ -20,14 +21,16 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有岗位
|
* 查询所有岗位
|
||||||
*
|
*
|
||||||
* @return 岗位列表
|
* @return 岗位列表
|
||||||
*/
|
*/
|
||||||
public List<SysPost> selectPostAll();
|
public List<SysPost> selectPostAll();
|
||||||
|
|
||||||
|
public List<SysUserPost> selectUserPostAll();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过岗位ID查询岗位信息
|
* 通过岗位ID查询岗位信息
|
||||||
*
|
*
|
||||||
* @param postId 岗位ID
|
* @param postId 岗位ID
|
||||||
* @return 角色对象信息
|
* @return 角色对象信息
|
||||||
*/
|
*/
|
||||||
@ -35,7 +38,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 根据用户ID获取岗位选择框列表
|
* 根据用户ID获取岗位选择框列表
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 选中岗位ID列表
|
* @return 选中岗位ID列表
|
||||||
*/
|
*/
|
||||||
@ -43,7 +46,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询用户所属岗位组
|
* 查询用户所属岗位组
|
||||||
*
|
*
|
||||||
* @param userName 用户名
|
* @param userName 用户名
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -51,7 +54,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除岗位信息
|
* 删除岗位信息
|
||||||
*
|
*
|
||||||
* @param postId 岗位ID
|
* @param postId 岗位ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -59,7 +62,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除岗位信息
|
* 批量删除岗位信息
|
||||||
*
|
*
|
||||||
* @param postIds 需要删除的岗位ID
|
* @param postIds 需要删除的岗位ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -67,7 +70,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改岗位信息
|
* 修改岗位信息
|
||||||
*
|
*
|
||||||
* @param post 岗位信息
|
* @param post 岗位信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -75,7 +78,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增岗位信息
|
* 新增岗位信息
|
||||||
*
|
*
|
||||||
* @param post 岗位信息
|
* @param post 岗位信息
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -83,7 +86,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验岗位名称
|
* 校验岗位名称
|
||||||
*
|
*
|
||||||
* @param postName 岗位名称
|
* @param postName 岗位名称
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -91,7 +94,7 @@ public interface SysPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验岗位编码
|
* 校验岗位编码
|
||||||
*
|
*
|
||||||
* @param postCode 岗位编码
|
* @param postCode 岗位编码
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -1,18 +1,19 @@
|
|||||||
package com.ruoyi.system.mapper;
|
package com.ruoyi.system.mapper;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import com.ruoyi.system.domain.SysUserPost;
|
import com.ruoyi.system.domain.SysUserPost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户与岗位关联表 数据层
|
* 用户与岗位关联表 数据层
|
||||||
*
|
*
|
||||||
* @author ruoyi
|
* @author ruoyi
|
||||||
*/
|
*/
|
||||||
public interface SysUserPostMapper
|
public interface SysUserPostMapper {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* 通过用户ID删除用户和岗位关联
|
* 通过用户ID删除用户和岗位关联
|
||||||
*
|
*
|
||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -20,7 +21,7 @@ public interface SysUserPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过岗位ID查询岗位使用数量
|
* 通过岗位ID查询岗位使用数量
|
||||||
*
|
*
|
||||||
* @param postId 岗位ID
|
* @param postId 岗位ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -28,7 +29,7 @@ public interface SysUserPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量删除用户和岗位关联
|
* 批量删除用户和岗位关联
|
||||||
*
|
*
|
||||||
* @param ids 需要删除的数据ID
|
* @param ids 需要删除的数据ID
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
@ -36,7 +37,7 @@ public interface SysUserPostMapper
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 批量新增用户岗位信息
|
* 批量新增用户岗位信息
|
||||||
*
|
*
|
||||||
* @param userPostList 用户角色列表
|
* @param userPostList 用户角色列表
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
|
@ -2,6 +2,7 @@ package com.ruoyi.system.service;
|
|||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import com.ruoyi.system.domain.SysPost;
|
import com.ruoyi.system.domain.SysPost;
|
||||||
|
import com.ruoyi.system.domain.SysUserPost;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 岗位信息 服务层
|
* 岗位信息 服务层
|
||||||
@ -18,6 +19,8 @@ public interface ISysPostService
|
|||||||
*/
|
*/
|
||||||
public List<SysPost> selectPostList(SysPost post);
|
public List<SysPost> selectPostList(SysPost post);
|
||||||
|
|
||||||
|
public List<SysUserPost> selectUserPostAll();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询所有岗位
|
* 查询所有岗位
|
||||||
*
|
*
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
package com.ruoyi.system.service.impl;
|
package com.ruoyi.system.service.impl;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import com.ruoyi.system.domain.SysUserPost;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import com.ruoyi.common.constant.UserConstants;
|
import com.ruoyi.common.constant.UserConstants;
|
||||||
@ -48,6 +50,11 @@ public class SysPostServiceImpl implements ISysPostService
|
|||||||
return postMapper.selectPostAll();
|
return postMapper.selectPostAll();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<SysUserPost> selectUserPostAll() {
|
||||||
|
return postMapper.selectUserPostAll();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过岗位ID查询岗位信息
|
* 通过岗位ID查询岗位信息
|
||||||
*
|
*
|
||||||
|
@ -1,122 +1,135 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper
|
<!DOCTYPE mapper
|
||||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.ruoyi.system.mapper.SysPostMapper">
|
<mapper namespace="com.ruoyi.system.mapper.SysPostMapper">
|
||||||
|
|
||||||
<resultMap type="SysPost" id="SysPostResult">
|
<resultMap type="SysPost" id="SysPostResult">
|
||||||
<id property="postId" column="post_id" />
|
<id property="postId" column="post_id"/>
|
||||||
<result property="postCode" column="post_code" />
|
<result property="postCode" column="post_code"/>
|
||||||
<result property="postName" column="post_name" />
|
<result property="postName" column="post_name"/>
|
||||||
<result property="postSort" column="post_sort" />
|
<result property="postSort" column="post_sort"/>
|
||||||
<result property="status" column="status" />
|
<result property="status" column="status"/>
|
||||||
<result property="createBy" column="create_by" />
|
<result property="createBy" column="create_by"/>
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time"/>
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by"/>
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time"/>
|
||||||
<result property="remark" column="remark" />
|
<result property="remark" column="remark"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectPostVo">
|
<resultMap id="SysUserPostResult" type="SysUserPost">
|
||||||
|
<id property="userId" column="user_id"/>
|
||||||
|
<result property="postId" column="post_id"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
<sql id="selectPostVo">
|
||||||
select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
|
select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
|
||||||
from sys_post
|
from sys_post
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
|
<sql id="selectUserPostVo">
|
||||||
<include refid="selectPostVo"/>
|
select * from sys_user_post
|
||||||
<where>
|
</sql>
|
||||||
<if test="postCode != null and postCode != ''">
|
|
||||||
AND post_code like concat('%', #{postCode}, '%')
|
<select id="selectPostList" parameterType="SysPost" resultMap="SysPostResult">
|
||||||
</if>
|
<include refid="selectPostVo"/>
|
||||||
<if test="status != null and status != ''">
|
<where>
|
||||||
AND status = #{status}
|
<if test="postCode != null and postCode != ''">
|
||||||
</if>
|
AND post_code like concat('%', #{postCode}, '%')
|
||||||
<if test="postName != null and postName != ''">
|
</if>
|
||||||
AND post_name like concat('%', #{postName}, '%')
|
<if test="status != null and status != ''">
|
||||||
</if>
|
AND status = #{status}
|
||||||
</where>
|
</if>
|
||||||
</select>
|
<if test="postName != null and postName != ''">
|
||||||
|
AND post_name like concat('%', #{postName}, '%')
|
||||||
<select id="selectPostAll" resultMap="SysPostResult">
|
</if>
|
||||||
<include refid="selectPostVo"/>
|
</where>
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPostById" parameterType="Long" resultMap="SysPostResult">
|
<select id="selectPostAll" resultMap="SysPostResult">
|
||||||
<include refid="selectPostVo"/>
|
<include refid="selectPostVo"/>
|
||||||
where post_id = #{postId}
|
</select>
|
||||||
</select>
|
|
||||||
|
<select id="selectUserPostAll" resultMap="SysUserPostResult">
|
||||||
<select id="selectPostListByUserId" parameterType="Long" resultType="Integer">
|
<include refid="selectUserPostVo"/>
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectPostById" parameterType="Long" resultMap="SysPostResult">
|
||||||
|
<include refid="selectPostVo"/>
|
||||||
|
where post_id = #{postId}
|
||||||
|
</select>
|
||||||
|
|
||||||
|
<select id="selectPostListByUserId" parameterType="Long" resultType="Integer">
|
||||||
select p.post_id
|
select p.post_id
|
||||||
from sys_post p
|
from sys_post p
|
||||||
left join sys_user_post up on up.post_id = p.post_id
|
left join sys_user_post up on up.post_id = p.post_id
|
||||||
left join sys_user u on u.user_id = up.user_id
|
left join sys_user u on u.user_id = up.user_id
|
||||||
where u.user_id = #{userId}
|
where u.user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult">
|
<select id="selectPostsByUserName" parameterType="String" resultMap="SysPostResult">
|
||||||
select p.post_id, p.post_name, p.post_code
|
select p.post_id, p.post_name, p.post_code
|
||||||
from sys_post p
|
from sys_post p
|
||||||
left join sys_user_post up on up.post_id = p.post_id
|
left join sys_user_post up on up.post_id = p.post_id
|
||||||
left join sys_user u on u.user_id = up.user_id
|
left join sys_user u on u.user_id = up.user_id
|
||||||
where u.user_name = #{userName}
|
where u.user_name = #{userName}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult">
|
<select id="checkPostNameUnique" parameterType="String" resultMap="SysPostResult">
|
||||||
<include refid="selectPostVo"/>
|
<include refid="selectPostVo"/>
|
||||||
where post_name=#{postName} limit 1
|
where post_name=#{postName} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult">
|
<select id="checkPostCodeUnique" parameterType="String" resultMap="SysPostResult">
|
||||||
<include refid="selectPostVo"/>
|
<include refid="selectPostVo"/>
|
||||||
where post_code=#{postCode} limit 1
|
where post_code=#{postCode} limit 1
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updatePost" parameterType="SysPost">
|
<update id="updatePost" parameterType="SysPost">
|
||||||
update sys_post
|
update sys_post
|
||||||
<set>
|
<set>
|
||||||
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
|
<if test="postCode != null and postCode != ''">post_code = #{postCode},</if>
|
||||||
<if test="postName != null and postName != ''">post_name = #{postName},</if>
|
<if test="postName != null and postName != ''">post_name = #{postName},</if>
|
||||||
<if test="postSort != null and postSort != ''">post_sort = #{postSort},</if>
|
<if test="postSort != null and postSort != ''">post_sort = #{postSort},</if>
|
||||||
<if test="status != null and status != ''">status = #{status},</if>
|
<if test="status != null and status != ''">status = #{status},</if>
|
||||||
<if test="remark != null">remark = #{remark},</if>
|
<if test="remark != null">remark = #{remark},</if>
|
||||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
</set>
|
</set>
|
||||||
where post_id = #{postId}
|
where post_id = #{postId}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
|
<insert id="insertPost" parameterType="SysPost" useGeneratedKeys="true" keyProperty="postId">
|
||||||
insert into sys_post(
|
insert into sys_post(
|
||||||
<if test="postId != null and postId != 0">post_id,</if>
|
<if test="postId != null and postId != 0">post_id,</if>
|
||||||
<if test="postCode != null and postCode != ''">post_code,</if>
|
<if test="postCode != null and postCode != ''">post_code,</if>
|
||||||
<if test="postName != null and postName != ''">post_name,</if>
|
<if test="postName != null and postName != ''">post_name,</if>
|
||||||
<if test="postSort != null and postSort != ''">post_sort,</if>
|
<if test="postSort != null and postSort != ''">post_sort,</if>
|
||||||
<if test="status != null and status != ''">status,</if>
|
<if test="status != null and status != ''">status,</if>
|
||||||
<if test="remark != null and remark != ''">remark,</if>
|
<if test="remark != null and remark != ''">remark,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
create_time
|
create_time
|
||||||
)values(
|
)values(
|
||||||
<if test="postId != null and postId != 0">#{postId},</if>
|
<if test="postId != null and postId != 0">#{postId},</if>
|
||||||
<if test="postCode != null and postCode != ''">#{postCode},</if>
|
<if test="postCode != null and postCode != ''">#{postCode},</if>
|
||||||
<if test="postName != null and postName != ''">#{postName},</if>
|
<if test="postName != null and postName != ''">#{postName},</if>
|
||||||
<if test="postSort != null and postSort != ''">#{postSort},</if>
|
<if test="postSort != null and postSort != ''">#{postSort},</if>
|
||||||
<if test="status != null and status != ''">#{status},</if>
|
<if test="status != null and status != ''">#{status},</if>
|
||||||
<if test="remark != null and remark != ''">#{remark},</if>
|
<if test="remark != null and remark != ''">#{remark},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
sysdate()
|
sysdate()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<delete id="deletePostById" parameterType="Long">
|
<delete id="deletePostById" parameterType="Long">
|
||||||
delete from sys_post where post_id = #{postId}
|
delete from sys_post where post_id = #{postId}
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
<delete id="deletePostByIds" parameterType="Long">
|
<delete id="deletePostByIds" parameterType="Long">
|
||||||
delete from sys_post where post_id in
|
delete from sys_post where post_id in
|
||||||
<foreach collection="array" item="postId" open="(" separator="," close=")">
|
<foreach collection="array" item="postId" open="(" separator="," close=")">
|
||||||
#{postId}
|
#{postId}
|
||||||
</foreach>
|
</foreach>
|
||||||
</delete>
|
</delete>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -2,10 +2,18 @@ import request from '@/utils/request'
|
|||||||
|
|
||||||
// 查询销售订单列表
|
// 查询销售订单列表
|
||||||
export function listOrder(query) {
|
export function listOrder(query) {
|
||||||
|
const [fromOrderTime, toOrderTime] = query.orderTime || [null, null];
|
||||||
|
const params = {
|
||||||
|
...query,
|
||||||
|
fromOrderTime,
|
||||||
|
toOrderTime,
|
||||||
|
orderTime: null
|
||||||
|
}
|
||||||
|
|
||||||
return request({
|
return request({
|
||||||
url: '/custom/order/list',
|
url: '/custom/order/list',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: query
|
params: params
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -51,3 +59,10 @@ export function exportOrder(query) {
|
|||||||
params: query
|
params: query
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getOptions() {
|
||||||
|
return request({
|
||||||
|
url: '/custom/order/getOptions',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -1,38 +1,38 @@
|
|||||||
<!-- @author Shiyn/ huangmx 20200807优化-->
|
<!-- @author Shiyn/ huangmx 20200807优化-->
|
||||||
<template>
|
<template>
|
||||||
<div class="top-right-btn">
|
<div class="top-right-btn">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
|
<el-tooltip class="item" effect="dark" :content="showSearch ? '隐藏搜索' : '显示搜索'" placement="top">
|
||||||
<el-button size="mini" circle icon="el-icon-search" @click="toggleSearch()" />
|
<el-button size="mini" circle icon="el-icon-search" @click="toggleSearch()" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
|
<el-tooltip class="item" effect="dark" content="刷新" placement="top">
|
||||||
<el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" />
|
<el-button size="mini" circle icon="el-icon-refresh" @click="refresh()" />
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "RightToolbar",
|
name: "RightToolbar",
|
||||||
data() {
|
data() {
|
||||||
return {};
|
return {};
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
showSearch: {
|
showSearch: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true,
|
default: false,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
//搜索
|
//搜索
|
||||||
toggleSearch() {
|
toggleSearch() {
|
||||||
this.$emit("update:showSearch", !this.showSearch);
|
this.$emit("update:showSearch", !this.showSearch);
|
||||||
},
|
},
|
||||||
//刷新
|
//刷新
|
||||||
refresh() {
|
refresh() {
|
||||||
this.$emit("queryTable");
|
this.$emit("queryTable");
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -14,17 +14,17 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<!-- <el-col :span="4">-->
|
<!-- <el-col :span="4">-->
|
||||||
<!-- <el-form-item label="电话" prop="phone">-->
|
<!-- <el-form-item label="电话" prop="phone">-->
|
||||||
<!-- <el-input-->
|
<!-- <el-input-->
|
||||||
<!-- v-model="queryParams.phone"-->
|
<!-- v-model="queryParams.phone"-->
|
||||||
<!-- placeholder="请输入电话"-->
|
<!-- placeholder="请输入电话"-->
|
||||||
<!-- clearable-->
|
<!-- clearable-->
|
||||||
<!-- size="small"-->
|
<!-- size="small"-->
|
||||||
<!-- @keyup.enter.native="handleQuery"-->
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<!-- </el-col>-->
|
<!-- </el-col>-->
|
||||||
|
|
||||||
<el-col :span="4">
|
<el-col :span="4">
|
||||||
<el-form-item label="收款方式" prop="payTypeId">
|
<el-form-item label="收款方式" prop="payTypeId">
|
||||||
@ -141,14 +141,31 @@
|
|||||||
<!-- @keyup.enter.native="handleQuery"-->
|
<!-- @keyup.enter.native="handleQuery"-->
|
||||||
<!-- />-->
|
<!-- />-->
|
||||||
<!-- </el-form-item>-->
|
<!-- </el-form-item>-->
|
||||||
<el-col :span="4">
|
<el-col :span="8">
|
||||||
<el-form-item label="成交日期" prop="orderTime">
|
<el-form-item label="成交日期" prop="orderTime">
|
||||||
<el-date-picker clearable size="small" style="width: 200px"
|
|
||||||
v-model="queryParams.orderTime"
|
<el-date-picker
|
||||||
type="date"
|
v-model="queryParams.orderTime"
|
||||||
value-format="yyyy-MM-dd"
|
type="daterange"
|
||||||
placeholder="选择成交日期">
|
size="small"
|
||||||
|
align="right"
|
||||||
|
unlink-panels
|
||||||
|
range-separator="至"
|
||||||
|
start-placeholder="开始日期"
|
||||||
|
end-placeholder="结束日期"
|
||||||
|
value-format="yyyy-MM-dd"
|
||||||
|
:picker-options="pickerOptions">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
|
|
||||||
|
<!-- <el-date-picker-->
|
||||||
|
<!-- clearable-->
|
||||||
|
<!-- size="small"-->
|
||||||
|
<!-- style="width: 200px"-->
|
||||||
|
<!-- v-model="queryParams.orderTime"-->
|
||||||
|
<!-- type="date"-->
|
||||||
|
<!-- value-format="yyyy-MM-dd"-->
|
||||||
|
<!-- placeholder="选择成交日期">>-->
|
||||||
|
<!-- </el-date-picker>-->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
@ -432,7 +449,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {listOrder, getOrder, delOrder, addOrder, updateOrder, exportOrder} from "@/api/custom/order";
|
import {listOrder, getOrder, delOrder, addOrder, updateOrder, exportOrder, getOptions} from "@/api/custom/order";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Order",
|
name: "Order",
|
||||||
@ -447,7 +464,7 @@
|
|||||||
// 非多个禁用
|
// 非多个禁用
|
||||||
multiple: true,
|
multiple: true,
|
||||||
// 显示搜索条件
|
// 显示搜索条件
|
||||||
showSearch: true,
|
showSearch: false,
|
||||||
// 总条数
|
// 总条数
|
||||||
total: 0,
|
total: 0,
|
||||||
// 销售订单表格数据
|
// 销售订单表格数据
|
||||||
@ -504,39 +521,68 @@
|
|||||||
],
|
],
|
||||||
orderTime: [
|
orderTime: [
|
||||||
{required: true, message: "成交日期不能为空", trigger: "blur"}
|
{required: true, message: "成交日期不能为空", trigger: "blur"}
|
||||||
|
],
|
||||||
|
payTypeId: [
|
||||||
|
{required: true, message: "首款方式不能为空", trigger: "blur"}
|
||||||
|
],
|
||||||
|
accountId: [
|
||||||
|
{required: true, message: "账号不能为空", trigger: "blur"}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
pickerOptions: {
|
||||||
|
shortcuts: [{
|
||||||
|
text: '最近一周',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
|
||||||
|
picker.$emit('pick', [start, end]);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
text: '最近一个月',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
|
||||||
|
picker.$emit('pick', [start, end]);
|
||||||
|
}
|
||||||
|
}, {
|
||||||
|
text: '最近三个月',
|
||||||
|
onClick(picker) {
|
||||||
|
const end = new Date();
|
||||||
|
const start = new Date();
|
||||||
|
start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
|
||||||
|
picker.$emit('pick', [start, end]);
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getList();
|
this.getList();
|
||||||
|
getOptions().then(response => {
|
||||||
|
console.log(response)
|
||||||
|
const options = response.data.reduce((opts, cur) => {
|
||||||
|
if (!opts[cur.postCode]) {
|
||||||
|
opts[cur.postCode] = [];
|
||||||
|
}
|
||||||
|
opts[cur.postCode].push({dictValue: cur.userId, dictLabel: cur.userName})
|
||||||
|
return opts;
|
||||||
|
}, {})
|
||||||
|
this.preSaleIdOptions = options['pre_sale'] || [];
|
||||||
|
this.afterSaleIdOptions = options['after_sale'] || [];
|
||||||
|
this.nutritionistIdOptions = options['nutri'] || [];
|
||||||
|
this.nutriAssisIdOptions = options['nutri_assis'] || [];
|
||||||
|
this.plannerIdOptions = options['planner'] || [];
|
||||||
|
this.plannerAssisIdOptions = options['planner_assis'] || [];
|
||||||
|
this.operatorIdOptions = options['operator'] || [];
|
||||||
|
})
|
||||||
this.getDicts("cus_pay_type").then(response => {
|
this.getDicts("cus_pay_type").then(response => {
|
||||||
this.payTypeIdOptions = response.data;
|
this.payTypeIdOptions = response.data;
|
||||||
});
|
});
|
||||||
this.getDicts("cus_pre_sale").then(response => {
|
|
||||||
this.preSaleIdOptions = response.data;
|
|
||||||
});
|
|
||||||
this.getDicts("cus_after_sale").then(response => {
|
|
||||||
this.afterSaleIdOptions = response.data;
|
|
||||||
});
|
|
||||||
this.getDicts("cus_nutri").then(response => {
|
|
||||||
this.nutritionistIdOptions = response.data;
|
|
||||||
});
|
|
||||||
this.getDicts("cus_nutri_assis").then(response => {
|
|
||||||
this.nutriAssisIdOptions = response.data;
|
|
||||||
});
|
|
||||||
this.getDicts("cus_planner").then(response => {
|
|
||||||
this.plannerIdOptions = response.data;
|
|
||||||
});
|
|
||||||
this.getDicts("cus_account").then(response => {
|
this.getDicts("cus_account").then(response => {
|
||||||
this.accountIdOptions = response.data;
|
this.accountIdOptions = response.data;
|
||||||
});
|
});
|
||||||
this.getDicts("cus_planner_assis").then(response => {
|
|
||||||
this.plannerAssisIdOptions = response.data;
|
|
||||||
});
|
|
||||||
this.getDicts("cus_operator").then(response => {
|
|
||||||
this.operatorIdOptions = response.data;
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/** 查询销售订单列表 */
|
/** 查询销售订单列表 */
|
||||||
@ -627,33 +673,33 @@
|
|||||||
handleQuery() {
|
handleQuery() {
|
||||||
this.queryParams.pageNum = 1;
|
this.queryParams.pageNum = 1;
|
||||||
this.getList();
|
this.getList();
|
||||||
this.getDicts("cus_pay_type").then(response => {
|
// this.getDicts("cus_pay_type").then(response => {
|
||||||
this.payTypeIdOptions = response.data;
|
// this.payTypeIdOptions = response.data;
|
||||||
});
|
// });
|
||||||
this.getDicts("cus_pre_sale").then(response => {
|
// this.getDicts("cus_pre_sale").then(response => {
|
||||||
this.preSaleIdOptions = response.data;
|
// this.preSaleIdOptions = response.data;
|
||||||
});
|
// });
|
||||||
this.getDicts("cus_after_sale").then(response => {
|
// this.getDicts("cus_after_sale").then(response => {
|
||||||
this.afterSaleIdOptions = response.data;
|
// this.afterSaleIdOptions = response.data;
|
||||||
});
|
// });
|
||||||
this.getDicts("cus_nutri").then(response => {
|
// this.getDicts("cus_nutri").then(response => {
|
||||||
this.nutritionistIdOptions = response.data;
|
// this.nutritionistIdOptions = response.data;
|
||||||
});
|
// });
|
||||||
this.getDicts("cus_nutri_assis").then(response => {
|
// this.getDicts("cus_nutri_assis").then(response => {
|
||||||
this.nutriAssisIdOptions = response.data;
|
// this.nutriAssisIdOptions = response.data;
|
||||||
});
|
// });
|
||||||
this.getDicts("cus_planner").then(response => {
|
// this.getDicts("cus_planner").then(response => {
|
||||||
this.plannerIdOptions = response.data;
|
// this.plannerIdOptions = response.data;
|
||||||
});
|
// });
|
||||||
this.getDicts("cus_custom").then(response => {
|
// this.getDicts("cus_account").then(response => {
|
||||||
this.accountIdOptions = response.data;
|
// this.accountIdOptions = response.data;
|
||||||
});
|
// });
|
||||||
this.getDicts("cus_planner_assis").then(response => {
|
// this.getDicts("cus_planner_assis").then(response => {
|
||||||
this.plannerAssisIdOptions = response.data;
|
// this.plannerAssisIdOptions = response.data;
|
||||||
});
|
// });
|
||||||
this.getDicts("cus_operator").then(response => {
|
// this.getDicts("cus_operator").then(response => {
|
||||||
this.operatorIdOptions = response.data;
|
// this.operatorIdOptions = response.data;
|
||||||
});
|
// });
|
||||||
},
|
},
|
||||||
/** 重置按钮操作 */
|
/** 重置按钮操作 */
|
||||||
resetQuery() {
|
resetQuery() {
|
||||||
@ -687,7 +733,7 @@
|
|||||||
this.$refs["form"].validate(valid => {
|
this.$refs["form"].validate(valid => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
|
|
||||||
console.log(this.form)
|
// console.log(this.form)
|
||||||
|
|
||||||
this.form.payType = this.selectDictLabel(this.payTypeIdOptions, this.form.payTypeId);
|
this.form.payType = this.selectDictLabel(this.payTypeIdOptions, this.form.payTypeId);
|
||||||
this.form.preSale = this.selectDictLabel(this.preSaleIdOptions, this.form.preSaleId);
|
this.form.preSale = this.selectDictLabel(this.preSaleIdOptions, this.form.preSaleId);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user