From 77ce36392ff5ada191621c023f70066f29dc9e53 Mon Sep 17 00:00:00 2001 From: liuxiaoxu <1793812695@qq.com> Date: Wed, 24 Jul 2024 15:15:55 +0800 Subject: [PATCH] =?UTF-8?q?[feat]=20=E5=B7=A5=E7=A8=8B=E7=AE=A1=E7=90=86?= =?UTF-8?q?=20=E4=BF=AE=E6=94=B9=E5=BC=80=E5=8F=91=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=8D=95=E6=96=B0=E5=A2=9E=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2?= =?UTF-8?q?=EF=BC=9A=E6=96=B0=E5=A2=9E=E5=8A=A8=E6=80=81=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E5=8D=95=E5=8F=B7=E5=89=8D=E7=AB=AF=E6=96=B9?= =?UTF-8?q?=E6=B3=95=EF=BC=9A=E8=A7=A3=E5=86=B3=E6=9F=A5=E8=AF=A2=E4=B8=8D?= =?UTF-8?q?=E5=88=B0=E7=94=9F=E4=BA=A7=E5=8D=95=E5=8F=B7=E9=97=AE=E9=A2=98?= =?UTF-8?q?=EF=BC=9B=E6=96=B0=E5=A2=9E=E4=BF=AE=E6=94=B9=E5=AE=8C=E6=88=90?= =?UTF-8?q?=E6=97=B6=E9=97=B4=E5=AD=97=E6=AE=B5=EF=BC=9B=E6=96=B0=E5=A2=9E?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=BC=80=E5=8F=91=E4=BF=AE=E6=94=B9=E5=8D=95?= =?UTF-8?q?=E7=89=A9=E6=96=99=E5=89=8D=E7=AB=AF=E6=96=B9=E6=B3=95=EF=BC=9B?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=82=B9=E5=87=BB=E9=80=89=E6=8B=A9=E7=89=A9?= =?UTF-8?q?=E6=96=99=E6=8C=89=E9=92=AE=E5=89=8D=E7=AB=AF=E6=96=B9=E6=B3=95?= =?UTF-8?q?=EF=BC=9B=E6=96=B0=E5=A2=9E=E5=BC=80=E5=8F=91=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=89=A9=E6=96=99=E5=89=8D=E7=AB=AF=E5=88=97=E8=A1=A8=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E6=96=B9=E6=B3=95=EF=BC=9B=E6=96=B0=E5=A2=9E=E9=80=BB?= =?UTF-8?q?=E8=BE=91=E5=88=A0=E9=99=A4=E5=BC=80=E5=8F=91=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E7=89=A9=E6=96=99=E5=89=8D=E7=AB=AF=E5=88=97=E8=A1=A8=E4=B8=80?= =?UTF-8?q?=E8=A1=8C=E6=95=B0=E6=8D=AE=E6=96=B9=E6=B3=95=EF=BC=9B=20?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E5=8A=A0=E8=BD=BD=E6=89=80=E6=9C=89=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E5=8D=95=E5=8F=B7=E5=90=8E=E7=AB=AF=E6=8E=A5=E5=8F=A3?= =?UTF-8?q?=20=E6=96=B0=E5=A2=9E=E5=8A=A0=E8=BD=BD=E7=89=A9=E6=96=99?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E9=80=89=E6=8B=A9=E5=BC=B9=E7=AA=97=E5=90=8E?= =?UTF-8?q?=E7=AB=AF=E6=8E=A5=E5=8F=A3=20=E6=96=B0=E5=A2=9E=E7=89=A9?= =?UTF-8?q?=E6=96=99=E9=80=89=E6=8B=A9=E9=A1=B5=E9=9D=A2=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E7=9A=84=E5=89=8D=E7=AB=AF=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ErpDevelopModifyorderController.java | 45 +- .../system/SysSalesOrderChildMapper.xml | 1 + .../templates/erp/developModifyOrder/add.html | 539 ++++-------------- .../developModifyOrderMaterialSelect.html | 76 +++ 4 files changed, 218 insertions(+), 443 deletions(-) create mode 100644 ruoyi-admin/src/main/resources/templates/erp/developModifyOrder/developModifyOrderMaterialSelect.html diff --git a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java index d8fb0164..581175f7 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/erp/controller/ErpDevelopModifyorderController.java @@ -3,16 +3,17 @@ package com.ruoyi.erp.controller; import java.util.List; import com.ruoyi.common.core.domain.entity.SysUser; +import com.ruoyi.system.domain.SysMakeOrder; +import com.ruoyi.system.domain.SysMakeorderDept; +import com.ruoyi.system.domain.SysSalesOrderChild; +import com.ruoyi.system.mapper.SysMakeOrderMapper; +import com.ruoyi.system.service.ISysSalesOrderChildService; import com.ruoyi.system.service.ISysUserService; import org.apache.shiro.authz.annotation.RequiresPermissions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.ModelMap; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.ResponseBody; +import org.springframework.web.bind.annotation.*; import com.ruoyi.common.annotation.Log; import com.ruoyi.common.enums.BusinessType; import com.ruoyi.erp.domain.ErpDevelopModifyorder; @@ -40,6 +41,12 @@ public class ErpDevelopModifyorderController extends BaseController @Autowired private IErpDevelopModifyorderService erpDevelopModifyorderService; + @Autowired + private SysMakeOrderMapper sysMakeOrderMapper; + + @Autowired + private ISysSalesOrderChildService sysSalesOrderChildService; + @RequiresPermissions("erp:developModifyOrder:view") @GetMapping() public String developModifyOrder() @@ -106,6 +113,30 @@ public class ErpDevelopModifyorderController extends BaseController return toAjax(erpDevelopModifyorderService.insertErpDevelopModifyorder(erpDevelopModifyorder)); } + + /** + * 加载物料信息选择弹窗 + */ + @GetMapping("/developModifyMaterialSelect") + public String materialSelect(@RequestParam String makeNo, ModelMap modelMap) + { + modelMap.put("makeNo",makeNo); + return prefix + "/developModifyOrderMaterialSelect"; + } + + /** + * 查找与生产单号有关的物料信息列表 + */ + @PostMapping("/getMaterialListByMakeNo") + @ResponseBody + public TableDataInfo getMaterialListByMakeNo(@RequestParam("makeNo") String makeNo) + { + startPage(); + SysMakeOrder sysMakeOrder = sysMakeOrderMapper.selectSaleNoByMakeNo(makeNo); + List list = sysSalesOrderChildService.selectSysSalesOrderChildByQuoteId(sysMakeOrder.getSaleNo()); + return getDataTable(list); + } + /** * 修改开发修改单 */ @@ -190,4 +221,8 @@ public class ErpDevelopModifyorderController extends BaseController return toAjax(erpDevelopModifyorderService.restoreErpDevelopModifyorderById(id)); } + + + + } diff --git a/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml b/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml index 6466925d..c79b1301 100644 --- a/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml +++ b/ruoyi-admin/src/main/resources/mapper/system/SysSalesOrderChildMapper.xml @@ -68,6 +68,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" order by a.id desc + + -
-
-
-
修改开发修改单:
-
-
-
-
- -
- -
-
-
- -
- - -
-
+
+ +
+ +
@@ -44,14 +29,14 @@
选择开发修改单物料 - + 添加修改物料
-
+
@@ -59,14 +44,14 @@
选择采购物料 - + 添加修改物料
-
+
@@ -74,14 +59,14 @@
选择通知人 - + 添加通知人
-
+
@@ -99,461 +84,139 @@ var userName = [[${@permission.getPrincipalProperty('userName')}]]; $("#form-developModifyOrder-add").validate({ focusCleanup: true}); - $(function () { - $("#makeNo").select2({ - theme: "bootstrap", - allowClear: true, - placeholder: "请选择生产单号", - ajax: { - url: ctx + "/system/makeorder/getAllMakeNos", - dataType: 'json', - type: "POST", - delay: 250, - processResults: function (res, params) { - var options = []; - if(res.code==0){ - var resultList = res.data; - console.log(resultList); - for(var i= 0, len=resultList.length;i请选择关联生产单号'); + //遍历返回的数据,添加下拉框的选项 + $.each(data,function (index,item){ + //赋值遍历数据中的makeNo到下拉框中 + selectElement.append(''); + }) + }else { + $.modal.error("数据为空"); } } - }); - var options = { - id: "bootstrap-sub-table-developModify", - // url: prefix + "/getDevelopModifyOrderList", - showSearch: false, - showRefresh: false, - showToggle: false, - showColumns: false, - columns: [ - {checkbox: true}, - {field: 'index',align: 'center', title: "序号", - formatter: function (value, row, index) { - var columnIndex = $.common.sprintf("", $.table.serialNumber(index)); - return columnIndex + $.table.serialNumber(index); - } - }, - {title: '物料索引id',field: 'materialId',align: 'center',visible: false}, - {title: '料号',field: 'materialCode',align: 'center'}, - {title: '物料名称',field: 'materialName',align: 'center'}, - {title: '图片',field: 'photoUrl', - formatter: function(value, row, index) { - if(value == null || value == ""){ - value = ""; - return ""; - } - return $.table.imageView(value); - } - }, - {title: '物料类型',field: 'materialType',align: 'center', - formatter: function(value, row, index) { - return $.table.selectCategoryLabel(materialTypeDatas, value); - } - }, - { title: '描述',field: 'describe',align: 'center'}, - {title: '品牌',field: 'brand',align: 'center'}, - { title: '单位',field: 'unit',align: 'center', - formatter: function(value, row, index) { - return $.table.selectDictLabel(sysUnitClassDatas, value); - } - }, - {title: '半成品类型',field: 'processMethod',align: 'center', - formatter: function(value, row, index) { - return $.table.selectDictLabel(processMethodDatas, value); - } - }, - { title: '对外售价',field: 'materialSole',}, - {title: '国内税率',field: 'countTax',align: 'center',}, - { title: '美元汇率',field: 'usdTax', align: 'center',}, - {field: 'materialNum',align: 'center',title: '物料的数量',}, - { title: '物料的不含税单价(RMB)',field: 'materialNoRmb',align: 'center',}, - {title: '物料的不含税单价(美元)',field: 'materialNoUsd',align: 'center',}, - {title: '修改详情',align: 'center', - formatter:function formatterForm(value, row, index) { - // 这里的代码会为每行生成一个表单 - var form = $('
').append( - $('', { type: 'text', value: row.name, name: 'name', placeholder: 'Name' }), - $('', { type: 'email', value: row.email, name: 'email', placeholder: 'Email' }), - $('