Bladeren bron

JLHWEB: 1、床垫清单,优化复制清单的床垫报价弹窗

JohnnyChan 22 uur geleden
bovenliggende
commit
cb9c5957ff

+ 46 - 8
JLHWEB/src/views/system/selector/mattress/hooks/index.tsx

@@ -3,38 +3,66 @@ import type { uSale } from "@/typings/modules/sale";
 import { Table } from "@/hooks/interface/index";
 import { useUserStore } from "@/stores/modules/user";
 import { floatSub, floatAdd, floatMul, floatDiv, formatFixedNumber } from "@/utils/index";
+import { reactive, toRefs } from "vue";
 
 export const useOutrep = (t: any) => {
+  const state = reactive<any>({
+    initParams: {}
+  });
   // 表格配置项
   const columns: ColumnProps<any>[] = [
     { title: "#", field: "pid", fixed: "left", width: 80 },
     {
       field: "yw_flag",
-      title: "业务审核"
+      title: "业务审核",
+      datatype: "checkbox"
     },
     {
       field: "js1_flag",
-      title: "产品补充审核"
+      title: "产品补充审核",
+      datatype: "checkbox"
     },
     {
       field: "js2_flag",
-      title: "清单补充审核"
+      title: "清单补充审核",
+      datatype: "checkbox"
     },
     {
       field: "creatmtrl_flag",
-      title: "生成L1产品"
+      title: "生成L1产品",
+      datatype: "checkbox"
     },
     {
       field: "creatmtrlqd_flag",
-      title: "生成L1清单"
+      title: "生成L1清单",
+      datatype: "checkbox"
     },
     {
       field: "erp_mtrlcode",
-      title: "L1物料编码"
+      title: "L1物料编码",
+      search: {
+        el: "input",
+        key: "arg_erp_mtrlcode",
+        props: {
+          placeholder: "L1物料编码"
+        },
+        order: 0
+      }
     },
     {
       field: "deptid",
-      title: "部门"
+      title: "部门",
+      search: {
+        el: "select",
+        key: "arg_deptid",
+        props: {
+          filterable: true,
+          onChange: val => {
+            state.initParams.arg_deptid = val;
+          }
+        },
+        order: 1
+      }
     },
     {
       field: "mattresscode",
@@ -46,7 +74,16 @@ export const useOutrep = (t: any) => {
     },
     {
       field: "mattressname",
-      title: "床垫名称"
+      title: "床垫名称",
+      search: {
+        el: "input",
+        key: "arg_search",
+        titleKey: "searchKw",
+        props: {
+          placeholder: "唯一码/编码/名称"
+        },
+        order: 0
+      }
     },
     {
       field: "mattresstypeid",
@@ -148,6 +185,7 @@ export const useOutrep = (t: any) => {
   ];
 
   return {
+    ...toRefs(state),
     columns
   };
 };

+ 5 - 5
JLHWEB/src/views/system/selector/mattress/index.vue

@@ -55,7 +55,7 @@ import { Search } from "@element-plus/icons-vue";
 // const props = withDefaults(defineProps<{}>(), {});
 
 const { t } = useI18n();
-const { columns } = useOutrep(t);
+const { columns, initParams } = useOutrep(t);
 const selColumns: any = computed(() => {
   // let selCol: any = { type: "checkbox", width: 50, fixed: "left" };
   let selCol: any = { type: "radio", width: 50, fixed: "left" };
@@ -78,7 +78,7 @@ const LjTableRef = ref();
 // const _variables: any = variables;
 const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
 
-const initParams = ref<any>({});
+// const initParams = ref<any>({});
 const searchInput = ref("");
 const tableSearchCol = { xs: 4, sm: 5, md: 6, lg: 6, xl: 8 };
 const tableProps = {
@@ -131,17 +131,17 @@ const dataCallback = (data: any) => {
 };
 
 const getData = (params: any) => {
-  // console.log("getData params :>> ", params);
+  console.log("getData params :>> ", params);
   let newParams: any = {};
   params.pageNum && (newParams.pageindex = params.pageNum);
   params.pageSize && (newParams.pagesize = params.pageSize);
 
   delete params.pageNum;
   delete params.pageSize;
-  newParams.queryParams = initParams.value;
+  newParams.queryParams = params;
   console.log("params :>> ", newParams);
   newParams.dsname = "web_mattress_choose";
-  return CommonDynamicSelect(newParams, DwnameEnum.mtrlPrice);
+  return CommonDynamicSelect(newParams, DwnameEnum.mattressQuote);
 };
 
 const autoUpdateTableCheckbox = () => {