Bladeren bron

订单详情增加修改出入口比例功能

祁鹏飞 1 maand geleden
bovenliggende
commit
f006b5de8f

+ 1 - 0
src/api/modules/insurancePolicy.ts

@@ -23,6 +23,7 @@ const insurancePolicyApi = (axiosInstance: ApiInstance) => ({
   orderTrack: (data: any) => axiosInstance.post('/orderTrack/list', data), // 订单轨迹
   deleteTaskImages: (data: string) => axiosInstance.get(`/order/taskImages/delete?id=${data}`), // 影像资料删除
   destroyQrCode: (data: any) => axiosInstance.post('/order/qrCode/destroyQrCode', data), // 撤销支付码
+  updateFeeRatio: (data: any) => axiosInstance.post('/supplementOrder/updateFeeRatio', data), // 撤销支付码
   getClausePage: (data: any) => axiosInstance.post('manager/clause/getClausePage', data), //特别约定列表查询
   getHistoryQuoteList: (data: any) => axiosInstance.post('/supplementOrder/getHistoryQuoteList', data), // 报价历史
   queryClauseData: (data: any) => axiosInstance.post('/unify/order/queryClauseData', data), // 特约

+ 1 - 1
src/views/additionalOrder/additional/index.vue

@@ -1592,7 +1592,7 @@
                     :precision="2" :min="1" :max="100" controls-position="right" @change="cvalculateFees">
                     <template #suffix>
                       <span>%</span>
-                    </template>
+                    </template> 
                   </el-input-number>
                 </el-form-item>
               </el-col>

+ 76 - 21
src/views/insurancePolicy/orderDetail.vue

@@ -79,7 +79,7 @@
           <span class="label">出单协议</span>
           <span class="words" style="color: #00a0f4" @click="toAgreementDetail">{{ detailData?.order?.agreementName ||
             '--'
-          }}</span>
+            }}</span>
         </el-col>
         <el-col :span="6">
           <span class="label">协议类型</span>
@@ -215,7 +215,7 @@
           <div class="taxList">
             <span class="taxItem" :class="{ 'active': item.bool }" v-for="(item, index) in taxList" :key="index">{{
               item.name
-            }}</span>
+              }}</span>
           </div>
         </div>
         <el-row :gutter="20">
@@ -370,12 +370,12 @@
           <el-col :span="6" class="carMsgItem">
             <span class="label">使用性质</span>
             <span class="value">{{ dictChange(optionObj['car_nature_code'], detailData?.carInfoVo?.carNatureCode)
-            }}</span>
+              }}</span>
           </el-col>
           <el-col :span="6" class="carMsgItem">
             <span class="label">车辆用途</span>
             <span class="value">{{ dictChange(optionObj['vehicle_use_code'], detailData?.carInfoVo?.vehicleUseCode)
-            }}</span>
+              }}</span>
           </el-col>
           <el-col :span="6" class="carMsgItem">
             <span class="label">车辆种类</span>
@@ -384,12 +384,12 @@
           <el-col :span="6" class="carMsgItem">
             <span class="label">车辆类型</span>
             <span class="value">{{ dictChange(optionObj['car_type_code'], detailData?.carInfoVo?.carTypeCode)
-            }}</span>
+              }}</span>
           </el-col>
           <el-col :span="6" class="carMsgItem">
             <span class="label">能源种类</span>
             <span class="value">{{ dictChange(optionObj['energy_type_code'], detailData?.carInfoVo?.energyTypeCode)
-            }}</span>
+              }}</span>
           </el-col>
           <el-col :span="6" class="carMsgItem">
             <span class="label">注册日期</span>
@@ -495,7 +495,7 @@
           <div class="taxList">
             <span class="taxItem" :class="{ 'active': item.bool }" v-for="(item, index) in tbList" :key="index">{{
               item.name
-            }}</span>
+              }}</span>
           </div>
         </div>
         <el-row :gutter="20" v-if="!tbList[0].bool">
@@ -559,7 +559,7 @@
           <div class="taxList">
             <span class="taxItem" :class="{ 'active': item.bool }" v-for="(item, index) in bbList" :key="index">{{
               item.name
-            }}</span>
+              }}</span>
           </div>
         </div>
         <el-row :gutter="20" v-if="!bbList[0].bool && !bbList[1].bool">
@@ -621,7 +621,7 @@
       </div>
       <div class="imageMsg">
         <div id="imageMsg" class="title special" :ref="(el) => setSectionRef(el, 3)">
-        <div>影像资料</div>
+          <div>影像资料</div>
           <div class="btns">
             <el-button size="small" type="primary" plain @click="batchDownload">下载选中影像</el-button>
             <el-button size="small" type="primary" plain @click="handleImageSave">上传影像资料</el-button>
@@ -781,8 +781,13 @@
       </div>
       <div class="costMsg">
         <div id="costMsg" class="title special" :ref="(el) => setSectionRef(el, 8)">
-          <div >费用信息</div>
+          <div>费用信息</div>
           <div class="btns">
+            <template v-if="detailData?.salesmanInfo?.typeAttr === '8' && detailData?.insFeeOrders?.ratioModified === 0">
+              <el-button size="small" type="primary" v-if="!updateRatio" plain
+                @click="updateRatio = true">修改出入口比例</el-button>
+              <el-button size="small" type="primary" v-if="updateRatio" plain @click="saveRatio()">保存出入口比例</el-button>
+            </template>
             <el-button size="small" type="primary" plain @click="handleCostView">查看出单费用</el-button>
           </div>
         </div>
@@ -824,14 +829,22 @@
               </th>
 
               <th>
-                <div>{{ detailData?.costRatio?.jqInletRatio }}%</div>
+                <div v-if="!updateRatio">{{ detailData?.costRatio?.jqInletRatio }}%</div>
+                <el-input-number v-if="updateRatio" v-model="detailData.costRatio.jqInletRatio" :min="1" :max="100"
+                  :precision="2" :step="1" size="small">
+                  <template #suffix> <span>%</span> </template>
+                </el-input-number>
               </th>
               <th>
                 <div>¥{{ detailData?.insFeeOrders?.jqReceivablePremium }}</div>
               </th>
 
               <th>
-                <div>{{ detailData?.costRatio?.jqExportRatio }}%</div>
+                <div v-if="!updateRatio">{{ detailData?.costRatio?.jqExportRatio }}%</div>
+                <el-input-number v-if="updateRatio" v-model="detailData.costRatio.jqExportRatio" :min="1" :max="100"
+                  :precision="2" :step="1" size="small">
+                  <template #suffix> <span>%</span> </template>
+                </el-input-number>
               </th>
               <th>
                 <div>¥{{ detailData?.insFeeOrders?.jqPayablePremium }}</div>
@@ -867,14 +880,22 @@
               </th>
 
               <th>
-                <div>{{ detailData?.costRatio?.syInletRatio }}%</div>
+                <div v-if="!updateRatio">{{ detailData?.costRatio?.syInletRatio }}%</div>
+                <el-input-number v-if="updateRatio" v-model="detailData.costRatio.syInletRatio" :min="1" :max="100"
+                  :precision="2" :step="1" size="small">
+                  <template #suffix> <span>%</span> </template>
+                </el-input-number>
               </th>
               <th>
                 <div>¥{{ detailData?.insFeeOrders?.syReceivablePremium }}</div>
               </th>
 
               <th>
-                <div>{{ detailData?.costRatio?.syExportRatio }}%</div>
+                <div v-if="!updateRatio">{{ detailData?.costRatio?.syExportRatio }}%</div>
+                <el-input-number v-if="updateRatio" v-model="detailData.costRatio.syExportRatio" :min="1" :max="100"
+                  :precision="2" :step="1" size="small">
+                  <template #suffix> <span>%</span> </template>
+                </el-input-number>
               </th>
               <th>
                 <div>¥{{ detailData?.insFeeOrders?.syPayablePremium }}</div>
@@ -910,14 +931,22 @@
               </th>
 
               <th>
-                <div>{{ detailData?.costRatio?.jyInletRatio }}%</div>
+                <div v-if="!updateRatio">{{ detailData?.costRatio?.jyInletRatio }}%</div>
+                <el-input-number v-if="updateRatio" v-model="detailData.costRatio.jyInletRatio" :min="1" :max="100"
+                  :precision="2" :step="1" size="small">
+                  <template #suffix> <span>%</span> </template>
+                </el-input-number>
               </th>
               <th>
                 <div>¥{{ detailData?.insFeeOrders?.jyReceivablePremium }}</div>
               </th>
 
               <th>
-                <div>{{ detailData?.costRatio?.jyExportRatio }}%</div>
+                <div v-if="!updateRatio">{{ detailData?.costRatio?.jyExportRatio }}%</div>
+                <el-input-number v-if="updateRatio" v-model="detailData.costRatio.jyExportRatio" :min="1" :max="100"
+                  :precision="2" :step="1" size="small">
+                  <template #suffix> <span>%</span> </template>
+                </el-input-number>
               </th>
               <th>
                 <div>¥{{ detailData?.insFeeOrders?.jyPayablePremium }}</div>
@@ -980,7 +1009,7 @@
       </div>
       <div class="costMsg">
         <div id="salesChannelMsg" class="title special" :ref="(el) => setSectionRef(el, 9)">
-          <div >分销信息</div>
+          <div>分销信息</div>
           <div class="btns">
             <el-button size="small" type="primary" plain @click="handleCostView">查看出单费用</el-button>
           </div>
@@ -1098,7 +1127,7 @@
           <el-table-column prop="packagePrice" label="总价" align="center">
             <template #default="scope">
               <div>{{ scope.row.packagePrice * scope.row.rightsCount || scope.row.contractRate * scope.row.rightsCount
-                }}
+              }}
               </div>
             </template>
           </el-table-column>
@@ -2146,6 +2175,29 @@ onMounted(() => {
   })
 })
 
+const updateRatio = ref(false)
+const saveRatio = () => {
+  const params = {
+    orderNo: detailData.value.ordersNo,
+    jqInletRatio: detailData.value.costRatio.jqInletRatio,
+    jqExportRatio: detailData.value.costRatio.jqExportRatio,
+    syInletRatio: detailData.value.costRatio.syInletRatio,
+    syExportRatio: detailData.value.costRatio.syExportRatio,
+    jyInletRatio: detailData.value.costRatio.jyInletRatio,
+    jyExportRatio: detailData.value.costRatio.jyExportRatio,
+  }
+  api.insurancePolicyApi.updateFeeRatio(params).then((res: any) => {
+    if (res.code == 200) {
+      ElMessage({
+        message: '修改成功!',
+        type: 'success'
+      })
+      updateRatio.value = false
+      initDetail()
+    }
+  })
+}
+
 onUnmounted(() => {
   if (observer) {
     observer.disconnect()
@@ -2336,10 +2388,12 @@ onUnmounted(() => {
     height: calc(100% - 280px);
     overflow-y: auto;
     overflow-x: hidden;
-    &>.title{
+
+    &>.title {
       margin-left: 24px;
 
     }
+
     .title {
       height: 18px;
       line-height: 18px;
@@ -2349,7 +2403,8 @@ onUnmounted(() => {
       display: flex;
       align-items: center;
       justify-content: flex-start;
-      &:first-of-type{
+
+      &:first-of-type {
         margin-top: 12px;
       }
 
@@ -2562,7 +2617,7 @@ onUnmounted(() => {
             border-top: 1px solid #ebeef5;
             border-right: 1px solid #ebeef5;
 
-            div {
+            div:not(.el-input-number) {
               box-sizing: border-box;
               line-height: 23px;
               overflow: hidden;