Browse Source

外部协议-费用现询限制取消+费用列表样式修改

祁鹏飞 1 month ago
parent
commit
d9efb1d75e

+ 1 - 1
src/views/externalAgreement/agreement/agreementDetails.vue

@@ -103,7 +103,7 @@
                   </div>
                   </div>
                 </div>
                 </div>
               </div>
               </div>
-              <div class="header-content" v-if="item.contactPersonShow">
+              <div class="header-content mt-10px" v-if="item.contactPersonShow">
                 <ComplexTable :tableData="item.costExternalListVo" :columns="columns" :maxHeight="400"
                 <ComplexTable :tableData="item.costExternalListVo" :columns="columns" :maxHeight="400"
                   :showIndex="false" :columnwidth="200" :showSelect="false">
                   :showIndex="false" :columnwidth="200" :showSelect="false">
                   <template v-slot:operation="scope">
                   <template v-slot:operation="scope">

+ 98 - 91
src/views/externalAgreement/agreement/components/contactPersonFeeDialogEdit.vue

@@ -1,32 +1,34 @@
 <!-- 模板区域 -->
 <!-- 模板区域 -->
 <template>
 <template>
   <div>
   <div>
-    <el-drawer v-model="props.ruleFeeVisible" :direction="direction"  size="50%"
-      @close="close">
+    <el-drawer v-model="props.ruleFeeVisible" :direction="direction" size="50%" @close="close">
       <template #header>
       <template #header>
         <h4>{{ props.headerTitle }}费用编辑</h4>
         <h4>{{ props.headerTitle }}费用编辑</h4>
       </template>
       </template>
       <template #default>
       <template #default>
         <div class="rejectionReason flex a-start" v-if="costitemEditInfo.reviewDescription">
         <div class="rejectionReason flex a-start" v-if="costitemEditInfo.reviewDescription">
-          <el-icon color="red" class="m-right-20"><CircleClose /></el-icon>
+          <el-icon color="red" class="m-right-20">
+            <CircleClose />
+          </el-icon>
           <div class="flex f-c">
           <div class="flex f-c">
             <span class="strong" style="color: #333;">审核不通过</span>
             <span class="strong" style="color: #333;">审核不通过</span>
-            <span >审核原因:{{costitemEditInfo. reviewDescription }}</span>
+            <span>审核原因:{{ costitemEditInfo.reviewDescription }}</span>
             <div class="flex a-c ">
             <div class="flex a-c ">
               <span class="m-right-20">审核人:{{ costitemEditInfo.auditPerson }}</span>
               <span class="m-right-20">审核人:{{ costitemEditInfo.auditPerson }}</span>
-              <span >审核时间:{{costitemEditInfo.auditTime }}</span>
+              <span>审核时间:{{ costitemEditInfo.auditTime }}</span>
             </div>
             </div>
-            <span class="primary" v-if="costitemEditInfo.auditStatus == 2" @click="disabledShow = false"  style="color: #409eff;" >
-                修改并重提交
-              </span>
+            <span class="primary" v-if="costitemEditInfo.auditStatus == 2" @click="disabledShow = false"
+              style="color: #409eff;">
+              修改并重提交
+            </span>
           </div>
           </div>
         </div>
         </div>
         <ElRow :gutter="20" class="m-top-20">
         <ElRow :gutter="20" class="m-top-20">
-          <el-form :model="contactPersonEditInfo" label-width="120px" ref="contactPersonFormRef" :disabled="disabledShow" style="width: 100%;"
-            :rules="feerules" class="flex a-c f-wrap" :size="fromSize">
+          <el-form :model="contactPersonEditInfo" label-width="120px" ref="contactPersonFormRef"
+            :disabled="disabledShow" style="width: 100%;" :rules="feerules" class="flex a-c f-wrap" :size="fromSize">
             <ElCol :md="24" :lg="12">
             <ElCol :md="24" :lg="12">
               <el-form-item label="对接人姓名" prop="contactPerson">
               <el-form-item label="对接人姓名" prop="contactPerson">
-                <el-input v-model="contactPersonEditInfo.contactPerson"  placeholder="请输入对接人姓名" />
+                <el-input v-model="contactPersonEditInfo.contactPerson" placeholder="请输入对接人姓名" />
               </el-form-item>
               </el-form-item>
             </ElCol>
             </ElCol>
             <ElCol :md="24" :lg="12">
             <ElCol :md="24" :lg="12">
@@ -64,11 +66,12 @@
                 </el-radio-group>
                 </el-radio-group>
               </el-form-item>
               </el-form-item>
             </ElCol>
             </ElCol>
-              <ElCol :md="24" :lg="12">
-                  <el-form-item label="优先级" prop="priorityLevel">
-                      <el-input-number style="width: 100%" v-model="contactPersonEditInfo.priorityLevel" placeholder="请填写优先级" />
-                  </el-form-item>
-              </ElCol>
+            <ElCol :md="24" :lg="12">
+              <el-form-item label="优先级" prop="priorityLevel">
+                <el-input-number style="width: 100%" v-model="contactPersonEditInfo.priorityLevel"
+                  placeholder="请填写优先级" />
+              </el-form-item>
+            </ElCol>
             <ElCol :md="24" :lg="24">
             <ElCol :md="24" :lg="24">
               <el-form-item label="费用描述" prop="costDescribe">
               <el-form-item label="费用描述" prop="costDescribe">
                 <el-input v-model="contactPersonEditInfo.costDescribe" maxlength="500" placeholder="请输入费用描述"
                 <el-input v-model="contactPersonEditInfo.costDescribe" maxlength="500" placeholder="请输入费用描述"
@@ -86,23 +89,25 @@
             </div>
             </div>
           </template>
           </template>
           <el-table-column prop="costType" label="类型"></el-table-column>
           <el-table-column prop="costType" label="类型"></el-table-column>
-            <el-table-column prop="inlet" label="入口比例" width="180" align="center">
-                <template #default="scope">
-                    <el-input-number v-model="scope.row.inlet"  :disabled="disabledShow||contactPersonEditInfo.isInquiry==='0'" :precision="2" controls-position="right"
-                                     style="width: 100%;" :min="0" :max="100" @change="handelRK(scope)">
-                        <template #suffix>%</template>
-                    </el-input-number>
-                </template>
-            </el-table-column>
-            <el-table-column prop="export" label="出口比例"   width="180" align="center">
-                <template #default="scope">
-                    <el-input-number v-model="scope.row.export" :disabled="disabledShow" :precision="2" controls-position="right"
-                                     style="width: 100%;" :min="0" :max="100" @change="handelCK(scope)">
-                        <template #suffix>%</template>
-                    </el-input-number>
-                </template>
-            </el-table-column>
-            <!--                      <el-table-column prop="commission" label="手续费比例" width="180" align="center">
+          <el-table-column prop="inlet" label="入口比例" width="180" align="center">
+            <template #default="scope">
+              <el-input-number v-model="scope.row.inlet"
+                :disabled="disabledShow || contactPersonEditInfo.isInquiry === '0'" :precision="2"
+                controls-position="right" style="width: 100%;" :min="0" :max="100" @change="handelRK(scope)">
+                <template #suffix>%</template>
+              </el-input-number>
+            </template>
+          </el-table-column>
+          <el-table-column prop="export" label="出口比例" width="180" align="center">
+            <template #default="scope">
+              <el-input-number v-model="scope.row.export"
+                :disabled="disabledShow || contactPersonEditInfo.isInquiry === '0'" :precision="2"
+                controls-position="right" style="width: 100%;" :min="0" :max="100" @change="handelCK(scope)">
+                <template #suffix>%</template>
+              </el-input-number>
+            </template>
+          </el-table-column>
+          <!--                      <el-table-column prop="commission" label="手续费比例" width="180" align="center">
                                     <template #default="scope">
                                     <template #default="scope">
                                       <el-input-number v-model="scope.row.commission" :precision="2" controls-position="right"
                                       <el-input-number v-model="scope.row.commission" :precision="2" controls-position="right"
                                         style="width: 100%;" :min="0" :max="100">
                                         style="width: 100%;" :min="0" :max="100">
@@ -110,22 +115,22 @@
                                       </el-input-number>
                                       </el-input-number>
                                     </template>
                                     </template>
                                   </el-table-column>-->
                                   </el-table-column>-->
-            <el-table-column prop="addThrow" label="加投比例" width="180" align="center">
-                <template #default="scope">
-                    <el-input-number v-model="scope.row.addThrow" :disabled="disabledShow" :precision="2" controls-position="right"
-                                     style="width: 100%;" :min="0" :max="100" @change="handelJT(scope)">
-                        <template #suffix>%</template>
-                    </el-input-number>
-                </template>
-            </el-table-column>
-            <el-table-column prop="keepPointRatio" label="留点比例" width="180" align="center">
-                <template #default="scope">
-                    <el-input-number v-model="scope.row.keepPointRatio" :disabled="disabledShow" :precision="2" controls-position="right"
-                                    style="width: 100%;" :min="0" :max="100" @change="handelLD(scope)">
-                        <template #suffix>%</template>
-                    </el-input-number>
-                </template>
-            </el-table-column>
+          <el-table-column prop="addThrow" label="加投比例" width="180" align="center">
+            <template #default="scope">
+              <el-input-number v-model="scope.row.addThrow" :disabled="disabledShow" :precision="2"
+                controls-position="right" style="width: 100%;" :min="0" :max="100" @change="handelJT(scope)">
+                <template #suffix>%</template>
+              </el-input-number>
+            </template>
+          </el-table-column>
+          <el-table-column prop="keepPointRatio" label="留点比例" width="180" align="center">
+            <template #default="scope">
+              <el-input-number v-model="scope.row.keepPointRatio" :disabled="disabledShow" :precision="2"
+                controls-position="right" style="width: 100%;" :min="0" :max="100" @change="handelLD(scope)">
+                <template #suffix>%</template>
+              </el-input-number>
+            </template>
+          </el-table-column>
         </el-table>
         </el-table>
       </template>
       </template>
       <template #footer>
       <template #footer>
@@ -148,7 +153,7 @@
 <!-- 行为区域 -->
 <!-- 行为区域 -->
 <script lang='ts' setup>
 <script lang='ts' setup>
 import { ref, } from 'vue'
 import { ref, } from 'vue'
-import { DrawerProps, ComponentSize, FormInstance, FormRules, ElMessage,ElMessageBox } from 'element-plus';
+import { DrawerProps, ComponentSize, FormInstance, FormRules, ElMessage, ElMessageBox } from 'element-plus';
 const direction = ref<DrawerProps['direction']>('rtl')
 const direction = ref<DrawerProps['direction']>('rtl')
 const fromSize = ref<ComponentSize>('default')
 const fromSize = ref<ComponentSize>('default')
 const props = defineProps<{
 const props = defineProps<{
@@ -193,9 +198,9 @@ const feerules = ref<FormRules>({
   isInquiry: [
   isInquiry: [
     { required: true, trigger: 'change', message: '请选择是否线询' },
     { required: true, trigger: 'change', message: '请选择是否线询' },
   ],
   ],
-    priorityLevel: [
-        { required: true, trigger: 'blur', message: '请填写优先级' },
-    ]
+  priorityLevel: [
+    { required: true, trigger: 'blur', message: '请填写优先级' },
+  ]
 })
 })
 // 禁用失效时间选择
 // 禁用失效时间选择
 const disabledEndDate = (date: any) => {
 const disabledEndDate = (date: any) => {
@@ -249,58 +254,60 @@ const rejectOperation = () => {
     inputErrorMessage: '请输入中文',
     inputErrorMessage: '请输入中文',
   })
   })
     .then(({ value }) => {
     .then(({ value }) => {
-      emits("rejectOperation",automatic.value,contactPersonEditInfo.value.id,value)
+      emits("rejectOperation", automatic.value, contactPersonEditInfo.value.id, value)
     })
     })
 }
 }
 //审核通过操作
 //审核通过操作
 const auditOperation = () => {
 const auditOperation = () => {
-  emits("auditOperation", automatic.value,contactPersonEditInfo.value.id)
+  emits("auditOperation", automatic.value, contactPersonEditInfo.value.id)
 }
 }
 
 
 
 
 const handelRK = (scope) => {
 const handelRK = (scope) => {
-    if(scope.row.export&&scope.row.addThrow || scope.row.export&&scope.row.addThrow === 0) {
-        scope.row.keepPointRatio = scope.row.inlet + scope.row.addThrow - scope.row.export
-    }
-    if(scope.row.export&&scope.row.keepPointRatio) {
-        scope.row.addThrow = scope.row.export + scope.row.keepPointRatio - scope.row.inlet
-    }
-    if(scope.row.keepPointRatio&&scope.row.addThrow || scope.row.keepPointRatio&&scope.row.addThrow === 0) {
-        scope.row.export = scope.row.inlet + scope.row.addThrow - scope.row.keepPointRatio
-    }
+  if (scope.row.export && scope.row.addThrow || scope.row.export && scope.row.addThrow === 0) {
+    scope.row.keepPointRatio = scope.row.inlet + scope.row.addThrow - scope.row.export
+  }
+  if (scope.row.export && scope.row.keepPointRatio) {
+    scope.row.addThrow = scope.row.export + scope.row.keepPointRatio - scope.row.inlet
+  }
+  if (scope.row.keepPointRatio && scope.row.addThrow || scope.row.keepPointRatio && scope.row.addThrow === 0) {
+    scope.row.export = scope.row.inlet + scope.row.addThrow - scope.row.keepPointRatio
+  }
 }
 }
 const handelCK = (scope) => {
 const handelCK = (scope) => {
-    if(scope.row.inlet&&scope.row.addThrow || scope.row.inlet&&scope.row.addThrow === 0) {
-        scope.row.keepPointRatio = scope.row.inlet + scope.row.addThrow - scope.row.export
-    }
-    if(scope.row.inlet&&scope.row.keepPointRatio) {
-        scope.row.addThrow = scope.row.export + scope.row.keepPointRatio - scope.row.inlet
-    }
-    if(scope.row.keepPointRatio&&scope.row.addThrow || scope.row.keepPointRatio&&scope.row.addThrow === 0) {
-        scope.row.inlet = scope.row.export + scope.row.keepPointRatio - scope.row.addThrow
-    }
+  if (scope.row.inlet && scope.row.addThrow || scope.row.inlet && scope.row.addThrow === 0) {
+    scope.row.keepPointRatio = scope.row.inlet + scope.row.addThrow - scope.row.export
+  }
+  if (scope.row.inlet && scope.row.keepPointRatio) {
+    scope.row.addThrow = scope.row.export + scope.row.keepPointRatio - scope.row.inlet
+  }
+  if (scope.row.keepPointRatio && scope.row.addThrow || scope.row.keepPointRatio && scope.row.addThrow === 0) {
+    scope.row.inlet = scope.row.export + scope.row.keepPointRatio - scope.row.addThrow
+  }
 }
 }
 const handelJT = (scope) => {
 const handelJT = (scope) => {
-    if(scope.row.inlet&&scope.row.export) {
-        scope.row.keepPointRatio = scope.row.inlet + scope.row.addThrow - scope.row.export
-    }
-    if(scope.row.inlet&&scope.row.keepPointRatio) {
-        scope.row.export = scope.row.addThrow + scope.row.inlet - scope.row.keepPointRatio
-    }
-    if(scope.row.keepPointRatio&&scope.row.export) {
-        scope.row.inlet = scope.row.export + scope.row.keepPointRatio - scope.row.addThrow
-    }
+  if (contactPersonEditInfo.value.isInquiry === '0') return
+  if (scope.row.inlet && scope.row.export) {
+    scope.row.keepPointRatio = scope.row.inlet + scope.row.addThrow - scope.row.export
+  }
+  if (scope.row.inlet && scope.row.keepPointRatio) {
+    scope.row.export = scope.row.addThrow + scope.row.inlet - scope.row.keepPointRatio
+  }
+  if (scope.row.keepPointRatio && scope.row.export) {
+    scope.row.inlet = scope.row.export + scope.row.keepPointRatio - scope.row.addThrow
+  }
 }
 }
 const handelLD = (scope) => {
 const handelLD = (scope) => {
-    if(scope.row.inlet&&scope.row.export) {
-        scope.row.addThrow = scope.row.export + scope.row.keepPointRatio - scope.row.inlet
-    }
-    if(scope.row.inlet&&scope.row.addThrow || scope.row.inlet&&scope.row.addThrow === 0) {
-        scope.row.export = scope.row.addThrow + scope.row.inlet - scope.row.keepPointRatio
-    }
-    if(scope.row.addThrow&&scope.row.export || scope.row.addThrow === 0&&scope.row.export) {
-        scope.row.inlet = scope.row.export + scope.row.keepPointRatio - scope.row.addThrow
-    }
+  if (contactPersonEditInfo.value.isInquiry === '0') return
+  if (scope.row.inlet && scope.row.export) {
+    scope.row.addThrow = scope.row.export + scope.row.keepPointRatio - scope.row.inlet
+  }
+  if (scope.row.inlet && scope.row.addThrow || scope.row.inlet && scope.row.addThrow === 0) {
+    scope.row.export = scope.row.addThrow + scope.row.inlet - scope.row.keepPointRatio
+  }
+  if (scope.row.addThrow && scope.row.export || scope.row.addThrow === 0 && scope.row.export) {
+    scope.row.inlet = scope.row.export + scope.row.keepPointRatio - scope.row.addThrow
+  }
 }
 }
 
 
 </script>
 </script>