Compare commits

...

2 Commits

  1. 20
      ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java
  2. 11
      ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuoteChild.java
  3. 1
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java
  4. 8
      ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java
  5. 4
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml
  6. 5
      ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanMapper.xml
  7. 2
      ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteChildMapper.xml
  8. 17
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html
  9. 27
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/detail.html
  10. 11
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/edit.html
  11. 1
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html
  12. 57
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/taskCgjlVerify.html
  13. 30
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/taskCgzgVerify.html
  14. 26
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/taskFzjlVerify.html
  15. 27
      ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/taskModifyApply.html
  16. 8
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html
  17. 8
      ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/purchaseQuote.html

20
ruoyi-admin/src/main/java/com/ruoyi/purchase/controller/PurchaseQuoteController.java

@ -256,4 +256,24 @@ public class PurchaseQuoteController extends BaseController
public Result getPurchaseQuoteById() throws Exception { public Result getPurchaseQuoteById() throws Exception {
return Result.getSuccessResult(purchaseQuoteService.getId()); return Result.getSuccessResult(purchaseQuoteService.getId());
} }
@RequiresPermissions("purchase:purchaseQuote:cancel")
@Log(title = "采购报价单", businessType = BusinessType.UPDATE)
@GetMapping("/cancel/{id}")
@ResponseBody
public AjaxResult cancel(@PathVariable("id")Long id) throws Exception
{
purchaseQuoteService.cancelPurchaseQuoteById(id);
return AjaxResult.success();
}
@RequiresPermissions("purchase:purchaseQuote:restore")
@Log(title = "采购报价单", businessType = BusinessType.UPDATE)
@GetMapping("/restore/{id}")
@ResponseBody
public AjaxResult restore(@PathVariable("id")Long id) throws Exception
{
purchaseQuoteService.restorePurchaseQuoteById(id);
return AjaxResult.success();
}
} }

11
ruoyi-admin/src/main/java/com/ruoyi/purchase/domain/PurchaseQuoteChild.java

@ -226,15 +226,6 @@ public class PurchaseQuoteChild extends BaseEntity
{ {
return materialRmb; return materialRmb;
} }
public void setMaterialNormb(BigDecimal materialNoRmb)
{
this.materialNoRmb = materialNoRmb;
}
public BigDecimal getMaterialNormb()
{
return materialNoRmb;
}
public void setUseStatus(String useStatus) public void setUseStatus(String useStatus)
{ {
this.useStatus = useStatus; this.useStatus = useStatus;
@ -321,7 +312,7 @@ public class PurchaseQuoteChild extends BaseEntity
.append("materialNum", getMaterialNum()) .append("materialNum", getMaterialNum())
.append("materialSole", getMaterialSole()) .append("materialSole", getMaterialSole())
.append("materialRmb", getMaterialRmb()) .append("materialRmb", getMaterialRmb())
.append("materialNoRmb", getMaterialNormb()) .append("materialNoRmb", getMaterialNoRmb())
.append("supplierCode", getSupplierCode()) .append("supplierCode", getSupplierCode())
.append("supplierName", getSupplierName()) .append("supplierName", getSupplierName())
.append("createBy", getCreateBy()) .append("createBy", getCreateBy())

1
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseOrderServiceImpl.java

@ -376,6 +376,7 @@ public class PurchaseOrderServiceImpl implements IPurchaseOrderService
material.setMaterialRealNum(child.getMaterialRealNum()); material.setMaterialRealNum(child.getMaterialRealNum());
material.setMaterialRealNoRmb(child.getMaterialRealNoRmb()); material.setMaterialRealNoRmb(child.getMaterialRealNoRmb());
material.setMaterialRealRmb(child.getMaterialRealRmb()); material.setMaterialRealRmb(child.getMaterialRealRmb());
material.setDeliveryTime(child.getDeliveryTime());
//实际采购单价合计 //实际采购单价合计
material.setMaterialRealRmbSum(suplierMaterialRmbSumLocal); material.setMaterialRealRmbSum(suplierMaterialRmbSumLocal);
material.setMaterialRealNoRmbSum(suplierMaterialNoRmbSumLocal); material.setMaterialRealNoRmbSum(suplierMaterialNoRmbSumLocal);

8
ruoyi-admin/src/main/java/com/ruoyi/purchase/service/impl/PurchaseQuoteServiceImpl.java

@ -248,12 +248,12 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService
if(childResult > 0){ if(childResult > 0){
for(PurchaseQuoteChild child : purchaseQuote.getPurchaseQuoteChildList()){ for(PurchaseQuoteChild child : purchaseQuote.getPurchaseQuoteChildList()){
child.setPurchaseQuoteCode(purchaseQuote.getPurchaseQuoteCode()); child.setPurchaseQuoteCode(purchaseQuote.getPurchaseQuoteCode());
child.setCreateBy(loginName);
child.setSupplierCode(purchaseQuote.getSupplierQuoteCode()); child.setSupplierCode(purchaseQuote.getSupplierQuoteCode());
child.setSupplierName(purchaseQuote.getSupplierName()); child.setSupplierName(purchaseQuote.getSupplierName());
child.setCreateBy(loginName);
child.setDelFlag("0");
child.setCreateTime(DateUtils.getNowDate()); child.setCreateTime(DateUtils.getNowDate());
child.setTaxRate(purchaseQuote.getTaxRate()); child.setTaxRate(purchaseQuote.getTaxRate());
child.setDelFlag("0");
purchaseQuoteChildService.insertPurchaseQuoteChild(child); purchaseQuoteChildService.insertPurchaseQuoteChild(child);
} }
} }
@ -396,7 +396,7 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService
// 使用状态-是 // 使用状态-是
purchaseQuote.setUseStatus("1"); purchaseQuote.setUseStatus("1");
} }
purchaseQuoteMapper.updatePurchaseQuote(purchaseQuote); this.updatePurchaseQuote(purchaseQuote);
return processInstance; return processInstance;
} }
@ -433,8 +433,6 @@ public class PurchaseQuoteServiceImpl implements IPurchaseQuoteService
} }
} }
@Override @Override
public Object getId(){ public Object getId(){
return redisCache.generateBillNo("CGBJ"); return redisCache.generateBillNo("CGBJ");

4
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseOrderChildMapper.xml

@ -129,7 +129,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialType != null">material_type,</if> <if test="materialType != null">material_type,</if>
<if test="materialDescribe != null">material_describe,</if> <if test="materialDescribe != null">material_describe,</if>
<if test="materialBrand != null">material_brand,</if> <if test="materialBrand != null">material_brand,</if>
<if test="materialPhotourl != null">material_photo_url,</if> <if test="materialPhotourl != null">material_photoUrl,</if>
<if test="materialProcessMethod != null">material_process_method,</if> <if test="materialProcessMethod != null">material_process_method,</if>
<if test="materialUnit != null">material_unit,</if> <if test="materialUnit != null">material_unit,</if>
<if test="warehouseDept != null">warehouseDept,</if> <if test="warehouseDept != null">warehouseDept,</if>
@ -206,7 +206,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialType != null">material_type = #{materialType},</if> <if test="materialType != null">material_type = #{materialType},</if>
<if test="materialDescribe != null">material_describe = #{materialDescribe},</if> <if test="materialDescribe != null">material_describe = #{materialDescribe},</if>
<if test="materialBrand != null">material_brand = #{materialBrand},</if> <if test="materialBrand != null">material_brand = #{materialBrand},</if>
<if test="materialPhotourl != null">material_photo_url = #{materialPhotourl}</if> <if test="materialPhotourl != null">material_photoUrl = #{materialPhotourl}</if>
<if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if> <if test="materialProcessMethod != null">material_process_method = #{materialProcessMethod},</if>
<if test="materialUnit != null">material_unit = #{materialUnit},</if> <if test="materialUnit != null">material_unit = #{materialUnit},</if>
<if test="warehouseDept != null">warehouseDept = #{warehouseDept},</if> <if test="warehouseDept != null">warehouseDept = #{warehouseDept},</if>

5
ruoyi-admin/src/main/resources/mapper/purchase/PurchasePlanMapper.xml

@ -145,5 +145,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="restorePurchasePlanById" parameterType="Long"> <update id="restorePurchasePlanById" parameterType="Long">
update purchase_plan set del_flag = '0' where purchase_plan_id = #{purchasePlanId} update purchase_plan set del_flag = '0' where purchase_plan_id = #{purchasePlanId}
</update> </update>
<update id="restorePurchasePlanStatusByCode" parameterType="Long">
update purchase_plan set purchase_plan_status = #{purchasePlanStatus}
where purchase_plan_code = #{purchasePlanCode}
</update>
</mapper> </mapper>

2
ruoyi-admin/src/main/resources/mapper/purchase/PurchaseQuoteChildMapper.xml

@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="materialNum != null">#{materialNum},</if> <if test="materialNum != null">#{materialNum},</if>
<if test="materialSole != null">#{materialSole},</if> <if test="materialSole != null">#{materialSole},</if>
<if test="materialRmb != null">#{materialRmb},</if> <if test="materialRmb != null">#{materialRmb},</if>
<if test="materialNoRmb != null">#{materialNormb},</if> <if test="materialNoRmb != null">#{materialNoRmb},</if>
<if test="supplierCode != null">#{supplierCode},</if> <if test="supplierCode != null">#{supplierCode},</if>
<if test="supplierName != null">#{supplierName},</if> <if test="supplierName != null">#{supplierName},</if>
<if test="createBy != null">#{createBy},</if> <if test="createBy != null">#{createBy},</if>

17
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/addPurchaseStorage.html

@ -20,7 +20,7 @@
<div class="form-group"> <div class="form-group">
<label class="col-sm-3 control-label is-required">入库类别:</label> <label class="col-sm-3 control-label is-required">入库类别:</label>
<div class="col-sm-8"> <div class="col-sm-8">
<select name="eceiptType" class="form-control m-b" th:with="type=${@dict.getType('warehouse_storage_type')}" required> <select name="eceiptType" class="form-control m-b" th:with="type=${@dict.getType('purchase_warehouse_type')}" required>
<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>
</div> </div>
@ -34,15 +34,12 @@
</div> </div>
</div> </div>
</div> </div>
<!-- <div class="container" >-->
<div class="container">
<!--供应商物料相关--> <!--供应商物料相关-->
<div class="row" id="tablesContainer"> <div id="tablesContainer" class="col-md-12" style="margin-left: auto;margin-right:auto">
<!-- <div class="col-sm-12" >-->
<!-- &lt;!&ndash; 表格将在这里动态生成 &ndash;&gt;--> <!-- &lt;!&ndash; 表格将在这里动态生成 &ndash;&gt;-->
<!-- </div>-->
</div> </div>
</div> <!-- </div>-->
</form> </form>
</div> </div>
<th:block th:include="include :: footer" /> <th:block th:include="include :: footer" />
@ -75,7 +72,7 @@
function createTableForSupplier(supplierCode, supplierData) { function createTableForSupplier(supplierCode, supplierData) {
var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase(); var tableId = 'bootstrap-table-' + supplierCode.replace(/[^a-z0-9]/gi, '_').toLowerCase();
tableDatas.push(tableId); tableDatas.push(tableId);
var $tableWrapper = $('<div class="table-responsive mt-3"></div>'); var $tableWrapper = $('<div class="table-responsive"></div>');
// 确保supplierData至少有一条记录,并从中提取供应商详细信息 // 确保supplierData至少有一条记录,并从中提取供应商详细信息
var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在 var supplierInfo = supplierData.length > 0 ? supplierData[0] : {}; // 默认为空对象,以防数据不存在
// 构建含有额外供应商信息的标题字符串 // 构建含有额外供应商信息的标题字符串
@ -209,8 +206,8 @@
$("input[name='arrivedTime']").datetimepicker({ $("input[name='arrivedTime']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",
minView: "month", minView: "month",
autoclose: true autoclose: true,
}); }).datetimepicker("update", new Date());;
$("input[name='deliveryInspectionTime']").datetimepicker({ $("input[name='deliveryInspectionTime']").datetimepicker({
format: "yyyy-mm-dd", format: "yyyy-mm-dd",

27
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/detail.html

@ -131,6 +131,16 @@
//获取采购计划单的物料信息 //获取采购计划单的物料信息
// 假设qualityOrderCode已经定义或者可以通过某种方式获取到 // 假设qualityOrderCode已经定义或者可以通过某种方式获取到
$(function() { $(function() {
loadWarehouseCodes();
//物料合计 = 物料实际采购数合计,不含税总价,含税采购总价不为null的情况可以合计物料,否则跳过
$("#purchaseMaterialSum").val(purchaseOrder.materialSum);
//采购数量合计
$('#purchaseSum').val(purchaseOrder.materialSum);
//采购不含税总价
$('#purchaseNoRmbSum').val(purchaseOrder.noRmbSum);
//采购含税总价
$('#purchaseRmbSum').val(purchaseOrder.rmbSum);
// 初始化时默认加载仓库ID列表 // 初始化时默认加载仓库ID列表
// 假设purchaseOrderCode已经定义或者可以通过某种方式获取到 // 假设purchaseOrderCode已经定义或者可以通过某种方式获取到
var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取
@ -161,21 +171,6 @@
createTableForSupplier(supplierCode, supplierData); createTableForSupplier(supplierCode, supplierData);
} }
} }
loadWarehouseCodes();
//物料合计 = 物料实际采购数合计,不含税总价,含税采购总价不为null的情况可以合计物料,否则跳过
$("#purchaseMaterialSum").val(purchaseOrder.materialSum);
//采购数量合计
$('#purchaseSum').val(purchaseOrder.materialSum);
//采购不含税总价
$('#purchaseNoRmbSum').val(purchaseOrder.noRmbSum);
//采购含税总价
$('#purchaseRmbSum').val(purchaseOrder.rmbSum);
$('#stockNo').val(purchaseOrder.stockNo);
$('#stockName').val(purchaseOrder.stockName);
$('#stockContact').val(purchaseOrder.stockContact);
$('#stockPhone').val(purchaseOrder.stockPhone);
$('#stockAddress').val(purchaseOrder.stockAddress);
//按照物料的维度查看采购订单信息 //按照物料的维度查看采购订单信息
// 初始化表格 // 初始化表格
// 假设purchasePlanChildList已定义并包含了需要处理的数据 // 假设purchasePlanChildList已定义并包含了需要处理的数据
@ -572,6 +567,8 @@
$.each(data, function(index, item) { $.each(data, function(index, item) {
selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>'); selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>');
}); // 遍历返回的数据,添加为下拉框的选项 }); // 遍历返回的数据,添加为下拉框的选项
//设置选中
selectElement.val(purchaseOrder.stockNo).trigger('change');
} else { } else {
$.modal.errMsg("数据为空"); $.modal.errMsg("数据为空");
} }

11
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/edit.html

@ -120,6 +120,15 @@
var tableIdList = []; var tableIdList = [];
$(function() { $(function() {
$("#purchasePlanCodes").val(purchasePlanCodes); $("#purchasePlanCodes").val(purchasePlanCodes);
loadWarehouseCodes();
//物料合计 = 物料实际采购数合计,不含税总价,含税采购总价不为null的情况可以合计物料,否则跳过
$("#purchaseMaterialSum").val(purchaseOrder.materialSum);
//采购数量合计
$('#purchaseSum').val(purchaseOrder.materialSum);
//采购不含税总价
$('#purchaseNoRmbSum').val(purchaseOrder.noRmbSum);
//采购含税总价
$('#purchaseRmbSum').val(purchaseOrder.rmbSum);
// 假设qualityOrderCode已经定义或者可以通过某种方式获取到 // 假设qualityOrderCode已经定义或者可以通过某种方式获取到
var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 var purchaseOrderCode = [[${purchaseOrder.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取
var purchaseOrderId = [[${purchaseOrder.purchaseOrderId}]]; var purchaseOrderId = [[${purchaseOrder.purchaseOrderId}]];
@ -359,7 +368,7 @@
// 仓库ID // 仓库ID
selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>'); selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>');
}); });
// $('#warehouseCode').val(stockNO); selectElement.val(purchaseOrder.stockNo);
} else { } else {
$.modal.errMsg("数据为空"); $.modal.errMsg("数据为空");
} }

1
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/purchaseOrder.html

@ -240,6 +240,7 @@
}}, }},
{title:'采购单号',field: 'purchaseOrderCode'}, {title:'采购单号',field: 'purchaseOrderCode'},
{title:'供应商数量',field: 'supplierNum'}, {title:'供应商数量',field: 'supplierNum'},
{title:'仓库ID',field: 'stockNo'},
{title:'物料合计',field: 'materialAmount'}, {title:'物料合计',field: 'materialAmount'},
{title:'数量合计',field: 'materialSum'}, {title:'数量合计',field: 'materialSum'},
{title:'不含税总价(RMB)',field: 'noRmbSum'}, {title:'不含税总价(RMB)',field: 'noRmbSum'},

57
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/taskCgjlVerify.html

@ -71,7 +71,9 @@
<div class="col-xs-6"> <div class="col-xs-6">
<label for="stockNo" class="col-sm-6 col-form-label">仓库ID:</label> <label for="stockNo" class="col-sm-6 col-form-label">仓库ID:</label>
<div class="col-sm-5"> <div class="col-sm-5">
<select class="form-control" name="stockNo" id="stockNo" disabled ></select> <select class="form-control" name="stockNo" id="stockNo">
</select>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
@ -110,7 +112,7 @@
<div class="col-xs-6"> <div class="col-xs-6">
<label for="purchaseSum" class="col-sm-6 col-form-label">采购合计:</label> <label for="purchaseSum" class="col-sm-6 col-form-label">采购合计:</label>
<div class="col-sm-5"> <div class="col-sm-5">
<input type="text" class="form-control" id="purchaseSum" disabled /> <input type="text" class="form-control" id="purchaseSum" disabled />
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
@ -176,6 +178,15 @@
// 假设purchaseOrderCode已经定义或者可以通过某种方式获取到 // 假设purchaseOrderCode已经定义或者可以通过某种方式获取到
var purchaseOrderCode = [[${formData.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 var purchaseOrderCode = [[${formData.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取
var purchaseOrderId = [[${formData.purchaseOrderId}]]; var purchaseOrderId = [[${formData.purchaseOrderId}]];
loadWarehouseCodes();
//物料合计 = 物料实际采购数合计,不含税总价,含税采购总价不为null的情况可以合计物料,否则跳过
$("#purchaseMaterialSum").val(purchaseOrder.materialSum);
//采购数量合计
$('#purchaseSum').val(purchaseOrder.materialSum);
//采购不含税总价
$('#purchaseNoRmbSum').val(purchaseOrder.noRmbSum);
//采购含税总价
$('#purchaseRmbSum').val(purchaseOrder.rmbSum);
// 初始化表格,假设purchasePlanChildList已定义并包含了需要处理的数据 // 初始化表格,假设purchasePlanChildList已定义并包含了需要处理的数据
$.getJSON(prefix + "/editPurchaserOrder/" + purchaseOrderId, function(data) { $.getJSON(prefix + "/editPurchaserOrder/" + purchaseOrderId, function(data) {
$("#purchasePlanCodes").val(data.data.purchasePlanCodes); $("#purchasePlanCodes").val(data.data.purchasePlanCodes);
@ -202,21 +213,6 @@
createTableForSupplier(supplierCode, supplierData); createTableForSupplier(supplierCode, supplierData);
} }
} }
loadWarehouseCodes();
//物料合计 = 物料实际采购数合计,不含税总价,含税采购总价不为null的情况可以合计物料,否则跳过
$("#purchaseMaterialSum").val(purchaseOrder.materialSum);
//采购数量合计
$('#purchaseSum').val(purchaseOrder.materialSum);
//采购不含税总价
$('#purchaseNoRmbSum').val(purchaseOrder.noRmbSum);
//采购含税总价
$('#purchaseRmbSum').val(purchaseOrder.rmbSum);
$('#stockNo').val(purchaseOrder.stockNo);
$('#stockName').val(purchaseOrder.stockName);
$('#stockContact').val(purchaseOrder.stockContact);
$('#stockPhone').val(purchaseOrder.stockPhone);
$('#stockAddress').val(purchaseOrder.stockAddress);
//按照物料的维度查看采购订单信息 //按照物料的维度查看采购订单信息
// 初始化表格 // 初始化表格
// 假设purchasePlanChildList已定义并包含了需要处理的数据 // 假设purchasePlanChildList已定义并包含了需要处理的数据
@ -315,7 +311,7 @@
'<label class="col-sm-4">计划交付时间: </label>' + '<label class="col-sm-4">计划交付时间: </label>' +
'<div class ="col-sm-6">' + '<div class ="col-sm-6">' +
'<div class="input-group date"> ' + '<div class="input-group date"> ' +
'<input type="text" name="deliveryTime" value="' + supplier.deliveryTime + '" class="form-control supplierDeliveryTime" id="deliveryTime_' + tableId + '" disabled >' + '<input type="text" name="deliveryTime" value="' + supplier.deliveryTime + '" text="' + supplier.deliveryTime + '" class="form-control supplierDeliveryTime" id="deliveryTime_' + tableId + '" disabled >' +
'<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>' +
@ -404,25 +400,21 @@
{ checkbox: false, visible: false }, { checkbox: false, visible: false },
{ title: '供应商ID', field: 'supplierCode', visible: false }, { title: '供应商ID', field: 'supplierCode', visible: false },
{ title: '料号', field: 'materialCode' }, { title: '料号', field: 'materialCode' },
{ title: '图片', field: 'materialPhotoUrl', formatter: function(value, row, index) { { title: '图片', field: 'materialPhotoUrl',
return $.table.imageView(value); formatter: function(value, row, index) {return $.table.imageView(value);}
}
}, },
{ title: '物料名称', field: 'materialName' }, { title: '物料名称', field: 'materialName' },
{ title: '物料类型', field: 'materialType', align: 'center', formatter: function(value, row, index) { { title: '物料类型', field: 'materialType', align: 'center',
return $.table.selectCategoryLabel(materialTypeDatas, value); formatter: function(value, row, index) {return $.table.selectCategoryLabel(materialTypeDatas, value);}
}
}, },
{ title: '物料描述', field: 'materialDescribe' }, { title: '物料描述', field: 'materialDescribe' },
{ title: '品牌', field: 'materialBrand' }, { title: '品牌', field: 'materialBrand' },
{ title: '加工类型', field: 'materialProcessMethod', align: 'center', formatter: function(value, row, index) { { title: '加工类型', field: 'materialProcessMethod', align: 'center',
return $.table.selectDictLabel(processMethodDatas, value); formatter: function(value, row, index) {return $.table.selectDictLabel(processMethodDatas, value);}
}
}, },
{ title: '单位', field: 'materialUnit', align: 'center' }, { title: '单位', field: 'materialUnit', align: 'center' },
{ title: '入库部门', field: 'warehouseDept', align: 'center', formatter: function(value, row, index) { { title: '入库部门', field: 'warehouseDept', align: 'center',
return $.table.selectDictLabel(warehouseDeptDatas, value); formatter: function(value, row, index) {return $.table.selectDictLabel(warehouseDeptDatas, value);}
}
}, },
{ title: '计划采购数', field: 'materialNum' }, { title: '计划采购数', field: 'materialNum' },
{ title: '币种', field: '' }, { title: '币种', field: '' },
@ -576,6 +568,7 @@
selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>'); selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>');
}); // 遍历返回的数据,添加为下拉框的选项 }); // 遍历返回的数据,添加为下拉框的选项
//设备当前选择的值 //设备当前选择的值
selectElement.val(purchaseOrder.stockNo).trigger('change');
} else { } else {
$.modal.errMsg("数据为空"); $.modal.errMsg("数据为空");
} }
@ -611,9 +604,7 @@
}); });
function submitHandler() { function submitHandler() {
if ($.validate.form()) { if ($.validate.form()) {
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 taskId = [[${taskId}]]; var taskId = [[${taskId}]];
$.operate.save(prefix + "/complete/" + taskId, $('#form-purchaseOrder-cgjl').serialize()); $.operate.save(prefix + "/complete/" + taskId, $('#form-purchaseOrder-cgjl').serialize());
} }

30
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/taskCgzgVerify.html

@ -176,6 +176,15 @@
// 假设purchaseOrderCode已经定义或者可以通过某种方式获取到 // 假设purchaseOrderCode已经定义或者可以通过某种方式获取到
var purchaseOrderCode = [[${formData.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 var purchaseOrderCode = [[${formData.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取
var purchaseOrderId = [[${formData.purchaseOrderId}]]; var purchaseOrderId = [[${formData.purchaseOrderId}]];
loadWarehouseCodes();
//物料合计 = 物料实际采购数合计,不含税总价,含税采购总价不为null的情况可以合计物料,否则跳过
$("#purchaseMaterialSum").val(purchaseOrder.materialSum);
//采购数量合计
$('#purchaseSum').val(purchaseOrder.materialSum);
//采购不含税总价
$('#purchaseNoRmbSum').val(purchaseOrder.noRmbSum);
//采购含税总价
$('#purchaseRmbSum').val(purchaseOrder.rmbSum);
// 初始化表格,假设purchasePlanChildList已定义并包含了需要处理的数据 // 初始化表格,假设purchasePlanChildList已定义并包含了需要处理的数据
$.getJSON(prefix + "/editPurchaserOrder/" + purchaseOrderId, function(data) { $.getJSON(prefix + "/editPurchaserOrder/" + purchaseOrderId, function(data) {
$("#purchasePlanCodes").val(data.data.purchasePlanCodes); $("#purchasePlanCodes").val(data.data.purchasePlanCodes);
@ -202,23 +211,7 @@
createTableForSupplier(supplierCode, supplierData); createTableForSupplier(supplierCode, supplierData);
} }
} }
loadWarehouseCodes(); //按照物料的维度查看采购订单信息,初始化表格
//物料合计 = 物料实际采购数合计,不含税总价,含税采购总价不为null的情况可以合计物料,否则跳过
$("#purchaseMaterialSum").val(purchaseOrder.materialSum);
//采购数量合计
$('#purchaseSum').val(purchaseOrder.materialSum);
//采购不含税总价
$('#purchaseNoRmbSum').val(purchaseOrder.noRmbSum);
//采购含税总价
$('#purchaseRmbSum').val(purchaseOrder.rmbSum);
$('#stockNo').val(purchaseOrder.stockNo);
$('#stockName').val(purchaseOrder.stockName);
$('#stockContact').val(purchaseOrder.stockContact);
$('#stockPhone').val(purchaseOrder.stockPhone);
$('#stockAddress').val(purchaseOrder.stockAddress);
//按照物料的维度查看采购订单信息
// 初始化表格
// 假设purchasePlanChildList已定义并包含了需要处理的数据 // 假设purchasePlanChildList已定义并包含了需要处理的数据
//物料列表 //物料列表
purchasePlanChildList.forEach(function (material, index) { purchasePlanChildList.forEach(function (material, index) {
@ -315,7 +308,7 @@
'<label class="col-sm-4">计划交付时间: </label>' + '<label class="col-sm-4">计划交付时间: </label>' +
'<div class ="col-sm-6">' + '<div class ="col-sm-6">' +
'<div class="input-group date"> ' + '<div class="input-group date"> ' +
'<input type="text" name="deliveryTime" value="' + supplier.deliveryTime + '" class="form-control supplierDeliveryTime" id="deliveryTime_' + tableId + '" disabled >' + '<input type="text" name="deliveryTime" value="' + supplier.deliveryTime + '" text="' + supplier.deliveryTime + '" class="form-control supplierDeliveryTime" id="deliveryTime_' + tableId + '" disabled >' +
'<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>' +
@ -575,6 +568,7 @@
$.each(data, function(index, item) { $.each(data, function(index, item) {
selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>'); selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>');
}); // 遍历返回的数据,添加为下拉框的选项 }); // 遍历返回的数据,添加为下拉框的选项
selectElement.val(purchaseOrder.stockNo).trigger('change');
} else { } else {
$.modal.errMsg("数据为空"); $.modal.errMsg("数据为空");
} }

26
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/taskFzjlVerify.html

@ -176,6 +176,15 @@
// 假设purchaseOrderCode已经定义或者可以通过某种方式获取到 // 假设purchaseOrderCode已经定义或者可以通过某种方式获取到
var purchaseOrderCode = [[${formData.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 var purchaseOrderCode = [[${formData.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取
var purchaseOrderId = [[${formData.purchaseOrderId}]]; var purchaseOrderId = [[${formData.purchaseOrderId}]];
loadWarehouseCodes();
//物料合计 = 物料实际采购数合计,不含税总价,含税采购总价不为null的情况可以合计物料,否则跳过
$("#purchaseMaterialSum").val(purchaseOrder.materialSum);
//采购数量合计
$('#purchaseSum').val(purchaseOrder.materialSum);
//采购不含税总价
$('#purchaseNoRmbSum').val(purchaseOrder.noRmbSum);
//采购含税总价
$('#purchaseRmbSum').val(purchaseOrder.rmbSum);
// 初始化表格,假设purchasePlanChildList已定义并包含了需要处理的数据 // 初始化表格,假设purchasePlanChildList已定义并包含了需要处理的数据
$.getJSON(prefix + "/editPurchaserOrder/" + purchaseOrderId, function(data) { $.getJSON(prefix + "/editPurchaserOrder/" + purchaseOrderId, function(data) {
$("#purchasePlanCodes").val(data.data.purchasePlanCodes); $("#purchasePlanCodes").val(data.data.purchasePlanCodes);
@ -202,20 +211,6 @@
createTableForSupplier(supplierCode, supplierData); createTableForSupplier(supplierCode, supplierData);
} }
} }
loadWarehouseCodes();
//物料合计 = 物料实际采购数合计,不含税总价,含税采购总价不为null的情况可以合计物料,否则跳过
$("#purchaseMaterialSum").val(purchaseOrder.materialSum);
//采购数量合计
$('#purchaseSum').val(purchaseOrder.materialSum);
//采购不含税总价
$('#purchaseNoRmbSum').val(purchaseOrder.noRmbSum);
//采购含税总价
$('#purchaseRmbSum').val(purchaseOrder.rmbSum);
$('#stockNo').val(purchaseOrder.stockNo);
$('#stockName').val(purchaseOrder.stockName);
$('#stockContact').val(purchaseOrder.stockContact);
$('#stockPhone').val(purchaseOrder.stockPhone);
$('#stockAddress').val(purchaseOrder.stockAddress);
//按照物料的维度查看采购订单信息 //按照物料的维度查看采购订单信息
// 初始化表格 // 初始化表格
@ -315,7 +310,7 @@
'<label class="col-sm-4">计划交付时间: </label>' + '<label class="col-sm-4">计划交付时间: </label>' +
'<div class ="col-sm-6">' + '<div class ="col-sm-6">' +
'<div class="input-group date"> ' + '<div class="input-group date"> ' +
'<input type="text" name="deliveryTime" value="' + supplier.deliveryTime + '" class="form-control supplierDeliveryTime" id="deliveryTime_' + tableId + '" disabled >' + '<input type="text" name="deliveryTime" value="' + supplier.deliveryTime + '" text="' + supplier.deliveryTime + '" class="form-control supplierDeliveryTime" id="deliveryTime_' + tableId + '" disabled >' +
'<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>' +
@ -575,6 +570,7 @@
$.each(data, function(index, item) { $.each(data, function(index, item) {
selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>'); selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>');
}); // 遍历返回的数据,添加为下拉框的选项 }); // 遍历返回的数据,添加为下拉框的选项
selectElement.val(purchaseOrder.stockNo).trigger('change');
} else { } else {
$.modal.errMsg("数据为空"); $.modal.errMsg("数据为空");
} }

27
ruoyi-admin/src/main/resources/templates/purchase/purchaseOrder/taskModifyApply.html

@ -172,6 +172,15 @@
// 假设purchaseOrderCode已经定义或者可以通过某种方式获取到 // 假设purchaseOrderCode已经定义或者可以通过某种方式获取到
var purchaseOrderCode = [[${formData.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取 var purchaseOrderCode = [[${formData.purchaseOrderCode}]]; // 这里需要实际赋值,比如从前端某个地方读取
var purchaseOrderId = [[${formData.purchaseOrderId}]]; var purchaseOrderId = [[${formData.purchaseOrderId}]];
loadWarehouseCodes();
//物料合计 = 物料实际采购数合计,不含税总价,含税采购总价不为null的情况可以合计物料,否则跳过
$("#purchaseMaterialSum").val(purchaseOrder.materialSum);
//采购数量合计
$('#purchaseSum').val(purchaseOrder.materialSum);
//采购不含税总价
$('#purchaseNoRmbSum').val(purchaseOrder.noRmbSum);
//采购含税总价
$('#purchaseRmbSum').val(purchaseOrder.rmbSum);
// 初始化表格,假设purchasePlanChildList已定义并包含了需要处理的数据 // 初始化表格,假设purchasePlanChildList已定义并包含了需要处理的数据
$.getJSON(prefix + "/editPurchaserOrder/" + purchaseOrderId, function(data) { $.getJSON(prefix + "/editPurchaserOrder/" + purchaseOrderId, function(data) {
$("#purchasePlanCodes").val(data.data.purchasePlanCodes); $("#purchasePlanCodes").val(data.data.purchasePlanCodes);
@ -198,21 +207,6 @@
createTableForSupplier(supplierCode, supplierData); createTableForSupplier(supplierCode, supplierData);
} }
} }
loadWarehouseCodes();
//物料合计 = 物料实际采购数合计,不含税总价,含税采购总价不为null的情况可以合计物料,否则跳过
$("#purchaseMaterialSum").val(purchaseOrder.materialSum);
//采购数量合计
$('#purchaseSum').val(purchaseOrder.materialSum);
//采购不含税总价
$('#purchaseNoRmbSum').val(purchaseOrder.noRmbSum);
//采购含税总价
$('#purchaseRmbSum').val(purchaseOrder.rmbSum);
$('#stockNo').val(purchaseOrder.stockNo);
$('#stockName').val(purchaseOrder.stockName);
$('#stockContact').val(purchaseOrder.stockContact);
$('#stockPhone').val(purchaseOrder.stockPhone);
$('#stockAddress').val(purchaseOrder.stockAddress);
//按照物料的维度查看采购订单信息 //按照物料的维度查看采购订单信息
// 初始化表格 // 初始化表格
// 假设purchasePlanChildList已定义并包含了需要处理的数据 // 假设purchasePlanChildList已定义并包含了需要处理的数据
@ -311,7 +305,7 @@
'<label class="col-sm-4">计划交付时间: </label>' + '<label class="col-sm-4">计划交付时间: </label>' +
'<div class ="col-sm-6">' + '<div class ="col-sm-6">' +
'<div class="input-group date"> ' + '<div class="input-group date"> ' +
'<input type="text" name="deliveryTime" value="' + supplier.deliveryTime + '" class="form-control supplierDeliveryTime" id="deliveryTime_' + tableId + '" disabled >' + '<input type="text" name="deliveryTime" value="' + supplier.deliveryTime + '" text="' + supplier.deliveryTime + '" class="form-control supplierDeliveryTime" id="deliveryTime_' + tableId + '" disabled >' +
'<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>' +
@ -571,6 +565,7 @@
$.each(data, function(index, item) { $.each(data, function(index, item) {
selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>'); selectElement.append('<option value="' + item.stockNO + '">' + item.stockNO + '</option>');
}); // 遍历返回的数据,添加为下拉框的选项 }); // 遍历返回的数据,添加为下拉框的选项
selectElement.val(purchaseOrder.stockNo).trigger('change');
} else { } else {
$.modal.errMsg("数据为空"); $.modal.errMsg("数据为空");
} }

8
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/edit.html

@ -249,6 +249,14 @@
} }
} }
], ],
onEditableSave: function(field, row, oldValue, $el) {
var rmbRateInput = parseFloat($("#taxRate").val()) || 0;
var rmbRate = rmbRateInput / 100; // 将输入的百分比转换为小数
rmbRate = parseFloat(rmbRate.toFixed(2)); // 确保rmbRate转换为两位小数的浮点数
// 根据选择的货币类型计算其他值
// RMB为基准货币
row.materialRmb = (parseFloat(row.materialNoRmb) * (1 + rmbRate)).toFixed(2);
}
}; };
$.table.init(options); $.table.init(options);
}); });

8
ruoyi-admin/src/main/resources/templates/purchase/purchaseQuote/purchaseQuote.html

@ -71,7 +71,7 @@
</a> </a>
</div> </div>
<div class="col-sm-12 select-table table-striped"> <div class="col-sm-12 select-table table-striped">
<table id="bootstrap-table"></table> <table id="bootstrap-table" style="white-space:nowrap"></table>
</div> </div>
</div> </div>
</div> </div>
@ -145,16 +145,14 @@
formatter: function (value, row, index) { formatter: function (value, row, index) {
var actions = []; var actions = [];
// 审核状态-审核通过 使用状态-是 未发起作废流程 // 审核状态-审核通过 使用状态-是 未发起作废流程
if (row.auditStatus == "1" && row.useStatus == "1" && !row.cancelInstanceId) { if (row.auditStatus == "1" && row.useStatus == "1") {
// 作废 // 作废
actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-remove"></i> 作废</a>'); actions.push('<a class="btn btn-danger btn-xs" href="javascript:void(0)" onclick="$.operate.cancel(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-remove"></i> 作废</a>');
// 编辑 // 编辑
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-edit"></i> 编辑</a> '); actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-edit"></i> 编辑</a> ');
} else {
actions.push('<a class="btn btn-default btn-xs" disabled href="javascript:void(0)"><i class="fa fa-edit"></i> 编辑</a> ');
} }
// 已作废 // 已作废
if (row.useStatus == "2" && !row.restoreInstanceId) { if (row.useStatus == "2") {
// 恢复 // 恢复
actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> '); actions.push('<a class="btn btn-success btn-xs" href="javascript:void(0)" onclick="$.operate.restore(\'' + row.purchaseQuoteId + '\')"><i class="fa fa-window-restore"></i> 恢复</a> ');
} }

Loading…
Cancel
Save