Przeglądaj źródła

fix:协议录入-产品费用新加查看入口

wuguojie 1 rok temu
rodzic
commit
7070da9bc2

+ 55 - 5
src/views/AgreementManage/CarInsurance/AgreementProductFee.vue

@@ -99,7 +99,7 @@
       :button2style="{ color: '#2D4D89' }" :button3style="{ color: '#D42426' }" :button5style="{ color: '#2D4D89' }"
       :button2style="{ color: '#2D4D89' }" :button3style="{ color: '#D42426' }" :button5style="{ color: '#2D4D89' }"
       permsButton2="agreement:input:productCost" @handleButton2="productUpdate" deleteName="批量修改费用"
       permsButton2="agreement:input:productCost" @handleButton2="productUpdate" deleteName="批量修改费用"
       @handleDelete="batchUpdate" @customTool="batchDelete" @customTool1="customTool1" customToolName1="批量修改起止时间"
       @handleDelete="batchUpdate" @customTool="batchDelete" @customTool1="customTool1" customToolName1="批量修改起止时间"
-      customToolName="批量删除" button3Name="删除" permsButton3="agreement:input:productCost" @handleButton3="productDelete"
+      customToolName="批量删除" button3Name="删除" permsButton3="agreement:input:productCost" @handleButton3="productDelete" button6Name="查看" button6Icon="" button6Type="text" @handleButton6="projectView"
       button5Name="轨迹" @handleButton5="trajectory" button3Icon="">
       button5Name="轨迹" @handleButton5="trajectory" button3Icon="">
     </kt-common-table>
     </kt-common-table>
     <el-dialog :append-to-body="true" :title="productCostAddDialogTitle"
     <el-dialog :append-to-body="true" :title="productCostAddDialogTitle"
@@ -108,7 +108,7 @@
         <el-tab-pane :label="tabtitle + '费用'" name="feiyong" class="tab-panestyle">
         <el-tab-pane :label="tabtitle + '费用'" name="feiyong" class="tab-panestyle">
           <div class="tab-panecent">
           <div class="tab-panecent">
             <el-form ref="productCostForm" :model="productCostForm" label-width="140px" :size="overSize"
             <el-form ref="productCostForm" :model="productCostForm" label-width="140px" :size="overSize"
-              :rules="costformRules">
+              :rules="costformRules" :disabled="isView">
               <el-row>
               <el-row>
                 <h4>费用详情</h4>
                 <h4>费用详情</h4>
                 <el-col :span="20" :offset="2" v-if="productCostAddDialogType == 'edit'">
                 <el-col :span="20" :offset="2" v-if="productCostAddDialogType == 'edit'">
@@ -332,13 +332,17 @@
         <el-tab-pane label="产品费用因子" name="yinzi" class="tab-panestyle" v-if="!messageInfo.isExternal">
         <el-tab-pane label="产品费用因子" name="yinzi" class="tab-panestyle" v-if="!messageInfo.isExternal">
           <div class="tab-panecent2">
           <div class="tab-panecent2">
             <Product-Cost-Form ref="ProductRef" v-if="productCostAddVehicleFactorVisible" :form="dynamicFormArray"
             <Product-Cost-Form ref="ProductRef" v-if="productCostAddVehicleFactorVisible" :form="dynamicFormArray"
-              :operator="operatorlist" over-size="small"></Product-Cost-Form>
+              :operator="operatorlist" over-size="small" :disabled="isView"></Product-Cost-Form>
           </div>
           </div>
         </el-tab-pane>
         </el-tab-pane>
       </el-tabs>
       </el-tabs>
-      <span slot="footer" class="dialog-footer">
+      <span slot="footer" class="dialog-footer" v-if="isView">
+        <el-button :size="overSize" style="background: #EAEDF1;color: #2D4D89;"
+                   @click="productCostAddVehicleFactorVisible = false; isView = false">确 定</el-button>
+      </span>
+      <span slot="footer" class="dialog-footer" v-else>
         <el-button :size="overSize" style="background: #EAEDF1;color: #2D4D89;"
         <el-button :size="overSize" style="background: #EAEDF1;color: #2D4D89;"
-          @click="productCostAddVehicleFactorVisible = false">取 消</el-button>
+          @click="productCostAddVehicleFactorVisible = false; isView = false">取 消</el-button>
         <el-button :size="overSize" style="background: #2D4D89;color: #fff;border-color: #2D4D89;" type="primary"
         <el-button :size="overSize" style="background: #2D4D89;color: #fff;border-color: #2D4D89;" type="primary"
           @click="productCostAddSubmit('productCostForm')">确 定</el-button>
           @click="productCostAddSubmit('productCostForm')">确 定</el-button>
       </span>
       </span>
@@ -665,6 +669,7 @@ export default {
   },
   },
   data() {
   data() {
     return {
     return {
+      isView: false,
       productDate: [],
       productDate: [],
       createDate: [],
       createDate: [],
       productcopyDate: [],
       productcopyDate: [],
@@ -1758,6 +1763,50 @@ export default {
         return this.$message.error('险种选择错误,无法批量修改');
         return this.$message.error('险种选择错误,无法批量修改');
       }
       }
     },
     },
+    // 产品查看
+    projectView({ row, cloumn }) {
+      this.isView = true
+      this.$api.insCompany.productcostFactorQuery(row.id).then((res) => {
+        if (res.code == '200') {
+          let obj = Object.assign({}, res.data);
+          obj.costsAttrLinks.map(val => {
+            switch (val.attrType) {
+              case 'inputNumber':
+              case 'datetime':
+                if (!val.operator) {
+                  val.operator = '1';
+                }
+                break;
+            }
+            if (val.attrCode == 'LicenseNo') {
+              val.dictLabal = this.areanumberplateList;
+            }
+            if (val.attrCode == 'LicenseArea') {
+              val.dictLabal = this.licenseAreaList;
+            }
+            if (val.attrCode == 'CarClass') {
+              val.dictLabal = this.carClassList
+            }
+            return val;
+          })
+          this.dynamicFormArray = obj.costsAttrLinks;
+          this.productCostForm = obj;
+          this.productUpdateObj.productId = this.productCostForm.productId;
+          this.productUpdateObj.productName = this.productCostForm.productName;
+          this.productCostForm.productId = [this.productCostForm.productId]
+          this.productCostForm.productName = [this.productCostForm.productName]
+          this.tabtitle = this.productCostForm.productName.join(', '); // 使用逗号和空格作为分隔符
+          this.productCostAddDialogType = "edit";
+          this.productCostAddDialogTitle = "产品详情";
+          this.productCostAddVehicleFactorVisible = true;
+        } else {
+          this.$message({
+            type: 'error',
+            message: res.msg,
+          });
+        }
+      });
+    },
     //产品编辑
     //产品编辑
     productUpdate({ row, column }) {
     productUpdate({ row, column }) {
       if (row.validStatus === 1) {
       if (row.validStatus === 1) {
@@ -1766,6 +1815,7 @@ export default {
           message: "请先禁用后再编辑费用",
           message: "请先禁用后再编辑费用",
         });
         });
       }
       }
+      this.isView = false
       this.$api.insCompany.productcostFactorQuery(row.id).then((res) => {
       this.$api.insCompany.productcostFactorQuery(row.id).then((res) => {
         if (res.code == '200') {
         if (res.code == '200') {
           let obj = Object.assign({}, res.data);
           let obj = Object.assign({}, res.data);