Parcourir la source

新增床网保存,审核,删除代码

MY il y a 5 mois
Parent
commit
552e9036f7

+ 33 - 0
JLHHJSvr/Com/AuditBedNet.cs

@@ -0,0 +1,33 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using JLHHJSvr.Com.Model;
+using LJLib.Net.SPI.Com;
+
+namespace JLHHJSvr.Com
+{
+    public sealed class AuditBedNetRequest : ILJRequest<AuditBedNetResponse>
+    {
+        public string GetApiName()
+        {
+            return "AuditBedNet";
+        }
+        /// <summary>
+        /// 登录token
+        /// </summary>
+        public string token { get; set; }
+        /// <summary>
+        /// 1 - 审核 0 - 撤审
+        /// </summary>
+        public byte type { get; set; }
+        /// <summary>
+        /// 单据id
+        /// </summary>
+        public List<u_bednet> list { get; set; }
+    }
+
+    public sealed class AuditBedNetResponse : LJResponse
+    {
+    }
+}

+ 29 - 0
JLHHJSvr/Com/DeleteBedNet.cs

@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using JLHHJSvr.Com.Model;
+using LJLib.Net.SPI.Com;
+
+namespace JLHHJSvr.Com
+{
+    public sealed class DeleteBedNetRequest : ILJRequest<DeleteBedNetResponse>
+    {
+        public string GetApiName()
+        {
+            return "DeleteBedNet";
+        }
+        /// <summary>
+        /// 登录token
+        /// </summary>
+        public string token { get; set; }
+        /// <summary>
+        /// 单据id
+        /// </summary>
+        public List<u_bednet> list { get; set; }
+    }
+
+    public sealed class DeleteBedNetResponse : LJResponse
+    {
+    }
+}

+ 196 - 0
JLHHJSvr/Com/Model/u_bednet.cs

@@ -0,0 +1,196 @@
+using LJLib.DAL.SQL;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace JLHHJSvr.Com.Model
+{
+    [PK(new[] { "bednetid" })]
+    public sealed class u_bednet
+    {
+        public int? bednetid { get; set; }
+        public int? deptid { get; set; }
+        public int? bednettypeid { get; set; }
+        public int? mattress_width { get; set; }
+        public int? mattress_length { get; set; }
+        public int? mattress_height { get; set; }
+        public int? if_doublenet { get; set; }
+        public int? if_doublespring { get; set; }
+        public decimal? snake_wire_diameter { get; set; }
+        public string snake_wire_mtrl_formula { get; set; }
+        public decimal? snake_wire_mtrl_cost { get; set; }
+        public string pocket_around_spring_formula { get; set; }
+        public decimal? pocket_around_spring_cost { get; set; }
+        public string pocket_around_fabrics_formula { get; set; }
+        public decimal? pocket_around_fabrics_cost { get; set; }
+        public string hard_around_mtrl_formula { get; set; }
+        public decimal? hard_around_mtrl_cost { get; set; }
+        public string hard_around_hr_formula { get; set; }
+        public decimal? hard_around_hr_cost { get; set; }
+        public decimal? spring_mtrl_cost { get; set; }
+        public decimal? spring_hr_cost { get; set; }
+        public decimal? glue_price { get; set; }
+        public string glue_mtrl_formula { get; set; }
+        public decimal? glue_mtrl_cost { get; set; }
+        public string fabrics1_mtrl_formula { get; set; }
+        public decimal? fabrics1_mtrl_cost { get; set; }
+        public string fabrics2_mtrl_formula { get; set; }
+        public decimal? fabrics2_mtrl_cost { get; set; }
+        public int? if_side_iron { get; set; }
+        public decimal? side_iron_lossrate { get; set; }
+        public decimal? side_iron_price { get; set; }
+        public string side_iron_mtrl_formula { get; set; }
+        public decimal? side_iron_mtrl_cost { get; set; }
+        public string side_iron_hr_formula { get; set; }
+        public decimal? side_iron_hr_cost { get; set; }
+        public decimal? cnail_price { get; set; }
+        public string cnail_mtrl_formula { get; set; }
+        public decimal? cnail_mtrl_cost { get; set; }
+        public string cnail_hr_formula { get; set; }
+        public decimal? cnail_hr_cost { get; set; }
+        public int? sponge_mtrlid { get; set; }
+        public decimal? sponge_thickness { get; set; }
+        public decimal? sponge_price { get; set; }
+        public string sponge_mtrl_formula { get; set; }
+        public decimal? sponge_mtrl_cost { get; set; }
+        public string sponge_hr_formula { get; set; }
+        public decimal? sponge_hr_cost { get; set; }
+        public int? edge_mtrlid { get; set; }
+        public decimal? edge_price { get; set; }
+        public string edge_mtrl_formula { get; set; }
+        public decimal? edge_mtrl_cost { get; set; }
+        public string edge_hr_formula { get; set; }
+        public decimal? edge_hr_cost { get; set; }
+        public decimal? fork_qty { get; set; }
+        public decimal? fork_price { get; set; }
+        public string fork_mtrl_formula { get; set; }
+        public decimal? fork_mtrl_cost { get; set; }
+        public string fork_hr_formula { get; set; }
+        public decimal? fork_hr_cost { get; set; }
+        public int? if_rsorwa { get; set; }
+        public decimal? rsorwa_price { get; set; }
+        public string rsorwa_mtrl_formula { get; set; }
+        public decimal? rsorwa_mtrl_cost { get; set; }
+        public string rsorwa_hr_formula { get; set; }
+        public decimal? rsorwa_hr_cost { get; set; }
+        public int? if_sponge_drilling { get; set; }
+        public string sponge_drilling_hr_formula { get; set; }
+        public decimal? sponge_drilling_hr_cost { get; set; }
+        public decimal? total_hr_cost { get; set; }
+        public decimal? total_mtrl_cost { get; set; }
+        public decimal? total_fees_cost { get; set; }
+        public decimal? total_cost { get; set; }
+        public DateTime? createtime { get; set; }
+        public string createby { get; set; }
+        public string bednetcode { get; set; }
+        public string bednetname { get; set; }
+        public string spring_mtrl_formula { get; set; }
+        public string spring_hr_formula { get; set; }
+        public string sponge_mtrl_cost_replace_formula { get; set; }
+        public string sponge_hr_cost_replace_formula { get; set; }
+        public string edge_mtrl_cost_replace_formula { get; set; }
+        public string edge_hr_cost_replace_formula { get; set; }
+        public string fork_mtrl_cost_replace_formula { get; set; }
+        public string fork_hr_cost_replace_formula { get; set; }
+        public string rsorwa_mtrl_cost_replace_formula { get; set; }
+        public string rsorwa_hr_cost_replace_formula { get; set; }
+        public string sponge_drilling_hr_cost_replace_formula { get; set; }
+        public string snake_wire_mtrl_cost_replace_formula { get; set; }
+        public int? flag { get; set; }
+        public decimal? taxrate { get; set; }
+        public decimal? taxes { get; set; }
+        public decimal? commissionrate { get; set; }
+        public decimal? commission { get; set; }
+        public decimal? fob { get; set; }
+        public decimal? profitrate { get; set; }
+        public decimal? nottax_factory_cost { get; set; }
+        public decimal? nottax_dept_cost { get; set; }
+        public decimal? dept_cost { get; set; }
+        public decimal? foreign_cost { get; set; }
+        public decimal? extras_cost { get; set; }
+        public decimal? dept_profitrate { get; set; }
+        public decimal? moneyrate { get; set; }
+        public int? temp_flag { get; set; }
+        public int? felt_mtrlid { get; set; }
+        public decimal? felt_qty { get; set; }
+        public decimal? felt_price { get; set; }
+        public string felt_dscrp { get; set; }
+        public string felt_mtrl_formula { get; set; }
+        public decimal? felt_mtrl_cost { get; set; }
+        public string felt_hr_formula { get; set; }
+        public decimal? felt_hr_cost { get; set; }
+        public string felt_mtrl_cost_replace_formula { get; set; }
+        public string felt_hr_cost_replace_formula { get; set; }
+        public string extras_cost_dscrp { get; set; }
+        public int? iffork { get; set; }
+        public int? ifsaleout { get; set; }
+        public int? autotype { get; set; }
+        public decimal? felt_mtrl_x_cost { get; set; }
+        public decimal? felt_hr_x_cost { get; set; }
+        public decimal? felt_x_qty { get; set; }
+        public string felt_mtrl_x_cost_replace_formula { get; set; }
+        public string felt_hr_x_cost_replace_formula { get; set; }
+        public int? felt_x_mtrlid { get; set; }
+        public decimal? sale_point { get; set; }
+        public string packtype { get; set; }
+        public decimal? packqty { get; set; }
+        public decimal? other_rate { get; set; }
+        public string transport_type { get; set; }
+        public string packmtrl { get; set; }
+        public string packet_mtrl_formula { get; set; }
+        public string packet_hr_formula { get; set; }
+        public decimal? packet_mtrl_cost { get; set; }
+        public decimal? packet_hr_cost { get; set; }
+        public string packet_mtrl_cost_replace_formula { get; set; }
+        public string packet_hr_cost_replace_formula { get; set; }
+        public decimal? sponge_height { get; set; }
+        public decimal? edge_height { get; set; }
+        public decimal? sponge_tc_thickness { get; set; }
+        public decimal? sponge_tc_height { get; set; }
+        public int? sponge_tc_mtrlid { get; set; }
+        public decimal? sponge_mtrl_tc_cost { get; set; }
+        public string sponge_mtrl_tc_formula { get; set; }
+        public string sponge_mtrl_tc_cost_replace_formula { get; set; }
+        public decimal? sum_weight { get; set; }
+        public decimal? spring_weight { get; set; }
+        public decimal? snake_weight { get; set; }
+        public decimal? side_weight { get; set; }
+        public string duo_qv_str { get; set; }
+        public string spring_weight_formula { get; set; }
+        public string side_iron_weight_formula { get; set; }
+        public string hard_around_weight_formula { get; set; }
+        public string fabrics1_weight_formula { get; set; }
+        public string fabrics2_weight_formula { get; set; }
+        public string felt_weight_formula { get; set; }
+        public string cnail_weight_formula { get; set; }
+        public string sponge_weight_formula { get; set; }
+        public string sponge_weight_tc_formula { get; set; }
+        public string edge_weight_formula { get; set; }
+        public string fork_weight_formula { get; set; }
+        public string spring_weight_replace_formula { get; set; }
+        public string side_iron_weight_replace_formula { get; set; }
+        public string hard_around_weight_replace_formula { get; set; }
+        public string fabrics1_weight_replace_formula { get; set; }
+        public string fabrics2_weight_replace_formula { get; set; }
+        public string felt_weight_replace_formula { get; set; }
+        public string cnail_weight_replace_formula { get; set; }
+        public string sponge_weight_replace_formula { get; set; }
+        public string sponge_weight_tc_replace_formula { get; set; }
+        public string edge_weight_replace_formula { get; set; }
+        public string fork_weight_replace_formula { get; set; }
+        public decimal? spring_weight_qty { get; set; }
+        public decimal? side_iron_weight_qty { get; set; }
+        public decimal? hard_around_weight_qty { get; set; }
+        public decimal? fabrics1_weight_qty { get; set; }
+        public decimal? fabrics2_weight_qty { get; set; }
+        public decimal? felt_weight_qty { get; set; }
+        public decimal? cnail_weight_qty { get; set; }
+        public decimal? sponge_weight_qty { get; set; }
+        public decimal? sponge_weight_tc_qty { get; set; }
+        public decimal? edge_weight_qty { get; set; }
+        public decimal? fork_weight_qty { get; set; }
+        public int? if_jb { get; set; }
+
+    }
+}

+ 64 - 0
JLHHJSvr/Com/Model/u_bednetmx.cs

@@ -0,0 +1,64 @@
+using LJLib.DAL.SQL;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace JLHHJSvr.Com.Model
+{
+    [PK(new[] { "bednetid", "bednetmxid" })]
+    public sealed class u_bednetmx
+    {
+        public int? bednetmxid { get; set; }
+        public int? bednetid { get; set; }
+        public int? spring_qty_width { get; set; }
+        public int? spring_qty_length { get; set; }
+        public int? bednet_height { get; set; }
+        public decimal? wire_mtrlid { get; set; }
+        public int? springid { get; set; }
+        public int? if_part { get; set; }
+        public int? if_15strip { get; set; }
+        public int? if_pocket_around { get; set; }
+        public int? pocket_around_springid { get; set; }
+        public int? pocket_around_row { get; set; }
+        public decimal? pocket_around_wire_price { get; set; }
+        public decimal? pocket_around_spring_cost { get; set; }
+        public decimal? pocket_around_fabrics_cost { get; set; }
+        public int? if_hard_around { get; set; }
+        public int? hard_around_springid { get; set; }
+        public int? hard_around_row { get; set; }
+        public decimal? hard_around_wire_price { get; set; }
+        public decimal? hard_around_mtrl_cost { get; set; }
+        public decimal? hard_around_hr_cost { get; set; }
+        public int? fabrics1_mtrlid { get; set; }
+        public decimal? fabrics1_price { get; set; }
+        public decimal? fabrics1_mtrl_cost { get; set; }
+        public int? fabrics2_mtrlid { get; set; }
+        public decimal? fabrics2_price { get; set; }
+        public decimal? fabrics2_mtrl_cost { get; set; }
+        public int? if_side_iron { get; set; }
+        public int? side_iron_qty { get; set; }
+        public decimal? side_iron_mtrl_cost { get; set; }
+        public decimal? side_iron_hr_cost { get; set; }
+        public string pocket_around_spring_cost_replace_formula { get; set; }
+        public string pocket_around_fabrics_cost_replace_formula { get; set; }
+        public string hard_around_mtrl_cost_replace_formula { get; set; }
+        public string hard_around_hr_cost_replace_formula { get; set; }
+        public string fabrics1_mtrl_cost_replace_formula { get; set; }
+        public string fabrics2_mtrl_cost_replace_formula { get; set; }
+        public string side_iron_mtrl_cost_replace_formula { get; set; }
+        public string side_iron_hr_cost_replace_formula { get; set; }
+        public string cnail_mtrl_cost_replace_formula { get; set; }
+        public decimal? cnail_mtrl_cost { get; set; }
+        public string cnail_hr_cost_replace_formula { get; set; }
+        public decimal? cnail_hr_cost { get; set; }
+        public string glue_mtrl_cost_replace_formula { get; set; }
+        public decimal? glue_mtrl_cost { get; set; }
+        public decimal? spring_mtrl_cost { get; set; }
+        public decimal? spring_hr_cost { get; set; }
+        public string spring_mtrl_cost_replace_formula { get; set; }
+        public string spring_hr_cost_replace_formula { get; set; }
+        public string spring_weight_replace_formula { get; set; }
+
+    }
+}

+ 29 - 0
JLHHJSvr/Com/Model/u_bednetmx_mtrl.cs

@@ -0,0 +1,29 @@
+using LJLib.DAL.SQL;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace JLHHJSvr.Com.Model
+{
+    [PK(new[] { "bednetid", "bednetmxid" })]
+    public sealed class u_bednetmx_mtrl
+    {
+        public int? bednetmtrlid { get; set; }
+        public int? bednetid { get; set; }
+        public int? formulakind { get; set; }
+        public string formula { get; set; }
+        public int? if_success { get; set; }
+        public string replace_formula { get; set; }
+        public string priceunit { get; set; }
+        public decimal? shrinkage { get; set; }
+        public int? mtrlid { get; set; }
+        public decimal? price { get; set; }
+        public decimal? gram_weight { get; set; }
+        public decimal? cloth_width { get; set; }
+        public int? if_inputqty { get; set; }
+        public decimal? qty { get; set; }
+        public decimal? costamt { get; set; }
+
+    }
+}

+ 25 - 0
JLHHJSvr/Com/Model/u_bednetmx_spring.cs

@@ -0,0 +1,25 @@
+using LJLib.DAL.SQL;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+
+namespace JLHHJSvr.Com.Model
+{
+    [PK(new[] { "bednetid", "bednetmxid" })]
+    public sealed class u_bednetmx_spring
+    {
+        public int? bednetmx_partid { get; set; }
+        public int? bednetmxid { get; set; }
+        public int? springid { get; set; }
+        public int? spring_qty_width { get; set; }
+        public int? spring_qty_length { get; set; }
+        public decimal? fabrics1_mtrl_cost { get; set; }
+        public decimal? spring_mtrl_cost { get; set; }
+        public decimal? spring_hr_cost { get; set; }
+        public string spring_mtrl_cost_replace_formula { get; set; }
+        public string spring_hr_cost_replace_formula { get; set; }
+        public string spring_weight_replace_formula { get; set; }
+
+    }
+}

+ 29 - 0
JLHHJSvr/Com/SaveBedNet.cs

@@ -0,0 +1,29 @@
+using System;
+using System.Collections.Generic;
+using System.Linq;
+using System.Text;
+using JLHHJSvr.Com.Model;
+using LJLib.Net.SPI.Com;
+
+namespace JLHHJSvr.Com
+{
+    public sealed class SaveBedNetRequest : ILJRequest<SaveBedNetResponse>
+    {
+        public string GetApiName()
+        {
+            return "SaveBedNet";
+        }
+        public string token { get; set; }
+        /// <summary>
+        /// 半成品信息:主表
+        /// </summary>
+        public u_bednet bednet { get; set; }
+        public List<u_bednetmx> bednetMx { get; set; }
+        public List<u_bednetmx_spring> spring { get; set; }
+    }
+
+    public sealed class SaveBedNetResponse : LJResponse
+    {
+        public u_bednet bednet { get; set; }
+    }
+}

+ 92 - 0
JLHHJSvr/Excutor/AuditBedNetExcutor.cs

@@ -0,0 +1,92 @@
+using System;
+using System.Data.SqlClient;
+using System.Linq;
+using JLHHJSvr.BLL;
+using JLHHJSvr.Com;
+using JLHHJSvr.Com.Model;
+using JLHHJSvr.LJException;
+using LJLib.DAL.SQL;
+using LJLib.Net.SPI.Server;
+
+namespace JLHHJSvr.Excutor
+{
+    internal sealed class AuditBedNetExcutor : ExcutorBase<AuditBedNetRequest, AuditBedNetResponse>
+    {
+        protected override void ExcuteInternal(AuditBedNetRequest request, object state, AuditBedNetResponse rslt)
+        {
+            var tokendata = BllHelper.GetToken(request.token);
+            if (tokendata == null)
+            {
+                rslt.ErrMsg = "会话已经中断,请重新登录";
+                return;
+            }
+            if (!request.list.Any())
+            {
+                rslt.ErrMsg = "至少提交一条需要审核的记录";
+                return;
+            }
+
+            using (var con = new SqlConnection(GlobalVar.ConnectionString))
+            using (var cmd = con.CreateCommand())
+            {
+                con.Open();
+
+                if (request.type == 1)
+                {
+                    var power63 = UserHelper.CheckFuncPower(cmd, tokendata.empid, 63);
+                    if (!power63)
+                    {
+                        throw new LJCommonException("你没有审核权限");
+                    }
+                }
+                else
+                {
+                    var power64 = UserHelper.CheckFuncPower(cmd, tokendata.empid, 64);
+                    if (!power64)
+                    {
+                        throw new LJCommonException("你没有撤审权限");
+                    }
+                }
+
+                foreach (var bill in request.list)
+                {
+
+                    if (DbSqlHelper.SelectOne(cmd, bill, "flag") != 1)
+                    {
+                        throw new LJCommonException($"查找床网报价单据失败!({bill.bednetid})");
+                    }
+
+                    if (bill.flag == 1 && request.type == 1)
+                    {
+                        throw new LJCommonException($"查找床网报价单据已审核,不能审核!({bill.bednetid})");
+                    }
+
+                    if (bill.flag == 0 && request.type == 0)
+                    {
+                        throw new LJCommonException($"查找床网报价单据未审核,不能撤审!({bill.bednetid})");
+                    }
+                }
+
+                using (cmd.Transaction = con.BeginTransaction())
+                {
+                    try
+                    {
+                        foreach (var bill in request.list)
+                        {
+                            bill.flag = request.type;
+
+                            DbSqlHelper.Update(cmd, "u_bednet", null, bill, "bednetid", "flag");
+                        }
+
+                        cmd.Transaction.Commit();
+                    }
+                    catch (Exception e)
+                    {
+                        cmd.Transaction.Rollback();
+                        rslt.ErrMsg = e.ToString();
+                    }
+                }
+            }
+        }
+    }
+}

+ 85 - 0
JLHHJSvr/Excutor/DeleteBedNetExcutor.cs

@@ -0,0 +1,85 @@
+using System;
+using System.Data.SqlClient;
+using System.Linq;
+using JLHHJSvr.BLL;
+using JLHHJSvr.Com;
+using JLHHJSvr.Com.Model;
+using JLHHJSvr.LJException;
+using LJLib.DAL.SQL;
+using LJLib.Net.SPI.Server;
+
+namespace JLHHJSvr.Excutor
+{
+    internal sealed class DeleteBedNetExcutor : ExcutorBase<DeleteBedNetRequest, DeleteBedNetResponse>
+    {
+        protected override void ExcuteInternal(DeleteBedNetRequest request, object state, DeleteBedNetResponse rslt)
+        {
+            var tokendata = BllHelper.GetToken(request.token);
+            if (tokendata == null)
+            {
+                rslt.ErrMsg = "会话已经中断,请重新登录";
+                return;
+            }
+            if (!request.list.Any())
+            {
+                rslt.ErrMsg = "至少提交一条需要删除的记录";
+                return;
+            }
+
+            using (var con = new SqlConnection(GlobalVar.ConnectionString))
+            using (var cmd = con.CreateCommand())
+            {
+                con.Open();
+
+                var power76 = UserHelper.CheckFuncPower(cmd, tokendata.empid, 76);
+                if (!power76)
+                {
+                    throw new LJCommonException("你没有删除权限");
+                }
+
+                foreach (var bill in request.list)
+                {
+                    if (DbSqlHelper.SelectOne(cmd, bill, "flag") != 1)
+                    {
+                        throw new LJCommonException($"查找床网报价单据失败!({bill.bednetid})");
+                    }
+
+                    if (bill.flag == 1)
+                    {
+                        throw new LJCommonException($"查找床网报价单据已审核,不能删除!({bill.bednetid})");
+                    }
+                }
+
+                using (cmd.Transaction = con.BeginTransaction())
+                {
+                    try
+                    {
+                        foreach (var bill in request.list)
+                        {
+                            // 删除床网分区明细
+                            cmd.CommandText = @"DELETE FROM u_bednetmx_spring WHERE bednetmxid IN (SELECT bednetmxid FROM u_bednetmx WHERE bednetid = @bednetid)";
+                            cmd.Parameters.Clear();
+                            cmd.Parameters.AddWithValue("@bednetid", bill.bednetid.Value);
+                            cmd.ExecuteNonQuery();
+
+                            // 删除床网明细
+                            cmd.CommandText = @"DELETE FROM u_bednetmx WHERE bednetid = @bednetid";
+                            cmd.Parameters.Clear();
+                            cmd.Parameters.AddWithValue("@bednetid", bill.bednetid.Value);
+                            cmd.ExecuteNonQuery();
+
+                            DbSqlHelper.Delete(cmd, bill);
+                        }
+
+                        cmd.Transaction.Commit();
+                    }
+                    catch (Exception e)
+                    {
+                        cmd.Transaction.Rollback();
+                        rslt.ErrMsg = e.ToString();
+                    }
+                }
+            }
+        }
+    }
+}

+ 0 - 6
JLHHJSvr/Excutor/DeleteMattressBcpExcutor.cs

@@ -62,12 +62,6 @@ namespace JLHHJSvr.Excutor
                             cmd.Parameters.AddWithValue("@billid", bill.billid.Value);
                             cmd.ExecuteNonQuery();
 
-                            // 删除半成品明细
-                            cmd.CommandText = @"DELETE FROM u_semi_finished_product_mx WHERE billid = @billid";
-                            cmd.Parameters.Clear();
-                            cmd.Parameters.AddWithValue("@billid", bill.billid.Value);
-                            cmd.ExecuteNonQuery();
-
                             DbSqlHelper.Delete(cmd, bill);
                         }
 

+ 199 - 0
JLHHJSvr/Excutor/SaveBedNetExcutor.cs

@@ -0,0 +1,199 @@
+using System;
+using System.Collections.Generic;
+using System.Data.SqlClient;
+using System.Linq;
+using System.Text;
+using JLHHJSvr.BLL;
+using JLHHJSvr.Com;
+using JLHHJSvr.Com.Model;
+using JLHHJSvr.LJException;
+using JLHHJSvr.Tools;
+using LJLib.DAL.SQL;
+using LJLib.Net.SPI.Server;
+
+namespace JLHHJSvr.Excutor
+{
+    internal sealed class SaveBedNetExcutor : ExcutorBase<SaveBedNetRequest, SaveBedNetResponse>
+    {
+        protected override void ExcuteInternal(SaveBedNetRequest request, object state, SaveBedNetResponse rslt)
+        {
+            var tokendata = BllHelper.GetToken(request.token);
+            if (tokendata == null)
+            {
+                rslt.ErrMsg = "会话已经中断,请重新登录";
+                return;
+            }
+            if (request.bednet == null)
+            {
+                rslt.ErrMsg = "缺少主表信息";
+                return;
+            }
+            if(request.bednet.bednettypeid <= 0)
+            {
+                rslt.ErrMsg = "请选择床网类型";
+                return;
+            }
+            if (request.bednetMx == null || !request.bednetMx.Any())
+            {
+                rslt.ErrMsg = "缺少报价明细";
+                return;
+            }
+            // 检查是否填写床网高度
+            
+            foreach(var mx in request.bednetMx)
+            {
+                if(mx.bednet_height == null || mx.bednet_height <= 0)
+                {
+                    rslt.ErrMsg = "请填写床网高";
+                    return;
+                } else
+                {
+                    request.bednet.mattress_height = mx.bednet_height;
+                }
+            }
+
+            using (var con = new SqlConnection(GlobalVar.ConnectionString))
+            using (var cmd = con.CreateCommand())
+            {
+                con.Open();
+
+                // 初始化属性
+                AutoInit.AutoInitS(cmd, request.bednet);
+
+                using (cmd.Transaction = con.BeginTransaction())
+                {
+                    try
+                    {
+                        var dtNow = DateTime.Now;
+
+                        var fields = @"deptid,bednettypeid,mattress_width,mattress_length,mattress_height,if_doublenet,if_doublespring,snake_wire_diameter,
+                                        snake_wire_mtrl_formula,snake_wire_mtrl_cost,pocket_around_spring_formula,pocket_around_spring_cost,
+                                        pocket_around_fabrics_formula,pocket_around_fabrics_cost,hard_around_mtrl_formula,hard_around_mtrl_cost,
+                                        hard_around_hr_formula,hard_around_hr_cost,spring_mtrl_cost,spring_hr_cost,glue_price,glue_mtrl_formula,
+                                        glue_mtrl_cost,fabrics1_mtrl_formula,fabrics1_mtrl_cost,fabrics2_mtrl_formula,fabrics2_mtrl_cost,
+                                        if_side_iron,side_iron_lossrate,side_iron_price,side_iron_mtrl_formula,side_iron_mtrl_cost,side_iron_hr_formula,
+                                        side_iron_hr_cost,cnail_price,cnail_mtrl_formula,cnail_mtrl_cost,cnail_hr_formula,cnail_hr_cost,sponge_mtrlid,
+                                        sponge_thickness,sponge_price,sponge_mtrl_formula,sponge_mtrl_cost,sponge_hr_formula,sponge_hr_cost,edge_mtrlid,
+                                        edge_price,edge_mtrl_formula,edge_mtrl_cost,edge_hr_formula,edge_hr_cost,fork_qty,fork_price,fork_mtrl_formula,
+                                        fork_mtrl_cost,fork_hr_formula,fork_hr_cost,if_rsORwa,rsORwa_price,rsORwa_mtrl_formula,rsORwa_mtrl_cost,rsORwa_hr_formula,
+                                        rsORwa_hr_cost,if_sponge_drilling,sponge_drilling_hr_formula,sponge_drilling_hr_cost,total_hr_cost,total_mtrl_cost,
+                                        total_fees_cost,total_cost,createtime,createby,bednetname,spring_mtrl_formula,spring_hr_formula,
+                                        sponge_mtrl_cost_replace_formula,sponge_hr_cost_replace_formula,edge_mtrl_cost_replace_formula,edge_hr_cost_replace_formula,
+                                        fork_mtrl_cost_replace_formula,fork_hr_cost_replace_formula,rsORwa_mtrl_cost_replace_formula,rsORwa_hr_cost_replace_formula,
+                                        sponge_drilling_hr_cost_replace_formula,snake_wire_mtrl_cost_replace_formula,taxrate,taxes,commissionrate,commission,fob,
+                                        profitrate,nottax_factory_cost,nottax_dept_cost,dept_cost,foreign_cost,extras_cost,dept_profitrate,moneyrate,temp_flag,
+                                        felt_mtrlid,felt_qty,felt_price,felt_dscrp,felt_mtrl_formula,felt_mtrl_cost,felt_hr_formula,felt_hr_cost,
+                                        felt_mtrl_cost_replace_formula,felt_hr_cost_replace_formula,extras_cost_dscrp,iffork,ifsaleout,autotype,
+                                        felt_mtrl_x_cost,felt_hr_x_cost,felt_x_qty,felt_mtrl_x_cost_replace_formula,felt_hr_x_cost_replace_formula,
+                                        felt_x_mtrlid,sale_point,packtype,packqty,other_rate,transport_type,packmtrl,packet_mtrl_formula,
+                                        packet_hr_formula,packet_mtrl_cost,packet_hr_cost,packet_mtrl_cost_replace_formula,packet_hr_cost_replace_formula,
+                                        sponge_height,edge_height,sponge_tc_thickness,sponge_tc_height,sponge_tc_mtrlid,sponge_mtrl_tc_formula,
+                                        sponge_mtrl_tc_cost,sponge_mtrl_tc_cost_replace_formula,duo_qv_str,spring_weight_formula,side_iron_weight_formula,
+                                        hard_around_weight_formula,fabrics1_weight_formula,fabrics2_weight_formula,felt_weight_formula,cnail_weight_formula,
+                                        sponge_weight_formula,sponge_weight_tc_formula,edge_weight_formula,fork_weight_formula,spring_weight_replace_formula,
+                                        side_iron_weight_replace_formula,hard_around_weight_replace_formula,fabrics1_weight_replace_formula,
+                                        fabrics2_weight_replace_formula,felt_weight_replace_formula,cnail_weight_replace_formula,sponge_weight_replace_formula,
+                                        sponge_weight_tc_replace_formula,edge_weight_replace_formula,fork_weight_replace_formula,spring_weight_qty,
+                                        side_iron_weight_qty,hard_around_weight_qty,fabrics1_weight_qty,fabrics2_weight_qty,felt_weight_qty,cnail_weight_qty,
+                                        sponge_weight_qty,sponge_weight_tc_qty,edge_weight_qty,fork_weight_qty,sum_weight,if_jb";
+
+                        var fieldsMx = @"bednetmxid,bednetid,spring_qty_width,spring_qty_length,bednet_height,wire_mtrlid,springid,if_part,if_15strip,
+                                        if_pocket_around,pocket_around_springid,pocket_around_row,pocket_around_wire_price,pocket_around_spring_cost,
+                                        pocket_around_fabrics_cost,if_hard_around,hard_around_springid,hard_around_row,hard_around_wire_price,
+                                        hard_around_mtrl_cost,hard_around_hr_cost,fabrics1_mtrlid,fabrics1_price,fabrics1_mtrl_cost,fabrics2_mtrlid,
+                                        fabrics2_price,fabrics2_mtrl_cost,if_side_iron,side_iron_qty,side_iron_mtrl_cost,side_iron_hr_cost,
+                                        pocket_around_spring_cost_replace_formula,pocket_around_fabrics_cost_replace_formula,hard_around_mtrl_cost_replace_formula,
+                                        hard_around_hr_cost_replace_formula,fabrics1_mtrl_cost_replace_formula,fabrics2_mtrl_cost_replace_formula,
+                                        side_iron_mtrl_cost_replace_formula,side_iron_hr_cost_replace_formula,cnail_mtrl_cost_replace_formula,cnail_mtrl_cost,
+                                        cnail_hr_cost_replace_formula,cnail_hr_cost,glue_mtrl_cost_replace_formula,glue_mtrl_cost,spring_mtrl_cost,spring_hr_cost,
+                                        spring_mtrl_cost_replace_formula,spring_hr_cost_replace_formula,spring_weight_replace_formula";
+
+                        var fieldsMx_spring = @"bednetmx_partid,bednetmxid,springid,spring_qty_width,spring_qty_length,fabrics1_mtrl_cost,spring_mtrl_cost,
+                                                spring_hr_cost,spring_mtrl_cost_replace_formula,spring_hr_cost_replace_formula,spring_weight_replace_formula";
+
+                        if (request.bednet.bednetid <= 0)
+                        {
+                            //新建
+                            fields += ",bednetid,bednetcode";
+
+                            request.bednet.bednetid = BllHelper.GetID(cmd, "u_bednet");
+                            request.bednet.createtime = dtNow;
+                            request.bednet.createby = tokendata.username;
+
+                            var nettype = new u_bednet_type() { bednettypeid = request.bednet.bednettypeid };
+                            DbSqlHelper.SelectOne(cmd, nettype, "typecode");
+
+                            // 编号-年月日+流水
+                            request.bednet.bednetcode = $"{nettype.typecode}-{dtNow.ToString("yyyyMMdd")}{(request.bednet.bednetid.Value % 10000).ToString("D4")}";
+
+                            DbSqlHelper.Insert(cmd, "u_bednet", null, request.bednet, fields);
+                        }
+                        else
+                        {
+                            //修改
+                            foreach (var mx in request.bednetMx)
+                            {
+                                cmd.CommandText = @"DELETE FROM u_bednetmx_spring WHERE bednetmxid = @bednetmxid";
+                                cmd.Parameters.Clear();
+                                cmd.Parameters.AddWithValue("@bednetmxid", mx.bednetmxid);
+                                cmd.ExecuteNonQuery();
+                            }
+
+                            cmd.CommandText = @"DELETE FROM u_bednetmx WHERE bednetid = @bednetid";
+                            cmd.Parameters.Clear();
+                            cmd.Parameters.AddWithValue("@bednetid", request.bednet.bednetid);
+                            cmd.ExecuteNonQuery();
+
+                            DbSqlHelper.Update(cmd, "u_bednet", null, request.bednet, "bednetid", fields);
+                        }
+
+                        foreach (var mx in request.bednetMx)
+                        {
+                            AutoInit.AutoInitS(cmd, mx);
+
+                            mx.bednetid = request.bednet.bednetid;
+                            mx.bednetmxid = BllHelper.GetID(cmd, "u_bednetmx");
+
+                            DbSqlHelper.Insert(cmd, "u_bednetmx", null, mx, fieldsMx);
+
+                            if(request.spring != null && request.spring.Any())
+                            {
+                                foreach(var spring in request.spring)
+                                {
+                                    AutoInit.AutoInitS(cmd, spring);
+
+                                    spring.bednetmx_partid = request.bednet.bednetid;
+                                    spring.bednetmxid = BllHelper.GetID(cmd, "u_bednetmx_spring");
+
+                                    DbSqlHelper.Insert(cmd, "u_bednetmx_spring", null, spring, fieldsMx_spring);
+                                }
+                            }
+                        }
+
+                        var hisprice = new u_his_price
+                        {
+                            bednetid_mattressid = request.bednet.bednetid,
+                            typeid = 0,
+                            cmpdate = dtNow,
+                            cmpemp = tokendata.username,
+                            nottax_dept_cost = 0,
+                            dept_cost = 0,
+                            foreign_cost = 0
+                        };
+                        var fieldsHs = "bednetid_mattressid, typeid, cmpdate, cmpemp, nottax_dept_cost, dept_cost, foreign_cost";
+                        DbSqlHelper.Insert(cmd, "u_his_price", null, hisprice, fieldsHs);
+
+                        cmd.Transaction.Commit();
+
+                        rslt.bednet = new u_bednet() { bednetid = request.bednet.bednetid, bednetcode = request.bednet.bednetcode };
+                    }
+                    catch (Exception e)
+                    {
+                        cmd.Transaction.Rollback();
+                        rslt.ErrMsg = e.ToString();
+                    }
+                }
+            }
+        }
+    }
+}

+ 6 - 4
JLHHJSvr/GlobalVar/GlobalVar.cs

@@ -156,11 +156,13 @@ namespace JLHHJSvr
                 excutorManager.AddMap("SaveMattress", typeof(SaveMattressRequest), new SaveMattressExcutor());// 保存床垫报价
                 excutorManager.AddMap("SaveMattressAuditing", typeof(SaveMattressAuditingRequest), new SaveMattressAuditingExcutor());// 床垫报价:业务下单/取消
                 excutorManager.AddMap("DelMattress", typeof(DelMattressRequest), new DelMattressExcutor());// 床垫报价:删除
+                excutorManager.AddMap("SaveMattressBcp", typeof(SaveMattressBcpRequest), new SaveMattressBcpExcutor());// 保存半成品报价
+                excutorManager.AddMap("DeleteMattressBcp", typeof(DeleteMattressBcpRequest), new DeleteMattressBcpExcutor());// 删除半成品报价
+                excutorManager.AddMap("AuditMattressBcp", typeof(AuditMattressBcpRequest), new AuditMattressBcpExcutor());// 审核半成品报价
 
-
-                excutorManager.AddMap("SaveMattressBcp", typeof(SaveMattressBcpRequest), new SaveMattressBcpExcutor());// 保存床垫报价
-                excutorManager.AddMap("DeleteMattressBcp", typeof(DeleteMattressBcpRequest), new DeleteMattressBcpExcutor());// 保存床垫报价
-                excutorManager.AddMap("AuditMattressBcp", typeof(AuditMattressBcpRequest), new AuditMattressBcpExcutor());// 保存床垫报价
+                excutorManager.AddMap("SaveBedNet", typeof(SaveBedNetRequest), new SaveBedNetExcutor());// 保存床网报价
+                excutorManager.AddMap("DeleteBedNet", typeof(DeleteBedNetRequest), new DeleteBedNetExcutor());// 删除床网报价
+                excutorManager.AddMap("AuditBedNet", typeof(AuditBedNetRequest), new AuditBedNetExcutor());// 审核床网报价
             }
             catch (Exception ex)
             {

+ 10 - 0
JLHHJSvr/JLHHJSvr.csproj

@@ -68,12 +68,14 @@
     <Compile Include="Com\APP\SaveBill.cs" />
     <Compile Include="Com\APP\TmpGetRoadList.cs" />
     <Compile Include="Com\APP\TmpSavePermit.cs" />
+    <Compile Include="Com\AuditBedNet.cs" />
     <Compile Include="Com\AuditMattressBcp.cs" />
     <Compile Include="Com\AuditSpring.cs" />
     <Compile Include="Com\BanMtrlDef.cs" />
     <Compile Include="Com\BanMultiPrice.cs" />
     <Compile Include="Com\CommonDynamicSelect.cs" />
     <Compile Include="Com\DelCarList.cs" />
+    <Compile Include="Com\DeleteBedNet.cs" />
     <Compile Include="Com\DeleteBedNetArea.cs" />
     <Compile Include="Com\DeleteBedNetType.cs" />
     <Compile Include="Com\DeleteBedNetVar.cs" />
@@ -105,6 +107,10 @@
     <Compile Include="Com\GetFormulaCompute.cs" />
     <Compile Include="Com\Model\Recursion.cs" />
     <Compile Include="Com\Model\sys_func_pwr.cs" />
+    <Compile Include="Com\Model\u_bednet.cs" />
+    <Compile Include="Com\Model\u_bednetmx.cs" />
+    <Compile Include="Com\Model\u_bednetmx_mtrl.cs" />
+    <Compile Include="Com\Model\u_bednetmx_spring.cs" />
     <Compile Include="Com\Model\u_bednet_area.cs" />
     <Compile Include="Com\Model\u_bednet_type.cs" />
     <Compile Include="Com\Model\u_bednet_var.cs" />
@@ -130,6 +136,7 @@
     <Compile Include="Com\Model\u_shrinkage.cs" />
     <Compile Include="Com\Model\u_spring.cs" />
     <Compile Include="Com\Model\u_workmanship_add.cs" />
+    <Compile Include="Com\SaveBedNet.cs" />
     <Compile Include="Com\SaveBedNetArea.cs" />
     <Compile Include="Com\SaveBedNetType.cs" />
     <Compile Include="Com\Model\u_workmanship_add.cs" />
@@ -204,6 +211,7 @@
     <Compile Include="Excutor\APP\SaveBillExcutor.cs" />
     <Compile Include="Excutor\APP\TmpGetRoadListExcutor.cs" />
     <Compile Include="Excutor\APP\TmpSavePermitExcutor.cs" />
+    <Compile Include="Excutor\AuditBedNetExcutor.cs" />
     <Compile Include="Excutor\AuditMattressBcpExcutor.cs" />
     <Compile Include="Excutor\AuditSpringExcutor.cs" />
     <Compile Include="Excutor\BanMtrlDefExcutor.cs" />
@@ -211,6 +219,7 @@
     <Compile Include="Excutor\CommonDynamicSelectExcutor.cs" />
     <Compile Include="Excutor\DelCarListExcutor.cs" />
     <Compile Include="Excutor\DeleteBedNetAreaExcutor.cs" />
+    <Compile Include="Excutor\DeleteBedNetExcutor.cs" />
     <Compile Include="Excutor\DeleteBedNetTypeExcutor.cs" />
     <Compile Include="Excutor\DeleteBedNetVarExcutor.cs" />
     <Compile Include="Excutor\DeleteConfigureCodeExcutor.cs" />
@@ -249,6 +258,7 @@
     <Compile Include="Excutor\ModPasswordExcutor.cs" />
     <Compile Include="Excutor\PostFileExcutor.cs" />
     <Compile Include="Excutor\SaveBedNetAreaExcutor.cs" />
+    <Compile Include="Excutor\SaveBedNetExcutor.cs" />
     <Compile Include="Excutor\SaveBedNetTypeExcutor.cs" />
     <Compile Include="Excutor\SaveBedNetVarExcutor.cs" />
     <Compile Include="Excutor\SaveCarListExcutor.cs" />

+ 6 - 0
JLHWEB/src/api/interface/index.ts

@@ -1187,4 +1187,10 @@ export namespace Mattress {
   export interface ResSaveMattressBcp {
     mattress: any;
   }
+  export interface ReqSaveBedNet {
+    bednet: any;
+  }
+  export interface ResSaveBedNet {
+    bednet: any;
+  }
 }

+ 21 - 0
JLHWEB/src/api/modules/quote.ts

@@ -43,3 +43,24 @@ export const AuditMattressBcp = (params: Mattress.ReqMultiMattressBcp) => {
 export const DeleteMattressBcp = (params: Mattress.ReqMultiMattressBcp) => {
   return http.post(PORT1 + `/DeleteMattressBcp`, params);
 };
+
+/**
+ * @name 床网报价:保存
+ */
+export const SaveBedNet = (params: Mattress.ReqSaveBedNet) => {
+  return http.post<Mattress.ResSaveBedNet>(PORT1 + `/SaveMattressBcp`, params);
+};
+
+/**
+ * @name 床网报价:审核
+ */
+export const AuditBedNet = (params: Mattress.ReqMultiMattressBcp) => {
+  return http.post(PORT1 + `/AuditBedNet`, params);
+};
+
+/**
+ * @name 床网报价:删除
+ */
+export const DeleteBedNet = (params: Mattress.ReqMultiMattressBcp) => {
+  return http.post(PORT1 + `/DeleteBedNet`, params);
+};

+ 94 - 92
JLHWEB/src/views/quote/bednetQuote/index.vue

@@ -81,7 +81,7 @@
 <script setup lang="ts" name="bednetQuote">
 import { ref, onMounted, inject } from "vue";
 import { useRouter } from "vue-router";
-import { SaveMattressAuditing, DelMattress } from "@/api/modules/quote";
+import { AuditBedNet, DeleteBedNet } from "@/api/modules/quote";
 import { CommonDynamicSelect } from "@/api/modules/common";
 import { ColumnProps } from "@/components/LjVxeTable/interface";
 import LjDrawer from "@/components/LjDrawer/index.vue";
@@ -263,101 +263,103 @@ const action: detailAction[] = [
       return "";
     },
     clickFunc: item => {
-      // const { curRecords } = getCurrentRecords(vxeTableRef.value);
-      // console.log("curRecords :>> ", curRecords);
-      // if (!curRecords.length) {
-      //   ElMessage.warning(t("business.tips.mattress.records"));
-      //   return;
-      // }
-      // let _mattressids = curRecords.map((item: any) => Number(item.mattressid));
-      // ElMessageBox.confirm(`是否确定要删除${curRecords.length}张床垫报价单吗?`, "询问", {
-      //   confirmButtonText: t("common.delText"),
-      //   cancelButtonText: "否",
-      //   type: "warning"
-      // })
-      //   .then(() => {
-      //     DelMattress({ mattressids: _mattressids }).then(() => {
-      //       ElMessage.success("删除成功!");
-      //       vxeTableRef.value.refresh();
-      //     });
-      //   })
-      //   .catch((e: TypeError) => {
-      //     console.log("e :>> ", e);
-      //     ElMessage({
-      //       type: "info",
-      //       message: "操作取消"
-      //     });
-      //   });
+      const { curRecords } = getCurrentRecords(vxeTableRef.value);
+      console.log("curRecords :>> ", curRecords);
+      if (!curRecords.length) {
+        ElMessage.warning(t("business.tips.mattress.records"));
+        return;
+      }
+      ElMessageBox.confirm(`是否确定要删除${curRecords.length}张床垫报价单吗?`, "询问", {
+        confirmButtonText: t("common.delText"),
+        cancelButtonText: "否",
+        type: "warning"
+      })
+        .then(() => {
+          let list = curRecords.map((item: any) => {
+            return { bednetid: Number(item.bednetid) };
+          });
+          DeleteBedNet({ list }).then(() => {
+            ElMessage.success("删除成功!");
+            vxeTableRef.value.refresh();
+          });
+        })
+        .catch((e: TypeError) => {
+          console.log("e :>> ", e);
+          ElMessage({
+            type: "info",
+            message: "操作取消"
+          });
+        });
     }
   }),
-  [
-    buttonDefault({
-      label: t("common.auditFinance"),
-      power: 63,
-      disabledTextCallBack: (data: any) => {
-        if (!CheckPower(63)) {
-          return `你没有【报价单-${t("common.auditFinance")}】的使用权限`;
-        }
-        return "";
-      },
-      clickFunc: item => {
-        // ElMessageBox.confirm(`是否确定要${t("common.auditFinance")}吗?`, "询问", {
-        //   confirmButtonText: "是",
-        //   cancelButtonText: "否",
-        //   type: "warning"
-        // })
-        //   .then(() => {
-        //     let _params = {
-        //       mattressids: [Number(LjDetailRef.value._mainData.mattressid)],
-        //       flag: 1
-        //     };
-        //     SaveMattressAuditing(_params).then(() => {
-        //       ElMessage.success(t("sys.api.operationSuccess"));
-        //       LjDetailRef.value.refresh();
-        //     });
-        //   })
-        //   .catch((e: TypeError) => {
-        //     ElMessage({
-        //       type: "info",
-        //       message: "操作取消"
-        //     });
-        //   });
+  buttonDefault({
+    label: t("common.auditText"),
+    power: 63,
+    disabledTextCallBack: (data: any) => {
+      if (!CheckPower(63)) {
+        return `你没有【报价单-${t("common.auditText")}】的使用权限`;
       }
-    }),
-    buttonDefault({
-      label: t("common.withdrawAuditFinance"),
-      power: 64,
-      disabledTextCallBack: (data: any) => {
-        if (!CheckPower(64)) {
-          return `你没有【报价单-${t("common.withdrawAuditFinance")}】的使用权限`;
-        }
-        return "";
-      },
-      clickFunc: item => {
-        // ElMessageBox.confirm(`是否确定要${t("common.withdrawAuditFinance")}吗?`, "询问", {
-        //   confirmButtonText: "是",
-        //   cancelButtonText: "否",
-        //   type: "warning"
-        // })
-        //   .then(() => {
-        //     let _params = {
-        //       mattressids: [Number(LjDetailRef.value._mainData.mattressid)],
-        //       flag: 0
-        //     };
-        //     SaveMattressAuditing(_params).then(() => {
-        //       ElMessage.success(t("sys.api.operationSuccess"));
-        //       LjDetailRef.value.refresh();
-        //     });
-        //   })
-        //   .catch((e: TypeError) => {
-        //     ElMessage({
-        //       type: "info",
-        //       message: "操作取消"
-        //     });
-        //   });
+      return "";
+    },
+    clickFunc: item => {
+      const { curRecords } = getCurrentRecords(vxeTableRef.value);
+      ElMessageBox.confirm("是否确定要审核单据吗?", "询问", {
+        confirmButtonText: "是",
+        cancelButtonText: "否",
+        type: "warning"
+      })
+        .then(() => {
+          let list = curRecords.map((item: any) => {
+            return { bednetid: Number(item.bednetid) };
+          });
+          AuditBedNet({ list, type: 1 }).then(() => {
+            ElMessage.success("审核成功!");
+
+            vxeTableRef.value.refresh();
+          });
+        })
+        .catch((e: TypeError) => {
+          ElMessage({
+            type: "info",
+            message: "操作取消"
+          });
+        });
+    }
+  }),
+  buttonDefault({
+    label: t("common.withdrawAuditText"),
+    power: 64,
+    disabledTextCallBack: (data: any) => {
+      if (!CheckPower(64)) {
+        return `你没有【报价单-${t("common.withdrawAuditText")}】的使用权限`;
       }
-    })
-  ],
+      return "";
+    },
+    clickFunc: item => {
+      const { curRecords } = getCurrentRecords(vxeTableRef.value);
+      ElMessageBox.confirm("是否确定要撤审单据吗?", "询问", {
+        confirmButtonText: "是",
+        cancelButtonText: "否",
+        type: "warning"
+      })
+        .then(() => {
+          let list = curRecords.map((item: any) => {
+            return { bednetid: Number(item.bednetid) };
+          });
+          AuditBedNet({ list, type: 0 }).then(() => {
+            ElMessage.success("撤审成功!");
+
+            vxeTableRef.value.refresh();
+          });
+        })
+        .catch((e: TypeError) => {
+          ElMessage({
+            type: "info",
+            message: "操作取消"
+          });
+        });
+    }
+  }),
   buttonDefault({
     label: t("common.copyQuote"),
     clickFunc: item => {