liubp
2025-11-04 64f689012a78149a609bacc839128558252e9fba
bug修复
13个文件已修改
1 文件已重命名
293 ■■■■ 已修改文件
src/views/ContractCW/Contract.data.ts 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/contractDL/Contract.data.ts 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/contractDL/ContractList.vue 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/copywriting/generated/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/copywritingUp/CopywritingUpList.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/demo/page/desc/basicshenhe/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/demo/page/desc/basicyuyici/index.vue 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/demo/page/form/stepxieyi/Step2.vue 27 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ranking/rankingOff/RankingOff.data.ts 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ranking/rankingOff/index.vue 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/semanticword/SemanticWord.data.ts 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/semanticwordFP/SemanticWord.data.ts 30 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/semanticwordFP/SemanticWordList.vue 50 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/semanticwordPD/SemanticWord.data.ts 13 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/ContractCW/Contract.data.ts
@@ -1,15 +1,14 @@
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
// 移除未使用的 imports
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
   {
    title: '客户名称',
    align:"center",
    dataIndex: 'customerName'
    dataIndex: 'customerName',
    customRender: ({ record }) => record?.customerName || record?.agentsName
   },
   {
    title: '合同名称',
@@ -42,15 +41,25 @@
    {
      label: "客户名称",
      field: "customerName",
      component: 'Input',
      component: 'JInput',
      //colProps: {span: 6},
     },
  {
    label: "代理商名称",
    field: "agentsName",
    component: 'JInput',
    //colProps: {span: 6},
  },
    {
      label: "审核状态",
      field: "reviewStatus",
      component: 'JSelectMultiple',
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"yuyici_status"
        options: [
          { label: '待审核', value: '1' },
          { label: '已驳回', value: '2' },
          { label: '已通过', value: '3' },
        ]
      },
      //colProps: {span: 6},
     },
src/views/contractDL/Contract.data.ts
@@ -1,10 +1,10 @@
// 此文件基于ContractCW/Contract.data.ts复制,所有路径保留,与DL合同相关字段一致。如需变更后续再优化。
import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
// import { rules} from '/@/utils/helper/validator';
// import { render } from '/@/utils/common/renderUtils';
import {JVxeTypes,JVxeColumn} from '/@/components/jeecg/JVxeTable/types'
import { getWeekMonthQuarterYear } from '/@/utils';
// import { getWeekMonthQuarterYear } from '/@/utils';
//列表数据
export const columns: BasicColumn[] = [
  {
@@ -47,9 +47,9 @@
//查询数据
export const searchFormSchema: FormSchema[] = [
    {
      label: "客户名称",
      field: "customerName",
      component: 'Input',
      label: "代理商名称",
      field: "agentsName",
      component: 'JInput',
      //colProps: {span: 6},
    },
    {
@@ -57,7 +57,12 @@
      field: "reviewStatus",
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"yuyici_status"
          options: [
            { label: '待审核(代理商)', value: '待审核(8)' },
            { label: '待审核', value: '1' },
            { label: '已驳回', value: '2' },
            { label: '已通过', value: '3' },
          ]
      },
      //colProps: {span: 6},
    },
@@ -79,7 +84,12 @@
    field: 'reviewStatus',
    component: 'JDictSelectTag',
    componentProps:{
        dictCode:"yuyici_status"
        options: [
          { label: '待审核(代理商)', value: '待审核(代理商)' },
          { label: '待审核', value: '待审核' },
          { label: '已驳回', value: '已驳回' },
          { label: '已通过', value: '已通过' },
        ]
     },
  },
  {
src/views/contractDL/ContractList.vue
@@ -344,11 +344,11 @@
        onClick: () => router.push({ path: '/page-demo/desc/detailDL', query: { id: record.id } }),
        tooltip: '查看合同详情',
      },
      {
        label: '删除',
        onClick: () => handleDelete(record),
        tooltip: '删除该合同',
      },
      // {
      //   label: '删除',
      //   onClick: () => handleDelete(record),
      //   tooltip: '删除该合同',
      // },
    ];
  }
  const { createConfirm } = useMessage();
src/views/copywriting/generated/index.vue
@@ -59,8 +59,8 @@
      </div>
      <div class="action-buttons">
        <button class="action-btn cancel" @click="handleCancel" :disabled="loading">取消</button>
        <button class="action-btn save" @click="handleSave" :disabled="chengf">保存</button>
        <button class="action-btn submit" @click="handleSubmit" :disabled="fromEdit">提交审核</button>
        <button class="action-btn save" v-if="!chengf" @click="handleSave" :disabled="chengf">保存</button>
        <button class="action-btn submit" v-if="!fromEdit" @click="handleSubmit" :disabled="fromEdit">提交审核</button>
      </div>
    </div>
  </div>
src/views/copywritingUp/CopywritingUpList.vue
@@ -18,7 +18,7 @@
        <a-radio-group v-model:value="outStatus" @change="handleStatusChange">
          <a-radio :value="''">全部</a-radio>
          <a-radio value="1">未发布</a-radio>
          <a-radio value="2">已发版</a-radio>
          <a-radio value="2">已发布</a-radio>
        </a-radio-group>
        
        <div style="color: #666; font-size: 14px;">
src/views/demo/page/desc/basicshenhe/index.vue
@@ -4,8 +4,8 @@
      <a-descriptions title="" :column="3">
        <a-descriptions-item label="合同名称"> {{ formData.contractName || '-' }} </a-descriptions-item>
        <a-descriptions-item label="代理商名称"> {{ formData.agentsName || '-' }} </a-descriptions-item>
        <a-descriptions-item label="客户地址"> {{ formData.customer?.customerAddress || '-' }} </a-descriptions-item>
        <a-descriptions-item label="客户电话"> {{ formData.customer?.customerPhone || '-' }} </a-descriptions-item>
        <!-- <a-descriptions-item label="客户地址"> {{ formData.customer?.customerAddress || '-' }} </a-descriptions-item> -->
        <!-- <a-descriptions-item label="客户电话"> {{ formData.customer?.customerPhone || '-' }} </a-descriptions-item> -->
      </a-descriptions>
    </a-card>
    <a-card title="语义词信息">
src/views/demo/page/desc/basicyuyici/index.vue
@@ -35,7 +35,7 @@
            <a-list :data-source="contractFiles" size="small">
              <template #renderItem="{ item }">
                <a-list-item>
                  <a :href="item.url" target="_blank">{{ item.name }}</a>
                  <a @click="handleDownload(item)">{{ item.name }}</a>
                </a-list-item>
              </template>
            </a-list>
@@ -49,7 +49,7 @@
            <a-list :data-source="attachmentFiles" size="small">
              <template #renderItem="{ item }">
                <a-list-item>
                  <a :href="item.url" target="_blank">{{ item.name }}</a>
                  <a @click="handleDownload(item)">{{ item.name }}</a>
                </a-list-item>
              </template>
            </a-list>
@@ -160,7 +160,7 @@
          formData.endDate = record.endDate || '';
          // 若列表项中包含客户相关信息,则尽可能填充
          formData.customer.enterpriseName = record.enterpriseName || record.customerName || '';
          formData.customer.enterpriseName = record.customerName || record.agentsName || record.enterpriseName || '';
          formData.customer.industry = record.industry || '';
          formData.customer.customerAddress = record.customerAddress || '';
          formData.customer.contactPerson = record.contactPerson || '';
@@ -174,6 +174,7 @@
          const contractId = record?.contract?.id || record?.contractId || record?.contract_id;
          if (contractId) {
            await loadContractInfoById(contractId);
            await loadContractFiles(contractId);
          }
        } catch (e) {
          console.error('加载语义词详情失败:', e);
@@ -206,7 +207,7 @@
          // 客户信息(尽可能从合同记录或其 customer 字段提取)
          const customer = contractRecord.customer || contractRecord;
          formData.customer.enterpriseName = customer.enterpriseName || customer.customerName || formData.customer.enterpriseName;
          formData.customer.enterpriseName = customer.customerName || customer.agentsName || customer.enterpriseName || formData.customer.enterpriseName;
          formData.customer.industry = customer.industry || formData.customer.industry;
          formData.customer.customerAddress = customer.customerAddress || formData.customer.customerAddress;
          formData.customer.contactPerson = customer.contactPerson || formData.customer.contactPerson;
@@ -217,17 +218,73 @@
        }
      };
      // 通过 /contract/contract/queryContractFileByMainId 获取合同文件与附件
      const loadContractFiles = async (id: string | number) => {
        try {
          const result = await defHttp.get({
            url: '/contract/contract/queryContractFileByMainId',
            params: { id },
          });
          if (result && Array.isArray(result)) {
            const contractFileList: any[] = [];
            const attachmentFileList: any[] = [];
            result.forEach((file: any) => {
              const fileItem = {
                uid: file.id,
                name: file.appendixFile || '文件',
                status: 'done',
                url: file.appendixFile,
              };
              if (file.fileType === '合同文件') {
                contractFileList.push(fileItem);
              } else if (file.fileType === '合同附件') {
                attachmentFileList.push(fileItem);
              }
            });
            contractFiles.value = contractFileList;
            attachmentFiles.value = attachmentFileList;
          }
        } catch (e) {
          console.error('加载合同文件失败:', e);
        }
      };
      onMounted(() => {
        loadDataFromSemanticwordList();
      });
      const handleBack = () => router.back();
      // 文件下载
      const handleDownload = (file: any) => {
        if (!file?.url) {
          message.error('文件链接不存在');
          return;
        }
        try {
          const link = document.createElement('a');
          link.href = file.url;
          link.download = file.name || 'download';
          link.style.display = 'none';
          document.body.appendChild(link);
          link.click();
          document.body.removeChild(link);
          message.success('文件下载开始');
        } catch (e) {
          console.error('文件下载失败:', e);
          message.error('文件下载失败');
        }
      };
      return {
        formData,
        contractFiles,
        attachmentFiles,
        semanticWords,
        handleDownload,
        handleBack,
      };
    },
src/views/demo/page/form/stepxieyi/Step2.vue
@@ -11,6 +11,7 @@
  import { getSalesNameById } from './data';
  import { Divider, message } from 'ant-design-vue';
  import dayjs from 'dayjs';
  import { defHttp } from '/@/utils/http/axios';
  export default defineComponent({
    name: 'Step2Form',
@@ -43,6 +44,32 @@
        try {
          const values = await validate();
          // 检查合同名称是否已存在
          if (values.contractName && values.contractName.trim()) {
            try {
              const response = await defHttp.get({
                url: '/contract/contract/list',
                params: {
                  contractName: values.contractName.trim(),
                  pageNo: 1,
                  pageSize: 10,
                }
              });
              // 检查返回结果中是否有数据(兼容多种返回格式)
              const records = response?.records || response?.result?.records || (Array.isArray(response) ? response : []);
              if (records && records.length > 0) {
                message.error('该合同名称已存在,请重新输入');
                return;
              }
            } catch (error) {
              console.error('检查合同名称失败:', error);
              // 如果接口调用失败,阻止继续,避免创建重复合同
              message.warning('无法验证合同名称,请稍后重试');
              return;
            }
          }
          // 解析时间
          let startDate = '';
          let endDate = '';
src/views/ranking/rankingOff/RankingOff.data.ts
src/views/ranking/rankingOff/index.vue
@@ -9,12 +9,12 @@
  </div>
</template>
<script lang="ts" name="semanticword-rankingOn" setup>
<script lang="ts" name="semanticword-rankingOff" setup>
  /* eslint-disable vue/multi-word-component-names */
  import { reactive } from 'vue';
  import { BasicTable } from '/@/components/Table';
  import { useListPage } from '/@/hooks/system/useListPage';
  import { columns, searchFormSchema } from './RankingOn.data';
  import { columns, searchFormSchema } from './RankingOff.data';
  // 使用 semanticWord 列表接口
  import { list as semanticWordList, getExportUrl, getImportUrl } from '/@/views/semanticword/SemanticWord.api';
  import { getDateByPicker } from '/@/utils';
src/views/semanticword/SemanticWord.data.ts
@@ -20,7 +20,10 @@
   {
    title: '驳回原因',
    align:"center",
    dataIndex: 'rejectionReasons'
    dataIndex: 'contract.rejectionReasons',
    customRender: ({ record }) => {
      return record?.contract?.rejectionReasons || '-';
    }
   },
   {
    title: '创建人',
@@ -40,33 +43,39 @@
    {
      label: "语义词",
      field: 'word',
      component: 'Input',
      component: 'JInput',
      //colProps: {span: 6},
     },
    {
      label: "露出词",
      field: 'outWord',
      component: 'Input',
      component: 'JInput',
      //colProps: {span: 6},
     },
    {
      label: "状态",
      field: 'status',
      component: 'JSelectMultiple',
      componentProps:{
          dictCode:"yuyici_status"
      },
      //colProps: {span: 6},
     },
    {
      label: "文案编辑",
      field: 'changer',
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"sys_user,realname,id"
          // 仅保留以下四个状态作为查询选项
          options: [
            { label: '待审核', value: '1' },
            { label: '已通过', value: '3' },
            { label: '已驳回', value: '2' },
            { label: '已上词', value: '5' },
          ]
      },
      //colProps: {span: 6},
     },
    // {
  //     label: "文案编辑",
  //     field: 'changer',
  //     component: 'JDictSelectTag',
  //     componentProps:{
  //         dictCode:"sys_user,realname,id"
  //     },
  //     //colProps: {span: 6},
     // },
];
//表单数据
export const formSchema: FormSchema[] = [
src/views/semanticwordFP/SemanticWord.data.ts
@@ -65,21 +65,20 @@
    {
      label: "语义词",
      field: 'word',
      component: 'Input',
      component: 'JInput',
      //colProps: {span: 6},
     },
    {
      label: "状态",
      field: 'status',
      component: 'Select',
      componentProps:{
          options: [
            { label: '待分配', value: '0' },
            { label: '已分配', value: '1' },
          ]
      },
      //colProps: {span: 6},
     },
  {
    label: "状态",
    field: 'status',
    component: 'JDictSelectTag',
    componentProps:{
      options: [
        { label: '待分配', value: '1' },
        { label: '已分配', value: '7' },
      ]
     },
  },
    // {
  //     label: "文案编辑",
  //     field: 'changer',
@@ -107,7 +106,10 @@
  //   field: 'status',
  //   component: 'JDictSelectTag',
  //   componentProps:{
  //       dictCode:"yuyici_status",
  //       options: [
  //         { label: '待分配', value: '1' },
  //         { label: '已分配', value: '7' },
  //       ],
  //       disabled: true
  //    },
  // },
src/views/semanticwordFP/SemanticWordList.vue
@@ -84,6 +84,14 @@
        width: 150,
        fixed: 'right',
      },
      afterFetch: (resultList) => {
        // 仅保留嵌套的 contract.reviewStatus 为 '3' 的记录
        try {
          return (resultList || []).filter((item) => String(item?.contract?.reviewStatus) === '3');
        } catch (e) {
          return resultList;
        }
      },
      beforeFetch: (params) => {
        if (params && fieldPickers) {
          for (let key in fieldPickers) {
@@ -93,18 +101,18 @@
          }
        }
        // 处理状态筛选逻辑
        if (params && params.status) {
          if (params.status === '0') {
            params.changer = '';
          }
          // 如果选择了"已分配"(值为'1'),则筛选changer不为空的记录
          else if (params.status === '1') {
            params.changerNotEqual = '';
          }
          // 删除status参数,避免后端直接使用
          delete params.status;
        }
        // // 处理状态筛选逻辑(与表单选项保持一致:1=待分配,7=已分配)
        // if (params && params.status) {
        //   if (params.status === '1') {
        //     // 待分配:changer 为空
        //     params.changer = '';
        //   } else if (params.status === '7') {
        //     // 已分配:changer 不为空
        //     params.changerNotEqual = '';
        //   }
        //   // 删除status参数,避免后端直接使用
        //   delete params.status;
        // }
        const finalParams = Object.assign(params, queryParam);
        return finalParams;
@@ -207,15 +215,15 @@
        label: '详情',
        onClick: handleDetail.bind(null, record),
      },
      {
        label: '删除',
        popConfirm: {
          title: '是否确认删除',
          confirm: handleDelete.bind(null, record),
          placement: 'topLeft',
        },
        auth: 'semanticword:semantic_word:delete',
      },
      // {
      //   label: '删除',
      //   popConfirm: {
      //     title: '是否确认删除',
      //     confirm: handleDelete.bind(null, record),
      //     placement: 'topLeft',
      //   },
      //   auth: 'semanticword:semantic_word:delete',
      // },
    ];
  }
</script>
src/views/semanticwordPD/SemanticWord.data.ts
@@ -42,15 +42,22 @@
    {
      label: "语义词",
      field: 'word',
      component: 'Input',
      component: 'JInput',
      //colProps: {span: 6},
     },
    {
      label: "状态",
      field: 'status',
      component: 'JSelectMultiple',
      component: 'JDictSelectTag',
      componentProps:{
          dictCode:"yuyici_status"
          options: [
            { label: '待审核', value: '1' },
            { label: '已驳回', value: '2' },
            { label: '已通过', value: '3' },
            { label: '已接单', value: '4' },
            { label: '已上词', value: '5' },
            { label: '已掉词', value: '7' },
          ]
      },
      //colProps: {span: 6},
     },