yaoyao 2 anni fa
parent
commit
71fe10f42d

+ 198 - 38
src/views/FinancialManagement/CarInsurance/CompanySettlement/CarInsurance/InvoicedAndSettled.vue

@@ -17,9 +17,15 @@
         }' clearable filterable></el-cascader>
       </template>
         </templateTable>
-        <el-dialog title="详情" :visible.sync="dialogVisible" width="60%" :before-close="handleClose">
+        <el-dialog title="详情" :visible.sync="dialogVisible" width="80%" :before-close="handleClose">
             <templateTable ref="templateTable" :formList="formList1" @handleSearchList="handleSearchList1"
                 :tableConfig="tableConfigDetail" :data="formTableData" @findPage="findPageDetail">
+                <template slot="开票方式" slot-scope="scope">
+                <span>{{ scope.row.invoicingMethod == 0 ? '保司开票' : scope.row.invoicingMethod == 1 ? '掌柜开票' : scope.row.invoicingMethod }}</span>
+              </template>
+              <template slot="结算状态" slot-scope="scope">
+                <span>{{ scope.row.completionStatus == 0 ? '开票未结算' : scope.row.completionStatus == 1 ? '开票已结算' : scope.row.completionStatus == 2 ? '开票结算清' : scope.row.completionStatus }}</span>
+              </template>
             </templateTable>
             <span slot="footer" class="dialog-footer">
                 <el-button size="small" @click="dialogVisible = false">取消</el-button>
@@ -29,7 +35,7 @@
             <templateTable ref="templateTable1"   :pagination="pageDatarecord" @getList="getListrecord"
                 :tableConfig="tableConfigDetailrecord" :data="formTableDatarecord" @findPage="findPageDetailrecord">
                 <template slot="imageUrl" slot-scope="scope">
-                    <img v-if="scope.row.imageUrl" :src='scope.row.imageUrl' class="imageclass"  @click.stop="showViewer=true;ProViewImg=scope.row.imageUrl" />
+                    <img v-if="scope.row.imageUrl != process + 'null'" :src='scope.row.imageUrl' class="imageclass"  @click.stop="showViewer=true;ProViewImg=scope.row.imageUrl" />
                 </template>
             </templateTable>
             <span slot="footer" class="dialog-footer">
@@ -45,6 +51,35 @@
                 <el-button size="small" @click="dialogVisiblerecordDetail = false">取消</el-button>
             </span>
         </el-dialog>
+        <el-dialog
+          title="结算"
+          :visible.sync="dialogVisiblebalance"
+          width="20%"
+          :before-close="handleClosebalance">
+          <el-form ref="form" :model="form" label-width="85px">
+            <el-form-item label="进账金额:">
+              <el-input v-model="form.settlementAmount" style="width:220px"></el-input>
+            </el-form-item>
+            <el-form-item label="进账日期:">
+              <el-date-picker
+                v-model="form.settlementTime"
+                type="date"
+                placeholder="选择日期"
+                value-format="yyyy-MM-dd">
+              </el-date-picker>
+            </el-form-item>
+            <el-form-item label="上传凭证:" >
+                  <el-upload  action="#" class="upload-demo"  :limit="1" :auto-upload="false"
+                    :on-change="drivingupload"  ref="upload3"  accept=".png, .jpg, .jpeg" :file-list="fileList">
+                    <el-button size="small" type="primary">点击上传</el-button>
+                  </el-upload>
+              </el-form-item>
+          </el-form>
+          <span slot="footer" class="dialog-footer">
+          <el-button  size="small" @click="dialogVisiblebalance = false">取消</el-button>
+          <el-button type="primary" size="small" @click="balanceSumbit">确实</el-button>
+        </span>
+      </el-dialog>
 
         <el-image-viewer v-if="showViewer"  :on-close="closeViewer"  :z-index="9999" :url-list="[ProViewImg]" />
     </div>
@@ -70,6 +105,10 @@ export default {
     },
     data() {
         return {
+            process: process.env.BASE_URL,
+            batchData:{},
+            fileList:[],
+            dialogVisiblebalance:false,
             ztreeNodes:[],
             showViewer:false,
             ProViewImg:[],
@@ -255,13 +294,18 @@ export default {
                     prop: "settlementStatus",
                     type: "select",
                     options: [
-                        {
-                            label: '开票已结算',
-                            value: '2'
-                        }, {
-                            label: '开票未结算',
-                            value: '1'
-                        },
+                      {
+                        label: '开票未结算',
+                        value: '0'
+                      },
+                      {
+                        label: '开票已结算',
+                        value: '1'
+                      }, 
+                      {
+                        label: '开票结算清',
+                        value: '2'
+                      },
                     ]
                 },
 
@@ -273,30 +317,77 @@ export default {
                         label: "开票号",
                         type: "text"
                     },
+                    {
+                        prop: "invoicingMethod",
+                        label: "开票方式",
+                        // type: "text"
+                        name: '开票方式',
+                        type: 'slot'
+                    },
                     {
                         prop: "invoicCommissionFeevalue",
                         label: "开票金额",
                         type: "text"
                     },
                     {
-                        prop: "invoicTime",
-                        label: "开票时间",
+                        prop: "invoicedSettledAmount",
+                        label: "已开票已结算金额",
                         type: "text"
                     },
-
+                    {
+                        prop: "invoicedNotSettledAmount",
+                        label: "已开票未结算金额",
+                        type: "text"
+                    },
+                    {
+                        prop: "completionStatus",
+                        label: "结算状态",
+                        name: "结算状态",
+                        type: "slot"
+                    },
+                    // {
+                    //   prop: "invoicTime",
+                    //   label: "开票时间",
+                    //   type: "text"
+                    // },
+                
                 ],
                 loading: true,
-                optBtns: [
+                isShowIndex: true,
+                operationWidth: 150,
+                optBtns:[
                     {
-                        type: 'primary',
-                        label: '记录',
-                        click: (row, index) => { return this.haldRecord(row) },
+                        type:'primary',
+                        label:'结算',
+                        hide: (row) => {
+                            return row.completionStatus != '2'
+                        },
+                        click:(row, index) => {return this.balanceFun(row)},
                     },
                     {
-                        type: 'primary',
-                        label: '明细',
-                        click: (row, index) => { return this.haldRecordDetail(row) },
-                    }
+                        type:'primary',
+                        label:'作废',
+                        hide: (row) => {
+                        return row.completionStatus == '0'
+                        },
+                        click:(row, index) => {return this.handVoid(row)},
+                    },
+                    {
+                        type:'primary',
+                        label:'记录',
+                        hide: (row) => {
+                        return row.completionStatus != '0'
+                        },
+                        click:(row, index) => {return this.haldRecord(row)},
+                    },
+                    {
+                        type:'primary',
+                        label:'明细',
+                        hide: (row) => {
+                        return row.completionStatus != '0'
+                        },
+                        click:(row, index) => {return this.haldRecordDetail(row)},
+                    },
                 ]
             },
             dialogVisible: false,
@@ -307,7 +398,8 @@ export default {
             formTableData: [],
             formTableDatarecord:[],
             recordDetailData:[],
-            recorddetailid:''
+            recorddetailid:'',
+            form:{},
 
         };
     },
@@ -321,7 +413,73 @@ export default {
         this.findPage();
     },
     methods: {
-        closeViewer() {
+        handVoid(row){
+            this.$api.task
+            .yaidlnvoicing({id:row.id})
+            .then(res => {
+                if (res.code==200) {
+                    this.dialogVisible=false
+                    this.$message({
+                        message: res.msg ||'操作成功',
+                        type: 'success'
+                    })
+                }
+                else{
+                    this.$message.error(res.msg)
+                }
+            });
+        },
+        balanceSumbit() {
+            this.$api.task
+                .batchBxBalance({...this.openBalanceDetail,
+                otherFeevalue:this.formDetail.otherFeevalue,
+                partnerCompaniesId:this.formDetail.partnerCompaniesId,
+                companyId:this.formDetail.companyId,
+                isNotCar:'0',
+                handlingFeesStatus:'1',
+                settlementImageId:this.batchData.id,
+                ...this.form})
+                .then(res => {
+                if (res.code==200) {
+                    this.haldDetail(this.formDetail)
+                    this.dialogVisiblebalance=false
+                    this.$message({
+                        message: res.msg ||'操作成功',
+                        type: 'success'
+                    })
+                }
+                else{
+                    this.$message.error(res.msg)
+                }
+                });
+            }, 
+        // 结算
+        balanceFun(row) {
+            this.openBalanceDetail=row
+            this.fileList=[]
+            this.dialogVisiblebalance=true
+        },
+        drivingupload(file, fileList){
+            this.fileList=[]
+            const params = new FormData(); // 声明formData数据类型
+            params.append("multipartFile", file.raw);
+            params.append("type", "image");
+            // params.append("isNotCar", "0");
+            this.$api.letter.uploadFile(params).then(res => {
+            if (res.code == "200") {
+                this.batchData =res.data
+                this.fileList = fileList
+            }
+            else{
+                this.fileList=[]
+                this.$message.error(res.msg)
+            }
+            });
+        },
+    handleClosebalance() {
+      this.dialogVisiblebalance = false;
+    },
+    closeViewer() {
       this.showViewer = false;
     },
         getYearData(val) {
@@ -351,7 +509,9 @@ export default {
                     isNotDocumentary: '0',
                     handlingFeesStatus: '0',
                     isSettlement: '1',
-                    settlementStatus:data.settlementStatus,
+                    // settlementStatus:data.settlementStatus,
+                    completionStatus:data.settlementStatus || '1',
+                    settlementStatus: '1'
                 })
                 .then(res => {
                     if (res.code == 200) {
@@ -479,21 +639,21 @@ export default {
         },
 
         // 结算
-        balanceFun(row) {
-            this.$api.task
-                .batchBxBalance({ ids: row.ids })
-                .then(res => {
-                    if (res.code == 200) {
-                        this.$message({
-                            message: res.msg || '操作成功',
-                            type: 'success'
-                        })
-                    }
-                    else {
-                        this.$message.error(res.msg)
-                    }
-                });
-        },
+        // balanceFun(row) {
+        //     this.$api.task
+        //         .batchBxBalance({ ids: row.ids })
+        //         .then(res => {
+        //             if (res.code == 200) {
+        //                 this.$message({
+        //                     message: res.msg || '操作成功',
+        //                     type: 'success'
+        //                 })
+        //             }
+        //             else {
+        //                 this.$message.error(res.msg)
+        //             }
+        //         });
+        // },
         tablePageChange(val) {
             this.pageData.pageSize = val;
             this.findPage();

+ 215 - 2
src/views/FinancialManagement/CarInsurance/CompanySettlement/CarInsurance/InvoicingUnsettled.vue

@@ -30,6 +30,26 @@
             <el-button  size="small" @click="dialogVisible = false">取消</el-button>
           </span>
         </el-dialog>
+        <el-dialog title="记录" :visible.sync="dialogVisiblerecord" width="30%" :before-close="handleCloserecord">
+            <templateTable ref="templateTable1"   :pagination="pageDatarecord" @getList="getListrecord"
+                :tableConfig="tableConfigDetailrecord" :data="formTableDatarecord" @findPage="findPageDetailrecord">
+                <template slot="imageUrl" slot-scope="scope">
+                    <img v-if="scope.row.imageUrl" :src='scope.row.imageUrl' class="imageclass"  @click.stop="showViewer=true;ProViewImg=scope.row.imageUrl" />
+                </template>
+            </templateTable>
+            <span slot="footer" class="dialog-footer">
+                <el-button size="small" @click="dialogVisiblerecord = false">取消</el-button>
+            </span>
+        </el-dialog>
+        <el-dialog title="明细" :visible.sync="dialogVisiblerecordDetail" width="50%" :before-close="handleCloserecorddetail">
+            <templateTable ref="templateTable1"   :pagination="pageDatarecorddetail" @getList="getListrecorddetail"
+                :tableConfig="tableConfigDetailrecorddetail" :data="recordDetailData" @findPage="findPageDetailrecorddatail">
+            </templateTable>
+
+            <span slot="footer" class="dialog-footer">
+                <el-button size="small" @click="dialogVisiblerecordDetail = false">取消</el-button>
+            </span>
+        </el-dialog>
       <el-dialog
           title="结算"
           :visible.sync="dialogVisiblebalance"
@@ -78,6 +98,97 @@ export default {
     },
     data() {
         return {
+          // 记录 明细
+          dialogVisiblerecord: false,
+          dialogVisiblerecordDetail: false,
+          formTableDatarecord:[],
+          recordDetailData:[],
+          pageDatarecord: {
+                pageNum: 1,
+                pageSize: 20,
+                totalSize:0
+            },
+            pageDatarecorddetail: {
+                pageNum: 1,
+                pageSize: 20,
+                totalSize:0
+            },
+            tableConfigDetailrecord: {
+                columns: [
+                    {
+                        prop: "settlementTime",
+                        label: "进账日期",
+                        type: "text"
+                    },
+                    {
+                        prop: "settlementAmount",
+                        label: "进帐金额",
+                        type: "text"
+                    },
+                    {
+                        name: "imageUrl",
+                        label: "凭证",
+                        type: "slot"
+                    },
+                ],
+                loading: true,
+                isPaginationShow:true
+            },
+            tableConfigDetailrecorddetail: {
+                columns: [
+                    {
+                        prop: "syPolicyno",
+                        label: "商业保单号",
+                        type: "text"
+                    },
+                    {
+                        prop: "policyno",
+                        label: "交强保单号",
+                        type: "text"
+                    },
+                    {
+                        prop: "licenseno",
+                        label: "车牌号",
+                        type: "text"
+                    },
+                    {
+                        prop: "insuredName",
+                        label: "被保人",
+                        type: "text"
+                    },
+                    {
+                        prop: "jqPremium",
+                        label: "交强保费",
+                        type: "text"
+                    },
+                    {
+                        prop: "syPremium",
+                        label: "商业保费",
+                        type: "text"
+                    },
+                    {
+                        prop: "jqSuperviseCostsProportion",
+                        label: "交强手续费比例",
+                        type: "text"
+                    },
+                    {
+                        prop: "jqSuperviseCostsPremiums",
+                        label: "交强手续费金额",
+                        type: "text"
+                    }, {
+                        prop: "sySuperviseCostsProportion",
+                        label: "商业手续费比例",
+                        type: "text"
+                    },
+                    {
+                        prop: "sySuperviseCostsPremiums",
+                        label: "商业手续费金额",
+                        type: "text"
+                    },
+                ],
+                loading: true,
+                isPaginationShow:true
+            },
       ztreeNodes:[],
       fileList:[],
             dialogVisiblebalance:false,
@@ -127,20 +238,40 @@ export default {
         ],
         loading: true,
         isShowIndex: true,
+        operationWidth: 150,
         optBtns:[
           {
             type:'primary',
             label:'结算',
+            hide: (row) => {
+                return row.completionStatus != '2'
+            },
             click:(row, index) => {return this.balanceFun(row)},
         },
         {
             type:'primary',
             label:'作废',
             hide: (row) => {
-                return !row.readyCommissionFeevalue ? true : false
+              return row.completionStatus == '0'
             },
             click:(row, index) => {return this.handVoid(row)},
         },
+        {
+            type:'primary',
+            label:'记录',
+            hide: (row) => {
+              return row.completionStatus != '0'
+            },
+            click:(row, index) => {return this.haldRecord(row)},
+        },
+        {
+            type:'primary',
+            label:'明细',
+            hide: (row) => {
+              return row.completionStatus != '0'
+            },
+            click:(row, index) => {return this.haldRecordDetail(row)},
+        },
       ]
       },
             searchData: {},
@@ -252,6 +383,83 @@ export default {
         this.findPage();
     },
     methods: {
+      // 明细
+      findPageDetailrecord(data) {
+            this.tableConfigDetailrecord.loading = true
+            this.$api.task
+                .settlementFeesQuery({
+                    partnerCompaniesId: this.formDetail.partnerCompaniesId,
+                    agreementType: '2',
+                    isNotCar: '0',
+                    handlingFeesStatus: '0',
+                    settlementStatus:'2',
+                    id:this.recorddetailid,
+                    ...data
+                })
+                .then(res => {
+                    if (res.code == 200) {
+                        res.data.content.forEach(ele => {
+                            ele.imageUrl= process.env.BASE_URL+ele.imageUrl
+                        });
+                        this.formTableDatarecord = res.data.content;
+                        this.pageDatarecord={
+                            pageNum:res.data.pageNum,
+                            pageSize:res.data.pageSize,
+                            totalSize:res.data.totalSize,
+                        }
+                        this.tableConfigDetailrecord.loading = false;
+                    }
+                    else {
+                        this.tableConfigDetail.loading = false;
+                        this.$message.error(res.msg)
+                    }
+                });
+        },
+        getListrecord(data) {
+            this.findPageDetailrecord(data)
+        },
+        haldRecord(row) {
+            this.dialogVisiblerecord = true
+            this.recorddetailid = row.id
+            this.findPageDetailrecord()
+        },
+        
+        haldRecordDetail(row) {
+            this.dialogVisiblerecordDetail = true
+            this.getListrecorddetail()
+            this.recorddetailid = row.id
+
+        },
+        getListrecorddetail(data) {
+            this.findPageDetailrecorddatail(data)
+        },
+        findPageDetailrecorddatail(data) {
+            this.tableConfigDetailrecorddetail.loading = true;
+            this.$api.task
+            .fncplyFeeQuery({
+                    partnerCompaniesId: this.formDetail.partnerCompaniesId,
+                    agreementType: '2',
+                    isNotCar: '0',
+                    handlingFeesStatus: '0',
+                    id:this.recorddetailid,
+                    ...data})
+                .then(res => {
+                    if (res.code == 200) {
+                        this.tableConfigDetailrecorddetail.loading = false;
+                        this.recordDetailData = res.data.content ? res.data.content : []
+                    }
+                    else {
+                        this.tableConfigDetailrecorddetail.loading = false;
+                        this.$message.error(res.msg)
+                    }
+                });
+        },
+      handleCloserecord() {
+            this.dialogVisiblerecord = false
+        },
+        handleCloserecorddetail() {
+            this.dialogVisiblerecordDetail = false
+        },
       resetForm() {
             this.formData={}
             this.$refs.yearMonthYay.clear()
@@ -304,7 +512,7 @@ export default {
         isNotDocumentary : '0',
         handlingFeesStatus:'0',
         // settlementStatus:data.settlementStatus,
-        completionStatus:data.settlementStatus,
+        completionStatus:data.settlementStatus || '0',
         settlementStatus: '1'
 
     })
@@ -416,5 +624,10 @@ export default {
     overflow-y: auto !important;
     height: auto !important;
 }
+.imageclass {
+  width: 200px;
+  height: 100px;
+  text-align: center;
+}
 </style>
   

+ 186 - 26
src/views/FinancialManagement/CarInsurance/CompanySettlement/NoCarInsurance/InvoicedAndSettled.vue

@@ -17,9 +17,15 @@
         }' clearable filterable></el-cascader>
       </template>
         </templateTable>
-        <el-dialog title="详情" :visible.sync="dialogVisible" width="60%" :before-close="handleClose">
+        <el-dialog title="详情" :visible.sync="dialogVisible" width="80%" :before-close="handleClose">
             <templateTable ref="templateTable" :formList="formList1" @handleSearchList="handleSearchList1"
                 :tableConfig="tableConfigDetail" :data="formTableData" @findPage="findPageDetail">
+                <template slot="开票方式" slot-scope="scope">
+                    <span>{{ scope.row.invoicingMethod == 0 ? '保司开票' : scope.row.invoicingMethod == 1 ? '掌柜开票' : scope.row.invoicingMethod }}</span>
+                </template>
+                <template slot="结算状态" slot-scope="scope">
+                    <span>{{ scope.row.completionStatus == 0 ? '开票未结算' : scope.row.completionStatus == 1 ? '开票已结算' : scope.row.completionStatus == 2 ? '开票结算清' : scope.row.completionStatus }}</span>
+                </template>
             </templateTable>
             <span slot="footer" class="dialog-footer">
                 <el-button size="small" @click="dialogVisible = false">取消</el-button>
@@ -29,7 +35,7 @@
             <templateTable ref="templateTable1"   :pagination="pageDatarecord" @getList="getListrecord"
                 :tableConfig="tableConfigDetailrecord" :data="formTableDatarecord" @findPage="findPageDetailrecord">
                 <template slot="imageUrl" slot-scope="scope">
-                    <img :src='scope.row.imageUrl' class="imageclass"  @click.stop="showViewer=true;ProViewImg=scope.row.imageUrl" />
+                    <img v-if="scope.row.imageUrl != process + 'null'" :src='scope.row.imageUrl' class="imageclass"  @click.stop="showViewer=true;ProViewImg=scope.row.imageUrl" />
                 </template>
             </templateTable>
             <span slot="footer" class="dialog-footer">
@@ -45,6 +51,36 @@
                 <el-button size="small" @click="dialogVisiblerecordDetail = false">取消</el-button>
             </span>
         </el-dialog>
+        <el-dialog
+          title="结算"
+          :visible.sync="dialogVisiblebalance"
+          width="20%"
+          :before-close="handleClosebalance">
+          <el-form ref="form" :model="form" label-width="85px">
+            <el-form-item label="进账金额:">
+              <el-input v-model="form.settlementAmount" style="width:220px"></el-input>
+            </el-form-item>
+            <el-form-item label="进账日期:">
+              <el-date-picker
+                v-model="form.settlementTime"
+                type="date"
+                placeholder="选择日期"
+                value-format="yyyy-MM-dd">
+              </el-date-picker>
+            </el-form-item>
+            <el-form-item label="上传凭证:" >
+                  <el-upload  action="#" class="upload-demo"  :limit="1" :auto-upload="false"
+                    :on-change="drivingupload"  ref="upload3"  accept=".png, .jpg, .jpeg" :file-list="fileList">
+                    <el-button size="small" type="primary">点击上传</el-button>
+                  </el-upload>
+              </el-form-item>
+          </el-form>
+          <span slot="footer" class="dialog-footer">
+          <el-button  size="small" @click="dialogVisiblebalance = false">取消</el-button>
+          <el-button type="primary" size="small" @click="balanceSumbit">确实</el-button>
+        </span>
+      </el-dialog>
+
         <el-image-viewer v-if="showViewer"  :on-close="closeViewer"  :z-index="9999" :url-list="[ProViewImg]" />
 
     </div>
@@ -62,6 +98,10 @@ export default {
       import("element-ui/packages/image/src/image-viewer") },
     data() {
         return {
+            process: process.env.BASE_URL,
+            batchData:{},
+            fileList:[],
+            dialogVisiblebalance:false,
             ztreeNodes:[],
             showViewer:false,
             dialogVisiblerecordDetail:false,
@@ -155,13 +195,18 @@ export default {
                     prop: "settlementStatus",
                     type: "select",
                     options: [
-                        {
-                            label: '开票已结算',
-                            value: '2'
-                        }, {
-                            label: '开票未结算',
-                            value: '1'
-                        }
+                      {
+                        label: '开票未结算',
+                        value: '0'
+                      },
+                      {
+                        label: '开票已结算',
+                        value: '1'
+                      }, 
+                      {
+                        label: '开票结算清',
+                        value: '2'
+                      },
                     ]
                 },
 
@@ -195,30 +240,77 @@ export default {
                         label: "开票号",
                         type: "text"
                     },
+                    {
+                        prop: "invoicingMethod",
+                        label: "开票方式",
+                        // type: "text"
+                        name: '开票方式',
+                        type: 'slot'
+                    },
                     {
                         prop: "invoicCommissionFeevalue",
                         label: "开票金额",
                         type: "text"
                     },
                     {
-                        prop: "invoicTime",
-                        label: "开票时间",
+                        prop: "invoicedSettledAmount",
+                        label: "已开票已结算金额",
                         type: "text"
                     },
-
+                    {
+                        prop: "invoicedNotSettledAmount",
+                        label: "已开票未结算金额",
+                        type: "text"
+                    },
+                    {
+                        prop: "completionStatus",
+                        label: "结算状态",
+                        name: "结算状态",
+                        type: "slot"
+                    },
+                    // {
+                    //   prop: "invoicTime",
+                    //   label: "开票时间",
+                    //   type: "text"
+                    // },
+                
                 ],
                 loading: true,
-                optBtns: [
+                isShowIndex: true,
+                operationWidth: 150,
+                optBtns:[
                     {
-                        type: 'primary',
-                        label: '记录',
-                        click: (row, index) => { return this.haldRecord(row) },
+                        type:'primary',
+                        label:'结算',
+                        hide: (row) => {
+                            return row.completionStatus != '2'
+                        },
+                        click:(row, index) => {return this.balanceFun(row)},
                     },
                     {
-                        type: 'primary',
-                        label: '明细',
-                        click: (row, index) => { return this.haldRecordDetail(row) },
-                    }
+                        type:'primary',
+                        label:'作废',
+                        hide: (row) => {
+                        return row.completionStatus == '0'
+                        },
+                        click:(row, index) => {return this.handVoid(row)},
+                    },
+                    {
+                        type:'primary',
+                        label:'记录',
+                        hide: (row) => {
+                        return row.completionStatus != '0'
+                        },
+                        click:(row, index) => {return this.haldRecord(row)},
+                    },
+                    {
+                        type:'primary',
+                        label:'明细',
+                        hide: (row) => {
+                        return row.completionStatus != '0'
+                        },
+                        click:(row, index) => {return this.haldRecordDetail(row)},
+                    },
                 ]
             },
             dialogVisible: false,
@@ -282,9 +374,10 @@ export default {
                     },
                 ],
                 loading: true,
-                isPaginationShow:true
+                isPaginationShow:true,
             },
-        };
+        form:{},
+    };
     },
     created() {
         this.$api.insCompany.findLeftInsTree( {
@@ -301,10 +394,76 @@ export default {
         })
     },
     methods: {
+        handVoid(row){
+            this.$api.task
+            .yaidlnvoicing({id:row.id})
+            .then(res => {
+                if (res.code==200) {
+                    this.dialogVisible=false
+                    this.$message({
+                        message: res.msg ||'操作成功',
+                        type: 'success'
+                    })
+                }
+                else{
+                    this.$message.error(res.msg)
+                }
+            });
+        },
+        balanceSumbit() {
+            this.$api.task
+                .batchBxBalance({...this.openBalanceDetail,
+                otherFeevalue:this.formDetail.otherFeevalue,
+                partnerCompaniesId:this.formDetail.partnerCompaniesId,
+                companyId:this.formDetail.companyId,
+                isNotCar:'0',
+                handlingFeesStatus:'1',
+                settlementImageId:this.batchData.id,
+                ...this.form})
+                .then(res => {
+                if (res.code==200) {
+                    this.haldDetail(this.formDetail)
+                    this.dialogVisiblebalance=false
+                    this.$message({
+                        message: res.msg ||'操作成功',
+                        type: 'success'
+                    })
+                }
+                else{
+                    this.$message.error(res.msg)
+                }
+                });
+            }, 
+        // 结算
+        balanceFun(row) {
+            this.openBalanceDetail=row
+            this.fileList=[]
+            this.dialogVisiblebalance=true
+        },
+        drivingupload(file, fileList){
+            this.fileList=[]
+            const params = new FormData(); // 声明formData数据类型
+            params.append("multipartFile", file.raw);
+            params.append("type", "image");
+            // params.append("isNotCar", "0");
+            this.$api.letter.uploadFile(params).then(res => {
+            if (res.code == "200") {
+                this.batchData =res.data
+                this.fileList = fileList
+            }
+            else{
+                this.fileList=[]
+                this.$message.error(res.msg)
+            }
+            });
+        },
+        handleClosebalance() {
+            this.dialogVisiblebalance = false;
+        },
         closeViewer() {
-      this.showViewer = false;
-    },
-    handleCloserecorddetail() {
+            this.showViewer = false;
+        },
+        handleCloserecorddetail() {
             this.dialogVisiblerecordDetail = false
         },
         getYearData(val) {
@@ -369,7 +528,8 @@ export default {
                     isNotDocumentary: '0',
                     handlingFeesStatus: '0',
                     isSettlement: '1',
-                    settlementStatus:data.settlementStatus,
+                    completionStatus:data.settlementStatus || '1',
+                    settlementStatus: '1'
                 })
                 .then(res => {
                     if (res.code == 200) {

+ 218 - 2
src/views/FinancialManagement/CarInsurance/CompanySettlement/NoCarInsurance/InvoicingUnsettled.vue

@@ -53,6 +53,28 @@
                 <el-button type="primary" size="small" @click="balanceSumbit">确定</el-button>
             </span>
         </el-dialog>
+        <!-- 记录 明细 -->
+        <el-dialog title="记录" :visible.sync="dialogVisiblerecord" width="30%" :before-close="handleCloserecord">
+            <templateTable ref="templateTable1"   :pagination="pageDatarecord" @getList="getListrecord"
+                :tableConfig="tableConfigDetailrecord" :data="formTableDatarecord" @findPage="findPageDetailrecord">
+                <template slot="imageUrl" slot-scope="scope">
+                    <img v-if="scope.row.imageUrl" :src='scope.row.imageUrl' class="imageclass"  @click.stop="showViewer=true;ProViewImg=scope.row.imageUrl" />
+                </template>
+            </templateTable>
+            <span slot="footer" class="dialog-footer">
+                <el-button size="small" @click="dialogVisiblerecord = false">取消</el-button>
+            </span>
+        </el-dialog>
+        <el-dialog title="明细" :visible.sync="dialogVisiblerecordDetail" width="50%" :before-close="handleCloserecorddetail">
+            <templateTable ref="templateTable1"   :pagination="pageDatarecorddetail" @getList="getListrecorddetail"
+                :tableConfig="tableConfigDetailrecorddetail" :data="recordDetailData" @findPage="findPageDetailrecorddatail">
+            </templateTable>
+
+            <span slot="footer" class="dialog-footer">
+                <el-button size="small" @click="dialogVisiblerecordDetail = false">取消</el-button>
+            </span>
+        </el-dialog>
+
     </div>
 </template>
 <script>
@@ -72,6 +94,97 @@ export default {
     },
     data() {
         return {
+            // 记录 明细
+          dialogVisiblerecord: false,
+          dialogVisiblerecordDetail: false,
+          formTableDatarecord:[],
+          recordDetailData:[],
+          pageDatarecord: {
+                pageNum: 1,
+                pageSize: 20,
+                totalSize:0
+            },
+            pageDatarecorddetail: {
+                pageNum: 1,
+                pageSize: 20,
+                totalSize:0
+            },
+            tableConfigDetailrecord: {
+                columns: [
+                    {
+                        prop: "settlementTime",
+                        label: "进账日期",
+                        type: "text"
+                    },
+                    {
+                        prop: "settlementAmount",
+                        label: "进帐金额",
+                        type: "text"
+                    },
+                    {
+                        name: "imageUrl",
+                        label: "凭证",
+                        type: "slot"
+                    },
+                ],
+                loading: true,
+                isPaginationShow:true
+            },
+            tableConfigDetailrecorddetail: {
+                columns: [
+                    {
+                        prop: "syPolicyno",
+                        label: "商业保单号",
+                        type: "text"
+                    },
+                    {
+                        prop: "policyno",
+                        label: "交强保单号",
+                        type: "text"
+                    },
+                    {
+                        prop: "licenseno",
+                        label: "车牌号",
+                        type: "text"
+                    },
+                    {
+                        prop: "insuredName",
+                        label: "被保人",
+                        type: "text"
+                    },
+                    {
+                        prop: "jqPremium",
+                        label: "交强保费",
+                        type: "text"
+                    },
+                    {
+                        prop: "syPremium",
+                        label: "商业保费",
+                        type: "text"
+                    },
+                    {
+                        prop: "jqSuperviseCostsProportion",
+                        label: "交强手续费比例",
+                        type: "text"
+                    },
+                    {
+                        prop: "jqSuperviseCostsPremiums",
+                        label: "交强手续费金额",
+                        type: "text"
+                    }, {
+                        prop: "sySuperviseCostsProportion",
+                        label: "商业手续费比例",
+                        type: "text"
+                    },
+                    {
+                        prop: "sySuperviseCostsPremiums",
+                        label: "商业手续费金额",
+                        type: "text"
+                    },
+                ],
+                loading: true,
+                isPaginationShow:true
+            },
             ztreeNodes: [],
             fileList: [],
             dialogVisiblebalance: false,
@@ -116,20 +229,41 @@ export default {
 
                 ],
                 loading: true,
+                isShowIndex: true,
+                operationWidth: 150,
                 optBtns: [
                     {
                         type: 'primary',
                         label: '结算',
+                        hide: (row) => {
+                            return row.completionStatus != '2'
+                        },
                         click: (row, index) => { return this.balanceFun(row) },
                     },
                     {
                         type: 'primary',
                         label: '作废',
                         hide: (row) => {
-                            return !row.readyCommissionFeevalue ? true : false
+                            return row.completionStatus == '0'
                         },
                         click: (row, index) => { return this.handVoid(row) },
                     },
+                    {
+                    type:'primary',
+                    label:'记录',
+                    hide: (row) => {
+                    return row.completionStatus != '0'
+                    },
+                    click:(row, index) => {return this.haldRecord(row)},
+                },
+                {
+                    type:'primary',
+                    label:'明细',
+                    hide: (row) => {
+                    return row.completionStatus != '0'
+                    },
+                    click:(row, index) => {return this.haldRecordDetail(row)},
+                },
                 ]
             },
             searchData: {},
@@ -237,6 +371,83 @@ export default {
         this.findPage();
     },
     methods: {
+        // 明细
+      findPageDetailrecord(data) {
+            this.tableConfigDetailrecord.loading = true
+            this.$api.task
+                .settlementFeesQuery({
+                    partnerCompaniesId: this.formDetail.partnerCompaniesId,
+                    agreementType: '2',
+                    isNotCar: '0',
+                    handlingFeesStatus: '0',
+                    settlementStatus:'2',
+                    id:this.recorddetailid,
+                    ...data
+                })
+                .then(res => {
+                    if (res.code == 200) {
+                        res.data.content.forEach(ele => {
+                            ele.imageUrl= process.env.BASE_URL+ele.imageUrl
+                        });
+                        this.formTableDatarecord = res.data.content;
+                        this.pageDatarecord={
+                            pageNum:res.data.pageNum,
+                            pageSize:res.data.pageSize,
+                            totalSize:res.data.totalSize,
+                        }
+                        this.tableConfigDetailrecord.loading = false;
+                    }
+                    else {
+                        this.tableConfigDetail.loading = false;
+                        this.$message.error(res.msg)
+                    }
+                });
+        },
+        getListrecord(data) {
+            this.findPageDetailrecord(data)
+        },
+        haldRecord(row) {
+            this.dialogVisiblerecord = true
+            this.recorddetailid = row.id
+            this.findPageDetailrecord()
+        },
+        
+        haldRecordDetail(row) {
+            this.dialogVisiblerecordDetail = true
+            this.getListrecorddetail()
+            this.recorddetailid = row.id
+
+        },
+        getListrecorddetail(data) {
+            this.findPageDetailrecorddatail(data)
+        },
+        findPageDetailrecorddatail(data) {
+            this.tableConfigDetailrecorddetail.loading = true;
+            this.$api.task
+            .fncplyFeeQuery({
+                    partnerCompaniesId: this.formDetail.partnerCompaniesId,
+                    agreementType: '2',
+                    isNotCar: '0',
+                    handlingFeesStatus: '0',
+                    id:this.recorddetailid,
+                    ...data})
+                .then(res => {
+                    if (res.code == 200) {
+                        this.tableConfigDetailrecorddetail.loading = false;
+                        this.recordDetailData = res.data.content ? res.data.content : []
+                    }
+                    else {
+                        this.tableConfigDetailrecorddetail.loading = false;
+                        this.$message.error(res.msg)
+                    }
+                });
+        },
+      handleCloserecord() {
+            this.dialogVisiblerecord = false
+        },
+        handleCloserecorddetail() {
+            this.dialogVisiblerecordDetail = false
+        },
         drivingupload(file, fileList) {
             this.fileList = []
             const params = new FormData(); // 声明formData数据类型
@@ -295,7 +506,7 @@ export default {
                     isNotDocumentary: '0',
                     handlingFeesStatus: '0',
                     // settlementStatus: data.settlementStatus,
-                    completionStatus:data.settlementStatus,
+                    completionStatus:data.settlementStatus || '0',
                     settlementStatus: '1'
                 })
                 .then(res => {
@@ -421,5 +632,10 @@ export default {
     overflow-y: auto !important;
     height: auto !important;
 }
+.imageclass {
+  width: 200px;
+  height: 100px;
+  text-align: center;
+}
 </style>