Browse Source

Merge branch 'dev' of http://39.101.143.165:8090/dong_k/tenant-Platform into dev

@dongkboy 4 tháng trước cách đây
mục cha
commit
c207c15519

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

@@ -13,6 +13,7 @@ const insurancePolicyApi = (axiosInstance: ApiInstance) => ({
   underwriting: (data: any) => axiosInstance.post('/unify/order/underwriting', data), // 核保
   imageSave: (data: any) => axiosInstance.post('/unify/order/imageSave', data), // 本地影像存储
   queryList: (data: any) => axiosInstance.post('supplementOrder/queryList', data), // 订单
+  deleteOrder: (data: any) => axiosInstance.get(`supplementOrder/deleteById?id=${data.id}`), // 删除订单
   getOrderStatus: (data: any) => axiosInstance.post('/unify/order/getOrderStatus', data), // 状态更新
   getQrCode: (data: string) => axiosInstance.get(`/order/qrCode/getQrCode?orderNo=${data}`), // 支付二维码
   getOrderDetail: (data: any) => axiosInstance.get(`/supplementOrder/getOrderDetail?ordersNo=${data}`), // 详情

+ 9 - 4
src/components/ruleCondition/index.vue

@@ -93,6 +93,12 @@ watch(()=>props.attrIdList, () => {
     })
     attrName.value = ''
     ruleAttr()  //清空搜索框内容 获取完整数据
+  }
+
+})
+
+// 设置已选数据
+const setCheckedData=()=>{
     attractivelist.value = props.attrIdList;//获取编辑数据
     const matchedid = matchDataByIds(attractivelist.value);//
     const matchedinfo = matchDataByInfos(attractivelist.value)
@@ -106,10 +112,7 @@ watch(()=>props.attrIdList, () => {
     checked['SearchDataStore'] = attractivelist.value?.map(item => {
         return item.attrName
     })
-  }
-
-})
-
+}
 const save = () => {
   const mergedData = [
     ...checkeddata.VehicleInformation,
@@ -283,6 +286,8 @@ const ruleAttr = (id='') => {
       dataStore.InsuranceInformation = res.data.InsuranceInformation ? processArray(res.data.InsuranceInformation) : [];
       dataStore.InsuranceCostFactor = res.data.InsuranceCostFactor ? processArray(res.data.InsuranceCostFactor) : [];
       dataStore.SearchDataStore = [...dataStore.VehicleInformation, ...dataStore.VehicleOwnerInformation, ...dataStore.PolicyholderInformation, ...dataStore.InsuredInformation, ...dataStore.InsuranceInformation, ...dataStore.InsuranceCostFactor ]
+      setCheckedData()
+
     }
   });
 }

+ 43 - 2
src/views/insurancePolicy/order.vue

@@ -110,7 +110,7 @@
       <el-table-column label="业务员信息" prop="salesmanInfo" width="200"></el-table-column>
       <el-table-column label="业务员类型" prop="salesmanType" width="200">
         <template #default="scope">
-          {{ scope.row.salesmanType }}
+          {{ typeAttrMap(scope.row.salesmanType) }}
         </template>
       </el-table-column>
       <el-table-column label="出单机构" prop="deptName" width="200"></el-table-column>
@@ -143,7 +143,7 @@
           <el-button link type="primary" v-if="scope.row.orderStatus === '5'">下载电子保单</el-button>
           <el-button link type="primary" v-if="scope.row.orderStatus === '5'">查看电子保单</el-button>
           <el-button link type="primary" v-if="scope.row.orderStatus === '4'" @click="payCode(scope)">支付码</el-button>
-          <el-button link type="danger"
+          <el-button link type="danger" @click="deleteOrder(scope.row.orderNo)"
             v-if="scope.row.orderStatus === '6' || scope.row.orderStatus === '8'">删除订单</el-button>
           <!--          <el-dropdown trigger="click" class="ml-[12px] align-middle" v-if="scope.row.orderStatus === '5'">
             <el-button link type="primary">
@@ -267,6 +267,20 @@ const allFields = {
   ]
 };
 
+const typeAttrMap=(value)=>{
+  const map = {
+    "1": '前线人员',
+    "2": '后线人员',
+    "3": '合伙人',
+    "4": '工作是管理员',
+    "5": '团队',
+    "6": '个代',
+    "7": '电销',
+    "8": '渠道',
+  }
+  return map[value]
+}
+
 // 创建反向映射
 const fieldMap = Object.fromEntries(
   [...allFields.basic, ...allFields.other].map(item => [item.value, item.label])
@@ -540,6 +554,33 @@ const updateOrderStatus = (orderNo) => {
   })
 }
 
+/**
+ * 删除保险订单
+ * @param {string} id - 订单ID
+ * @returns {void}
+ *
+ * 功能说明:
+ * - 调用删除订单接口,根据订单ID删除对应的保险订单
+ * - 删除成功后显示成功提示并刷新订单列表
+ * - 删除失败时显示警告提示
+ */
+const deleteOrder = (id:string):void => {
+  api.insurancePolicyApi.deleteOrder({ id }).then((res: any) => {
+    if (res.code == 200) {
+      ElMessage({
+        message: res.msg,
+        type: 'success'
+      })
+      initData()
+    } else {
+      ElMessage({
+        message: res.msg,
+        type: 'warning'
+      })
+    }
+  })
+}
+
 // 支付码
 let payCodeShow = ref(false)
 let payCodeUrl = ref('')

+ 0 - 2
src/views/personnel/modules/addOperation.vue

@@ -1169,8 +1169,6 @@ const onSubmit = async (OperationFormRef: FormInstance, type: number) => {
   }
   await OperationFormRef.validate((valid) => {
     if (valid) {
-      console.log(operationForm.value)
-      return
       if (!route.query.id) {
         api.operationApi.addOperation({
           ...operationForm.value,

+ 7 - 2
src/views/quoteConfig/costManagement.vue

@@ -57,7 +57,7 @@
             <div class="agreementItem flex f-c " :class="{ active: agritem.id == AgreementId }"
               v-for="(agritem, agrindex) in agreementList" :key="agrindex" @click="ItemClick(agritem)">
               <span class="m-btn-10">{{ agritem.agreementCode }}</span>
-              <span>{{ agritem.agreementTitle }}</span>
+              <span>{{ agritem.agreementTitle }}-{{ agritem.agreementAbbreviation }}-{{ agritem.agreementName }}</span>
             </div>
           </div>
         </div>
@@ -153,6 +153,8 @@ const formInline = reactive({
   effectiveTime: [],
   failureTime: [],
   updateTimeArr: [],
+  companyId: [],
+  contactPerson: "",
 })
 
 // 保险公司
@@ -253,7 +255,7 @@ const columns = [
   {
     prop: "agreementAbbreviation", label: "协议信息", width: '300',
     formatter: (row: any) => {
-      return `${row.agreementCode}\n${row.agreementAbbreviation}`
+      return `${row.agreementCode}\n${row.agreementTitle}-${row.agreementAbbreviation}-${row.agreementName ?? ''}`
     }
   },
   {
@@ -544,6 +546,9 @@ const resetForm = () => {
   formInline.validState = "";
   formInline.effectiveTime = [];
   formInline.failureTime = [];
+  formInline.companyId = [];
+  formInline.contactPerson = "";
+  formInline.updateTimeArr = [];
   findpage();
 }
 const getDeptTree = () => {