haoxuan
2023-12-26 eed27d3000e127c433fd45609d0d5e5d06b7868c
Merge branch 'dev' of http://192.168.5.5:10010/r/web/crm-web into dev
8个文件已修改
103 ■■■■■ 已修改文件
src/common/untils/request.js 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/layout/components/appsidebar/index.vue 47 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/router/index.js 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/store/index.js 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/other/payment/collectionPlan/AddCollectionPlan.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/contractManage/DetailContractManage.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/contractManage/index.vue 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/sales/salesDetails/AddSalesDetailsDialog.vue 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/common/untils/request.js
@@ -33,7 +33,7 @@
        prod:`//${window.location.hostname}:9080`,
        test:`//192.168.20.119:9080`,
        // 想跳到本地启动的登录页的话需要把dev改成你本地项目路径
        dev: `//192.168.8.111:8081`
        dev: `//192.168.20.158:8080`
    }
    return loginPathMap[environmentType()]
@@ -74,8 +74,8 @@
      return res
    } else if([2012,2013,2014,2015].includes(res.data.code)){
      if (isDev){
        alert("JWT失效")
        // window.location = getApsPage()+'/'
        alert("JWT失效,即将跳转至登录页..")
        window.location = getApsPage()+'/login'
      }else {
        //   JWT鉴权失效 跳转到登录页
        window.location = getApsPage()+'/login'
@@ -93,8 +93,8 @@
  (error) => {
    if (error.response.status === 401){
      if (isDev){
        alert("JWT失效")
        // window.location = getApsPage()+'/'
        alert("JWT失效,即将跳转至登录页..")
        window.location = getApsPage()+'/login'
      }else {
        //   JWT鉴权失效 跳转到登录页
        window.location = getApsPage()+'/login'
src/components/layout/components/appsidebar/index.vue
@@ -36,12 +36,12 @@
          <el-menu-item index="/backgroundConfig/rolePermssion">角色权限</el-menu-item>
        </el-submenu> -->
      </el-menu>
      <el-empty v-if="this.menus===null||this.menus===undefined||this.menus.length===0" :image-size="130" description="没有侧栏菜单"></el-empty>
    </div>
  </div>
</template>
<script>
import {getMenuTreeByRole} from "@/api/menus/index"
export default {
  name: "AppSidebar",
  props: {},
@@ -62,28 +62,22 @@
  },
  methods: {
    getMenuTreeByRole(){
      getMenuTreeByRole().then((res)=>{
        console.log(res.data.list,"crm菜单")
        res.data.list.map((item)=>{
          if(item.systemType===2){
            let newList= JSON.parse(JSON.stringify([...item.menus]))
            // 隐藏了 生成计划 和 服务收费管理模块
            if(newList[1]){
              const found = newList[1].children.find(obj => obj.title === "生成计划")
              if(found){
                newList[1].children=[...newList[1].children.slice(0, -1)];
              }
            }
            if(newList[2]){
              const found1 = newList[2].children.find(obj => obj.title === "服务收费管理")
              if(found1){
                newList[2].children=[...newList[2].children.slice(0, -1)];
              }
            }
            this.menus=newList
          }
        })
      })
      let newList=this.$store.state.menus
      console.log(newList,"newList")
      // 隐藏了 生成计划 和 服务收费管理模块
      if(newList[1]){
        const found = newList[1].children.find(obj => obj.title === "生成计划")
        if(found){
          newList[1].children=[...newList[1].children.slice(0, -1)];
        }
      }
      if(newList[2]){
        const found1 = newList[2].children.find(obj => obj.title === "服务收费管理")
        if(found1){
          newList[2].children=[...newList[2].children.slice(0, -1)];
        }
      }
      this.menus=newList
    },
    // 监听路由
    initNavMenu() {
@@ -100,4 +94,11 @@
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
@import "./index.scss";
::v-deep .el-empty{
  .el-empty__description{
    p{
      color: #dddd;
    }
  }
}
</style>
src/router/index.js
@@ -6,6 +6,7 @@
import salesRouter from "./sales/index.js"
import serviceRouter from "./service/index.js"
import {getMenuTreeByRole} from "@/api/menus/index"
import store from '@/store/index.js';
// import backgroundConfigRouter from "./backgroundConfig/index.js"
Vue.use(Router)
@@ -120,6 +121,7 @@
    };
    const foundObject = res.data.list.find(obj => obj.systemType === 2);
    if (foundObject) {
      store.commit('setMenus', foundObject.menus);
      foundObject.menus.forEach(item => {
        const nextPath = item.children.find(obj => obj.path === routePath);
        if (nextPath) {
src/store/index.js
@@ -4,7 +4,15 @@
Vue.use(Vuex)
export default new Vuex.Store({
  state:{
    menus:[]
  },
  mutations: {
    setMenus(state, payload) {
      state.menus = payload;
    },
  },
  modules: {
    getClientName
  }
  },
})
src/views/other/payment/collectionPlan/AddCollectionPlan.vue
@@ -198,7 +198,7 @@
      amount: 130,
      sourceType: this.editCommonConfig.sourceType, // 源单类型 1销售明细2服务合同3销售发票
      sourceId: this.editCommonConfig.infomation.id,
      principalId:0,
      principalId: '',
      planAmount: 0, // 计划金额
      firstDate: this.getCurrentDate(1),
      collectionType: 1,
@@ -237,7 +237,7 @@
        collectionType: this.collectionType,
        moneyType: "人民币",
        amountTotal: this.editCommonConfig.infomation.amountTotal,
        principalId:0
        principalId:''
      }
    },
    getCommonData() {
@@ -344,7 +344,7 @@
          id: 0,
          moneyType: "人民币",
          percent: ratio,
          principalId: this.principalId,
          principalId: Number(this.principalId),
          remark: "",
          sourceId: this.sourceId,
          sourceType: this.sourceType,
src/views/sales/contractManage/DetailContractManage.vue
@@ -10,7 +10,7 @@
      <template slot="title">
        <div class="header">
          <span class="header-label">合同管理</span>
          <span class="header-title">{{ detailConfig.infomation.number }}</span>
          <span class="header-title">{{ detailConfig.infomation.contractName }}</span>
        </div>
      </template>
      <div class="content">
src/views/sales/contractManage/index.vue
@@ -7,7 +7,7 @@
          :show-download="false"
          :amount-view="false"
          :show-action-btn="false"
          placeholder="请输入单据编号"
          placeholder="请输入合同名称或单据编号"
          @searchClick="onFilterSearch"
        >
          <template slot="leftButton">
@@ -102,18 +102,14 @@
      },
      selValueList: [],
      search_map: {},
      searchSel: {
        value: "number",
        label: "单据编号"
      },
      tableColumn: [
        { label: "单据编号", prop: "number", min: 120, isCommonClick: true, default: true },
        { label: "合同名称", prop: "contractName", min: 120, isCommonClick: true, default: true },
        { label: "负责人", prop: "member_name", min: 90 },
        { label: "客户名称", prop: "client_name" },
        { label: "合同状态", prop: "serviceContractStatus_name", min: 100 },
        { label: "创建时间", prop: "created_at" }
      ],
      showCol: ["单据编号", "负责人", "客户名称", "合同状态", "创建时间"],
      showCol: ["合同名称", "负责人", "客户名称", "合同状态", "创建时间"],
      keyword:''
    }
  },
@@ -246,7 +242,7 @@
    },
    // 合同管理详情
    selCommonClick(row) {
      console.log(row)
      console.log(row,"合同详情")
      this.contractDetail.visible = true
      this.contractDetail.infomation = { ...row }
    }
src/views/sales/salesDetails/AddSalesDetailsDialog.vue
@@ -208,6 +208,7 @@
                    placeholder="选择日期"
                    style="width: 100%"
                    :disabled="isView"
                    :picker-options="pickerOptionsBefore"
                  >
                  </el-date-picker>
                </el-form-item>
@@ -235,6 +236,7 @@
                    placeholder="选择日期"
                    style="width: 100%"
                    :disabled="isView"
                    :picker-options="pickerOptions"
                  >
                  </el-date-picker>
                </el-form-item>
@@ -601,7 +603,17 @@
      quotationId: this.editCommonConfig.infomation.quotationId,
      tableData: [],
      isView: this.editCommonConfig.title === "查看",
      thatMember: {}
      thatMember: {},
      pickerOptions: {
        disabledDate(time) {
          return time.getTime() <  Date.now() - 8.64e7;
        },
      },
      pickerOptionsBefore:{
        disabledDate(time) {
          return time.getTime() >  Date.now();
        },
      }
    }
  },
  created() {