Explorar o código

首页加载地址存本地

Qukatie hai 1 mes
pai
achega
c73453e8a4

+ 16 - 19
src/views/fc/customer/detailsPage.vue

@@ -38,19 +38,19 @@
             >
             </dic-select>
           </tempalte>
-           <tempalte slot="brandName">
-              <dic-select
-                v-model="form.brandName"
-                placeholder="品牌"
-                label="cname"
-                url="/gubersail-admin/brandDesc/listAllV1?type=PP"
-                :filterable="true"
-                @selectChange="dicChange('brandName', $event)"
-                :multiple="true"
-                :disabled="option.disabled"
-                dataType="string"
-              ></dic-select>
-            </tempalte>
+          <tempalte slot="brandName">
+            <dic-select
+              v-model="form.brandName"
+              placeholder="品牌"
+              label="cname"
+              url="/gubersail-admin/brandDesc/listAllV1?type=PP"
+              :filterable="true"
+              @selectChange="dicChange('brandName', $event)"
+              :multiple="true"
+              :disabled="option.disabled"
+              dataType="string"
+            ></dic-select>
+          </tempalte>
         </avue-form>
       </trade-card>
       <trade-card title="客户联系人" v-loading="loadingBtn">
@@ -631,12 +631,9 @@ export default {
       customerList({ corpType: "KH" }).then(res => {
         this.findObject(this.option4.column, "parentId").dicData = res.data.data.records;
       });
-      this.getAreaData();
-      this.findObject(this.option2.column, "belongtoarea").dicData = JSON.parse(localStorage.getItem("areaTypeTree"));
-      // this.$refs.crud.init();
-    },
-    getAreaData() {
-      areaTypeTree().then(res => {});
+      this.findObject(this.option2.column, "belongtoarea").dicData = JSON.parse(localStorage.getItem("areaTypeTree"))
+        ? JSON.parse(localStorage.getItem("areaTypeTree"))
+        : [];
     },
     getDetail(id) {
       this.loadingBtn = true;

+ 4 - 6
src/views/fc/customer/index.vue

@@ -316,11 +316,12 @@ export default {
           {
             label: "上级类型",
             prop: "parentId",
-            dicData: [],
+            dicUrl: "/api/gubersail-admin/corpstype/page?corpType=KH",
             type: "tree",
             props: {
               label: "cname",
-              value: "id"
+              value: "id",
+              res: "data.records"
             },
             span: 24
           }
@@ -501,7 +502,7 @@ export default {
               label: "dictValue",
               value: "dictKey"
             },
-            dicData: [],
+            dicUrl: "/api/blade-system/dict-biz/dictionary?code=client_status",
             hide: true,
             showColumn: false,
             overHidden: true
@@ -612,9 +613,6 @@ export default {
       this.onLoad(this.page, this.search);
     },
     getAllWorkDicts() {
-      this.getWorkDicts("client_status").then(res => {
-        this.findObject(this.option.column, "status").dicData = res.data.data;
-      });
       getCorpType({ corpType: "KH" }).then(res => {
         this.treeData = res.data.data;
       });

+ 484 - 0
src/views/goodsManage/detailsPage.vue

@@ -0,0 +1,484 @@
+<template>
+  <div>
+    <div class="customer-head">
+      <div class="customer-back">
+        <el-button type="danger" style="border: none;background: none;color: red" icon="el-icon-arrow-left" @click="goBack()">返回列表 </el-button>
+      </div>
+      <div class="add-customer-btn">
+        <el-button class="el-button--small-yh" style="margin-left: 6px;" type="primary" size="small" v-if="editBtn" @click="inEdit">编 辑 </el-button>
+        <el-button class="el-button--small-yh" v-else style="margin-left: 6px;" type="primary" size="small" :disabled="editDis" @click="submit"
+          >保 存
+        </el-button>
+        <el-button
+          v-if="form.id&&form.auditStatus == 0"
+          class="el-button--small-yh"
+          style="margin-left: 6px;"
+          type="success"
+          size="small"
+          :disabled="editDis"
+          @click="allCLick('提交审批')"
+          >提交审批
+        </el-button>
+        <el-button
+          v-if="form.id&&form.auditStatus == 1"
+          class="el-button--small-yh"
+          style="margin-left: 6px;"
+          type="danger"
+          size="small"
+          :disabled="editBtn"
+          @click="allCLick('撤销审批')"
+          >撤销审批
+        </el-button>
+      </div>
+    </div>
+    <div style="margin-top: 50px">
+      <trade-card title="基础信息">
+        <avue-form :option="optionForm" v-model="form" ref="form">
+          <tempalte slot="sourceName">
+            <dic-select
+              v-model="form.sourceName"
+              placeholder="来源方名称"
+              label="cnName"
+              res="records"
+              url="/gubersail-admin/fc/customer/list"
+              :filterable="true"
+              :remote="true"
+              dataName="cnName"
+              @selectChange="dicChange('stationCname', $event)"
+              :disabled="editDis"
+              :slotRight="true"
+              rightLabel="code"
+            ></dic-select>
+          </tempalte>
+        </avue-form>
+      </trade-card>
+      <trade-card title="文件中心">
+        <upload-file :data="form.claimAttachmentList" :disabled="editDis" @upDate="upDate"></upload-file>
+      </trade-card>
+      <trade-card title="反馈表">
+        <avue-crud :option="option" :data="form.bladeClaimAuditList" id="out-table" ref="crud" @selection-change="selectionChange"> </avue-crud>
+      </trade-card>
+      <trade-card title="操作记录">
+        <avue-form :option="optionForm2" v-model="form" ref="form2"> </avue-form>
+      </trade-card>
+    </div>
+  </div>
+</template>
+
+<script>
+import { submit, detail, submitApprova, revokeApproval } from "@/api/claimSettlement/index";
+import dicSelect from "@/components/dicSelect/main.vue";
+export default {
+  name: "detailsPage",
+  data() {
+    return {
+      editBtn: false,
+      editDis: false,
+      form: {
+        claimAttachmentList: [],
+        bladeClaimAuditList: []
+      },
+      optionForm: {
+        menuBtn: false,
+        span: 6,
+        disabled: false,
+        labelWidth: 100,
+        column: [
+          {
+            label: "理赔单号",
+            prop: "claimNo",
+            disabled: true
+          },
+          {
+            label: "来源类型",
+            prop: "claimSourceType",
+            type: "select",
+            dicData: [
+              {
+                label: "经销商",
+                value: 1
+              },
+              {
+                label: "门店",
+                value: 2
+              },
+              {
+                label: "终端消费者",
+                value: 3
+              }
+            ],
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ]
+          },
+          {
+            label: "来源方名称",
+            prop: "sourceName"
+          },
+          {
+            label: "消费者姓名",
+            prop: "consumerName"
+          },
+          {
+            label: "消费者电话",
+            prop: "consumerPhone"
+          },
+          {
+            label: "胎号",
+            prop: "tyreNo",
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ]
+          },
+          {
+            label: "规格型号",
+            prop: "tyreSpecs"
+          },
+          {
+            label: "购买日期",
+            prop: "purchaseDate",
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00"
+          },
+          {
+            label: "装车日期",
+            prop: "mountDate",
+            type: "date",
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd 00:00:00"
+          },
+          {
+            label: "行驶里程(km)",
+            prop: "runMileage"
+          },
+          {
+            label: "索赔金额",
+            prop: "claimAmount"
+          }, 
+          {
+            label: "审核状态",
+            prop: "auditStatus",
+            type: "select",
+            dicData: [
+              {
+                label: "待审核",
+                value: 0
+              },
+              {
+                label: "审核中",
+                value: 1
+              },
+              {
+                label: "已通过",
+                value: 2
+              },
+              {
+                label: "已拒绝",
+                value: 3
+              }
+            ],
+            disabled: true
+          },
+          {
+            label: "理赔原因",
+            prop: "claimReason",
+            type: "textarea",
+            span: 12,
+            minRows: 2,
+            rules: [
+              {
+                required: true,
+                message: " ",
+                trigger: "blur"
+              }
+            ]
+          },
+          {
+            label: "备注",
+            prop: "remark",
+            type: "textarea",
+            span: 12,
+            minRows: 2
+          }
+        ]
+      },
+      optionForm2: {
+        menuBtn: false,
+        span: 6,
+        disabled: false,
+        labelWidth: 100,
+        column: [
+          {
+            label: "制单人",
+            prop: "createUserName",
+            disabled: true
+          },
+          {
+            label: "制单日期",
+            prop: "createTime",
+            disabled: true
+          },
+          {
+            label: "修改人",
+            prop: "updateUserName",
+            disabled: true
+          },
+          {
+            label: "修改日期",
+            prop: "updateTime",
+            disabled: true
+          }
+        ]
+      },
+      option: {
+        maxHeight: 340,
+        calcHeight: 30,
+        index: true,
+        menu: false,
+        header: false,
+        column: [
+          {
+            label: "理赔单号",
+            prop: "claimNo",
+            overHidden: true
+          },
+          {
+            label: "审核结论",
+            prop: "auditResult",
+            overHidden: true
+          },
+          {
+            label: "核定赔付金额",
+            prop: "auditAmount",
+            overHidden: true
+          },
+          {
+            label: "详细审核说明",
+            prop: "reasonDetail",
+            overHidden: true
+          },
+          {
+            label: "审核人姓名",
+            prop: "auditorName",
+            overHidden: true
+          },
+          {
+            label: "审核时间",
+            prop: "auditTime",
+            overHidden: true
+          },
+          {
+            label: "反馈渠道",
+            prop: "feedbackChannel",
+            overHidden: true
+          },
+          {
+            label: "客户反馈内容",
+            prop: "feedbackDesc",
+            overHidden: true
+          },
+          {
+            label: "客户反馈时间",
+            prop: "feedbackTime",
+            overHidden: true
+          },
+          {
+            label: "申诉状态",
+            prop: "appealStatus",
+            overHidden: true
+          },
+          {
+            label: "申诉处理结果",
+            prop: "appealResult",
+            overHidden: true
+          },
+          {
+            label: "申诉处理时间",
+            prop: "appealTime",
+            overHidden: true
+          },
+          {
+            label: "制单人",
+            prop: "createUserName",
+            overHidden: true
+          },
+          {
+            label: "制单日期",
+            prop: "createTime",
+            type: "date",
+            overHidden: true,
+            width: 120,
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss"
+          },
+          {
+            label: "修改人",
+            prop: "updateUserName",
+            overHidden: true
+          },
+          {
+            label: "修改日期",
+            prop: "updateTime",
+            type: "date",
+            overHidden: true,
+            width: 120,
+            format: "yyyy-MM-dd",
+            valueFormat: "yyyy-MM-dd HH:mm:ss"
+          },
+          {
+            label: "备注",
+            prop: "remarks",
+            cell: true,
+            width: 150,
+            overHidden: true
+          }
+        ]
+      }
+    };
+  },
+  components: { dicSelect },
+  props: {
+    detailData: Object
+  },
+  created() {
+    if (this.detailData && this.detailData.id) {
+      this.editBtn = true;
+      this.editDis = true;
+      this.optionForm.disabled = true;
+      this.getDetail(this.detailData.id);
+    }
+  },
+  methods: {
+    inEdit() {
+      this.editBtn = false;
+      if (this.form.auditStatus == 0) {
+        this.editDis = false;
+        this.optionForm.disabled = false;
+      }
+    },
+    allCLick(name) {
+      if (name == "提交审批") {
+        this.$confirm("是否提交审批?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {
+            id: this.form.id
+          };
+          submitApprova(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id);
+          });
+        });
+      }
+      if (name == "撤销审批") {
+        this.$confirm("是否撤销审批?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning"
+        }).then(() => {
+          let obj = {
+            id: this.form.id
+          };
+          revokeApproval(obj).then(res => {
+            this.$message.success("操作成功");
+            this.getDetail(this.form.id);
+          });
+        });
+      }
+    },
+    upDate(data) {
+      this.form.claimAttachmentList = data;
+    },
+    submit() {
+      // @ts-ignore
+      this.$refs.form.validate((valid, done) => {
+        done();
+        if (valid) {
+          const loading = this.$loading({
+            lock: true,
+            text: "加载中",
+            spinner: "el-icon-loading",
+            background: "rgba(255,255,255,0.7)"
+          });
+          submit(this.form)
+            .then(res => {
+              this.$message.success("保存成功");
+              this.getDetail(res.data.data.id);
+            })
+            .finally(() => {
+              loading.close();
+            });
+        } else {
+          return false;
+        }
+      });
+    },
+    /**
+     * @param {any} id
+     */
+    getDetail(id) {
+      const loading = this.$loading({
+        lock: true,
+        text: "加载中",
+        spinner: "el-icon-loading",
+        background: "rgba(255,255,255,0.7)"
+      });
+      detail({ id: id })
+        .then(res => {
+          if (res.data.data.auditStatus > 0) {
+            this.editBtn = true;
+            this.editDis = true;
+            this.optionForm.disabled = true;
+          }
+           if (!this.editBtn&&res.data.data.auditStatus == 0) {
+            this.editDis = false;
+            this.optionForm.disabled = false;
+          }
+          this.form = res.data.data;
+        })
+        .finally(() => {
+          loading.close();
+        });
+    },
+    /**
+     * @param {any} type
+     */
+    goBack(type) {
+      this.$emit("goBack");
+    }
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-form-item__error {
+  display: none !important;
+}
+
+::v-deep .el-form-item {
+  margin-bottom: 8px !important;
+}
+
+::v-deep .el-table .cell {
+  padding: 0 2px !important;
+
+  .el-form-item {
+    margin-bottom: 0px !important;
+  }
+}
+::v-deep .el-table--small td,
+.el-table--small th {
+  padding: 2px !important;
+}
+</style>

+ 366 - 0
src/views/goodsManage/index.vue

@@ -0,0 +1,366 @@
+<template>
+  <div>
+    <basic-container v-if="isShow">
+      <avue-crud
+        ref="crud"
+        :option="option"
+        :table-loading="loading"
+        :data="data"
+        :page.sync="page"
+        :search.sync="query"
+        @search-change="searchChange"
+        @search-reset="searchReset"
+        @selection-change="selectionChange"
+        @current-change="currentChange"
+        @size-change="sizeChange"
+        @refresh-change="refreshChange"
+        @on-load="onLoad"
+      >
+        <template slot="menuLeft">
+          <el-button
+            type="primary"
+            size="small"
+            icon="el-icon-plus"
+            @click="addButton"
+            >创建单据
+          </el-button>
+        </template>
+        <template slot="menu" slot-scope="{ row, index }">
+          <el-button
+            size="small"
+            icon="el-icon-edit"
+            type="text"
+            @click="rowEdit(row)"
+            >编辑
+          </el-button>
+          <el-button
+            size="small"
+            icon="el-icon-delete"
+            type="text"
+            @click="rowDel(row, index)"
+            :disabled="row.auditStatus > 0"
+            >删 除
+          </el-button>
+        </template>
+        <template slot="contractNo" slot-scope="{ row }">
+          <span style="color: #1e9fff;cursor: pointer;" @click="rowEdit(row)">
+            {{ row.contractNo }}
+          </span>
+        </template>
+      </avue-crud>
+    </basic-container>
+    <detailsPage
+      v-if="!isShow"
+      :detailData="detailData"
+      @goBack="goBack"
+    ></detailsPage>
+  </div>
+</template>
+
+<script>
+import { getList, remove } from '@/api/claimSettlement/index';
+import detailsPage from './detailsPage.vue';
+import { getToken } from '@/util/auth';
+export default {
+  data() {
+    return {
+      isShow: true,
+      form: {},
+      query: {},
+      loading: false,
+      page: {
+        pageSize: 10,
+        currentPage: 1,
+        total: 0
+      },
+      selectionList: [],
+      option: {
+        height: 'auto',
+        calcHeight: 30,
+        menuWidth: 120,
+        tip: false,
+        searchShow: true,
+        searchMenuSpan: 24,
+        border: true,
+        index: true,
+        addBtn: false,
+        viewBtn: false,
+        editBtn: false,
+        delBtn: false,
+        selection: true,
+        searchIcon: true,
+        align: 'center',
+        searchIndex: 3,
+        column: [
+          {
+            label: '理赔单号',
+            prop: 'claimNo',
+            search: true,
+            overHidden: true
+          },
+          {
+            label: '来源类型',
+            prop: 'claimSourceType',
+            search: true,
+            type: 'select',
+            dicData: [
+              {
+                label: '经销商',
+                value: 1
+              },
+              {
+                label: '门店',
+                value: 2
+              },
+              {
+                label: '终端消费者',
+                value: 3
+              }
+            ],
+            overHidden: true
+          },
+          {
+            label: '来源方名称',
+            prop: 'sourceName',
+            width: 90,
+            search: true,
+            overHidden: true
+          },
+          {
+            label: '消费者姓名',
+            prop: 'consumerName',
+            width: 90,
+            search: true,
+            overHidden: true
+          },
+          {
+            label: '消费者电话',
+            prop: 'consumerPhone',
+            width: 90,
+            overHidden: true
+          },
+          {
+            label: '胎号',
+            prop: 'tyreNo',
+            overHidden: true
+          },
+          {
+            label: '规格型号',
+            prop: 'tyreSpecs',
+            overHidden: true
+          },
+          {
+            label: '购买日期',
+            prop: 'purchaseDate',
+            overHidden: true
+          },
+          {
+            label: '装车日期',
+            prop: 'mountDate',
+            overHidden: true
+          },
+          {
+            label: '行驶里程(km)',
+            prop: 'runMileage',
+            width: 100,
+            overHidden: true
+          },
+          {
+            label: '理赔原因',
+            prop: 'claimReason',
+            overHidden: true
+          },
+          {
+            label: '索赔金额',
+            prop: 'claimAmount',
+            overHidden: true
+          },
+          {
+            label: '审核状态',
+            prop: 'auditStatus',
+            type: 'select',
+            dicData: [
+              {
+                label: '待审核',
+                value: 0
+              },
+              {
+                label: '审核中',
+                value: 1
+              },
+              {
+                label: '已通过',
+                value: 2
+              },
+              {
+                label: '已拒绝',
+                value: 3
+              }
+            ],
+            overHidden: true
+          },
+          {
+            label: '提交时间',
+            prop: 'submitTime',
+            overHidden: true
+          },
+          {
+            label: '备注',
+            prop: 'remark',
+            overHidden: true
+          },
+          {
+            label: '制单人',
+            prop: 'createUserName',
+            overHidden: true,
+            width: 80
+          },
+          {
+            label: '制单日期',
+            prop: 'createTime',
+            type: 'date',
+            overHidden: true,
+            width: 100,
+            format: 'yyyy-MM-dd',
+            valueFormat: 'yyyy-MM-dd HH:mm:ss'
+          },
+          {
+            label: '修改人',
+            prop: 'updateUserName',
+            overHidden: true,
+            width: 80
+          },
+          {
+            label: '修改日期',
+            prop: 'updateTime',
+            type: 'date',
+            overHidden: true,
+            width: 100,
+            format: 'yyyy-MM-dd',
+            valueFormat: 'yyyy-MM-dd HH:mm:ss'
+          }
+        ]
+      },
+      data: []
+    };
+  },
+  components: {
+    detailsPage
+  },
+  created() {
+  },
+  methods: {
+    addButton() {
+      this.isShow = false;
+    },
+    /**
+     * @param {{ id: any; }} row
+     */
+    rowEdit(row) {
+      this.detailData = {
+        id: row.id
+      };
+      this.isShow = false;
+    },
+    // 删除
+    /**
+     * @param {{ item: number; id: any; }} row
+     * @param {any} index
+     */
+    rowDel(row, index) {
+      if (row.item == 1) {
+        return this.$message.error('存在明细不允许删除');
+      }
+      this.$confirm('确定将选择数据删除?', {
+        confirmButtonText: '确定',
+        cancelButtonText: '取消',
+        type: 'warning'
+      }).then(() => {
+        remove({ ids: row.id }).then(res => {
+          this.onLoad(this.page, this.query);
+          this.$message.success('成功删除');
+        });
+      });
+    },
+    searchReset() {
+      this.query = this.$options.data().query;
+      this.onLoad(this.page);
+    },
+    // 搜索按钮点击
+    /**
+     * @param {any} params
+     * @param {() => void} done
+     */
+    searchChange(params, done) {
+      this.page.currentPage = 1;
+      this.onLoad(this.page, this.query);
+      done();
+    },
+    /**
+     * @param {any} list
+     */
+    selectionChange(list) {
+      this.selectionList = list;
+    },
+    /**
+     * @param {any} currentPage
+     */
+    currentChange(currentPage) {
+      this.page.currentPage = currentPage;
+    },
+    /**
+     * @param {any} pageSize
+     */
+    sizeChange(pageSize) {
+      this.page.pageSize = pageSize;
+    },
+    refreshChange() {
+      this.onLoad(this.page, this.query);
+    },
+    /**
+     * @param {{ currentPage: any; pageSize: any; }} page
+     */
+    onLoad(page, params = {}) {
+      let obj = {};
+      obj = {
+        ...Object.assign(params, this.query)
+      };
+      this.loading = true;
+      getList(page.currentPage, page.pageSize, obj)
+        .then(res => {
+          this.data = res.data.data.records;
+          this.page.total = res.data.data.total;
+          this.$nextTick(() => {
+            this.$refs.crud.doLayout();
+            // this.$refs.crud.dicInit();
+          });
+        })
+        .finally(() => {
+          this.loading = false;
+        });
+    },
+    // 详情的返回列表
+    goBack() {
+      // 初始化数据
+      if (JSON.stringify(this.$route.query) != '{}') {
+        this.$router.$avueRouter.closeTag();
+        this.$router.push({
+          path: '/claimSettlement/index'
+        });
+      }
+      this.detailData = {};
+      this.isShow = true;
+      this.onLoad(this.page, this.query);
+    },
+  }
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep .el-col-md-8 {
+  width: 24.33333%;
+}
+// ::v-deep .el-table .cell{
+//   display: flex;
+// }
+</style>

+ 7 - 0
src/views/wel/index.vue

@@ -6,6 +6,7 @@
 import { getUserInfo } from "@/api/system/user";
 import { setStore } from "@/util/store";
 import { getLazyList } from "@/api/system/dept";
+import { areaTypeTree } from "@/api/fc/customerInformation";
 export default {
     name: "wel",
     data() {
@@ -31,6 +32,12 @@ export default {
         getLazyList().then(res => {
             localStorage.setItem('user-Information', res.data.data.length ? JSON.stringify(res.data.data[0]) : null)
         })
+        
+        if (!localStorage.getItem('areaTypeTree')) {
+            areaTypeTree().then(res => {
+                localStorage.setItem('areaTypeTree', JSON.stringify(res.data.data));
+            })
+        }
 
     },
     components: {