Explorar o código

JLHWEB: 补充提交

JohnnyChan hai 3 días
pai
achega
5e68ab21a0

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

@@ -183,3 +183,10 @@ export const GetMattressSubspecs = (params: Mattress.ReqRefreshMattressInterface
 export const GetResetWiptype = (params: Mattress.ReqGetResetWiptype) => {
   return http.post<Mattress.ReqGetResetWiptype>(PORT1 + `/GetResetWiptype`, params);
 };
+
+/**
+ * @name 同步L1基础信息
+ */
+export const UpdateL1Basicinfo = () => {
+  return http.post(PORT1 + `/UpdateL1Basicinfo`, {});
+};

+ 7 - 4
JLHWEB/src/components/TreeFilter/index.vue

@@ -1,8 +1,11 @@
 <template>
-  <div class="filter" :class="wrapperCls">
-    <h4 class="title sle" v-if="title">{{ title }}</h4>
-    <el-input v-if="searchable" v-model="filterText" placeholder="输入关键字进行过滤" clearable :suffix-icon="Search" />
-    <el-scrollbar :style="{ height: title ? `calc(100% - 95px)` : `calc(100% - 56px)` }">
+  <div class="filter flx-col" :class="wrapperCls">
+    <div class="flx-shrink">
+      <h4 class="title sle" v-if="title">{{ title }}</h4>
+      <el-input v-if="searchable" v-model="filterText" placeholder="输入关键字进行过滤" clearable :suffix-icon="Search" />
+    </div>
+    <!-- <el-scrollbar :style="{ height: title ? `calc(100% - 95px)` : `calc(100% - 56px)` }"> -->
+    <el-scrollbar>
       <el-tree
         ref="treeRef"
         :default-expand-all="defaultExpandAll"

+ 25 - 0
JLHWEB/src/views/baseinfo/bednetvar/hooks/index.tsx

@@ -110,6 +110,31 @@ export const useHooks = (t: any, handleSelMxData: (params: any) => any) => {
         editable: ALLOW_EDIT_STATE
       }
     },
+    {
+      field: "ifmxformula",
+      title: "是否属于明细计算",
+      basicinfo: {
+        span: 2,
+        editable: ALLOW_EDIT_STATE,
+        editvisible: (scope: any) => {
+          if (ALLOW_EDIT_STATE.includes(scope.status) && Number(scope.searchParam.varclass) > 1) {
+            return true;
+          }
+          return false;
+        },
+        render: (scope: any) => {
+          const { column, searchParam } = scope;
+
+          return (
+            <>
+              <div class="flx-align-center">
+                <el-checkbox v-model={searchParam[column.field]} true-value={1} false-value={0} />
+              </div>
+            </>
+          );
+        }
+      }
+    },
     {
       field: "dscrp",
       title: "备注",

+ 1 - 0
JLHWEB/src/views/baseinfo/bednetvar/index.vue

@@ -150,6 +150,7 @@ const orderEditAction = [
     clickFunc: item => {
       const save_data = LjDetailRef.value?._mainData;
       save_data.varkind = initParams.value.varkind;
+      save_data.ifmxformula = Number(save_data?.ifmxformula ?? 0);
 
       save_data.mxlist = VxeTableMxRef.value?.tableData;
       fSave({ bednetvar: save_data }).then(() => {

+ 3 - 1
JLHWEB/src/views/baseinfo/mtrldef/components/ImportPrice.vue

@@ -41,7 +41,7 @@ const props = withDefaults(defineProps<UploadWidgetProps>(), {
   limit: 1
 });
 
-const emit = defineEmits(["uploaded"]);
+const emit = defineEmits(["uploaded", "closed"]);
 const basedata = ref();
 const fileList = ref([]);
 // const popoverRef = ref();
@@ -69,6 +69,8 @@ const afterReader = async (data: any) => {
   successStatus.value = true;
   setTimeout(() => {
     DialogRef.value.hide();
+
+    emit("closed");
   }, 500);
   //   closeTimer.value = setInterval(() => {
   //     toCloseTime.value--;

+ 12 - 3
JLHWEB/src/views/baseinfo/mtrldef/hooks/index.tsx

@@ -31,6 +31,7 @@ interface defaultState {
   priceListFormVisiable: boolean;
   priceListFormParams: any;
   priceListVisiable: boolean;
+  initParams: any;
 }
 
 const state = reactive<defaultState>({
@@ -99,7 +100,8 @@ const state = reactive<defaultState>({
     pricelistid_to: 0 as number,
     rate: 1 as number
   },
-  priceListVisiable: false
+  priceListVisiable: false,
+  initParams: { mtrltypeids: undefined as Number[] }
 });
 /**
  * @description 表格多选数据操作
@@ -124,6 +126,10 @@ export const useHooks = (t?: any) => {
         el: "input",
         span: 2,
         editable: ALLOW_EDIT_STATE
+      },
+      search: {
+        el: "input",
+        key: "keyword"
       }
     },
     {
@@ -339,9 +345,12 @@ export const useHooks = (t?: any) => {
         key: "pricelistid",
         props: {
           clearable: false,
-          filterable: false,
           defaultFirstOption: true,
-          remote: true
+          remote: true,
+          filterable: true,
+          onChange: val => {
+            state.initParams.pricelistid = val;
+          }
         },
         defaultValue: 12
       },

+ 10 - 4
JLHWEB/src/views/baseinfo/mtrldef/index.vue

@@ -5,8 +5,8 @@
         <TreeFilter
           ref="LjTreeRef"
           id="mtrltypeid"
+          title="物料分类"
           label="mtrltype"
-          :searchable="false"
           :expand-on-click-node="true"
           :request-api="gMtrltypeList"
           @change="changeTreeFilter"
@@ -116,7 +116,7 @@
       </div>
     </template>
   </el-dialog>
-  <ImportPrice ref="ImportPriceRef" />
+  <ImportPrice ref="ImportPriceRef" @closed="toGetPriceList" />
 </template>
 
 <script setup lang="ts" name="baseinfo_mtrldeflist">
@@ -135,11 +135,12 @@ import { traverseNode } from "@/utils/index";
 import { ElMessage, ElMessageBox } from "element-plus";
 import { getCurrentRecords } from "@/utils/index";
 import ImportPrice from "./components/ImportPrice.vue";
+import TreeFilter from "@/components/TreeFilter/index.vue";
 
 const dwname = "web_mtrldeflist";
 const mainData = ref({});
 const mtrltype = ref({});
-const initParams = ref({ mtrltypeids: undefined as Number[] });
+// const initParams = ref({ mtrltypeids: undefined as Number[] });
 const tableProps = {
   height: "auto",
   editConfig: { trigger: "click", mode: "cell" }
@@ -173,7 +174,8 @@ const {
   priceListEnum,
   priceListFormVisiable,
   priceListFormParams,
-  priceListVisiable
+  priceListVisiable,
+  initParams
 } = useHooks(t);
 const { gMtrltypeList } = useHooks_mtrltype(t);
 const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
@@ -418,4 +420,8 @@ const tableEvents = {
   "cell-dblclick": handleDBlClickTable
   // "cell-click": handleClickTable
 };
+
+const toGetPriceList = () => {
+  VxeTableRef.value.refresh();
+};
 </script>

+ 16 - 0
JLHWEB/src/views/baseinfo/mtrltype/hooks/index.tsx

@@ -162,6 +162,22 @@ export const useHooks = (t?: any) => {
   const gMtrltypeList = async () => {
     const data = await getMtrlType();
 
+    let arr = data.reList;
+    arr.unshift({
+      value: -1,
+      text: "全部",
+      data: {
+        mtrltypeid: -1,
+        typecode: "",
+        mtrltype: "全部",
+        inuse: 1,
+        parentid: 0,
+        dannum1_rate: 0,
+        dannum2_rate: 0,
+        dannum3_rate: 0,
+        dannum4_rate: 0
+      }
+    });
     return transformTreeData(data.reList);
   };