lihongxiao před 2 roky
rodič
revize
ec6cb5c6cd

+ 27 - 6
src/http/moudules/menu.js

@@ -72,24 +72,45 @@ export const quotationPage = (data) => {
         data
     })
 }
-export const sysQuotationTheme = (data) => {
+export const quotationSave = (data) => {
+    return axios({
+        url: '/sys/quotation/save/sysQuotationTheme',
+        method: 'post',
+        data
+    })
+}
+export const quotationUpdate= (data) => {
+    return axios({
+        url: '/sys/quotation/update/sysQuotationTheme',
+        method: 'post',
+        data
+    })
+}
+export const quotationDetail = (id) => {
+    return axios({
+        url: '/sys/quotation/get/'+id,
+        method: 'get'
+    })
+}
+
+export const quotationDelete= (data) => {
     return axios({
         url: '/sys/quotation/delete/sysQuotationTheme',
         method: 'post',
         data
     })
 }
-export const quotationSave = (data) => {
+export const quotationList= (data) => {
     return axios({
-        url: '/sys/quotation/save/sysQuotationTheme',
+        url: '/sys/quotation/list',
         method: 'post',
         data
     })
 }
-export const quotationUpdate= (data) => {
+export const quotationBatch= (data) => {
     return axios({
-        url: '/sys/quotation/update/sysQuotationTheme',
+        url: '/sys/quotation/batch',
         method: 'post',
         data
     })
-}
+}

+ 1 - 1
src/views/FinancialManagement/CarInsurance/CompanySettlement/CarInsurance/DocumentaryUnsettled.vue

@@ -198,7 +198,7 @@ export default {
     // 结算
     openBalanceFun(row) {
       this.$api.task
-        .batchBalance({...row,ids:this.findPageDetailList.ids,otherFeevalue:this.findPageDetailList.otherFeevalue,isNotCar:'0' })
+        .batchBalance({...row,otherFeevalue:this.findPageDetailList.otherFeevalue,isNotCar:'0' })
         .then(res => {
           if (res.code==200) {
             this.findPage()

+ 6 - 5
src/views/FinancialManagement/CarInsurance/CompanySettlement/NoCarInsurance/DocumentaryFees.vue

@@ -144,11 +144,7 @@ export default {
             label: "总跟单费",
             type: "text"
           },
-          {
-            prop: "noInvoicCommissionFeevalue",
-            label: "未开票跟单费",
-            type: "text"
-          },
+          
           {
             prop: "invoicCommissionFeevalue",
             label: "已开票跟单费",
@@ -164,6 +160,11 @@ export default {
             label: "已开票未结算跟单费",
             type: "text"
           },
+          {
+            prop: "noInvoicCommissionFeevalue",
+            label: "未开票跟单费",
+            type: "text"
+          },
         ],
         loading: true,
         isPaginationShow: true,

+ 1 - 1
src/views/FinancialManagement/CarInsurance/CompanySettlement/NoCarInsurance/DocumentaryUnsettled.vue

@@ -176,7 +176,7 @@ export default {
     // 结算
     openBalanceFun(row) {
       this.$api.task
-        .batchBalance({...row,ids:this.findPageDetailList.ids,otherFeevalue:this.findPageDetailList.otherFeevalue,isNotCar:'1'})
+        .batchBalance({...row,otherFeevalue:this.findPageDetailList.otherFeevalue,isNotCar:'1'})
         .then(res => {
           if (res.code==200) {
             this.findPage()

+ 1 - 1
src/views/FinancialManagement/CarInsurance/CompanySettlement/NoCarInsurance/HandlingFees.vue

@@ -387,7 +387,7 @@ export default {
     },
     templateDownload(){
       let a = document.createElement('a')
-      a.href = `${process.env.BASE_URL}template/noHandlingFeeTemplate.xlsx`;
+      a.href = `${process.env.BASE_URL}/template/noHandlingFeeTemplate.xlsx`;
       a.click();
     },
     //列表数据

+ 335 - 0
src/views/Sys/QuotationAuthorization.vue

@@ -0,0 +1,335 @@
+<template>
+    <div class="container" style="width: 99%; margin-top: 0px">
+        <!--布局容器-->
+        <el-container style="height: 100%" direction="vertical">
+            <el-main ref="elMain" style="padding: 0px">
+                <!-- 新增展开折叠 -->
+                <div style="margin-bottom: 20px; margin-top: 15px" class="flex a-start">
+                    <el-button size="small" type="info" plain icon="el-icon-sort" @click="fold()">展开折叠</el-button>
+                    <el-form :inline="true" class="demo-form-inline" size="small" style="margin-left: 30px">
+                        <el-form-item label="机构编码:">
+                            <el-input clearable v-model="peopledeptid" placeholder="请输入机构编码"></el-input>
+                        </el-form-item>
+                        <el-form-item label="来源:">
+                            <el-select v-model="managementSource" placeholder="选择来源" clearable>
+                                <el-option v-for="val in organizationSourceoptions" :key="val.dictValue"
+                                    :label="val.dictTag" :value="val.dictValue"></el-option>
+                            </el-select>
+                        </el-form-item>
+                        <el-form-item>
+                            <el-button type="primary" size="small" @click="managementSourceQuery">查询</el-button>
+                            <el-button type="primary" size="small" @click="batchEditing">批量编辑</el-button>
+                        </el-form-item>
+                    </el-form>
+                </div>
+                <!-- 表格渲染 -->
+                <el-table  height="600"  row-key="id"
+                    v-loading="loading" border :data="ztreeNodes"
+                    :tree-props="{ children: 'children', hasChildren: 'hasChilkdren' }" :header-cell-style="{
+                        background: '#F2F7FC',
+                        fontWeight: '900',
+                        color: '#606266',
+                    }" size="small" ref="expandTable"   @row-click="rowClick"  @select="handleSelectionChange">
+                    <el-table-column type="selection" width="50"  align="center" />
+                    <el-table-column prop="name" label="部门管理" width="300">
+                    </el-table-column>
+                    <el-table-column prop="deptCount" label="部门数量" width="80" align="center">
+                    </el-table-column>
+                    <el-table-column prop="id" label="ID" width="150" align="center">
+                    </el-table-column>
+                    <el-table-column prop="comlevel" label="机构级别" :formatter="comlevelFormatter" align="center"
+                        width="150"></el-table-column>
+                    <el-table-column prop="comattribute" label="机构性质" :formatter="comattributeFormatter" align="center"
+                        width="150">
+                    </el-table-column>
+                    <el-table-column prop="comtype" label="机构类型" :formatter="comtypeFormatter" align="center" width="150">
+                    </el-table-column>
+                    <el-table-column prop="managementSource" label="来源" align="center" width="150">
+                        <template slot-scope="scope">
+                            <span v-if="scope.row.managementSource == '1'">渠道</span>
+                            <span v-if="scope.row.managementSource == '2'">个代</span>
+                            <span v-if="scope.row.managementSource == '3'">服务</span>
+                        </template>
+                    </el-table-column>
+                    <el-table-column prop="address" label="机构地址" align="center">
+                    </el-table-column>
+                    <el-table-column label="操作" fixed="right" align="center" width="150">
+                        <template slot-scope="scope">
+                            <KtButton v-if="scope.row.deptType=='D'" :size="'medium'" :type="'text'" :label="'编辑'"
+                                @click.native.stop="handleEdit(scope.row)" @findPage="findSubDeptPage"></KtButton>
+                        </template>
+                    </el-table-column>
+                </el-table>
+            </el-main>
+        </el-container>
+        <el-dialog  :title="deptDialogTitle" width="20%" :visible.sync="deptDialogVisible" :close-on-click-modal="false"
+            v-dialogDrag @close="closeDeptDialog">
+            选择报价单 : <el-select v-model="themeId" placeholder="请选择" size="small">
+                <el-option
+                v-for="item in themeIdOptions"
+                :key="item.id"
+                :label="item.quotationAbbr"
+                :value="item.id">
+                </el-option>
+            </el-select>
+            <span slot="footer" class="dialog-footer">
+                <el-button size="small" @click="closeDeptDialog">{{
+                    $t("action.cancel")
+                }}</el-button>
+                <el-button size="small" type="primary" @click="deptSubmitForm()">{{
+                    $t("action.comfirm")
+                }}</el-button>
+            </span>
+        </el-dialog>
+    </div>
+</template>
+<script>
+import KtButton from "@/views/Core/KtButton"; //按钮权限组件
+import tree from "@/components/ztree.vue"; //机构树组件
+import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
+import CommonUtil from "@/utils/comutil.js";
+export default {
+    name: "Deptall",
+    components: {
+        KtButton,
+        tree,
+        KtCommonTable,
+    },
+    created() {
+        this.findTreeData(); // 获取左边机构树数据
+        //获取所有下拉框数据
+        this.getDictItems("comlevel");
+        this.getDictItems("comattribute");
+        this.getDictItems("comtype");
+        this.getDicType("organizationSource");
+        this.$api.menu.quotationList()
+                .then((res) => {
+                    if(res.code==200){
+                        this.themeIdOptions = res.data;
+                    }
+                    else{
+                        this.$message.error(res.msg)
+                    }
+                })
+    },
+    mounted() {
+        this.filters.id = "9";
+        this.findSubDeptPage(); //初始化数据
+    },
+    data() {
+        return {
+            themeId:'',
+            deptDialogTitle:'编辑',
+            themeIdOptions:[],
+            loading: false,
+            searchForm: {
+                classname: "",
+                status: "",
+            },
+            peopleid: "",
+            peopledeptid: "",
+            managementSource: "", //来源类型
+            filters: {
+                id: "",
+            },
+            pageRequest: {
+                pageNum: 1,
+                pageSize: 10,
+            },
+            pageResult: {},
+        
+            //------------下拉框数据   begin-----------------
+            comleveloptions: [],
+            comattributeoptions: [],
+            comtypeoptions: [],
+            organizationSourceoptions: [],
+            dialogVisible: false,
+            deptDialogVisible: false,
+            isshow: false,
+            expanded: false, // 在这里定义了展开与否的标志
+            // 部门DialogEnd
+            ztreeNodes:[],
+            organizationId:''
+        };
+    },
+    methods: {
+        //点击每一行的事件
+        rowClick(row, treeNode) {
+            //点每行展开折叠
+            row.expanded = !row.expanded;
+            this.$refs.expandTable.toggleRowExpansion(row, row.expanded);
+            //新增子公司、部门
+            this.currentTreeNode = row;
+            // this.currentTreeNode = treeNode;
+            this.filters.id = this.currentTreeNode.id;
+            this.findSubDeptPage();
+        },
+        //遍历表格数据
+        forTableData(arr, isExpand) {
+            arr.forEach((i) => {
+                this.$refs.expandTable.toggleRowExpansion(i, isExpand);
+                if (i.children) {
+                    this.forTableData(i.children, isExpand);
+                }
+            });
+        },
+        //展开收起树列表
+        fold() {
+            this.isshow = !this.isshow;
+            this.forTableData(this.ztreeNodes, this.isshow);
+        },
+
+        //--数据字典 begin --
+        getDictItems(typeName) {
+            this.$api.dict
+                .findByLableName(typeName)
+                .then((response) => {
+                    this[typeName + "options"] = response.data; // 把获取到的数据赋给this.data
+                    // this.ztreeNodes = this[typeName + "options"];
+                })
+                .catch((error) => {
+                    this[typeName + "options"] = [];
+                });
+        },
+        getDicType(type) {
+            this.$api.insCompany.dicType(type).then(res => {
+                if (res.code == 200) {
+                    this[type + 'options'] = res.data.ddList;
+                }
+            })
+
+        },
+        findTreeData() {
+            // 获取机构树的数据
+            this.loading = true;
+            this.$api.dept.findDeptTree(this.peopledeptid, "").then((res) => {
+                this.ztreeNodes = res.data;
+                this.loading = false;
+            });
+        },
+        managementSourceQuery() {
+            this.loading = true;
+            this.$api.dept
+                .findDeptTree(this.peopledeptid, this.managementSource)
+                .then((res) => {
+                    this.ztreeNodes = res.data;
+                    this.loading = false;
+                });
+        },
+        handleCreated(ztreeObj) {
+            this.ztreeObj = ztreeObj;
+            // onCreated 中操作ztreeObj对象展开第一个节点
+            ztreeObj.expandNode(ztreeObj.getNodes()[0], true);
+            this.currentTreeNode = ztreeObj.getNodes()[0];
+        },
+        // 右边表格Start
+        findSubDeptPage: function (data) {
+            // 获取分页数据
+            if (!!data) {
+                this.pageRequest = data.pageRequest;
+            }
+            this.pageRequest.columnFilters = {
+                id: {
+                    name: "id",
+                    value: this.filters.id,
+                },
+            };
+            this.$api.dept
+                .findSubDeptPage(this.pageRequest)
+                .then((res) => {
+                    this.pageResult = res.data;
+                })
+                .then(data != null ? data.callback : "");
+        },
+
+      
+        //-- formatter begin--
+        comlevelFormatter(row, column) {
+            let comlevel = row.comlevel;
+            return CommonUtil.getDataName({
+                dataList: this.comleveloptions,
+                value: "value",
+                label: "label",
+                data: comlevel,
+            });
+        },
+        comattributeFormatter(row, column) {
+            let comattribute = row.comattribute;
+            return CommonUtil.getDataName({
+                dataList: this.comattributeoptions,
+                value: "value",
+                label: "label",
+                data: comattribute,
+            });
+        },
+        comtypeFormatter(row, column) {
+            let comtype = row.comtype;
+            return CommonUtil.getDataName({
+                dataList: this.comtypeoptions,
+                value: "value",
+                label: "label",
+                data: comtype,
+            });
+        },
+        handleSelectionChange(select, row) {
+            if (!row.children) {
+            return false;
+            }
+            if (this.$refs.expandTable.selection.includes(row)) {
+            this.checkRow(row.children, true);  // 调用选中递归方法
+            } else {
+            this.checkRow(row.children, false);
+            }
+        },
+        //选中递归
+        checkRow(data, bool) {
+            data.forEach((item) => {
+            this.$refs.expandTable.toggleRowSelection(item, bool);
+            if (item.children) {
+                this.checkRow(item.children, bool);
+            }
+            });
+        },
+          // 编辑机构或部门
+     handleEdit(row) {
+            this.deptDialogTitle='编辑'
+            this.themeId=''
+            this.organizationId=row.id
+            this.deptDialogVisible=true
+        },
+        deptSubmitForm() {
+            let  data={
+                    organizationIds:this.deptDialogTitle=='编辑'?[this.organizationId]:this.$refs.expandTable.selection.map(e=>e.id),
+                    themeId:this.themeId
+                }
+            this.$api.menu
+                .quotationBatch(data)
+                .then((res) => {
+                    if(res.code==200){
+                        this.deptDialogVisible=false
+                        this.findSubDeptPage()
+                        this.$message({ message: res.msg, type: "success" });
+                    }
+                    else{
+                        this.$message({ message: res.msg, type: "error" });
+                    }
+                })
+        },
+        batchEditing(){
+            this.themeId=''
+            this.deptDialogTitle='批量编辑'
+            this.deptDialogVisible=true
+        },
+        //关闭部门弹框
+        closeDeptDialog() {
+            // this.$refs.deptDataForm.resetFields();
+            this.deptDialogVisible = false;
+        },
+    },
+};
+</script>
+  
+<style scoped>
+
+</style>
+  

+ 36 - 31
src/views/Sys/QuotationManagement.vue

@@ -21,16 +21,16 @@
           </el-col>
         </el-row> -->
         <el-button
-          icon="fa fa-plus"
           size="small"
           type="primary"
           @click="handleAdd"
+          style="margin-bottom: 20px;"
           >新增报价单</el-button
         >
       <!-- </el-form> -->
       <kt-common-table   :showBatchDelete="false" 
-        :data="pageResult" :columns="columns" @findPage="findPage" button1Name="编辑"   @handleButton1="bannerput" 
-        button2Name="删除"  @handleButton2="bannerdelete"  >
+        :data="pageResult" :columns="columns" @findPage="findPage" 
+         button2Name="编辑"   @handleButton2="bannerput"  button3Name="删除"  @handleButton3="bannerdelete">
         </kt-common-table>
     </el-main>
 
@@ -73,20 +73,22 @@
         </el-row>
         
         <el-form-item label="状态" prop="state">
-          <el-select v-model="form.state" placeholder="请选择是否开启">
+          <el-select v-model="form.state" placeholder="请选择是否开启" :size="overSize">
             <el-option label="开启" :value="1"></el-option>
             <el-option label="关闭" :value="0"></el-option>
           </el-select>
         </el-form-item>
-        <el-form-item label="报价单简称" prop="title">
+        <el-form-item label="报价单简称" prop="quotationAbbr" >
           <el-input
+          :size="overSize"
             v-model="form.quotationAbbr"
             placeholder="请输入报价单简称"
             style="width: 200px"
           ></el-input>
         </el-form-item>
-        <el-form-item label="报价单描述" prop="quotationDescr">
+        <el-form-item label="报价单描述" prop="quotationDescr" >
           <el-input
+          :size="overSize"
             v-model="form.quotationDescr"
             type="textarea"
             placeholder="请输入报价单描述"
@@ -95,14 +97,13 @@
      
       </el-form>
       <span slot="footer" class="dialog-footer">
-        <el-button @click="dialogVisible = false">取 消</el-button>
-        <el-button type="primary" @click="submit">确 定</el-button>
+        <el-button :size="overSize" @click="dialogVisible = false">取 消</el-button>
+        <el-button :size="overSize" type="primary" @click="submit">确 定</el-button>
       </span>
     </el-dialog>
   </div>
 </template>
 <script>
-import { formatWithSeperator, format } from "@/utils/datetime.js";
 import KtCommonTable from "@/views/Core/KtCommonTable.vue"; //表格组件
 
 export default {
@@ -114,16 +115,17 @@ export default {
       dialogTitle: "",
       overSize:'small',
       quotationImage: '',
+      filstList:[],
       qrCodeImage:'',
       dialogVisible: false, //控制对话框显示
       form: {},
-      pageResult: [],
+      pageResult: {},
       id: "",
       columns:[ //数据列
-          {prop: "id",label: "id"},
           {prop: "quotationAbbr",label: "报价单简称"},
           // formatter:this.imgFormatter
           {prop: "quotationDescr",label: "报价单描述"},
+          {prop: "quotationImage",label: "报价单图片",formatter:this.imgFormatter},
           {prop: "state",label: "状态",formatter:this.enableFormatter},
           {prop: "userId",label: "提交用户"},
           {prop: "createTime",label: "修改时间",},
@@ -135,9 +137,7 @@ export default {
       // 右侧列表查询数据End
     };
   },
-  mounted() {
-    this.findPage();
-  },
+
   methods: {
     drivingupload1(file) {
       let fileRaw = file.raw;
@@ -172,11 +172,12 @@ export default {
       });
     },
 
-    bannerput(index, row) {
-      //修改
+    bannerput( {row}) {
       this.dialogVisible = true;
-      this.form = row;
       this.id = row.id;
+      this.qrCodeImage=process.env.BASE_URL  +row.qrCodeImage
+      this.quotationImage=process.env.BASE_URL  +row.quotationImage
+      this.form ={...row}
     },
     bannerdelete( {row}) {
       this.$confirm("确定删除吗?", "提示", {
@@ -185,8 +186,7 @@ export default {
         type: "warning",
       })
         .then(() => {
-          let id = row.id;
-          this.$api.menu.sysQuotationTheme(id).then((res) => {
+          this.$api.menu.quotationDelete({id:row.id}).then((res) => {
             if (res.code == "200") {
               this.$message({
                 type: "success",
@@ -200,10 +200,9 @@ export default {
     submit() {
       if (!!this.id) {
         this.$api.menu.quotationUpdate(this.form, this.id).then((res) => {
-          console.log(res);
           if (res.code == "200") {
             this.$message({
-              message: res.msg,
+              message: res.msg ||'编辑成功',
               type: "success",
             });
             this.findPage();
@@ -215,10 +214,9 @@ export default {
         });
       } else {
         this.$api.menu.quotationSave(this.form).then((res) => {
-          console.log(res);
           if (res.code == "200") {
             this.$message({
-              message: res.msg,
+              message: res.msg ||'新增成功',
               type: "success",
             });
             this.findPage();
@@ -231,24 +229,22 @@ export default {
       }
     },
     imgFormatter(row) {
-      let image = row.image;
-      return <img src={"" + image + ""} class="imageclass"></img>;
+      let image = row.quotationImage;
+      return <img src={"" + process.env.BASE_URL  +image + ""} class="imageclass"></img>;
     },
     //新增海报
     handleAdd() {
       this.dialogTitle = "新增";
       this.dialogVisible = true;
       this.form={}
+      this.quotationImage=''
+      this.qrCodeImage=''
     },
 
     //--数据字典 end --
     // 上传图片的方法End
     handleClose(done) {
-      this.$confirm("确认关闭?", { lockScroll: false })
-        .then((_) => {
-          done();
-        })
-        .catch((_) => {});
+     this.dialogVisible=false 
     },
     //-- formatter begin--
     enableFormatter(row) {
@@ -266,7 +262,16 @@ export default {
        }
       this.$api.menu.quotationPage(this.pageRequest).then((res) => {
         if(res.code==200){
-          this.pageResult = res.data?res.data:[]
+          res.data.content = res.data.records
+          let pageList = {
+            content: res.data.records,
+            pageNum: res.data.current,
+            pageSize: res.data.size,
+            totalPages: res.data.pages,
+            totalSize: res.data.total,
+          }
+          this.pageResult = pageList;
+
         }
         else{
           this.$message.error(res.msg)