|
|
@@ -142,6 +142,8 @@
|
|
|
<el-button link type="primary" @click="viewElectronicPolicy(scope.row)"
|
|
|
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="primary" :loading="scope.row.loading" @click="handleQuotationView(scope.row)"
|
|
|
+ v-if="['1', '3', '4'].includes(scope.row.orderStatus)">报价单预览</el-button>
|
|
|
<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'">
|
|
|
@@ -256,6 +258,7 @@
|
|
|
<DialogInsuranceEdit v-model="isEditVisible" :data="formData" />
|
|
|
<DialogInsuranceCancel v-model="isCancelVisible" :data="formData" />
|
|
|
</PageMain>
|
|
|
+ <quotation ref="quotationRef" :quotationObj="quotationObj" :insurancePolicyForm="insurancePolicyForm" />
|
|
|
|
|
|
</template>
|
|
|
|
|
|
@@ -267,6 +270,7 @@ import { dictData } from '@/views/localDict/index';
|
|
|
import { ElMessage } from "element-plus";
|
|
|
import { useRouter } from 'vue-router';
|
|
|
import { FormInstance } from 'element-plus';
|
|
|
+import quotation from './modules/quotation.vue' // 报价单
|
|
|
import QRCode from 'qrcode'
|
|
|
|
|
|
const router = useRouter()
|
|
|
@@ -732,31 +736,48 @@ const uploadStatus = (row: any) => {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
-// 订单批改
|
|
|
-const onClick = (type: any, row: any) => {
|
|
|
- api.insurancePolicyApi.adjustAdd({
|
|
|
- type: type,
|
|
|
- orderNo: row.orderNo,
|
|
|
- }).then((res: any) => {
|
|
|
+let optionObj = ref({
|
|
|
+ vehicle_use_code: [], // 车辆用途
|
|
|
+})
|
|
|
+const initOption = () => {
|
|
|
+ api.additionalApi.dictDetails('vehicle_use_code').then((res: any) => {
|
|
|
if (res.code == 200) {
|
|
|
- formData.value = {
|
|
|
- ...row,
|
|
|
- adjustId: res.data.id,
|
|
|
- tableList: type === 1 ? res.data.changeInfoVosList : res.data.infoVosList
|
|
|
- };
|
|
|
- if (type === 1) {
|
|
|
- isEditVisible.value = true;
|
|
|
- }
|
|
|
- if (type === 0) {
|
|
|
- isCancelVisible.value = true;
|
|
|
+ if (res.data) {
|
|
|
+ optionObj.value['vehicle_use_code'] = res.data
|
|
|
}
|
|
|
- } else {
|
|
|
- ElMessage({
|
|
|
- message: res.msg,
|
|
|
- type: 'warning'
|
|
|
- })
|
|
|
}
|
|
|
- });
|
|
|
+ })
|
|
|
+}
|
|
|
+initOption()
|
|
|
+const quotationObj = ref({})
|
|
|
+const insurancePolicyForm = ref({})
|
|
|
+const quotationRef = ref(null)
|
|
|
+// 订单批改
|
|
|
+const handleQuotationView = async (row: any) => {
|
|
|
+ row.loading = true
|
|
|
+ const { data } = await api.insurancePolicyApi.getOrderDetail(row.orderNo)
|
|
|
+ row.loading = false
|
|
|
+
|
|
|
+ quotationObj.value = {
|
|
|
+ ...data,
|
|
|
+ logo: data.insCompanyVo[0]?.logo,
|
|
|
+ nameSimple: data.insCompanyVo[0]?.nameSimple,
|
|
|
+ quoteResult: data
|
|
|
+ }
|
|
|
+ const { carInfoVo, ownersInfo, policyHolderInfo, insuredPersonInfo,biRiskInfoVo,ciRiskInfoVo } = data
|
|
|
+ insurancePolicyForm.value = {
|
|
|
+ ...data,
|
|
|
+ name1: ownersInfo?.name,
|
|
|
+ name2: policyHolderInfo?.name,
|
|
|
+ name3: insuredPersonInfo?.name,
|
|
|
+ ...carInfoVo,
|
|
|
+ SYStartDate: biRiskInfoVo?.startDate,
|
|
|
+ SYEndDate: biRiskInfoVo?.endDate,
|
|
|
+ JQStartDate: ciRiskInfoVo?.startDate,
|
|
|
+ JQEndDate: ciRiskInfoVo?.endDate,
|
|
|
+ }
|
|
|
+ insurancePolicyForm.value.vehicleUseName = optionObj.value.vehicle_use_code.find(a => a.value === insurancePolicyForm.value.vehicleUseCode)?.label
|
|
|
+ quotationRef.value.show(data)
|
|
|
}
|
|
|
|
|
|
const getStateText = (d: any, v: any) => {
|