Просмотр исходного кода

修改过比例的订单可以直接提交修改订单状态

祁鹏飞 1 месяц назад
Родитель
Сommit
340d3da4c3
1 измененных файлов с 29 добавлено и 10 удалено
  1. 29 10
      src/views/insurancePolicy/orderDetail.vue

+ 29 - 10
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">
@@ -783,11 +783,14 @@
         <div id="costMsg" class="title special" :ref="(el) => setSectionRef(el, 8)">
           <div>费用信息</div>
           <div class="btns">
-            <template v-if="detailData?.salesmanInfo?.typeAttr === '8' && detailData?.insFeeOrders?.ratioModified === 0">
+            <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 v-if="detailData?.insFeeOrders?.ratioModified === 1" size="small" type="primary" plain
+              @click="updateOrderStatus">提交</el-button>
             <el-button size="small" type="primary" plain @click="handleCostView">查看出单费用</el-button>
           </div>
         </div>
@@ -1127,7 +1130,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>
@@ -2198,6 +2201,22 @@ const saveRatio = () => {
   })
 }
 
+const updateOrderStatus = () => {
+  api.insurancePolicyApi.getOrderStatus({ order: { ordersNo: detailData.value.ordersNo } }).then((res: any) => {
+    if (res.code == 200) {
+      ElMessage({
+        message: res.msg,
+        type: 'success'
+      })
+      initDetail()
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
 onUnmounted(() => {
   if (observer) {
     observer.disconnect()