Browse Source

补充提交

JohnnyChan 6 months ago
parent
commit
5c292ba511

+ 1 - 1
JLHWEB/.env

@@ -4,7 +4,7 @@ VITE_GLOB_APP_TITLE = 核价系统
 VITE_GLOB_PRODUCT_CODE = JLH_WEB
 
 # 本地运行端口号
-VITE_PORT = 8990
+VITE_PORT = 7700
 
 # 启动时自动打开浏览器
 VITE_OPEN = false

+ 1 - 1
JLHWEB/package.json

@@ -23,7 +23,7 @@
     "serve": "vite",
     "build:dev": "vue-tsc && vite build --mode development",
     "build:test": "vue-tsc && vite build --mode test",
-    "build:pro": "vue-tsc && vite build --mode production",
+    "build:pro": "vite build --mode production",
     "type:check": "vue-tsc --noEmit --skipLibCheck",
     "preview": "npm run build:dev && vite preview",
     "lint:eslint": "eslint --ext .js,.ts,.vue ./src",

+ 0 - 44
JLHWEB/src/components/Selector/Cust/Dialog-demo.vue

@@ -1,44 +0,0 @@
-<template>
-  <el-dialog v-model="dialogVisible" title="测试函数式弹窗" width="50%" draggable overflow>
-    <span>{{ props.content }}</span>
-    <template #footer>
-      <span class="dialog-footer">
-        <el-button @click="handleCancel">Cancel</el-button>
-        <el-button type="primary" @click="handleSubmit"> Submit </el-button>
-      </span>
-    </template>
-  </el-dialog>
-</template>
-
-<script lang="ts" setup name="SelectorCustDialog">
-import { reactive, toRefs } from "vue";
-import LjVxeTable from "@/components/LjVxeTable/index.vue";
-// 注意: 需要按需引入使用到的第三方UI组件
-import { ElDialog, ElButton } from "element-plus";
-const props = withDefaults(
-  defineProps<{
-    show?: boolean; // moadl开关
-    content?: string; // 内容
-  }>(),
-  {}
-);
-const emits = defineEmits(["submit", "cancel"]);
-const state = reactive({
-  dialogVisible: props.show
-});
-const { dialogVisible } = toRefs(state);
-/** submit */
-const handleSubmit = () => {
-  // 回调
-  emits("submit", { action: "submit", msg: "submit back" });
-  // 关闭弹窗
-  dialogVisible.value = false;
-};
-/** cancel */
-const handleCancel = () => {
-  // 回调
-  emits("cancel", { action: "cancel", msg: "cancel back" });
-  // 关闭弹窗
-  dialogVisible.value = false;
-};
-</script>

+ 0 - 332
JLHWEB/src/components/Selector/Cust/Dialog.vue

@@ -1,332 +0,0 @@
-<template>
-  <!-- <el-dialog v-model="dialogVisible" title="测试函数式弹窗" width="50%" draggable overflow :closed="closed"> -->
-  <LjDialog
-    ref="LjDrawerFjFileRef"
-    v-bind="{
-      ...drawerDefineProp
-    }"
-    :modal="false"
-    :style="{ height: '60%' }"
-  >
-    <template #header>
-      <div class="flx-1">
-        <span class="text-h5-b">{{ $t("business.selector.cust.title") }}</span>
-      </div>
-    </template>
-    <div class="flx-col h-full">
-      <LjHeaderMenu :update="dialogVisible" :data="initParams" :action="action" />
-      <LjFoldLayoutDouble v-bind="layoutDefault" class="flx-1">
-        <template #firstLeft>
-          <TreeFilter id="value" label="text" :expand-on-click-node="true" :request-api="getCusarea" @change="changeTreeFilter" />
-        </template>
-        <template #secondMain>
-          <div class="flx h-full">
-            <div class="flx-col w-full">
-              <LjVxeTable
-                row-key="key"
-                :columns="columns"
-                :request-api="getData"
-                :data-callback="dataCallback"
-                :init-param="initParams"
-                :dwname="DwnameEnum.custCrm"
-                pagination
-                :table-events="tableEvents"
-                :table-props="tableProps"
-                :tool-button="['refresh', 'setting', 'search']"
-                :auto-load-layout="false"
-                collapse-buttons
-              >
-                <!-- <template #tableHeader>
-                <UploadWidget :params="initParams" :limit="props.limit" @uploaded="autoUploaded">
-                  <template #default="scope">
-                    <el-button
-                      v-if="addPower && CheckPower(addPower)"
-                      type="primary"
-                      :plain="selectList.length > 0"
-                      @click="scope.show"
-                    >
-                      <template #icon>
-                        <i class="iconfont iconupload-01"></i>
-                      </template>
-                      {{ $t("common.uploadFile") }}
-                    </el-button>
-                  </template>
-                </UploadWidget>
-                <el-button
-                  v-if="powerList.includes('save')"
-                  :disabled="!selectList.length"
-                  type="primary"
-                  :plain="!selectList.length"
-                  @click="downloadRowEvent(selectList)"
-                >
-                  <template #icon>
-                    <i class="iconfont icondownload-01"></i>
-                  </template>
-                  <span class="text-body-c">{{ `${$t("common.download")}${selectSize ? "(" + selectSize + ")" : ""}` }}</span>
-                </el-button>
-                <el-button
-                  v-if="powerList.includes('del')"
-                  :disabled="!selectList.length"
-                  type="danger"
-                  plain
-                  @click="delRowEvent(selectList)"
-                >
-                  <template #icon>
-                    <i class="iconfont icontrash-02"></i>
-                  </template>
-                  <span class="text-body-c">{{ `${$t("common.delText")}(${selectList.length})` }}</span>
-                </el-button>
-              </template>
-              <template #operation="scope" v-if="powerList.includes('edit') || powerList.includes('del')">
-                <template v-if="isActiveStatus(scope.row)">
-                  <el-button type="success" plain circle size="small" @click="saveRowEvent(scope.row)">
-                    <template #icon>
-                      <i class="iconfont iconsave-01" style="font-size: 12px"></i>
-                    </template>
-                  </el-button>
-                  <el-button type="info" plain circle size="small" @click="cancelRowEvent(scope.row)">
-                    <template #icon>
-                      <i class="iconfont iconwrong_light" style="font-size: 12px"></i>
-                    </template>
-                  </el-button>
-                </template>
-                <template v-else>
-                  <el-button type="primary" plain circle size="small" @click="editRowEvent(scope.row)">
-                    <template #icon>
-                      <i class="iconfont iconedit-02" style="font-size: 12px"></i>
-                    </template>
-                  </el-button>
-                  <el-popconfirm :title="$t('business.tips.file.delConfirm')" @confirm="delRowEvent(scope.row)">
-                    <template #reference>
-                      <el-button type="danger" plain circle size="small">
-                        <template #icon>
-                          <i class="iconfont icontrash-02" style="font-size: 12px"></i>
-                        </template>
-                      </el-button>
-                    </template>
-                  </el-popconfirm>
-                </template>
-              </template> -->
-              </LjVxeTable>
-            </div>
-          </div>
-        </template>
-      </LjFoldLayoutDouble>
-    </div>
-    <!-- <template #footer>
-      <span class="dialog-footer">
-        <el-button @click="handleCancel">{{ $t("common.cancelText") }}</el-button>
-        <el-button type="primary" @click="handleSubmit"> {{ $t("common.okText") }} </el-button>
-      </span>
-    </template> -->
-    <!-- </el-dialog> -->
-  </LjDialog>
-</template>
-
-<script lang="tsx" setup name="SelectorCustDialog">
-import { reactive, toRefs, ref, onMounted, nextTick, inject, watch } from "vue";
-import LjDialog from "@/components/LjDialog/index.vue";
-import LjFoldLayoutDouble from "@/components/LjFoldLayoutDouble/index.vue";
-import LjVxeTable from "@/components/LjVxeTable/index.vue";
-// 注意: 需要按需引入使用到的第三方UI组件
-import { ElDialog, ElButton } from "element-plus";
-
-import { getL1Cusarea } from "@/api/modules/saletask";
-import TreeFilter from "@/components/TreeFilter/index.vue";
-import { useCust } from "@/views/saletask/cust/hooks/index";
-import { useI18n } from "vue-i18n";
-import { DwnameEnum } from "@/enums/dwnameEnum";
-import { cloneDeep, pick, defaultsDeep } from "lodash-es";
-import { CommonDynamicSelect } from "@/api/modules/common";
-import LjHeaderMenu from "@/components/LjHeaderMenu/index.vue";
-import { useAuthButtons } from "@/hooks/useAuthButtons";
-import { detailAction } from "@/components/LjDetail/interface";
-
-const props = withDefaults(
-  defineProps<{
-    // show?: boolean; // moadl开关
-    content?: string; // 内容
-    closed?: () => any;
-  }>(),
-  {}
-);
-
-const { t } = useI18n();
-const { columns } = useCust(t);
-const LjDrawerFjFileRef = ref();
-const { CheckPower, CheckOption, buttonNew, buttonDefault } = useAuthButtons(t);
-/*
- * @description 抽屉默认属性
- */
-const drawerDefineProp = {
-  draggable: true,
-  overflow: true,
-  width: "60%",
-  modalClass: "lj-file-dialog"
-};
-
-const initParams = ref({ cusareaid: -1, cusareaidarry: [] });
-const tableProps = {
-  height: "auto",
-  editConfig: { trigger: "click", mode: "cell" }
-  // rowClassName: rowClsNameFunc
-};
-// 返回绑定的事件
-const tableEvents = {
-  // "cell-dblclick": handleDBlClickTable,
-  // "cell-click": handleClickTable
-};
-
-/**
- * @description 修改时,按钮展示
- */
-const action: detailAction[] = [
-  buttonDefault({
-    label: t("common.cancelText"),
-    icon: "iconchevron-left",
-    clickFunc: item => {
-      // if (route.path.indexOf("/new") > -1) {
-      //   tabRemove(route.fullPath);
-      //   router.replace("/saletask/sale/saletaskCrm");
-      // } else {
-      //   router.replace(
-      //     `/saletask/sale/saletaskCrm/detail?scid=${LjDetailRef.value._mainData.scid}&taskid=${LjDetailRef.value._mainData.taskid}&code=${LjDetailRef.value._mainData.taskcode}`
-      //   );
-      // }
-    }
-  }),
-  buttonDefault({
-    label: t("common.saveText"),
-    icon: "iconsave-01",
-    path: "/saletask/sale/saletaskCrm/new"
-  })
-];
-
-const dataCallback = (data: any) => {
-  console.log("data :>> ", data);
-  return {
-    list: data.datatable,
-    tableinfo: data.tableinfo,
-    total: data.totalcnt,
-    pageNum: data.pageindex,
-    pageSize: data.pagesize
-  };
-};
-
-const getData = (params: any) => {
-  console.log("getData params :>> ", params);
-  let newParams: any = {};
-  params.pageNum && (newParams.pageindex = params.pageNum);
-  params.pageSize && (newParams.pagesize = params.pageSize);
-  // // inusescid = 0;
-  // params.quoteid = params.lastOutware[0];
-  // params.inuse = 4;
-  // params.cusareaid = [1, 2, 3];
-
-  // params.cusareaidarry = [23];
-  delete params.lastOutware;
-  delete params.pageNum;
-  delete params.pageSize;
-  newParams.queryParams = params;
-  console.log("params :>> ", params);
-  newParams.dsname = "web_cust_crm_index";
-
-  return CommonDynamicSelect(newParams, DwnameEnum.custCrm);
-  // return [];
-};
-
-const emits = defineEmits(["update:show", "submit", "cancel"]);
-const dialogVisible = ref(false);
-// const state = reactive({
-//   dialogVisible: false
-// });
-// const { dialogVisible } = toRefs(state);
-// onMounted(() => {
-//   nextTick(() => {
-//     dialogVisible.value = props.show;
-//   });
-// });
-// watch(
-//   () => props.show,
-//   newVal => {
-//     console.log("watch show newVal :>> ", newVal);
-//     dialogVisible.value = newVal;
-//   },
-// );
-const show = (params: any) => {
-  initParams.value = defaultsDeep(params, initParams.value);
-  LjDrawerFjFileRef.value.show();
-
-  nextTick(() => {
-    dialogVisible.value = true;
-  });
-};
-/** submit */
-const handleSubmit = () => {
-  // 回调
-  emits("submit", { action: "submit", msg: "submit back" });
-  // 关闭弹窗
-  // props.closed && props.closed();
-  LjDrawerFjFileRef.value.hide();
-  dialogVisible.value = false;
-};
-/** cancel */
-const handleCancel = () => {
-  // 回调
-  emits("cancel", { action: "cancel", msg: "cancel back" });
-  // 关闭弹窗
-  // props.closed && props.closed();
-  LjDrawerFjFileRef.value.hide();
-  dialogVisible.value = false;
-};
-
-const layoutDefault: any = {
-  first: {
-    left: {
-      minWidth: "0"
-      // minWidth: "20%"
-    }
-  },
-  params: {}
-};
-const getCusarea = async () => {
-  const data = await getL1Cusarea({ RecurionType: 1 });
-  return data.RecurionList;
-};
-
-// const cusareaid = ref(0);
-// const cusareaidarry = ref([]);
-
-const getChildNode = (nodes: any) => {
-  let arr: any = [];
-  arr.push(nodes.value);
-  if (nodes.children) {
-    console.log("nodes.children :>> ", nodes.children);
-    nodes.children.map((item: any) => {
-      if (item.children) {
-        let arr1 = getChildNode(item);
-        arr = arr.concat(arr1);
-      } else {
-        arr.push(item.value);
-      }
-    });
-  }
-  return arr;
-};
-
-const changeTreeFilter = (val: any) => {
-  console.log("val :>> ", val);
-  // alert(getCheckedNodes());
-  //proTable.value!.pageable.pageNum = 1;
-  // cusareaid.value = val.children ?? [];
-  initParams.value.cusareaid = val.value ?? -1;
-  // 访问当前选中节点的下级节点数值
-  initParams.value.cusareaidarry = getChildNode(val);
-  // childrenValues.value.push(val.value);
-  console.log("val :>>Children Values:", initParams.value);
-};
-
-defineExpose({
-  show
-});
-</script>

+ 0 - 144
JLHWEB/src/components/Selector/Cust/Select.vue

@@ -1,144 +0,0 @@
-<template>
-  <el-select
-    ref="locationAutocompleteRef"
-    v-model="props.value"
-    filterable
-    remote
-    reserve-keyword
-    value-key="cusid"
-    v-bind="$attrs"
-    :loading="loading"
-    :remote-method="remoteMethod"
-    :placeholder="$t('common.table.locationTips')"
-    @change="handleSelect"
-  >
-    <template #prefix>
-      <slot name="prefix">
-        <el-button text bg class="pl-6 pr-6" size="small" :icon="Search" @click="openModal"></el-button>
-      </slot>
-    </template>
-    <template #header>
-      <div class="table-header flx">
-        <div class="flx-1 pr-4">{{ $t("table.u_cust.cuscode") }}</div>
-        <div class="flx-1 pr-4">{{ $t("table.u_cust.name") }}</div>
-        <div class="flx-1 pr-4">{{ $t("table.u_cust.simplename") }}</div>
-        <div class="flx-1 pr-4">{{ $t("table.u_cust.rep") }}</div>
-      </div>
-      <!-- <table>
-        <thead>
-          <tr>
-            <th>{{ $t("table.u_cust.cuscode") }}</th>
-            <th>{{ $t("table.u_cust.name") }}</th>
-            <th>{{ $t("table.u_cust.simplename") }}</th>
-            <th>{{ $t("table.u_cust.rep") }}</th>
-          </tr>
-        </thead>
-      </table> -->
-    </template>
-    <el-option v-for="item in options" :key="item.cusid" :label="item.cuscode" :value="item" class="flx pl-10 pr-10">
-      <div class="flx-1 pr-4">{{ item.cuscode }}</div>
-      <div class="flx-1 pr-4 text-ellipsis-one" :title="item.name">{{ item.name }}</div>
-      <div class="flx-1 pr-4 text-ellipsis-one">{{ item.simplename }}</div>
-      <div class="flx-1 pr-4 text-ellipsis-one">{{ item.rep }}</div>
-    </el-option>
-    <template #footer>321</template>
-  </el-select>
-</template>
-
-<script lang="ts" setup name="SelectorCustSelect">
-import { ref } from "vue";
-import { Search } from "@element-plus/icons-vue";
-import { CommonDynamicSelect } from "@/api/modules/common";
-import { DwnameEnum } from "@/enums/dwnameEnum";
-
-interface ProTableProps {
-  value: any;
-  enumMap?: Map<string, { [key: string]: any }[]>;
-  // updateColumns: Function;
-  // search: (params: any) => void; // 搜索方法
-  // reset: (params: any) => void; // 重置方法
-  [key: string]: any;
-}
-
-// 默认值
-const props = withDefaults(defineProps<ProTableProps>(), {});
-const emit = defineEmits(["select", "update:value", "openModal"]);
-const loading = ref(false);
-
-const options = ref<any[]>([]);
-
-/**
- * @description 定位行/列
- */
-//  const locationQuerySearch = (queryString: string, cb: any) => {
-//   let _query = queryString.toLowerCase();
-//   const results = queryString ? pinyinFilter(_query, tableColumns.value, ["title", "field"]) : tableColumns.value;
-//   console.log("results :>> ", results);
-
-//   cb(results);
-// };
-
-const remoteMethod = async (queryString: string, cb: (arg: any) => void) => {
-  // let results: any = [];
-  loading.value = true;
-
-  let newParams: any = {};
-  // params.pageNum && (newParams.pageindex = params.pageNum);
-  // params.pageSize && (newParams.pagesize = params.pageSize);
-  // // inusescid = 0;
-  // params.quoteid = params.lastOutware[0];
-  // params.inuse = 4;
-  // params.cusareaid = [1, 2, 3];
-
-  // params.cusareaidarry = [23];
-  // delete params.lastOutware;
-  // delete params.pageNum;
-  // delete params.pageSize;
-  newParams.pageindex = 1;
-  newParams.pagesize = 5;
-  newParams.queryParams = {
-    // cusid: queryString
-    cuscode: queryString
-    // cusname: props.value
-  };
-  newParams.dsname = "web_cust_crm_index";
-  let result = await CommonDynamicSelect(newParams, DwnameEnum.custCrm);
-
-  options.value = result.datatable.map(item => {
-    item.label = item.cuscode;
-    return item;
-  });
-
-  loading.value = false;
-  // return {
-  //   list: data.datatable,
-  //   tableinfo: data.tableinfo,
-  //   total: data.totalcnt,
-  //   pageNum: data.pageindex,
-  //   pageSize: data.pagesize
-  // };
-};
-
-const handleSelect = (item: any) => {
-  emit("select", item);
-};
-
-const openModal = (e: any) => {
-  emit("openModal", e);
-};
-</script>
-
-<style lang="scss">
-.el-select-dropdown__list {
-  .el-select-dropdown__item {
-    &:nth-child(2n) {
-      background-color: $color-gray-2;
-    }
-
-    &.hover,
-    &:hover {
-      background-color: $color-primary-200 !important;
-    }
-  }
-}
-</style>

+ 3 - 2
JLHWEB/src/views/system/selector/cust/index.vue

@@ -55,7 +55,7 @@ import LjVxeTable from "@/components/LjVxeTable/index.vue";
 
 import { getL1Cusarea } from "@/api/modules/saletask";
 import TreeFilter from "@/components/TreeFilter/index.vue";
-import { useCust } from "@/views/saletask/cust/hooks/index";
+// import { useCust } from "@/views/saletask/cust/hooks/index";
 import { useI18n } from "vue-i18n";
 import { DwnameEnum } from "@/enums/dwnameEnum";
 import { cloneDeep, pick, defaultsDeep } from "lodash-es";
@@ -70,7 +70,8 @@ import LjSelector from "@/components/LjSelector/index.vue";
 // const props = withDefaults(defineProps<{}>(), {});
 
 const { t } = useI18n();
-const { columns } = useCust(t);
+// const { columns } = useCust(t);
+const columns = {};
 const selColumns: any = computed(() => {
   // let selCol: any = { type: "checkbox", width: 50, fixed: "left" };
   let selCol: any = { type: "radio", width: 50, fixed: "left" };

+ 1 - 1
JLHWEB/src/views/system/selector/mtrlwareSaletask/index.vue

@@ -189,7 +189,7 @@ import type { CascaderProps } from "element-plus";
 import { getL1MtrlType } from "@/api/modules/technology";
 import TreeFilter from "@/components/TreeFilter/index.vue";
 import CascaderFilter from "@/components/TreeFilter/cascader.vue";
-import { useCust } from "@/views/saletask/cust/hooks/index";
+// import { useCust } from "@/views/saletask/cust/hooks/index";
 import { useI18n } from "vue-i18n";
 import { DwnameEnum } from "@/enums/dwnameEnum";
 import { cloneDeep, pick, defaultsDeep } from "lodash-es";

File diff suppressed because it is too large
+ 0 - 344
JLHWEB/vite.config.ts.timestamp-1687006113588-824f06654acd.mjs


File diff suppressed because it is too large
+ 0 - 364
JLHWEB/vite.config.ts.timestamp-1689726976867-40eebfe7c2833.mjs