MY 23 часов назад
Родитель
Сommit
a4ab0a4baa

+ 6 - 3
JLHHJSvr/Com/GetSoftBedMxList.cs

@@ -21,12 +21,15 @@ namespace JLHHJSvr.Com
         /// 单据id
         /// </summary>
         public int billid { get; set; }
+        /// <summary>
+        /// 配置项值
+        /// </summary>
+        public List<u_configure_codemx> codeList { get; set; }
     }
 
     public sealed class GetSoftBedMxListResponse : LJResponse
     {
-        //public u_mattress mattress { get; set; }
-        //public List<u_mattress_interface> interfaceList { get; set; }
-        //public List<u_mattress_interface_qd> qdList { get; set; }
+        public u_softbed softbed { get; set; }
+        public List<u_softbed_mx> mxList { get; set; }
     }
 }

+ 4 - 0
JLHHJSvr/Com/Model/u_configure_codemxbom.cs

@@ -29,11 +29,15 @@ namespace JLHHJSvr.Com.Model
         public int deptid_scll { get; set; }
         public decimal price { get; set; }
         public string price_formula { get; set; }
+        public decimal default_length { get; set; }
+        public decimal default_width { get; set; }
+        public decimal default_qty { get; set; }
         #region 辅助
         public string mtrlname { get; set; }
         public string mtrlcode { get; set; }
         public string mtrlmode { get; set; }
         public string unit { get; set; }
+        public byte has_type { get; set; }
         #endregion
     }
 }

+ 6 - 2
JLHHJSvr/Com/Model/u_softbed.cs

@@ -15,8 +15,8 @@ namespace JLHHJSvr.Com.Model
         public string softbed_name { get; set; }
         public int deptid { get; set; }
         public byte flag { get; set; }
-        public DateTime? create_time { get; set; }
-        public string create_by { get; set; }
+        public DateTime? create_date { get; set; }
+        public string create_emp { get; set; }
         public string mtrlmode { get; set; }
         public string mtrltype { get; set; }
         public byte has_headboard { get; set; }
@@ -37,6 +37,10 @@ namespace JLHHJSvr.Com.Model
         public decimal nottax_dept_cost { get; set; }
         public decimal dept_cost { get; set; }
         public decimal foreign_cost { get; set; }
+        public DateTime? audit_date { get; set; }
+        public string audit_emp { get; set; }
+        public DateTime? update_date { get; set; }
+        public string update_emp { get; set; }
 
         public List<u_softbed_mx> mxList { get; set; }
     }

+ 30 - 0
JLHHJSvr/DataStore/web_softbed_list.xml

@@ -38,5 +38,35 @@ FROM u_softbed
   </where>
   <orderstr>create_date DESC,softbed_id DESC</orderstr>
   <displayfields>
+    <field field="pid" compute="getrow()">序</field>
+	<field field="softbed_code">软床报价编码</field>
+	<field field="softbed_name">软床报价名称</field>
+	<field field="deptid" mapper="">部门</field>
+	<field field="flag" datatype="checkbox">审核</field>
+	<field field="create_date" datatype="datetime">报价日期</field>
+	<field field="create_emp">报价人</field>
+	<field field="mtrlmode">物料规格</field>
+	<field field="mtrltype">物料类别</field>
+	<field field="has_headboard" datatype="checkbox">床头</field>
+	<field field="has_nightstand" datatype="checkbox">床头柜</field>
+	<field field="has_bedframe" datatype="checkbox">床架</field>
+	<field field="is_template" datatype="checkbox">模板报价</field>
+	<field field="template_code">模板编号</field>
+	<field field="template_name">模板名称</field>
+	<field field="commission" datatype="number">佣金</field>
+	<field field="taxes" datatype="number">税金</field>
+	<field field="other_rate" datatype="number">额外点数</field>
+	<field field="extras_cost" datatype="number">额外费用</field>
+	<field field="moneyrate" datatype="number">汇率</field>
+	<field field="dscrp">备注</field>
+	<field field="costamt" datatype="number">报价金额</field>
+	<field field="nottax_factory_cost" datatype="number">不含税出厂价</field>
+	<field field="nottax_dept_cost" datatype="number">部门售价(不含税)</field>
+	<field field="dept_cost" datatype="number">部门含税价</field>
+	<field field="foreign_cost" datatype="number">外币价</field>
+	<field field="audit_date" datatype="datetime">审核日期</field>
+	<field field="audit_emp">审核人</field>
+	<field field="update_date" datatype="datetime">更新日期</field>
+	<field field="update_emp">更新人</field>
   </displayfields>
 </select>

+ 13 - 2
JLHHJSvr/Excutor/GetSoftBedMxListExcutor.cs

@@ -24,7 +24,7 @@ namespace JLHHJSvr.Excutor
                 rslt.ErrMsg = "会话已经中断,请重新登录";
                 return;
             }
-            if (request.billid <= 0)
+            if (request.billid < 0)
             {
                 rslt.ErrMsg = "软床id有误,请检查!";
                 return;
@@ -35,7 +35,18 @@ namespace JLHHJSvr.Excutor
             {
                 con.Open();
 
-                
+                var softbedHelpr = HelperBase.GetHelper<SoftBedHelper>(cmd, new HelperBase.Context() { tokendata = tokendata });
+
+                if(request.billid > 0)
+                {
+                    // 根据ID获取明细
+                    rslt.softbed = softbedHelpr.GetSoftBed(request.billid);
+                    rslt.mxList = softbedHelpr.GetSoftBedMxList(request.billid);
+                } else if(request.codeList != null && request.codeList.Count > 0)
+                {
+                    // 根据配置获取明细
+                    rslt.mxList = softbedHelpr.GetSoftBedMxBomList(request.codeList);
+                }
             }
         }
     }

+ 1 - 0
JLHHJSvr/GlobalVar/GlobalVar.cs

@@ -256,6 +256,7 @@ namespace JLHHJSvr
                 excutorManager.AddMap("SaveSoftBedQuote", typeof(SaveSoftBedQuoteRequest), new SaveSoftBedQuoteExcutor()); // 保存/修改软床报价
                 excutorManager.AddMap("DeleteSoftBedQuote", typeof(DeleteSoftBedQuoteRequest), new DeleteSoftBedQuoteExcutor()); // 删除软床报价
                 excutorManager.AddMap("AuditSoftBedQuote", typeof(AuditSoftBedQuoteRequest), new AuditSoftBedQuoteExcutor()); // 审核软床报价
+                excutorManager.AddMap("GetSoftBedMxList", typeof(GetSoftBedMxListRequest), new GetSoftBedMxListExcutor()); // 审核软床报价
             }
             catch (Exception ex)
             {

+ 33 - 18
JLHHJSvr/Helper/SoftBedHelper.cs

@@ -24,7 +24,7 @@ namespace JLHHJSvr.Helper
 		/// <param name="bill"></param>
         public u_softbed GetSoftBed(int billid,string fields = null)
         {
-            fields = fields ?? @"softbed_id,softbed_code,softbed_name,deptid,create_time,create_by,mtrlmode,mtrltype,has_headboard,has_nightstand,has_bedframe,is_template,
+            fields = fields ?? @"softbed_id,softbed_code,softbed_name,deptid,create_date,create_emp,mtrlmode,mtrltype,has_headboard,has_nightstand,has_bedframe,is_template,
                                 template_id,template_code,template_name,commission,taxes,other_rate,extras_cost,moneyrate,dscrp,costamt,nottax_factory_cost,nottax_dept_cost,
                                 dept_cost,foreign_cost";
             var bill = new u_softbed() { softbed_id = billid };
@@ -103,15 +103,15 @@ namespace JLHHJSvr.Helper
         /// </summary>
         /// <param name="mxlist"></param>
         /// <param name="codeList"></param>
-        public List<u_softbed_mx> GetSoftBedMxBomList(int deptid, List<u_configure_codemx> codeList)
+        public List<u_softbed_mx> GetSoftBedMxBomList(List<u_configure_codemx> codeList)
 		{
 			var mxlist = new List<u_softbed_mx>();
-
 			foreach(var code in codeList)
 			{
 				var resultList = new List<u_configure_codemxbom>();
 				var outputFields = @"pzid,printid,pid,mtrlid,sonscale,sonscale_formula,mng_cost_rate,profit_rate,realqty,cost,cost_emp,cost_date,sonloss,sonloss_formula,
-									sondecloss,sondecloss_formula,deptid_scll,price,price_formula,mtrlcode,mtrlname,mtrlmode,unit,mtrlsectype,zxmtrlmode,usermtrlmode";
+									sondecloss,sondecloss_formula,deptid_scll,price,price_formula,default_length,default_width,default_qty,mtrlcode,mtrlname,mtrlmode,unit,
+									mtrlsectype,zxmtrlmode,usermtrlmode";
 				var selectStr = @"SELECT u_configure_codemxbom.pzid
 										,u_configure_codemxbom.printid
 										,u_configure_codemxbom.pid
@@ -131,6 +131,9 @@ namespace JLHHJSvr.Helper
 										,u_configure_codemxbom.deptid_scll
 										,u_configure_codemxbom.price
 										,u_configure_codemxbom.price_formula
+										,u_configure_codemxbom.default_length
+										,u_configure_codemxbom.default_width
+										,u_configure_codemxbom.default_qty
 										,u_mtrldef.mtrlcode
 										,u_mtrldef.mtrlname
 										,u_mtrldef.mtrlmode
@@ -141,8 +144,8 @@ namespace JLHHJSvr.Helper
 									FROM u_configure_codemxbom
 									INNER JOIN u_mtrldef ON u_configure_codemxbom.mtrlid = u_mtrldef.mtrlid";
 				DbSqlHelper.SelectJoin(cmd,selectStr, 
-					"u_configure_codemxbom.pzid = @pzid AND u_configure_codemxbom.printid = @printid AND u_configure_codemxbom.deptid_scll = @deptid",
-					new Dictionary<string, object>() { { "@pzid", code.pzid }, { "@printid",code.printid},{ "@deptid",deptid } }, 
+					"u_configure_codemxbom.pzid = @pzid AND u_configure_codemxbom.printid = @printid",
+					new Dictionary<string, object>() { { "@pzid", code.pzid }, { "@printid",code.printid} }, 
 					"u_configure_codemxbom.pid", outputFields, 0,0,resultList);
 
 				foreach(var item in resultList)
@@ -152,7 +155,11 @@ namespace JLHHJSvr.Helper
 			}
 			return mxlist;
         }
-
+		/// <summary>
+		/// 初始化配置项值带出的BOM清单列表
+		/// </summary>
+		/// <param name="bomItem"></param>
+		/// <returns></returns>
 		public u_softbed_mx InitSoftBedMxFromBom(u_configure_codemxbom bomItem)
 		{
 			var mx = new u_softbed_mx()
@@ -165,10 +172,10 @@ namespace JLHHJSvr.Helper
 				mtrlmode = bomItem.mtrlmode,
 				unit = bomItem.unit,
 				allow_edit = 0,
-				has_type = 1, // 1-床头、2-床头柜、4-床架
-				cutting_length = 0,
-				cutting_qty = 0,
-				cutting_width = 0,
+				has_type = bomItem.has_type, // 1-床头、2-床头柜、4-床架
+				cutting_length = bomItem.default_length,
+				cutting_width = bomItem.default_width,
+				cutting_qty = bomItem.default_qty,
 				useqty = bomItem.sonscale,
 				use_formula = "",
 				use_formula_str = bomItem.sonscale_formula,
@@ -211,7 +218,7 @@ namespace JLHHJSvr.Helper
 			// TODO:计算价格
 
 			//
-            var dtNow = DateTime.Now;
+            var dtNow = context.opdate;
 			var fields = @"softbed_name,deptid,mtrlmode,mtrltype,has_headboard,has_nightstand,has_bedframe,is_template,
                             template_id,template_code,template_name,commission,taxes,other_rate,extras_cost,moneyrate,dscrp,costamt,nottax_factory_cost,nottax_dept_cost,
                             dept_cost,foreign_cost";
@@ -222,11 +229,11 @@ namespace JLHHJSvr.Helper
 			if(softbed.softbed_id == 0)
 			{
 				// 新建
-				fields += ",softbed_id,softbed_code,create_time,create_by";
+				fields += ",softbed_id,softbed_code,create_date,create_emp";
 
                 softbed.softbed_id = BllHelper.GetID(cmd, "u_softbed");
-                softbed.create_time = dtNow;
-                softbed.create_by = context.tokendata.username;
+                softbed.create_date = dtNow;
+                softbed.create_emp = context.tokendata.username;
 
                 if (string.IsNullOrEmpty(softbed.softbed_code))
                 {
@@ -237,7 +244,11 @@ namespace JLHHJSvr.Helper
                 DbSqlHelper.Insert(cmd, "u_softbed", null, softbed, fields);
             } else
 			{
-                // 修改
+				// 修改
+				softbed.update_date = dtNow;
+				softbed.update_emp = context.tokendata.username;
+                fields += ",update_date,update_emp";
+
                 cmd.CommandText = @"DELETE FROM u_softbed_mx WHERE softbed_id = @softbed_id";
                 cmd.Parameters.Clear();
                 cmd.Parameters.AddWithValue("@softbed_id", softbed.softbed_id);
@@ -314,7 +325,9 @@ namespace JLHHJSvr.Helper
             if (softbed.flag == 1) throw new LJCommonException($"单据:{softbed.softbed_code}未撤审,无法审核!");
 
 			softbed.flag = 1;
-            DbSqlHelper.Update(cmd, "u_softbed",null,softbed, "softbed_id", "flag");
+			softbed.audit_date = context.opdate;
+			softbed.audit_emp = context.tokendata.username;
+            DbSqlHelper.Update(cmd, "u_softbed",null,softbed, "softbed_id", "flag,audit_date,audit_emp");
         }
 
 		/// <summary>
@@ -331,7 +344,9 @@ namespace JLHHJSvr.Helper
             if (softbed.flag == 0) throw new LJCommonException($"单据:{softbed.softbed_code}未审核,无法撤审!");
 
 			softbed.flag = 0;
-            DbSqlHelper.Update(cmd, "u_softbed", null, softbed, "softbed_id", "flag");
+            softbed.audit_date = null;
+            softbed.audit_emp = string.Empty;
+            DbSqlHelper.Update(cmd, "u_softbed", null, softbed, "softbed_id", "flag,audit_date,audit_emp");
         }
 
         #region 通用公式方法

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

@@ -1399,5 +1399,9 @@ export namespace Mattress {
   }
   export interface ResSoftBed {
     softbed: any;
+    mxList: any[];
+  }
+  export interface ResGetSoftBedMxList {
+    billid: number;
   }
 }

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

@@ -274,3 +274,10 @@ export const ViewHisSoftBedQuote = (params: Mattress.ReqSaveMattressInterface) =
 export const ShowSoftBedQuoteFml = (params: Mattress.ReqSaveMattressInterface) => {
   return http.post<Mattress.ResSaveMattressBcp>(PORT1 + `/ShowSoftBedQuoteFml`, params);
 };
+
+/**
+ * @name 软床报价:显示公式
+ */
+export const GetSoftBedMxList = (params: Mattress.ResGetSoftBedMxList) => {
+  return http.post<Mattress.ResSoftBed>(PORT1 + `/GetSoftBedMxList`, params);
+};

+ 364 - 0
JLHWEB/src/views/quote/softbedQuote/detail.vue

@@ -0,0 +1,364 @@
+<template>
+  <LjDetail
+    name="softbedQuoteDetail"
+    ref="LjDetailRef"
+    v-bind="detailProps"
+    :data="softBed"
+    :dwname="DwnameEnum.softbedQuote"
+    v-model:order-status="orderStatus"
+    :action="orderDefaultAction"
+    @after-mounted="funcAfterMound"
+    :if-layout-editable="false"
+    :request-auto="false"
+    :auto-load-layout="true"
+  >
+    <template #HeadBoard>
+      <LjVxeTable
+        ref="VxeTableMxRef"
+        row-key="key"
+        table-cls=""
+        :data="headBoardMx"
+        :columns="columnsMx"
+        :dwname="DwnameEnum.softbedQuoteMx"
+        :auto-load-layout="false"
+        :request-auto="false"
+      >
+      </LjVxeTable>
+    </template>
+    <template #NightStand>
+      <LjVxeTable
+        ref="VxeTableMxRef"
+        row-key="key"
+        table-cls=""
+        :data="nightStandMx"
+        :columns="columnsMx"
+        :dwname="DwnameEnum.softbedQuoteMx"
+        :auto-load-layout="false"
+        :request-auto="false"
+      >
+      </LjVxeTable>
+    </template>
+    <template #BedFrame>
+      <LjVxeTable
+        ref="VxeTableMxRef"
+        row-key="key"
+        table-cls=""
+        :data="bedFrameMx"
+        :columns="columnsMx"
+        :dwname="DwnameEnum.softbedQuoteMx"
+        :auto-load-layout="false"
+        :request-auto="false"
+      >
+      </LjVxeTable>
+    </template>
+  </LjDetail>
+</template>
+
+<script setup lang="tsx" name="softBedQuoteDetail">
+import { ref, watch, reactive, inject, onMounted } from "vue";
+import { DwnameEnum } from "@/enums/dwnameEnum";
+import {} from "@/api/modules/quote";
+import LjDetail from "@/components/LjDetail/index.vue";
+import { DetailProp } from "@/components/LjDetail/interface";
+import { useI18n } from "vue-i18n";
+import { useRoute, useRouter } from "vue-router";
+import { useAuthButtons } from "@/hooks/useAuthButtons";
+import { CommonDynamicSelect } from "@/api/modules/common";
+import { ElMessage, ElMessageBox } from "element-plus";
+import { useHooks } from "./hooks/index";
+import { useUserStore } from "@/stores/modules/user";
+
+const { t } = useI18n();
+const route = useRoute();
+const router = useRouter();
+const {
+  orderStatus,
+  LjDetailRef,
+  VxeTableMxRef,
+  columns,
+  columnsMx,
+  softBed,
+  headBoardMx,
+  nightStandMx,
+  bedFrameMx,
+  detail_getData
+} = useHooks(t);
+const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
+
+const initParams = ref({ billid: 0 as Number });
+
+const { userInfo } = useUserStore();
+const loadingStatus = reactive({
+  save: false,
+  download: false
+});
+/**
+ * @description 明细表格组件基础配置
+ */
+const tableProps = ref({
+  height: "auto",
+  align: "left",
+  // height: "",
+  minHeight: "300px",
+  editConfig: { trigger: "click", mode: "cell", enabled: false },
+  // exportConfig: {
+  //   filename: t("menu.saleTaskCrmDetail") + formatToDate(new Date(), "YYYY-MM-DDHH:mm:ss")
+  // }
+  keyboardConfig: {
+    isEdit: true,
+    isArrow: true,
+    isEnter: true,
+    isTab: true,
+    isDel: true,
+    isBack: true,
+    isEsc: true,
+    editMethod({ $table, row, column }) {
+      // 先清空原先的值
+      row[column.field] = "";
+      // 再激活编辑状态并输入新值
+      $table.setEditCell(row, column);
+    }
+  },
+  mouseConfig: {
+    selected: true
+  }
+});
+
+const detailProps = reactive<DetailProp>({
+  dwname: DwnameEnum.softbedQuote,
+  columns: columns,
+  basicDefault: {},
+  header: {
+    fieldNames: {
+      code: "softbed_code",
+      codeLabel: "核价编码:",
+      name: "name"
+    }
+  },
+  mould: [
+    {
+      id: "HeadBoard",
+      type: "table",
+      label: "床头",
+      limited: (params: any) => {
+        if (!params) return true;
+        return params?.has_headboard == 1;
+      }
+    },
+    {
+      id: "NightStand",
+      type: "table",
+      label: "床头柜",
+      limited: (params: any) => {
+        if (!params) return true;
+        return params?.has_nightstand == 1;
+      }
+    },
+    {
+      id: "BedFrame",
+      type: "table",
+      label: "床架",
+      limited: (params: any) => {
+        if (!params) return true;
+        return params?.has_bedframe == 1;
+      }
+    }
+  ]
+});
+
+const orderDefaultAction = [
+  buttonDefault({
+    label: t("common.cancelText"),
+    icon: "iconchevron-left",
+    limited: () => {
+      return !orderStatus.value;
+    },
+    clickFunc: item => {
+      if (route.path.indexOf("/new") > -1) {
+        // tabRemove(route.fullPath);
+        router.replace("/softbedQuote");
+      } else {
+        router.replace(
+          `/softbedQuote/detail?id=${LjDetailRef.value._mainData.softbed_id}&code=${LjDetailRef.value._mainData.softbed_code}`
+        );
+      }
+    }
+  }),
+  buttonNew({
+    label: t("common.saveText"),
+    icon: "iconsave-01",
+    loading: () => loadingStatus.save,
+    limited: () => !orderStatus.value,
+    disabledTextCallBack: data => {
+      if (data.flag > 0) {
+        return "单据已审核,无法保存!";
+      }
+      return "";
+    },
+    clickFunc: () => {}
+  }),
+  buttonDefault({
+    label: t("common.add"),
+    power: 72,
+    limited: () => {
+      return !!orderStatus.value;
+    },
+    clickFunc: item => {
+      router.push(`/softbedQuote/new?id=0`);
+    }
+  }),
+  buttonDefault({
+    power: 72,
+    label: t("common.editText"),
+    limited: () => {
+      return !!orderStatus.value;
+    },
+    disabledTextCallBack: data => {
+      if (data.flag == 1) {
+        return "单据已审核,不能修改";
+      }
+      return "";
+    },
+    clickFunc: item => {
+      router.replace(
+        `/softbedQuote/edit?id=${LjDetailRef.value._mainData.softbed_id}&code=${LjDetailRef.value._mainData.softbed_code}`
+      );
+    }
+  }),
+  buttonDefault({
+    power: 77,
+    label: t("common.delText"),
+    limited: () => {
+      return !!orderStatus.value;
+    },
+    disabledTextCallBack: (data: any) => {
+      if (!CheckPower(77)) {
+        return "你没有【报价单-删除】的使用权限";
+      }
+      return "";
+    },
+    clickFunc: item => {
+      ElMessageBox.confirm("是否确定要删除床垫报价单吗?", "询问", {
+        confirmButtonText: t("common.delText"),
+        cancelButtonText: "否",
+        type: "error"
+      })
+        .then(() => {})
+        .catch((e: TypeError) => {
+          ElMessage({
+            type: "info",
+            message: "操作取消"
+          });
+        });
+    }
+  }),
+  buttonDefault({
+    label: t("common.auditText"),
+    power: 73,
+    limited: () => {
+      return !!orderStatus.value;
+    },
+    disabledTextCallBack: (data: any) => {
+      if (!CheckPower(73)) {
+        return `你没有【报价单-${t("common.auditText")}】的使用权限`;
+      }
+      if (+data.flag === 1) {
+        return "已审核";
+      }
+      return "";
+    },
+    clickFunc: item => {
+      ElMessageBox.confirm(`是否确定要${t("common.auditText")}吗?`, "询问", {
+        confirmButtonText: "是",
+        cancelButtonText: "否",
+        type: "warning"
+      })
+        .then(() => {})
+        .catch((e: TypeError) => {
+          ElMessage({
+            type: "info",
+            message: "操作取消"
+          });
+        });
+    }
+  }),
+  buttonDefault({
+    label: t("common.withdrawAuditText"),
+    power: 74,
+    limited: () => {
+      return !!orderStatus.value;
+    },
+    disabledTextCallBack: (data: any) => {
+      if (!CheckPower(74)) {
+        return `你没有【报价单-${t("common.withdrawAuditText")}】的使用权限`;
+      }
+      if (+data.flag === 0) {
+        return "未审核";
+      }
+      return "";
+    },
+    clickFunc: item => {
+      ElMessageBox.confirm(`是否确定要${t("common.withdrawAuditText")}吗?`, "询问", {
+        confirmButtonText: "是",
+        cancelButtonText: "否",
+        type: "warning"
+      })
+        .then(() => {})
+        .catch((e: TypeError) => {
+          ElMessage({
+            type: "info",
+            message: "操作取消"
+          });
+        });
+    }
+  }),
+  buttonDefault({
+    label: t("common.copyQuote"),
+    power: 75,
+    limited: () => {
+      return !!orderStatus.value;
+    },
+    clickFunc: item => {
+      router.push(
+        `/softbedQuote/copy?id=${LjDetailRef.value._mainData.softbed_id}&code=${LjDetailRef.value._mainData.softbed_code}`
+      );
+    }
+  }),
+  buttonDefault({
+    label: t("common.showFormula"),
+    disabledTextCallBack: () => {
+      return userInfo.usermode == 1 ? "业务员模式不可以查看!" : "";
+    },
+    clickFunc: () => {}
+  }),
+  buttonDefault({
+    label: t("common.viewHistoricalQuotes"),
+    clickFunc: () => {}
+  }),
+  buttonDefault({
+    label: t("common.back"),
+    clickFunc: item => {
+      router.push("/softbedQuote");
+    }
+  })
+];
+
+/**
+ * @description 页面数据加载完成
+ */
+const funcAfterMound = async (data: any) => {
+  console.log("onMounted detail start!!!! :>> ", orderStatus.value, data);
+  if (!orderStatus.value) {
+    // 详情页
+  } else {
+    // 新增/编辑
+    tableProps.value.editConfig.enabled = true;
+  }
+
+  if (orderStatus.value != "new") {
+    initParams.value.billid = 1;
+  }
+
+  detail_getData(initParams.value);
+};
+</script>

+ 173 - 3
JLHWEB/src/views/quote/softbedQuote/hooks/index.tsx

@@ -1,5 +1,6 @@
 import { ref, reactive, computed, toRefs, nextTick } from "vue";
 import { ColumnProps } from "@/components/LjVxeTable/interface";
+import { GetSoftBedMxList } from "@/api/modules/quote";
 interface defaultState {
   /**
    * @description 单据当前状态
@@ -17,6 +18,26 @@ interface defaultState {
    * @description 详情页明细表格Ref
    */
   VxeTableMxRef: any;
+  /**
+   * @description 详情页主表数据
+   */
+  softBed: any;
+  /**
+   * @description 详情页主表明细数据
+   */
+  softBedMx: any[];
+  /**
+   * @description 详情页主表明细数据-床头
+   */
+  headBoardMx: any[];
+  /**
+   * @description 详情页主表明细数据-床头柜
+   */
+  nightStandMx: any[];
+  /**
+   * @description 详情页主表明细数据-床架
+   */
+  bedFrameMx: any[];
 }
 
 /**
@@ -28,13 +49,162 @@ export const useHooks = (t?: any) => {
     orderStatus: "",
     VxeTableRef: null,
     LjDetailRef: null,
-    VxeTableMxRef: null
+    VxeTableMxRef: null,
+    softBed: null,
+    softBedMx: null,
+    headBoardMx: null,
+    nightStandMx: null,
+    bedFrameMx: null
   });
   // 表格配置项
-  const columns: ColumnProps<any>[] = [];
+  const columns: ColumnProps<any>[] = [
+    {
+      field: "pid",
+      title: "序"
+    },
+    {
+      field: "softbed_code",
+      title: "软床报价编码"
+    },
+    {
+      field: "softbed_name",
+      title: "软床报价名称"
+    },
+    {
+      field: "deptid",
+      title: "部门"
+    },
+    {
+      field: "flag",
+      title: "审核"
+    },
+    {
+      field: "create_date",
+      title: "报价日期"
+    },
+    {
+      field: "create_emp",
+      title: "报价人"
+    },
+    {
+      field: "mtrlmode",
+      title: "物料规格"
+    },
+    {
+      field: "mtrltype",
+      title: "物料类别"
+    },
+    {
+      field: "has_headboard",
+      title: "床头"
+    },
+    {
+      field: "has_nightstand",
+      title: "床头柜"
+    },
+    {
+      field: "has_bedframe",
+      title: "床架"
+    },
+    {
+      field: "is_template",
+      title: "模板报价"
+    },
+    {
+      field: "template_code",
+      title: "模板编号"
+    },
+    {
+      field: "template_name",
+      title: "模板名称"
+    },
+    {
+      field: "commission",
+      title: "佣金"
+    },
+    {
+      field: "taxes",
+      title: "税金"
+    },
+    {
+      field: "other_rate",
+      title: "额外点数"
+    },
+    {
+      field: "extras_cost",
+      title: "额外费用"
+    },
+    {
+      field: "moneyrate",
+      title: "汇率"
+    },
+    {
+      field: "dscrp",
+      title: "备注"
+    },
+    {
+      field: "costamt",
+      title: "报价金额"
+    },
+    {
+      field: "nottax_factory_cost",
+      title: "不含税出厂价"
+    },
+    {
+      field: "nottax_dept_cost",
+      title: "部门售价(不含税)"
+    },
+    {
+      field: "dept_cost",
+      title: "部门含税价"
+    },
+    {
+      field: "foreign_cost",
+      title: "外币价"
+    },
+    {
+      field: "audit_date",
+      title: "审核日期"
+    },
+    {
+      field: "audit_emp",
+      title: "审核人"
+    },
+    {
+      field: "update_date",
+      title: "更新日期"
+    },
+    {
+      field: "update_emp",
+      title: "更新人"
+    }
+  ];
+  // 明细表格配置项
+  const columnsMx: ColumnProps<any>[] = [];
+
+  /**
+   * 详细页获取数据
+   */
+  const detail_getData = async (params: any) => {
+    const result = await GetSoftBedMxList(params);
+    detail_dataCallback(result);
+  };
+
+  const detail_dataCallback = (data: any) => {
+    if (data.softbed && data.softbed.softbed_id > 0) {
+      state.softBed = [data.softbed];
+    }
+
+    state.softBedMx = data.mxList;
+    state.headBoardMx = data.mxList.filter(item => item.has_type === 1);
+    state.nightStandMx = data.mxList.filter(item => item.has_type === 2);
+    state.bedFrameMx = data.mxList.filter(item => item.has_type === 4);
+  };
 
   return {
     ...toRefs(state),
-    columns
+    columns,
+    columnsMx,
+    detail_getData
   };
 };

+ 0 - 1
JLHWEB/src/views/quote/softbedQuote/index.vue

@@ -53,7 +53,6 @@ import mittBus from "@/utils/mittBus";
 import { MittEnum } from "@/enums/mittEnum";
 import { getCurrentRecords } from "@/utils/index";
 import BedConfigModal from "./components/BedConfigModal.vue";
-import dialog from "@/utils/dialog";
 
 const { t } = useI18n();
 const router = useRouter();