Browse Source

[update]修复客户报价审核功能,添加获取工程员功能

dev
zhangsiqi 10 months ago
parent
commit
098fdc0870
  1. 30
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerQuoteController.java
  2. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteService.java
  3. 29
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java
  4. 20
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteMapper.xml
  5. 51
      ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html
  6. 41
      ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html
  7. 61
      ruoyi-admin/src/main/resources/templates/system/customerQuote/detail.html
  8. 30
      ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html
  9. 64
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html
  10. 80
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwgzVerify.html
  11. 37
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwjlVerify.html
  12. 65
      ruoyi-admin/src/main/resources/templates/system/customerQuote/taskZozjVerify.html

30
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerQuoteController.java

@ -1,5 +1,6 @@
package com.ruoyi.system.controller; package com.ruoyi.system.controller;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.ruoyi.ck.utils.Result; import com.ruoyi.ck.utils.Result;
@ -13,10 +14,7 @@ import com.ruoyi.common.utils.ShiroUtils;
import com.ruoyi.erp.domain.ErpMaterialVo; import com.ruoyi.erp.domain.ErpMaterialVo;
import com.ruoyi.process.general.service.IProcessService; import com.ruoyi.process.general.service.IProcessService;
import com.ruoyi.remind.service.RemindService; import com.ruoyi.remind.service.RemindService;
import com.ruoyi.system.domain.SysCustomerQuote; import com.ruoyi.system.domain.*;
import com.ruoyi.system.domain.SysCustomerQuoteChild;
import com.ruoyi.system.domain.SysCustomerQuoteVo;
import com.ruoyi.system.domain.SysCustomerVo;
import com.ruoyi.system.domain.exportDto.SysCustomerDto; import com.ruoyi.system.domain.exportDto.SysCustomerDto;
import com.ruoyi.system.mapper.SysCustomerQuoteChildMapper; import com.ruoyi.system.mapper.SysCustomerQuoteChildMapper;
import com.ruoyi.system.service.*; import com.ruoyi.system.service.*;
@ -36,6 +34,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import java.io.IOException; import java.io.IOException;
import java.util.Collections;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Set; import java.util.Set;
@ -167,7 +166,7 @@ public class SysCustomerQuoteController extends BaseController
@Log(title = "客户报价信息", businessType = BusinessType.UPDATE) @Log(title = "客户报价信息", businessType = BusinessType.UPDATE)
@PostMapping("/edit") @PostMapping("/edit")
@ResponseBody @ResponseBody
public AjaxResult editSave(@RequestBody SysCustomerQuote sysCustomerQuote) public AjaxResult editSave(@RequestBody SysCustomerQuoteVo sysCustomerQuote)
{ {
System.out.println("SysCustomerQuoteController.editSave:" + sysCustomerQuote.toString()); System.out.println("SysCustomerQuoteController.editSave:" + sysCustomerQuote.toString());
sysCustomerQuote.setAuditStatus("0"); sysCustomerQuote.setAuditStatus("0");
@ -226,7 +225,13 @@ public class SysCustomerQuoteController extends BaseController
String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1); String verifyName = task.getTaskDefinitionKey().substring(0, 1).toUpperCase() + task.getTaskDefinitionKey().substring(1);
return prefix + "/task" + verifyName; return prefix + "/task" + verifyName;
} }
@ModelAttribute("/preloadObj")
public SysCustomerQuoteVo getObj(@RequestParam(value = "id", required = false) Long id, HttpSession session) {
if (id != null) {
return sysCustomerQuoteService.selectSysCustomerQuoteById(id);
}
return new SysCustomerQuoteVo();
}
/** /**
* 完成任务 * 完成任务
* *
@ -235,8 +240,10 @@ public class SysCustomerQuoteController extends BaseController
@RequestMapping(value = "/complete/{taskId}", method = {RequestMethod.POST, RequestMethod.GET}) @RequestMapping(value = "/complete/{taskId}", method = {RequestMethod.POST, RequestMethod.GET})
@ResponseBody @ResponseBody
public AjaxResult complete(@PathVariable("taskId") String taskId, @RequestParam(value = "saveEntity", required = false) String saveEntity, public AjaxResult complete(@PathVariable("taskId") String taskId, @RequestParam(value = "saveEntity", required = false) String saveEntity,
@RequestParam(value = "customerQuoteChildList", required = false) String customerQuoteChildList,
@ModelAttribute("preloadObj") SysCustomerQuoteVo sysCustomerQuoteVo, HttpServletRequest request) { @ModelAttribute("preloadObj") SysCustomerQuoteVo sysCustomerQuoteVo, HttpServletRequest request) {
boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity); boolean saveEntityBoolean = BooleanUtils.toBoolean(saveEntity);
sysCustomerQuoteVo.setSysCustomerQuoteChildList(JSON.parseArray(customerQuoteChildList, SysCustomerQuoteChild.class));
String instanceId = sysCustomerQuoteVo.getInstanceId(); String instanceId = sysCustomerQuoteVo.getInstanceId();
String instanceType = sysCustomerQuoteVo.getInstanceType(); String instanceType = sysCustomerQuoteVo.getInstanceType();
boolean approvedFlag = processService.complete(taskId, instanceId, sysCustomerQuoteVo.getApplyTitle(), boolean approvedFlag = processService.complete(taskId, instanceId, sysCustomerQuoteVo.getApplyTitle(),
@ -274,13 +281,7 @@ public class SysCustomerQuoteController extends BaseController
} }
return success("任务已完成"); return success("任务已完成");
} }
@ModelAttribute("/preloadObj")
public SysCustomerQuoteVo getObj(@RequestParam(value = "id", required = false) Long id, HttpSession session) {
if (id != null) {
return sysCustomerQuoteService.selectSysCustomerQuoteById(id);
}
return new SysCustomerQuoteVo();
}
/** /**
* 作废客户报价 * 作废客户报价
*/ */
@ -289,7 +290,6 @@ public class SysCustomerQuoteController extends BaseController
@GetMapping( "/cancel/{id}") @GetMapping( "/cancel/{id}")
@ResponseBody @ResponseBody
public AjaxResult cancel(@PathVariable("id") Long id){ public AjaxResult cancel(@PathVariable("id") Long id){
;
return AjaxResult.success(sysCustomerQuoteService.cancelSysCustomerById(id)); return AjaxResult.success(sysCustomerQuoteService.cancelSysCustomerById(id));
} }
@ -312,4 +312,6 @@ public class SysCustomerQuoteController extends BaseController
sysCustomerQuoteVo.setKeyword(keyword); sysCustomerQuoteVo.setKeyword(keyword);
return success(sysCustomerQuoteService.selectSysCustomerQuoteList(sysCustomerQuoteVo)); return success(sysCustomerQuoteService.selectSysCustomerQuoteList(sysCustomerQuoteVo));
} }
} }

2
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteService.java

@ -50,7 +50,7 @@ public interface ISysCustomerQuoteService
* @param sysCustomerQuote 客户报价信息 * @param sysCustomerQuote 客户报价信息
* @return 结果 * @return 结果
*/ */
int updateSysCustomerQuote(SysCustomerQuote sysCustomerQuote); int updateSysCustomerQuote(SysCustomerQuoteVo sysCustomerQuote);
/** /**
* 删除客户报价信息 * 删除客户报价信息

29
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java

@ -132,9 +132,13 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService {
public int insertSysCustomerQuote(SysCustomerQuote sysCustomerQuote) { public int insertSysCustomerQuote(SysCustomerQuote sysCustomerQuote) {
String loginName = ShiroUtils.getLoginName(); String loginName = ShiroUtils.getLoginName();
sysCustomerQuote.setCreateBy(loginName); sysCustomerQuote.setCreateBy(loginName);
sysCustomerQuote.setCreateTime(DateUtils.getNowDate());
int result = sysCustomerQuoteMapper.insertSysCustomerQuote(sysCustomerQuote); int result = sysCustomerQuoteMapper.insertSysCustomerQuote(sysCustomerQuote);
sysCustomerQuote.getId(); sysCustomerQuote.getId();
List<SysCustomerQuoteChild> sysCustomerQuoteChildList = sysCustomerQuote.getSysCustomerQuoteChildList(); List<SysCustomerQuoteChild> sysCustomerQuoteChildList = sysCustomerQuote.getSysCustomerQuoteChildList();
if (CollectionUtils.isEmpty(sysCustomerQuoteChildList)){
return result;
}
for (SysCustomerQuoteChild sysCustomerQuoteChild : sysCustomerQuoteChildList) { for (SysCustomerQuoteChild sysCustomerQuoteChild : sysCustomerQuoteChildList) {
sysCustomerQuoteChild.setQuoteId(sysCustomerQuote.getSupplierCode()); sysCustomerQuoteChild.setQuoteId(sysCustomerQuote.getSupplierCode());
sysCustomerQuoteChildMapper.insertSysCustomerQuoteChild(sysCustomerQuoteChild); sysCustomerQuoteChildMapper.insertSysCustomerQuoteChild(sysCustomerQuoteChild);
@ -143,12 +147,31 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService {
} }
@Override @Override
public int updateSysCustomerQuote(SysCustomerQuote sysCustomerQuote) { public int updateSysCustomerQuote(SysCustomerQuoteVo sysCustomerQuote) {
String loginName = ShiroUtils.getLoginName(); String loginName = ShiroUtils.getLoginName();
sysCustomerQuote.setUpdateBy(loginName); sysCustomerQuote.setUpdateBy(loginName);
sysCustomerQuote.setUpdateTime(DateUtils.getNowDate());
SysUser user = ShiroUtils.getSysUser(); SysUser user = ShiroUtils.getSysUser();
int list = sysCustomerQuoteMapper.updateSysCustomerQuote(sysCustomerQuote);
List<SysCustomerQuoteChild> sysCustomerQuoteChild = sysCustomerQuote.getSysCustomerQuoteChildList();
int s = sysCustomerQuoteChild.size();
if (s == 0){
return 0;
}
for(SysCustomerQuoteChild sysCustomerQuoteChild1 : sysCustomerQuoteChild){
if (sysCustomerQuoteChild1.getId() == null || sysCustomerQuoteChild1.getId() == 0L){
sysCustomerQuoteChild1.setQuoteId(sysCustomerQuote.getSupplierCode());
sysCustomerQuoteChild1.setCreateBy(loginName);
sysCustomerQuoteChild1.setCreateTime(DateUtils.getNowDate());
sysCustomerQuoteChildMapper.insertSysCustomerQuoteChild(sysCustomerQuoteChild1);
}else {
sysCustomerQuoteChild1.setUpdateBy(loginName);
sysCustomerQuoteChild1.setUpdateTime(DateUtils.getNowDate());
sysCustomerQuoteChildMapper.updateSysCustomerQuoteChild(sysCustomerQuoteChild1);
}
}
// 启动流程 // 启动流程
return sysCustomerQuoteMapper.updateSysCustomerQuote(sysCustomerQuote); return list;
} }
@ -297,7 +320,7 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService {
private void buildAuthority(SysUser user, Map<String, Object> variables) { private void buildAuthority(SysUser user, Map<String, Object> variables) {
Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId()); Set<String> roleKeys = roleService.selectRoleKeys(user.getUserId());
// 角色不同审核人不同 // 角色不同审核人不同
if(roleKeys.contains("zozjRole") || roleKeys.contains("zjlRole")){ if(roleKeys.contains("zozjRole")){
variables.put("authority",4); variables.put("authority",4);
}else if(roleKeys.contains("ywzgRole")){ }else if(roleKeys.contains("ywzgRole")){
variables.put("authority",3); variables.put("authority",3);

20
ruoyi-admin/src/main/resources/mapper/system/SysCustomerQuoteMapper.xml

@ -68,7 +68,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where dict_type = 'processType' where dict_type = 'processType'
) as p ) as p
on s.instance_type = p.dict_value on s.instance_type = p.dict_value
<where> <where>
<if test="businessMembers != null and businessMembers != ''"> and s.business_members = #{businessMembers}</if>
<if test="supplierCode!= null and supplierCode != ''"> and s.supplierCode like concat('%', #{supplierCode}, '%')</if> <if test="supplierCode!= null and supplierCode != ''"> and s.supplierCode like concat('%', #{supplierCode}, '%')</if>
<if test="customerCode!= null and customerCode != ''"> and s.customerCode like concat('%', #{customerCode}, '%')</if> <if test="customerCode!= null and customerCode != ''"> and s.customerCode like concat('%', #{customerCode}, '%')</if>
<if test="customerName!= null and customerName != ''"> and s.customerName like concat('%', #{customerName}, '%')</if> <if test="customerName!= null and customerName != ''"> and s.customerName like concat('%', #{customerName}, '%')</if>
@ -85,6 +86,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''"> <if test="params.beginCreateTime != null and params.beginCreateTime != '' and params.endCreateTime != null and params.endCreateTime != ''">
and s.pricingDate between #{params.beginCreateTime} and #{params.endCreateTime} and s.pricingDate between #{params.beginCreateTime} and #{params.endCreateTime}
</if> </if>
<if test="params.beginCreateTime1 != null and params.beginCreateTime1 != '' and params.endCreateTime1 != null and params.endCreateTime1 != ''">
and s.create_time between #{params.beginCreateTime} and #{params.endCreateTime}
</if>
</where> </where>
</select> </select>
@ -135,9 +139,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTitle != null">apply_title,</if> <if test="applyTitle != null">apply_title,</if>
<if test="applyUser != null">apply_user,</if> <if test="applyUser != null">apply_user,</if>
<if test="applyTime != null">apply_time,</if> <if test="applyTime != null">apply_time,</if>
audit_status, <if test="useStatus != null">use_status,</if>
use_status, <if test="auditStatus != null">audit_status,</if>
create_time, <if test="createTime != null">create_time,</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="supplierCode != null and supplierCode != ''" >#{supplierCode},</if> <if test="supplierCode != null and supplierCode != ''" >#{supplierCode},</if>
@ -171,9 +175,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTitle != null">#{applyTitle},</if> <if test="applyTitle != null">#{applyTitle},</if>
<if test="applyUser != null">#{applyUser},</if> <if test="applyUser != null">#{applyUser},</if>
<if test="applyTime != null">#{applyTime},</if> <if test="applyTime != null">#{applyTime},</if>
0, <if test="useStatus != null">#{useStatus},</if>
0, <if test="auditStatus != null">#{auditStatus},</if>
now(), <if test="createTime != null">#{createTime},</if>
</trim> </trim>
</insert> </insert>
@ -212,7 +216,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="applyTitle != null">apply_title = #{applyTitle},</if> <if test="applyTitle != null">apply_title = #{applyTitle},</if>
<if test="applyUser != null">apply_user = #{applyUser},</if> <if test="applyUser != null">apply_user = #{applyUser},</if>
<if test="applyTime != null">apply_time = #{applyTime},</if> <if test="applyTime != null">apply_time = #{applyTime},</if>
update_time = now() <if test="updateTime != null and updateTime != ''" >update_time = #{updateTime},</if>
</trim> </trim>
where id = #{id} where id = #{id}
</update> </update>

51
ruoyi-admin/src/main/resources/templates/system/customerQuote/add.html

@ -14,7 +14,7 @@
<input name="supplierCode" class="form-control" type="text" readonly> <input name="supplierCode" class="form-control" type="text" readonly>
</div> </div>
</div> </div>
<div class="col-xs-12" shiro:hasPermission="system:customerQuote:edit"> <div class="form-group" shiro:hasPermission="system:customerQuote:edit">
<label class="col-sm-4 control-label">业务员:</label> <label class="col-sm-4 control-label">业务员:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select class="form-control" name="businessMembers" required> <select class="form-control" name="businessMembers" required>
@ -72,7 +72,7 @@
<label class="col-sm-4 control-label">订价日期:</label> <label class="col-sm-4 control-label">订价日期:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="pricingDate" th:value="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="pricingDate" class="form-control" placeholder="yyyy-MM-dd" type="text">
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
@ -84,25 +84,28 @@
<textarea readonly name="remark" class="form-control"></textarea> <textarea readonly name="remark" class="form-control"></textarea>
</div> </div>
</div> </div>
<div class="flex-row-m"> <div class="container">
<h4 class="form-header h4">计算</h4> <h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-3" name="enterprise" id="enterprise_add" type="text" readonly/> <label class=" col-sm-2">物料合计:</label><input class="col-sm-3" name="enterprise" id="enterprise_add" type="text" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-3" name="enterpriseSum" id="enterpriseSum_add" type="number" readonly/> <label class=" col-sm-2">数量合计:</label><input class="col-sm-3" name="enterpriseSum" id="enterpriseSum_add" type="number" readonly/>
</div> </div>
<div class="col-xs-12 form-row">
<div class="col-xs-12 form-row"> <label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-3" name="noRmb" id="noRmb_add" type="number" readonly/>
<label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-3" name="noRmb" id="noRmb_add" type="number" readonly/> <label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-3" name="noRmbSum" id="noRmbSum_add" type="number" readonly/>
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-3" name="noRmbSum" id="noRmbSum_add" type="number" readonly/> </div>
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-3" name="rmb" id="rmb_add" type="number" readonly/> <div class="col-xs-12 form-row">
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-3" name="rmbSum" id="rmbSum_add" type="number" readonly/> <label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-3" name="rmb" id="rmb_add" type="number" readonly/>
</div> <label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-3" name="rmbSum" id="rmbSum_add" type="number" readonly/>
<div class="col-xs-12"> </div>
<label class="col-sm-2">不含税单价:</label><input placeholder="美元" class="col-sm-3" name="noUsd" id="noUsd_add" type="number" readonly/> <div class="col-xs-12">
<label class="col-sm-2">不含税总价:</label><input placeholder="美元" class="col-sm-3" name="noUsdSum" id="noUsdSum_add" type="number" readonly/> <label class="col-sm-2">不含税单价:</label><input placeholder="美元" class="col-sm-3" name="noUsd" id="noUsd_add" type="number" readonly/>
<label class="col-sm-2">含税单价:</label><input placeholder="美元" class="col-sm-3" name="usd" id="usd_add" type="number" readonly/> <label class="col-sm-2">不含税总价:</label><input placeholder="美元" class="col-sm-3" name="noUsdSum" id="noUsdSum_add" type="number" readonly/>
<label class="col-sm-2">含税总价:</label><input placeholder="美元" class="col-sm-3" name="usdSum" id="usdSum_add" type="number" readonly/> </div>
</div> <div class="col-xs-12 form-row">
<label class="col-sm-2">含税单价:</label><input placeholder="美元" class="col-sm-3" name="usd" id="usd_add" type="number" readonly/>
<label class="col-sm-2">含税总价:</label><input placeholder="美元" class="col-sm-3" name="usdSum" id="usdSum_add" type="number" readonly/>
</div>
</div> </div>
</form> </form>
<div class="container"> <div class="container">
@ -136,9 +139,7 @@
var userName = [[${@permission.getPrincipalProperty('userName')}]]; var userName = [[${@permission.getPrincipalProperty('userName')}]];
var prefix = ctx + "system/customerQuote"; var prefix = ctx + "system/customerQuote";
var commonCurrency = $("#commonCurrency_add option:selected").val(); var commonCurrency = $("#commonCurrency_add option:selected").val();
$("#form-customerQuote-add").validate({ $("#form-customerQuote-add").validate({focusCleanup: true});
focusCleanup: true,
});
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
var formData = $("#form-customerQuote-add").serializeArray(); var formData = $("#form-customerQuote-add").serializeArray();
@ -403,8 +404,8 @@
}); });
/*业务员列表*/ /*业务员列表*/
$.ajax({ $.ajax({
url: ctx + 'system/user/list', url: ctx + 'system/salesOrder/getBinessMembers',
type: 'post', type: 'get',
success: function (res) { success: function (res) {
console.log(res) console.log(res)
if (res.rows.length > 0) { if (res.rows.length > 0) {

41
ruoyi-admin/src/main/resources/templates/system/customerQuote/customerQuote.html

@ -11,7 +11,7 @@
<div class="select-list"> <div class="select-list">
<ul> <ul>
<li> <li>
<label>客户报价编号:</label> <label>报价编号:</label>
<input type="text" name="supplierCode"/> <input type="text" name="supplierCode"/>
</li> </li>
<li> <li>
@ -23,17 +23,37 @@
<input type="text" name="customerName"/> <input type="text" name="customerName"/>
</li> </li>
<li> <li>
<label>审核标志</label> <label>审核状态</label>
<select name="auditStatus" th:with="type=${@dict.getType('auditStatus')}"> <select name="auditStatus" th:with="type=${@dict.getType('auditStatus')}">
<option value="">所有</option> <option value="">所有</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option> <option th:each="dict : ${type}" th:text="${dict.dictLabel}" th:value="${dict.dictValue}"></option>
</select> </select>
</li> </li>
<li>
<label>料号:</label>
<input type="text" name="materialNo"/>
</li>
<li>
<label>物料名称:</label>
<input type="text" name="materialName"/>
</li>
<li>
<label>业务员:</label>
<select name="businessMembers">
<option value="">所有</option>
</select>
</li>
<li> <li>
<label>定价时间:</label> <label>定价时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/> <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime]"/>
<span>-</span> <span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/> <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime]"/>
<li>
<li>
<label>录入时间:</label>
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreateTime1]"/>
<span>-</span>
<input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreateTime1]"/>
<li> <li>
<a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a> <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
<a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a> <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
@ -62,7 +82,6 @@
<script th:src="@{/ajax/libs/vue/vue.js}"></script> <script th:src="@{/ajax/libs/vue/vue.js}"></script>
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> <script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
var editFlag = [[${@permission.hasPermi('system:customerQuote:edit')}]]; var editFlag = [[${@permission.hasPermi('system:customerQuote:edit')}]];
var removeFlag = [[${@permission.hasPermi('system:customerQuote:remove')}]]; var removeFlag = [[${@permission.hasPermi('system:customerQuote:remove')}]];
var cancelFlag = [[${@permission.hasPermi('system:customerQuote:cancel')}]]; var cancelFlag = [[${@permission.hasPermi('system:customerQuote:cancel')}]];
@ -73,6 +92,22 @@
var loginName = [[${@permission.getPrincipalProperty('loginName')}]]; var loginName = [[${@permission.getPrincipalProperty('loginName')}]];
var prefix = ctx + "system/customerQuote"; var prefix = ctx + "system/customerQuote";
$(function() { $(function() {
$.ajax({
url: ctx + 'system/salesOrder/getBinessMembers',
type: 'get',
success: function (res) {
console.log(res)
if (res.rows.length > 0) {
var usertData = res.rows;
for (let i in usertData) {
$("select[name='businessMembers']").append(
"<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
}
} else {
$.modal.msgError(res.msg);
}
}
});
var options = { var options = {
url: prefix + "/list", url: prefix + "/list",
createUrl: prefix + "/add", createUrl: prefix + "/add",

61
ruoyi-admin/src/main/resources/templates/system/customerQuote/detail.html

@ -1,13 +1,13 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml"> <html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.w3.org/1999/xhtml">
<head> <head>
<th:block th:include="include :: header('新增客户报价')" /> <th:block th:include="include :: header('详情客户报价')" />
<th:block th:include="include :: select2-css" /> <th:block th:include="include :: select2-css" />
<th:block th:include="include :: bootstrap-editable-css" /> <th:block th:include="include :: bootstrap-editable-css" />
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content"> <div class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-customerQuote-edit" th:object="${sysCustomerQuote}"> <form class="form-horizontal m" id="form-customerQuote-detail" th:object="${sysCustomerQuote}">
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<div class="form-group" hidden="hidden"> <div class="form-group" hidden="hidden">
<label class="col-sm-4 control-label">客户报价ID:</label> <label class="col-sm-4 control-label">客户报价ID:</label>
@ -15,15 +15,17 @@
<input name="id" th:field="*{id}" class="form-control" type="number" readonly> <input name="id" th:field="*{id}" class="form-control" type="number" readonly>
</div> </div>
</div> </div>
</div>
<div class="form-group">
<label class="col-sm-4 control-label">客户报价编号:</label> <label class="col-sm-4 control-label">客户报价编号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" readonly> <input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" readonly>
</div> </div>
</div> </div>
<div class="col-xs-12" shiro:hasPermission="system:customerQuote:edit"> <div class="form-group" shiro:hasPermission="system:customerQuote:edit">
<label class="col-sm-4 control-label">业务员:</label> <label class="col-sm-4 control-label">业务员:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select disabled readonly class="form-control" name="businessMembers" required th:field="*{businessMembers}"> <select disabled class="form-control" name="businessMembers" required th:field="*{businessMembers}">
<option value="">请选择</option> <option value="">请选择</option>
</select> </select>
</div> </div>
@ -75,7 +77,7 @@
<label class="col-sm-4 control-label">订价日期:</label> <label class="col-sm-4 control-label">订价日期:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="pricingDate" disabled th:value="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text" disabled>
<span class="input-group-addon " disabled><i class="fa fa-calendar"></i></span> <span class="input-group-addon " disabled><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
@ -93,7 +95,6 @@
<label class="col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise_detail" th:field="*{enterprise}" type="text" disabled/> <label class="col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise_detail" th:field="*{enterprise}" type="text" disabled/>
<label class="col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_detail" th:field="*{enterpriseSum}" type="number" disabled/> <label class="col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_detail" th:field="*{enterpriseSum}" type="number" disabled/>
</div> </div>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class="col-sm-2">不含税单价:</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_detail" th:field="*{noRmb}" type="number" disabled /> <label class="col-sm-2">不含税单价:</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_detail" th:field="*{noRmb}" type="number" disabled />
<label class="col-sm-2">不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_detail" th:field="*{noRmbSum}" type="number" disabled/> <label class="col-sm-2">不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_detail" th:field="*{noRmbSum}" type="number" disabled/>
@ -119,7 +120,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-Quote-child"></table> <table id="bootstrap-table-Quote-child-detail"></table>
</div> </div>
</div> </div>
</div> </div>
@ -136,18 +137,16 @@
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
var processMethodDatas = [[${@dict.getType('processMethod')}]]; var processMethodDatas = [[${@dict.getType('processMethod')}]];
var userName = [[${@permission.getPrincipalProperty('userName')}]]; var userName = [[${@permission.getPrincipalProperty('userName')}]];
var sysCustomerQuote = [[${formData}]]; var sysCustomerQuote = [[${sysCustomerQuote}]];
var prefix = ctx + "system/customerQuote" var prefix = ctx + "system/customerQuote"
var commonCurrency = $("#commonCurrency_edit option:selected").val(); var commonCurrency = $("#commonCurrency_edit option:selected").val();
$("#form-customerQuote-edit").validate({ $("#form-customerQuote-edit").validate({focusCleanup: true});
focusCleanup: true,
});
//计算 //计算
$(function() { $(function() {
/*业务员列表*/ /*业务员列表*/
$.ajax({ $.ajax({
url: ctx + 'system/user/list', url: ctx + 'system/salesOrder/getBinessMembers',
type: 'post', type: 'get',
success: function (res) { success: function (res) {
console.log(res) console.log(res)
if (res.rows.length > 0) { if (res.rows.length > 0) {
@ -155,28 +154,19 @@
//alert(JSON.stringify(data)); //alert(JSON.stringify(data));
for (let i in usertData) { for (let i in usertData) {
// console.log(finishProductData[i].finishProductCode) // console.log(finishProductData[i].finishProductCode)
$("#form-customerQuote-edit select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + $("#form-customerQuote-detail select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" +
usertData[i].userName + "</option>"); usertData[i].userName + "</option>");
} }
$("#form-customerQuote-edit select[name='businessMembers']").val(sysCustomerQuote.businessMembers); $("#form-customerQuote-detail select[name='businessMembers']").val(sysCustomerQuote.businessMembers);
} else { } else {
$.modal.msgError(res.msg); $.modal.msgError(res.msg);
} }
} }
}); });
$("input[name='customerFax']").val([sysCustomerQuote.customerFax]);
$("input[name='customerFax']").change(function () {
if ($("input[name='customerFax']").val() == "1") {
var rmbTax_edit = Number($("input[name='rmbTax']").val());
$("input[name='rmbTax']").val(Number(rmbTax_edit % 100).toFixed(2));
} else {
$("input[name='rmbTax']").val(0);
}
});
}); });
$(function() { $(function() {
var options = { var options = {
id: "bootstrap-table-Quote-child", id: "bootstrap-table-Quote-child-detail",
url: ctx + "system/quoteChild/list", url: ctx + "system/quoteChild/list",
queryParams: queryParams, queryParams: queryParams,
pagination: false, pagination: false,
@ -290,9 +280,10 @@
minView: "month", minView: "month",
autoclose: true autoclose: true
}); });
function getTotalAmount(){ function getTotalAmount(){
// $("#addFinishbomTable").bootstrapTable('refresh'); // $("#addFinishbomTable").bootstrapTable('refresh');
let getData = $("#bootstrap-sub-table-quoteChild").bootstrapTable('getData', true); let getData = $("#bootstrap-table-Quote-child-detail").bootstrapTable('getData', true);
var enterprise = "";let enterpriseSum = 0; let noRmb = 0; var enterprise = "";let enterpriseSum = 0; let noRmb = 0;
let rmb = 0;let noRmbSum = 0;let rmbSum = 0;let noUsd = 0; let rmb = 0;let noRmbSum = 0;let rmbSum = 0;let noUsd = 0;
let usd = 0;let noUsdSum = 0; let usdSum = 0; let usd = 0;let noUsdSum = 0; let usdSum = 0;
@ -309,15 +300,15 @@
usdSum += getData[i].materialUsdSum; usdSum += getData[i].materialUsdSum;
} }
$("#enterprise_detail").val(enterprise); $("#enterprise_detail").val(enterprise);
$("#enterpriseSum_detail").val(Number(enterpriseSum).toFixed(2)); $("#enterpriseSum_detail").val(enterpriseSum);
$("#noRmb_detail").val(Number(noRmb).toFixed(2)); $("#noRmb_detail").val(noRmb);
$("#rmb_detail").val(Number(rmb).toFixed(2)); $("#rmb_detail").val(rmb);
$("#noRmbSum_detail").val(Number(noRmbSum).toFixed(2)); $("#noRmbSum_detail").val(noRmbSum);
$("#rmbSum_detail").val(Number(rmbSum).toFixed(2)); $("#rmbSum_detail").val(rmbSum);
$("#noUsd_detail").val(Number(noUsd).toFixed(2)); $("#noUsd_detail").val(noUsd);
$("#usd_detail").val(Number(usd).toFixed(2)); $("#usd_detail").val(usd);
$("#noUsdSum_detail").val(Number(noUsdSum).toFixed(2)); $("#noUsdSum_detail").val(noUsdSum);
$("#usdSum_detail").val(Number(usdSum).toFixed(2)); $("#usdSum_detail").val(usdSum);
} }
</script> </script>
</body> </body>

30
ruoyi-admin/src/main/resources/templates/system/customerQuote/edit.html

@ -20,7 +20,7 @@
<input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" readonly> <input name="supplierCode" th:field="*{supplierCode}" class="form-control" type="text" readonly>
</div> </div>
</div> </div>
<div class="col-xs-12" shiro:hasPermission="system:customerQuote:edit"> <div class="form-group" shiro:hasPermission="system:customerQuote:edit">
<label class="col-sm-4 control-label">业务员:</label> <label class="col-sm-4 control-label">业务员:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select readonly class="form-control" name="businessMembers" required th:field="*{businessMembers}"> <select readonly class="form-control" name="businessMembers" required th:field="*{businessMembers}">
@ -75,8 +75,8 @@
<label class="col-sm-4 control-label">订价日期:</label> <label class="col-sm-4 control-label">订价日期:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="pricingDate" th:value="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text" disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon" disabled><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
@ -87,26 +87,30 @@
<textarea readonly name="remark" th:field="*{remark}" class="form-control"></textarea> <textarea readonly name="remark" th:field="*{remark}" class="form-control"></textarea>
</div> </div>
</div> </div>
<div class="flex-row-m"> <div class="container">
<h4 class="form-header h4">计算</h4> <h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise_edit" type="text" readonly/> <label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise_edit" type="text" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_edit" type="number" readonly/> <label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_edit" type="number" readonly/>
</div> </div>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_edit" type="number" readonly/> <label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_edit" type="number" readonly/>
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_edit" type="number" readonly/> <label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_edit" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-4" name="rmb" id="rmb_edit" type="number" readonly/> <label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-4" name="rmb" id="rmb_edit" type="number" readonly/>
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-4" name="rmbSum" id="rmbSum_edit" type="number" readonly/> <label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-4" name="rmbSum" id="rmbSum_edit" type="number" readonly/>
</div> </div>
<div class="col-xs-12"> <div class="col-xs-12">
<label class="col-sm-2">不含税单价:</label><input placeholder="美元" class="col-sm-4" name="noUsd" id="noUsd_edit" type="number" readonly/> <label class="col-sm-2">不含税单价:</label><input placeholder="美元" class="col-sm-4" name="noUsd" id="noUsd_edit" type="number" readonly/>
<label class="col-sm-2">不含税总价:</label><input placeholder="美元" class="col-sm-4" name="noUsdSum" id="noUsdSum_edit" type="number" readonly/> <label class="col-sm-2">不含税总价:</label><input placeholder="美元" class="col-sm-4" name="noUsdSum" id="noUsdSum_edit" type="number" readonly/>
</div>
<div class="col-xs-12">
<label class="col-sm-2">含税单价:</label><input placeholder="美元" class="col-sm-4" name="usd" id="usd_edit" type="number" readonly/> <label class="col-sm-2">含税单价:</label><input placeholder="美元" class="col-sm-4" name="usd" id="usd_edit" type="number" readonly/>
<label class="col-sm-2">含税总价:</label><input placeholder="美元" class="col-sm-4" name="usdSum" id="usdSum_edit" type="number" readonly/> <label class="col-sm-2">含税总价:</label><input placeholder="美元" class="col-sm-4" name="usdSum" id="usdSum_edit" type="number" readonly/>
</div> </div>
</div> </div>
<input type="hidden" name="customerQuoteChildList" >
</form> </form>
<div class="other container"> <div class="other container">
<div class="form-row"> <div class="form-row">
@ -122,7 +126,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-Quote-child"></table> <table id="bootstrap-table-Quote-child-edit1"></table>
</div> </div>
</div> </div>
</div> </div>
@ -147,8 +151,8 @@
$(function() { $(function() {
/*业务员列表*/ /*业务员列表*/
$.ajax({ $.ajax({
url: ctx + 'system/user/list', url: ctx + 'system/salesOrder/getBinessMembers',
type: 'post', type: 'get',
success: function (res) { success: function (res) {
console.log(res) console.log(res)
if (res.rows.length > 0) { if (res.rows.length > 0) {
@ -177,7 +181,7 @@
}); });
$(function() { $(function() {
var options = { var options = {
id: "bootstrap-table-Quote-child", id: "bootstrap-table-Quote-child-edit1",
url: ctx + "system/quoteChild/list", url: ctx + "system/quoteChild/list",
queryParams: queryParams, queryParams: queryParams,
pagination: false, pagination: false,
@ -299,7 +303,7 @@
if ($.validate.form()) { if ($.validate.form()) {
var formData = $("#form-customerQuote-edit").serializeArray(); var formData = $("#form-customerQuote-edit").serializeArray();
console.log("formData",formData); console.log("formData",formData);
var tableData = $("#bootstrap-table-Quote-child").bootstrapTable('getData'); var tableData = $("#bootstrap-table-Quote-child-edit1").bootstrapTable('getData');
console.log("tableData",JSON.stringify(tableData)); console.log("tableData",JSON.stringify(tableData));
var rows = tableData.length; var rows = tableData.length;
if(rows==0){ if(rows==0){
@ -319,8 +323,8 @@
let enterpriseSum = $("#enterpriseSum").val(); let enterpriseSum = $("#enterpriseSum").val();
$("#enterpriseSum").val((enterpriseSum==''?0:enterpriseSum) + 1); $("#enterpriseSum").val((enterpriseSum==''?0:enterpriseSum) + 1);
var timestamp = new Date().getTime(); var timestamp = new Date().getTime();
var totalNum = $("#bootstrap-table-Quote-child").bootstrapTable('getData').length; var totalNum = $("#bootstrap-table-Quote-child-edit1").bootstrapTable('getData').length;
$("#bootstrap-table-Quote-child").bootstrapTable('insertRow', { $("#bootstrap-table-Quote-child-edit1").bootstrapTable('insertRow', {
index: totalNum, index: totalNum,
row: { row: {
id:'', id:'',
@ -376,7 +380,7 @@
}); });
//计算 //计算
function getTotalAmount(){ function getTotalAmount(){
let getData = $("#bootstrap-table-Quote-child").bootstrapTable('getData', true); let getData = $("#bootstrap-table-Quote-child-edit1").bootstrapTable('getData', true);
var enterprise = ""; var enterprise = "";
let enterpriseSum = 0; let enterpriseSum = 0;
let noRmb = 0;let rmb = 0;let noRmbSum = 0; let noRmb = 0;let rmb = 0;let noRmbSum = 0;

64
ruoyi-admin/src/main/resources/templates/system/customerQuote/taskModifyApply.html

@ -7,9 +7,12 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> <div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-edit" th:object="${formData}"> <form class="form-horizontal m" id="form-customerQuote-modify" th:object="${formData}">
<input name="id" th:field="*{id}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden"> <input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<!--驳回调整允许更新内容--> <!--驳回调整允许更新内容-->
<input type="hidden" name="saveEntity" value="true" /> <input type="hidden" name="saveEntity" value="true" />
<div class="form-group"> <div class="form-group">
@ -100,8 +103,8 @@
<label class="col-sm-4 control-label">订价日期:</label> <label class="col-sm-4 control-label">订价日期:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="pricingDate" th:value="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text" disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon" disabled><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
@ -115,21 +118,24 @@
<div class="container"> <div class="container">
<h4 class="form-header h4">计算</h4> <h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise_edit" th:field="*{enterprise}" type="text" disabled/> <label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise_edit" type="text" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_edit" th:field="*{enterpriseSum}" type="number" disabled/> <label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_edit" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_edit" type="number" readonly/>
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_edit" type="number" readonly/>
</div> </div>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-1" name="noRmb" id="noRmb_edit" th:field="*{noRmb}" type="number" disabled /> <label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-4" name="rmb" id="rmb_edit" type="number" readonly/>
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-1" name="noRmbSum" id="noRmbSum_edit" th:field="*{noRmbSum}" type="number" disabled/> <label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-4" name="rmbSum" id="rmbSum_edit" type="number" readonly/>
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-1" name="rmb" id="rmb_edit" type="number" th:field="*{rmb}" disabled/> </div>
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-1" name="rmbSum" id="rmbSum_edit" th:field="*{rmbSum}" type="number" disabled/> <div class="col-xs-12">
<label class="col-sm-2">不含税单价:</label><input placeholder="美元" class="col-sm-4" name="noUsd" id="noUsd_edit" type="number" readonly/>
<label class="col-sm-2">不含税总价:</label><input placeholder="美元" class="col-sm-4" name="noUsdSum" id="noUsdSum_edit" type="number" readonly/>
</div> </div>
<div class="col-xs-12"> <div class="col-xs-12">
<label class="col-sm-2">不含税单价(美元):</label><input placeholder="USD" class="col-sm-1" name="noUsd" id="noUsd_edit" th:field="*{noUsd}" type="number" disabled/> <label class="col-sm-2">含税单价:</label><input placeholder="美元" class="col-sm-4" name="usd" id="usd_edit" type="number" readonly/>
<label class="col-sm-2">不含税总价:</label><input placeholder="USD" class="col-sm-1" name="noUsdSum" id="noUsdSum_edit" th:field="*{noUsdSum}" type="number" disabled/> <label class="col-sm-2">含税总价:</label><input placeholder="美元" class="col-sm-4" name="usdSum" id="usdSum_edit" type="number" readonly/>
<label class="col-sm-2">含税单价:</label><input placeholder="USD" class="col-sm-1" name="usd" id="usd_edit" th:field="*{usd}" type="number" disabled/>
<label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum_edit" th:field="*{usdSum}" type="number" disabled/>
</div> </div>
</div> </div>
<hr/> <hr/>
@ -142,6 +148,7 @@
</select> </select>
</div> </div>
</div> </div>
<input type="hidden" name="customerQuoteChildList" >
</form> </form>
<div class="other container"> <div class="other container">
<div class="form-row"> <div class="form-row">
@ -157,7 +164,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-Quote-child"></table> <table id="bootstrap-table-Quote-child2"></table>
</div> </div>
</div> </div>
</div> </div>
@ -168,7 +175,7 @@
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> <script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "erp/bom"; var prefix = ctx + "erp/bom";
$("#form-edit").validate({focusCleanup: true}); $("#form-customerQuote-modify").validate({focusCleanup: true});
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
@ -177,23 +184,23 @@
var sysCustomerQuote = [[${formData}]]; var sysCustomerQuote = [[${formData}]];
var prefix = ctx + "system/customerQuote" var prefix = ctx + "system/customerQuote"
var commonCurrency = $("#commonCurrency_edit option:selected").val(); var commonCurrency = $("#commonCurrency_edit option:selected").val();
$("#form-edit").validate({ $("#form-customerQuote-modify").validate({
focusCleanup: true, focusCleanup: true,
}); });
$(function() { $(function() {
/*业务员列表*/ /*业务员列表*/
$.ajax({ $.ajax({
url: ctx + 'system/user/list', url: ctx + 'system/salesOrder/getBinessMembers',
type: 'post', type: 'get',
success: function (res) { success: function (res) {
console.log(res) console.log(res)
if (res.rows.length > 0) { if (res.rows.length > 0) {
var usertData = res.rows; var usertData = res.rows;
for (let i in usertData) { for (let i in usertData) {
$("#form-edit select[name='businessMembers']").append("<option value='" $("#form-customerQuote-modify select[name='businessMembers']").append("<option value='"
+ usertData[i].userName + "'>" + usertData[i].userName + "</option>"); + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
} }
$("#form-edit select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change") $("#form-customerQuote-modify select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change")
} else { } else {
$.modal.msgError(res.msg); $.modal.msgError(res.msg);
} }
@ -213,7 +220,7 @@
}); });
$(function() { $(function() {
var options = { var options = {
id: "bootstrap-table-Quote-child", id: "bootstrap-table-Quote-child2",
url: ctx + "system/quoteChild/list", url: ctx + "system/quoteChild/list",
queryParams: queryParams, queryParams: queryParams,
pagination: false, pagination: false,
@ -333,9 +340,9 @@
} }
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
var formData = $("#form-edit").serializeArray(); var formData = $("#form-customerQuote-modify").serializeArray();
console.log("formData",formData); console.log("formData",formData);
var tableData = $("#bootstrap-table-Quote-child").bootstrapTable('getData'); var tableData = $("#bootstrap-table-Quote-child2").bootstrapTable('getData');
console.log("tableData",JSON.stringify(tableData)); console.log("tableData",JSON.stringify(tableData));
var rows = tableData.length; var rows = tableData.length;
var materialType = $('#selectMaterialType').select2('val'); var materialType = $('#selectMaterialType').select2('val');
@ -343,8 +350,9 @@
if ($('textarea[name="comment"]').val()) { if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); $('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
} }
$("input[name='customerQuoteChildList']").val(JSON.stringify(tableData));
var taskId = [[${taskId}]]; var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId, $('#form-edit').serialize()); $.operate.save(prefix + "/complete/" + taskId, $('#form-customerQuote-modify').serialize());
} }
} }
@ -356,8 +364,8 @@
let enterpriseSum = $("#enterpriseSum").val(); let enterpriseSum = $("#enterpriseSum").val();
$("#enterpriseSum").val((enterpriseSum==''?0:enterpriseSum) + 1); $("#enterpriseSum").val((enterpriseSum==''?0:enterpriseSum) + 1);
var timestamp = new Date().getTime(); var timestamp = new Date().getTime();
var totalNum = $("#bootstrap-table-Quote-child").bootstrapTable('getData').length; var totalNum = $("#bootstrap-table-Quote-child2").bootstrapTable('getData').length;
$("#bootstrap-table-Quote-child").bootstrapTable('insertRow', { $("#bootstrap-table-Quote-child2").bootstrapTable('insertRow', {
index: totalNum, index: totalNum,
row: { row: {
id:'', id:'',
@ -413,7 +421,7 @@
}); });
//计算 //计算
function getTotalAmount(){ function getTotalAmount(){
let getData = $("#bootstrap-table-Quote-child").bootstrapTable('getData', true); let getData = $("#bootstrap-table-Quote-child2").bootstrapTable('getData', true);
var enterprise = ""; var enterprise = "";
let enterpriseSum = 0; let enterpriseSum = 0;
let noRmb = 0;let rmb = 0;let noRmbSum = 0; let noRmb = 0;let rmb = 0;let noRmbSum = 0;

80
ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwgzVerify.html

@ -6,9 +6,12 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> <div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-edit" th:object="${formData}"> <form class="form-horizontal m" id="form-customerQuote-ywgz" th:object="${formData}">
<input name="id" th:field="*{id}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden"> <input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<input type="hidden" name="p_COM_comment" /> <input type="hidden" name="p_COM_comment" />
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">申请人:</label> <label class="col-sm-3 control-label">申请人:</label>
@ -46,7 +49,7 @@
<div class="col-xs-12"> <div class="col-xs-12">
<label class="col-sm-4 control-label">业务员:</label> <label class="col-sm-4 control-label">业务员:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select readonly class="form-control" name="businessMembers" required th:field="*{businessMembers}"> <select class="form-control" name="businessMembers" disabled required th:field="*{businessMembers}">
<option value="">请选择</option> <option value="">请选择</option>
</select> </select>
</div> </div>
@ -98,8 +101,8 @@
<label class="col-sm-4 control-label">订价日期:</label> <label class="col-sm-4 control-label">订价日期:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="pricingDate" th:field="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text" disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon" disabled><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
@ -113,21 +116,24 @@
<div class="container"> <div class="container">
<h4 class="form-header h4">计算</h4> <h4 class="form-header h4">计算</h4>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise_edit" th:field="*{enterprise}" type="text" disabled/> <label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise_edit" type="text" readonly/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_edit" th:field="*{enterpriseSum}" type="number" disabled/> <label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_edit" type="number" readonly/>
</div>
<div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_edit" type="number" readonly/>
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_edit" type="number" readonly/>
</div> </div>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-1" name="noRmb" id="noRmb_edit" th:field="*{noRmb}" type="number" disabled /> <label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-4" name="rmb" id="rmb_edit" type="number" readonly/>
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-1" name="noRmbSum" id="noRmbSum_edit" th:field="*{noRmbSum}" type="number" disabled/> <label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-4" name="rmbSum" id="rmbSum_edit" type="number" readonly/>
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-1" name="rmb" id="rmb_edit" type="number" th:field="*{rmb}" disabled/> </div>
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-1" name="rmbSum" id="rmbSum_edit" th:field="*{rmbSum}" type="number" disabled/> <div class="col-xs-12">
<label class="col-sm-2">不含税单价:</label><input placeholder="美元" class="col-sm-4" name="noUsd" id="noUsd_edit" type="number" readonly/>
<label class="col-sm-2">不含税总价:</label><input placeholder="美元" class="col-sm-4" name="noUsdSum" id="noUsdSum_edit" type="number" readonly/>
</div> </div>
<div class="col-xs-12"> <div class="col-xs-12">
<label class="col-sm-2">不含税单价(美元):</label><input placeholder="USD" class="col-sm-1" name="noUsd" id="noUsd_edit" th:field="*{noUsd}" type="number" disabled/> <label class="col-sm-2">含税单价:</label><input placeholder="美元" class="col-sm-4" name="usd" id="usd_edit" type="number" readonly/>
<label class="col-sm-2">不含税总价:</label><input placeholder="USD" class="col-sm-1" name="noUsdSum" id="noUsdSum_edit" th:field="*{noUsdSum}" type="number" disabled/> <label class="col-sm-2">含税总价:</label><input placeholder="美元" class="col-sm-4" name="usdSum" id="usdSum_edit" type="number" readonly/>
<label class="col-sm-2">含税单价:</label><input placeholder="USD" class="col-sm-1" name="usd" id="usd_edit" th:field="*{usd}" type="number" disabled/>
<label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum_edit" th:field="*{usdSum}" type="number" disabled/>
</div> </div>
</div> </div>
@ -148,6 +154,7 @@
<textarea name="comment" class="form-control"></textarea> <textarea name="comment" class="form-control"></textarea>
</div> </div>
</div> </div>
<input type="hidden" name="customerQuoteChildList" >
</form> </form>
<div class="other container"> <div class="other container">
<div class="form-row"> <div class="form-row">
@ -160,7 +167,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-Quote-child"></table> <table id="bootstrap-table-Quote-child3"></table>
</div> </div>
</div> </div>
</div> </div>
@ -172,7 +179,7 @@
<script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script> <script th:src="@{/ajax/libs/element-ui/element-ui.js}"></script>
<script th:inline="javascript"> <script th:inline="javascript">
var prefix = ctx + "erp/bom"; var prefix = ctx + "erp/bom";
$("#form-edit").validate({focusCleanup: true}); $("#form-customerQuote-ywgz").validate({focusCleanup: true});
var materialTypeDatas = [[${@category.getChildByCode('materialType')}]]; var materialTypeDatas = [[${@category.getChildByCode('materialType')}]];
var auditStatusDatas = [[${@dict.getType('auditStatus')}]]; var auditStatusDatas = [[${@dict.getType('auditStatus')}]];
var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]]; var sysUnitClassDatas = [[${@dict.getType('sys_unit_class')}]];
@ -181,22 +188,22 @@
var sysCustomerQuote = [[${formData}]]; var sysCustomerQuote = [[${formData}]];
var prefix = ctx + "system/customerQuote" var prefix = ctx + "system/customerQuote"
var commonCurrency = $("#commonCurrency_edit option:selected").val(); var commonCurrency = $("#commonCurrency_edit option:selected").val();
$("#form-edit").validate({ $("#form-customerQuote-ywgz").validate({
focusCleanup: true, focusCleanup: true,
}); });
$(function() { $(function() {
/*业务员列表*/ /*业务员列表*/
$.ajax({ $.ajax({
url: ctx + 'system/user/list', url: ctx + 'system/salesOrder/getBinessMembers',
type: 'post', type: 'get',
success: function (res) { success: function (res) {
console.log(res) console.log(res)
if (res.rows.length > 0) { if (res.rows.length > 0) {
var usertData = res.rows; var usertData = res.rows;
for (let i in usertData) { for (let i in usertData) {
$("#form-edit select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>"); $("#form-customerQuote-ywgz select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
} }
$("#form-edit select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change") $("#form-customerQuote-ywgz select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change")
} else { } else {
$.modal.msgError(res.msg); $.modal.msgError(res.msg);
} }
@ -216,7 +223,7 @@
}); });
$(function() { $(function() {
var options = { var options = {
id: "bootstrap-table-Quote-child", id: "bootstrap-table-Quote-child3",
url: ctx + "system/quoteChild/list", url: ctx + "system/quoteChild/list",
queryParams: queryParams, queryParams: queryParams,
pagination: false, pagination: false,
@ -334,32 +341,15 @@
curParams.quoteId = sysCustomerQuote.supplierCode; curParams.quoteId = sysCustomerQuote.supplierCode;
return curParams; return curParams;
} }
function submitHandler() {
if ($.validate.form()) {
var formData = $("#form-edit").serializeArray();
console.log("formData",formData);
var tableData = $("#bootstrap-table-Quote-child").bootstrapTable('getData');
console.log("tableData",JSON.stringify(tableData));
var rows = tableData.length;
if(rows==0){
$.modal.alertWarning("子表数据不能为空!");
}else{
formData.push({"name": "sysCustomerQuoteChildList", "value": tableData});
var jsonData = $.common.formDataToJson(formData);
$.operate.saveJson(prefix + "/edit", jsonData);
}
}
}
function doSubmit(index, layero,uniqueId){ function doSubmit(index, layero,uniqueId){
console.log(uniqueId); console.log(uniqueId);
var iframeWin = window[layero.find('iframe')[0]['name']]; var iframeWin = window[layero.find('iframe')[0]['name']];
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0]; var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
console.log("rowData: "+rowData); console.log("rowData: "+rowData);
let enterpriseSum = $("#enterpriseSum").val(); let enterpriseSum = $("#enterpriseSum").val();
$("#enterpriseSum").val((enterpriseSum==''?0:enterpriseSum) + 1);
var timestamp = new Date().getTime(); var timestamp = new Date().getTime();
var totalNum = $("#bootstrap-table-Quote-child").bootstrapTable('getData').length; var totalNum = $("#bootstrap-table-Quote-child3").bootstrapTable('getData').length;
$("#bootstrap-table-Quote-child").bootstrapTable('insertRow', { $("#bootstrap-table-Quote-child3").bootstrapTable('insertRow', {
index: totalNum, index: totalNum,
row: { row: {
id:'', id:'',
@ -415,7 +405,7 @@
}); });
//计算 //计算
function getTotalAmount(){ function getTotalAmount(){
let getData = $("#bootstrap-table-Quote-child").bootstrapTable('getData', true); let getData = $("#bootstrap-table-Quote-child3").bootstrapTable('getData', true);
var enterprise = ""; var enterprise = "";
let enterpriseSum = 0; let enterpriseSum = 0;
let noRmb = 0;let rmb = 0;let noRmbSum = 0; let noRmb = 0;let rmb = 0;let noRmbSum = 0;
@ -451,8 +441,10 @@
if ($('textarea[name="comment"]').val()) { if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); $('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
} }
var tableData = $("#bootstrap-table-Quote-child3").bootstrapTable('getData');
$("input[name='customerQuoteChildList']").val(JSON.stringify(tableData));
var taskId = [[${taskId}]]; var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId, $('#form-edit').serialize()); $.operate.save(prefix + "/complete/" + taskId, $('#form-customerQuote-ywgz').serialize());
} }
} }

37
ruoyi-admin/src/main/resources/templates/system/customerQuote/taskYwjlVerify.html

@ -6,9 +6,13 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> <div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-ywjl-audit" th:object="${formData}"> <form class="form-horizontal m" id="form-customerQuote-ywjl" th:object="${formData}">
<input name="id" th:field="*{id}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden"> <input name="taskId" th:field="*{taskId}" type="hidden">
<input type="hidden" th:field="*{instanceId}" name="instanceId" />
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<input type="hidden" name="p_COM_comment" /> <input type="hidden" name="p_COM_comment" />
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">申请人:</label> <label class="col-sm-3 control-label">申请人:</label>
@ -99,8 +103,8 @@
<label class="col-sm-4 control-label">订价日期:</label> <label class="col-sm-4 control-label">订价日期:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="pricingDate" th:field="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text" disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon" disabled><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
@ -119,7 +123,7 @@
</div> </div>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB)</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_edit" th:field="*{noRmb}" type="number" disabled /> <label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_edit" th:field="*{noRmb}" type="number" disabled />
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_edit" th:field="*{noRmbSum}" type="number" disabled/> <label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_edit" th:field="*{noRmbSum}" type="number" disabled/>
</div> </div>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
@ -127,7 +131,7 @@
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-4" name="rmbSum" id="rmbSum_edit" th:field="*{rmbSum}" type="number" disabled/> <label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-4" name="rmbSum" id="rmbSum_edit" th:field="*{rmbSum}" type="number" disabled/>
</div> </div>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class="col-sm-2">不含税单价(美元)</label><input placeholder="USD" class="col-sm-4" name="noUsd" id="noUsd_edit" th:field="*{noUsd}" type="number" disabled/> <label class="col-sm-2">不含税单价:</label><input placeholder="USD" class="col-sm-4" name="noUsd" id="noUsd_edit" th:field="*{noUsd}" type="number" disabled/>
<label class="col-sm-2">不含税总价:</label><input placeholder="USD" class="col-sm-4" name="noUsdSum" id="noUsdSum_edit" th:field="*{noUsdSum}" type="number" disabled/> <label class="col-sm-2">不含税总价:</label><input placeholder="USD" class="col-sm-4" name="noUsdSum" id="noUsdSum_edit" th:field="*{noUsdSum}" type="number" disabled/>
</div> </div>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
@ -153,6 +157,7 @@
<textarea name="comment" class="form-control"></textarea> <textarea name="comment" class="form-control"></textarea>
</div> </div>
</div> </div>
<input type="hidden" name="customerQuoteChildList" >
</form> </form>
<div class="other container"> <div class="other container">
<div class="form-row"> <div class="form-row">
@ -165,7 +170,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-Quote-child"></table> <table id="bootstrap-table-Quote-child4"></table>
</div> </div>
</div> </div>
</div> </div>
@ -182,20 +187,20 @@
var sysCustomerQuote = [[${formData}]]; var sysCustomerQuote = [[${formData}]];
var prefix = ctx + "system/customerQuote" var prefix = ctx + "system/customerQuote"
var commonCurrency = $("#commonCurrency_edit option:selected").val(); var commonCurrency = $("#commonCurrency_edit option:selected").val();
$("#form-ywjl-audit").validate({focusCleanup: true}); $("#form-customerQuote-ywjl").validate({focusCleanup: true});
$(function() { $(function() {
$.ajax({ $.ajax({
url: ctx + 'system/user/list', url: ctx + 'system/salesOrder/getBinessMembers',
type: 'post', type: 'get',
success: function (res) { success: function (res) {
console.log(res) console.log(res)
if (res.rows.length > 0) { if (res.rows.length > 0) {
var usertData = res.rows; var usertData = res.rows;
for (let i in usertData) { for (let i in usertData) {
$("#form-ywjl-audit select[name='businessMembers']").append("<option value='" + $("#form-customerQuote-ywjl select[name='businessMembers']").append("<option value='" +
usertData[i].userName + "'>" + usertData[i].userName + "</option>"); usertData[i].userName + "'>" + usertData[i].userName + "</option>");
} }
$("#form-ywjl-audit select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change");; $("#form-customerQuote-ywjl select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change");;
} else { } else {
$.modal.msgError(res.msg); $.modal.msgError(res.msg);
} }
@ -215,7 +220,7 @@
}); });
$(function() { $(function() {
var options = { var options = {
id: "bootstrap-table-Quote-child", id: "bootstrap-table-Quote-child4",
url: ctx + "system/quoteChild/list", url: ctx + "system/quoteChild/list",
queryParams: queryParams, queryParams: queryParams,
pagination: false, pagination: false,
@ -339,7 +344,7 @@
var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0]; var rowData = iframeWin.$('#bootstrap-select-table').bootstrapTable('getSelections')[0];
console.log("rowData: "+rowData); console.log("rowData: "+rowData);
var timestamp = new Date().getTime(); var timestamp = new Date().getTime();
$("#bootstrap-table-Quote-child").bootstrapTable('insertRow', { $("#bootstrap-table-Quote-child4").bootstrapTable('insertRow', {
index: 1, index: 1,
row: { row: {
id:'', id:'',
@ -393,7 +398,7 @@
}); });
//计算 //计算
function getTotalAmount(){ function getTotalAmount(){
let getData = $("#bootstrap-table-Quote-child").bootstrapTable('getData', true); let getData = $("#bootstrap-table-Quote-child4").bootstrapTable('getData', true);
var enterprise = ""; var enterprise = "";
let enterpriseSum = 0; let enterpriseSum = 0;
let noRmb = 0;let rmb = 0;let noRmbSum = 0; let noRmb = 0;let rmb = 0;let noRmbSum = 0;
@ -429,8 +434,10 @@
if ($('textarea[name="comment"]').val()) { if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val()); $('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
} }
var tableData = $("#bootstrap-table-Quote-child4").bootstrapTable('getData');
$("input[name='customerQuoteChildList']").val(JSON.stringify(tableData));
var taskId = [[${taskId}]]; var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId, $('#form-ywjl-audit').serialize()); $.operate.save(prefix + "/complete/" + taskId, $('#form-customerQuote-ywjl').serialize());
} }
} }
</script> </script>

65
ruoyi-admin/src/main/resources/templates/system/customerQuote/taskZozjVerify.html

@ -7,9 +7,12 @@
</head> </head>
<body class="white-bg"> <body class="white-bg">
<div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content"> <div id="app" class="wrapper wrapper-content animated fadeInRight ibox-content">
<form class="form-horizontal m" id="form-zozj-audit" th:object="${formData}"> <form class="form-horizontal m" id="form-customerQuote-zozj" th:object="${formData}">
<input name="id" th:field="*{id}" type="hidden"> <input name="id" th:field="*{id}" type="hidden">
<input name="taskId" th:field="*{taskId}" type="hidden"> <input name="taskId" th:field="*{taskId}" type="hidden">
<input name="taskName" th:field="*{taskName}" type="hidden">
<input name="instanceId" th:field="*{instanceId}" type="hidden">
<input name="instanceType" th:field="*{instanceType}" type="hidden">
<input type="hidden" name="p_COM_comment" /> <input type="hidden" name="p_COM_comment" />
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label">申请人:</label> <label class="col-sm-3 control-label">申请人:</label>
@ -47,20 +50,20 @@
<div class="col-xs-12" shiro:hasPermission="system:customerQuote:edit"> <div class="col-xs-12" shiro:hasPermission="system:customerQuote:edit">
<label class="col-sm-4 control-label">业务员:</label> <label class="col-sm-4 control-label">业务员:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select class="form-control" name="businessMembers" th:field="*{businessMembers}" required readonly > <select class="form-control" name="businessMembers" th:field="*{businessMembers}" required disabled >
</select> </select>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">客户编号:</label> <label class="col-sm-4 control-label">客户编号:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input readonly class="form-control" th:field="*{customerCode}" name="customerCode" required > <input readonly class="form-control" th:field="*{customerCode}" name="customerCode" required disabled>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">客户名称:</label> <label class="col-sm-4 control-label">客户名称:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input redonly name="customerName" th:field="*{customerName}" class="form-control m-b" type="text" readonly /> <input redonly name="customerName" th:field="*{customerName}" class="form-control m-b" type="text" disabled />
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
@ -75,7 +78,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">美元汇率:</label> <label class="col-sm-4 control-label">美元汇率:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="usdTax" id="usdTax_edit" th:field="*{usdTax}" <input name="usdTax" id="usdTax_edit" th:field="*{usdTax}"
class="form-control" type="number" placeholder="美元对人民币汇率"> class="form-control" type="number" placeholder="美元对人民币汇率">
</div> </div>
</div> </div>
@ -92,15 +95,15 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">国内税率:</label> <label class="col-sm-4 control-label">国内税率:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<input name="rmbTax" id="rmbTax_edit" th:field="*{rmbTax}" class="form-control" type="number" placeholder="13%" /> <input name="rmbTax" id="rmbTax_edit" th:field="*{rmbTax}" class="form-control" type="number" placeholder="%" />
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-sm-4 control-label">订价日期:</label> <label class="col-sm-4 control-label">订价日期:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<div class="input-group date"> <div class="input-group date">
<input name="pricingDate" th:field="*{pricingDate}" class="form-control" placeholder="yyyy-MM-dd" type="text"> <input name="pricingDate" th:field="*{pricingDate}" class="form-control" type="text" disabled>
<span class="input-group-addon"><i class="fa fa-calendar"></i></span> <span class="input-group-addon" disabled><i class="fa fa-calendar"></i></span>
</div> </div>
</div> </div>
</div> </div>
@ -117,18 +120,21 @@
<label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise_edit" th:field="*{enterprise}" type="text" disabled/> <label class=" col-sm-2">物料合计:</label><input class="col-sm-4" name="enterprise" id="enterprise_edit" th:field="*{enterprise}" type="text" disabled/>
<label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_edit" th:field="*{enterpriseSum}" type="number" disabled/> <label class=" col-sm-2">数量合计:</label><input class="col-sm-4" name="enterpriseSum" id="enterpriseSum_edit" th:field="*{enterpriseSum}" type="number" disabled/>
</div> </div>
<div class="col-xs-12 form-row"> <div class="col-xs-12 form-row">
<label class="col-sm-2"> 不含税单价(RMB):</label><input placeholder="RMB" class="col-sm-1" name="noRmb" id="noRmb_edit" th:field="*{noRmb}" type="number" disabled /> <label class="col-sm-2"> 不含税单价:</label><input placeholder="RMB" class="col-sm-4" name="noRmb" id="noRmb_edit" th:field="*{noRmb}" type="number" disabled />
<label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-1" name="noRmbSum" id="noRmbSum_edit" th:field="*{noRmbSum}" type="number" disabled/> <label class="col-sm-2"> 不含税总价:</label><input placeholder="RMB" class="col-sm-4" name="noRmbSum" id="noRmbSum_edit" th:field="*{noRmbSum}" type="number" disabled/>
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-1" name="rmb" id="rmb_edit" type="number" th:field="*{rmb}" disabled/> </div>
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-1" name="rmbSum" id="rmbSum_edit" th:field="*{rmbSum}" type="number" disabled/> <div class="col-xs-12 form-row">
<label class="col-sm-2"> 含税单价:</label><input placeholder="RMB" class="col-sm-4" name="rmb" id="rmb_edit" type="number" th:field="*{rmb}" disabled/>
<label class="col-sm-2"> 含税总价:</label><input placeholder="RMB" class="col-sm-4" name="rmbSum" id="rmbSum_edit" th:field="*{rmbSum}" type="number" disabled/>
</div> </div>
<div class="col-xs-12"> <div class="col-xs-12 form-row">
<label class="col-sm-2">不含税单价(美元):</label><input placeholder="USD" class="col-sm-1" name="noUsd" id="noUsd_edit" th:field="*{noUsd}" type="number" disabled/> <label class="col-sm-2">不含税单价:</label><input placeholder="USD" class="col-sm-4" name="noUsd" id="noUsd_edit" th:field="*{noUsd}" type="number" disabled/>
<label class="col-sm-2">不含税总价:</label><input placeholder="USD" class="col-sm-1" name="noUsdSum" id="noUsdSum_edit" th:field="*{noUsdSum}" type="number" disabled/> <label class="col-sm-2">不含税总价:</label><input placeholder="USD" class="col-sm-4" name="noUsdSum" id="noUsdSum_edit" th:field="*{noUsdSum}" type="number" disabled/>
<label class="col-sm-2">含税单价:</label><input placeholder="USD" class="col-sm-1" name="usd" id="usd_edit" th:field="*{usd}" type="number" disabled/> </div>
<label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-1" name="usdSum" id="usdSum_edit" th:field="*{usdSum}" type="number" disabled/> <div class="col-xs-12 form-row">
<label class="col-sm-2">含税单价:</label><input placeholder="USD" class="col-sm-4" name="usd" id="usd_edit" th:field="*{usd}" type="number" disabled/>
<label class="col-sm-2">含税总价:</label><input placeholder="USD" class="col-sm-4" name="usdSum" id="usdSum_edit" th:field="*{usdSum}" type="number" disabled/>
</div> </div>
</div> </div>
@ -149,6 +155,7 @@
<textarea name="comment" class="form-control"></textarea> <textarea name="comment" class="form-control"></textarea>
</div> </div>
</div> </div>
<input type="hidden" name="customerQuoteChildList" >
</form> </form>
<div class="other container"> <div class="other container">
<div class="form-row"> <div class="form-row">
@ -161,7 +168,7 @@
</div> </div>
<div class="row"> <div class="row">
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table-Quote-child"></table> <table id="bootstrap-table-Quote-child5"></table>
</div> </div>
</div> </div>
</div> </div>
@ -180,20 +187,20 @@
var sysCustomerQuote = [[${formData}]]; var sysCustomerQuote = [[${formData}]];
var prefix = ctx + "system/customerQuote" var prefix = ctx + "system/customerQuote"
var commonCurrency = $("#commonCurrency_edit option:selected").val(); var commonCurrency = $("#commonCurrency_edit option:selected").val();
$("#form-zozj-audit").validate({focusCleanup: true}); $("#form-customerQuote-zozj").validate({focusCleanup: true});
$(function() { $(function() {
/*业务员列表*/ /*业务员列表*/
$.ajax({ $.ajax({
url: ctx + 'system/user/list', url: ctx + 'system/salesOrder/getBinessMembers',
type: 'post', type: 'get',
success: function (res) { success: function (res) {
console.log(res) console.log(res)
if (res.rows.length > 0) { if (res.rows.length > 0) {
var usertData = res.rows; var usertData = res.rows;
for (let i in usertData) { for (let i in usertData) {
$("#form-zozj-audit select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>"); $("#form-customerQuote-zozj select[name='businessMembers']").append("<option value='" + usertData[i].userName + "'>" + usertData[i].userName + "</option>");
} }
$("#form-zozj-audit select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change") $("#form-customerQuote-zozj select[name='businessMembers']").val(sysCustomerQuote.businessMembers).trigger("change")
} else { } else {
$.modal.msgError(res.msg); $.modal.msgError(res.msg);
} }
@ -212,7 +219,7 @@
}); });
$(function() { $(function() {
var options = { var options = {
id: "bootstrap-table-Quote-child", id: "bootstrap-table-Quote-child5",
url: ctx + "system/quoteChild/list", url: ctx + "system/quoteChild/list",
queryParams: queryParams, queryParams: queryParams,
pagination: false, pagination: false,
@ -328,7 +335,7 @@
}); });
//计算 //计算
function getTotalAmount(){ function getTotalAmount(){
let getData = $("#bootstrap-table-Quote-child").bootstrapTable('getData'); let getData = $("#bootstrap-table-Quote-child5").bootstrapTable('getData');
var enterprise = ""; var enterprise = "";
let enterpriseSum = 0; let enterpriseSum = 0;
let noRmb = 0;let rmb = 0;let noRmbSum = 0; let noRmb = 0;let rmb = 0;let noRmbSum = 0;
@ -360,8 +367,12 @@
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
if ($('textarea[name="comment"]').val()) {
$('input[name="p_COM_comment"]').val($('textarea[name="comment"]').val());
}
var taskId = [[${taskId}]]; var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId, $('#form-zozj-audit').serialize()); var tableData = $("#bootstrap-table-Quote-child5").bootstrapTable('getData');
$.operate.save(prefix + "/complete/" + taskId, $('#form-customerQuote-zozj').serialize());
} }
} }
</script> </script>

Loading…
Cancel
Save