Browse Source

bug修改

祁鹏飞 5 months ago
parent
commit
a2984b0c02

+ 2 - 1
src/views/quoteConfig/agreement/components/ruleFeeDialogEdit.vue

@@ -150,7 +150,7 @@
           <el-button type="primary" @click="save(editFormRefs)">提交审核</el-button>
         </div>
 <!--          <div class="flex f-c " v-if="!costitemEditInfo?.reviewDescription && props.operationType == 'audit'">-->
-        <div class="flex f-c " v-if="!costitemEditInfo?.approved">
+        <div class="flex f-c " v-if="!costitemEditInfo?.approved && !isHideFoot">
           <el-checkbox v-model="automatic" label="审核后,自动跳支审核下一条费用" size="large" />
           <div class="flex a-c">
             <el-button @click="rejectOperation">审核驳回</el-button>
@@ -181,6 +181,7 @@ let RuleConditionRefs = ref()
 
 const props = defineProps<{
   ruleFeeVisible: boolean,
+  isHideFoot: {type:boolean,default:false},
   agreementInfo: any,//协议信息
   RulesInfo: any,//费用信息
   costitemEditInfo: any,//编辑回显数据

+ 1 - 1
src/views/quoteConfig/costManagement.vue

@@ -88,7 +88,7 @@
     <ruleFeeDialog v-if="ruleFeeVisible" :ruleFeeVisible="ruleFeeVisible" :agreementInfo="AgreementInfo"
       :RulesInfo="ruleInfo" @save="ruleFeeSave" @cancel="ruleFeeVisible = false" />
     <!-- 规则费用编辑组件 -->
-    <ruleFeeDialogEdit :ruleFeeVisible="ruleFeeEditVisible" :headerTitle="ruleFeeHeaderTitle"
+    <ruleFeeDialogEdit :ruleFeeVisible="ruleFeeEditVisible" :headerTitle="ruleFeeHeaderTitle" :isHideFoot="true"
       :agreementInfo="AgreementInfo" :RulesInfo="ruleInfo" :costitemEditInfo="costitemEditInfo" @save="ruleFeeEditSave"
       @cancel="ruleFeeEditVisible = false" />
   </div>

+ 25 - 24
src/views/sale/settings.vue

@@ -33,7 +33,7 @@
             {{ item.describe }}
           </div>
         </ElFormItem>
-        
+
         <!-- 佣金比例设置 - 拆分为独立的FormItem以显示各自的校验提示 -->
         <ElFormItem label="佣金比例" style="margin-bottom: 0;">
           <!-- 一级佣金比例 -->
@@ -61,7 +61,7 @@
               </el-input>
             </div>
           </ElFormItem>
-          
+
           <!-- 二级佣金比例 -->
           <ElFormItem
             prop="commissionRatioLevel2"
@@ -88,7 +88,7 @@
               </el-input>
             </div>
           </ElFormItem>
-          
+
           <!-- 三级佣金比例 -->
           <ElFormItem
             prop="commissionRatioLevel3"
@@ -128,7 +128,7 @@
             <el-radio label="2" size="large">加入组织自动成为分销员</el-radio>
           </el-radio-group>
         </ElFormItem>
-        
+
         <!-- 不参与分销的机构 -->
         <ElFormItem
           label="不参与分销的机构"
@@ -152,7 +152,7 @@
             +选择机构
           </div>
         </ElFormItem>
-        
+
         <!-- 已选机构列表 -->
         <el-table
           :data="selectData"
@@ -185,10 +185,10 @@
 
       <!-- 保存按钮 -->
       <div class="btn">
-        <el-button type="primary" @click="handleSubmit" v-if="form.systemCode">修改</el-button>
-        <el-button type="primary" @click="handleUpdate" v-else>保存</el-button>
+        <el-button type="primary" @click="handleUpdate" v-if="form.systemCode">修改</el-button>
+        <el-button type="primary" @click="handleSubmit" v-else>保存</el-button>
       </div>
-      
+
       <!-- 机构选择抽屉 -->
       <Drawer
         :Drawer="showDeptDrawer"
@@ -263,9 +263,9 @@ const rules = reactive<FormRules>({
       message: "请输入二级佣金比例",
       trigger: "blur",
     },
-    { 
-      type: "number", 
-      message: "佣金比例必须为数字", 
+    {
+      type: "number",
+      message: "佣金比例必须为数字",
       trigger: "blur",
       required: false,
     },
@@ -291,9 +291,9 @@ const rules = reactive<FormRules>({
       message: "请输入三级佣金比例",
       trigger: "blur",
     },
-    { 
-      type: "number", 
-      message: "佣金比例必须为数字", 
+    {
+      type: "number",
+      message: "佣金比例必须为数字",
       trigger: "blur",
       required: false,
     },
@@ -398,7 +398,7 @@ const handleDrawerCancel = () => {
 const handleDrawerSave = (selectedIds: string[]) => {
   showDeptDrawer.value = false;
   selectData.value = [];
-  
+
   // 从机构树中查找选中的节点
   const findNodesById = (nodes: TreeOption[], ids: string[]): TreeOption[] => {
     const result: TreeOption[] = [];
@@ -419,20 +419,20 @@ const handleDrawerSave = (selectedIds: string[]) => {
 
 // 搜索机构
 const handleDrawerQuery = async (searchName: string) => {
-  
+
   try {
     // const filteredData = deptTreeData.value.filter(
     //   // (node:TreeOption) => node.name.includes(searchName)
-    //    (node: TreeOption) => 
+    //    (node: TreeOption) =>
     // node.name.toLowerCase().includes(searchName.toLowerCase())
     // );
     // deptTreeData.value = filteredData;
     searchName?deptTreeData.value = filterTree(deptTreeData.value, searchName):agreementAuth()
-    
+
   } catch (error) {
     console.error("筛选机构失败:", error);
   }
-  
+
 };
 // 递归筛选树形结构
 const filterTree = (tree: TreeOption[], searchName: string) => {
@@ -505,7 +505,7 @@ const handleSubmit = async () => {
   } catch (error) {
   }
 };
-const handleUpdate=async()=>{ 
+const handleUpdate=async()=>{
   if (!formRef.value) return;
 
   try {
@@ -513,6 +513,7 @@ const handleUpdate=async()=>{
 
     const formData = {
       ...form,
+      id:form.id + '',
       commissionRatioLevel1: form.commissionRatioLevel1 || 0,
       commissionRatioLevel2: form.commissionRatioLevel2 || 0,
       commissionRatioLevel3: form.commissionRatioLevel3 || 0,
@@ -527,7 +528,7 @@ const handleUpdate=async()=>{
 }
 
 //获取详情回显
-const getDetail = async () => { 
+const getDetail = async () => {
   const res = await api.saleApi.details();
   // form.value = res.data;
   Object.assign(form, res.data);
@@ -545,7 +546,7 @@ p {
   border-bottom: 1px solid #eeeeee;
   margin-top: -1.25rem;
   margin-bottom: 33px;
-  
+
   span {
     display: inline-block;
     width: 4px;
@@ -570,7 +571,7 @@ p {
   cursor: pointer;
   display: inline-block;
   vertical-align: top;
-  
+
   h2 {
     font-size: 14px;
     font-weight: 600;
@@ -582,7 +583,7 @@ p {
 .type-box.active {
   border: 1px solid #0083ff;
   position: relative;
-  
+
   img {
     width: 24px;
     height: 24px;